Power grid accident information extraction method and device, storage medium and program product

CN122817455APending Publication Date: 2026-09-25HUIZHOU POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610846078.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

通过人工从电力人身安全事故报告中抽取电力事故的关键信息,以对电力行业进行安全管理的方式,繁琐且效率低下,难以满足现代电力系统对实时性、准确性和全面性的要求

Benefits of technology

[0051]本申请实施例提供的电网事故信息抽取方法、设备、存储介质及程序产品,通过获取电力事故文本,为电网事故信息抽取提供数据基础。将电力事故文本输入至电网事故抽取模型,在电网事故抽取模型中,通过识别电力事故文本中的电网事故关键信息实体的边界及类型,将非结构化的电力事故文本准确和高效的转化为结构化数据,进而准确、高效且全面的执行电网事故信息抽取的任务。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122817455A_ABST
    Figure CN122817455A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a power grid accident information extraction method and device, a storage medium and a program product. It relates to the technical field of power management. The power accident text is obtained; the power accident text is input into the power grid accident extraction model, and in the power grid accident extraction model, based on the learned power grid accident key information entity, the structured multi-dimensional power grid accident key information is extracted from the power accident text. The method is used to achieve the effect of accurate, efficient and comprehensive power grid accident information extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power management technology, and in particular to a method, device, storage medium and program product for extracting power grid accident information. Background Technology

[0002] The increasing frequency and variety of power accidents in industrial production and daily life, along with their expanding impact and rising occurrence, seriously endanger the personal safety of power industry workers and hinder safe production in enterprises. Therefore, safety management in the power industry is of great significance for ensuring personnel safety, stable power grid operation, and socio-economic development.

[0003] With the deep integration of smart grids and information technology, the power industry's safety management has entered a new stage of intelligence and data-driven approach. However, power-related personal safety accident reports typically contain a large amount of natural language text. Manually extracting key information from these reports for safety management is cumbersome and inefficient, failing to meet the real-time, accuracy, and comprehensive requirements of modern power systems.

[0004] Therefore, there is an urgent need for a scheme that can accurately, efficiently and comprehensively extract power grid accident information. Summary of the Invention

[0005] This application provides a method, device, storage medium, and program product for extracting power grid accident information, so as to achieve accurate, efficient, and comprehensive power grid accident information extraction.

[0006] In a first aspect, embodiments of this application provide a method for extracting power grid accident information, including:

[0007] Obtain power accident text;

[0008] The text of a power accident is input into the power grid accident extraction model. Based on the learned key information entities of the power grid accident, the model extracts structured, multi-dimensional key information of the power grid accident from the text.

[0009] In one possible implementation, the power grid accident extraction model is trained in the following way:

[0010] Acquire pre-trained models and power accident text processing requirements;

[0011] The parameter compression technique is used to introduce a low-rank matrix to adjust the parameter matrix of the pre-trained model to obtain the target model. The rank of the low-rank matrix is ​​less than the rank of the parameter matrix.

[0012] Based on the text processing requirements of power accident incidents, a structured prompting framework was determined;

[0013] Based on the structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix, resulting in a power grid accident extraction model.

[0014] In one possible implementation, based on a structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix to obtain a power grid accident extraction model, including:

[0015] Obtain historical power incident texts as training data;

[0016] Based on training data and a structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix, resulting in a power grid accident extraction model.

[0017] In one possible implementation, based on training data and a structured cueing framework, a hierarchical domain-adaptive training process is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix to obtain a power grid accident extraction model, including:

[0018] Based on the training data and the structured prompting framework, the low-rank matrix is ​​optimized to obtain the optimized low-rank matrix;

[0019] Based on the optimized low-rank matrix and parameter matrix, the target index of the target model is obtained;

[0020] If the target metric does not meet the training termination condition, a hierarchical learning rate strategy is adopted to optimize the optimized low-rank matrix.

[0021] If the target index meets the training termination condition, the power grid accident extraction model is obtained based on the optimized low-rank matrix, parameter matrix, and target model.

[0022] In one possible implementation, the historical power accident texts used as training data are obtained by processing multiple historical power accident texts separately using a power domain dictionary and annotation rules.

[0023] One possible implementation involves determining a structured prompting framework based on the text processing requirements of power accident incidents, including:

[0024] Based on the requirements for power accident text processing, a hierarchical strategy corresponding to the target model is determined. The hierarchical strategy includes the role definition, task description, output format constraints, and example guidance of the pre-trained model.

[0025] Based on the hierarchical strategy, a structured prompting framework is generated that can guide the target model to extract structured, multi-dimensional key information about power grid accidents.

[0026] Secondly, embodiments of this application provide a power grid accident information extraction device, comprising:

[0027] The acquisition module is used to acquire text related to power accidents.

[0028] The processing module is used to input power accident text into the power grid accident extraction model. In the power grid accident extraction model, based on the learned key information entities of power grid accidents, structured multi-dimensional key information of power grid accidents is extracted from the power accident text.

[0029] In one possible implementation, the processing module is further configured to train the power grid accident extraction model in the following manner:

[0030] Acquire pre-trained models and power accident text processing requirements;

[0031] The parameter compression technique is used to introduce a low-rank matrix to adjust the parameter matrix of the pre-trained model to obtain the target model. The rank of the low-rank matrix is ​​less than the rank of the parameter matrix.

[0032] Based on the text processing requirements of power accident incidents, a structured prompting framework was determined;

[0033] Based on the structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix, resulting in a power grid accident extraction model.

[0034] In one possible implementation, the processing module is further configured to:

[0035] Obtain historical power incident texts as training data;

[0036] Based on training data and a structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix, resulting in a power grid accident extraction model.

[0037] In one possible implementation, the processing module is further configured to:

[0038] Based on the training data and the structured prompting framework, the low-rank matrix is ​​optimized to obtain the optimized low-rank matrix;

[0039] Based on the optimized low-rank matrix and parameter matrix, the target index of the target model is obtained;

[0040] If the target metric does not meet the training termination condition, a hierarchical learning rate strategy is adopted to optimize the optimized low-rank matrix.

[0041] If the target index meets the training termination condition, the power grid accident extraction model is obtained based on the optimized low-rank matrix, parameter matrix, and target model.

[0042] In one possible implementation, the historical power accident texts used as training data are obtained by processing multiple historical power accident texts separately using a power domain dictionary and annotation rules.

[0043] In one possible implementation, the processing module is further configured to:

[0044] Based on the requirements for power accident text processing, a hierarchical strategy corresponding to the target model is determined. The hierarchical strategy includes the role definition, task description, output format constraints, and example guidance of the pre-trained model.

[0045] Based on the hierarchical strategy, a structured prompting framework is generated that can guide the target model to extract structured, multi-dimensional key information about power grid accidents.

[0046] Thirdly, embodiments of this application provide a power grid accident information extraction device, including: a memory and a processor;

[0047] The memory stores instructions that the computer executes;

[0048] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0049] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0050] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0051] The power grid accident information extraction method, device, storage medium, and program product provided in this application provide a data foundation for power grid accident information extraction by acquiring power accident text. The power accident text is input into a power grid accident extraction model. In this model, by identifying the boundaries and types of key information entities related to power grid accidents in the text, the unstructured power accident text is accurately and efficiently transformed into structured data, thereby accurately, efficiently, and comprehensively performing the task of power grid accident information extraction. Attached Figure Description

[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0053] Figure 1A schematic diagram illustrating a scenario for the power grid accident information extraction method provided in this application embodiment;

[0054] Figure 2 A flowchart illustrating the power grid accident information extraction method provided in this application embodiment;

[0055] Figure 3 A schematic diagram of the training process for the power grid accident extraction model provided in this application embodiment. Figure 1 ;

[0056] Figure 4 A schematic diagram of the training process for the power grid accident extraction model provided in this application embodiment. Figure 2 ,

[0057] Figure 5 This is a schematic diagram of the structure of the power grid accident information extraction device provided in the embodiments of this application;

[0058] Figure 6 A schematic diagram of the structure of the power grid accident information extraction device provided in the embodiments of this application.

[0059] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0061] In related technologies, the method of manually extracting key information about power accidents from power personal safety accident reports for safety management of the power industry is cumbersome and inefficient, and cannot meet the requirements of modern power systems for real-time performance, accuracy, and comprehensiveness.

[0062] The power grid accident information extraction method provided in this application provides a data foundation for power grid accident information extraction by acquiring power accident text. The power accident text is input into a power grid accident extraction model. In this model, the boundaries and types of key information entities related to power grid accidents in the text are identified, accurately and efficiently transforming the unstructured power accident text into structured data. This enables the accurate, efficient, and comprehensive execution of the power grid accident information extraction task.

[0063] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0064] Figure 1 This is a schematic diagram of a scenario for the power grid accident information extraction method provided in the embodiments of this application, such as... Figure 1 As shown, the specific application scenarios of this application embodiment include data center 11, processing center 12, and user 13, wherein:

[0065] Data center 11 stores power accident text, pre-trained models, and power grid accident extraction models. Processing center 12 is communicatively connected to data center 11. Processing center 12 can automatically acquire the power accident text, pre-trained models, and power grid accident extraction models stored in data center 11, and execute power grid accident information extraction methods to extract structured, multi-dimensional key information about power grid accidents from the power accident text. Simultaneously, upon receiving an extraction instruction from user 13, processing center 12 can also acquire the power accident text, pre-trained models, and power grid accident extraction models stored in data center 11, and execute power grid accident information extraction methods to extract structured, multi-dimensional key information about power grid accidents from the power accident text.

[0066] Furthermore, the processing center 12 stores the obtained multi-dimensional key information about power grid accidents in the data center 11 through interaction with the data center 11.

[0067] Furthermore, after receiving a viewing instruction from user 13, processing center 12 can display structured, multi-dimensional key information about power grid accidents to user 13 through human-computer interaction.

[0068] Figure 2 This is a flowchart illustrating the power grid accident information extraction method provided in an embodiment of this application. Figure 2 As shown, the method includes:

[0069] S201. Obtain the text of the power accident.

[0070] Power accident texts refer to textual data related to power grid operation, power equipment failures, and power safety accidents. Power accident texts typically include accident reports, fault records, maintenance logs, and emergency response documents. The core information in power accident texts includes key details such as the accident type, time of occurrence, location, faulty equipment, cause analysis, and response measures.

[0071] Power accident texts are obtained from multiple sources, including power industry reports, news websites, and accident record databases. These texts contain information related to the power accidents. Optionally, power accident texts can include structured and unstructured text.

[0072] Optionally, after obtaining the power accident text, data preprocessing is performed on the power accident text to improve its quality. Data preprocessing includes at least one of the following: text cleaning, noise reduction, normalization, and preprocessing operations such as word segmentation, stop word removal, and part-of-speech tagging.

[0073] S202. Input the power accident text into the power grid accident extraction model. In the power grid accident extraction model, based on the learned key information entities of power grid accidents, extract structured multi-dimensional key information of power grid accidents from the power accident text.

[0074] Key information entities in power grid accidents are irreplaceable, minimal semantic units that directly reflect the core elements of an accident, including time, location, equipment, cause, and impact. Optionally, key information entities in power grid accidents include equipment entities, fault entities, and time entities. For example, equipment entities include "500kV transmission line" and "main transformer"; fault entities include "lightning trip" and "insulator flashover"; and time entities include "August 15, 2023, 14:20".

[0075] Structured, multi-dimensional key information on power grid accidents is based on an entity-relationship-attribute model. It organizes core elements such as time, equipment, faults, and impacts from power accident texts into multi-dimensional data tables according to a unified standard, enabling the queryability, associativity, and reasoning capabilities of power grid accident information. By extracting structured, multi-dimensional key information from power accident texts, it supports rapid analysis, accurate decision-making, and knowledge reuse of power grid accidents.

[0076] The power grid accident extraction model is trained specifically for the power accident execution domain and has a good ability to recognize power grid technical terms. Optionally, the pre-trained power grid accident extraction model can be a BERT-based named entity recognition model or a large language model.

[0077] The text of a power accident is input into the power grid accident extraction model. The key information entities of the power grid accident learned in the pre-trained power grid accident extraction model are used to extract structured information from the text of the power accident, resulting in structured multi-dimensional key information of the power grid accident.

[0078] The power grid accident extraction model has pre-learned entity types in the power sector. By identifying entity boundaries and types in power accident texts, the entities within the text are obtained. Subsequently, by extracting the relationships between entities, the unstructured power accident text is accurately, efficiently, and comprehensively transformed into structured data, facilitating storage and analysis.

[0079] The power grid accident information extraction method provided in this application provides a data foundation for power grid accident information extraction by acquiring power accident text. The power accident text is input into a power grid accident extraction model. In this model, the boundaries and types of key information entities related to power grid accidents in the text are identified, accurately and efficiently transforming the unstructured power accident text into structured data. This enables the accurate, efficient, and comprehensive execution of the power grid accident information extraction task.

[0080] Figure 3 A schematic diagram of the training process for the power grid accident extraction model provided in this application embodiment. Figure 1 ,like Figure 3 As shown, in this embodiment... Figure 2 Based on the embodiments, the power grid accident extraction model used in the power grid accident information extraction method is described in detail. The power grid accident extraction model is trained in the following way:

[0081] S301. Obtain pre-trained models and power accident text processing requirements.

[0082] A pre-trained model is a language model that has been pre-trained on a large-scale general text corpus. Pre-trained models possess basic language understanding and feature extraction capabilities and can be fine-tuned to adapt to specific domain requirements, eliminating the need for training from scratch and significantly reducing training costs and time. Optionally, pre-trained models can include any of the following: large language models, BERT, and RoBERTa.

[0083] The text processing requirement refers to the specific processing target for texts related to power accidents.

[0084] The power accident text processing requirements are designed to address specific processing objectives of power accident texts, indicating the corresponding processing requirements when extracting grid accident information from the texts. Optionally, the power accident text processing requirements include the format and form requirements for the extracted information after grid accident information extraction, as well as the key fields and extraction precision to be extracted during the grid accident information extraction process.

[0085] First, considering the characteristics of power accident texts and the power grid technology field, suitable pre-trained models are selected to obtain pre-trained models. Optionally, lightweight models with strong feature extraction capabilities are prioritized as pre-trained models to reduce the probability of excessively complex pre-trained models leading to high training costs. Simultaneously, by analyzing actual business scenarios in the power sector, the core objectives and specific requirements for power accident text processing are clarified, resulting in power accident text processing requirements.

[0086] By acquiring pre-trained models, the cumbersome process of training models from scratch is avoided, shortening the overall R&D cycle. By clarifying the core requirements of text processing, the requirements for power accident text processing are obtained, providing clear guidance for the optimization of pre-trained models, avoiding ineffective training, and ensuring that the training of pre-trained models fits the business scenario of power grid accident information extraction.

[0087] S302. Using parameter compression technology, a low-rank matrix is ​​introduced to adjust the parameter matrix of the pre-trained model to obtain the target model, wherein the rank of the low-rank matrix is ​​less than the rank of the parameter matrix.

[0088] The parameter matrix is ​​the foundation for language understanding and feature extraction in pre-trained models. Parameter matrices in different layers handle different computational tasks. Higher rank parameters result in larger parameter sizes and higher computational and storage costs. Low-rank matrices have lower rank than parameter matrices, and the effective information contained in low-rank matrices can be represented with fewer dimensions. In this step, low-rank matrices are used to approximate high-rank parameter matrices in the pre-trained model to achieve parameter compression. The target model is an intermediate model obtained by compressing and adjusting the pre-trained model using parameter compression techniques; it retains the core capabilities of the pre-trained model while significantly reducing the parameter size.

[0089] Parameter compression techniques are used to reduce the parameter size of pre-trained models, thereby reducing computational costs and storage overhead. The core of parameter compression is to simplify the parameter matrix of a pre-trained model without significantly reducing its performance. Parameter compression techniques include any one of the following: low-rank decomposition, quantization, pruning, and LoRA fine-tuning.

[0090] Optionally, LoRA fine-tuning parameter compression technology can be used to introduce a low-rank matrix to adjust the parameter matrix of the pre-trained model to obtain the target model, thereby reducing the complexity of the pre-trained model while controlling performance loss.

[0091] Optionally, based on the LoRA fine-tuning principle, a low-rank matrix is ​​introduced next to the parameter matrix of the pre-trained model. The values ​​of the parameter matrix are not changed and are frozen. The incremental changes of the original parameter matrix are approximated by the low-rank matrix, thereby indirectly adjusting the parameters of the pre-trained model. This not only compresses the parameters but also reserves optimization space for subsequent domain adaptation, avoiding a decline in the basic capabilities of the model due to parameter adjustments.

[0092] S303. Based on the requirements for text processing of power accidents, a structured prompt framework is determined.

[0093] The structured prompting framework is a standardized and normative prompt template used to guide the target model to process power accident text in a fixed format and extract structured, multi-dimensional key information about power grid accidents. The structured prompting framework includes clear task instructions, information extraction fields, and output formats, avoiding disorganized output from the target model and improving the accuracy and consistency of power grid accident information extraction.

[0094] The text processing requirements for power accident incidents are transformed into structured prompts that the target model can understand, providing clear guidance for the target model to perform hierarchical domain adaptation training. First, the text processing requirements for power accident incidents are mapped to the core modules of the structured prompt framework. If the text processing requirement for power accident incidents involves extracting four types of key information, then the structured prompt framework must explicitly include extraction instructions for these four types of information; if the text processing requirement for power accident incidents includes accident level classification, then the structured prompt framework must supplement the classification criteria and output requirements for the accident levels.

[0095] Next, based on the core modules of the structured prompting framework, the overall structure of the framework is obtained. For example, the overall structure of the structured prompting framework typically includes three parts: task instructions, input area, and output template. The task instructions clearly inform the target model of the task to be completed. For example, a task instruction might be in the form of: "Extract the faulty equipment, cause of the accident, time of occurrence, and scope of impact from the following power accident text." The input area is used to input the power accident text to be processed. The output template is used to standardize the output format of the target model. For example, an output template might be in the form of "Faulty equipment: XXX; Cause of accident: XXX; Time of occurrence: XXX; Scope of impact: XXX."

[0096] Based on the requirements of power accident text processing, a structured prompting framework is established. This framework guides the target model to focus on core needs, reduces invalid output, and improves the accuracy and consistency of information extraction. It also reduces the learning difficulty for the target model, enabling it to quickly understand text processing tasks in the power sector and providing clear guidance for hierarchical adaptive training. Furthermore, transforming abstract text processing requirements into standardized structured prompts allows for rapid adaptation to the characteristics of power accident texts.

[0097] S304. Based on the structured prompting framework, by freezing the parameter matrix and optimizing the low-rank matrix, a hierarchical domain adaptation training is performed on the target model to obtain the power grid accident extraction model.

[0098] Combining the hierarchical structure of the target model with the needs of the power sector, a phased and hierarchical domain-adaptive training process is implemented for the target model. During this training, the parameter matrix of the pre-trained model is kept fixed, and the parameters within the matrix are not updated to preserve the model's existing basic language understanding capabilities and avoid compromising its core performance. Simultaneously, by adjusting the parameters of the introduced low-rank matrix and optimizing it through gradient descent and other methods, the target model can quickly adapt to the domain characteristics of power accident texts, resulting in a power grid accident extraction model. This model, based on a structured prompting framework, can accurately extract key information from power accident texts, adapting to the actual business needs of the power sector and can be directly used for automated processing of power accident texts.

[0099] Figure 4 A schematic diagram of the training process for the power grid accident extraction model provided in this application embodiment. Figure 2 ,like Figure 4 As shown, in this embodiment... Figure 3 Based on the embodiments, the power grid accident extraction model used in the power grid accident information extraction method is described in detail, including:

[0100] In one possible implementation, step S303 may further include:

[0101] S3031. Based on the requirements for power accident text processing, determine the hierarchical strategy corresponding to the target model. The hierarchical strategy includes the role definition, task description, output format constraints, and example guidance of the pre-trained model.

[0102] Based on the requirements of power accident text processing, the positioning, tasks, and output requirements of the target model at different training stages are clarified, and a hierarchical strategy corresponding to the target model is determined to achieve accurate adaptation between the target model and the power domain. The hierarchical strategy includes role definition, task description, output format constraints, and example guidance.

[0103] Based on the requirements of power accident text processing, the role of the pre-trained model in power accident text processing is clarified, indicating the responsibilities that the target model should undertake, thus obtaining a role definition. This role definition guides the target model to focus on the domain task and prevents it from deviating from the task objective.

[0104] Based on the requirements of power accident text processing, the boundaries and core requirements of the power grid accident information extraction task are clarified, and a task description is obtained, so that the target model can clearly understand the connotation of the task.

[0105] Based on the requirements for power accident text processing, the form and format of the structured, multi-dimensional key information of power grid accidents that need to be output are determined, and the output format constraints are obtained.

[0106] Based on the requirements of power accident text processing, typical power accident text samples are selected and paired with output examples that meet the requirements. The task objectives and output specifications of the target model are intuitively displayed, and the examples provide guidance to help the target model quickly understand the characteristics of the domain task and improve the adaptation efficiency.

[0107] Based on the requirements of power accident text processing, a hierarchical strategy corresponding to the target model is determined, clarifying the target model's positioning and task requirements in power accident text processing, avoiding deviation of the model from the core requirements, reducing invalid output, lowering the learning difficulty, and helping the target model quickly understand the characteristics of the domain task.

[0108] S3032. Based on the hierarchical strategy, generate a structured prompt framework corresponding to the structured multi-dimensional key information of power grid accidents that can guide the pre-trained model to extract structured information.

[0109] Based on a hierarchical strategy, role definitions are transformed into introductory guidance for a structured prompting framework, task descriptions into core instructions, output format constraints into output templates, and example guidance into reference examples within the framework. This generates a structured prompting framework that can guide pre-trained models to extract structured, multi-dimensional key information about power grid accidents, thereby guiding the target model to accurately extract this information and improving the comprehensiveness and accuracy of information extraction. By combining the structured prompting framework with a hierarchical strategy, the system ensures that the target model's output meets the business needs of the power sector and reduces invalid output.

[0110] In one possible implementation, step S304 may further include:

[0111] S3041. Obtain historical power accident texts as training data.

[0112] Training data is a collection of historical power accident texts used for hierarchical domain adaptation training of the target model.

[0113] Textual data related to power accidents in the power sector is collected to obtain historical power accident texts. Then, the acquired power accident texts are preprocessed to remove redundant information and invalid data, and to correct erroneous expressions, resulting in training data for historical power accident texts. This ensures the quality of the training data and avoids affecting the training effect.

[0114] S3042. Based on the training data and structured prompting framework, by freezing the parameter matrix and optimizing the low-rank matrix, hierarchical domain adaptation training is performed on the target model to obtain the power grid accident extraction model.

[0115] By combining training data and a structured prompting framework, the target model is trained hierarchically according to its layers, ensuring that the model retains its general language capabilities while accurately adapting to multi-dimensional key information extraction tasks in the power industry.

[0116] First, training data is input into the target model to ensure that it can learn the domain features and key information extraction patterns of historical power grid accidents from the training data. Then, optimization methods are used to refine the parameters of the low-rank matrix in each training batch. After a certain number of training batches, the model performance is tested using a validation set. If the extraction accuracy does not meet the expected requirements, the training parameters are adjusted, and the low-rank matrix is ​​further optimized until the target model's performance stabilizes, resulting in the power grid accident extraction model.

[0117] By combining training data, a structured prompting framework, and hierarchical adaptive training depth, this approach alleviates the problems of poor adaptability and low accuracy in extracting key information in the power sector for general models. By optimizing the low-rank matrix, the target model can be quickly adapted to the power sector, resulting in a power grid accident extraction model. This model can be directly used for the automated processing of power accident text, improving the efficiency and accuracy of text processing in the power sector and promoting its intelligent upgrading.

[0118] In one possible implementation, step S3044 may further include:

[0119] Step A: Based on the training data and the structured cueing framework, optimize the low-rank matrix to obtain the optimized low-rank matrix.

[0120] Optionally, based on the training data and the structured prompting framework, a hierarchical learning rate strategy can be used to optimize the low-rank matrix, resulting in an optimized low-rank matrix. The hierarchical learning rate strategy allows for setting different learning rates for parameters at different levels based on the importance and functional characteristics of the target model, thereby achieving efficient and stable optimization of the target model.

[0121] Optionally, the training data is input into the target model according to the structured prompting framework format. The target model extracts general text features through the basic feature layer, and then completes the adaptation and transformation of domain features through a low-rank matrix to obtain preliminary prediction results. The gradient error is calculated by comparing the preliminary prediction results with the true labeled results of the training data. The gradient error is backpropagated to each layer of the target model, and the parameter matrix is ​​adjusted by making relatively large parameter adjustments only to the domain adaptation layer where the low-rank matrix is ​​located.

[0122] Optionally, based on the training data and the structured cueing framework, LoRA fine-tuning is used to optimize the low-rank matrix, resulting in an optimized low-rank matrix. Specifically, the parameter matrix is ​​frozen during training; instead of directly fine-tuning or optimizing the parameter matrix, a low-rank decomposition hypothesis is made on the parameter matrix to adjust the performance of the target model, where:

[0123]

[0124] in, Represents the final parameters of the target model; It is a parametric matrix, and the dimension of the low-rank matrix A is... The dimension of the low-rank matrix B is .

[0125] Optionally, the low-rank matrix can be optimized via forward propagation. For example, low-rank matrix A and low-rank matrix B are trainable parameters. This optimizes the output vector of a certain layer in the target model. , can mean "to think" ,in, Let be the parameter matrix, and x be the input vector received by the target model. Then, the output vector of a certain layer... The corresponding forward propagation can be represented as:

[0126]

[0127] in, For parameter matrix The correction term is represented as the product of low-rank matrix A and low-rank matrix B.

[0128] Step B: Based on the optimized low-rank matrix and parameter matrix, obtain the target index of the target model.

[0129] The validation dataset is input into the target model based on the optimized low-rank matrix and parameter matrix. Model inference is performed on the target model, and the extraction results of key information by the target model are statistically analyzed. The results are compared with the real labeled data, and the number of correctly extracted, incorrectly extracted, and missed extractions are classified and statistically analyzed to obtain the target metric of the target model. Optionally, the target metric can include any one of the following: precision, recall, F1 score, etc.

[0130] Step C: If the target metric does not meet the training termination condition, a hierarchical learning rate strategy is adopted to optimize the optimized low-rank matrix.

[0131] If the target metric does not meet the pre-set training termination condition, it indicates that the target model has not converged and still has considerable room for improvement. A hierarchical learning rate strategy is adopted to perform differentiated optimization on the current low-rank matrix until the optimized low-rank matrix meets the training termination condition.

[0132] Specifically, the low-rank matrix is ​​hierarchically divided according to the functional roles of each parameter group, and different learning rates are assigned to different levels. By maximizing the preservation of the general knowledge learned in the pre-training phase, the current low-rank matrix is ​​differentially optimized to avoid catastrophic forgetting due to large parameter updates. Through the hierarchical learning rate strategy, the low-rank matrix is ​​optimized, enabling it to efficiently adapt to the target domain while retaining the common knowledge from pre-training, continuously driving the target index towards the termination condition.

[0133] Step D: If the target index meets the training termination condition, the power grid accident extraction model is obtained based on the optimized low-rank matrix, parameter matrix, and target model.

[0134] If the target metric meets the training termination condition, the performance of the target model is satisfactory and stable. Based on the optimized low-rank matrix, parameter matrix, and target model, a power grid accident extraction model adapted for the power sector is obtained.

[0135] In one possible implementation, the historical power accident texts used as training data are obtained by processing multiple historical power accident texts separately using a power domain dictionary and annotation rules.

[0136] The power industry dictionary includes terms specific to the power industry, equipment names, accident types, and response measures. It serves as a dedicated vocabulary database for power text processing, ensuring the professionalism of power grid accident information extraction. Optionally, the dictionary includes a thesaurus. This mapping standardizes synonyms, ensuring domain-specific consistency in the text.

[0137] For example, the dictionary for the power industry contains terms such as "transformer, inter-turn short circuit, line grounding, and circuit breaker".

[0138] Annotation rules are standardized annotation specifications developed for the task of extracting key information from power grid accident texts. These rules clarify the information fields that need to be annotated, the annotation format, and the annotation boundaries to ensure the consistency and accuracy of multi-dimensional key information about power grid accidents.

[0139] Historical power accident documents are textual data accumulated by power companies in the past, such as accident reports, fault records, maintenance logs, and emergency response documents.

[0140] Multiple historical power accident texts were collected, and the compiled texts were matched with a power industry dictionary to identify power-related technical terms in the texts, standardizing terminology and ensuring the texts' domain-specific accuracy. For example, standardizing terminology could involve changing "transformer" to "transformer" instead of "transformer appliance".

[0141] Then, according to the preset annotation rules, the key information in the text is standardized and annotated to ensure that the annotation results of each text meet the requirements of power accident text processing.

[0142] Figure 5 This is a schematic diagram of the structure of the power grid accident information extraction device provided in the embodiments of this application, as shown below. Figure 5 As shown, the power grid accident information extraction device 50 provided in this embodiment includes:

[0143] Module 501 is used to acquire power accident text;

[0144] The processing module 502 is used to input power accident text into the power grid accident extraction model. In the power grid accident extraction model, based on the learned key information entities of power grid accidents, structured multi-dimensional key information of power grid accidents is extracted from the power accident text.

[0145] In one possible implementation, the processing module 502 is further configured to train the power grid accident extraction model in the following manner:

[0146] Acquire pre-trained models and power accident text processing requirements;

[0147] The parameter compression technique is used to introduce a low-rank matrix to adjust the parameter matrix of the pre-trained model to obtain the target model. The rank of the low-rank matrix is ​​less than the rank of the parameter matrix.

[0148] Based on the text processing requirements of power accident incidents, a structured prompting framework was determined;

[0149] Based on the structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix, resulting in a power grid accident extraction model.

[0150] In one possible implementation, the processing module 502 is further configured to:

[0151] Obtain historical power incident texts as training data;

[0152] Based on training data and a structured prompting framework, a hierarchical domain adaptation training is performed on the target model by freezing the parameter matrix and optimizing the low-rank matrix, resulting in a power grid accident extraction model.

[0153] In one possible implementation, the processing module 502 is further configured to:

[0154] Based on the training data and the structured prompting framework, the low-rank matrix is ​​optimized to obtain the optimized low-rank matrix;

[0155] Based on the optimized low-rank matrix and parameter matrix, the target index of the target model is obtained;

[0156] If the target metric does not meet the training termination condition, a hierarchical learning rate strategy is adopted to optimize the optimized low-rank matrix.

[0157] If the target index meets the training termination condition, the power grid accident extraction model is obtained based on the optimized low-rank matrix, parameter matrix, and target model.

[0158] In one possible implementation, the historical power accident texts used as training data are obtained by processing multiple historical power accident texts separately using a power domain dictionary and annotation rules.

[0159] In one possible implementation, the processing module 502 is further configured to:

[0160] Based on the requirements for power accident text processing, a hierarchical strategy corresponding to the target model is determined. The hierarchical strategy includes the role definition, task description, output format constraints, and example guidance of the pre-trained model.

[0161] Based on the hierarchical strategy, a structured prompting framework is generated that can guide the target model to extract structured, multi-dimensional key information about power grid accidents.

[0162] The power grid accident information extraction device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0163] Figure 6 This is a schematic diagram of the structure of the power grid accident information extraction device provided in an embodiment of this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.

[0164] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.

[0165] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0166] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0167] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0168] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0169] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0170] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0171] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0172] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0173] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

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

[0175] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0176] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0177] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0178] Finally, it should be noted that other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and alterations may be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for extracting power grid accident information, characterized in that, include: Obtain power accident text; The power accident text is input into the power grid accident extraction model. In the power grid accident extraction model, based on the learned key information entities of the power grid accident, structured multi-dimensional key information of the power grid accident is extracted from the power accident text.

2. The method for extracting power grid accident information according to claim 1, characterized in that, The power grid accident extraction model was trained in the following way: Acquire pre-trained models and power accident text processing requirements; A parameter compression technique is used to adjust the parameter matrix of the pre-trained model by introducing a low-rank matrix to obtain the target model, wherein the rank of the low-rank matrix is ​​less than the rank of the parameter matrix; Based on the aforementioned requirements for text processing of power accidents, a structured prompting framework was determined; Based on the structured prompting framework, by freezing the parameter matrix and optimizing the low-rank matrix, hierarchical domain adaptation training is performed on the target model to obtain the power grid accident extraction model.

3. The method according to claim 2, characterized in that, Based on the structured prompting framework, by freezing the parameter matrix and optimizing the low-rank matrix, a hierarchical domain adaptation training is performed on the target model to obtain the power grid accident extraction model, including: Obtain historical power incident texts as training data; Based on the training data and the structured prompting framework, the target model is subjected to hierarchical domain adaptation training by freezing the parameter matrix and optimizing the low-rank matrix, thereby obtaining the power grid accident extraction model.

4. The method according to claim 3, characterized in that, Based on the training data and the structured prompting framework, the target model is subjected to hierarchical domain adaptation training by freezing the parameter matrix and optimizing the low-rank matrix to obtain the power grid accident extraction model, including: Based on the training data and the structured prompting framework, the low-rank matrix is ​​optimized to obtain the optimized low-rank matrix; Based on the optimized low-rank matrix and the parameter matrix, the target index of the target model is obtained; If the target metric does not meet the training termination condition, a hierarchical learning rate strategy is adopted to optimize the optimized low-rank matrix. If the target index meets the training termination condition, the power grid accident extraction model is obtained based on the optimized low-rank matrix, the parameter matrix, and the target model.

5. The method according to any one of claims 2 to 4, characterized in that, The historical power accident texts used as training data were obtained by processing multiple historical power accident texts separately using a power domain dictionary and annotation rules.

6. The method according to any one of claims 2 to 4, characterized in that, The determination of the structured prompt framework based on the power accident text processing requirements includes: Based on the power accident text processing requirements, a hierarchical strategy corresponding to the target model is determined. The hierarchical strategy includes the role definition, task description, output format constraints, and example guidance of the pre-trained model. Based on the hierarchical strategy, a structured prompting framework is generated that can guide the target model to extract structured, multi-dimensional key information about power grid accidents.

7. A power grid accident information extraction device, characterized in that, include: The acquisition module is used to acquire text related to power accidents. The processing module is used to input the power accident text into the power grid accident extraction model, in which structured multi-dimensional key information of the power grid accident is extracted from the power accident text based on the learned key information entities of the power grid accident.

8. A power grid accident information extraction device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.