Flood prevention and typhoon prevention power grid emergency response plan text rule formalized extraction method and device based on large language model and related product

By employing a large language model and a multi-layered negative example perception and difference-weighted collaborative fine-tuning strategy, the problem of structured extraction of flood and typhoon prevention power grid emergency response plan text was solved, achieving efficient and accurate rule formal extraction and improving the intelligent decision-making capability of power grid emergency response.

CN122021847APending Publication Date: 2026-05-12EAST CHINA BRANCH OF STATE GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511846520.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and efficiently transform unstructured flood and typhoon prevention power grid emergency response plan texts into structured rules that computers can recognize, reason about, and execute. This results in low efficiency in power grid emergency response, easy omission of key information, and poor decision-making consistency.

Method used

By employing a large language model combined with a multi-layer negative example perception and a weighted collaborative fine-tuning strategy of difference terms, and by defining a formal description pattern for the text rules of flood and typhoon power grid emergency response plans, rule templates and corpora are constructed, and the model is fine-tuned to achieve formal rule extraction.

Benefits of technology

It improves the efficiency of power grid emergency response and the ability to deal with emergencies, provides intelligent decision support for power grid natural disaster emergency response, and ensures the accuracy and stability of output results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021847A_ABST
    Figure CN122021847A_ABST
Patent Text Reader

Abstract

The invention provides a flood prevention and typhoon prevention power grid emergency response plan text rule formalized extraction method and device based on a large language model and a related product, and relates to the technical field of data processing. According to the method, the emergency response of the flood-prevention typhoon-prevention power grid is taken as an object, and the steps of formalized description and definition of a flood-prevention typhoon-prevention power grid emergency response plan text rule, instruction set construction, large language model-assisted rule extraction corpus construction process design, multi-layer negative example perception and difference item weighted collaborative fine tuning strategy, result output and the like are carried out. Formal extraction of flood and typhoon prevention power grid emergency response plan text rules is realized, the power grid emergency response efficiency and the emergency response capability are improved, and assistance is provided for intelligent decision making of power grid natural disaster emergency response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus and related products for formal extraction of text rules for flood and typhoon prevention power grid emergency response plans based on a large language model. Background Technology

[0002] Flood and typhoon prevention power grid emergency response plans are crucial manuals for ensuring emergency power grid response during natural disasters such as floods and typhoons. Their content is largely in unstructured natural language text format. With the rapid development of national and local power infrastructure and the increasing demand for informatization and intelligent management, the content, complexity, and workflow of flood and typhoon prevention power grid emergency response plans, particularly those involving multi-departmental collaboration, are becoming increasingly intricate. Therefore, efficiently extracting formal rules representing these plans and constructing reasonable and computable power grid emergency response knowledge is vital for improving the efficiency of handling flood and typhoon prevention power grid emergencies, as well as for national economic development and social stability.

[0003] Flood and typhoon prevention is a crucial application scenario for emergency response to natural disasters and large-scale power outages affecting the power grid. Currently, there is a lack of manually collected or labeled datasets, hindering the targeted formal extraction of rules from the text of flood and typhoon prevention power grid emergency response plans. Traditional power grid emergency plans typically rely on manual review by decision-makers, their subjective experience, and their subjective understanding of the plan text. This approach suffers from low efficiency, potential omission of key information, and poor decision-making consistency, resulting in poor timeliness for large-scale power grid natural disasters like flood and typhoons. Therefore, automatically and rapidly transforming unstructured flood and typhoon prevention power grid emergency response plan texts into computer-readable, reasonable, and executable structured rule knowledge has become a critical prerequisite for improving the intelligence level of power grid emergency response plan text information extraction. Especially with the development of next-generation artificial intelligence technologies, large language models have become a powerful tool for the structured extraction of rules from large-area, multi-scale flood and typhoon prevention power grid emergency response plan texts. Currently, novel unstructured plan text rule extraction can be summarized into two approaches: one based on traditional natural language processing pipelines, and the other based on fine-tuning of pre-trained language models. The former approach decomposes the rule extraction task into multiple sequential subtasks using large-scale labeled data. It boasts advantages such as high interpretability and no need for training data, achieving high accuracy when the prepared text format is standardized and the language is fixed. However, its drawbacks include over-reliance on expert knowledge, difficulty in handling complex logic, and poor generalization ability. The latter approach treats rule extraction as a sequence labeling or text generation task, offering advantages such as high automation, accuracy, and strong generalization. It is currently the mainstream approach, but its disadvantages include high data labeling costs and poor model interpretability.

[0004] In summary, there is currently limited research on the formal extraction of rules from power grid emergency response plan texts for flood and typhoon prevention. Most existing technical solutions focus on structured extraction under the premise of standardized plan text formats, which not only has significant shortcomings in performance, cost, and flexibility, but also fails to accurately extract formal rules from lengthy and significantly unstructured power grid emergency response plan texts. Therefore, this technical problem urgently needs to be addressed. Summary of the Invention

[0005] In view of the above problems, this application is proposed to provide a method, apparatus, and related products for formal extraction of text rules for flood and typhoon prevention power grid emergency response plans based on a large language model, which overcomes or at least partially solves the above problems. The technical solution is as follows: Firstly, a formal extraction method for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model is provided, the method comprising: Collect multiple flood and typhoon prevention power grid emergency response plan documents; Define a formal description model for the text rules of flood and typhoon prevention power grid emergency response plans. Define a complete text parsing rule of flood and typhoon prevention power grid emergency response plan as a parsing rule quadruple including subject, object, condition and consequence. Clarify the scope of application, object and function of the extracted text rules of flood and typhoon prevention power grid emergency response plans. Based on the defined formal description pattern of the text rules for flood and typhoon prevention power grid emergency response plans and the formal extraction task of the text rules for flood and typhoon prevention power grid emergency response plans, an instruction set including task objectives, adjustment methods, and data formats is constructed. Based on the pre-set first major language model, the constructed instruction set, and the collected multiple flood and typhoon prevention power grid emergency response plan documents, a formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules based on rule templates is constructed. We designed a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. Using the constructed corpus and the designed multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, we fine-tuned and trained the pre-set second language model to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules. Input the flood and typhoon prevention power grid emergency response plan documents to be extracted into the trained formal extraction model of the text rules of the flood and typhoon prevention power grid emergency response plan, and output the formal extraction results of the text rules of the flood and typhoon prevention power grid emergency response plan.

[0006] In one possible implementation, based on a pre-defined first language model, a constructed instruction set, and multiple collected flood and typhoon prevention power grid emergency response plan documents, a rule-template-based formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules is built, including: Based on the task objectives in the constructed instruction set, design annotation templates for extraction rules; The constructed instruction set and the designed annotation template are used as model prompt words. The model prompt words and multiple collected flood and typhoon prevention power grid emergency response plan documents are input into the preset first language model. The first language model is used to automatically annotate the text data of the flood and typhoon prevention power grid emergency response plan to obtain the annotation results. Generate standardized structured tags for flood and typhoon prevention power grid emergency response plans based on the annotation results; Based on the collected flood and typhoon prevention power grid emergency response plan documents and standard text structure tags, a rule-based template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts is constructed.

[0007] In one possible implementation, standard structured tags for flood and typhoon prevention power grid emergency response plans are generated based on the annotation results, including: The annotation results will be reviewed. If the review is approved, the annotation results will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text. If the review fails, the annotation results will be adjusted, and the adjusted annotation content will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text.

[0008] In one possible implementation, a multi-layered negative instance awareness and difference term weighted collaborative fine-tuning strategy is designed, including: The design utilizes both positive examples and multiple layers of negative examples for training and weight assignment, enhancing the model's accuracy in identifying key error negative example types. Design a difference-weighting strategy to assign differentiated loss weights to negative examples based on their contribution, including field errors, logical errors, and factual errors, and according to the degree of error.

[0009] In one possible implementation, a pre-defined second language model is fine-tuned using a constructed corpus and a designed multi-layered negative example perception and difference-weighted collaborative fine-tuning strategy. This results in a trained formal extraction model for the text rules of flood and typhoon prevention power grid emergency response plans, including: Using the constructed corpus, generate negative error labels and standard positive error labels; By analyzing the differences between negative example labels and standard positive example labels, a multi-layered difference-aligned data structure information is constructed, which includes original label predictions, standard positive example labels, and descriptions of differences between labels in the flood and typhoon power grid emergency response plan text. The format of the multi-layered difference-aligned data includes rule text, negative example labels, positive example labels, and difference descriptions. Based on the multi-layer difference-aligned data structured information and the difference item weighted collaborative fine-tuning strategy, the pre-set second language model is fine-tuned and trained to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules.

[0010] Secondly, a formal extraction device for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model is provided. The device includes: The collection unit is used to collect multiple flood and typhoon prevention power grid emergency response plan documents; The definition unit is used to define the formal description mode of the text rules of the flood and typhoon prevention power grid emergency response plan. It defines a complete text parsing rule of the flood and typhoon prevention power grid emergency response plan as a parsing rule quadruple including subject, object, condition and consequence, and clarifies the scope of application, object and function of the extracted text rules of the flood and typhoon prevention power grid emergency response plan. The first building unit is used to construct an instruction set that includes task objectives, adjustment methods, and data formats based on the formal description pattern of the text rules of the flood and typhoon prevention power grid emergency response plan and the formal extraction task of the text rules of the flood and typhoon prevention power grid emergency response plan. The second construction unit is used to construct a formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules based on the preset first large language model, the constructed instruction set and the collected multiple flood and typhoon prevention power grid emergency response plan documents. The fine-tuning unit is used to design a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. Using the constructed corpus and the designed multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, the pre-set second language model is fine-tuned and trained to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules. The extraction unit is used to input the flood and typhoon prevention power grid emergency response plan document to be extracted into the trained formal extraction model of the text rules of the flood and typhoon prevention power grid emergency response plan, and output the formal extraction result of the text rules of the flood and typhoon prevention power grid emergency response plan.

[0011] In one possible implementation, the second building unit is further used for: Based on the task objectives in the constructed instruction set, design annotation templates for extraction rules; The constructed instruction set and the designed annotation template are used as model prompt words. The model prompt words and multiple collected flood and typhoon prevention power grid emergency response plan documents are input into the preset first language model. The first language model is used to automatically annotate the text data of the flood and typhoon prevention power grid emergency response plan to obtain the annotation results. Generate standardized structured tags for flood and typhoon prevention power grid emergency response plans based on the annotation results; Based on the collected flood and typhoon prevention power grid emergency response plan documents and standard text structure tags, a rule-based template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts is constructed.

[0012] Thirdly, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plans based on large language models as described above.

[0013] Fourthly, a storage medium is provided, the storage medium storing a computer program, wherein the computer program is configured to execute, at runtime, the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model as described above.

[0014] Fifthly, a computer program product is provided, including a computer program configured to execute, at runtime, the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model as described above.

[0015] By employing the above technical solutions, the present application provides a method, apparatus, and related products for formal extraction of text rules for flood and typhoon prevention power grid emergency response plans based on a large language model. This method, targeting flood and typhoon prevention power grid emergency response, achieves formal extraction of text rules for flood and typhoon prevention power grid emergency response plans through steps such as formal description and definition of emergency response plan text rules, instruction set construction, design of a rule extraction corpus construction process assisted by a large language model, multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, and result output. This improves the efficiency of power grid emergency response and its ability to cope with emergencies, and provides assistance for intelligent decision-making in power grid natural disaster emergency response. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0017] Figure 1 The flowchart illustrates a method for formally extracting text rules for flood and typhoon prevention power grid emergency response plans based on a large language model, as provided in an embodiment of this application. Figure 2 This illustration shows a schematic diagram of the multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy provided in an embodiment of this application; Figure 3 This paper shows a structural diagram of a formal extraction device for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model, provided in an embodiment of this application. Figure 4 A structural diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0018] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and its variations should be interpreted as open-ended terms meaning "including but not limited to."

[0020] Given the powerful natural language understanding, reasoning, and content generation capabilities of large language models, which have been validated in numerous fields, their application in the extraction of rules from emergency response plans for power grid natural disasters such as flood and typhoon prevention has not yet been systematically studied or deeply applied. However, the traditional process for extracting emergency response plan text information using large language models includes: (1) Contingency Plan Analysis and Example Hints First, the emergency response plan text undergoes preprocessing and segmentation. Since the large language model has limitations on the context length of the power grid emergency response plan text, the complete emergency response plan document must first be converted into plain text for parsing. Then, according to the chapter structure of the emergency response plan, the lengthy text is cut into appropriately sized text blocks to ensure that each text block meets the context length requirements of the large model. Finally, the prompts are precisely designed to ensure they are formally described according to a specific format, including role definitions, task definitions, example demonstrations, and output format requirements.

[0021] (2) Large Language Model Reasoning and Content Generation First, the large language model API is invoked by sending pre-defined prompts (system instructions, examples, text to be processed, etc.) to the established large language model. Then, model understanding and generation are performed. This involves utilizing the massive pre-trained knowledge built into the large language model, combined with the instructions and examples from the aforementioned prompts, to deeply understand the input power grid emergency response plan text and generate a structured output conforming to a specified format based on its internal logic.

[0022] (3) Post-processing of results and quality verification Specifically, it includes two stages: format parsing and cleaning, and logical consistency verification. The former receives the model's raw output and parses it into predefined structured objects. If the output format or interpretation is incorrect, it needs to be cleaned and corrected. The latter uses domain knowledge to perform logical checks on the extracted rules to ensure there are no issues such as missing responsible parties, ambiguous action descriptions, or contradictions with known operational norms.

[0023] (4) Rule integration and knowledge base construction When power grid emergency response plan texts are processed in segments, different parts of the same rule may be extracted separately. Therefore, it is necessary to merge related rule fragments according to the logic of the rules (such as common triggering conditions or responsible parties) to form a complete and executable rule chain. Finally, the cleaned and merged plan text rules are stored in a graph database or relational database to build a queryable and reasonable power grid accident emergency response plan knowledge base.

[0024] Compared with traditional power grid emergency response plan text rule extraction, although the large language model method has significantly improved in terms of model generalization and automation, it still faces a series of severe technical challenges, including: 1) The controllability and reliability of the output results are questionable. Large language models may generate (or fabricate) seemingly reasonable rules that do not exist in the original power grid emergency response plan text, or over-reason about vague descriptions, creating an "illusion" problem. Furthermore, even with strictly defined prompts, large language models may still output in a non-predictable format or ignore some instructions, making it difficult to guarantee the stability and reliability of the output results. This is precisely what is crucial for power grid emergency command, which demands extremely high accuracy.

[0025] 2) Limited understanding of complex logic and long contexts. Large language models lack sufficient understanding of rule relationships across structures (paragraphs, chapters), while power grid emergency response plans are typically lengthy, and the triggering conditions and execution actions of a complex rule may be scattered across different parts of the plan, making it easy for the model to overlook such long-range dependencies. Furthermore, power grid emergency response plans contain a large number of technical terms and implicit or nested conditional logic (such as "refer to...execute", "depending on the severity of the situation", etc.), making it difficult for large language models to accurately parse the formal rules of the plan text.

[0026] 3) Lack of depth of professional knowledge in the field of power grid emergency response. Theoretically, large language models can be fine-tuned using domain knowledge to understand the specialized terminology and common sense in the field of power grid emergency response for flood and typhoon prevention. However, they still lack an understanding of the inherent logic of professional operational procedures, safety risks, and explanatory standards. Furthermore, the accuracy of verifying the extracted power grid emergency response plan text rules still relies on manual verification by domain experts, which remains a heavy workload.

[0027] 4) Data security and leakage risks. To ensure data security and privacy, it is generally difficult to upload national or regional power grid emergency response plan texts to the public cloud API of a third-party large-scale model. Furthermore, the performance of large-scale models deployed locally after downloading is limited by local resources, resulting in a significant gap compared to networked cloud-based large-scale language models.

[0028] In summary, current large language model methods not only have certain drawbacks in terms of reliability, complex logic processing, domain-specific knowledge, and data security, but also rarely address the formal extraction of rules from flood and typhoon power grid emergency response plan texts, lacking in-depth and systematic research. In reality, flood and typhoon power grid emergency response plans are not only lengthy, but also exhibit diverse formats and significant structural differences across various levels and regions. Therefore, there is an urgent need for efficient and dedicated formal extraction methods for the rules of flood and typhoon power grid emergency response plan texts, providing assistance in rapidly improving the efficiency and intelligence of power grid emergency response decision-making during natural disasters such as floods and typhoons.

[0029] To address the aforementioned technical problems, embodiments of this application provide a formal extraction method for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model, such as... Figure 1 As shown, the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plans based on large language models may include the following steps S101 to S106: Step S101: Collect multiple flood and typhoon prevention power grid emergency response plan documents.

[0030] In this step, for example, the "Emergency Plan for Flood and Typhoon Prevention of State Grid Corporation of China East China Branch", "Emergency Plan for Flood Prevention of State Grid Zhejiang Electric Power Co., Ltd. Ruian Power Supply Company", and "Emergency Plan for Flood Prevention of State Grid Wenzhou Power Supply Company" can be collected. This embodiment does not limit this.

[0031] Step S102: Define the formal description mode of the text rules for flood and typhoon prevention power grid emergency response plan. Define a complete text parsing rule for flood and typhoon prevention power grid emergency response plan as a parsing rule quadruple including subject, object, condition and consequence. Clarify the scope of application, object and function of the extracted text rules for flood and typhoon prevention power grid emergency response plan.

[0032] Step S103: Based on the defined formal description pattern of the flood and typhoon prevention power grid emergency response plan text rules and the formal extraction task of the flood and typhoon prevention power grid emergency response plan text rules, construct an instruction set including task objectives, adjustment methods, and data formats.

[0033] Step S104: Based on the preset first large language model, the constructed instruction set, and the collected multiple flood and typhoon prevention power grid emergency response plan documents, construct a rule-based template-based formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules.

[0034] In this step, the Large Language Model (LLM), or simply large model, has three characteristics: First, as the name suggests, it is large in scale, with network parameters reaching tens or hundreds of billions or even more; second, it is general, meaning it is not limited to specific problems or domains; and third, it is emergent, meaning it generates unexpected new capabilities.

[0035] The large language model can be an open-source large language model. The parameter scale of the large language model can be flexibly configured according to actual needs, such as different orders of magnitude like 671 billion, 14 billion, 32 billion, 7 billion or 1.5 billion. The selection of the number of parameters mainly depends on the computing resource conditions and model performance requirements, and this embodiment does not impose any restrictions on this.

[0036] Step S105: Design a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. Using the constructed corpus and the designed multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, fine-tune and train the preset second language model to obtain a trained formal extraction model of flood and typhoon power grid emergency response plan text rules.

[0037] Step S106: Input the flood and typhoon prevention power grid emergency response plan document to be extracted into the trained flood and typhoon prevention power grid emergency response plan text rule formal extraction model, and output the extraction result of the flood and typhoon prevention power grid emergency response plan text rule formal extraction.

[0038] This embodiment focuses on flood and typhoon prevention power grid emergency response. Through steps such as formal description and definition of emergency response plan text rules, instruction set construction, design of a rule extraction corpus construction process assisted by a large language model, multi-layer negative example perception and weighted collaborative fine-tuning strategy for difference items, and result output, it achieves formal extraction of emergency response plan text rules, improves the efficiency of power grid emergency response and the ability to respond to emergencies, and provides assistance for intelligent decision-making in power grid natural disaster emergency response.

[0039] This application embodiment provides a possible implementation method. In step S104, based on a preset first large language model, a constructed instruction set, and multiple collected flood and typhoon prevention power grid emergency response plan documents, a formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules based on rule templates is constructed. Specifically, this may include the following steps A1 to A4: Step A1: Based on the task objectives in the constructed instruction set, design the annotation template for the extraction rules; Step A2: Use the constructed instruction set and the designed annotation template as model prompt words. Input the model prompt words and the collected flood and typhoon prevention power grid emergency response plan documents into the preset first language model. Use the first language model to automatically annotate the text data of the flood and typhoon prevention power grid emergency response plan to obtain the annotation results. Step A3: Generate standard structured tags for flood and typhoon prevention power grid emergency response plan text based on the annotation results; Step A4: Based on the collected flood and typhoon prevention power grid emergency response plan documents and standard flood and typhoon prevention power grid emergency response plan text structured tags, construct a rule-based template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts.

[0040] In this embodiment, the emergency response plan text for flood and typhoon prevention power grids not only has a complex structure but also contains numerous professional terms and instruction specifications, involving emergency response levels, standards, and handling measures involving multiple departments and stages of cooperation. Therefore, it is crucial to construct a formal extraction corpus of rules for the emergency response plan text based on rule templates, using a large model-assisted formal description and definition process.

[0041] This application embodiment provides a possible implementation method. Step A3 generates standard structured tags for flood and typhoon prevention power grid emergency response plan text based on the annotation results, which may specifically include the following steps A3-1 and A3-2: Step A3-1: Review the annotation results. If the review is successful, the annotation results will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text. Step A3-2: If the review fails, adjust the annotation results and use the adjusted annotation content as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text.

[0042] This embodiment improves the accuracy and reliability of the structured tags in the text of flood and typhoon prevention power grid emergency response plans by introducing a review and adjustment mechanism, thereby providing a high-quality data foundation for subsequent decision-making in the digital emergency command system.

[0043] This application embodiment provides a possible implementation method. In step S105, a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy is designed, which may specifically include the following steps B1 and B2: Step B1: Design a system that uses both positive examples and multiple layers of negative examples for training and weight assignment to enhance the model's accuracy in identifying key error negative example types. Step B2: Design a weighted strategy for differences, assigning differentiated loss weights to negative examples based on their contribution to the class of errors, including field errors, logical errors, and factual errors, and the degree of error.

[0044] This embodiment breaks away from the traditional training model that primarily relies on correct answers (positive examples), instead utilizing positive examples and multiple levels of incorrect answers (negative examples) in a collaborative manner. This allows the model to not only learn how to do things correctly, but also how to avoid doing things incorrectly. Through the design of multiple negative examples, the model's ability to distinguish error types and severity is enhanced, especially maintaining higher sensitivity to critical errors that affect the results (such as logical errors and factual errors), guiding the model to prioritize avoiding serious errors. Through a difference-weighting strategy, the influence of different negative examples in training is dynamically adjusted, allowing the model to focus on the errors with the most improvement value and avoiding overfitting on simple or unimportant errors, thereby improving training stability and efficiency.

[0045] This application embodiment provides a possible implementation method. In step S105, the constructed corpus and the designed multi-layer negative example perception and difference term weighted collaborative fine-tuning strategy are used to fine-tune and train the preset second language model to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules. Specifically, it may include the following steps C1 to C3: Step C1: Using the constructed corpus, generate negative error labels and standard positive error labels; Step C2 involves analyzing the differences between various fields by comparing the negative example labels with the standard positive example labels, thereby constructing a multi-layered difference-aligned data structured information that includes the original label prediction, the standard positive example labels, and the difference descriptions between the labels in the flood and typhoon power grid emergency response plan text. The format of the multi-layered difference-aligned data includes rule text, negative example labels, positive example labels, and difference descriptions. Step C3 involves fine-tuning the second pre-set language model based on the multi-layer difference-aligned data structured information and the difference item weighted collaborative fine-tuning strategy, to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules.

[0046] This embodiment teaches the model to learn correct standard answers (positive examples) and also to explicitly identify and avoid typical, potential errors (negative examples). By constructing multi-layered difference-aligned data, the model can gain a deep understanding of the subtle differences between "correct" and "incorrect." This contrastive learning mechanism effectively teaches the model to proactively avoid pitfalls, thereby reducing misjudgments and generating more accurate and reliable formal rules when processing complex flood and typhoon emergency texts.

[0047] The rule extraction enhancement strategy of multi-layer negative example perception and difference term weighted co-tuning enhances the model's accuracy in identifying key error negative example types by simultaneously using positive examples and multi-layer negative examples for training and weight assignment.

[0048] First, using the same basic large language model (or different large language models), the emergency response plan text for flood and typhoon prevention and power grid is processed to generate plan text rules.

[0049] Secondly, for the batch processing of generative flood and typhoon prevention power grid emergency response plan text rules, following the principle of "as high a weight as possible for critical negative examples and as low a weight as possible for non-critical negative examples," a multi-layered negative example perception structure is designed. That is, in addition to retaining the first-layer negative examples generated by the basic model, the error outputs generated by different fine-tuned models during training iterations are also used as multi-layered negative examples, so that the negative example space covers the error patterns of different model stages, forming a more diverse and realistic error distribution, as shown in the following formula:

[0050] In the formula, It is the first Each sample is input with the same generative rule. ; It is the first A multi-level negative example set of a sample, It's about levels. It is the first The first sample Layer negative example prediction.

[0051] Furthermore, by comparing the erroneous negative example labels generated by the base model with the manually labeled positive example standard labels and analyzing the differences in each field, a multi-layered difference-aligned data structure information of the flood and typhoon power grid emergency response plan text is constructed, including the original label predictions, manually labeled correct labels, and descriptions of differences between labels. The format of the multi-layered difference-aligned data is: rule text, negative example labels, positive example labels, and difference descriptions.

[0052] To enable the model to accurately understand and identify the subtle differences between different error types at different levels, a description of the differences in negative examples at different levels is further constructed. By clearly demonstrating the correct answers and error sources of key negative example types in the text rule extraction of flood and typhoon prevention power grid emergency response plans, a clearer decision boundary is learned, as shown in the following formula:

[0053] In the formula, It is a set of quadruplets. It is the first A sample of standard flood and typhoon prevention power grid emergency response plan text structured tags. It is the first The first sample A structured description of the differences in layered negative examples. It is a function that calculates the difference between two values.

[0054] Subsequently, the aforementioned multi-layered negative example perception structured framework can process the standardized structured text of flood and typhoon prevention power grid emergency response plans in a traditional supervised manner. By allowing the model to learn both positive and negative examples simultaneously, and then correcting key negative example errors based on the difference descriptions, it forms the ability to identify error patterns and improves the model's ability to extract rules from power grid emergency response plan texts.

[0055] To address the potential for multiple errors to occur simultaneously in each layer's description, a difference-weighting strategy is further designed during training. This strategy assigns differentiated loss weights based on the contribution of different categories (field errors, logical errors, factual errors) and error severity to negative examples. This guides the model to assign greater weight to critical errors such as missing fields and broken logical chains, while assigning less weight to minor formatting deviations.

[0056] In the formula, It is the total loss. This indicates the expected value of the content within the parentheses. It is the first The sample at the th Layer fields The weighting coefficients for negative error types; It is cross-entropy; It is the first Sample fields The correct result; It is the first The sample at the th Layer fields The model describes the correction results after correcting negative examples based on the differences.

[0057] Finally, based on the aforementioned weight assignments, the loss of each layer is weighted and averaged to obtain the final loss. Through the collaborative work of multi-layer negative example perception and difference term weighting strategies, the model's ability to learn high-risk negative example errors in the emergency response plan text is significantly enhanced, improving the accuracy of formal rule extraction from flood and typhoon power grid emergency response plan texts and the stability of the output results.

[0058] like Figure 2 The diagram illustrates the multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. The rule text is manually annotated to obtain positive example standard labels. The rule text is processed through multiple base models, including base model 1, base model 2, ..., base model n, to obtain multi-layer negative example labels, namely y(1) first-layer negative example, y(2) second-layer negative example, ..., y(n) nth-layer negative example. Combining the positive example standard labels and multi-layer negative example labels, multi-layer difference alignment data is obtained, namely D(1) first-layer alignment data, D(2) second-layer alignment data, ..., D(n) nth-layer alignment data. Then, according to different categories (field errors, logical errors, factual errors) and error degree, differentiated loss weights are assigned to the contribution of negative examples, and the weighted loss is obtained.

[0059] This embodiment proposes a formal extraction method for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model. This method, focusing on flood and typhoon prevention power grid emergency response, achieves formal extraction of text rules through steps including formal description and definition of emergency response plan text rules, instruction set construction, large model-assisted rule extraction corpus construction process design, multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, and result output. This improves the efficiency of power grid emergency response and its ability to cope with emergencies, providing assistance for intelligent decision-making in power grid natural disaster emergency response. Compared with existing emergency response plan text rule extraction technologies, the formal rule extraction method for flood and typhoon prevention power grid emergency response plans according to this embodiment can achieve at least the following beneficial effects: (1) By using the formal description mode of the defined flood and typhoon prevention power grid emergency response plan text rules, the rule quadruple (subject, object, condition and consequence) in the flood and typhoon prevention power grid emergency response plan text parsing can be clearly and accurately described, ensuring the standardization and consistency of subsequent formal extraction of flood and typhoon prevention power grid emergency response plan text rules and extraction of power grid emergency response plan text rules in other natural disaster scenarios.

[0060] (2) The corpus for extracting flood and typhoon power grid emergency response rules, assisted by the constructed large model, can ensure the accuracy and objectivity of the professional domain data required for the training and fine-tuning of the large language model in flood and typhoon power grid emergency response. Since there are certain structural differences in the texts of power grid emergency response plans at different levels and in different regions, this corpus can be directly applied to or fine-tuned for the analysis of flood and typhoon power grid emergency response plans in other regions. Its construction process can also provide a reference for the analysis of power grid emergency response plan texts for other natural disasters.

[0061] (3) By utilizing the constructed instruction set, when processing the extraction of text rules for flood and typhoon prevention power grid emergency response plans, the generative rules extracted from the basic large language model can be standardized and supervisedly fine-tuned and optimized, thereby improving the simplicity and generalizability of the supervised fine-tuning mode based on the large language model for multiple tasks.

[0062] (4) By using the designed multi-layer negative example perception and difference term weighted collaborative fine-tuning strategy, the model can pay more attention to the types of negative example errors. By assigning different weights to the model for training, the model can improve its sensitivity to the accuracy of formal extraction of the text rules of the flood and typhoon power grid emergency response plan.

[0063] It should be noted that the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. In practical applications, all the above possible implementation methods can be arbitrarily combined in a combined manner to form possible embodiments of this application, which will not be described in detail here.

[0064] Based on the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plans based on large language models provided in the above embodiments, and based on the same inventive concept, this application also provides a formal extraction device for text rules of flood and typhoon prevention power grid emergency response plans based on large language models.

[0065] Figure 3 This is a structural diagram of the formal extraction device for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model, provided in an embodiment of this application. Figure 3 As shown, the formal extraction device for the text rules of the flood and typhoon prevention power grid emergency response plan based on the large language model may specifically include a collection unit 310, a definition unit 320, a first construction unit 330, a second construction unit 340, a fine-tuning unit 350, and an extraction unit 360.

[0066] Collection unit 310 is used to collect multiple flood and typhoon prevention power grid emergency response plan documents; Definition unit 320 is used to define the formal description mode of the text rules of the flood and typhoon prevention power grid emergency response plan. It defines a complete text parsing rule of the flood and typhoon prevention power grid emergency response plan as a parsing rule quadruple including subject, object, condition and consequence, and clarifies the scope of application, object and function of the extracted text rules of the flood and typhoon prevention power grid emergency response plan. The first construction unit 330 is used to construct an instruction set including task objectives, adjustment methods, and data formats based on the defined formal description pattern of the text rules of the flood and typhoon prevention power grid emergency response plan and the formal extraction task of the text rules of the flood and typhoon prevention power grid emergency response plan. The second construction unit 340 is used to construct a formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules based on the preset first large language model, the constructed instruction set and the collected multiple flood and typhoon prevention power grid emergency response plan documents. Fine-tuning unit 350 is used to design a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. Using the constructed corpus and the designed multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, the preset second language model is fine-tuned and trained to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules. Extraction unit 360 is used to input the flood and typhoon prevention power grid emergency response plan document to be extracted into the trained flood and typhoon prevention power grid emergency response plan text rule formal extraction model, and output the formal extraction result of the flood and typhoon prevention power grid emergency response plan text rule.

[0067] This application embodiment provides a possible implementation, wherein the second building unit 340 is further configured to: Based on the task objectives in the constructed instruction set, design annotation templates for extraction rules; The constructed instruction set and the designed annotation template are used as model prompt words. The model prompt words and multiple collected flood and typhoon prevention power grid emergency response plan documents are input into the preset first language model. The first language model is used to automatically annotate the text data of the flood and typhoon prevention power grid emergency response plan to obtain the annotation results. Generate standardized structured tags for flood and typhoon prevention power grid emergency response plans based on the annotation results; Based on the collected flood and typhoon prevention power grid emergency response plan documents and standard text structure tags, a rule-based template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts is constructed.

[0068] This application embodiment provides a possible implementation, wherein the second building unit 340 is further configured to: The annotation results will be reviewed. If the review is approved, the annotation results will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text. If the review fails, the annotation results will be adjusted, and the adjusted annotation content will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text.

[0069] This application embodiment provides a possible implementation, wherein the fine-tuning unit 350 is further configured to: The design utilizes both positive examples and multiple layers of negative examples for training and weight assignment, enhancing the model's accuracy in identifying key error negative example types. Design a difference-weighting strategy to assign differentiated loss weights to negative examples based on their contribution, including field errors, logical errors, and factual errors, and according to the degree of error.

[0070] This application embodiment provides a possible implementation, wherein the extraction unit 360 is further configured to: Using the constructed corpus, generate negative error labels and standard positive error labels; By analyzing the differences between negative example labels and standard positive example labels, a multi-layered difference-aligned data structure information is constructed, which includes original label predictions, standard positive example labels, and descriptions of differences between labels in the flood and typhoon power grid emergency response plan text. The format of the multi-layered difference-aligned data includes rule text, negative example labels, positive example labels, and difference descriptions. Based on the multi-layer difference-aligned data structured information and the difference item weighted collaborative fine-tuning strategy, the pre-set second language model is fine-tuned and trained to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules.

[0071] Based on the same inventive concept, embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model, as described in any of the above embodiments.

[0072] In an exemplary embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4 The illustrated electronic device 400 includes a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, for example, via a bus 402. Optionally, the electronic device 400 may also include a transceiver 404. It should be noted that in practical applications, the transceiver 404 is not limited to one type, and the structure of this electronic device 400 does not constitute a limitation on the embodiments of this application.

[0073] Processor 401 may be a CPU (Central Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0074] Bus 402 may include a pathway for transmitting information between the aforementioned components. Bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 402 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0075] The memory 403 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0076] The memory 403 stores computer program code that executes the scheme of this application, and its execution is controlled by the processor 401. The processor 401 executes the computer program code stored in the memory 403 to implement the content shown in the foregoing method embodiments.

[0077] Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0078] Based on the same inventive concept, this application also provides a storage medium storing a computer program, wherein the computer program is configured to execute the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model in any of the above embodiments when running.

[0079] Based on the same inventive concept, this application also provides a computer program product, including a computer program configured to execute the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model, as described in any of the above embodiments.

[0080] Those skilled in the art will clearly understand that the specific working process of the systems, devices, and modules described above can be referred to the corresponding process in the foregoing method embodiments. For the sake of brevity, it will not be repeated here.

[0081] Those skilled in the art will understand that the technical solution of this application, or all or part of it, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several program instructions to cause an electronic device (e.g., a personal computer, server, or network device) to execute all or part of the steps of the methods described in the embodiments of this application when running the program instructions. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0082] Alternatively, all or part of the steps of the foregoing method embodiments can be implemented by hardware (such as electronic devices like personal computers, servers, or network devices) associated with program instructions. The program instructions can be stored in a computer-readable storage medium. When the program instructions are executed by the processor of the electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of this application.

[0083] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that within the spirit and principles of this application, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the corresponding technical solutions to leave the protection scope of this application.

Claims

1. A method for formally extracting rules from the text of flood and typhoon prevention power grid emergency response plans based on a large language model, characterized in that... The method includes: Collect multiple flood and typhoon prevention power grid emergency response plan documents; Define a formal description model for the text rules of flood and typhoon prevention power grid emergency response plans. Define a complete text parsing rule of flood and typhoon prevention power grid emergency response plan as a parsing rule quadruple including subject, object, condition and consequence. Clarify the scope of application, object and function of the extracted text rules of flood and typhoon prevention power grid emergency response plans. Based on the defined formal description pattern of the text rules for flood and typhoon prevention power grid emergency response plans and the formal extraction task of the text rules for flood and typhoon prevention power grid emergency response plans, an instruction set including task objectives, adjustment methods, and data formats is constructed. Based on the pre-set first major language model, the constructed instruction set, and the collected multiple flood and typhoon prevention power grid emergency response plan documents, a formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules based on rule templates is constructed. We designed a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. Using the constructed corpus and the designed multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, we fine-tuned and trained the pre-set second language model to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules. Input the flood and typhoon prevention power grid emergency response plan documents to be extracted into the trained formal extraction model of the text rules of the flood and typhoon prevention power grid emergency response plan, and output the formal extraction results of the text rules of the flood and typhoon prevention power grid emergency response plan.

2. The method according to claim 1, characterized in that, Based on the pre-defined primary language model, the constructed instruction set, and multiple collected flood and typhoon prevention power grid emergency response plan documents, a rule-template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts is constructed, including: Based on the task objectives in the constructed instruction set, design annotation templates for extraction rules; The constructed instruction set and the designed annotation template are used as model prompt words. The model prompt words and multiple collected flood and typhoon prevention power grid emergency response plan documents are input into the preset first language model. The first language model is used to automatically annotate the text data of the flood and typhoon prevention power grid emergency response plan to obtain the annotation results. Generate standardized structured tags for flood and typhoon prevention power grid emergency response plans based on the annotation results; Based on the collected flood and typhoon prevention power grid emergency response plan documents and standard text structure tags, a rule-based template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts is constructed.

3. The method according to claim 2, characterized in that, Based on the annotation results, standard structured tags are generated for the flood and typhoon prevention power grid emergency response plan text, including: The annotation results will be reviewed. If the review is approved, the annotation results will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text. If the review fails, the annotation results will be adjusted, and the adjusted annotation content will be used as the standard structured tags for the flood and typhoon prevention power grid emergency response plan text.

4. The method according to claim 1, characterized in that, Design a multi-layered negative example perception and difference item weighted collaborative fine-tuning strategy, including: The design utilizes both positive examples and multiple layers of negative examples for training and weight assignment, enhancing the model's accuracy in identifying key error negative example types. Design a difference-weighting strategy to assign differentiated loss weights to negative examples based on their contribution, including field errors, logical errors, and factual errors, and according to the degree of error.

5. The method according to claim 4, characterized in that, Using the constructed corpus and a designed multi-layer negative example perception and difference-weighted collaborative fine-tuning strategy, the pre-set second language model was fine-tuned and trained to obtain a trained formal extraction model for flood and typhoon power grid emergency response plan text rules, including: Using the constructed corpus, generate negative error labels and standard positive error labels; By analyzing the differences between negative example labels and standard positive example labels, a multi-layered difference-aligned data structure information is constructed, which includes original label predictions, standard positive example labels, and descriptions of differences between labels in the flood and typhoon power grid emergency response plan text. The format of the multi-layered difference-aligned data includes rule text, negative example labels, positive example labels, and difference descriptions. Based on the multi-layer difference-aligned data structured information and the difference item weighted collaborative fine-tuning strategy, the pre-set second language model is fine-tuned and trained to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules.

6. A formal extraction device for text rules of flood and typhoon prevention power grid emergency response plans based on a large language model, characterized in that, The device includes: The collection unit is used to collect multiple flood and typhoon prevention power grid emergency response plan documents; The definition unit is used to define the formal description mode of the text rules of the flood and typhoon prevention power grid emergency response plan. It defines a complete text parsing rule of the flood and typhoon prevention power grid emergency response plan as a parsing rule quadruple including subject, object, condition and consequence, and clarifies the scope of application, object and function of the extracted text rules of the flood and typhoon prevention power grid emergency response plan. The first building unit is used to construct an instruction set that includes task objectives, adjustment methods, and data formats based on the formal description pattern of the text rules of the flood and typhoon prevention power grid emergency response plan and the formal extraction task of the text rules of the flood and typhoon prevention power grid emergency response plan. The second construction unit is used to construct a formal extraction corpus of flood and typhoon prevention power grid emergency response plan text rules based on the preset first large language model, the constructed instruction set and the collected multiple flood and typhoon prevention power grid emergency response plan documents. The fine-tuning unit is used to design a multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy. Using the constructed corpus and the designed multi-layer negative example perception and difference item weighted collaborative fine-tuning strategy, the pre-set second language model is fine-tuned and trained to obtain a trained formal extraction model of flood and typhoon prevention power grid emergency response plan text rules. The extraction unit is used to input the flood and typhoon prevention power grid emergency response plan document to be extracted into the trained formal extraction model of the text rules of the flood and typhoon prevention power grid emergency response plan, and output the formal extraction result of the text rules of the flood and typhoon prevention power grid emergency response plan.

7. The apparatus according to claim 6, characterized in that, The second building unit is also used for: Based on the task objectives in the constructed instruction set, design annotation templates for extraction rules; The constructed instruction set and the designed annotation template are used as model prompt words. The model prompt words and multiple collected flood and typhoon prevention power grid emergency response plan documents are input into the preset first language model. The first language model is used to automatically annotate the text data of the flood and typhoon prevention power grid emergency response plan to obtain the annotation results. Generate standardized structured tags for flood and typhoon prevention power grid emergency response plans based on the annotation results; Based on the collected flood and typhoon prevention power grid emergency response plan documents and standard text structure tags, a rule-based template-based formal extraction corpus for flood and typhoon prevention power grid emergency response plan texts is constructed.

8. An electronic device, characterized in that, The method includes a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model, as described in any one of claims 1 to 5.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute, at runtime, the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model, as described in any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that, The computer program is configured to execute, at runtime, the formal extraction method for text rules of flood and typhoon prevention power grid emergency response plan based on a large language model, as described in any one of claims 1 to 5.