Intelligent power work ticket generation system and method based on large language model

The intelligent power work order generation system based on a large language model automatically generates power work orders, solving the problem of manual drafting relying on individual experience, improving drafting quality and approval rate, increasing circulation efficiency, and ensuring the accuracy and standardization of safety measures.

CN121543558APending Publication Date: 2026-02-17SICHUAN JIANENGJIA POWER GRP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing safety measures for manually preparing power work permits rely on individual experience, resulting in low preparation quality, low approval rate, poor circulation timeliness, and a lack of unified standards.

Method used

An intelligent power work order generation system based on a large language model is adopted. Through a data collection module, a preprocessing module, a knowledge graph construction module, a vectorization module, a model training module, and a safety measure generation module, power work orders are automatically generated. The system combines knowledge graphs and vector databases for information retrieval and semantic matching to generate safety measures that comply with safety standards.

Benefits of technology

The system enables the automated generation of power work permits, improving the quality of preparation and approval rates, increasing circulation efficiency, and ensuring the accuracy and standardization of safety measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543558A_ABST
    Figure CN121543558A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power system operation and maintenance automation and artificial intelligence natural language processing, and provides a power work ticket intelligent generation system and method based on a large language model, and the method comprises the steps: an acquisition module generates an original data set; the preprocessing module executes data cleaning and term standardization to output structured data; the knowledge graph construction module is used for constructing a transformer substation equipment knowledge graph by utilizing the graph database storage equipment entity and the topological relation; the vectorization module converts the text information into a vector and constructs a retrieval index; the model training module adopts increment pre-training and parameter efficient fine tuning to optimize a large language model; the security measure generation module generates a preliminary security measure in combination with knowledge graph query and vector retrieval; and the verification output module verifies and outputs the standardized work ticket through semantic matching and a rule engine. According to the invention, automatic generation of work ticket safety measures is realized, and compiling quality and auditing efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of power system operation and maintenance automation and artificial intelligence natural language processing technology, and in particular to a power work order intelligent generation system and method based on a large language model. Background Technology

[0002] Power work permits are important documents for safety management in power system operations. They prevent electrical accidents by standardizing work procedures. The work permit system requires risk analysis and equipment isolation before work, as well as permit approval. During work, monitoring and real-time recording are carried out, and after work, equipment is restored and the permit is cancelled.

[0003] The current power work order generation system suffers from the following technical challenges: Firstly, the existing manual work order preparation relies on the individual experience of operators. Due to varying levels of experience and subjective judgment, omissions or errors are easily introduced. For instance, in power grid substation maintenance scenarios, maintenance personnel may fail to accurately identify equipment topology relationships when preparing work orders, such as neglecting the isolation requirements of nearby energized equipment. This results in incomplete safety measures, leading to multiple rejections and revisions during the review process, prolonging work order processing time, and reducing operational efficiency and safety reliability. Secondly, this manual approach lacks unified standards, resulting in inconsistent preparation quality, a lower approval rate, and impacting the overall timeliness of power grid operation and maintenance. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides an intelligent power work order generation system and method based on a large language model. This solves the technical problems of low quality, low approval rate, and poor circulation efficiency caused by the reliance on individual experience and the susceptibility to errors in existing manual work order preparation safety measures.

[0005] To solve the above-mentioned technical problems, the specific technical solution of the present invention is as follows: In a first aspect, the intelligent power work order generation system based on a large language model provided by the present invention includes a data acquisition module, a preprocessing module, a knowledge graph construction module, a vectorization module, a model training module, a safety measure generation module, and a verification output module. The data acquisition module is configured to obtain substation equipment ledgers, historical work order records, maintenance plan documents, and safety management specification texts from the power grid resource business platform and historical database, generate raw datasets, and transmit them to the preprocessing module. The preprocessing module is configured to receive the raw dataset, perform data cleaning, word segmentation and stemming, and output structured data to the knowledge graph construction module. The knowledge graph construction module is configured to receive structured data, use a graph database to store device entities and device topology relationships, construct a substation equipment knowledge graph, and transmit the substation equipment knowledge graph to the vectorization module. The vectorization module is configured to receive a knowledge graph of substation equipment, extract text information from the knowledge graph, convert the text information into text vectors using the embedding layer of a pre-trained large language model, store the text vectors in a vector database, and output the vectorized index to the model training module. The model training module is configured to receive structured data corresponding to the vectorized index and the historical work ticket records output by the preprocessing module, and to optimize the pre-trained large language model by incremental pre-training and efficient parameter fine-tuning, and output the fine-tuned large language model to the security measure generation module. The safety measures generation module is configured to receive the maintenance work task description input by the user, and generate preliminary safety measures text based on the vector database, vectorized index and substation equipment knowledge graph through a fine-tuned large language model and transmit it to the verification output module. The verification output module is configured to receive the preliminary safety measures text, obtain the safety management specification text from the substation equipment knowledge graph, perform semantic matching between the preliminary safety measures text and the safety management specification text, and output the standardized work order safety measures.

[0006] Furthermore, in the intelligent power work order generation system based on a large language model described in this invention, the data acquisition module obtains data through a preset application programming interface (API). The API runs in a timed task scheduling mode, parses the acquired JSON and XML format data, and obtains the substation equipment ledger, the historical work order records, the maintenance plan document, and the safety management specification text. The safety measure generation module retrieves historical work order text vectors similar to the maintenance task description through the vector database and the vectorized index, and queries the equipment relationships related to the maintenance task description from the substation equipment knowledge graph. The retrieved historical work order text vectors and the queried equipment relationships are input into the fine-tuned large language model to generate preliminary safety measure text. The verification output module obtains the safety management specification text from the substation equipment knowledge graph, performs semantic matching between the preliminary safety measures text and the safety management specification text, and outputs standardized work order safety measures.

[0007] Furthermore, in the intelligent power work ticket generation system based on a large language model described in this invention, the preprocessing module performs data cleaning including identifying and removing special characters through regular expression pattern matching, processing missing value fields using mean interpolation or K-nearest neighbor algorithm, and identifying duplicate records based on field similarity calculation and performing deduplication. The preprocessing module performs terminology standardization on the raw dataset after data cleaning, including constructing a professional terminology mapping dictionary in the power field, identifying synonyms through a string fuzzy matching algorithm, and uniformly replacing the identified synonyms with standard terms. The preprocessing module performs word segmentation on the standardized terminology dataset, optimizes the word segmentation accuracy using a professional dictionary in the power field, performs stemming on the word segmentation results to remove word variant suffixes, and outputs structured data to the knowledge graph construction module.

[0008] Furthermore, in the intelligent power work order generation system based on a large language model described in this invention, the knowledge graph construction module extracts equipment entities from the structured data, including identifying transformer entities, circuit breaker entities, and protection device entities through entity recognition algorithms, and establishing a unique identifier mapping table for equipment entities; The knowledge graph construction module parses the device topology relationships between the device entities, including analyzing the electrical connection relationship graph to establish the connection path between devices, parsing the protection logic association relationship to establish the correspondence between the protection device and the protected device, and quantifying the electrical parameters of the connection relationship and the action characteristics of the protection association. The knowledge graph construction module stores the device entities and their topological relationships in the graph database in the form of triples. This includes constructing a triple structure, which includes a subject, a relation, and an object, and establishing a triple index to optimize query efficiency, thereby enabling relational reasoning and path query functions in the graph database.

[0009] Furthermore, in the intelligent power work order generation system based on a large language model described in this invention, the vectorization module extracts text information from the substation equipment knowledge graph, including extracting equipment entity description text and topological relationship description text, integrating safety management specification text clauses, and constructing a text corpus; The vectorization module uses the BERT model encoder to vectorize the text information, including word segmentation and position encoding of the input text, calculation of text representation through multi-head self-attention mechanism, and extraction of the hidden state of the [CLS] tag as text vector; The vectorization module constructs a vectorized index based on the text vectors, including organizing the vector space using a hierarchical navigable small-world graph algorithm, establishing an approximate nearest neighbor search index structure, and completing fast vector retrieval based on cosine similarity.

[0010] Furthermore, in the intelligent power work order generation system based on a large language model described in this invention, the model training module performs incremental pre-training on the pre-trained large language model, including inputting a corpus of the power field into the pre-trained large language model to expand the vocabulary, adjusting the attention weight distribution based on the expanded vocabulary, and continuing to train the embedding layer and Transformer layer of the pre-trained large language model using power field text. After completing the incremental pre-training, the model training module performs efficient parameter fine-tuning on the incrementally pre-trained large language model, including injecting a LoRA adapter into the linear layer of the pre-trained large language model, freezing the original parameters of the pre-trained large language model, training only the low-rank matrix in the LoRA adapter, updating the parameters of the low-rank matrix through gradient backpropagation, and obtaining the fine-tuned large language model.

[0011] Furthermore, in the intelligent power work order generation system based on a large language model described in this invention, the safety measure generation module queries equipment relationships from the substation equipment knowledge graph, including parsing the connection relationship between the maintenance equipment and adjacent equipment, identifying the association relationship between the protection device and the maintenance equipment, and determining isolation requirements and safety distance parameters. The security measure generation module concatenates the queried device relationships with the retrieved historical work order text vectors into an input sequence, and inputs the input sequence into the fine-tuned large language model. The fine-tuned large language model encodes the input sequence, analyzes the device status and risk type, and generates preliminary safety measures text including specific operation instructions.

[0012] Furthermore, in the intelligent power work ticket generation system based on a large language model described in this invention, the verification output module uses a rule engine to verify the preliminary safety measures text, including using regular expressions to match the isolation flag format, verifying the integrity of safety terms through keyword extraction, and comparing the mandatory requirements clauses in the safety management specification text. When the verification finds a semantic mismatch, the verification output module reconstructs the input prompt content, including adding missing safety specification clauses to the prompt content, correcting logical errors in the device relationship description, and supplementing missing risk identification items. The verification output module inputs the reconstructed prompt content into the fine-tuned large language model to regenerate the corrected security measure text that meets the semantic matching requirements.

[0013] Furthermore, in the intelligent power work ticket generation system based on a large language model described in this invention, the structured data output by the preprocessing module is transmitted to the knowledge graph construction module through a data pipeline and a RESTful application programming interface. The substation equipment knowledge graph constructed by the knowledge graph construction module is transmitted to the vectorization module through a data pipeline and a RESTful application programming interface. The vectorized index generated by the vectorization module is transmitted to the model training module through a data pipeline and a RESTful application programming interface. The fine-tuned large language model output by the model training module is transmitted to the security measure generation module through a data pipeline and a RESTful application programming interface. The preliminary security measures text generated by the security measures generation module is transmitted to the verification output module through a data pipeline and a RESTful application programming interface.

[0014] Secondly, the present invention provides a method for intelligent generation of power work orders based on a large language model, applied to the aforementioned intelligent generation system for power work orders based on a large language model, comprising: Step 1: Obtain substation equipment ledgers, historical work order records, maintenance plan documents, and safety management specification texts from the power grid resource business platform and historical database to generate the original dataset; Step 2: Perform data cleaning, word segmentation, and stemming on the original dataset to obtain structured data; Step 3: Utilize a graph database to store equipment entities and equipment topology relationships in structured data, and construct a substation equipment knowledge graph that includes equipment entities, equipment topology relationships, and safety management specification texts; Step 4: Extract text information from the substation equipment knowledge graph, use the embedding layer of the pre-trained large language model to convert the text information into text vectors, store the text vectors in the vector database, and generate a vectorized index. Step 5: Combining the vectorized index with the structured data corresponding to the historical work ticket records obtained in Step 2, the pre-trained large language model is optimized using incremental pre-training and efficient parameter fine-tuning to obtain the fine-tuned large language model. Step 6: Receive the maintenance task description input by the user, retrieve historical work ticket text vectors similar to the maintenance task description through the vector database and vectorized index, and query the equipment relationships related to the maintenance task description from the substation equipment knowledge graph. Input the retrieved historical work ticket text vectors and the queried equipment relationships into the fine-tuned large language model to generate preliminary safety measures text. Step 7: Obtain the safety management specification text from the substation equipment knowledge graph, perform semantic matching between the preliminary safety measures text and the safety management specification text, and output the standardized work order safety measures.

[0015] The beneficial effects of this invention are: This invention achieves automated generation of safety measures for power work permits through modular system design, effectively solving the errors and omissions caused by the reliance on individual experience in existing manual compilation. The collaborative work of the data acquisition module and the preprocessing module ensures the accuracy and standardization of the data source. The knowledge graph construction module integrates scattered equipment information and safety specifications into a structured knowledge system, providing a reliable data foundation for subsequent processing. The combination of the vectorization module and the model training module enables the large language model to understand professional knowledge in the power field. The safety measure generation module generates preliminary solutions that meet actual needs through multi-source information retrieval and reasoning mechanisms. The semantic matching and rule engine dual verification mechanism of the verification output module significantly improves the accuracy and standardization of the output results. The modules achieve seamless data flow through standardized interfaces, forming an end-to-end automated processing chain, which improves the quality of work permit compilation while increasing the approval rate and circulation efficiency. Attached Figure Description

[0016] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on the drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the intelligent generation method for power work tickets based on a large language model according to the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The technical solutions provided by various embodiments of this invention will be described in detail below with reference to the accompanying drawings.

[0019] To better understand the purpose of this invention, the invention will now be described in further detail.

[0020] In a first aspect, the intelligent power work order generation system based on a large language model provided by the present invention includes a data acquisition module, a preprocessing module, a knowledge graph construction module, a vectorization module, a model training module, a safety measure generation module, and a verification output module. The data acquisition module is configured to obtain substation equipment ledgers, historical work order records, maintenance plan documents, and safety management specification texts from the power grid resource business platform and historical database, generate raw datasets, and transmit them to the preprocessing module. The preprocessing module is configured to receive the raw dataset, perform data cleaning, word segmentation and stemming, and output structured data to the knowledge graph construction module. The knowledge graph construction module is configured to receive structured data, use a graph database to store device entities and device topology relationships, construct a substation equipment knowledge graph, and transmit the substation equipment knowledge graph to the vectorization module. The vectorization module is configured to receive a knowledge graph of substation equipment, extract text information from the knowledge graph, convert the text information into text vectors using the embedding layer of a pre-trained large language model, store the text vectors in a vector database, and output the vectorized index to the model training module. The model training module is configured to receive structured data corresponding to the vectorized index and the historical work ticket records output by the preprocessing module, and to optimize the pre-trained large language model by incremental pre-training and efficient parameter fine-tuning, and output the fine-tuned large language model to the security measure generation module. The safety measures generation module is configured to receive the maintenance work task description input by the user, and generate preliminary safety measures text based on the vector database, vectorized index and substation equipment knowledge graph through a fine-tuned large language model and transmit it to the verification output module. The verification output module is configured to receive the preliminary safety measures text, obtain the safety management specification text from the substation equipment knowledge graph, perform semantic matching between the preliminary safety measures text and the safety management specification text, and output the standardized work order safety measures.

[0021] The intelligent power work permit generation system based on a large language model achieves automated generation of power operation safety measures through modular design. The system includes a data acquisition module, a preprocessing module, a knowledge graph construction module, a vectorization module, a model training module, a safety measure generation module, and a verification output module, forming a complete technical closed loop.

[0022] The data acquisition module obtains multi-source data from the power grid resource business platform and historical database through a pre-defined application programming interface. The module employs a scheduled task mechanism to periodically retrieve substation equipment ledgers in JSON format and historical work order records in XML format, while also acquiring maintenance plan documents and safety management specification texts. During data acquisition, the module performs format parsing and field mapping on the heterogeneous data, generating standardized raw datasets which are then transmitted to the preprocessing module.

[0023] The preprocessing module performs a multi-stage processing flow on the raw dataset. In the data cleaning stage, special characters are identified and filtered using regular expression pattern matching, missing values ​​in numerical fields are handled using mean interpolation, and duplicate records are detected based on field similarity calculations. In the terminology standardization stage, a dictionary mapping power industry terminology is constructed, and synonyms are identified using a fuzzy string matching algorithm. This standardization process unifies the aliases of substation equipment into standardized terms. In the word segmentation stage, a power industry dictionary is used to enhance segmentation accuracy, and stemming is performed on the processed text to eliminate word morphological changes, ultimately outputting high-quality structured data.

[0024] After receiving structured data, the knowledge graph construction module extracts transformer entities, circuit breaker entities, and protection device entities using entity recognition algorithms, and establishes a mapping table of unique identifiers for equipment entities. The topology relationship parsing stage analyzes the electrical connection relationship graph, establishing physical connection paths between devices; simultaneously, it parses protection logic relationships, forming a correspondence between protection devices and protected equipment. The knowledge storage stage transforms equipment entities and equipment topology relationships into subject-relationship-object triples, utilizing the indexing optimization mechanism of the graph database to achieve fast relationship lookups.

[0025] The vectorization module extracts device description text and topological relationship descriptions from the knowledge graph and integrates safety specification clauses to construct a text corpus. The text vectorization process uses a BERT model encoder to segment and positionally encode the input text, then calculates the text representation through a multi-head self-attention mechanism, extracting the hidden states of CLS tags as text vectors. In the vector index construction stage, a hierarchical navigable small-world graph algorithm is used to organize the vector space, establishing an approximate nearest neighbor search index structure that supports fast retrieval based on cosine similarity.

[0026] The model training module employs a two-stage optimization strategy. In the incremental pre-training stage, a corpus from the power industry is input into the pre-trained large language model. The professional vocabulary is expanded, and the attention weight distribution is adjusted. The embedding and Transformer layers are continuously trained using domain-specific text. In the efficient parameter fine-tuning stage, a LoRA adapter is injected into the model's linear layers. The original parameters are frozen, and only the low-rank matrix is ​​trained. The adapter parameters are optimized through gradient backpropagation to obtain a domain-adapted large language model.

[0027] After receiving the maintenance task description from the user, the safety measure generation module retrieves similar historical work order text vectors from a vector database and queries the knowledge graph for equipment connectivity and isolation requirements. The search results are then concatenated into an input sequence and fed into a fine-tuned large language model. The model analyzes equipment status and risk types through encoding to generate preliminary safety measures, including specific operational instructions. For example, when handling a main transformer de-energization maintenance task, the system automatically identifies adjacent energized equipment and generates corresponding isolation measures.

[0028] The output verification module employs a dual verification mechanism to ensure output quality. During the rule engine verification phase, regular expressions are used to match the isolation flag format, keywords are extracted to verify the completeness of safety terminology, and clauses are compared with safety management regulations. For semantically mismatched content, the module reconstructs the input prompts, supplements missing regulatory clauses, corrects logical errors, and regenerates safety measures, ultimately outputting a standardized work order that conforms to power safety standards.

[0029] Data flow between modules is achieved through data pipelines and RESTful interfaces. Intermediate results such as structured data, knowledge graphs, and vector indexes are transmitted through standardized interfaces, forming an end-to-end automated processing chain. Through a collaborative mechanism of knowledge graphs and vector retrieval, the system combines device topology relationships with historical experience, significantly improving the accuracy and standardization of security measure generation.

[0030] Specifically, in the intelligent power work order generation system based on a large language model described in this invention, the data acquisition module obtains data through a preset application programming interface (API). The API runs in a timed task scheduling mode and parses the acquired JSON and XML data to obtain the substation equipment ledger, the historical work order records, the maintenance plan document, and the safety management specification text. The safety measure generation module retrieves historical work order text vectors similar to the maintenance task description through the vector database and the vectorized index, and queries the equipment relationships related to the maintenance task description from the substation equipment knowledge graph. The retrieved historical work order text vectors and the queried equipment relationships are input into the fine-tuned large language model to generate preliminary safety measure text. The verification output module obtains the safety management specification text from the substation equipment knowledge graph, performs semantic matching between the preliminary safety measures text and the safety management specification text, and outputs standardized work order safety measures.

[0031] The data acquisition module establishes a data connection channel with the power grid resource business platform and historical database through a pre-defined application programming interface (API). This API uses a scheduled task mechanism to periodically trigger the data acquisition process. During data acquisition, the system performs key-value pair parsing on JSON-formatted substation equipment ledger data, performs node traversal parsing on XML-formatted historical work order records, and extracts structured fields from maintenance plan documents and clauses from safety management regulations. After data parsing, the acquisition module maps data from different sources to fields in a unified format, generating a raw dataset including equipment ledgers, work order records, maintenance plans, and safety regulations.

[0032] After receiving the maintenance task description input by the user, the safety measures generation module initiates a multi-source information retrieval mechanism. This module performs a similarity search in the vector database using a vectorized index, employing an approximate nearest neighbor algorithm to find historical work order text vectors semantically similar to the current task description. Simultaneously, the module queries the substation equipment knowledge graph for equipment relationships related to the maintenance task, including topological information such as equipment connection paths and protection associations. The retrieved historical work order text vectors and the queried equipment relationship data are combined into an input sequence and fed into a fine-tuned large language model for comprehensive analysis. Based on the input multi-source information and combined with power industry knowledge acquired during training, the large language model generates preliminary safety measures text, including specific operational steps and safety requirements.

[0033] The verification output module employs a two-tiered verification mechanism to control the quality of the preliminary safety measures text. First, the module extracts safety management specification text from the substation equipment knowledge graph, including normative content such as safe operating procedures and equipment isolation standards. Then, it uses a semantic matching algorithm to calculate the similarity between the preliminary safety measures text and the specification text, identifying content discrepancies. For clauses with low matching scores, the module activates a rule engine for secondary verification, using regular expressions to match key safety terms and compare the completeness of mandatory clauses. Verified content is directly output as standardized work order safety measures; unverified content triggers a correction process for regeneration.

[0034] The system's modules communicate via standardized data interfaces. Raw data from the acquisition module is preprocessed to form structured data. The knowledge graph construction module converts this structured data into a device relationship graph. The vectorization module embeds textual information into a vector space. The model training module optimizes the domain adaptability of the large language model. The security measure generation module integrates multi-source information to generate preliminary solutions. Finally, the verification output module performs quality verification. This invention forms a closed-loop processing chain, with the output of each module serving as the input to the next, ensuring the continuity and systematic nature of the data processing.

[0035] Specifically, the intelligent power work ticket generation system based on a large language model described in this invention includes a preprocessing module that performs data cleaning, which includes identifying and removing special characters through regular expression pattern matching, processing missing value fields using mean interpolation or K-nearest neighbor algorithm, and identifying and deduplicating duplicate records based on field similarity calculation. The preprocessing module performs terminology standardization on the raw dataset after data cleaning, including constructing a professional terminology mapping dictionary in the power field, identifying synonyms through a string fuzzy matching algorithm, and uniformly replacing the identified synonyms with standard terms. The preprocessing module performs word segmentation on the standardized terminology dataset, optimizes the word segmentation accuracy using a professional dictionary in the power field, performs stemming on the word segmentation results to remove word variant suffixes, and outputs structured data to the knowledge graph construction module.

[0036] The preprocessing module performs data cleaning on the raw dataset transmitted by the acquisition module, identifying and removing special characters through regular expression pattern matching. The regular expression patterns are designed to target common non-standard symbols in power data, such as removing redundant punctuation in equipment numbers or cleaning up garbled characters in text. For missing value handling, the module uses mean imputation to fill in numeric fields. When the field distribution is uneven, it switches to the K-nearest neighbor algorithm, predicting missing content based on the attribute features of adjacent records. The duplicate record identification stage is achieved through field similarity calculation, using a cosine similarity algorithm to compare key field combinations. When the similarity threshold exceeds a preset standard, duplicate entries are automatically marked and deleted. This series of cleaning operations significantly improves data quality, providing clean input for subsequent processing.

[0037] After data cleaning, the raw dataset enters the terminology standardization process. The preprocessing module constructs a dictionary mapping power industry terminology, with content derived from International Electrotechnical Commission (IEC) standards and State Grid Corporation of China (SGCC) specifications. A fuzzy string matching algorithm uses edit distance calculation to identify synonyms; for example, it identifies "switch" and "circuit breaker" as equivalent concepts and replaces all synonyms with the standard term "circuit breaker." The terminology standardization process also handles abbreviation variations of equipment models, such as mapping "SF6 circuit breaker" and "sulfur hexafluoride circuit breaker" to a unified standard. This standardization process eliminates terminological ambiguity and ensures consistency in entity identification during subsequent knowledge graph construction.

[0038] The standardized dataset undergoes a word segmentation process. The module uses a specialized dictionary in the power industry to enhance segmentation accuracy, including complete entries for terms such as transformers and disconnectors. The segmentation algorithm combines bidirectional maximum matching rules to handle long compound words, for example, correctly segmenting "oil-immersed power transformer" into independent semantic units. Stemming is performed on the segmented results, using the Porter stemming algorithm to remove word suffixes, such as restoring "operating" to "operate" and unifying "isolated" to "isolate". The segmented text data is then converted into a structured data format, organized into standard fields such as equipment attributes and operation records through a field mapping table, and finally output to the knowledge graph construction module to support the construction of entity relationships in the knowledge graph.

[0039] Specifically, in the intelligent power work order generation system based on a large language model described in this invention, the knowledge graph construction module extracts equipment entities from the structured data, including identifying transformer entities, circuit breaker entities, and protection device entities through entity recognition algorithms, and establishing a unique identifier mapping table for equipment entities. The knowledge graph construction module parses the device topology relationships between the device entities, including analyzing the electrical connection relationship graph to establish the connection path between devices, parsing the protection logic association relationship to establish the correspondence between the protection device and the protected device, and quantifying the electrical parameters of the connection relationship and the action characteristics of the protection association. The knowledge graph construction module stores the device entities and their topological relationships in the graph database in the form of triples. This includes constructing a triple structure, which includes a subject, a relation, and an object, and establishing a triple index to optimize query efficiency, thereby enabling relational reasoning and path query functions in the graph database.

[0040] The knowledge graph construction module extracts equipment entities from the structured data output by the preprocessing module, employing an entity recognition algorithm that combines rule-based and statistical methods. The entity recognition process first parses the equipment description field in the structured data, identifying transformer entities through keyword matching and distinguishing between main transformers and station service transformers based on rated voltage and capacity parameters. Circuit breaker entities are identified by combining equipment model and breaking current characteristics. Protection device entities are extracted through protection type terms in the functional description field. After completing entity recognition, the module establishes a unique identifier mapping table for equipment entities. This table establishes a bidirectional mapping relationship between the equipment's number in the original system and its URI identifier in the knowledge graph, supporting subsequent cross-system data association queries.

[0041] The analysis of topological relationships between equipment entities involves two dimensions. First, electrical connection relationship graph analysis, based on substation primary wiring diagram data, establishes physical connection paths between equipment by analyzing equipment connection terminal information. For example, it determines the connection relationship between the transformer outgoing line and the circuit breaker, and the topological association between busbar sections and disconnecting switches. Second, protection logic relationship analysis extracts the correspondence between protection devices and protected equipment from secondary system drawings, including the operational association between overcurrent protection devices and line circuit breakers, and the mapping of the protection range of differential protection devices and transformers. The relationship quantification stage records the electrical parameters of the connection relationships, such as conductor cross-sectional area and allowable current carrying capacity, and also marks the operational characteristic parameters of the protection associations, including operating time limits and setting ranges.

[0042] After completing entity relationship resolution, the module converts device entities and topology relationships into triples for storage. The triple structure adopts a standard "subject-relation-object" format, where the subject is the device entity URI, the relation uses the power industry standard predicate vocabulary, and the object points to either the device entity or a numerical attribute depending on the relation type. The triple index in the graph database is implemented using an attribute graph model, creating bidirectional indexes for frequently queried relation paths to optimize query efficiency. The relation reasoning function uses OWL semantic rules to perform transitive reasoning about device states. Path queries support shortest connection path analysis and N-degree associated device discovery, providing a complete device topology context for generating security measures.

[0043] Specifically, in the intelligent power work order generation system based on a large language model described in this invention, the vectorization module extracts text information from the substation equipment knowledge graph, including extracting equipment entity description text and topological relationship description text, integrating safety management specification text clauses, and constructing a text corpus; The vectorization module uses the BERT model encoder to vectorize the text information, including word segmentation and position encoding of the input text, calculation of text representation through multi-head self-attention mechanism, and extraction of the hidden state of the [CLS] tag as text vector; The vectorization module constructs a vectorized index based on the text vectors, including organizing the vector space using a hierarchical navigable small-world graph algorithm, establishing an approximate nearest neighbor search index structure, and completing fast vector retrieval based on cosine similarity.

[0044] The vectorization module extracts multi-source text information from the substation equipment knowledge graph to form the basis of processing. The text extraction process covers equipment entity description text, including static attributes such as transformer model specifications and circuit breaker technical parameters; and topology relationship description text, including dynamic relationship descriptions such as equipment connection methods and protection logic associations. The module simultaneously integrates safety management regulations and clauses, incorporating normative content such as safe operating procedures and isolation distance standards into the processing scope. After integration, heterogeneous texts are used to construct a professional text corpus for the power industry, providing structured input for subsequent vectorization processing.

[0045] Text vectorization is performed using a BERT model encoder to achieve semantic representation. The input text undergoes word segmentation, breaking down technical terms into processable lexical units, while positional encoding is added to record word sequence relationships. A multi-head self-attention mechanism calculates the semantic association weights between words in the text, capturing the logical connection between equipment descriptions and safety specifications. The model extracts the hidden states marked with [CLS] as the semantic representation vector of the entire text. This vector integrates comprehensive information on equipment attributes, topological relationships, and specification requirements, forming a text vector with characteristics specific to the power industry.

[0046] An efficient retrieval index structure is built based on the generated text vectors. The hierarchical navigable small-world graph algorithm organizes the high-dimensional vector space into a multi-layered navigation structure, preserving local nearest neighbor relationships at the bottom layer and establishing fast navigation paths at the upper layer. The approximate nearest neighbor search index improves retrieval efficiency through graph structure optimization, supporting real-time similarity queries for large-scale vector data. After index construction, the system achieves fast vector matching based on cosine similarity calculation, providing accurate historical case retrieval capabilities for the security measure generation module. This vectorization process transforms unstructured text into a computable semantic space, providing structured input support for the understanding and generation of subsequent large language models.

[0047] Specifically, the intelligent generation system for power work tickets based on a large language model described in this invention includes a model training module that performs incremental pre-training on the pre-trained large language model. This includes inputting a corpus of the power industry into the pre-trained large language model to expand the vocabulary, adjusting the attention weight distribution based on the expanded vocabulary, and continuing to train the embedding layer and Transformer layer of the pre-trained large language model using text from the power industry. After completing the incremental pre-training, the model training module performs efficient parameter fine-tuning on the incrementally pre-trained large language model, including injecting a LoRA adapter into the linear layer of the pre-trained large language model, freezing the original parameters of the pre-trained large language model, training only the low-rank matrix in the LoRA adapter, updating the parameters of the low-rank matrix through gradient backpropagation, and obtaining the fine-tuned large language model.

[0048] When incrementally pre-training the pre-trained large language model, the model training module inputs a corpus of power industry terms into the model to expand its professional vocabulary. The vocabulary expansion process identifies domain-specific terms in the corpus, such as equipment names like transformers and circuit breakers, as well as parameter terms like insulation resistance and breaking current, adding these new words to the model's vocabulary. Based on the expanded vocabulary, the module adjusts the attention weight distribution and recalculates the correlation strength between word embeddings, making the model more focused on key concepts in the power industry. Subsequently, the model's embedding and Transformer layers are further trained using power industry text. The embedding layers learn vector representations of new terms, and the Transformer layers adapt to the domain's grammatical structure, enhancing the model's ability to understand power industry texts.

[0049] After incremental pre-training, the model training module performs efficient parameter fine-tuning. A LoRA adapter, composed of low-rank matrices, is injected into the linear layers of the pre-trained large language model and connected to the original linear layers in parallel. The module freezes the original parameters of the pre-trained large language model, maintaining its general language understanding capabilities, and trains only the low-rank matrices in the LoRA adapter. During training, the low-rank matrix parameters are updated using gradient backpropagation, the partial derivatives of the loss function with respect to the adapter parameters are calculated, and an optimizer iteratively adjusts the matrix values. This fine-tuning method preserves the core capabilities of the model while adapting it to the electricity work order generation task, ultimately resulting in a fine-tuned large language model.

[0050] The incremental pre-training phase utilizes a power sector corpus including professional documents such as equipment ledgers and maintenance procedures. After preprocessing, the corpus forms input sequences recognizable by the model. During training, a self-supervised learning approach is employed, using a masked language modeling task to allow the model to predict masked technical terms, thus strengthening its grasp of domain knowledge. Vocabulary expansion not only adds new terms but also adjusts the segmenter's handling of compound terms; for example, "SF6 circuit breaker" is treated as a single unit to avoid semantic fragmentation.

[0051] The LoRA technique is used to optimize computational efficiency during the parameter fine-tuning stage. The dimension of the low-rank matrix is ​​much smaller than that of the original parameter matrix, significantly reducing the number of trainable parameters. During training, only the gradients of the adapter parameters are calculated, and frozen parameters are not involved in backpropagation, significantly reducing memory usage and computational overhead. The gradient update process uses adaptive learning rate adjustment, dynamically adjusting the update step size according to the importance of parameters to ensure training stability. The fine-tuned model accurately grasps the domain characteristics of power safety measures generation while maintaining general language capabilities.

[0052] Specifically, the intelligent power work order generation system based on a large language model described in this invention includes a safety measure generation module that queries equipment relationships from the substation equipment knowledge graph, including parsing the connection relationship between the maintenance equipment and adjacent equipment, identifying the association relationship between the protection device and the maintenance equipment, and determining isolation requirements and safety distance parameters. The security measure generation module concatenates the queried device relationships with the retrieved historical work order text vectors into an input sequence, and inputs the input sequence into the fine-tuned large language model. The fine-tuned large language model encodes the input sequence, analyzes the device status and risk type, and generates preliminary safety measures text including specific operation instructions.

[0053] When the safety measures generation module queries equipment relationships from the substation equipment knowledge graph, it first parses the connection relationships between the equipment under maintenance and adjacent equipment. This process is achieved through the path query function of the graph database. For example, when handling the main transformer outage maintenance task, the module traverses the equipment topology path in the knowledge graph to identify adjacent equipment such as circuit breakers and disconnect switches directly connected to the equipment under maintenance. At the same time, the module identifies the association relationship between protection devices and the equipment under maintenance. By analyzing the protection logic edges in the knowledge graph, it determines the correspondence between overcurrent protection, differential protection, and other devices and the transformer. Based on the connection relationships and protection associations, the module extracts isolation requirement parameters from the safety management specification text, such as calculating the safety distance based on the equipment voltage level, and determining the location of the outage range marker.

[0054] The device relationships obtained from the query are concatenated with historical work order text vectors retrieved from the vector database. The device relationship data is converted into structured text descriptions, including device connection path descriptions and protection association summaries. The historical work order text vectors are decoded into semantically coherent text fragments. These two types of information are combined into a uniformly formatted input sequence, with a task description prompt added at the beginning, alternating device relationship text and historical case text in the middle, and a generation instruction marker added at the end. The concatenated input sequence is converted into a numerical representation through an embedding layer and input into a fine-tuned large language model.

[0055] The fine-tuned large language model encodes the input sequence and analyzes the equipment status information in the sequence through a multi-head self-attention mechanism. The model identifies the operating status of the equipment under maintenance, the energization status of adjacent equipment, and the working mode of protection devices, comprehensively assessing potential hazard types such as arc risk and misoperation risk. Based on the analysis results, the model uses an autoregressive generation method to output preliminary safety measures text. First, it generates an outline of operating steps, and then supplements specific instruction details, such as "hang a 'Do Not Close' sign on the high-voltage side of main transformer No. 1, and install barriers on the operating mechanism of the adjacent 101 circuit breaker." The generation process uses a bundle search algorithm to optimize text coherence, and finally outputs preliminary safety measures text including complete operating instructions.

[0056] Specifically, in the intelligent power work order generation system based on a large language model described in this invention, the verification output module uses a rule engine to verify the preliminary safety measures text, including using regular expressions to match the isolation flag format, verifying the integrity of safety terms through keyword extraction, and comparing the mandatory requirements clauses in the safety management specification text. When the verification finds a semantic mismatch, the verification output module reconstructs the input prompt content, including adding missing safety specification clauses to the prompt content, correcting logical errors in the device relationship description, and supplementing missing risk identification items. The verification output module inputs the reconstructed prompt content into the fine-tuned large language model to regenerate the corrected security measure text that meets the semantic matching requirements.

[0057] When the verification output module uses a rule engine to verify the preliminary safety measures text, it matches the format specifications of isolation signs using regular expression patterns. These regular expression patterns are designed for the standardized format of power safety signs, such as matching the complete character sequence and positional requirements of the "Do Not Close" sign. The keyword extraction process identifies safety terms from the preliminary safety measures text, such as key operational instructions like "power outage," "voltage testing," and "grounding wire connection," verifying the completeness and frequency of these terms. The module then compares the extracted terms with the safety management specifications obtained from the substation equipment knowledge graph, checking the coverage of mandatory requirements clause by clause, such as verifying compliance with specifications regarding isolation distances and warning signs.

[0058] When the rule engine detects a semantic mismatch during verification, the verification output module initiates a prompt content reconstruction mechanism. The module adds missing safety specification clauses to the original input prompt content, such as supplementing safety distance parameters corresponding to specific voltage levels. It also corrects logical errors in the device relationship descriptions, such as adjusting unreasonable step arrangements in the device isolation sequence. Furthermore, the module supplements omitted risk identification items, adding descriptions of uncovered risks such as potential arcing risks and misoperation risks. The reconstruction process, based on the results of difference analysis, specifically improves the completeness and accuracy of the prompt content.

[0059] The reconstructed prompts are input into a finely tuned large language model for regeneration. The model encodes the enhanced prompts, using an attention mechanism to focus on supplementary regulatory clauses and corrected logical relationships. The model analyzes the refined input sequence, combining it with power sector knowledge acquired during training, to generate corrected safety measure text that meets semantic matching requirements. The regeneration process employs a bundle search algorithm to optimize output quality, ensuring that the final generated text fully covers safety regulatory requirements, is logically coherent, and completely identifies risks, outputting standardized work order safety measures.

[0060] Specifically, in the intelligent power work order generation system based on a large language model described in this invention, the structured data output by the preprocessing module is transmitted to the knowledge graph construction module through a data pipeline and a RESTful application programming interface. The substation equipment knowledge graph constructed by the knowledge graph construction module is transmitted to the vectorization module through a data pipeline and a RESTful application programming interface. The vectorized index generated by the vectorization module is transmitted to the model training module through a data pipeline and a RESTful application programming interface. The fine-tuned large language model output by the model training module is transmitted to the security measure generation module through a data pipeline and a RESTful application programming interface. The preliminary security measures text generated by the security measures generation module is transmitted to the verification output module through a data pipeline and a RESTful application programming interface.

[0061] The structured data output from the preprocessing module is transmitted to the knowledge graph construction module via a data pipeline and a RESTful application programming interface (API). The data pipeline uses a message queue for asynchronous data transmission; for example, a Kafka topic is used to receive the structured data generated by the preprocessing module. The structured data includes standard fields from the cleaned equipment ledger and word segmentation results from historical work order records, serialized and encapsulated in JSON format. The RESTful API exposes standardized endpoints, receiving data payloads via HTTP POST requests, and performs authentication and flow control at the gateway layer. The knowledge graph construction module continuously listens to the API endpoints, performs deserialization processing upon receiving data, and maps equipment entity fields to graph database vertex attributes. This transmission mechanism ensures loose coupling in the data processing pipeline and supports horizontal scaling of the module.

[0062] The substation equipment knowledge graph constructed by the knowledge graph construction module is transmitted to the vectorization module via a data pipeline and a RESTful application programming interface. The knowledge graph is exported as a snapshot of a graph database, including equipment entity nodes, topological relationship edges, and their attribute tables. The data pipeline employs a chunked transmission strategy, dividing the large graph structure into multiple message units and transmitting them sequentially via a message queue. The RESTful interface is designed as a multi-part form upload endpoint, supporting large file streaming transmission and avoiding memory overflow. The vectorization module receives the knowledge graph data through an asynchronous callback mechanism, parsing the text descriptions and relationship type annotations in the node attributes. The transmission process includes verification and retransmission mechanisms to ensure the integrity and consistency of the knowledge graph data.

[0063] The vectorized index generated by the vectorization module is transmitted to the model training module via a data pipeline and a RESTful application programming interface. The vectorized index includes text vector matrices and an approximate nearest neighbor graph structure, efficiently serialized using Protobuf format. The data pipeline is configured with a priority queue to ensure that vector index transmission takes precedence over other data types, reducing model training wait time. The RESTful interface provides index version management functionality, supporting the storage and retrieval of multiple index versions. The model training module downloads the vector index using a breakpoint-resume method and loads it into memory to build the vector retrieval space. The transmission link employs a compression algorithm to reduce network bandwidth consumption and accelerate the flow of large-scale vector data.

[0064] The fine-tuned large language model output from the model training module is transmitted to the security measures generation module via a data pipeline and a RESTful application programming interface. The large language model is stored in fragments, including model architecture configuration files and weight parameter sets. The data pipeline implements an incremental transmission mechanism, transmitting only model parameter blocks that differ from the previous version, optimizing transmission efficiency. The RESTful interface provides a model registry function to record model version, training metadata, and performance metrics. The security measures generation module dynamically loads the transmitted model files through a model loader and initializes the inference environment. The transmission process includes digital signature verification to ensure the authenticity and integrity of the model files.

[0065] The initial security measure text generated by the security measure generation module is transmitted to the verification output module via a data pipeline and a RESTful application programming interface. The security measure text includes structured operational steps and risk warning clauses, encapsulated with semantic tags in XML format. The data pipeline sets quality checkpoints to perform basic format verification on the text content before forwarding it. The RESTful interface is designed in an event-driven pattern, proactively pushing new measure text to the verification module when it arrives. The verification output module parses the security operation instructions and device association information in the text, preparing it for rule engine verification. The transmission system implements a retry mechanism and dead-letter queue processing to ensure reliable delivery of critical security measure text.

[0066] Secondly, please refer to Figure 1 This invention provides a method for intelligent generation of power work orders based on a large language model, applied to the aforementioned intelligent generation system for power work orders based on a large language model, comprising: Step 1: Obtain substation equipment ledgers, historical work order records, maintenance plan documents, and safety management specification texts from the power grid resource business platform and historical database to generate the original dataset; Step 2: Perform data cleaning, word segmentation, and stemming on the original dataset to obtain structured data; Step 3: Utilize a graph database to store equipment entities and equipment topology relationships in structured data, and construct a substation equipment knowledge graph that includes equipment entities, equipment topology relationships, and safety management specification texts; Step 4: Extract text information from the substation equipment knowledge graph, use the embedding layer of the pre-trained large language model to convert the text information into text vectors, store the text vectors in the vector database, and generate a vectorized index. Step 5: Combining the vectorized index with the structured data corresponding to the historical work ticket records obtained in Step 2, the pre-trained large language model is optimized using incremental pre-training and efficient parameter fine-tuning to obtain the fine-tuned large language model. Step 6: Receive the maintenance task description input by the user, retrieve historical work ticket text vectors similar to the maintenance task description through the vector database and vectorized index, and query the equipment relationships related to the maintenance task description from the substation equipment knowledge graph. Input the retrieved historical work ticket text vectors and the queried equipment relationships into the fine-tuned large language model to generate preliminary safety measures text. Step 7: Obtain the safety management specification text from the substation equipment knowledge graph, perform semantic matching between the preliminary safety measures text and the safety management specification text, and output the standardized work order safety measures.

[0067] This invention specifically implements the automated generation of safety measures for power work orders through a modular system. During system operation, the acquisition module periodically retrieves JSON data packets from the substation equipment ledger from the power grid resource business platform via a pre-defined RESTful API interface, and simultaneously pulls historical work order records in XML format from the historical database. The data acquisition process employs a scheduled task mechanism, automatically triggering the data synchronization process every morning. The acquisition module parses key fields such as transformer rated capacity parameters and circuit breaker breaking current values ​​from the equipment ledger, extracts safety measure text and operation step records from historical work orders, integrates the time node arrangements of the maintenance plan document and the clauses of the safety management specification text, and generates a standardized raw dataset.

[0068] The preprocessing module performs a multi-stage cleaning process on the raw dataset. During the data cleaning phase, special symbols in equipment numbers are filtered using regular expressions, missing voltage level data is filled using mean interpolation, and duplicate equipment ledger records are identified and merged based on field similarity algorithms. In the terminology standardization phase, a power industry terminology mapping table is constructed, uniformly converting synonyms such as "switch" and "circuit breaker" into standard terms to ensure consistency in equipment descriptions. Word segmentation uses an enhanced power industry dictionary to accurately segment complex professional terms such as "oil-immersed power transformer," and stemming extracts "isolating" to uniformly restore "isolate," outputting high-quality structured data.

[0069] After receiving structured data, the knowledge graph construction module extracts equipment entities such as transformers and circuit breakers using entity recognition algorithms, establishing unique identifier mapping relationships for each device. The topology parsing phase analyzes the electrical main wiring diagram data, constructing connection paths between devices, such as establishing electrical connection edges between transformers and circuit breakers, while also parsing the logical associations of protection devices. The knowledge storage phase transforms entities and relationships into "device-connection-device" triples, creating indexes in the graph database to optimize query efficiency, ultimately forming a substation knowledge graph that includes equipment topology and safety management specifications.

[0070] The vectorization module extracts device entity description text and topological relationship description text from the knowledge graph, integrates safety management specification text clauses, and constructs a text corpus. A BERT model encoder is used to vectorize the text, and a multi-head attention mechanism is used to calculate text representations, extracting vector representations of [CLS] tags. A hierarchical navigation index is built based on the generated text vectors, supporting fast retrieval based on cosine similarity, providing a foundation for subsequent similar case matching.

[0071] The model training module employs a two-stage training strategy. In the incremental pre-training stage, power industry-related text is input into the pre-trained model to expand the professional vocabulary and adjust the weight distribution of the attention mechanism. In the efficient parameter fine-tuning stage, a LoRA adapter is injected, freezing the original model parameters and training only the low-rank matrix. The model parameters are then optimized through gradient backpropagation to obtain a domain-adapted large language model. The training process uses a masked language modeling task to enhance the model's understanding of power industry terminology.

[0072] After receiving the maintenance task description from the user, the safety measures generation module retrieves similar historical work order cases through vector indexing and simultaneously queries the knowledge graph for equipment connectivity and isolation requirements. The search results are then concatenated into an input sequence and fed into a fine-tuned large language model. The model analyzes equipment status risks through encoding and generates preliminary safety measures, including specific operational instructions. For example, when handling a main transformer outage maintenance task, the system automatically identifies adjacent energized equipment and generates a textual description of measures, including requirements for the outage area and the placement of safety signs.

[0073] The validation output module uses a rule engine to validate the initial security measure text, matching the isolation flag format using regular expressions and verifying the integrity of security terminology through keyword extraction. When semantic mismatches are detected, the validation output module reconstructs the input prompts and regenerates the corrected security measure text that meets semantic matching requirements. Finally, standardized work order security measures are output. Processing results are transmitted between modules via data pipelines, forming an end-to-end automated processing flow.

[0074] In the specific application of this invention in substation operation and maintenance scenarios, the system achieves intelligent generation of work order safety measures through the collaborative work of multiple modules. When the user inputs the task description "main transformer power outage maintenance," the acquisition module obtains the equipment ledger data of the main transformer from the power grid resource business platform, including parameters such as rated capacity and voltage level, and simultaneously retrieves work order records for similar maintenance tasks from the historical database. The preprocessing module cleans and standardizes the raw data, unifying synonyms such as "main transformer" and "transformer" into "main transformer," and extracts key fields to form structured data. The knowledge graph construction module parses the electrical connection relationship between the main transformer and adjacent circuit breakers and disconnect switches, establishes an equipment topology map, and identifies the range of energized equipment that needs to be isolated. The vectorization module converts the safety measure text in historical work orders into vectors and finds semantically similar cases through near-nearest neighbor retrieval. The fine-tuned large language model, combined with equipment topology relationships and historical cases, generates preliminary safety measures including specific instructions such as "hang a prohibition on closing sign on the high-voltage side" and "install barriers on adjacent 101 circuit breakers." The verification output module compares the isolation distance requirements in the safety management specifications, verifies the completeness of the measures, and then outputs a standardized work order.

[0075] In circuit breaker replacement tasks, the system demonstrates its ability to handle different equipment types. After the user inputs the task "110kV circuit breaker replacement," the acquisition module obtains the circuit breaker's breaking current parameters and associated protection device information. The knowledge graph construction module queries the graph database and discovers that the circuit breaker is electrically connected to the busbar sectionalizing switch and is controlled by an overcurrent protection device. The vectorization module retrieves text vectors from historical work cases of "circuit breaker mechanism jamming handling," showing similar safety isolation logic despite different task types. The safety measures generation module, after synthesizing the equipment topology, instructs that adjacent busbar disconnect switches must be isolated simultaneously and the relevant protection pressure plates must be deactivated. The verification process identifies that the preliminary measures do not clearly indicate the "voltage verification location," automatically adding the clause "verify no voltage on both sides of the circuit breaker," ultimately generating a work order that complies with regulations. This approach significantly reduces the risk of omissions due to overlooking hidden connections.

[0076] For complex maintenance tasks such as "busbar segmentation modification," the system ensures comprehensive measures through multi-level analysis. The task involves the coordinated operation of multiple circuit breakers and disconnectors; the knowledge graph construction module parses the complex connection paths between devices and identifies the energized sections requiring segmentation isolation. The vectorization module simultaneously retrieves various historical cases, such as busbar power outages and disconnector commissioning, integrating the essence of their safety measures. Based on equipment status analysis, the large language model generates phased operation guidelines: first disconnect the segmented circuit breaker, then connect the temporary grounding wire, and finally set a "Work Here" sign. The verification output module verifies the coverage of mandatory clauses such as phase verification and safe distance through a rule engine, supplementing details such as "using insulating barriers to isolate adjacent energized busbars," forming a systematic safety plan. This invention transforms scattered maintenance experience into standardized output, effectively avoiding common problems in manual compilation such as sequence errors or omissions in protection.

[0077] This invention fundamentally changes the existing model of work order creation that relies on human experience by constructing an intelligent generation system based on a large language model. The system automatically acquires multi-source data, such as historical work order records and equipment ledgers from the power grid resource business platform, through a data acquisition module, establishing a standardized data foundation and eliminating data incompleteness caused by differences in human experience. The preprocessing module uses regular expressions and fuzzy matching algorithms to clean the raw data and standardize terminology, unifying synonyms such as "switch" and "circuit breaker" into standardized expressions, thus preventing misunderstandings caused by non-standard terminology usage from the outset.

[0078] The knowledge graph construction module transforms scattered equipment information into a structured knowledge system, establishing topological connections and protection logic associations between equipment entities through a graph database. When handling main transformer outage maintenance tasks, the system can automatically identify adjacent live equipment such as circuit breakers and disconnect switches, and accurately extract the corresponding protection device associations. This formal representation of equipment relationships overcomes the shortcomings of manual compilation, which easily overlooks equipment connection paths.

[0079] The vectorization module, combined with the BERT model, transforms textual information into semantic vectors, constructing a retrieval index based on cosine similarity. When a user inputs a description of a maintenance task, the system can quickly retrieve semantically similar historical work order cases, providing a reliable reference for measure generation. The model training module employs incremental pre-training and efficient parameter fine-tuning techniques, enabling the large language model to acquire professional knowledge in the power field and understand the deeper meanings of technical terms such as "differential protection" and "safety distance."

[0080] The safety measure generation module integrates knowledge graph query results and vector retrieval information to generate preliminary safety measures using a fine-tuned large language model. During the generation process, the model automatically supplements the isolation requirements of nearby energized equipment based on device topology relationships and refines safety sign setting suggestions according to protection logic associations. The verification output module performs semantic matching verification of the generated content through a rule engine. When it finds missing isolation signs or safety distance parameters that do not meet specifications, the system reconstructs the input prompts and regenerates them, forming a closed-loop optimization mechanism.

[0081] Seamless data flow is achieved between modules through standardized interfaces, building an end-to-end automated processing chain. This design transforms the discrete manual judgment process into a systematic computational task, ensuring output quality through a multi-level verification mechanism, significantly improving the standardization and accuracy of work order preparation, while reducing rework rates in the review process and shortening the work order cycle.

[0082] The LoRA adapter in efficient parameter fine-tuning is a machine learning model optimization technique that uses a low-rank matrix to locally adjust a pre-trained model. It achieves domain adaptation by updating only a small number of parameters, significantly reducing computational resource requirements. In this invention, the model training module uses a LoRA adapter to efficiently fine-tune the parameters of a pre-trained large language model. The specific data processing path includes: injecting a LoRA adapter composed of a low-rank matrix into the linear layers of the pre-trained large language model; freezing the original weight parameters of the pre-trained large language model to maintain its basic capabilities; training only the low-rank matrix parameters in the LoRA adapter, calculating the partial derivative of the loss function with respect to the low-rank matrix using the gradient backpropagation algorithm; iteratively updating the low-rank matrix values ​​using an optimizer to enable the model to learn the characteristics of the power industry; and finally obtaining the fine-tuned large language model for use in the safety measure generation module. This processing path ensures the model's general language understanding capabilities while efficiently adapting to the power work order generation task, reducing training time and memory usage.

[0083] Knowledge graph triplet relation reasoning is a graph-based knowledge representation method that describes the relationships between entities using subject-relationship-object triples and derives implicit relationships using semantic rules. In this invention, the knowledge graph construction module uses triplet relation reasoning to manage substation equipment topology. The specific data processing path includes: extracting equipment entities such as transformer and circuit breaker entities from structured data and establishing unique identifiers for each entity; parsing electrical connection relationships and protection logic associations between devices to form triples such as transformer entity-connection-circuit breaker entity; storing the triples in a graph database and building an index to optimize query efficiency; when performing relation reasoning, the system traverses the triplet path based on OWL semantic rules to derive equipment state transmission relationships; for example, analyzing the isolation path between maintenance equipment and energized equipment to identify potential arc risks. This approach achieves structured storage and intelligent reasoning of equipment relationships, providing accurate topological basis for generating safety measures.

[0084] The hierarchical navigable small-world graph algorithm for vectorized indexing is an approximate nearest neighbor search technique. It organizes a high-dimensional vector space by constructing a multi-layered graph structure to achieve efficient similarity retrieval. In this invention, the vectorization module uses this algorithm to construct a text vector index. The specific data processing path includes: extracting textual description information from the substation equipment knowledge graph; using a BERT model encoder to convert the text into high-dimensional vectors; constructing a hierarchical navigable small-world graph index based on the text vectors, where the lower-level graph preserves local nearest neighbor relationships and the upper-level graph establishes a fast navigation path; when the user inputs a maintenance task description, the system performs an approximate nearest neighbor search through this index, quickly locating similar historical work order vectors along the graph path; the retrieval results are concatenated with the knowledge graph query results and input into a fine-tuned large language model. This approach significantly improves vector retrieval speed and supports real-time semantic matching under large-scale historical data.

Claims

1. An intelligent power work order generation system based on a large language model, characterized in that, It includes a data acquisition module, a preprocessing module, a knowledge graph construction module, a vectorization module, a model training module, a security measure generation module, and a verification output module; The data acquisition module is configured to obtain substation equipment ledgers, historical work order records, maintenance plan documents, and safety management specification texts from the power grid resource business platform and historical database, generate raw datasets, and transmit them to the preprocessing module. The preprocessing module is configured to receive the raw dataset, perform data cleaning, word segmentation and stemming, and output structured data to the knowledge graph construction module. The knowledge graph construction module is configured to receive structured data, use a graph database to store device entities and device topology relationships, construct a substation equipment knowledge graph, and transmit the substation equipment knowledge graph to the vectorization module. The vectorization module is configured to receive a knowledge graph of substation equipment, extract text information from the knowledge graph, convert the text information into text vectors using the embedding layer of a pre-trained large language model, store the text vectors in a vector database, and output the vectorized index to the model training module. The model training module is configured to receive structured data corresponding to the vectorized index and the historical work ticket records output by the preprocessing module, and to optimize the pre-trained large language model by incremental pre-training and efficient parameter fine-tuning, and output the fine-tuned large language model to the security measure generation module. The safety measures generation module is configured to receive the maintenance work task description input by the user, and generate preliminary safety measures text based on the vector database, vectorized index and substation equipment knowledge graph through a fine-tuned large language model and transmit it to the verification output module. The verification output module is configured to receive the preliminary safety measures text, obtain the safety management specification text from the substation equipment knowledge graph, perform semantic matching between the preliminary safety measures text and the safety management specification text, and output the standardized work order safety measures.

2. The intelligent power work order generation system based on a large language model according to claim 1, characterized in that, The data acquisition module obtains data through a preset application programming interface (API). The API runs in a timed task scheduling mode and parses the acquired JSON and XML data to obtain the substation equipment ledger, the historical work order records, the maintenance plan document, and the safety management specification text. The safety measure generation module retrieves historical work order text vectors similar to the maintenance task description through the vector database and the vectorized index, and queries the equipment relationships related to the maintenance task description from the substation equipment knowledge graph. The retrieved historical work order text vectors and the queried equipment relationships are input into the fine-tuned large language model to generate preliminary safety measure text. The verification output module obtains the safety management specification text from the substation equipment knowledge graph, performs semantic matching between the preliminary safety measures text and the safety management specification text, and outputs standardized work order safety measures.

3. The intelligent power work order generation system based on a large language model according to claim 2, characterized in that, The preprocessing module performs data cleaning, including identifying and removing special characters through regular expression pattern matching, processing missing value fields using mean interpolation or K-nearest neighbor algorithm, and identifying duplicate records based on field similarity calculation and performing deduplication. The preprocessing module performs terminology standardization on the raw dataset after data cleaning, including constructing a professional terminology mapping dictionary in the power field, identifying synonyms through a string fuzzy matching algorithm, and uniformly replacing the identified synonyms with standard terms. The preprocessing module performs word segmentation on the standardized terminology dataset, optimizes the word segmentation accuracy using a professional dictionary in the power field, performs stemming on the word segmentation results to remove word variant suffixes, and outputs structured data to the knowledge graph construction module.

4. The intelligent power work order generation system based on a large language model according to claim 3, characterized in that, The knowledge graph construction module extracts equipment entities from the structured data, including identifying transformer entities, circuit breaker entities, and protection device entities through entity recognition algorithms, and establishing a unique identifier mapping table for equipment entities; The knowledge graph construction module parses the device topology relationships between the device entities, including analyzing the electrical connection relationship graph to establish the connection path between devices, parsing the protection logic association relationship to establish the correspondence between the protection device and the protected device, and quantifying the electrical parameters of the connection relationship and the action characteristics of the protection association. The knowledge graph construction module stores the device entities and their topological relationships in the graph database in the form of triples, including constructing a triple structure, establishing a triple index to optimize query efficiency, and realizing relational reasoning and path query functions in the graph database.

5. The intelligent power work order generation system based on a large language model according to claim 4, characterized in that, The vectorization module extracts text information from the substation equipment knowledge graph, including extracting equipment entity description text and topology relationship description text, integrating safety management specification text clauses, and constructing a text corpus; The vectorization module uses the BERT model encoder to vectorize the text information, including word segmentation and position encoding of the input text, calculation of text representation through multi-head self-attention mechanism, and extraction of the hidden state of the [CLS] tag as text vector; The vectorization module constructs a vectorized index based on the text vectors, including organizing the vector space using a hierarchical navigable small-world graph algorithm, establishing an approximate nearest neighbor search index structure, and completing fast vector retrieval based on cosine similarity.

6. The intelligent power work order generation system based on a large language model according to claim 5, characterized in that, The model training module performs incremental pre-training on the pre-trained large language model, including inputting a corpus of the power industry into the pre-trained large language model to expand the vocabulary, adjusting the attention weight distribution based on the expanded vocabulary, and continuing to train the embedding layer and Transformer layer of the pre-trained large language model using power industry text. After completing the incremental pre-training, the model training module performs efficient parameter fine-tuning on the incrementally pre-trained large language model, including injecting a LoRA adapter into the linear layer of the pre-trained large language model, freezing the original parameters of the pre-trained large language model, training only the low-rank matrix in the LoRA adapter, updating the parameters of the low-rank matrix through gradient backpropagation, and obtaining the fine-tuned large language model.

7. The intelligent power work order generation system based on a large language model according to claim 6, characterized in that, The safety measures generation module queries equipment relationships from the substation equipment knowledge graph, including parsing the connection relationship between the maintenance equipment and adjacent equipment, identifying the association relationship between the protection device and the maintenance equipment, and determining isolation requirements and safety distance parameters. The security measure generation module concatenates the queried device relationships with the retrieved historical work order text vectors into an input sequence, and inputs the input sequence into the fine-tuned large language model. The fine-tuned large language model encodes the input sequence, analyzes the device status and risk type, and generates preliminary safety measures text including specific operation instructions.

8. The intelligent power work order generation system based on a large language model according to claim 7, characterized in that, The verification output module uses a rule engine to verify the preliminary security measures text, including using regular expressions to match the isolation flag format, verifying the integrity of security terms through keyword extraction, and comparing the mandatory requirements clauses in the security management specification text. When the verification finds a semantic mismatch, the verification output module reconstructs the input prompt content, including adding missing safety specification clauses to the prompt content, correcting logical errors in the device relationship description, and supplementing missing risk identification items. The verification output module inputs the reconstructed prompt content into the fine-tuned large language model to regenerate the corrected security measure text that meets the semantic matching requirements.

9. The intelligent power work order generation system based on a large language model according to claim 8, characterized in that, The structured data output by the preprocessing module is transmitted to the knowledge graph construction module through a data pipeline and a RESTful application programming interface. The substation equipment knowledge graph constructed by the knowledge graph construction module is transmitted to the vectorization module through a data pipeline and a RESTful application programming interface. The vectorized index generated by the vectorization module is transmitted to the model training module through a data pipeline and a RESTful application programming interface. The fine-tuned large language model output by the model training module is transmitted to the security measure generation module through a data pipeline and a RESTful application programming interface. The preliminary security measures text generated by the security measures generation module is transmitted to the verification output module through a data pipeline and a RESTful application programming interface.

10. A method for intelligent generation of power work permits based on a large language model, applied to the intelligent generation system for power work permits based on a large language model as described in any one of claims 1 to 9, characterized in that, include: Step 1: Obtain substation equipment ledgers, historical work order records, maintenance plan documents, and safety management specification texts from the power grid resource business platform and historical database to generate the original dataset; Step 2: Perform data cleaning, word segmentation, and stemming on the original dataset to obtain structured data; Step 3: Utilize a graph database to store equipment entities and equipment topology relationships in structured data, and construct a substation equipment knowledge graph that includes equipment entities, equipment topology relationships, and safety management specification texts; Step 4: Extract text information from the substation equipment knowledge graph, use the embedding layer of the pre-trained large language model to convert the text information into text vectors, store the text vectors in the vector database, and generate a vectorized index. Step 5: Combining the vectorized index with the structured data corresponding to the historical work ticket records obtained in Step 2, the pre-trained large language model is optimized using incremental pre-training and efficient parameter fine-tuning to obtain the fine-tuned large language model. Step 6: Receive the maintenance task description input by the user, retrieve historical work ticket text vectors similar to the maintenance task description through the vector database and vectorized index, and query the equipment relationships related to the maintenance task description from the substation equipment knowledge graph. Input the retrieved historical work ticket text vectors and the queried equipment relationships into the fine-tuned large language model to generate preliminary safety measures text. Step 7: Obtain the safety management specification text from the substation equipment knowledge graph, perform semantic matching between the preliminary safety measures text and the safety management specification text, and output the standardized work order safety measures.

Citation Information

Patent Citations

  • Work ticket safety measure generation method

    CN118365161A

  • Operation ticket generation method and device, equipment and storage medium

    CN119831527A

  • Electrical work ticket intelligent generation method and device, medium and equipment

    CN120911429A

  • Electrical work ticket safety measure intelligent checking method based on safety measure knowledge base

    CN121327191A