A power system work ticket error prevention method and device

By combining a large language model and rule engine in the power sector, semantic risks and rule violations in work orders are detected and corrected in real time, solving the problems of work order filling errors and logical conflicts in the power system and realizing automated management of power safety.

CN123180141APending Publication Date: 2026-11-27NAT ENERGY TAIAN THERMAL POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610893908.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Errors in filling out work permits in the power system are frequent, logical conflicts are difficult to detect, review relies on expert experience, and historical errors are repeated. Existing technologies cannot effectively handle complex semantic and logical conflicts and the diversity of natural language descriptions.

Method used

We employ a large language model fine-tuned in the power sector for semantic parsing and rule engine verification, which detects semantic risks and rule violations in work order content in real time, generates visual prompts, and automatically corrects errors.

Benefits of technology

This improved the accuracy and efficiency of work order completion, reduced reliance on manual review, ensured strict adherence to power safety regulations, and prevented the recurrence of historical errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180141A_ABST
    Figure CN123180141A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of power grid work ticket verification, and relates to a power system work ticket error prevention method and device; the method comprises: acquiring the work ticket content input by a user in real time; using a large language model in the power field for fine tuning to perform semantic analysis and standardization processing, extract key elements, and determine whether there is a semantic risk, and if so, generate a semantic risk prompt; inputting the key elements into a rule engine of an embedded safety rule library for rule matching, and if a rule is violated, generating a rule violation prompt; if there is a semantic risk or a rule violation, the prompt is pushed to the front-end visual display, otherwise the filling is allowed to continue; supporting one-key adoption of user modification suggestions and automatic correction of fields. The present application realizes real-time semantic error correction and rule hard constraint checking of work ticket filling through collaborative verification of a large language model and a rule engine, reduces the risk of human oversight and logical conflict, reduces the dependence on expert experience, and improves the safety and efficiency of power work ticket filling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power grid work ticket verification technology, specifically relating to a method and device for preventing errors in power system work tickets. Background Technology

[0002] The work permit system is a core management system for ensuring the safety of power systems, involving multiple disciplines such as electrical engineering and thermal engineering. Oversights in filling out or reviewing work permits can lead to serious accidents. Currently, the filling out and review of work permits mainly rely on manual labor, which presents the following problems: frequent errors in filling out permits, such as non-standard equipment numbers, incorrect terminology, and missing information; manual inspection is prone to fatigue; logical conflicts are difficult to detect, such as mismatches between work content and safety measures, conflicts between cross-disciplinary measures, and contradictions with operating methods, which are difficult for manual review to quickly identify; review is highly dependent on expert experience, which can easily lead to misjudgments by new employees, and experience is difficult to pass on; historical errors lack knowledge accumulation, and similar errors recur. Existing keyword matching or fixed template methods are insufficient to handle the diversity of natural language descriptions and cannot handle complex semantic logical conflicts, such as the inability to identify the semantic contradiction between "closing the 601A switch" and "a 'Do Not Close' sign is hung at the 601A switch."

[0003] In view of this, it is very necessary to provide a method and device for preventing errors in power system work tickets in order to solve the above-mentioned defects in the prior art. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of the existing technology, such as frequent errors in filling out forms, difficulty in detecting logical conflicts, reliance on expert experience for review, and recurrence of historical errors, by providing a method and device for preventing errors in power system work orders, thereby solving the aforementioned technical problems.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for preventing errors in power system work orders includes the following steps: Step S1: Obtain the work order content entered by the user in real time; Step S2: Using a finely tuned large language model in the power field, the input work order content is semantically parsed and standardized to extract key elements and determine in real time whether there are semantic risks in the current content. If there are risks, a semantic risk warning is generated directly. Step S3: Input the extracted key elements into the rule engine of the built-in work ticket security rule base, perform rule matching, and determine in real time whether the current content violates the rules. If it violates the rules, generate a rule violation prompt. Step S4: Based on the judgment results of Steps S2 and S3, if there is a risk or violation, the generated semantic risk warning and rule violation warning will be pushed to the front end for visual prompts; if no problem is found, no prompts will be generated, and the user will be allowed to continue filling in the information. Step S5: Display error messages and modification suggestions in real time on the fill-in interface until the user makes no errors. Support users to adopt modification suggestions with one click and automatically correct the corresponding fields.

[0006] Preferably, the large language model for fine-tuning the power field in step S2 specifically includes: Input layer, semantic coding layer, power sector adaptation layer, output layer, risk prediction head; The semantic encoding layer employs a 6-layer Transformer encoder structure; the power domain adaptation layer includes a power terminology attention matrix; the output layer uses a Softmax activation function to output key element classifications; and the risk prediction head includes a linear transformation layer and a Sigmoid activation function, whose input is the feature vector output by the power domain adaptation layer, and whose output is a real-time risk value between 0 and 1. This step can achieve the following technical effects: By designing a large language model structure that includes an input layer, a semantic encoding layer, a power domain adaptation layer, an output layer, and a risk prediction head, the power domain adaptation layer includes a power terminology attention matrix, which enhances the model's semantic understanding of professional terms such as equipment numbers, operating terms, and safety measures. The risk prediction head uses linear transformation and a sigmoid activation function to output real-time risk values, enabling real-time quantitative assessment of the semantic risks of work orders and improving the accuracy and response speed of semantic risk judgment.

[0007] Preferably, step S2 specifically includes: S21, perform word segmentation and word embedding transformation on the work order text to obtain the input sequence and input it into the large language model; S22, the semantic coding layer adopts a multi-layer Transformer encoder to perform self-attention calculation on the input sequence and extract contextual semantic features; through the power domain adaptation layer, the semantic features of the power domain are transformed and the features are enhanced by knowledge guidance to obtain the semantic representation; the output layer outputs key elements such as work order number, work person in charge, work location, work content, and safety measures. S23, the risk prediction head calculates the risk value in real time based on the semantic representation and key elements, and determines whether there is a semantic risk. If the risk value exceeds the preset risk threshold, a semantic risk prompt including the semantic error type and modification suggestions is generated; if the risk value is less than or equal to the preset risk threshold, no prompt is output. This step can achieve the following technical effects: This step enables the automatic extraction of key elements and the quantitative calculation of risk values ​​from the original work order text. Through word segmentation and embedding, Transformer encoding, and power industry-specific adaptation layer transformation, a highly representative semantic representation is obtained. The risk prediction head, combined with key elements, comprehensively calculates missing risk, contradictory risk, ambiguous risk, and model confidence, accurately identifying potential semantic errors and generating specific error types and modification suggestions. This solves the problems of natural language ambiguity and complex logical conflicts that traditional methods cannot handle.

[0008] Preferably, step S3 specifically includes: The rule engine reads basic format rules, semantic logic rules, and operation mode rules from the work order safety rule base. The basic format rules are used to check the numbering format, date format, signature specifications, etc. The semantic logic rules are used to check whether the work content is consistent with safety measures and whether the grounding wire installation point is clearly defined, etc. The operation mode rules are used to check whether the requirements of "maintenance and switching operations are not allowed to be performed simultaneously within the same bay" and "operating equipment and maintenance equipment must be isolated" are met. The extracted key elements are matched and verified against each reading rule. If all rules are matched and verified successfully, no prompt is output. If any one or more rules fail to match and verify, a rule violation prompt is output, including the name of the violating rule, the error description, and modification suggestions.

[0009] This step can achieve the following technical effects: The rule engine reads three types of rules from the safety rule base and matches and verifies the extracted key elements with each rule. This enables it to detect the format standardization, consistency of content and measures, cross-professional compatibility, and compliance of operation methods of work orders. Compared with pure semantic models, the rule engine provides deterministic hard constraint verification, which makes up for the ambiguity or omission that may exist in semantic models and ensures that work orders strictly comply with the hard specifications of power safety.

[0010] Preferably, step S4 specifically includes: If step S2 generates a semantic risk warning, the semantic risk warning is pushed to the front end, and step S3 is not executed temporarily. Step S3 will be executed after the error is corrected and the semantic risk warning is canceled. If step S2 does not generate a semantic risk warning, step S3 is executed. If step S3 generates a rule violation warning, the rule violation warning will be pushed to the front end; if step S3 does not generate any warning, the information is considered to be filled in correctly, no push will be made, and the user can continue filling in the information. All push notifications include the error location, usually represented by a field, for easy highlighting and location by the front end.

[0011] This step can achieve the following technical effects: By setting priority judgment logic for semantic risks and rule violations, invalid rule matching is avoided when there are obvious semantic problems, thus improving response efficiency. At the same time, all push information clearly marks the field to which the error belongs, which is easy for the front end to highlight and locate, enabling users to quickly identify and correct errors, thus improving the friendliness of human-computer interaction and correction efficiency.

[0012] Furthermore, the present invention also provides a power system work order error prevention device, comprising: The real-time acquisition module includes: Real-time acquisition of work order content entered by the user; The semantic validation module contains: Using a finely tuned large language model in the power sector, semantic parsing and standardization are performed on the input work order content to extract key elements and determine in real time whether there are semantic risks in the current content. If there are risks, semantic risk warnings are generated directly. The rule validation module contains: The extracted key elements are input into the rule engine of the built-in work ticket security rule base, and rule matching is performed to determine in real time whether the current content violates the rules. If it violates the rules, a rule violation prompt is generated. The results push module contains: Based on the judgment results of the semantic verification module and the rule verification module, if there is a risk or violation, the generated semantic risk warning and rule violation warning will be pushed to the front end for visual prompts; if no problem is found, no prompts will be generated, and the user will be allowed to continue filling in the information. The intelligent correction module contains: Error prompts and modification suggestions are displayed in real time on the form until the user makes no errors. Users can adopt modification suggestions with one click and the corresponding fields are automatically corrected.

[0013] Preferably, the large language model for fine-tuning in the power field within the semantic verification module specifically includes: Input layer, semantic coding layer, power sector adaptation layer, output layer, risk prediction head; The semantic encoding layer employs a 6-layer Transformer encoder structure; the power domain adaptation layer includes a power terminology attention matrix; the output layer uses a Softmax activation function to output key element classifications; and the risk prediction head includes a linear transformation layer and a Sigmoid activation function, whose input is the feature vector output by the power domain adaptation layer, and whose output is a real-time risk value between 0 and 1. This module can achieve the following technical effects: By designing a large language model structure that includes an input layer, a semantic encoding layer, a power domain adaptation layer, an output layer, and a risk prediction head, the power domain adaptation layer includes a power terminology attention matrix, which enhances the model's semantic understanding of professional terms such as equipment numbers, operating terms, and safety measures. The risk prediction head uses linear transformation and a sigmoid activation function to output real-time risk values, enabling real-time quantitative assessment of the semantic risks of work orders and improving the accuracy and response speed of semantic risk judgment.

[0014] Preferably, the semantic verification module specifically includes: a word embedding processing submodule, a semantic encoding and element extraction submodule, and a risk quantification and judgment submodule; The word embedding processing submodule includes: The work order text is segmented and word-embedded to obtain the input sequence, which is then fed into the large language model. The semantic encoding and feature extraction submodule includes: The semantic coding layer employs a multi-layer Transformer encoder to perform self-attention calculation on the input sequence and extract contextual semantic features. The power domain adaptation layer performs power domain semantic feature transformation and knowledge-guided feature enhancement to obtain a semantic representation. The output layer outputs key elements such as work order number, work supervisor, work location, work content, and safety measures. The risk quantification and assessment submodule includes: The risk prediction head calculates the risk value in real time based on semantic representation and key elements, and determines whether there is semantic risk. If the risk value exceeds the preset risk threshold, a semantic risk prompt is generated, including the semantic error type and modification suggestions; if the risk value is less than or equal to the preset risk threshold, no prompt is output. This module can achieve the following technical effects: This module enables the automatic extraction of key elements and the quantitative calculation of risk values ​​from the original work order text. Through word segmentation and embedding, Transformer encoding, and power industry-specific adaptation layer transformation, it obtains a highly representative semantic representation. The risk prediction head, combined with key elements, comprehensively calculates missing risk, contradictory risk, ambiguous risk, and model confidence, accurately identifying potential semantic errors and generating specific error types and modification suggestions. This solves the problems of natural language ambiguity and complex logical conflicts that traditional methods cannot handle.

[0015] Preferably, the rule verification module specifically includes: The rule engine reads basic format rules, semantic logic rules, and operation mode rules from the work order safety rule base. The basic format rules are used to check the numbering format, date format, signature specifications, etc. The semantic logic rules are used to check whether the work content is consistent with safety measures and whether the grounding wire installation point is clearly defined, etc. The operation mode rules are used to check whether the requirements of "maintenance and switching operations are not allowed to be performed simultaneously within the same bay" and "operating equipment and maintenance equipment must be isolated" are met. The extracted key elements are matched and verified against each reading rule. If all rules are matched and verified successfully, no prompt is output. If any one or more rules fail to match and verify, a rule violation prompt is output, including the name of the violating rule, the error description, and modification suggestions.

[0016] This module can achieve the following technical effects: The rule engine reads three types of rules from the safety rule base and matches and verifies the extracted key elements with each rule. This enables it to detect the format standardization, consistency of content and measures, cross-professional compatibility, and compliance of operation methods of work orders. Compared with pure semantic models, the rule engine provides deterministic hard constraint verification, which makes up for the ambiguity or omission that may exist in semantic models and ensures that work orders strictly comply with the hard specifications of power safety.

[0017] Preferably, the result push module specifically includes: If the semantic validation module generates a semantic risk warning, the warning will be pushed to the front end, and the rule validation module will not be executed temporarily. Once the error is corrected and the semantic risk warning is removed, the rule validation module will be executed. If the semantic validation module does not generate a semantic risk warning, the rule validation module will continue to execute. If the rule validation module generates a rule violation warning, the warning will be pushed to the front end; if the rule validation module does not generate any warning, the information is considered to be filled in correctly, no push will be made, and the user can continue filling in the information. All push notifications include the error location, which is indicated by a field for easy highlighting and location by the front end.

[0018] This module can achieve the following technical effects: By setting priority judgment logic for semantic risks and rule violations, invalid rule matching is avoided when there are obvious semantic problems, thus improving system response efficiency. At the same time, all push information clearly marks the field to which the error belongs, which is easy for the front end to highlight and locate, enabling users to quickly identify and correct errors, thus improving the friendliness of human-computer interaction and correction efficiency.

[0019] The beneficial effects of this invention are as follows: By using a large language model fine-tuned in the power sector to parse user input in real time, the system can automatically detect semantic issues such as non-standard equipment numbers, incorrect terminology, and missing key information, and generate specific modification suggestions to avoid oversights caused by manual input. By combining the rule engine to perform hard constraint verification on the matching of work content and safety measures, the compatibility of cross-professional measures, and the consistency of operation mode, it can identify complex semantic contradictions such as "closing the switch" and "hanging a sign prohibiting closing the switch", and solve logical conflicts that are difficult to detect by manual review. The power safety rules are solidified into a rule base and embedded, and the large language model is also fine-tuned through power corpus, so that the review process no longer relies heavily on personal experience, and new employees can also receive expert-level prompts, which is conducive to experience transfer and standardized operation. By providing real-time error types and modification suggestions, users can automatically correct fields after adopting the suggestions with one click. Historical error patterns can be fed back to the model and rule base for iterative updates, preventing the recurrence of similar errors and forming a closed loop of continuous optimization.

[0020] Therefore, it is evident that the present invention has outstanding substantive features and significant progress compared with the prior art, and the beneficial effects of its implementation are also obvious. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0022] Figure 1 This is a flowchart of a method for preventing errors in work tickets for power systems provided by the present invention.

[0023] Figure 2 This is a schematic diagram of a power system work ticket error prevention device provided by the present invention.

[0024] Among them, 1-real-time acquisition module, 2-semantic verification module, 3-rule verification module, 4-result push module, and 5-intelligent correction module. Detailed Implementation

[0025] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The following embodiments are explanations of the present invention, but the present invention is not limited to the following implementation methods.

[0026] Example 1: like Figure 1 As shown in the figure, this embodiment provides a method for preventing errors in power system work orders, which includes the following steps: Step S1: Obtain the work order content entered by the user in real time; Step S2: Using a finely tuned large language model in the power field, the input work order content is semantically parsed and standardized to extract key elements and determine in real time whether there are semantic risks in the current content. If there are risks, a semantic risk warning is generated directly. The large language model for fine-tuning in the power field in step S2 specifically includes: Input layer, semantic coding layer, power sector adaptation layer, output layer, risk prediction head; The semantic encoding layer employs a 6-layer Transformer encoder structure; the power domain adaptation layer includes a power terminology attention matrix; the output layer uses a Softmax activation function to output key element classifications; and the risk prediction head includes a linear transformation layer and a Sigmoid activation function, whose input is the feature vector output by the power domain adaptation layer, and whose output is a real-time risk value between 0 and 1. The large language model for fine-tuning in the power field provided in this embodiment uses 100,000 labeled historical power work order data, including 60,000 correct work orders and 40,000 incorrect work orders with semantic errors, for fine-tuning training. The training settings include: the optimizer is AdamW, the initial learning rate is 3e-5, the batch size is 16, the number of training rounds is 5, and an early stopping strategy is used to prevent overfitting. This step can achieve the following technical effects: By designing a large language model structure that includes an input layer, a semantic encoding layer, a power domain adaptation layer, an output layer, and a risk prediction head, the power domain adaptation layer includes a power terminology attention matrix, which enhances the model's semantic understanding of professional terms such as equipment numbers, operating terms, and safety measures. The risk prediction head uses linear transformation and a sigmoid activation function to output real-time risk values, enabling real-time quantitative assessment of the semantic risks of work orders and improving the accuracy and response speed of semantic risk judgment.

[0027] Step S2 specifically includes: S21, perform word segmentation and word embedding transformation on the work order text to obtain the input sequence and input it into the large language model; S22, the semantic coding layer adopts a multi-layer Transformer encoder to perform self-attention calculation on the input sequence and extract contextual semantic features; through the power domain adaptation layer, the semantic features of the power domain are transformed and the features are enhanced by knowledge guidance to obtain the semantic representation; the output layer outputs key elements such as work order number, work person in charge, work location, work content, and safety measures. S23, the risk prediction head calculates the risk value in real time based on semantic representation and key elements: , in, To obtain the optimal combination of hyperparameters by pre-setting them, grid search and cross-validation are used: ; Risk of missing key elements To avoid semantic contradiction risk, To avoid semantic ambiguity risks, The confidence level of the model itself; Risk of missing key elements The calculation expression is: , Among them, F is a set of required key elements, including work order number, person in charge of the work, work location, work content, and safety measures; This is the predicted probability of the f-th element in the model output, i.e., the Softmax output value; The semantic contradiction risk The calculation expression is: , in, Let C be the sigmoid function, and C be the set of key phrase position pairs in the work order content. Let be the semantic representation of the i-th position. Let j be the semantic representation of the j-th position. The cosine similarity function is used. For indicator functions: when the phrase pair The value is 1 if the expression belongs to a predefined contradictory pair, and 0 otherwise. The default weight is 1. The semantic ambiguity risk The calculation expression is: , Where n is the length of the input sequence, and T is the ambiguous word list, including vague terms such as "as soon as possible," "nearby," and "appropriate." The attention weight for the ambiguous word t at the i-th position of the model is calculated from the power term attention matrix in the power domain adaptation layer; The model's self-confidence The calculation expression is: , in, The output layer outputs the logits vector of the key element f. Take the maximum probability value. The average of all required key elements is obtained; Determine if there is a semantic risk. If the risk value exceeds a preset risk threshold, generate a semantic risk warning including the semantic error type and modification suggestions; if the risk value is less than or equal to the preset risk threshold, no warning is output. This step can achieve the following technical effects: This step enables the automatic extraction of key elements and the quantitative calculation of risk values ​​from the original work order text. Through word segmentation and embedding, Transformer encoding, and power industry-specific adaptation layer transformation, a highly representative semantic representation is obtained. The risk prediction head, combined with key elements, comprehensively calculates missing risk, contradictory risk, ambiguous risk, and model confidence, accurately identifying potential semantic errors and generating specific error types and modification suggestions. This solves the problems of natural language ambiguity and complex logical conflicts that traditional methods cannot handle.

[0028] Step S3: Input the extracted key elements into the rule engine of the built-in work ticket security rule base, perform rule matching, and determine in real time whether the current content violates the rules. If it violates the rules, generate a rule violation prompt. Step S3 specifically includes: The rule engine reads basic format rules, semantic logic rules, and operation mode rules from the work order safety rule base. The basic format rules are used to check the numbering format, date format, signature specifications, etc. The semantic logic rules are used to check whether the work content is consistent with safety measures and whether the grounding wire installation point is clearly defined, etc. The operation mode rules are used to check whether the requirements of "maintenance and switching operations are not allowed to be performed simultaneously within the same bay" and "operating equipment and maintenance equipment must be isolated" are met. The extracted key elements are matched and verified against each reading rule. If all rules are matched and verified successfully, no prompt is output. If any one or more rules fail to match and verify, a rule violation prompt is output, including the name of the violating rule, the error description, and modification suggestions.

[0029] This step can achieve the following technical effects: The rule engine reads three types of rules from the safety rule base and matches and verifies the extracted key elements with each rule. This enables it to detect the format standardization, consistency of content and measures, cross-professional compatibility, and compliance of operation methods of work orders. Compared with pure semantic models, the rule engine provides deterministic hard constraint verification, which makes up for the ambiguity or omission that may exist in semantic models and ensures that work orders strictly comply with the hard specifications of power safety.

[0030] Step S4: Based on the judgment results of Steps S2 and S3, if there is a risk or violation, the generated semantic risk warning and rule violation warning will be pushed to the front end for visual prompts; if no problem is found, no prompts will be generated, and the user will be allowed to continue filling in the information. Step S4 specifically includes: If step S2 generates a semantic risk warning, the semantic risk warning is pushed to the front end, and step S3 is not executed temporarily; step S3 is executed after the error is corrected and the semantic risk warning is canceled; if step S2 does not generate a semantic risk warning, step S3 is executed. If step S3 generates a rule violation warning, the rule violation warning will be pushed to the front end; if step S3 does not generate any warning, the information is considered to be filled in correctly, no push will be made, and the user can continue filling in the information. All push notifications include the error location, usually represented by a field, for easy highlighting and location by the front end.

[0031] This step can achieve the following technical effects: By setting priority judgment logic for semantic risks and rule violations, invalid rule matching is avoided when there are obvious semantic problems, thus improving response efficiency. At the same time, all push information clearly marks the field to which the error belongs, which is easy for the front end to highlight and locate, enabling users to quickly identify and correct errors, thus improving the friendliness of human-computer interaction and correction efficiency.

[0032] Step S5: Display error messages and modification suggestions in real time on the fill-in interface until the user makes no errors. Support users to adopt modification suggestions with one click and automatically correct the corresponding fields.

[0033] Example 2: like Figure 2 As shown in the figure, this embodiment provides a power system work order error prevention device, comprising: Real-time acquisition module 1, in which: Real-time acquisition of work order content entered by the user; Semantic validation module 2, in which: Using a finely tuned large language model in the power sector, semantic parsing and standardization are performed on the input work order content to extract key elements and determine in real time whether there are semantic risks in the current content. If there are risks, semantic risk warnings are generated directly. The large language model for fine-tuning in the power field in the semantic verification module 2 specifically includes: Input layer, semantic coding layer, power sector adaptation layer, output layer, risk prediction head; The semantic encoding layer employs a 6-layer Transformer encoder structure; the power domain adaptation layer includes a power terminology attention matrix; the output layer uses a Softmax activation function to output key element classifications; and the risk prediction head includes a linear transformation layer and a Sigmoid activation function, whose input is the feature vector output by the power domain adaptation layer, and whose output is a real-time risk value between 0 and 1. This module can achieve the following technical effects: By designing a large language model structure that includes an input layer, a semantic encoding layer, a power domain adaptation layer, an output layer, and a risk prediction head, the power domain adaptation layer includes a power terminology attention matrix, which enhances the model's semantic understanding of professional terms such as equipment numbers, operating terms, and safety measures. The risk prediction head uses linear transformation and a sigmoid activation function to output real-time risk values, enabling real-time quantitative assessment of the semantic risks of work orders and improving the accuracy and response speed of semantic risk judgment.

[0034] The semantic verification module 2 specifically includes: a word embedding processing submodule, a semantic encoding and element extraction submodule, and a risk quantification and judgment submodule; The word embedding processing submodule includes: The work order text is segmented and word-embedded to obtain the input sequence, which is then fed into the large language model. The semantic encoding and feature extraction submodule includes: The semantic coding layer employs a multi-layer Transformer encoder to perform self-attention calculation on the input sequence and extract contextual semantic features. The power domain adaptation layer performs power domain semantic feature transformation and knowledge-guided feature enhancement to obtain a semantic representation. The output layer outputs key elements such as work order number, work supervisor, work location, work content, and safety measures. The risk quantification and assessment submodule includes: The risk prediction head calculates risk values ​​in real time based on semantic representations and key elements: , in, To obtain the optimal combination of hyperparameters by pre-setting them, grid search and cross-validation are used: ; Risk of missing key elements To avoid semantic contradiction risk, To avoid semantic ambiguity risks, The confidence level of the model itself; Risk of missing key elements The calculation expression is: , Among them, F is a set of required key elements, including work order number, person in charge of the work, work location, work content, and safety measures; This is the predicted probability of the f-th element in the model output, i.e., the Softmax output value; The semantic contradiction risk The calculation expression is: , in, Let C be the sigmoid function, and C be the set of key phrase position pairs in the work order content. Let be the semantic representation of the i-th position. Let j be the semantic representation of the j-th position. The cosine similarity function is used. For indicator functions: when the phrase pair The value is 1 if the expression belongs to a predefined contradictory pair, and 0 otherwise. The default weight is 1. The semantic ambiguity risk The calculation expression is: , Where n is the length of the input sequence, and T is the ambiguous word list, including vague terms such as "as soon as possible," "nearby," and "appropriate." The attention weight for the ambiguous word t at the i-th position of the model is calculated from the power term attention matrix in the power domain adaptation layer; The model's self-confidence The calculation expression is: , in, The output layer outputs the logits vector of the key element f. Take the maximum probability value. The average of all required key elements is obtained; Determine if there is a semantic risk. If the risk value exceeds a preset risk threshold, generate a semantic risk warning including the semantic error type and modification suggestions; if the risk value is less than or equal to the preset risk threshold, no warning is output. This module can achieve the following technical effects: This module enables the automatic extraction of key elements and the quantitative calculation of risk values ​​from the original work order text. Through word segmentation and embedding, Transformer encoding, and power industry-specific adaptation layer transformation, it obtains a highly representative semantic representation. The risk prediction head, combined with key elements, comprehensively calculates missing risk, contradictory risk, ambiguous risk, and model confidence, accurately identifying potential semantic errors and generating specific error types and modification suggestions. This solves the problems of natural language ambiguity and complex logical conflicts that traditional methods cannot handle.

[0035] Rule validation module 3, in which: The extracted key elements are input into the rule engine of the built-in work ticket security rule base, and rule matching is performed to determine in real time whether the current content violates the rules. If it violates the rules, a rule violation prompt is generated. The rule verification module 3 specifically includes: The rule engine reads basic format rules, semantic logic rules, and operation mode rules from the work order safety rule base. The basic format rules are used to check the numbering format, date format, signature specifications, etc. The semantic logic rules are used to check whether the work content is consistent with safety measures and whether the grounding wire installation point is clearly defined, etc. The operation mode rules are used to check whether the requirements of "maintenance and switching operations are not allowed to be performed simultaneously within the same bay" and "operating equipment and maintenance equipment must be isolated" are met. The extracted key elements are matched and verified against each reading rule. If all rules are matched and verified successfully, no prompt is output. If any one or more rules fail to match and verify, a rule violation prompt is output, including the name of the violating rule, the error description, and modification suggestions.

[0036] This module can achieve the following technical effects: The rule engine reads three types of rules from the safety rule base and matches and verifies the extracted key elements with each rule. This enables it to detect the format standardization, consistency of content and measures, cross-professional compatibility, and compliance of operation methods of work orders. Compared with pure semantic models, the rule engine provides deterministic hard constraint verification, which makes up for the ambiguity or omission that may exist in semantic models and ensures that work orders strictly comply with the hard specifications of power safety.

[0037] Result push module 4, in which: Based on the judgment results of semantic verification module 2 and rule verification module 3, if there is a risk or violation, the generated semantic risk warning and rule violation warning will be pushed to the front end for visual prompts; if no problem is found, no prompts will be generated, and the user will be allowed to continue filling in the information. The result push module 4 specifically includes: If semantic verification module 2 generates a semantic risk warning, the warning will be pushed to the front end, and the rule verification module 3 will not be executed temporarily. Once the error is corrected and the semantic risk warning is removed, the rule verification module 3 will be executed. If semantic verification module 2 does not generate a semantic risk warning, the rule verification module 3 will continue to be executed. If the rule validation module 3 generates a rule violation notice, the notice will be pushed to the front end; if the rule validation module 3 does not generate any notice, the information is considered to be filled in correctly, no push will be made, and the user can continue filling in the information. All push notifications include the error location, which is indicated by a field for easy highlighting and location by the front end.

[0038] This module can achieve the following technical effects: By setting priority judgment logic for semantic risks and rule violations, invalid rule matching is avoided when there are obvious semantic problems, thus improving system response efficiency. At the same time, all push information clearly marks the field to which the error belongs, which is easy for the front end to highlight and locate, enabling users to quickly identify and correct errors, thus improving the friendliness of human-computer interaction and correction efficiency.

[0039] Intelligent correction module 5, in which: Error prompts and modification suggestions are displayed in real time on the form until the user makes no errors. Users can adopt modification suggestions with one click and the corresponding fields are automatically corrected.

[0040] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The methods disclosed in the embodiments are described simply because they correspond to the systems disclosed in the embodiments; relevant details can be found in the method section.

[0041] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0042] In the embodiments provided by this invention, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.

[0043] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0044] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit.

[0045] Similarly, in the various embodiments of the present invention, each processing unit can be integrated into a functional module, or each processing unit can exist physically, or two or more processing units can be integrated into a functional module.

[0046] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0047] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0048] The above-disclosed embodiments are merely preferred embodiments of the present invention, but the present invention is not limited thereto. Any non-creative variations that can be conceived by those skilled in the art, as well as any improvements and modifications made without departing from the principles of the present invention, should fall within the protection scope of the present invention.

Claims

1. A method for preventing errors in work orders for power systems, characterized in that, Includes the following steps: Step S1: Obtain the work order content entered by the user in real time; Step S2: Using a finely tuned large language model in the power field, the input work order content is semantically parsed and standardized to extract key elements and determine in real time whether there are semantic risks in the current content. If there are risks, a semantic risk warning is generated directly. Step S3: Input the extracted key elements into the rule engine of the built-in work ticket security rule base, perform rule matching, and determine in real time whether the current content violates the rules. If it violates the rules, generate a rule violation prompt. Step S4: Based on the judgment results of Step S2 and Step S3, if there is a risk or violation, the generated semantic risk warning and rule violation warning will be pushed to the front end for visual prompts. If no problems are found, no prompts will be generated, allowing the user to continue filling in the form; Step S5: Display error messages and modification suggestions in real time on the fill-in interface until the user makes no errors. Support users to adopt modification suggestions with one click and automatically correct the corresponding fields.

2. The method for preventing errors in power system work orders according to claim 1, characterized in that, The large language model for fine-tuning in the power field in step S2 specifically includes: Input layer, semantic coding layer, power sector adaptation layer, output layer, risk prediction head; The semantic encoding layer employs a 6-layer Transformer encoder structure; the power domain adaptation layer includes a power terminology attention matrix; the output layer uses a Softmax activation function to output key element classifications; and the risk prediction head includes a linear transformation layer and a Sigmoid activation function, whose input is the feature vector output by the power domain adaptation layer, and whose output is a real-time risk value between 0 and 1.

3. The method for preventing errors in power system work orders according to claim 1, characterized in that, Step S2 specifically includes: S21, perform word segmentation and word embedding transformation on the work order text to obtain the input sequence and input it into the large language model; S22, the semantic coding layer adopts a multi-layer Transformer encoder to perform self-attention calculation on the input sequence and extract contextual semantic features; through the power domain adaptation layer, the semantic features of the power domain are transformed and the features are enhanced by knowledge guidance to obtain the semantic representation; the output layer outputs key elements; S23, the risk prediction head calculates the risk value in real time based on the semantic representation and key elements, and determines whether there is a semantic risk. If the risk value exceeds the preset risk threshold, a semantic risk prompt including the semantic error type and modification suggestions is generated; if the risk value is less than or equal to the preset risk threshold, no prompt is output.

4. The method for preventing errors in power system work orders according to claim 1, characterized in that, Step S3 specifically includes: The rules engine reads the basic format rules, semantic logic rules, and operation mode rules from the work ticket security rule base. The extracted key elements are matched and verified against each reading rule. If all rules are matched and verified successfully, no prompt is output. If any one or more rules fail to match and verify, a rule violation prompt is output, including the name of the violating rule, the error description, and modification suggestions.

5. The method for preventing errors in power system work orders according to claim 1, characterized in that, Step S4 specifically includes: If step S2 generates a semantic risk warning, the semantic risk warning is pushed to the front end, and step S3 is not executed temporarily. Step S3 will be executed after the error is corrected and the semantic risk warning is canceled. If step S2 does not generate a semantic risk warning, step S3 is executed. If step S3 generates a rule violation warning, the rule violation warning will be pushed to the front end; if step S3 does not generate any warning, the information is considered to be filled in correctly, no push will be made, and the user can continue filling in the information. All push notifications contained incorrect locations.

6. A power system work order error prevention device, characterized in that, include: The real-time acquisition module includes: Real-time acquisition of work order content entered by the user; The semantic validation module contains: Using a finely tuned large language model in the power sector, semantic parsing and standardization are performed on the input work order content to extract key elements and determine in real time whether there are semantic risks in the current content. If there are risks, semantic risk warnings are generated directly. The rule validation module contains: The extracted key elements are input into the rule engine of the built-in work ticket security rule base, and rule matching is performed to determine in real time whether the current content violates the rules. If it violates the rules, a rule violation prompt is generated. The results push module contains: Based on the judgment results of the semantic verification module and the rule verification module, if there is a risk or violation, the generated semantic risk warning and rule violation warning will be pushed to the front end for visual prompts. If no problems are found, no prompts will be generated, allowing the user to continue filling in the form; The intelligent correction module contains: Error prompts and modification suggestions are displayed in real time on the form until the user makes no errors. Users can adopt modification suggestions with one click and the corresponding fields are automatically corrected.

7. A power system work order error prevention device according to claim 6, characterized in that, The large language model for fine-tuning in the power field within the semantic verification module specifically includes: Input layer, semantic coding layer, power sector adaptation layer, output layer, risk prediction head; The semantic encoding layer employs a 6-layer Transformer encoder structure; the power domain adaptation layer includes a power terminology attention matrix; the output layer uses a Softmax activation function to output key element classifications; and the risk prediction head includes a linear transformation layer and a Sigmoid activation function, whose input is the feature vector output by the power domain adaptation layer, and whose output is a real-time risk value between 0 and 1.

8. A power system work order error prevention device according to claim 6, characterized in that, The semantic verification module specifically includes: a word embedding processing submodule, a semantic encoding and element extraction submodule, and a risk quantification and judgment submodule; The word embedding processing submodule includes: The work order text is segmented and word-embedded to obtain the input sequence, which is then fed into the large language model. The semantic encoding and feature extraction submodule includes: The semantic encoding layer employs a multi-layer Transformer encoder to perform self-attention calculation on the input sequence and extract contextual semantic features; the power domain adaptation layer performs power domain semantic feature transformation and knowledge-guided feature enhancement to obtain semantic representation; the output layer outputs key elements. The risk quantification and assessment submodule includes: The risk prediction head calculates the risk value in real time based on semantic representation and key elements, and determines whether there is semantic risk. If the risk value exceeds the preset risk threshold, a semantic risk prompt is generated, including the semantic error type and modification suggestions; if the risk value is less than or equal to the preset risk threshold, no prompt is output.

9. A power system work order error prevention device according to claim 6, characterized in that, The rule verification module specifically includes: The rules engine reads the basic format rules, semantic logic rules, and operation mode rules from the work ticket security rule base. The extracted key elements are matched and verified against each reading rule. If all rules are matched and verified successfully, no prompt is output. If any one or more rules fail to match and verify, a rule violation prompt is output, including the name of the violating rule, the error description, and modification suggestions.

10. A power system work order error prevention device according to claim 6, characterized in that, The result push module specifically includes: If the semantic validation module generates a semantic risk warning, the warning will be pushed to the front end, and the rule validation module will not be executed temporarily. Once the error is corrected and the semantic risk warning is removed, the rule validation module will be executed. If the semantic validation module does not generate a semantic risk warning, the rule validation module will continue to execute. If the rule validation module generates a rule violation warning, the warning will be pushed to the front end; if the rule validation module does not generate any warning, the information is considered to be filled in correctly, no push will be made, and the user can continue filling in the information. All push notifications contained incorrect locations.