Semantic analysis and generation method and system of operation order, medium and equipment
Through the collaborative analysis and reasoning of generative models and knowledge graphs, operation tickets are generated and verified, which solves the problems of insufficient logical reasoning and semantic understanding in existing technologies and realizes the efficient and safe generation of operation tickets in a dynamic power grid environment.
Patent Information
- Application Number
- CN202510777419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-05
AI Technical Summary
When generating operation tickets, existing technologies lack logical reasoning and semantic understanding capabilities and are unable to effectively process unstructured natural language input, resulting in logical conflicts or procedural violations in complex scenarios, low efficiency, and safety risks.
A generative model is used to perform semantic analysis on the task text, combined with knowledge graphs for logical reasoning, to generate operation sequences, and then verified through formatting rules and operation rule sets to ensure the compliance and security of the operation tickets.
It improves the semantic understanding accuracy and generation efficiency of operation tickets, enhances the compliance and security of operation sequences, reduces the need for manual intervention, and solves the flexibility and intelligence bottlenecks of traditional methods in complex scenarios.
Smart Images

Figure CN120597890A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power system automation and relates to a semantic parsing and generation method, system, medium and equipment for an operation ticket. Background Art
[0002] The grid operation ticket is a core tool for power system dispatching and operation and maintenance. It is used to guide operators to complete equipment operations (such as switching, maintenance, and power outages) according to regulations. Its generation must strictly follow grid safety regulations and adapt to complex and changing operating scenarios.
[0003] Traditional methods primarily generate operation tickets based on manually preset templates or expert system rule bases. While these methods can handle common scenarios, they suffer from two major limitations: First, templates and rules lack the ability to deeply parse natural language task descriptions, effectively extracting dynamic user input requirements (such as fuzzy descriptions and complex logic); second, logical reasoning relies on static rule bases, making it difficult to dynamically optimize by combining real-time device status with grid topology. This results in generated operation tickets being prone to logical conflicts or procedural violations in complex scenarios, requiring repeated manual verification and correction, which is inefficient and poses safety risks. With the development of smart grids and the surge in complex scenarios such as large-scale integration of distributed energy resources and coordinated scheduling of multiple voltage levels, the shortcomings of traditional methods in dynamic semantic understanding and logical reasoning have become increasingly prominent. Summary of the Invention
[0004] The present application provides a method, system, medium and device for semantic parsing and generating operation tickets, which can solve the problem of insufficient logical reasoning and semantic understanding capabilities when generating operation tickets in dynamic scenarios in the existing technology.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for semantic parsing and generating an operation ticket, comprising:
[0006] Obtaining a task text for power grid operation, and performing semantic parsing on the task text according to a preset generative model to obtain a parsing result;
[0007] According to a preset knowledge graph, logical reasoning is performed on the parsing results to obtain a corresponding operation sequence; wherein the knowledge graph includes nodes and edges between nodes, each node includes each power grid device and its operating status, operation status and operation rules, and each edge includes the operation relationship and procedure dependency constraints between nodes;
[0008] Processing the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket;
[0009] Based on a preset set of operation rules, a logical check is performed on the first operation ticket to obtain a final operation ticket.
[0010] Compared with the existing technology, the embodiments of the present application have the following beneficial effects: obtaining the power grid operation task text and using a generative model for semantic analysis, which solves the problem that the traditional template method cannot handle unstructured natural language input, and improves the semantic understanding accuracy of the task description; logical reasoning is performed on the analysis results through the knowledge graph, overcoming the defect that the static rule base cannot dynamically adapt to the changes in power grid topology and equipment status updates, and enhancing the compliance and security of the operation sequence; processing the operation sequence according to the formatting rules to generate an operation ticket, and realizing the standardization and executability of the output content; performing logical verification based on the operation rule set, and ensuring that the final operation ticket meets the real-time power grid operation constraints through conflict detection and dynamic optimization, thereby reducing the need for manual intervention. In this solution, the collaboration of generative model parsing and knowledge graph reasoning not only achieves accurate mapping of natural language to structured tasks, but also solves the problem of rigid logical reasoning of traditional methods in complex scenarios (such as multi-device collaboration and emergency tasks) through dynamic embedding of equipment status perception and procedural constraints; combining formatted generation and rule-driven verification to form a closed loop from semantic understanding to safe output, systematically improving the generation efficiency and accuracy of operation tickets in a dynamic power grid environment, and breaking through the flexibility and intelligence bottlenecks caused by the reliance on fixed templates or static rules in existing technologies.
[0011] In some embodiments of the first aspect of the present application, performing semantic parsing on the task text according to a preset generative model to obtain a parsing result includes:
[0012] Performing semantic parsing on the task text according to the generative model to obtain an original parsing result;
[0013] The original parsing result is optimized according to the attributes of each node and edge in the knowledge graph to obtain the parsing result.
[0014] Compared with the existing technology, the above embodiment has the following beneficial effects: after extracting the original parsing results through the generative model, the node attributes (device type, status) and edge attributes (operation dependencies) in the knowledge graph are further combined to optimize the parsing results, eliminate ambiguity in natural language input (such as fuzzy device names), ensure the precise match between task objectives and actual power grid equipment and rules, and improve the domain adaptability of semantic parsing.
[0015] In some embodiments of the first aspect of the present application, performing logical reasoning on the parsing result according to a preset knowledge graph to obtain a corresponding operation sequence includes:
[0016] Performing logical reasoning on the parsing result according to the knowledge graph to obtain a corresponding first operation sequence;
[0017] Based on the operation rule set, conflict detection and adjustment are performed on the first operation sequence, and the operation sequence is output.
[0018] Compared with the existing technology, the above embodiment has the following beneficial effects: generating a preliminary operation sequence based on the knowledge graph, avoiding safety hazards caused by ignoring the equipment status due to static rule reasoning, enhancing the dynamic adaptability of the operation sequence, and further detecting conflicts (such as step order violations, equipment status conflicts) and adjusting the sequence through the operation rule set to ensure that the operation sequence complies with the power grid safety regulations and improve the compliance and generation reliability of the operation ticket.
[0019] In some embodiments of the first aspect of the present application, performing logical reasoning on the parsing result according to the knowledge graph to obtain a corresponding first operation sequence includes:
[0020] Generate a plurality of first operation paths according to the knowledge graph and the parsing result;
[0021] Scoring each of the first operation paths according to a preset path cost function, and selecting the first operation path corresponding to the lowest path cost as the first operation sequence; wherein the path cost function is expressed as follows:
[0022] Among them, C(P) represents the path cost, w i represents the importance weight of the i-th operation in the first operation path, r(v i ,v i+1 ) represents the node v from the knowledge graph i to v i+1 The risk assessment value required for the operation, s(v i ) represents the current grid equipment v i The impact factor of the running status on the executability, λ represents the weight adjustment coefficient, and n(i) represents the number of operation steps.
[0023] Compared with the existing technology, the above embodiment has the following beneficial effects: by comprehensively calculating the path cost, the operation sequence with the lowest risk and the best execution efficiency is screened, solving the problem of suboptimal path selection caused by traditional methods that only rely on empirical rules.
[0024] In some embodiments of the first aspect of the present application, processing the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket includes:
[0025] Formatting the operation sequence according to the formatting rules to generate an original operation ticket;
[0026] According to the operating status of each power grid device in the knowledge graph and the context task information in the original operation ticket, the task steps of the original operation ticket are adjusted to obtain the first operation ticket.
[0027] Compared with the existing technology, the above embodiment has the following beneficial effects: after generating a preliminary operation ticket according to the formatting rules, it further combines the real-time status of the equipment in the knowledge graph (such as under maintenance, standby) and the contextual task information (such as emergency task tags) to dynamically adjust the order or content of the operation steps to avoid execution failure due to changes in equipment status, and improve the actual executability of the operation ticket in a dynamic power grid environment.
[0028] In some embodiments of the first aspect of the present application, performing a logic check on the first operation ticket based on a preset operation rule set to obtain a final operation ticket includes:
[0029] Based on the operation rule set, a logic check is performed on the first operation ticket to screen out a number of conflicting steps;
[0030] According to a preset conflict scoring function, each conflicting step is subjected to a conflict score, and according to a preset adjustment strategy corresponding to each conflict score, each conflicting step is adjusted to obtain a final operation ticket; wherein the conflict scoring function is expressed as follows:
[0031] Score(o i ′)=α·D r (o i ′)+β·I c (o i ′)+γ·R s (o i ′); where o i ′ represents the i-th conflicting operation step; D r (o i ′) indicates conflicting step o i ′The degree of deviation from the corresponding operating rules; I c (o i ′) indicates conflicting step o i ′ is critical in the overall task path, R s (o i ′) indicates conflicting step o i ′ is the likelihood score that can be replaced or adjusted, and α, β and γ are adjustment coefficients.
[0032] Compared with the existing technology, the above embodiment has the following beneficial effects: by quantifying the severity of the conflict through multiple factors and adjusting it in combination with the corresponding modification strategy (such as replacement steps, insertion verification, etc.), a closed-loop optimization from conflict detection to intelligent repair is achieved, replacing the inefficient mode of traditional manual troubleshooting.
[0033] In some embodiments of the first aspect of the present application, the operation rule set is obtained by matching the task text with a preset rule set, including:
[0034] Extracting a context tag set based on the task text; wherein the context tag set includes: a task area tag, a voltage level tag, an operation type tag, a timeliness tag, and a key equipment identification tag;
[0035] According to the context tag set, mapping matching is performed in the entire rule set to obtain the operation rule set.
[0036] Compared with the existing technology, the above embodiment has the following beneficial effects: context labels (region, voltage level, operation type, etc.) are extracted according to the task text, and a dynamic operation rule set is obtained by mapping and matching in the entire rule set, thereby solving the problem of poor adaptability of cross-region and cross-voltage level tasks caused by the integration of the rule base in the traditional method, and enhancing the compatibility of operation ticket generation for different power grid scenarios.
[0037] In a second aspect, the present invention further provides a semantic parsing and generation system for an operation ticket, comprising: a parsing module, a logic reasoning module, an operation ticket generation module, and a logic verification module;
[0038] The parsing module is used to obtain the task text of the power grid operation and perform semantic parsing on the task text according to a preset generative model to obtain a parsing result;
[0039] The logical reasoning module is configured to perform logical reasoning on the parsing results based on a preset knowledge graph to obtain a corresponding operation sequence; wherein the knowledge graph includes nodes and edges between nodes, each node includes each power grid device and its operating status, operating status, and operating rules, and each edge includes the operating relationship and procedure dependency constraints between nodes;
[0040] The operation ticket generation module is used to process the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket;
[0041] The logic verification module is used to perform logic verification on the first operation ticket based on a preset operation rule set to obtain a final operation ticket.
[0042] Compared with the existing technology, the above embodiments of the present application have the following beneficial effects: obtaining the power grid operation task text and using a generative model for semantic analysis, which solves the problem that the traditional template method cannot handle unstructured natural language input, and improves the semantic understanding accuracy of the task description; logical reasoning is performed on the analysis results through the knowledge graph, overcoming the defect that the static rule base cannot dynamically adapt to the changes in power grid topology and equipment status updates, and enhancing the compliance and security of the operation sequence; processing the operation sequence according to the formatting rules to generate an operation ticket, and realizing the standardization and executability of the output content; performing logical verification based on the operation rule set, and ensuring that the final operation ticket meets the real-time power grid operation constraints through conflict detection and dynamic optimization, thereby reducing the need for manual intervention. In this solution, the collaboration of generative model parsing and knowledge graph reasoning not only achieves accurate mapping of natural language to structured tasks, but also solves the problem of rigid logical reasoning of traditional methods in complex scenarios (such as multi-device collaboration and emergency tasks) through dynamic embedding of equipment status perception and procedural constraints; combining formatted generation and rule-driven verification to form a closed loop from semantic understanding to safe output, systematically improving the generation efficiency and accuracy of operation tickets in a dynamic power grid environment, and breaking through the flexibility and intelligence bottlenecks caused by the reliance on fixed templates or static rules in existing technologies.
[0043] In a third aspect, the present invention also provides a semantic parsing and generation device for an operation ticket, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the computer program is loaded into the processor, it implements the steps of any one of the semantic parsing and generation methods for an operation ticket of the present invention.
[0044] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the semantic parsing and generation method of any operation ticket of the present invention are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 : A flow chart of a method for semantic parsing and generating an operation ticket provided in some embodiments of the present invention.
[0046] Figure 2 : A structural diagram of a semantic parsing and generation system for an operation ticket provided in some embodiments of the present invention.
[0047] Figure 3 : A structural diagram of a semantic parsing and generation device for an operation ticket provided in some embodiments of the present invention. DETAILED DESCRIPTION
[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0049] Example 1:
[0050] Please refer to Figure 1 To address the problem of insufficient logical reasoning and semantic understanding capabilities in the prior art when generating operation tickets in dynamic scenarios, an embodiment of the present invention provides a semantic parsing and generation method for operation tickets, including steps S1 to S4:
[0051] Step S1: Obtain a task text of a power grid operation, and perform semantic parsing on the task text according to a preset generative model to obtain a parsing result.
[0052] Furthermore, step S1 can be implemented by the following preferred implementation, including steps S11-S12, as follows:
[0053] S11: performing semantic parsing on the task text according to the generative model to obtain an original parsing result;
[0054] S12: Optimize the original parsing result according to the attributes of each node and edge in the knowledge graph to obtain the parsing result.
[0055] In this preferred embodiment, after extracting the original parsing results through the generative model, the node attributes (device type, status) and edge attributes (operation dependencies) in the knowledge graph are further combined to optimize the parsing results, eliminate ambiguity in natural language input (such as fuzzy device names), ensure the precise match between the task objectives and the actual equipment and rules of the power grid, and improve the domain adaptability of semantic parsing.
[0056] In a specific implementation, for example, the process of semantic parsing can be expressed as the following formula: T = f GPT (N, C); where T represents the generated structured task (i.e., the original parsing result), N is the task text input by the user, and C is the context information related to the task, including the power grid equipment status and operation rules. GPT () indicates that the generative model generates a corresponding structured task expression (i.e., the original parsing result) based on the task text entered by the user and its contextual information. For example, for the input "Generate an operation ticket for power outage maintenance of 110kV substation line A", the parsing process will generate: task type "power outage operation", target equipment "110kV line A", and operating condition "power outage status".
[0057] In order to improve the accuracy of semantic parsing, this method also enhances the parsing results by combining the power grid knowledge graph. The knowledge graph is based on the equipment type, operating status and typical operation rules of the power grid equipment. By constraining and optimizing the parsing results, it ensures that the parsed tasks meet the requirements of power grid professional knowledge. The process of knowledge enhancement parsing optimization (i.e., step S12) can be expressed as: enhanced =f Graph (T,G); where T enhanced is the structured task after knowledge graph optimization (i.e. parsing result), and G represents the knowledge graph. Graph () represents the process of optimizing the original parsing results using the knowledge graph. For example, when the device names involved in a task are vague or ambiguous, the knowledge graph can correct them by retrieving device attributes or topological relationships.
[0058] Furthermore, after parsing is complete, the results must be standardized. This involves mapping the parsed device names and task types to a unified terminology, detecting ambiguous terms, and clarifying task objectives through contextual information. For example, "110kV Line A" would be standardized to a unified device number to ensure unambiguous processing during subsequent task reasoning and operation ticket generation.
[0059] Step S2: Based on the preset knowledge graph, logical reasoning is performed on the analysis results to obtain the corresponding operation sequence; wherein, the knowledge graph includes each node and the edges between nodes, each node contains each power grid device and its operating status, operating status and operating rules, and each edge contains the operating relationship and procedure dependency constraints between nodes.
[0060] Furthermore, step S2 can be implemented by the following preferred implementation, including steps S21-S22, as follows:
[0061] S21: Performing logical reasoning on the parsing result according to the knowledge graph to obtain a corresponding first operation sequence;
[0062] S22: Based on the operation rule set, perform conflict detection and adjustment on the first operation sequence, and output the operation sequence.
[0063] In this preferred embodiment, a preliminary operation sequence is generated based on the knowledge graph to avoid safety hazards caused by static rule reasoning ignoring the equipment status, enhance the dynamic adaptability of the operation sequence, and further perform conflict detection (such as step order violations, equipment status conflicts) and adjustments on the sequence through the operation rule set to ensure that the operation sequence complies with the power grid safety regulations and improve the compliance and generation reliability of the operation ticket.
[0064] In specific implementation, the knowledge graph can be expressed as G = (V, E), where V is a node set, including each power grid device and its operating status, operation status and operation rules; E is an edge set between nodes, including the operation relationship and regulation dependency constraints between nodes. The core goal of logical reasoning of tasks is to use the knowledge graph to derive a sequence of operation tasks that comply with power grid safety regulations from the tasks generated by semantic parsing. The reasoning process can be described by the following formula: S = GraphTraversal(G,T enhanced ); where S represents the generated operation step sequence (i.e., the first operation sequence), T enhanced This is the result of semantic parsing. GraphTraversal() traverses the knowledge graph, combining task type and contextual information to generate logically correct and safe operational steps. For example, for a power outage task, the inference process will generate steps such as disconnecting the circuit breaker, opening the disconnector, and closing the grounding switch. These steps are generated strictly in accordance with grid regulations and the topological relationships of the equipment.
[0065] Furthermore, during logical reasoning, in order to ensure the security and correctness of the generated operation task sequence, this solution also introduces a conflict detection mechanism to verify each step in the first operation sequence. The mathematical expression of conflict detection is: Where C(S) represents the conflict value of the first operation sequence, s i represents the i-th operation step in the first operation sequence, R is the operation rule set, I is the indicator function, when s i When the operation rule set R is not met, the indicator function value is 1, otherwise it is 0. Through this verification process, it is possible to find out whether there are steps in the sequence that do not meet the grid regulations, and further optimize them by adjusting the algorithm. The optimized operation sequence can be expressed as: S opt =f optimize (S,G); where S opt is the optimized task sequence (i.e., the operation sequence in step S22), and G is the knowledge graph, which contains alternative operation paths. The optimization process ensures the integrity and compliance of the task sequence by adjusting the step order or replacing the operation content in real time. For example, when a device is in a special operating state (such as a temporary outage), the operation steps can be regenerated based on the alternative path provided by the knowledge graph.
[0066] To further improve the comprehensive optimization effect of task operation sequences between procedural constraints, device status, and execution efficiency, this invention also introduces a path scoring mechanism based on the device topology graph and a graph search optimization algorithm to screen out operation sequences with higher execution efficiency and lower risk for each task. The specific method is as follows:
[0067] Furthermore, step S21 can be implemented by the following preferred implementation, including steps S211-S212, as follows:
[0068] S211: Generate a plurality of first operation paths according to the knowledge graph and the parsing result;
[0069] S212: Score each of the first operation paths according to a preset path cost function, and select the first operation path corresponding to the lowest path cost as the first operation sequence; wherein the path cost function is expressed as follows:
[0070] Among them, C(P) represents the path cost, w i represents the importance weight of the i-th operation in the first operation path, r(v i ,v i+1 ) represents the node v from the knowledge graph i to v i+1 The risk assessment value required for the operation, s(v i ) represents the current grid equipment v i The impact factor of the running status on the executability, λ represents the weight adjustment coefficient, and n(i) represents the number of operation steps.
[0071] In practice, after generating a set of candidate operation paths (i.e., each first operation path), all first operation paths are scored based on their C(P) values, with the lowest-cost path being prioritized for subsequent operation ticket generation. If a conditional path contains high-cost nodes, a graph cut algorithm can be introduced to optimize the path structure, removing high-risk edges or nodes, and then reconstructing equivalent paths to reduce overall risk.
[0072] In this preferred embodiment, the path costs are comprehensively calculated to screen the operation sequence with the lowest risk and the best execution efficiency, thereby solving the problem of suboptimal path selection caused by traditional methods that rely solely on empirical rules.
[0073] Step S3: Process the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket.
[0074] Furthermore, step S3 can be implemented by the following preferred implementation, including steps S31-S32, as follows:
[0075] S31: Formatting the operation sequence according to the formatting rules to generate an original operation ticket;
[0076] S32: According to the operating status of each power grid device in the knowledge graph and the context task information in the original operation ticket, the task steps of the original operation ticket are adjusted to obtain the first operation ticket.
[0077] In this preferred embodiment, after generating a preliminary operation ticket according to the formatting rules, the real-time status of the equipment (such as under maintenance, standby) and contextual task information (such as emergency task tags) in the knowledge graph are further combined to dynamically adjust the order or content of the operation steps to avoid execution failures caused by changes in equipment status and improve the actual executability of the operation ticket in a dynamic power grid environment.
[0078] In specific implementation, the process of generating the original operation ticket can be described as: O = f format (S opt ); where O represents the original operation ticket generated, S opt is the operation sequence of the task, f format () represents the formatting function used to generate the operation ticket text. For example, for the task sequence of "110kV line power outage maintenance", the generated original operation ticket may contain the following content:
[0079] “Operation Ticket No.: 2024-001;
[0080] Task description: 110kV line A power outage maintenance;
[0081] Operation steps: ① Open the circuit breaker of 110kV line A;
[0082] ② Open the busbar disconnector of 110kV line A;
[0083] ③ Close the grounding switch of 110kV line A.
[0084] In addition, during the generation process, for the same task sequence, descriptions in multiple language styles can be generated according to the context without affecting the operation, thereby enhancing the adaptability of the system.
[0085] Furthermore, after generating the original operation ticket, the generated operation ticket content can be dynamically adjusted based on the specific scenario of the power grid by combining the task context information and the device status constraints in the knowledge graph. For example, when certain devices are in abnormal states (such as equipment under maintenance or standby), the system will automatically adjust the task steps or skip specific operation steps based on these states. The adjusted steps can be expressed as:
[0086] O adjusted =f adjust (O,C′); where O adjusted is the adjusted operation ticket text (i.e., the first operation ticket), and C′ represents the adjustment conditions (such as equipment status or operating constraints). The adjustment conditions come from the knowledge graph or user input. For example, if it is detected that the circuit breaker on 110kV line A is disconnected, the generated operation ticket will omit the relevant steps and dynamically adjust the order of other steps.
[0087] Finally, after the first operation ticket is generated, further formatting and standardization are required to ensure that the final output text complies with industry standards and company-specific procedures. This formatting includes standardizing numbering formats, numbering rules for operation steps, and template adjustments to task descriptions. For example, operation ticket numbers should be dynamically generated based on timestamps or task types to ensure uniqueness. Furthermore, descriptions of operation steps should be concise and clear to avoid ambiguity or ambiguity.
[0088] Step S4: Based on a preset set of operation rules, a logical check is performed on the first operation ticket to obtain a final operation ticket.
[0089] Furthermore, step S4 can be implemented by the following preferred implementation, including steps S41-S42, as follows:
[0090] S41: Based on the operation rule set, a logic check is performed on the first operation ticket to screen out several conflicting steps;
[0091] S42: Calculate a conflict score for each conflicting step according to a preset conflict scoring function, and adjust each conflicting step according to a preset adjustment strategy corresponding to each conflict score to obtain a final operation ticket; wherein the conflict scoring function is expressed as follows:
[0092] Score(o′ i )=α·D r (o′ i )+β·I c (o′ i )+γ·R s (o′ i ), where o′ i represents the i-th conflicting operation step; D r (o′ i ) represents the conflicting step o′ i The degree of deviation from the corresponding operating rules, I c (o′ i ) represents the conflicting step o′ i Criticality in the overall task path, R s (o′ i ) represents the conflicting step o′ i The likelihood score can be replaced or adjusted, and α, β, and γ are adjustment coefficients.
[0093] In this preferred embodiment, by quantifying the severity of conflicts by multiple factors and adjusting them in combination with corresponding modification strategies (such as replacing steps, inserting verification, etc.), closed-loop optimization from conflict detection to intelligent repair is achieved, replacing the inefficient mode of traditional manual troubleshooting.
[0094] In practice, logical verification is a crucial step in ensuring that generated operation tickets comply with grid operating procedures. In this solution, the verification process leverages the set of operational rules in the knowledge graph to gradually check whether the generated operation steps comply with the device status and operational requirements. For example, the circuit breaker must be disconnected before the disconnector, otherwise safety issues will arise. The logical verification process can be expressed as follows:
[0095] Among them, V(O) represents the verification result, o i is the i-th operation step in the first operation ticket, I is the indicator function, when o i The value is 1 if the rule set R is met, otherwise it is 0.
[0096] Furthermore, when a conflict is detected during the verification process, the operation steps can be readjusted through a dynamic optimization algorithm. The adjustment process combines the alternative paths and rule constraints in the knowledge graph to modify the generated operation ticket to eliminate the conflict and meet the requirements of the regulations. The optimized operation ticket generation process can be described as:
[0097] O opt =f optimize (O adjusted ,G); among them, O opt is the operation ticket text after verification and optimization, G is the knowledge graph, and the optimization function f optimize () will prioritize steps that do not comply with the rules and select alternative steps based on the information in the knowledge graph. For example, if the grounding switch of a line is already closed, the optimization algorithm will skip the operation and readjust the subsequent steps.
[0098] Furthermore, in order to further improve the quality control capability of operation tickets, the present invention also introduces a conflict scoring model and a minimum modification suggestion generation mechanism during logic verification to achieve quantitative analysis and closed-loop repair of steps that do not comply with procedures in the operation sequence.
[0099] The conflict scoring model is used to evaluate the degree of deviation between operating steps and procedures. Its mathematical expression is as follows:
[0100] Score(o′ i )=α·D r (o′ i )+β·I c (o′ i )+γ·R s (o′ i ), where o′ i represents the i-th conflicting operation step in the first operation ticket; D r (o′ i ) represents the conflicting step o′ iThe degree of deviation from the corresponding operating rules (such as the number / severity of violations), I c (o′ i ) represents the conflicting step o′ i Criticality in the overall task path (such as the impact of interrupting subsequent processes), R s (o′ i ) represents the conflicting step o′ i The possibility score that can be replaced or adjusted (the higher the score, the stronger the feasibility of repair), α, β and γ are adjustment coefficients (which can be set according to actual needs).
[0101] After calculating the scores of the conflicting steps, based on the scoring results, the minimum modification suggestions are given priority for the high-risk operations, including: replacing the operation steps with functionally equivalent but conflict-avoiding paths; inserting supplementary verification steps before / after (such as state detection, backup path activation); dynamically adjusting the order of conflicting steps to avoid execution risks; when providing modification suggestions, the modification suggestions are generated by the function f suggest (o i ′, G) is completed, and the recommended steps or alternative paths o are output. i ″, means as follows: i ″=f suggest (o i ′,G);
[0102] Finally, the first operation ticket is modified according to the modification suggestion and the modification function Replace() to obtain the final operation ticket O final , expressed as follows: final =Replace.O adjusted ,o′ i ,o″ i / .
[0103] In addition, to address the issue of differences in operating procedures in different regions, voltage levels, and multiple task types, the present invention also introduces a task context tag-driven rule switching mechanism to achieve automatic matching and dynamic replacement of the rule set. The method is as follows:
[0104] Furthermore, in this solution, the operation rule set is obtained by matching the task text with a preset rule set, which can be implemented through the following preferred implementations, as follows:
[0105] Extracting a context tag set based on the task text; wherein the context tag set includes: a task area tag, a voltage level tag, an operation type tag, a timeliness tag, and a key equipment identification tag;
[0106] According to the context tag set, mapping matching is performed in the entire rule set to obtain the operation rule set.
[0107] In the specific implementation, the context label set T = {t1, t2, ..., t k}, each tag t i Indicates the characteristics of a certain dimension of the task, including but not limited to: region (such as East China, China Southern Power Grid, etc.); voltage level (such as 35kV, 110kV, 500kV); operation type (such as switching operation, planned maintenance, emergency treatment, etc.); task timeliness label (such as routine / emergency); key equipment identification (such as busbar, main transformer, distributed access point, etc.);
[0108] Then, the context tag set T is mapped to the rule set index function: R = f rule (T);
[0109] Among them, f rule (·) is a rule mapping function that can automatically select the rule set R from the full set of rules according to the input context label set. all Select the matching rule subset As the operational rule set described in this solution, this mechanism ensures that the rules used in the logic verification phase are adaptable to the region, task, and operation, avoiding the misjudgment or missed detection problems caused by the use of a unified static rule set.
[0110] In addition, as a supplement, in order to adapt to different power grid operation scenarios, for complex task scenarios (such as collaborative operation of multiple devices), verification rules can be dynamically added according to the scenario context. For example, when the operation of multiple circuit breakers is involved, the topological relationship between the devices is additionally detected during verification to ensure that the execution of each step does not cause safety problems; for cross-regional power grid operation tasks, the verification rules are dynamically adjusted according to the operating procedures of different regions to meet regional differentiation requirements. For example, a typical power grid task scenario library can be constructed in the system implementing the method of this application to support large model training, multi-task testing and dynamic scheduling of rules. In this scenario library, the following representative application scenarios are covered:
[0111] ① Multi-voltage level switching scenario: The task spans multiple voltage platforms (such as from 110kV to 10kV), and it is necessary to automatically identify the differences in operating procedures for each voltage segment and switch rules;
[0112] ②Distributed energy access and off-grid operations: Supports grid-connection / off-grid tasks for access nodes such as energy storage equipment, distributed photovoltaics, and wind power, and dynamically determines the status constraints of new equipment;
[0113] ③ Multi-site coordinated switching tasks: If a task spans the main transformer station and the lower-level switch station, the system needs to coordinate the timing consistency and communication logic of the multi-site equipment;
[0114] ④ Emergency maintenance ticket generation task: When equipment suddenly fails and an operation ticket needs to be quickly generated, the system uses fast semantic analysis + scene label recognition mechanism to trigger simplified procedures and rapid generation mode;
[0115] ⑤ Regional heterogeneous tasks: Supports differentiated procedure processing for Southern Grid / State Grid or urban / rural network areas, and automatically matches corresponding verification rules based on "regional labels";
[0116] Each typical scenario is bound to the aforementioned context tag set T, and the corresponding rule base is matched during the task input parsing phase. Through a scenario-driven rule adaptation and verification switching mechanism, this application can support the intelligent generation and verification of multiple types of tasks in complex power grid environments, with good scalability, versatility, and industrial implementation capabilities.
[0117] In this preferred embodiment, context labels (region, voltage level, operation type, etc.) are extracted based on the task text, and mapped and matched in the entire rule set to obtain a dynamic operation rule set. This solves the problem of poor adaptability of cross-region and cross-voltage level tasks caused by the integration of the rule base in traditional methods, and enhances the compatibility of operation ticket generation for different power grid scenarios.
[0118] In summary, compared with the existing technology, the above embodiments of the present application have the following beneficial effects: obtaining the power grid operation task text and using a generative model for semantic analysis, which solves the problem that the traditional template method cannot handle unstructured natural language input, and improves the semantic understanding accuracy of the task description; logical reasoning is performed on the analysis results through the knowledge graph, overcoming the defect that the static rule base cannot dynamically adapt to the changes in power grid topology and equipment status updates, and enhancing the compliance and security of the operation sequence; processing the operation sequence according to the formatting rules to generate an operation ticket, and realizing the standardization and executability of the output content; performing logical verification based on the operation rule set, and ensuring that the final operation ticket meets the real-time power grid operation constraints through conflict detection and dynamic optimization, thereby reducing the need for manual intervention. In this solution, the collaboration of generative model parsing and knowledge graph reasoning not only achieves accurate mapping of natural language to structured tasks, but also solves the problem of rigid logical reasoning of traditional methods in complex scenarios (such as multi-device collaboration and emergency tasks) through dynamic embedding of equipment status perception and procedural constraints; combining formatted generation and rule-driven verification to form a closed loop from semantic understanding to safe output, systematically improving the generation efficiency and accuracy of operation tickets in a dynamic power grid environment, and breaking through the flexibility and intelligence bottlenecks caused by the reliance on fixed templates or static rules in existing technologies.
[0119] Example 2:
[0120] Please refer to Figure 2Based on the same inventive concept, an embodiment of the present invention discloses a semantic parsing and generating system for an operation ticket, comprising: a parsing module M1, a logic reasoning module M2, an operation ticket generating module M3, and a logic verification module M4;
[0121] The parsing module M1 is used to obtain the task text of the power grid operation and perform semantic parsing on the task text according to a preset generative model to obtain a parsing result.
[0122] Furthermore, the analysis module M1 includes: a first analysis unit and a first optimization unit;
[0123] The first parsing unit is configured to perform semantic parsing on the task text according to the generative model to obtain an original parsing result;
[0124] The first optimization unit is used to optimize the original parsing result according to the attributes of each node and edge in the knowledge graph to obtain the parsing result.
[0125] In this preferred embodiment, after extracting the original parsing results through the generative model, the node attributes (device type, status) and edge attributes (operation dependencies) in the knowledge graph are further combined to optimize the parsing results, eliminate ambiguity in natural language input (such as fuzzy device names), ensure the precise match between the task objectives and the actual equipment and rules of the power grid, and improve the domain adaptability of semantic parsing.
[0126] The logical reasoning module M2 is used to perform logical reasoning on the analysis results based on a preset knowledge graph to obtain a corresponding operation sequence; wherein, the knowledge graph includes each node and the edges between nodes, each node contains each power grid device and its operating status, operating status and operating rules, and each edge contains the operating relationship and procedural dependency constraints between nodes.
[0127] Furthermore, the logic reasoning module M2 includes: an operation sequence generating unit and an operation sequence adjusting unit;
[0128] The operation sequence generating unit is configured to perform logical reasoning on the parsing result according to the knowledge graph to obtain a corresponding first operation sequence;
[0129] The operation sequence adjustment unit is configured to perform conflict detection and adjustment on the first operation sequence based on the operation rule set, and output the operation sequence.
[0130] In this preferred embodiment, a preliminary operation sequence is generated based on the knowledge graph to avoid safety hazards caused by static rule reasoning ignoring the equipment status, enhance the dynamic adaptability of the operation sequence, and further perform conflict detection (such as step order violations, equipment status conflicts) and adjustments on the sequence through the operation rule set to ensure that the operation sequence complies with the power grid safety regulations and improve the compliance and generation reliability of the operation ticket.
[0131] Furthermore, the operation sequence generating unit includes: an operation path generating subunit and a screening subunit;
[0132] The operation path generation subunit is configured to generate a plurality of first operation paths based on the knowledge graph and the parsing result;
[0133] The screening subunit is configured to score each of the first operation paths according to a preset path cost function, and screen the first operation path corresponding to the lowest path cost as the first operation sequence; wherein the path cost function is expressed as follows:
[0134] Among them, C(P) represents the path cost, w i represents the importance weight of the i-th operation in the first operation path, r(v i ,v i+1 ) represents the node v from the knowledge graph i to v i+1 The risk assessment value required for the operation, s(v i ) represents the current grid equipment v i The impact factor of the running status on the executability, λ represents the weight adjustment coefficient, and n(i) represents the number of operation steps.
[0135] In this preferred embodiment, the path costs are comprehensively calculated to screen the operation sequence with the lowest risk and the best execution efficiency, thereby solving the problem of suboptimal path selection caused by traditional methods that rely solely on empirical rules.
[0136] The operation ticket generating module M3 is used to process the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket.
[0137] Furthermore, the operation ticket generating module M3 includes: a formatting unit and an operation ticket adjusting unit;
[0138] The formatting unit is configured to format the operation sequence according to the formatting rules to generate an original operation ticket;
[0139] The operation ticket adjustment unit is used to adjust the task steps of the original operation ticket according to the operating status of each power grid device in the knowledge graph and the context task information in the original operation ticket to obtain the first operation ticket.
[0140] In this preferred embodiment, after generating a preliminary operation ticket according to the formatting rules, the real-time status of the equipment (such as under maintenance, standby) and contextual task information (such as emergency task tags) in the knowledge graph are further combined to dynamically adjust the order or content of the operation steps to avoid execution failures caused by changes in equipment status and improve the actual executability of the operation ticket in a dynamic power grid environment.
[0141] The logic verification module M4 is used to perform logic verification on the first operation ticket based on a preset operation rule set to obtain a final operation ticket.
[0142] Furthermore, the logic check module M4 includes: a conflict detection unit and a conflict adjustment unit;
[0143] The conflict detection unit is configured to perform a logic check on the first operation ticket based on the operation rule set to screen out a number of conflicting steps;
[0144] The conflict adjustment unit is configured to perform a conflict score on each of the conflicting steps according to a preset conflict scoring function, and adjust each of the conflicting steps according to a preset adjustment strategy corresponding to each conflict score to obtain a final operation ticket; wherein the conflict scoring function is expressed as follows:
[0145] Score(o′ i )=α·D r (o′ i )+β·I c (o′ i )+γ·R s (o′ i ), where o′ i represents the i-th conflicting operation step; D r (o′ i ) represents the conflicting step o′ i The degree of deviation from the corresponding operating rules; I c (o′ i ) represents the conflicting step o′ i Criticality in the overall task path, R s (o′ i ) represents the conflicting step o′ i The likelihood score can be replaced or adjusted, and α, β, and γ are adjustment coefficients.
[0146] In this preferred embodiment, by quantifying the severity of conflicts by multiple factors and adjusting them in combination with corresponding modification strategies (such as replacing steps, inserting verification, etc.), closed-loop optimization from conflict detection to intelligent repair is achieved, replacing the inefficient mode of traditional manual troubleshooting.
[0147] Furthermore, in this system, a rule set acquisition module M5 may be further included, which is used to obtain the operation rule set according to matching the task text with the preset rule set; wherein, the rule set acquisition module M5 includes: a label extraction unit and a mapping unit;
[0148] The tag extraction unit is configured to extract a context tag set based on the task text; wherein the context tag set includes: a task area tag, a voltage level tag, an operation type tag, a timeliness tag, and a key equipment identification tag;
[0149] The mapping unit is configured to perform mapping matching in the entire rule set according to the context tag set to obtain the operation rule set.
[0150] In this preferred embodiment, context labels (region, voltage level, operation type, etc.) are extracted based on the task text, and mapped and matched in the entire rule set to obtain a dynamic operation rule set. This solves the problem of poor adaptability of cross-region and cross-voltage level tasks caused by the integration of the rule base in traditional methods, and enhances the compatibility of operation ticket generation for different power grid scenarios.
[0151] In summary, compared with the existing technology, the embodiments of the present application have the following beneficial effects: obtaining the power grid operation task text and using a generative model for semantic analysis, which solves the problem that the traditional template method cannot handle unstructured natural language input, and improves the semantic understanding accuracy of the task description; logical reasoning is performed on the analysis results through the knowledge graph, overcoming the defect that the static rule base cannot dynamically adapt to the changes in power grid topology and equipment status updates, and enhancing the compliance and security of the operation sequence; processing the operation sequence according to the formatting rules to generate an operation ticket, and realizing the standardization and executability of the output content; performing logical verification based on the operation rule set, and ensuring that the final operation ticket meets the real-time power grid operation constraints through conflict detection and dynamic optimization, thereby reducing the need for manual intervention. In this solution, the collaboration of generative model parsing and knowledge graph reasoning not only achieves accurate mapping of natural language to structured tasks, but also solves the problem of rigid logical reasoning of traditional methods in complex scenarios (such as multi-device collaboration and emergency tasks) through dynamic embedding of equipment status perception and procedural constraints; combining formatted generation and rule-driven verification to form a closed loop from semantic understanding to safe output, systematically improving the generation efficiency and accuracy of operation tickets in a dynamic power grid environment, and breaking through the flexibility and intelligence bottlenecks caused by the reliance on fixed templates or static rules in existing technologies.
[0152] Example 3:
[0153] Figure 3 The structure diagram of the semantic parsing and generating device of an operation ticket of the present application is presented. Figure 3 As shown, the semantic parsing and generating device of the operation ticket may include: a processor N1, a memory N2, a data interface N3 and a communication bus N4.
[0154] Among them: the processor N1, the memory N2, and the data interface N3 communicate with each other through the communication bus N4; the data interface N3 is used for data communication with other devices such as input devices or output devices; the processor N1 is used to execute the program N5, which can specifically execute the relevant steps in any of the above-mentioned semantic parsing and generation method embodiments of the operation ticket.
[0155] Specifically, the program N5 may include program code, which includes computer-executable instructions.
[0156] Processor N1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the operation ticket semantic parsing and generation device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0157] The memory N2 is used to store the program N5. The memory N2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0158] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, the embodiments of the present application are not directed to any particular programming language.
[0159] Example 4:
[0160] An embodiment of the present invention also provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction runs on the semantic parsing and generation device / system of the operation ticket, the semantic parsing and generation device / system of the operation ticket executes a semantic parsing and generation method of an operation ticket in any of the above-mentioned method embodiments.
[0161] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. Similarly, in order to streamline the application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the application, the various features of the embodiments of the application are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby clearly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the application.
[0162] Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and installed in one or more devices different from the embodiments. The modules, units, or components in the embodiments can be combined into one module, unit, or component, and furthermore, they can be divided into multiple submodules, subunits, or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
Claims
1. A method for semantic parsing and generating an operation ticket, characterized in that: include: Obtaining a task text for power grid operation, and performing semantic parsing on the task text according to a preset generative model to obtain a parsing result; According to a preset knowledge graph, logical reasoning is performed on the parsing results to obtain a corresponding operation sequence; wherein the knowledge graph includes nodes and edges between nodes, each node includes each power grid device and its operating status, operation status and operation rules, and each edge includes the operation relationship and procedure dependency constraints between nodes; Processing the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket; Based on a preset set of operation rules, a logical check is performed on the first operation ticket to obtain a final operation ticket.
2. The method for semantic parsing and generating an operation ticket according to claim 1, characterized in that: The semantic parsing of the task text according to the preset generative model to obtain the parsing result includes: Performing semantic parsing on the task text according to the generative model to obtain an original parsing result; The original parsing result is optimized according to the attributes of each node and edge in the knowledge graph to obtain the parsing result.
3. The method for semantic parsing and generating an operation ticket according to claim 2, characterized in that: The process of performing logical reasoning on the parsing results based on the preset knowledge graph to obtain a corresponding operation sequence includes: Performing logical reasoning on the parsing result according to the knowledge graph to obtain a corresponding first operation sequence; Based on the operation rule set, conflict detection and adjustment are performed on the first operation sequence, and the operation sequence is output.
4. The method for semantic parsing and generating an operation ticket according to claim 3, characterized in that: The step of performing logical reasoning on the parsing result according to the knowledge graph to obtain a corresponding first operation sequence includes: Generate a plurality of first operation paths according to the knowledge graph and the parsing result; Scoring each of the first operation paths according to a preset path cost function, and selecting the first operation path corresponding to the lowest path cost as the first operation sequence; wherein the path cost function is expressed as follows: Among them, C(P) represents the path cost, w i represents the importance weight of the i-th operation in the first operation path, r(v i ,v i+1 ) represents the node v from the knowledge graph i to v i+1 The risk assessment value required for the operation, s(v i ) represents the current power grid equipment v i The impact factor of the running status on the executability, λ represents the weight adjustment coefficient, and n(i) represents the number of operation steps.
5. The method for semantic parsing and generating an operation ticket according to claim 4, characterized in that: The step of processing the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket includes: Formatting the operation sequence according to the formatting rules to generate an original operation ticket; According to the operating status of each power grid device in the knowledge graph and the context task information in the original operation ticket, the task steps of the original operation ticket are adjusted to obtain the first operation ticket.
6. The method for semantic parsing and generating an operation ticket according to claim 5, characterized in that: The step of performing a logic check on the first operation ticket based on a preset operation rule set to obtain a final operation ticket includes: Based on the operation rule set, a logic check is performed on the first operation ticket to screen out a number of conflicting steps; According to a preset conflict scoring function, each conflicting step is subjected to a conflict score, and according to a preset adjustment strategy corresponding to each conflict score, each conflicting step is adjusted to obtain a final operation ticket; wherein the conflict scoring function is expressed as follows: Score(o′ i )=α·D r (o′ i )+β·I c (o′ i )+γ·R s (o′ i ), where o′ i represents the i-th conflicting operation step; D r (o′ i ) represents the conflicting step o′ i The degree of deviation from the corresponding operating rules; I c (o′ i ) represents the conflicting step o′ i Criticality in the overall task path, R s (o′ i ) represents the conflicting step o′ i The likelihood score can be replaced or adjusted, and α, β, and γ are adjustment coefficients.
7. The method for semantic parsing and generating an operation ticket according to any one of claims 1 to 6, characterized in that: The operation rule set is obtained by matching the task text with a preset rule set, including: Extracting a context tag set based on the task text; wherein the context tag set includes: a task area tag, a voltage level tag, an operation type tag, a timeliness tag, and a key equipment identification tag; According to the context tag set, mapping matching is performed in the entire rule set to obtain the operation rule set.
8. A semantic parsing and generation system for operation tickets, characterized in that: include: Parsing module, logical reasoning module, operation ticket generation module and logical verification module; The parsing module is used to obtain the task text of the power grid operation and perform semantic parsing on the task text according to a preset generative model to obtain a parsing result; The logical reasoning module is configured to perform logical reasoning on the parsing results based on a preset knowledge graph to obtain a corresponding operation sequence; wherein the knowledge graph includes nodes and edges between nodes, each node includes each power grid device and its operating status, operating status, and operating rules, and each edge includes the operating relationship and procedure dependency constraints between nodes; The operation ticket generation module is used to process the operation sequence according to a preset formatting rule to obtain a corresponding first operation ticket; The logic verification module is used to perform logic verification on the first operation ticket based on a preset operation rule set to obtain a final operation ticket.
9. A device for semantic parsing and generating an operation ticket, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the steps of the semantic parsing and generation method of an operation ticket according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the semantic parsing and generation method of an operation ticket according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Electrical work ticket intelligent generation method and device, medium and equipment
CN120911429A
Safety measure ticket intelligent semantic error correction method and system based on OCR technology
CN121170803A
Intelligent work ticket checking method based on multi-modal large model knowledge graph and large model reasoning
CN121582956A
Work ticket information synchronization method and system based on semantic recognition
CN121787428A
Intelligent anti-misoperation locking system and method for unattended and remote operation and maintenance plant station based on intelligent passive fusion technology
CN122135466A
