Method for automatically generating structured emergency plan template in power industry

Through the automatic generation method of structured emergency plan templates, a large language model and a two-way coding language model are used to extract key information from unstructured texts, solving the problem of inefficiency caused by relying on manual labor in the formulation of emergency plans in the power industry, and achieving rapid and high-precision emergency plan template generation.

CN119578388AActive Publication Date: 2025-03-07STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1

Patent Information

Application Number
CN202411626354.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The formulation of emergency plans in the power industry relies on manual extraction of plan template information, which consumes manpower and material resources, and is slow in formulation and unclear matching.

Method used

The automatic generation method of structured emergency plan templates is adopted. By formulating power situation plan text writing standards, using a generative large language model and a two-way coding pre-trained language model, key information is extracted from unstructured texts, and structured emergency plan templates are generated.

Benefits of technology

It greatly shortens the template generation time, reduces the labor intensity of personnel, improves the generation accuracy, reduces the error caused by manual operations, and realizes the rapid generation of emergency plan templates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578388A_ABST
    Figure CN119578388A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically generating a structured emergency plan template in the power industry, and the method comprises the steps: formulating a power scenario plan text writing standard, normalizing a non-structured scenario plan text format, and obtaining a normalized scenario plan text; inputting the standardized scene plan text into a generative large language model, extracting scene information, and generating scene description; establishing a structured emergency plan basic information base; performing semantic matching by using the bidirectional coding pre-training language model, and extracting behavior feature information; the generative large language model generates behavior description information; and constructing a structured plan template generation module, and generating a structured emergency plan template in a specific scene. According to the method, the template generation time is greatly shortened, the labor intensity of workers is reduced, the extraction method based on the large language model is higher in precision, errors caused by manual operation are greatly reduced, rapid generation of the emergency plan template is achieved, and the generation efficiency of the emergency plan template is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of safety emergency technology in the electric power industry, and in particular to a method for automatically generating a structured emergency plan template in the electric power industry. Background Art

[0002] With the rapid development of society, the power system, as an important part of the national infrastructure, is of vital importance to the national economy and people's lives. However, factors such as natural disasters, equipment failures, and human operational errors may trigger emergencies in the power system, which will have a serious impact on social stability and people's lives. Therefore, it has become a key issue for the power industry to quickly formulate effective emergency plans for the power industry in response to various emergencies in different scenarios.

[0003] The traditional emergency plan formulation process in the power industry usually requires a lot of manpower, material resources and time investment, and is often difficult to adapt to the rapidly changing environment and the diversity of emergencies. The emergency plan template is the basis for the rapid formulation of emergency plans. The traditional emergency plan template generation mainly relies on manual extraction of the main information in the plan template, which has the disadvantages of slow speed and unclear matching. Summary of the invention

[0004] The purpose of the present invention is to provide a method for automatically generating a structured emergency plan template for the power industry. The method aims to solve the problem that the emergency plan formulation in the power industry in the prior art mainly relies on manually extracting the main information in the plan template to formulate the emergency plan, which consumes manpower and material resources, and the formulation speed of the emergency plan template is slow and the matching is unclear.

[0005] To achieve the above object, the present invention is implemented through the following technical solutions:

[0006] The present invention provides a method for automatically generating a structured emergency plan template for the power industry, comprising:

[0007] Step S1: Formulate a standard for writing power scenario plan texts, standardize the format of unstructured scenario plan texts, and obtain standardized scenario plan texts;

[0008] Step S2: inputting the standardized scenario plan text into a generative large language model, extracting scenario information from the standardized scenario plan text, and generating a scenario description;

[0009] Step S3: Establish a structured emergency plan basic information database;

[0010] Step S4: inputting the standardized scenario plan text and the information database into a language similarity model, and performing semantic matching between the standardized scenario plan text and each sub-database in the information database to extract behavior feature information;

[0011] Step S5: calling the generative large language model, inputting the scenario description and the behavior feature information into the generative large language model to generate behavior description information;

[0012] Step S6: construct a structured emergency plan template generation module, input the scenario description, the behavior characteristic information and the behavior description information into the structured emergency plan template generation module, and obtain a structured emergency plan template under a specific scenario.

[0013] Preferably, the step S1 comprises formulating a standard for writing a power scenario plan text, standardizing the format of an unstructured scenario plan text, and obtaining a standardized scenario plan text, which specifically includes: the content of the power scenario plan text includes: scenario name, scenario category, scenario label and scenario detailed description.

[0014] Preferably, the scenario information is extracted from the standardized scenario plan text in step S2, and the extracted scenario information specifically includes: scenario name, scenario category and scenario label, and the scenario description is generated using the generative large language model based on the extracted scenario information.

[0015] Preferably, the establishment of a structured emergency plan basic information base in step S3 specifically includes: collecting and collating representative emergency plan texts for the power industry, manually extracting information from the representative emergency plan texts for the power industry, and establishing the information base based on the extracted information from the representative emergency plan texts for the power industry.

[0016] Preferably, the manually extracted information in the representative emergency plan text of the power industry includes: behavior name, scenario category, behavior label, behavior role and behavior keyword.

[0017] Preferably, each sub-library of the information library is created according to the content of the information in the information library, and each sub-library of the information library includes:

[0018] Behavior name library, which is the standardized abbreviation of various behaviors in various emergency scenarios;

[0019] The scene category library is a collection of names of various scenes;

[0020] Behavior tag library, which is used to describe the relationships and commands of behavior subjects in emergency response plans;

[0021] Behavior role database, which includes information on relevant personnel, government departments, and enterprises and institutions;

[0022] The behavior keyword library is used to summarize various behaviors in the emergency plan.

[0023] Preferably, in step S4, the semantic matching of the standardized scenario plan text with each sub-database in the information database specifically includes:

[0024] Importing the standardized scenario plan text and the behavior features in the information database into the bidirectional encoding pre-trained language model respectively;

[0025] The bidirectional encoding pre-trained language model encodes the imported normalized scenario plan text and the behavior features through an encoder to obtain encoded scenario plan text sentences and encoded behavior information respectively;

[0026] Calculating cosine similarity based on the encoded scenario plan text sentence and the encoded behavior information;

[0027] The behavior feature information is extracted according to the calculation result of the cosine similarity.

[0028] Preferably, the calculation expression of the cosine similarity is:

[0029]

[0030] Wherein, a represents the encoded scenario plan text sentence expressed as a vector after encoding, b represents the encoded behavior information expressed as a vector, and θ represents the angle between vector a and vector b.

[0031] Preferably, the similarity between the scenario plan text sentence and the behavior information is determined based on the similarity calculated by the cosine similarity, specifically:

[0032] Determine the degree of closeness of the cosine similarity cosθ to 1, the higher the degree of closeness of the cosine similarity cosθ to 1, the higher the similarity between the scenario plan text sentence and the behavior information;

[0033] The degree of proximity of the cosine similarity cosθ to 0 is determined. The higher the degree of proximity of the cosine similarity cosθ to 0, the lower the similarity between the scenario plan text sentence and the behavior information.

[0034] Preferably, in step S6, the steps of constructing a structured emergency plan template generation module and obtaining a structured emergency plan template under a specific scenario specifically include:

[0035] By calling the Python library for processing Excel files, a structured emergency plan template generation module is constructed, and the scenario description, the behavior characteristic information and the behavior description information are input into the Excel format structured plan basic template in the structured emergency plan template generation module to obtain a structured emergency plan template for a specific scenario.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] 1) Traditional emergency plan generation templates require manual screening of behavior names, scene categories, behavior labels, behavior keywords, and behavior roles. The present invention uses a generative large language model and a bidirectional encoding pre-trained language model to extract key information from unstructured text, which can greatly shorten the template generation time and reduce the labor intensity of personnel. At the same time, the extraction method based on the large language model has higher accuracy and can greatly reduce the errors caused by manual operation.

[0038] 2) In the semantic matching proposed by the present invention, by constructing a structured emergency plan basic information database, it is only necessary to semantically match the sentences in the standardized scenario plan text with the behavioral information in the information database, which greatly reduces the amount of model calculation, improves the operating efficiency of the model, and realizes the rapid generation of emergency plan templates.

[0039] 3) The generation of traditional emergency plan template files requires manual creation of Excel spreadsheet files. The present invention constructs a structured plan template generation module, and constructs a structured plan basic template in Excel format by calling a Python library for processing Excel files. It only needs to import the extracted scenario information, behavior feature information and behavior description information into the structured plan template generation module to generate a structured emergency plan template for a specific scenario, thereby further improving the generation efficiency of the emergency plan template. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for the description. Obviously, the drawings described below are an embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work:

[0041] Figure 1 A flowchart of a method for automatically generating a structured emergency plan template for the power industry provided by an embodiment of the present invention;

[0042] Figure 2 A semantic matching flowchart of a method for automatically generating structured emergency plan templates for the power industry provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following is combined with Figure 1 to Figure 2Specific implementation method A method for automatically generating a structured emergency plan template for the power industry proposed in the present invention is further described in detail. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the implementation method of the present invention. In order to make the purposes, features and advantages of the present invention more obvious and easy to understand, please refer to the drawings. It should be noted that the structure, proportion, size, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so it has no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope of the technical content disclosed in the present invention.

[0044] In order to solve the problem that the formulation of emergency plans for the power industry in the existing technology mainly relies on manual extraction of key information in the plan template to formulate emergency plans, which consumes manpower and material resources, and the formulation speed of the emergency plan template is slow and the matching is unclear.

[0045] refer to Figure 1 As shown, this embodiment provides a method for automatically generating a structured emergency plan template for the power industry, comprising the following steps:

[0046] Step S1: Formulate a standard for writing a power scenario plan text to obtain a standardized scenario plan text. The content of the power scenario plan text includes: scenario name, scenario category, scenario label and scenario detailed description.

[0047] Step S2: Input the standardized scenario plan text into a generative large language model, and the generative large language model in this embodiment is a ChatGLM model (Chat Generative Language Model). Extract scenario information from the standardized scenario plan text. The extracted scenario information specifically includes: scenario name, scenario category and scenario label. According to the extracted scenario information, the ChatGLM model generates a scenario description.

[0048] Step S3: Establish a structured emergency plan basic information database. Collect and organize representative emergency plan texts for the power industry, manually extract information from the representative emergency plan texts for the power industry, and establish the information database based on the information extracted from the representative emergency plan texts for the power industry. The manually extracted information from the representative emergency plan texts for the power industry includes: behavior name, scenario category, behavior label, behavior role, and behavior keyword.

[0049] The sub-libraries of the information database are created according to the content of the information in the information database, and the sub-libraries of the information database include: a behavior name library, which is the standardized abbreviation of various behaviors in various emergency scenarios; a scene category library, which is a collection of various scene names; a behavior label library, which is used to describe the relationship and command of the behavior subjects in the emergency plan; a behavior role library, which includes relevant personnel information, government departments and enterprises and institutions; a behavior keyword library, which is used to summarize various behaviors in the emergency plan.

[0050] Step S4: Input the standardized scenario plan text and the information library into a bidirectional encoding pre-trained language model, which is an SBERT model (Sentence-BERT, sentence bidirectional encoding representation model) in this embodiment. Semantic matching is performed on the standardized scenario plan text and each sub-library in the information library to extract behavioral feature information.

[0051] The semantic matching of the standardized scenario plan text with each sub-library in the information library specifically includes: importing the standardized scenario plan text and the behavioral features in the information library into the SBERT model respectively; the SBERT model encodes the imported standardized scenario plan text and the behavioral features respectively through an encoder to obtain encoded scenario plan text sentences and encoded behavioral information respectively; calculating cosine similarity based on the encoded scenario plan text sentences and the encoded behavioral information; and extracting the behavioral feature information based on the calculation result of the cosine similarity.

[0052] The calculation expression of the cosine similarity is:

[0053]

[0054] Wherein, a represents the encoded scenario plan text sentence expressed as a vector after encoding, b represents the encoded behavior information expressed as a vector, and θ represents the angle between vector a and vector b.

[0055] Determine the degree of closeness of the cosine similarity cosθ to 1, the higher the degree of closeness of the cosine similarity cosθ to 1, the higher the similarity between the scenario plan text sentence and the behavior information;

[0056] The degree of proximity of the cosine similarity cosθ to 0 is determined. The higher the degree of proximity of the cosine similarity cosθ to 0, the lower the similarity between the scenario plan text sentence and the behavior information.

[0057] The cosine similarity is calculated, and the scenario plan text sentence with the highest cosine similarity is used as the output of each behavior information, so as to extract the key behavior feature information such as the behavior name, scene category, behavior label, behavior role and behavior keyword in the scenario plan text.

[0058] Step S5: calling the ChatGLM model, inputting the scenario description and the behavior feature information into the ChatGLM model to generate behavior description information;

[0059] Step S6: construct a structured emergency plan template generation module, input the scenario description, the behavior characteristic information and the behavior description information into the structured emergency plan template generation module, and obtain a structured emergency plan template under a specific scenario.

[0060] The construction of the structured emergency plan template generation module and the obtaining of the structured emergency plan template under the specific scenario specifically include: calling a Python library for processing Excel files. In this embodiment, the Python library for processing Excel files called is the Openpyxl library. The structured emergency plan template generation module is constructed, and the scenario description, the behavior feature information, and the behavior description information are input into the Excel format structured emergency plan basic template in the structured emergency plan template generation module to obtain the structured emergency plan template under the specific scenario.

[0061] The EXCEL format structured plan basic template is an EXCEL format document generated by calling the Openpyxl library, and the format is shown in the following table:

[0062]

[0063] In summary, the traditional emergency plan generation template requires manual screening of behavior names, scenario categories, behavior labels, behavior keywords, and behavior roles. The automatic generation method of structured emergency plan templates for the power industry proposed in this embodiment extracts key information from unstructured text through the ChatGLM model and the SBERT model, which can greatly shorten the template generation time and reduce the labor intensity of personnel. At the same time, the extraction method based on the large language model has higher accuracy and can greatly reduce the errors caused by manual operation. In the semantic matching proposed in this embodiment, by constructing a structured emergency plan basic information database, it is only necessary to semantically match the sentences in the standardized scenario plan text with the behavior information in the information database, which greatly reduces the amount of calculation of the model, improves the operating efficiency of the model, and realizes the rapid generation of emergency plan templates. The generation of traditional emergency plan template files requires manual creation of Excel spreadsheet files. This embodiment constructs a structured plan template generation module, and constructs a structured plan basic template in Excel format by calling a Python library that processes Excel files. It only needs to import the extracted scenario information, behavior feature information, and behavior description information into the structured plan template generation module to generate a structured emergency plan template for a specific scenario, thereby further improving the generation efficiency of the emergency plan template.

[0064] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0065] It should be noted that the devices and methods disclosed in the embodiments of this article can also be implemented in other ways. The device implementation described above is only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of this article. In this regard, each box in the flowchart or block diagram can represent a part of a module, program or code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system for performing a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0066] In addition, the functional modules in the various embodiments of this document may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0067] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.

Claims

1. A method for automatically generating a structured emergency plan template for the power industry, characterized in that: include: Step S1: Formulate a standard for writing power scenario plan texts, standardize the format of unstructured scenario plan texts, and obtain standardized scenario plan texts; Step S2: inputting the standardized scenario plan text into a generative large language model, extracting scenario information from the standardized scenario plan text, and generating a scenario description; Step S3: Establish a structured emergency plan basic information database; Step S4: inputting the standardized scenario plan text and the information library into a bidirectional encoding pre-trained language model, and performing semantic matching on the standardized scenario plan text and each sub-library in the information library to extract behavioral feature information; Step S5: calling the generative large language model, inputting the scenario description and the behavior feature information into the generative large language model to generate behavior description information; Step S6: construct a structured emergency plan template generation module, input the scenario description, the behavior characteristic information and the behavior description information into the structured emergency plan template generation module, and obtain a structured emergency plan template under a specific scenario.

2. The method for automatically generating a structured emergency plan template for the power industry according to claim 1, characterized in that: The step S1 of formulating a power scenario plan text writing standard, standardizing the unstructured scenario plan text format, and obtaining a standardized scenario plan text specifically includes: The content of the power scenario plan text includes: scenario name, scenario category, scenario label and scenario detailed description.

3. The method for automatically generating a structured emergency plan template for the power industry according to claim 1, characterized in that: The scenario information extracted in step S2 specifically includes: scenario name, scenario category and scenario label. Based on the extracted scenario information, the scenario description is generated using the generative large language model.

4. The method for automatically generating a structured emergency plan template for the power industry according to claim 1, characterized in that: The step S3 described in establishing a structured emergency plan basic information database specifically includes: collecting and arranging representative emergency plan texts of the power industry, manually extracting information from the representative emergency plan texts of the power industry, and establishing the information database based on the extracted information from the representative emergency plan texts of the power industry.

5. The method for automatically generating a structured emergency plan template for the power industry according to claim 4, characterized in that: The manually extracted information in the representative emergency plan text of the power industry includes: behavior name, scenario category, behavior label, behavior role and behavior keyword.

6. The method for automatically generating a structured emergency plan template for the power industry according to claim 4, characterized in that: Each sub-library of the information library is created according to the content of the information in the information library, and each sub-library of the information library includes: Behavior name library, which is the standardized abbreviation of various behaviors in various emergency scenarios; The scene category library is a collection of names of various scenes; Behavior tag library, which is used to describe the relationships and commands of behavior subjects in emergency response plans; Behavior role database, which includes information on relevant personnel, government departments, and enterprises and institutions; The behavior keyword library is used to summarize various behaviors in the emergency plan.

7. The method for automatically generating a structured emergency plan template for the power industry according to claim 1, characterized in that: In step S4, the semantic matching of the standardized scenario plan text with each sub-database in the information database specifically includes: Import the standardized scenario plan text and the behavior features in the information library into the bidirectional encoding pre-trained language model respectively The bidirectional encoding pre-trained language model encodes the imported normalized scenario plan text and the behavior features through an encoder to obtain encoded scenario plan text sentences and encoded behavior information respectively; Calculating cosine similarity based on the encoded scenario plan text sentence and the encoded behavior information; The behavior feature information is extracted according to the calculation result of the cosine similarity.

8. The method for automatically generating a structured emergency plan template for the power industry according to claim 7, characterized in that: The calculation expression of the cosine similarity is: Wherein, a represents the encoded scenario plan text sentence expressed as a vector after encoding, b represents the encoded behavior information expressed as a vector, and θ represents the angle between vector a and vector b.

9. The method for automatically generating a structured emergency plan template for the power industry according to claim 8, characterized in that: According to the similarity calculated by the cosine similarity, the similarity between the scenario plan text sentence and the behavior information is determined, specifically: Determine the degree of closeness of the cosine similarity cosθ to 1, the higher the degree of closeness of the cosine similarity cosθ to 1, the higher the similarity between the scenario plan text sentence and the behavior information; The degree of proximity of the cosine similarity cosθ to 0 is determined. The higher the degree of proximity of the cosine similarity cosθ to 0, the lower the similarity between the scenario plan text sentence and the behavior information.

10. The method for automatically generating a structured emergency plan template for the power industry according to claim 1, characterized in that: In step S6, the construction of a structured emergency plan template generation module and the acquisition of a structured emergency plan template under a specific scenario specifically include: By calling the Python library for processing Excel files, a structured emergency plan template generation module is constructed, and the scenario description, the behavior characteristic information and the behavior description information are input into the Excel format structured plan basic template in the structured emergency plan template generation module to obtain a structured emergency plan template for a specific scenario.

Citation Information

Patent Citations

  • Power scene reappearing method and system and computer readable storage medium

    CN111815000A

  • Scene deduction method and device, electronic equipment and storage medium

    CN116433435A

  • Emergency plan generation system and method based on large language model

    CN117668155A

  • Emergency plan structured disassembly method and device based on large language model

    CN118013954A

Cited By

  • Power industry personalized document generation method and related device

    CN120579638A