Safety supervision work ticket intelligent generation method based on ReAct intelligent agent

By using a ReAct-based intelligent agent approach, a power safety supervision work ticket system was constructed. By utilizing a large-scale language model and a multi-model voting mechanism, the system solved the problems of flexibility and maintenance cost in the existing system, and achieved efficient and reliable generation of safety supervision work tickets.

CN121503703APending Publication Date: 2026-02-10ZHEJIANG UNIV
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202610036944.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

The existing power safety supervision work ticket generation system lacks flexibility and adaptability, has a complex rule base construction and maintenance, high maintenance costs due to data updates, and lacks interpretability and reliability in its output results.

Method used

A ReAct-based intelligent agent approach is adopted to construct an electrical topology knowledge graph, a device vector index library, a safety measure template library, and a precise retrieval corpus. A large-scale language model is used for task parsing and reasoning, and a multi-model majority voting mechanism is combined to generate safety measure statements.

Benefits of technology

It improves the system's flexibility and generalization ability, reduces the complexity of rule base construction and maintenance, reduces the cost of repeated model training, and enhances the reliability and interpretability of the output results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503703A_ABST
    Figure CN121503703A_ABST
Patent Text Reader

Abstract

The invention discloses a safety supervision work ticket intelligent generation method based on a ReAct intelligent agent, and belongs to the technical field of electric power safety supervision work tickets. The method comprises the following steps: constructing a domain knowledge base comprising an electrical topology knowledge graph, an equipment vector index database, a security measure template database and a precise retrieval corpus; establishing a ReAct intelligent agent taking a large language model as a core, receiving a natural language task description, and matching an electrical equipment text description to an electrical equipment entity through mixed collaborative retrieval; and the intelligent agent calls an atlas query tool to traverse related equipment through multi-step'observation-reasoning-action 'circulation, and calls a safety measure generation tool to generate standard safety measure statements based on the template. According to the method, complex composite tasks can be automatically analyzed, equipment entities can be accurately matched, compliance safety measures can be dynamically generated, the flexibility, maintainability and output reliability of the system are effectively improved, and dependence on a predefined rule base and repeated training is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power safety supervision work ticket technology, specifically relating to a method, system, equipment and medium for intelligent generation of safety supervision work tickets based on ReAct intelligent agents. Background Technology

[0002] The standardized generation and efficient execution of power safety supervision work permits are core elements in ensuring on-site operational safety and efficiency. Currently, the operational methods in this field face significant challenges in two main areas: efficient generation and automated processing, which restricts the further realization of its safety benefits and operational efficiency.

[0003] Firstly, at the level of efficient generation, the existing process suffers from efficiency bottlenecks and consistency risks. The completion of security measures is highly dependent on the personal experience and technical skills of the operators and review experts. This not only easily leads to problems such as omissions, non-standard expressions, or even logical errors due to differences in experience or negligence, but also makes the standardization and reuse of ticketing data difficult, thus creating obstacles for intelligent analysis based on historical data.

[0004] Secondly, at the level of automated processing, existing expert systems based on predefined rules face the dual challenges of flexibility and completeness. These systems rely on a pre-defined, fully defined rule knowledge base. Manually enumerating all logical relationships and solidifying them into rules is not only a massive undertaking with high maintenance costs, but also virtually impossible to cover all edge cases and complex, multi-faceted tasks.

[0005] Existing technology 1 (CN112182303A) discloses a one-click generation method and process for substation safety measure tickets based on a general rule base for maintenance safety measures. The method includes: firstly, analyzing typical maintenance scenarios, extracting and integrating safety measure requirements, enumerating all safety measure components to form a standardized component set, a general rule base, and a data dictionary, and constructing a typical safety measure ticket library accordingly. Then, the safety measure components in the ticket library are processed using data dictionary symbol wildcarding, and the relationships between cross-bay devices are described, ultimately generating a general XML format operation sequence template file. Finally, by parsing the SCD configuration file of the smart substation, the safety measure components are automatically identified and matched with actual signal points in the monitoring system database, thereby instantiating the general XML template into a specific safety measure ticket that can be directly identified, operated, and monitored by the monitoring system. The technical problems of existing technology 1 include at least the following: the rule base construction and maintenance are complex; the power system knowledge is vast and complex; the workload of sorting out all situations and converting them into fixed rules is enormous; and it lacks flexibility and adaptability, making it difficult to effectively cope with complex and ever-changing composite maintenance inputs. The system's performance is limited when faced with maintenance scenarios that exceed the pre-enumerated range.

[0006] Prior art 2 (CN116628220A) discloses a method and system for generating power work orders based on a relational graph convolutional neural network. The method includes: first, acquiring historical work orders containing information such as work content, hazard factors, and safety measures, and equipment ledgers containing information such as equipment KKS codes and types; then, using this data to construct a knowledge graph with equipment, work orders, etc., as entity nodes, and containing complex relationships between them; next, converting the knowledge graph into a graph structure using sparse vector representation technology, and using it to train a relational graph convolutional neural network model; this model can learn and aggregate information about nodes and their neighbors in the graph; finally, when new equipment work data is input, the model can automatically infer and predict potential hazard factors and corresponding optimal safety measures, and generate a complete and standardized power work order accordingly. The technical problems of prior art 2 include at least the following: the model lacks interpretability, making it difficult to provide clear and easily understandable reasoning paths and justifications; and after graph updates or model replacements, the network needs to be retrained, resulting in high maintenance costs. These issues are important considerations in power invoicing systems that require high reliability and stability. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide an intelligent generation method for safety supervision work tickets based on ReAct intelligent agents. It mainly proposes solutions to the following core problems: 1) Insufficient flexibility and adaptability: The text parsing algorithm based on large models and hybrid retrieval is adopted, which enables the system to understand and decompose complex and varied composite task descriptions (i.e., combinations of multiple tasks, multiple devices and multiple operations), thereby enhancing the system's generalization ability.

[0008] 2) Complex rule base construction and maintenance: By introducing an agent based on a large language model for task category reasoning and security-related device retrieval, the "if-then" rule base that needs to be predefined manually is replaced, which significantly reduces the complexity and workload of construction and maintenance.

[0009] 3) High maintenance costs due to data updates: An external knowledge base composed of corpus, vector library and knowledge graph provides power knowledge such as equipment information and electrical topology, avoiding the cost loss caused by repeated model training.

[0010] To achieve the above objectives, the specific technical solution adopted by the present invention is as follows: Firstly, the present invention provides a method for intelligently generating safety supervision work tickets based on ReAct intelligent agents, as detailed below: S1: Construct a domain knowledge base including an electrical topology knowledge graph, a device vector index library, a safety measure template library, and a precise retrieval corpus; S2: Construct an intelligent agent based on the ReAct architecture and with a large-scale language model as the core inference engine; the intelligent agent can call the large-scale language model to parse the natural language description of the electrical operation task input by the user, identify the independent sub-tasks contained in the task, and parse the target operation equipment text and task operation type for each sub-task; for each parsed target operation equipment text, a hybrid collaborative retrieval is used to search and coarsely rank the data in the equipment vector index library and the precise retrieval corpus, and a re-ranking algorithm is used for fine ranking to achieve precise matching of electrical entities and obtain structured equipment information; S3: The agent performs internal reasoning based on the structured device information and context, generates a decision for the next action, and executes it; the action decision is to call a predefined tool function, which includes a graph relationship query tool and a safety statement generation tool; then the execution result of the tool function is returned to the agent as a new observation; S4: The agent repeats step S3 until it infers and determines that all relevant retrieval paths have been completed, and calls the safety statement generation tool to generate a safety statement set. Finally, the safety statement set is filled into the work ticket template to form a complete ticket output.

[0011] Preferably, in step S1, the electrical topology knowledge graph is stored in the graph database of the domain knowledge base and is constructed based on the electrical wiring diagram of the plant. The equipment nodes represent electrical equipment entities, and the edges represent the physical connection relationships between electrical equipment. The physical connection relationships include at least one of electrical connection relationships and control relationships.

[0012] Preferably, in step S1, the device vector index library is constructed by converting the key attributes of device nodes in the electrical topology knowledge graph into structured text description units and embedding semantic vectors to build an incremental vector index that supports efficient updates; the key attributes include at least one of device name, device number, interval to which it belongs, and voltage level.

[0013] Preferably, in step S1, the safety measure template library is stored in a relational database and includes standardized safety measure statement templates organized by device type and interval dimension; the standardized safety measure statement templates support parameterized filling.

[0014] Preferably, the precise retrieval corpus is stored using a full-text retrieval engine, and the key attributes of electrical equipment nodes in the electrical topology knowledge graph are converted into structured text description units, which serve as index text for the retrieval units.

[0015] Preferably, in step S2, the method for achieving precise matching of electrical entities is as follows: For each target operating device text parsed, the similarity between the target operating device text and all entries in the device vector index is calculated using a vector model to obtain a semantic similarity candidate set; at the same time, a precise matching algorithm based on word frequency statistics is used to perform precise matching on the device name and device number to obtain a precise matching candidate set. The semantically similar candidate set and the precise matching candidate set are weighted and fused to obtain a coarsely ranked entity matching candidate set; then, a re-ranking algorithm is used for fine ranking, and the device entity with the highest ranking and exceeding a preset threshold is selected as the matching result.

[0016] Preferably, in step S3, a multi-model majority voting mechanism is also introduced during the agent's internal reasoning process, as follows: Multiple different large-scale language models can be invoked in parallel or sequentially to perform context-based reasoning and generate independent next action suggestions. The inference results output by all models are integrated and compared, and a joint decision is made based on the preset consensus rules to determine the final action to be taken.

[0017] Secondly, the present invention provides an automatic safety supervision work order generation system, comprising: The domain knowledge base module is used to build a domain knowledge base that includes an electrical topology knowledge graph, a device vector index library, a safety measure template library, and a precise retrieval corpus. The task parsing module initializes an agent based on the ReAct architecture and using a large-scale language model as its core inference engine. This agent can invoke the large-scale language model to parse the natural language description of the electrical work task input by the user, identify the independent subtasks within the task, and parse the target operation equipment text and task operation type for each subtask. For each parsed target operation equipment text, a hybrid collaborative retrieval method is used to search and coarsely rank the data in the equipment vector index and the precise retrieval corpus, followed by fine ranking using a re-ranking algorithm to achieve precise matching of electrical entities and obtain structured equipment information. The reasoning and decision-making engine enables the agent to perform internal reasoning based on the structured device information and context, generate a decision for the next action, and execute it. The action decision involves calling a predefined tool function, which includes a graph relationship query tool and a safety statement generation tool. The execution result of the tool function is then returned to the agent as a new observation. The observation-reasoning-action-observation cycle is repeated until the reasoning determines that all relevant retrieval paths have been completed, and the safety statement generation tool is called to generate a set of safety statements. Finally, the set of safety statements is filled into the work order template to form a complete work order output.

[0018] Specifically, the computer device can be a high-performance server, workstation, or personal computer. The memory includes non-volatile storage media (such as hard disks) and volatile storage media (such as RAM). When the computer program is executed by the processor, it can control the device to complete the entire process of building and maintaining the domain knowledge base, loading and running the ReAct agent, executing hybrid collaborative retrieval, and generating multi-step reasoning and security measures.

[0019] Thirdly, the present invention provides a computer device, including 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, it can implement the intelligent generation method for safety supervision work tickets based on ReAct intelligent agents as described in any of the first aspects.

[0020] Fourthly, the present invention provides a computer-readable storage medium, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the intelligent generation method for safety supervision work permits based on ReAct intelligent agents as described in any of the first aspects. The computer program may be stored in the storage medium in the form of one or more modules.

[0021] Compared with the prior art, the present invention has the following advantages: 1) Enhanced flexibility and generalization: By replacing the traditional input text parsing method with large model reasoning and hybrid retrieval, the system can accurately understand and decompose complex and undefined maintenance tasks, effectively responding to ever-changing application scenarios on site.

[0022] 2) Reduced system maintenance costs: An external knowledge base composed of a corpus, vector library, and knowledge graph provides electrical knowledge such as equipment information and electrical topology, avoiding the cost losses caused by repeated model training. Simultaneously, the agent-based multi-step dynamic retrieval algorithm supports direct system expansion by modifying the Prompt configuration, reducing hard-coded code, lowering code intrusion rate, and reducing the barrier to system maintenance.

[0023] 3) Ensuring the reliability of output results: A multi-model majority voting mechanism is adopted, which integrates the inference results of multiple large models for joint decision-making. This method smooths out the bias or error that may be generated by a single model, improving the overall accuracy and reliability of the system output. Attached Figure Description

[0024] Figure 1 This is a simplified flowchart of a preferred embodiment of the method of the present invention; Figure 2This is a flowchart illustrating a preferred embodiment of the method of the present invention. Detailed Implementation

[0025] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in various embodiments of the present invention can be combined accordingly without mutual conflict.

[0026] like Figure 1 As shown, this invention provides an intelligent generation method for safety supervision work orders based on ReAct agents. The method mainly includes: constructing a domain knowledge base comprising an electrical topology knowledge graph, an equipment vector index library, a precise retrieval corpus, and a safety measure template library; establishing a ReAct agent with a large language model at its core, receiving natural language task descriptions, and matching textual equipment descriptions to electrical equipment entities through hybrid collaborative retrieval; the agent iterating through relevant equipment using a multi-step "observation-reasoning-action" loop by calling a graph query tool and a safety measure generation tool to generate standardized safety measure statements based on templates; and employing a multi-model majority voting mechanism to improve decision reliability. The specific steps of the above method of this invention are as follows: S1, Building a domain knowledge base: The domain knowledge base mainly includes an electrical topology knowledge graph, a device vector index library, a safety measure template library, and a precise retrieval corpus.

[0027] In a preferred embodiment of the present invention, the electrical topology knowledge graph is stored in the graph database of the domain knowledge base and is constructed based on the electrical wiring diagrams of the plant. The device nodes represent electrical equipment entities, and the node fields include equipment attributes such as equipment name, equipment number, and work location. Edges represent the physical connection relationships between electrical equipment. The physical connection relationships include at least one of electrical connection relationships and control relationships.

[0028] In a preferred embodiment of the present invention, the device vector index library converts the key attributes of device nodes in the electrical topology knowledge graph into structured text description units and embeds semantic vectors to construct an incremental vector index that supports efficient updates. The key attributes include at least one of the following: device name, device number, assigned bay, and voltage level.

[0029] In a preferred embodiment of the present invention, the safety measure template library is stored in a relational database and includes standardized safety measure statement templates organized by dimensions such as equipment type, location interval, and voltage level. The standardized safety measure statement templates support parameterized input.

[0030] In a preferred embodiment of the present invention, the precise retrieval corpus is stored using a full-text retrieval engine, and the key attributes of electrical equipment nodes in the electrical topology knowledge graph are converted into structured text description units, which serve as index text for the retrieval units.

[0031] S2, Agent Construction and Task Analysis: A ReAct (Reasoning-Action) architecture-based agent is constructed, with a large-scale language model as its core inference engine. The agent receives a natural language description of an electrical work task input by the user, then uses the large-scale language model to parse the description, identifying independent subtasks within the task. For each subtask, the agent parses the target operating device text and the task operation type. For each parsed target operating device text, a hybrid collaborative retrieval method is used to perform coarse ranking in a device vector index and a precise retrieval corpus, followed by fine ranking using a re-ranking algorithm to achieve precise matching of electrical entities and obtain structured device information.

[0032] The hybrid collaborative retrieval method integrates semantic vector similarity calculation and precise matching algorithms to align text descriptions to unique device entities in the electrical topology graph. The structured task information that has been matched with device entities in the graph serves as the initial context for the agent's subsequent reasoning.

[0033] As a preferred embodiment of the present invention, the method for achieving electrical entity matching is as follows: For each parsed target operating device text, a semantic vector model is used to calculate the similarity between the target operating device text and all entries in the device vector index, resulting in a semantically similar candidate set. Simultaneously, a precise matching algorithm based on word frequency statistics is used to perform precise matching on the device name and device number, obtaining a precise matching candidate set. The semantically similar candidate set and the precise matching candidate set are then weighted and fused to obtain a coarsely ranked entity matching candidate set. Finally, a re-ranking algorithm is used for fine ranking, selecting the device entity with the highest ranking that exceeds a preset threshold as the matching result.

[0034] S3, agent-driven multi-step decision execution: The agent performs internal reasoning based on structured task information and context, generates a decision for the next action, and executes it. The action decision involves calling a predefined utility function, which includes a graph relation query tool and a safety statement generation tool. The execution result of the utility function is then returned to the agent as a new observation.

[0035] Among them, the graph relationship query tool performs a traversal query in the electrical topology knowledge graph based on the input device entity type and returns a list of related device entities; the safety measure statement generation tool queries the safety measure template library based on the input device entity list and its attributes, matches the corresponding template, completes parameterized filling, and generates standardized natural language safety measure statements.

[0036] As a preferred embodiment of the present invention, this step can also introduce a multi-model majority voting mechanism during the internal reasoning process of the agent, as follows: Multiple large-scale language models are invoked in parallel or sequentially to perform context-based reasoning and generate independent next action suggestions. The reasoning results from all models are then integrated and compared, and a joint decision is made based on pre-defined consensus rules (such as majority voting) to determine the final action to be taken.

[0037] S4, Ancuo and whole ticket generation: The agent repeats the "observe-reason-action-observe" loop in step S3 until it infers that all retrieval paths related to the task equipment type have been queried. It then calls the safety statement generation tool to generate a safety statement set and finally fills the safety statement set into the work ticket template to form the complete output ticket.

[0038] The method and effects of the present invention will be specifically illustrated below through examples. Example

[0039] This embodiment provides a method for intelligently generating safety supervision work tickets based on ReAct intelligent agents, as detailed below: Step 1: Build a domain knowledge base.

[0040] This step aims to build a domain knowledge base, which consists of four parts: Electrical topology knowledge graph: Based on the electrical primary wiring diagrams of substations, it automatically extracts equipment entities (such as circuit breakers, disconnect switches, busbars, and transformers) and their connection relationships through diagram recognition and parsing.

[0041] In this embodiment, the equipment type, equipment name, and connection relationship in the drawings are first manually labeled. Then, the entity recognition algorithm is used to infer the attributes such as the bus where the entity is located based on the labeled content. At the same time, the attributes such as the equipment category are inferred based on the large language model. Finally, the recognition results are integrated.

[0042] Each extracted device entity is mapped to a node in a graph database (Neo4j is used in this embodiment). Node attributes include device number, device name, location interval, voltage level, etc. Connections between devices (such as "electrical connection" and "control") are mapped to directed edges.

[0043] Device Vector Index Library: Device node attributes from the electrical topology knowledge graph are exported in batches to form a JSON text set. This set is then traversed, and the key attributes of each node (including its bay location, device name, voltage level, and device number) are concatenated into a structured natural language description text. Subsequently, a pre-trained semantic vector model (bge-base-zh-1.5 in this embodiment) is used to encode this description text, obtaining its high-dimensional semantic vector. All device vectors, their corresponding source texts, and all attributes are stored in a dedicated vector database (Chroma DB in this embodiment), forming the device vector index library. This example chooses to build a Flat index.

[0044] Safety Measures Template Library: This library is stored and managed using a relational database (MySQL in this embodiment). The database table structure includes core fields such as template number, applicable equipment type, voltage level, and template text. The template text is a parameterized string containing placeholders such as {equipment name} and {equipment number}.

[0045] Precise corpus retrieval: Batch export device node attributes from the electrical topology knowledge graph to form a JSON text set. Traverse this set and concatenate the key attributes of each node (including electrical bay, equipment standard name, and equipment number) into a structured natural language description text, which serves as the index text for keyword retrieval (BM25 is used in this embodiment). The natural language description text, along with all attributes of the electrical device nodes, is then stored in a corpus (Elasticsearch is used in this embodiment).

[0046] Step 2: Intelligent agent construction and compound task parsing.

[0047] like Figure 2 As shown, the core of the intelligent generation method for safety supervision work orders lies in an intelligent agent with autonomous reasoning and action capabilities. This agent, based on large-model reasoning and hybrid retrieval, and using tool invocation as its path, transforms vague user natural language requirements into a precise and compliant set of safety measures through a cyclical "observation-reasoning-action" process. The entire process does not rely excessively on pre-written hard-coded information, demonstrating strong generalization capabilities and adaptability to complex tasks.

[0048] Step 21: Complete agent initialization. The system initializes an agent based on the ReAct architecture. This embodiment uses Qwen3-32B as its large language model and employs 4-bit quantization to reduce deployment costs. Multiple callable tools are designed, along with system prompts that include system objectives, descriptions of available tools, and input / output format requirements.

[0049] Step 22: Perform composite task parsing. The user inputs a composite task description such as "Inspection of primary equipment of 500kV horizontal line 5012 and 5013 circuit breakers".

[0050] Step 221: Decompose the description into tasks based on a large language model. The internal reasoning process involves parsing the complex sentence into multiple atomic sub-tasks, for example: Subtask 1: The operation type is "maintenance / inspection", and the target equipment text is "500kV horizontal panel 1-line horizontal panel 1-line 5012 circuit breaker primary equipment".

[0051] Subtask 2: The operation type is "maintenance / inspection", and the target equipment text is "500kV horizontal panel 1-line horizontal panel 1-line 5013 circuit breaker primary equipment".

[0052] The model outputs a structured list, where each element contains a subtask ID, operation type, and target device text description.

[0053] Step 222: Perform precise matching of device entities. For each parsed target device text description, the system performs a hybrid collaborative retrieval to locate the unique corresponding device entity in the knowledge base. This process consists of four steps: Semantic vector matching: The target device text description is encoded into a query vector using the bge-base-zh-1.5 model. Flat traversal retrieval is performed in the device vector index of Chroma DB, and the top-K candidate devices and their similarity scores (score_vector) are returned based on cosine similarity.

[0054] Keyword exact matching: The BM25 algorithm is used to search the corpus. The BM25 algorithm calculates a similarity score (score_bm25) based on word frequency, inverse document frequency, etc., and returns another candidate list.

[0055] Weighted fusion: The two candidate lists are merged. The final score of a candidate entity is calculated based on the following formula: score_final = α * score_vector + β * score_bm25 (α + β = 1, in this embodiment, α = 0.7 and β = 0.3 are optimized). For entities that appear only in a single list, the similarity score of the other retrieval method is defaulted to 0. Finally, all candidate entities are sorted in descending order of score_final, and entities with scores exceeding a preset threshold are added to a new candidate set.

[0056] Re-ranking: Based on the cross encoder (bge-reranker in this embodiment), the weighted fusion result is finely ranked, the device entity ranked first is selected as the exact matching result, and all device attributes of the entity are obtained.

[0057] Step 3: Agent-driven multi-step reasoning and security measure generation.

[0058] Step 31: The agent takes the structured task list as its initial observation, performs reasoning through three independent large language models, selects tools, and generates input parameters based on prompt words.

[0059] This embodiment deploys three models simultaneously: Qwen3-32B (4-bit), DeepSeek-R1-32B (4-bit), and Gemma2-27B (4-bit).

[0060] Step 32: Each model independently outputs its inference conclusion (including tool name and input parameters). This embodiment uses a majority voting principle, selecting the conclusion supported by more than half of the models as the final decision. In case of a tie, the base model (Qwen3) is given one vote.

[0061] Step 33: Use the corresponding graph relationship query tool to complete the electrical topology search.

[0062] The graph relationship query tool takes the following parameters as input: device entity number, query relationship type, device type, etc. It initiates a Cypher query to the Neo4j graph database. Query types include: find_directly_connected: Find all devices that have a direct electrical connection to this device.

[0063] find_power_source: Locates the control power supply or power source circuit for this device.

[0064] find_upstream_breaker: Locates the upstream circuit breaker that supplies power to this device.

[0065] After the tool is executed, it integrates a list of device entities, where each entity includes fields such as device name, device number, and interval, and returns it to the agent as a new observation.

[0066] Step 34: After receiving the query result, the agent returns to step 32 and repeats the execution process based on "observation-reasoning-action" until the agent determines that the device type has completed the graph query based on the prompt words and rules.

[0067] Answer generation and aggregation: Once the set of associated devices is determined, the agent's reasoning action transitions to invoking the answer statement generation tool. This tool receives a list of device entities and, for each device in the list: Based on the device type, the interval, etc., the most suitable template is matched in the MySQL security template library.

[0068] Based on the device name, device number and other attributes obtained from step 33, fill the placeholders in the template.

[0069] Generate a standard natural language safety statement.

[0070] The tool summarizes and returns all generated safety measures statements, and finally fills the set of safety measures statements into the work order template to form a complete output.

[0071] This invention can automatically parse complex and composite tasks, accurately match device entities, and dynamically generate compliant safety measures, effectively improving system flexibility, maintainability, and output reliability, while reducing reliance on predefined rule bases and repeated training.

[0072] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. A method for intelligently generating safety supervision work permits based on ReAct intelligent agents, characterized in that, Specifically as follows: S1: Construct a domain knowledge base including an electrical topology knowledge graph, a device vector index library, a safety measure template library, and a precise retrieval corpus; S2: Construct an intelligent agent based on the ReAct architecture and with a large-scale language model as the core inference engine; the intelligent agent can call the large-scale language model to parse the natural language description of the electrical operation task input by the user, identify the independent sub-tasks contained in the task, and parse the target operation equipment text and task operation type for each sub-task; for each parsed target operation equipment text, perform retrieval and coarse ranking in the equipment vector index library and the precise retrieval corpus through hybrid collaborative retrieval, and perform fine ranking using a re-ranking algorithm to achieve precise matching of electrical entities and obtain structured equipment information; S3: The agent performs internal reasoning based on the structured device information and context, generates a decision for the next action, and executes it; the action decision is to call a predefined tool function, which includes a graph relationship query tool and a safety statement generation tool; then the execution result of the tool function is returned to the agent as a new observation; S4: The agent repeats step S3 until it infers and determines that all relevant retrieval paths have been completed, and calls the safety statement generation tool to generate a safety statement set. Finally, the safety statement set is filled into the work ticket template to form a complete ticket output.

2. The intelligent generation method for safety supervision work tickets based on ReAct intelligent agents according to claim 1, characterized in that, In S1, the electrical topology knowledge graph is stored in the graph database of the domain knowledge base. It is constructed based on the electrical wiring diagram of the plant. The equipment nodes represent electrical equipment entities, and the edges represent the physical connection relationships between electrical equipment. The physical connection relationships include at least one of electrical connection relationships and control relationships.

3. The intelligent generation method for safety supervision work tickets based on ReAct intelligent agents according to claim 1, characterized in that, In step S1, the device vector index library converts the key attributes of device nodes in the electrical topology knowledge graph into structured text description units and embeds semantic vectors to construct an incremental vector index that supports efficient updates; the key attributes include at least one of device name, device number, location interval, and voltage level.

4. The intelligent generation method for safety supervision work tickets based on ReAct intelligent agents according to claim 1, characterized in that, In S1, the safety measure template library is stored in a relational database and contains standardized safety measure statement templates organized by device type and interval dimension; the standardized safety measure statement templates support parameterized filling.

5. The intelligent generation method for safety supervision work tickets based on ReAct intelligent agents according to claim 1, characterized in that, The precise retrieval corpus is stored using a full-text retrieval engine, and the key attributes of electrical equipment nodes in the electrical topology knowledge graph are converted into structured text description units, which serve as index text for the retrieval units.

6. The intelligent generation method for safety supervision work tickets based on ReAct intelligent agents according to claim 1, characterized in that, In step S2, the method for achieving precise matching of electrical entities is as follows: For each target operating device text parsed, the similarity between the target operating device text and all entries in the device vector index is calculated using a semantic vector model to obtain a semantic similarity candidate set; at the same time, a precise matching algorithm based on word frequency statistics is used to perform precise matching on the device name and device number to obtain a precise matching candidate set. The semantically similar candidate set and the precise matching candidate set are weighted and fused to obtain a coarsely ranked entity matching candidate set; then, a re-ranking algorithm is used for fine ranking, and the device entity with the highest ranking and exceeding a preset threshold is selected as the matching result.

7. The intelligent generation method for safety supervision work tickets based on ReAct intelligent agents according to claim 1, characterized in that, In S3, a multi-model majority voting mechanism is introduced during the agent's internal reasoning process, as follows: Multiple different large-scale language models can be invoked in parallel or sequentially to perform context-based reasoning and generate independent next action suggestions. The inference results output by all models are integrated and compared, and a joint decision is made based on the preset consensus rules to determine the final action to be taken.

8. An automatic safety supervision work order generation system, characterized in that, include: The domain knowledge base module is used to build a domain knowledge base that includes an electrical topology knowledge graph, a device vector index library, a safety measure template library, and a precise retrieval corpus. The task parsing module is used to construct an intelligent agent based on the ReAct architecture and with a large-scale language model as the core inference engine. The intelligent agent can call the large-scale language model to parse the natural language description of the electrical operation task input by the user, identify the independent sub-tasks contained in the task, and parse the target operation equipment text and task operation type for each sub-task. For each of the parsed target operation equipment texts, a hybrid collaborative retrieval is used to search and coarsely rank the data in the equipment vector index library and the precise retrieval corpus, and a re-ranking algorithm is used for fine ranking to achieve precise matching of electrical entities and obtain structured equipment information. The reasoning and decision engine enables the agent to perform internal reasoning based on the structured device information and context, generate a decision on the next action, and execute it. The action decision involves calling a predefined tool function, which includes a graph relationship query tool and an apprehension statement generation tool. The execution result of the tool function is then returned to the agent as a new observation. The observation-reasoning-action-observation cycle is repeated until the reasoning determines that all relevant retrieval paths have been completed. The apprehension statement generation tool is then called to generate an apprehension statement set. Finally, the apprehension statement set is filled into the work ticket template to form a complete output ticket.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it can implement the intelligent generation method for safety supervision work tickets based on ReAct intelligent agents as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the intelligent generation method for safety supervision work tickets based on ReAct intelligent agents as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Transformer substation safety measure ticket one-key generation method based on overhaul safety measure general rule base

    CN112182303A

  • Power work ticket generation method and system based on relational graph convolutional neural network

    CN116628220A

  • Generation method and system of power monitoring work ticket

    CN118917656A

  • Machine learning operation and maintenance method based on large language model

    CN119003719A

  • Intelligent agent method for complex question and answer reasoning of figure knowledge graph based on large model

    CN119513330A