A power grid fault event extraction and knowledge graph construction method
By constructing a structural pattern indicator and a structured extraction language, combined with data augmentation and a dual-pointer network model, the efficiency and accuracy problems of power grid fault event extraction in existing technologies are solved. This enables intelligent extraction of power grid fault events and knowledge graph construction, improving the scientific nature of fault response and dispatch decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHWEST BRANCH OF STATE GRID POWER GRID CO
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies lack methods to automatically and efficiently extract key elements of power grid fault events from massive amounts of unstructured fault text. The identification of event trigger words and argument roles relies on rule matching, which has weak generalization ability and is difficult to deal with complex and nested fault event descriptions, thus failing to provide structured and reasonable knowledge support for fault handling decisions.
By employing structural pattern indicators and structured extraction language, combined with data augmentation strategies and masked language models, a dual-pointer network model is built to extract fault events and construct a knowledge graph. The initial dataset is obtained through manual annotation, the sample size is expanded, and the model is fine-tuned to achieve accurate extraction of event elements and construction of the knowledge graph.
It significantly improves the generalization ability and adaptability of event element extraction, enhances the robustness of the model under complex fault texts, and the constructed knowledge graph provides structured knowledge support for fault retrieval, source analysis and intelligent scheduling, thereby improving the speed of fault response and the scientific nature of scheduling decisions.
Smart Images

Figure CN122432318A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information extraction, and in particular relates to a method for extracting power grid fault events and constructing a knowledge graph. Background Technology
[0002] With the large-scale grid connection of new energy sources, the uncertainty and volatility of power system operation have significantly increased. Grid faults exhibit stronger spatiotemporal coupling and cascading evolution characteristics, and the cascading effects and diffusion risks of faults are rising simultaneously. In traditional grid fault handling models, dispatchers need to manually extract fault events from a large amount of unstructured text such as fault reports, equipment status monitoring, and historical cases, and then manually annotate, analyze, and make handling decisions based on their own experience and established procedures. This process is highly dependent on the dispatcher's personal experience, and different personnel may have different understandings and handling methods for the same event, making it difficult to ensure the consistency and reliability of handling decisions. At the same time, fault handling procedures and emergency plans are usually based on fixed rules, resulting in low rule matching efficiency. Moreover, with the continuous increase in fault types and causes, existing solutions are unable to cover all possible fault scenarios.
[0003] In the context of new power systems, the types and modes of occurrence of power grid faults have become more complex and diverse, with new fault forms such as simultaneous failures of multiple devices and transient faults caused by external environments constantly emerging. Traditional manual review and rule-based decision-making methods can no longer meet the practical needs of rapid response and accurate decision-making. The main problems with existing technologies are: the lack of a method to automatically and efficiently extract key elements of events from massive amounts of unstructured fault text; the identification of event trigger words and argument roles relies on rule matching, which has weak generalization ability and is difficult to handle complex and nested fault event descriptions; and it cannot provide structured and reasonable knowledge support for subsequent fault handling decisions. Therefore, there is an urgent need for a method that can intelligently extract power grid fault events and construct knowledge graphs to improve emergency response speed and the scientific nature of dispatch decisions. Summary of the Invention
[0004] The purpose of this invention is to provide a method for extracting power grid fault events and constructing a knowledge graph based on general information extraction, so as to overcome the problem that the efficiency of event element extraction depends on rule matching.
[0005] To achieve the above objectives, this invention provides a method for extracting power grid fault events and constructing a knowledge graph, comprising: Manually annotate the event text to obtain an initial annotated dataset; Based on the initial labeled dataset, construct a structural pattern indicator and a structured extraction language; Based on the structural pattern indicator and the structured extraction language, a data augmentation strategy is used to expand the sample size and construct a fine-tuned dataset; Based on the fine-tuned dataset, a basic model is built using a masked language model as the encoder and a dual-pointer network as the decoder. The basic model is then fine-tuned to obtain a dedicated fault event extraction model. Based on the dedicated fault event extraction model and the structural pattern indicator, key elements are extracted from the event text, and a fault event knowledge graph is constructed based on the extraction results.
[0006] Preferably, the process of obtaining the initial labeled dataset includes: Classify and selectively filter event text documents, retaining only the core documents related to the fault events; The filtered documents are preprocessed according to their format and then uniformly converted to the correct format. A predefined annotation system clarifies the category definitions and boundary delineations of event trigger words and event argument roles; The text is manually annotated according to the aforementioned annotation system; Export, organize, and validate the labeled event text to obtain a structured labeled dataset.
[0007] Preferably, the process of constructing the structural pattern indicator and the structured extraction language includes: Design a pattern structure that includes event trigger words and event argument roles for fault event extraction tasks; By concatenating the event prompt symbol with the pattern structure, a structural pattern indicator is constructed. The event trigger words and event arguments in the event text are constructed into a structured extraction language in a structured form.
[0008] Preferably, the process of constructing the fine-tuning dataset includes: For entities in specialized fields, a protected text mask region is generated and locked during the data augmentation process to prevent modification. For entities outside their professional domain, controlled perturbations can be introduced using large language models to increase sample diversity. A generation strategy that combines prompt words and JSON template output constraints is adopted to generate fault event samples that conform to the knowledge logic of the power industry.
[0009] Preferably, the process of generating the protected text mask region includes: Parse the original labeled data and extract the character index ranges of all labeled core entities; The labeled interval sets are merged to generate a protected text mask region.
[0010] Preferably, during the data augmentation process, an offset mapping table is maintained through dynamic coordinate mapping to align the starting position of the augmented entity annotation with the original character position.
[0011] Preferably, the process of introducing the controlled perturbation includes: Construct a thesaurus containing conjunctions and adverbs in the power industry, and perform synonym replacement based on the domain dictionary; A random replacement strategy is implemented for diverse time formats. Time description information is located by regular expression matching and randomly converted into multiple time formats. Optimize the format and expand the content for regional entities to generate differentiated descriptions.
[0012] Preferably, the process of building the basic model includes: The knowledge-enhanced masked language model ERNIE 3.0 is used as the encoder to perform deep semantic encoding on the text; A dual-pointer decoder is used to decode the encoded vector. The word vectors are predicted in two parallel branches to predict the start and end positions of the word vectors in the text. The output is then filtered according to the output threshold to obtain structured output.
[0013] Preferably, the process of fine-tuning the basic model includes: The fine-tuning dataset is input into the base model, and the model parameters are fine-tuned according to the fine-tuning dataset. Under the guidance of given prompts, the model learns the start and end boundary localization of the target arguments and obtains a dedicated fault event extraction model.
[0014] Preferably, the process of constructing the fault event knowledge graph includes: The event text to be extracted and the structural pattern indicator are input together into a dedicated fault event extraction model to obtain event trigger words and event arguments; A knowledge graph of fault events is constructed based on the extraction results.
[0015] Compared with the prior art, the present invention has the following advantages and technical effects: This invention unifies the event extraction task into a text-to-structure generation task by constructing a structural pattern indicator and a structured extraction language. This eliminates the need for fixed rule matching, significantly improving the generalization and adaptability of event element extraction. A data augmentation strategy combining entity protection and controlled perturbation effectively addresses the problem of sparse labeled data in the power sector, enhancing the model's robustness to complex fault texts. Based on a knowledge-enhanced pre-trained language model and a dual-pointer decoding network, precise localization of event trigger words and argument boundaries is achieved, maintaining high accuracy even in fault texts with nested entities and diverse expressions. Finally, the power grid fault event knowledge graph constructed based on the extraction results provides structured knowledge support for fault retrieval, source analysis, and intelligent scheduling reasoning. This effectively overcomes the excessive reliance on human experience in traditional models, improves rule matching efficiency, covers more novel fault scenarios, and enables rapid response to power grid fault events and scientific and intelligent scheduling decisions. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention; Figure 2 This is a diagram illustrating the architecture of a power grid fault event extraction model based on general information extraction, according to an embodiment of the present invention. Detailed Implementation
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0019] like Figure 1 As shown, this embodiment provides a method for extracting power grid fault events and constructing a knowledge graph, including: Manually annotate the event text to obtain an initial annotated dataset; Based on the initial labeled dataset, construct a structural pattern indicator and a structured extraction language; Based on the structural pattern indicator and the structured extraction language, data augmentation strategies are used to expand the sample size and construct a fine-tuned dataset; Based on the fine-tuned dataset, a basic model was built using a masked language model as the encoder and a dual-pointer network as the decoder. The basic model was then fine-tuned to obtain a dedicated fault event extraction model. Based on a dedicated fault event extraction model and structural pattern indicator, key elements are extracted from the event text, and a fault event knowledge graph is constructed based on the extraction results.
[0020] Specifically, in this embodiment, the proposed power grid fault event extraction method follows these steps: First, predefine event trigger words and argument roles, manually annotate the event text, and obtain an initial dataset. Second, construct a structural pattern indicator and a structured extraction language. The pattern indicator includes an event schema (event trigger words + argument roles) and a sequence of texts to be processed. The structured extraction language includes formatted event trigger words and event arguments. Then, expand the sample size using data augmentation strategies to construct a fine-tuned dataset. Use the ERNIE 3.0 model and a dual-pointer network as the encoder and decoder, respectively. Based on the fine-tuned dataset, fine-tune the Unified Information Extraction (UIE) model to construct an event extraction model. Finally, based on the structural pattern indicator, use the event extraction model to extract fault event text, obtain key elements, and construct a fault event knowledge graph.
[0021] Furthermore, the process of obtaining the initial labeled dataset includes: Classify and selectively filter event text documents, retaining only the core documents related to the fault events; The filtered documents are preprocessed according to their format and then uniformly converted to the correct format. A predefined annotation system clarifies the category definitions and boundary delineations of event trigger words and event argument roles; The text is manually annotated according to the annotation system; Export, organize, and validate the labeled event text to obtain a structured labeled dataset.
[0022] Furthermore, in this embodiment, the event text is manually annotated to obtain an initial dataset; wherein, the event text is: internal fault event report and contingency plan of power enterprise; Specifically, this embodiment uses the Doccnao tool to annotate the original event text, including: Classify and selectively filter event text documents, retaining only the core documents related to the fault events; To address the diverse formats of the filtered documents, preprocessing was performed according to format classification, and all types of text information were uniformly converted into TXT format; A predefined annotation system clarifies the category definitions and boundary delineations of event trigger words and event argument roles.
[0023] The fault event text was manually annotated according to the annotation system; After exporting the labeled event text, organize and verify it to form a structured labeled dataset suitable for UIE model training, validation and testing.
[0024] More specifically, in this embodiment, the core application scenario for extracting key elements of power grid fault events is to transform multi-source original documents within power companies into standardized, high-quality power corpus that can support subsequent knowledge extraction, thus laying a data foundation for the construction of a knowledge base in the power field.
[0025] First, the original power grid fault event texts are categorized and selectively filtered. The goal of this filtering is to retain documents that are directly related to the fault event and contain core information. Using predefined rules and criteria, the fault event texts are filtered from a large amount of data, eliminating irrelevant or redundant content, such as equipment operation reports that do not involve faults or records of non-real-time events. Filtering criteria may include, but are not limited to: the completeness of the event description, the included equipment information, and the clarity of the event type. Ultimately, this ensures that the filtered documents contain only content directly related to the power grid fault event.
[0026] Because power grid failure event documentation comes from a wide range of sources, including reports, logs, and historical records in various formats, these documents exhibit diverse formats and contain a wealth of structured and unstructured information. Therefore, it is necessary to classify and preprocess the selected documents to account for their diverse formats. The specific steps are as follows: Classified by format: Documents are categorized and processed according to their original format (such as PDF, Word, Excel, etc.). Different document formats may require different parsing methods during processing.
[0027] Standardized Format Conversion: All documents are uniformly converted to TXT format for easier subsequent processing and annotation. For complex formats (such as documents containing tables or images), the text content is extracted, cleaned, and corrected to ensure that the converted TXT format retains all key information and eliminates formatting redundancy.
[0028] To ensure the accuracy and consistency of annotations, an annotation system needs to be predefined. The annotation system includes the following aspects: Event trigger words: Identify the trigger words for each event (such as "trip", "outage", "abnormality", etc.). These trigger words are signal words for the occurrence of fault events.
[0029] Event Argument Roles: Define corresponding argument roles for each event, including but not limited to faulty equipment, fault phenomenon, fault cause, fault occurrence time, and fault handling measures. Each role has clear boundary delineation rules; for example, "faulty equipment" refers to the electrical equipment that has failed, and "fault cause" refers to the specific reason that caused the failure.
[0030] Boundary delineation rules: Define clear rules for the boundaries of each event and its elements so that the start and end positions in the text can be accurately identified during manual annotation.
[0031] The filtered text is manually annotated according to a predefined annotation system. This manual annotation is performed by professional annotators, each of whom marks each fault event in the text according to the annotation system. Annotators extract and annotate key elements for each event, such as event trigger words, event argument roles, and their boundaries. After annotation, all annotated text is exported, validated, and cleaned. The processed annotated data is then transformed into a structured dataset suitable for the UIE model. This data will be used for training, validation, testing, and data augmentation of the UIE model.
[0032] Furthermore, the process of constructing the structural pattern indicator and the structured extraction language includes: Design a pattern structure that includes event trigger words and event argument roles for fault event extraction tasks; By concatenating event prompt symbols with pattern structures, a structural pattern indicator is constructed. The event trigger words and event arguments in the event text are constructed into a structured extraction language in a structured form.
[0033] Furthermore, this embodiment constructs a Structure Schema Indicator (SSI) and a Structured Extraction Language (SEL); wherein, the schema indicator includes: an event schema (event trigger words + argument roles) and a sequence of text to be processed; the structured extraction language includes: formatted event trigger words and event arguments; Specifically, the construction of a structural pattern indicator and a structured extraction language includes: A specific schema construction is designed for the fault event extraction task. The schema includes event trigger words and event argument roles. By concatenating the event prompt symbols [event], [arguments], and [text] with the Schema, a structural schema indicator is constructed.
[0034] The specific event trigger words and event arguments in the event text are constructed into a structured extraction language (SEL) in a structured form, which contains specific types of semantic information. More specifically, in this embodiment, a structural pattern indicator and a structured extraction language are constructed to prepare a corpus for UIE model pre-training. SSI is essentially a schema-based prompt mechanism used to control different generation requirements. UIE, as a unified information extraction framework, transforms event extraction tasks into prompt-based generative tasks. It only requires defining an event schema (event trigger words + argument roles) and inputting it along with the text sequence to be processed into the model to achieve end-to-end event extraction. A complete fault event in a power scenario consists of multiple event triples, each containing three elements: an event trigger word, a relation, and an event argument. The event prompt symbols [event], [arguments], and [text] are concatenated with the schema to construct a structural pattern indicator. The format of SSI is as follows: The Structured Extraction Language (SEL) is used to unify the encoding of heterogeneous extraction structures, that is, to encode entities, relations, and events in a unified way. The format of SEL is as follows: The information corresponding to the event in the outermost brackets is the type of power event and trigger words (such as scenario trigger words for fault tripping, equipment maintenance, etc.). The multiple entries in the inner layer correspond to various argument fragments under the power event (such as regional power grid, equipment name, fault time, fault status, etc.).
[0035] Furthermore, the process of constructing the fine-tuning dataset includes: For entities in specialized fields, a protected text mask region is generated and locked during the data augmentation process to prevent modification. For entities outside their professional domain, controlled perturbations can be introduced using large language models to increase sample diversity. A generation strategy that combines prompt words and JSON template output constraints is adopted to generate fault event samples that conform to the knowledge logic of the power industry.
[0036] Furthermore, the process of generating the protected text mask region includes: Parse the original labeled data and extract the character index ranges of all labeled core entities; The labeled interval sets are merged to generate a protected text mask region.
[0037] Furthermore, during the data augmentation process, an offset mapping table is maintained through dynamic coordinate mapping to align the starting position of the augmented entity annotation with the original character position.
[0038] Furthermore, the process of introducing controlled perturbations includes: Construct a thesaurus containing conjunctions and adverbs in the power field, and perform synonym replacement based on the domain dictionary; Implement a random replacement strategy for diverse time formats, locate time description information through regular matching, and randomly convert it into multiple time formats; Optimize the format and expand the content of region - related entities to generate differentiated expressions.
[0039] Even further, this embodiment adopts a data augmentation strategy to expand the sample size and constructs a fine - tuning dataset, including: For entities in the professional field, generate protected text mask regions. During subsequent augmentation processes, these regions are strictly locked and prohibited from any form of modification, insertion, or deletion; For non - professional field entities, introduce controlled perturbations to the labeled data with the help of the DeepSeek large - language model to increase the diversity of samples.
[0040] A generation strategy guided by prompts and constrained by JSON template output is designed.
[0041] Based on the above method, generate fault event samples with diverse styles and conforming to the knowledge logic of the power field, effectively expanding the coverage and diversity of the dataset.
[0042] More specifically, in this embodiment, a data augmentation strategy is adopted to expand the sample size for augmenting a larger - scale training corpus. The core entities in power fault texts (such as the substation name "Haohe Substation", equipment parameter "330 kV", operation term "tripping") carry key semantic information, and traditional full - text synonym replacement is likely to damage power - specific terms. Therefore, this invention first analyzes the original labeled data and extracts the character index intervals of all labeled core entities . To handle the cases of nested entities or adjacent entities, the algorithm merges the labeled interval sets to generate protected text mask regions. During subsequent augmentation processes, these regions are strictly locked and prohibited from any form of modification, insertion, or deletion. The core difficulty of text augmentation lies in the re - positioning of entity labels and start positions after text length changes. Since synonym replacement and format adjustment will cause changes in the string length, the original entity indexes cannot accurately match the labeled entities. Therefore, a dynamic coordinate mapping method is adopted to achieve precise alignment by maintaining an offset mapping table . The calculation formula is as follows: where, the change amount of the non - entity fragment length ,in The length of the original non-entity fragment. To enhance the length of the enhanced fragment, the length of the entity fragment is always zero due to protection mechanisms, and therefore does not need to participate in offset accumulation. By accumulating historical offsets, it is ensured that the starting position of the enhanced entity annotation still accurately points to the original character position.
[0043] In non-specialized entity regions, controlled perturbations are introduced into the labeled data using the DeepSeek large language model to increase sample diversity. A thesaurus containing commonly used conjunctions and adverbs in the power industry is constructed, and synonym replacement is performed based on a domain dictionary. The algorithm scans non-specialized entity regions and performs random replacements according to the word length priority matching principle to simulate the recording styles of different dispatchers. Secondly, a random replacement strategy is implemented for diverse time formats. Given the heterogeneity of time expression formats in fault records, the algorithm accurately locates time description information in the text through regular expression matching, generates multi-dimensional time formats and time nodes based on the DeepSeek model, and randomly converts them into various forms such as "YYYY-MM-DD", "YYYY / MM / DD", and Chinese ideographic formats to enhance the model's robustness to different time expression paradigms. At the same time, for regional entities, the DeepSeek model is used to optimize the format and expand the content, generating differentiated expressions by refining the address hierarchy and expanding the address granularity, effectively improving the diversity and coverage of sample entities.
[0044] Building upon this foundation, and addressing the requirements for constructing a power grid fault event dataset, a generation strategy involving prompt words and JSON template output constraints was further designed. First, structured prompt words were customized, incorporating core elements such as fault type, occurrence time, faulty equipment, and handling measures, based on the professional expression paradigm of power dispatch text. Second, a standardized JSON output template was developed according to the labeled "SSI+Result+TXT" sample format, standardizing the field format and hierarchical relationships of the DeepSeek-generated data. Finally, leveraging the text generation capabilities of the DeepSeek model, fault event samples with diverse styles and conforming to the knowledge logic of the power sector were generated, effectively expanding the dataset's coverage and diversity. Based on these methods, the original small sample dataset was expanded. One to four different enhanced versions were generated for each original data point. A random seed was set to ensure the reproducibility of the enhancement process. The final constructed dataset not only retains the core semantic structure of the original data but also significantly enriches the sentence structure and vocabulary, laying a data foundation for subsequent training of a high-precision UIE event extraction model.
[0045] Furthermore, the process of building the basic model includes: ERNIE 3.0 is used as the encoder to perform deep semantic encoding on the text; A dual-pointer decoder is used to decode the encoded vector. The word vectors are predicted in two parallel branches to predict the start and end positions of the word vectors in the text. The output is then filtered according to the output threshold to obtain structured output.
[0046] Furthermore, such as Figure 2 As shown, this embodiment uses a masked language model and a two-pointer network as the encoder and decoder for Unified Information Extraction (UIE); wherein, the masked language model is the knowledge-enhanced pre-trained language model ERNIE 3.0; Specifically, this embodiment uses a masked language model and a two-pointer network as the encoder and decoder of the UIE, including: The model uses ERNIE 3.0 as its encoder and leverages its self-supervised learning paradigm to achieve an understanding of deep semantic information in the text.
[0047] A dual-pointer decoder is used to decode the encoded vector. Two parallel branches are used to predict the start and end positions of the current word vector in the text, and the output is filtered according to the output threshold to achieve structured output for the event extraction task.
[0048] More specifically, in this embodiment, ERNIE 3.0 and a two-pointer network are used as the encoder and decoder of UIE to improve the original UIE structure and enhance event extraction performance. Given an original text sequence... and pattern structure guide ,Will As the input to the encoder, it is shown below: It is a Transformer-based encoder. It is fed into the Transformer module and encoded using a self-attention mechanism.
[0049] get Encoding vector Next, it needs to be decoded. The input is processed through the large-scale pre-trained model ERINE 3.0 to obtain a deep semantic representation of the text. Then, information extraction is achieved by combining a two-pointer network decoder. The two-pointer decoder contains two parallel fully connected layers and a softmax function. The two parallel branches predict the start and end positions of the current word vector in the text, respectively, and filter based on the output threshold. Since UIE is a prompt-based information extraction model, for a given sample, different prompts are used to extract the text. Multiple decoding operations are performed to predict the start and end positions of different entities. For word vectors... The probability calculation formulas for the start and end positions based on the Prompt are as follows: In the formula, and These are the weights and biases of the initial fully connected layer; and These are the weights and biases that terminate the fully connected layer.
[0050] In the decoding of the first In this step, the model generates the first SEL sequence. a mark and decoder state As shown below: When the decoder predicts the tag conditional probability At that time, the prediction was completed. The prediction result is finally determined by outputting the end symbol, and then the predicted SEL expression is converted into the extracted target structured information record.
[0051] Furthermore, the process of fine-tuning the basic model includes: Input the fine-tuning dataset into the base model, and fine-tune the model parameters based on the fine-tuning dataset. Guided by given prompts, the model learns the start and end boundary localization of target arguments, thus obtaining a dedicated fault event extraction model.
[0052] Furthermore, the process of constructing a fault event knowledge graph includes: The event text to be extracted and the structural pattern indicator are input together into a dedicated fault event extraction model to obtain event trigger words and event arguments; A knowledge graph of fault events is constructed based on the extraction results.
[0053] Furthermore, this embodiment fine-tunes the UIE model based on the fine-tuning dataset to construct a key element extraction model for fault events; Specifically, the augmented fine-tuned dataset is input into the UIE model, which then fine-tunes its parameters based on the dataset. Guided by given prompts, the model learns to locate the start and end boundaries of target arguments and constructs an event extraction model.
[0054] More specifically, in this embodiment, the UIE model is fine-tuned based on the fine-tuning dataset to construct a model adapted for power grid fault event extraction. To improve the model's performance in the field of power fault information extraction, SSI (Service Suggestion Indicator) is used to highlight the focus of the fine-tuning model, helping the model learn event arguments in fault-related texts and their positions within the text. For a given labeled corpus... ,in It is the task-to-schema. This is the original text. The information structure to be extracted; event extraction requires learning the argument boundary localization given cues; loss function. for: Among them, the initial position loss Loss at the end position The calculation formula is as follows: In the formula, Represents the cross-entropy loss function. Indicates the predicted starting position of the entity. Indicates the actual starting position of the entity; Indicates the predicted end position of the entity. Indicates the actual end position of the entity.
[0055] Furthermore, this embodiment uses a structural pattern indicator to extract key elements from event text and construct a fault event knowledge graph.
[0056] Specifically, the event text to be extracted and the structural pattern indicator are input into the fine-tuned UIE model to obtain the event trigger words and event arguments of the event text, and a fault event knowledge graph is constructed based on the extraction results.
[0057] More specifically, in this embodiment, the structural pattern indicator and event text are concatenated and input into the UIE model to obtain key elements in the event and construct a fault event knowledge graph. The specific extraction formula can be expressed as follows: in, Represents a structural pattern guide. This represents a text sequence of fault records (TXT) to be processed. For splicing symbols, The semantic unit extraction results in SEL form consist of event trigger words and argument roles. Special symbols ([event], [arguments], [text]) are added before each event, argument, and input text. A structure pattern guide is then applied. With the original text spliced together : This structural schema guides the event extraction model to identify event types and relevant arguments from input text. A specific schema construction was designed for the power grid fault report event extraction scenario. The model's output is described using SEL, which includes linguistic information for specific event types, as shown in the following formula: After obtaining the key elements of an event, the raw elements extracted by the key element extraction model are mostly derived from unstructured texts such as maintenance reports, dispatch logs, and fault notifications. These elements commonly suffer from problems such as inconsistent terminology, non-standard formats, redundant information, and ambiguity, which seriously affect the accuracy and standardization of subsequent graph construction. To address this, a multi-dimensional element standardization process was constructed. First, based on core element categories such as fault subject, fault occurrence / recovery time, fault type, handling measures, and implementing entity, a dedicated power fault terminology dictionary was established by integrating authoritative external knowledge bases in the power industry (such as power grid equipment standard libraries and power terminology specification sets) with custom business specifications. This dictionary uniformly replaces the extracted non-standard key elements with standardized terms, avoiding ambiguity from the source. Second, the format of key elements was standardized, and unified specifications were formulated for different types of elements. Time elements are strictly entered using the format "YYYY-MM-DD HH:MM:SS" to ensure consistency and traceability in the time dimension; equipment parameters are uniformly standardized in the format of "parameter name + value + unit", such as "rated current 315A" and "insulation resistance 200MΩ"; voltage levels are uniformly expressed using " The format is "kV" (e.g., 110kV, 220kV), avoiding mixed expressions such as "kilovolt" and "kV". Based on this, a rule-based matching algorithm and a large language model collaborative verification mechanism are used to accurately resolve issues such as time conflicts for the same fault, repeated labeling of fault phenomena, and contradictory element attributes, ultimately forming a standardized and high-precision fault element dataset. Furthermore, addressing the issue of missing key elements in fault event texts, such as only mentioning the line name without specifying the corresponding regional power grid, the power organization to which the equipment belongs, the line's origin and end points, or the maintenance responsibility unit, external knowledge bases such as power grid topology are used to supplement missing information through attribute association matching algorithms, improving the element attribute dimensions. Simultaneously, to ensure industry compliance and uniformity in fault classification, fault type mapping rules are established based on the fault classification standards in the "Northwest Power Grid Dispatch Control Management Regulations," uniformly mapping various extracted fault types to the standard categories specified in the regulations, thus achieving standardized fault classification.
[0058] Finally, the standardized, completed, and normalized mapped elements and their relationships are structured and organized, transforming discrete key elements into "subject-predicate-object" triples that conform to knowledge graph specifications. This constructs a power fault event knowledge graph covering the entire fault process, providing solid structured knowledge support for subsequent fault source analysis, intelligent scheduling reasoning, and other applications, and helping the power grid fault management to transform towards intelligence and precision.
[0059] This embodiment first predefines event trigger words and argument roles, manually annotates the event text, and annotators annotate each event in the text according to the predefined trigger words and role categories, extract the key information of the event, export and organize it to build the initial dataset.
[0060] This embodiment first constructs a structural pattern indicator and a structured extraction language. The structural pattern indicator includes an event schema and a sequence of text to be processed. The event schema is a framework describing the structure of an event, specifically including event trigger words and event argument roles. It provides the model with clear structural guidance, helping the model identify and extract different types of event elements. The structured extraction language, through a formatted annotation language for event trigger words and event arguments, achieves the transformation from unstructured text to structured information, ensuring a more accurate and efficient event extraction process.
[0061] This embodiment first employs data augmentation strategies to expand the sample size and construct a fine-tuned dataset; it then uses the ERNIE 3.0 model and a dual-pointer network as the encoder and decoder of UIE; based on the fine-tuned dataset, the UIE model is fine-tuned to construct an event extraction model. This embodiment first uses the aforementioned structural pattern indicator and the event extraction model to extract key elements from the event text. The extracted information will be used to construct a power grid fault event knowledge graph. Through the knowledge graph, different elements of power grid fault events and the relationships between them can be systematically displayed, thereby providing structured knowledge support for fault retrieval, emergency decision-making, and power grid fault handling, improving fault response efficiency and accuracy.
[0062] As a preferred implementation, this embodiment is implemented using Python 3.12.12, with Ubuntu 22.04.2LTS operating system, 4×3090 GPU, ERNIE 3.0 encoder, and a dual-pointer decoder. Figure 1 As shown, the method process of this embodiment is as follows.
[0063] Step 1: Use the Doccnao tool to annotate the original event text; Step 1.1: Classify and target the event text documents, retaining the core documents of the fault events; Step 1.2: To address the diverse formats of the filtered documents, preprocessing is performed according to format classification, and all types of text information are uniformly converted into TXT format; Step 1.3: Predefine the annotation system, clarifying the category definitions and boundary divisions of event trigger words and event argument roles; Step 1.4: Manually annotate the imported text according to the aforementioned annotation system; Step 1.5: Export the labeled event text, organize and verify it to form a structured labeled dataset suitable for UIE model training, validation and testing.
[0064] Step 2: Construct a structural pattern indicator and a structured extraction language; Step 2.1: Design a specific schema structure for the fault event extraction task. The schema includes event trigger words and event argument roles. Step 2.2: Concatenate the event prompt symbols [event], [arguments], and [text] with the Schema to construct a structural schema indicator; Step 2.3: Construct a structured extraction language (SEL) from the specific event trigger words and event arguments in the event text in a structured form. The SEL contains specific types of semantic information.
[0065] Step 3: Expand the sample size using data augmentation strategies to construct a fine-tuned dataset; Step 3.1: For domain-specific entities, generate protected text mask regions. During subsequent enhancement processes, these regions are strictly locked, prohibiting any form of modification, insertion, or deletion. Step 3.2: For entities outside the professional domain, use the DeepSeek large language model to introduce controlled perturbations into the labeled data, thereby increasing the diversity of samples; Step 3.3: Using a generation strategy that incorporates prompts and JSON template output constraints, a dataset conforming to the training sample format is generated.
[0066] Step 4: Use a masked language model and a two-pointer network as the encoder and decoder for UIE; Step 4.1: Use ERNIE 3.0 as the encoder of the model and rely on its self-supervised learning paradigm to achieve the understanding of deep semantic information of the text; Step 4.2: Use a dual-pointer decoder to decode the encoded vector, predict the start and end positions of the current word vector in the text through two parallel branches, and filter according to the output threshold to achieve structured output of the event extraction task; Step 5: Based on the fine-tuned dataset, fine-tune the UIE model and construct an event extraction model. Input the data-augmented fine-tuned dataset into the model to fine-tune the parameters. Guided by given prompts, learn the start and end boundary locations of target arguments and construct a power grid fault event extraction model.
[0067] Step 6: Based on the structure pattern indicator, extract the event text using the event extraction model to obtain key elements in the event and construct a fault event knowledge graph; input the event text to be extracted and the structure pattern indicator into the fine-tuned UIE model to obtain the event trigger words and event arguments of the event text, and construct a fault event knowledge graph based on the extraction results.
[0068] This embodiment proposes a power grid fault event extraction method based on general information extraction. The method achieves power grid fault event extraction through multi-stage optimization design. Its core advantages and implementation process are as follows: First, addressing the data sparsity characteristic of the power sector, this embodiment proposes a data augmentation strategy of "entity protection + controlled perturbation." Traditional data augmentation methods typically rely on large-scale labeled data, while power sector data often suffers from sample scarcity and incomplete labeling. Therefore, an "entity protection" strategy is adopted to ensure that important event entities are not corrupted, while a "controlled perturbation" method is used to appropriately perturb non-domain entities in the text, thereby expanding the diversity of samples. This strategy effectively increases the amount of training data and improves the model's generalization ability.
[0069] Secondly, this embodiment designs a Structured Event Pattern Indicator (SSI) and a structured extraction language, and combines the "SSI+TXT" prompt format to unify the event extraction task into a text-to-structure generation task. Specifically, the SSI guides the model to identify and extract key information from events, such as event trigger words, faulty equipment, fault phenomena, and occurrence time, by predefining the structured patterns of events. The structured extraction language provides a unified language framework to express the relationships between event elements. This structured prompting mechanism makes event extraction not only a process of extracting information, but also enables better text-to-structure conversion, thereby achieving more efficient fault event analysis.
[0070] Finally, this embodiment introduces ERNIE3.0 as the encoder of the information extraction model, combined with a two-pointer network decoding mechanism, to achieve the localization and extraction of the start and end boundaries of event arguments. ERNIE3.0, with its powerful pre-training capabilities and deep understanding of knowledge, can effectively capture the contextual relationships of power grid fault events, further improving the accuracy and robustness of event extraction. The two-pointer decoding method, through the dynamic sliding of two pointers, locates the start and end boundaries of events, solving the problem of inaccurate event boundary identification in traditional methods, especially in complex and diverse power grid fault event texts with nested entities. The power grid fault event knowledge graph constructed based on this method can provide structured knowledge support for fault retrieval and handling decisions.
[0071] In summary, this embodiment constructs an initial labeled dataset by manually annotating power grid fault event texts; designs a structural pattern indicator and a structured extraction language suitable for extracting key elements of power grid faults, clarifying the framework and rules for fault event information extraction; expands the sample quantity and diversity through data augmentation strategies to obtain a fine-tuned dataset for key information extraction adapted to power scenarios; builds a basic model for power fault event extraction using a knowledge-enhanced pre-trained language model and a dual-pointer network as the encoder and decoder, and completes model fine-tuning and optimization using the aforementioned fine-tuned dataset to obtain a dedicated fault event extraction model; uses the event extraction model to identify key elements of power grid fault events from the texts, and constructs a power grid fault event knowledge graph based on the extraction results. The event extraction model constructed in this invention can effectively support the extraction of key elements of fault events, assist dispatchers in quickly obtaining key information in complex scenarios, and improve the emergency response speed and the scientific nature of dispatch decisions for power grid fault events.
[0072] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for extracting power grid fault events and constructing a knowledge graph, characterized in that, include: Manually annotate the event text to obtain an initial annotated dataset; Based on the initial labeled dataset, construct a structural pattern indicator and a structured extraction language; Based on the structural pattern indicator and the structured extraction language, a data augmentation strategy is used to expand the sample size and construct a fine-tuned dataset; Based on the fine-tuned dataset, a basic model is built using a masked language model as the encoder and a dual-pointer network as the decoder. The basic model is then fine-tuned to obtain a dedicated fault event extraction model. Based on the dedicated fault event extraction model and the structural pattern indicator, key elements are extracted from the event text, and a fault event knowledge graph is constructed based on the extraction results.
2. The method according to claim 1, characterized in that, The process of obtaining the initial labeled dataset includes: Classify and selectively filter event text documents, retaining only the core documents related to the fault events; The filtered documents are preprocessed according to their format and then uniformly converted to the correct format. A predefined annotation system clarifies the category definitions and boundary delineations of event trigger words and event argument roles; The text is manually annotated according to the aforementioned annotation system; Export, organize, and validate the labeled event text to obtain a structured labeled dataset.
3. The method according to claim 1, characterized in that, The process of constructing the structural pattern indicator and the structured extraction language includes: Design a pattern structure that includes event trigger words and event argument roles for fault event extraction tasks; By concatenating the event prompt symbol with the pattern structure, a structural pattern indicator is constructed. The event trigger words and event arguments in the event text are constructed into a structured extraction language in a structured form.
4. The method according to claim 1, characterized in that, The process of constructing the fine-tuning dataset includes: For entities in specialized fields, a protected text mask region is generated and locked during the data augmentation process to prevent modification. For entities outside their professional domain, controlled perturbations can be introduced using large language models to increase sample diversity. A generation strategy that combines prompt words and JSON template output constraints is adopted to generate fault event samples that conform to the knowledge logic of the power industry.
5. The method according to claim 4, characterized in that, The process of generating the protected text mask region includes: Parse the original labeled data and extract the character index ranges of all labeled core entities; The labeled interval sets are merged to generate a protected text mask region.
6. The method according to claim 5, characterized in that, The method further includes: During data augmentation, an offset mapping table is maintained through dynamic coordinate mapping to align the starting position of the augmented entity annotation with the original character position.
7. The method according to claim 4, characterized in that, The process of introducing the controlled perturbation includes: Construct a thesaurus containing conjunctions and adverbs in the power industry, and perform synonym replacement based on the domain dictionary; A random replacement strategy is implemented for diverse time formats. Time description information is located by regular expression matching and randomly converted into multiple time formats. Optimize the format and expand the content for regional entities to generate differentiated descriptions.
8. The method according to claim 1, characterized in that, The process of building the basic model includes: The knowledge-enhanced masked language model ERNIE 3.0 is used as the encoder to perform deep semantic encoding on the text; A dual-pointer decoder is used to decode the encoded vector. The word vectors are predicted in two parallel branches to predict the start and end positions of the word vectors in the text. The output is then filtered according to the output threshold to obtain structured output.
9. The method according to claim 1, characterized in that, The process of fine-tuning the basic model includes: The fine-tuning dataset is input into the base model, and the model parameters are fine-tuned according to the fine-tuning dataset. Under the guidance of given prompts, the model learns the start and end boundary localization of the target arguments and obtains a dedicated fault event extraction model.
10. The method according to claim 1, characterized in that, The process of constructing the fault event knowledge graph includes: The event text to be extracted and the structural pattern indicator are input together into a dedicated fault event extraction model to obtain event trigger words and event arguments; A knowledge graph of fault events is constructed based on the extraction results.