Power grid document automatic generation method and device based on adaptive attention mechanism

By automatically generating power grid documents through an adaptive attention mechanism and a BiLSTM model, combined with manual verification and corpus optimization, the problems of time-consuming and laborious power grid document writing and the inapplicability of template libraries have been solved, achieving efficient and accurate document generation.

CN114239568BActive Publication Date: 2026-04-14STATE GRID FUJIAN ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID FUJIAN ELECTRIC POWER CO LTD
Filing Date
2021-11-10
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The current system of writing official documents for the power grid relies on manual operation, which is time-consuming and labor-intensive, and it is difficult to guarantee accuracy and comprehensiveness. In addition, the use of template libraries is often unsuitable.

Method used

An adaptive attention mechanism is adopted, which combines the power grid document format with deep learning. The BiLSTM model is used to generate document text features, and the adaptive attention mechanism is used to select appropriate words. The results are then combined with manual verification and corpus optimization.

Benefits of technology

It enables efficient and automatic generation of power grid documents, ensuring accuracy and comprehensiveness, reducing manual intervention, and avoiding the problem of inapplicable template libraries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239568B_ABST
    Figure CN114239568B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of power grid official document automatic generation methods based on adaptive attention mechanism, comprising: obtaining the power grid official document information input by user;Using common attention mechanism model, the text features input by user are extracted from the power grid official document information, and context feature vector is generated, the corresponding weight of the text features input by user is given, so that model can obtain the multi-window text features input by user;The text features input by user are modeled by sentence BiLSTM model, and sentence theme is generated;Using the word BiLSTM model based on adaptive attention mechanism, power grid official document is automatically generated;After artificial checking and confirming to the power grid official document automatically generated, the result after artificial confirmation is expanded to power grid official document corpus.The power grid official document automatic generation method and device based on adaptive attention mechanism provided in the application save time and labor, while guaranteeing the accuracy and comprehensiveness of power grid official document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method and apparatus for automatically generating official documents for power grids based on an adaptive attention mechanism. Background Technology

[0002] In recent years, the company has seen a continuous emergence of lean management requirements and innovation needs across various professional fields, leading to increasingly higher work standards and a faster pace of work. To reduce low-level repetitive labor and improve work efficiency and quality, the company's office informatization work has focused on intelligent applications, striving to build an administrative office information system that is more user-friendly, more intelligent, and more convenient. This aims to transform the information system from a "management tool" to an "office assistant," thereby enhancing the value of office informatization work.

[0003] Power grid official documents are legally binding and standardized official documents generated during the company's management process. They are important tools for arranging production and operation activities, assigning and negotiating work, reporting situations, and exchanging experiences. However, in the past, document writing mainly relied on manual writing by staff, confirming writing templates, and consulting a large amount of relevant policies, regulations, and other materials. This method heavily depended on the staff's prior knowledge, which was not only time-consuming and laborious but also prone to omissions, making it difficult to guarantee the accuracy and comprehensiveness of power grid official documents.

[0004] Therefore, it is necessary to conduct research on automatic document writing technology for power grids. By combining this with deep learning technology, we can promote the deep integration of document writing and intelligent applications, significantly advancing the intelligent construction of office platforms from the perspective of fundamental key technologies. This will effectively improve user experience, reduce the burden on grassroots staff, and increase work efficiency. Existing automatic document writing technologies sometimes require significant manual effort to refine word choice and sentence structure, and sometimes require the prior preparation of large template libraries, which inevitably leads to situations where the template libraries are unsuitable. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method and apparatus for automatically generating power grid documents based on an adaptive attention mechanism, which saves time and manpower while ensuring the accuracy and comprehensiveness of power grid documents.

[0006] In a first aspect, the present invention provides an automatic generation method for power grid documents based on an adaptive attention mechanism, comprising:

[0007] Obtain power grid document information input by the user;

[0008] The common attention mechanism model is used to extract the text features of user input from the power grid documents and generate a context feature vector. The context feature vector is used to assign corresponding weights to the text features of user input, so that the model can obtain the multi-window text features of user input.

[0009] The sentence topic is generated by modeling the text features input by the user using a sentence BiLSTM model.

[0010] Automatic generation of power grid documents using a word BiLSTM model based on an adaptive attention mechanism;

[0011] After manually verifying and confirming the automatically generated power grid documents, the results of the manual verification are expanded into the power grid document corpus.

[0012] Furthermore, the power grid document information includes: guidelines, policies and regulations for power grid document writing, keywords and phrases, core sentences, and document titles.

[0013] Furthermore, the shared attention mechanism model is a ResNet model.

[0014] Furthermore, the automatic generation of power grid documents using a word BILSTM model based on an adaptive attention mechanism specifically includes: when generating each word of a power grid document, first generating document text features through a word BILSTM model, and then determining whether to generate the current word based on the text features input by the user, the sentence topic generated by the sentence BILSTM model, or the already generated document text features.

[0015] Furthermore, before expanding the manually verified results into the power grid document corpus after manually verifying and confirming the automatically generated power grid documents, the method further includes: when manually verifying the automatically generated power grid documents, displaying the source and related information of the power grid document corpus for automatically generated sentences according to user instructions; the power grid document corpus includes historical power grid documents and previously automatically generated documents that have been manually verified.

[0016] Secondly, the present invention provides an automatic power grid document generation device based on an adaptive attention mechanism, comprising: an input module, a text feature recognition module, a sentence topic generation module, a power grid document generation module, and a sample supplementation module;

[0017] The input module is used to obtain power grid document information input by the user;

[0018] The text feature recognition module uses a common attention mechanism model to extract the text features input by the user from the power grid documents and generates a context feature vector. The context feature vector is used to assign corresponding weights to the text features input by the user, so that the model can obtain the multi-window text features input by the user.

[0019] The sentence topic generation module models the text features input by the user using a sentence BiLSTM model to generate sentence topics.

[0020] The power grid document generation module is used to automatically generate power grid documents using a word BiLSTM model based on an adaptive attention mechanism.

[0021] The sample supplementation module is used to expand the manually verified results into the power grid document corpus after the automatically generated power grid documents have been manually verified and confirmed.

[0022] Furthermore, the power grid document information includes: guidelines, policies and regulations for power grid document writing, keywords and phrases, core sentences, and document titles.

[0023] Furthermore, the shared attention mechanism model is a ResNet model.

[0024] Furthermore, the power grid document generation module is specifically used to: when generating each word of the power grid document, first generate document text features through a word BILSTM model, and then use an adaptive attention mechanism to determine whether to generate the current word based on the text features input by the user, the sentence topic generated by the sentence BILSTM model, or the already generated document text features.

[0025] Furthermore, prior to the sample replenishment module, a source display module is also included;

[0026] The source display module is used to display the source and related information of the power grid document corpus of automatically generated sentences according to user instructions when manually verifying automatically generated power grid documents; the power grid document corpus includes historical power grid documents and previously automatically generated documents that have been manually verified.

[0027] The technical solutions provided in the embodiments of the present invention have the following technical effects or advantages:

[0028] By combining the format and wording characteristics of power grid official documents with the advantages of deep learning, the automatic generation of power grid official documents has been achieved more accurately and effectively. It eliminates the need for extensive manual work in refining wording and phrasing, and possesses adaptive capabilities to the requirements of power grid official document terminology and format. This avoids both the need for pre-prepared large template libraries and the possibility of template libraries being unsuitable.

[0029] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0031] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention;

[0032] Figure 2 This is a schematic diagram of the device in Embodiment 2 of the present invention. Detailed Implementation

[0033] The technical problem to be solved by the present invention is to provide a method and apparatus for automatically generating power grid documents based on an adaptive attention mechanism, which saves time and manpower while ensuring the accuracy and comprehensiveness of power grid documents.

[0034] The overall concept of the technical solution in this application is as follows:

[0035] Existing automated document writing technologies sometimes require significant manual effort to refine word choice and sentence structure, while others necessitate the pre-preparation of large template libraries, which are prone to inapplicability. To address these issues, this invention proposes an automated document generation method for power grid documents based on an adaptive attention mechanism. This method fully integrates the format, word and phrase characteristics of power grid documents with the advantages of deep learning, achieving more accurate and effective automated document generation. A corpus of power grid documents is constructed by manually annotating key writing information such as keywords, sentence structures, and sentence-paragraph conjunctions in historical power grid documents. Based on this corpus, a common attention mechanism and an adaptive attention mechanism are combined to effectively integrate document format and textual features, achieving high-quality automated generation of power grid documents.

[0036] Example 1

[0037] This embodiment provides a method for automatically generating power grid documents based on an adaptive attention mechanism, such as... Figure 1 As shown, it may include the following steps:

[0038] 1. User input

[0039] The system retrieves user-inputted information from power grid documents. Users can input guidelines, policies, and regulations, keywords and phrases, core sentences, and document titles. It provides functions such as searching the power grid document corpus, related recommendations, and spelling correction to facilitate quick and easy data entry. The guidelines, policies, and regulations are the information required to be included in the opening sentence of the document's main text.

[0040] 2. Input text feature recognition

[0041] By using a common attention mechanism to fuse and weight the ResNet model, the text features input by the user are extracted from the power grid documents, and a context feature vector is generated. The context feature vector is then used to assign corresponding weights to the text features such as words, phrases, sentences, and titles input by the user, enabling the model to obtain the multi-window text features input by the user.

[0042] 3. Sentence Topic Generation

[0043] Based on the text features obtained from user input, a sentence topic generation model using BiLSTM is used to uniformly model the text features, the overall topic of the document, and the topics of each sentence to generate sentence topics. The nonlinear fitting capability of the BiLSTM model is used to establish the mapping relationship between the distribution of power grid document topics and the text input features.

[0044] Bidirectional Long Short-Term Memory (BiLSTM) networks are composed of forward LSTM and backward LSTM. Both are commonly used in natural language processing tasks to model contextual information, and BiLSTM can better capture bidirectional semantic dependencies.

[0045] 4. Automatic document generation

[0046] Automatic generation of power grid documents using a word BILSTM model based on an adaptive attention mechanism.

[0047] When generating each word in a power grid document, the document text features are first generated using a word BILSTM model. Then, an adaptive attention mechanism determines whether to generate the current word based on the user-input text features, the sentence topic generated by a sentence BILSTM model, or the already generated document text features. By selecting the most suitable word from multiple results to construct the sentence, the fluency of the sentence is ensured.

[0048] 5. Manual correction and corpus supplementation

[0049] When manually verifying automatically generated power grid documents, the source of the automatically generated sentences from the power grid document corpus and related materials can be displayed according to user instructions.

[0050] After manually verifying and confirming the automatically generated power grid documents, the results of the manual verification are added to the power grid document corpus. Therefore, the power grid document corpus includes historical power grid documents and previously manually verified automatically generated documents.

[0051] By reviewing the corpus sources and related materials of the automatically generated sentences in official documents, the automatically generated power grid documents are manually verified and confirmed. The results of the manual verification are then expanded into the power grid document database to regularly optimize the parameters of the power grid document automatic writing model and improve the model's performance.

[0052] The word BILSTM model based on an adaptive attention mechanism was used to generate each word in the power grid official document text. Furthermore, the inclusion of the adaptive attention mechanism addresses, to some extent, the issue of aligning user-input text features with the document format requirements. When the word BILSTM generates the current word, it selects appropriate and effective features for words with different characteristics to support its generation, thus improving the accuracy and quality of the automatic generation of power grid official document text.

[0053] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2.

[0054] Example 2

[0055] This embodiment provides an automatic power grid document generation device based on an adaptive attention mechanism, such as... Figure 2 As shown, it includes: an input module, a text feature recognition module, a sentence topic generation module, a power grid document generation module, and a sample supplementation module;

[0056] The input module is used to obtain power grid document information input by the user;

[0057] The text feature recognition module uses a common attention mechanism model to extract the text features input by the user from the power grid documents and generates a context feature vector. The context feature vector is used to assign corresponding weights to the text features input by the user, so that the model can obtain the multi-window text features input by the user.

[0058] The sentence topic generation module models the text features input by the user using a sentence BiLSTM model to generate sentence topics.

[0059] The power grid document generation module is used to automatically generate power grid documents using a word BiLSTM model based on an adaptive attention mechanism.

[0060] The sample supplementation module is used to expand the manually verified results into the power grid document corpus after the automatically generated power grid documents have been manually verified and confirmed.

[0061] As a specific implementation of an embodiment of the present invention:

[0062] The information in the power grid documents includes: guidelines, policies and regulations for power grid document writing, keywords and phrases, core sentences, and document titles.

[0063] The shared attention mechanism model is the ResNet model.

[0064] The power grid document generation module is specifically used to: when generating each word in a power grid document, first generate document text features through a word BILSTM model, and then use an adaptive attention mechanism to determine whether to generate the current word based on the text features input by the user, the sentence topic generated by the sentence BILSTM model, or the already generated document text features.

[0065] Prior to the sample replenishment module, a source display module is also included;

[0066] The source display module is used to display the source and related information of the power grid document corpus of automatically generated sentences according to user instructions when manually verifying automatically generated power grid documents; the power grid document corpus includes historical power grid documents and previously automatically generated documents that have been manually verified.

[0067] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.

[0068] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0069] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0070] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0071] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0072] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for automatically generating official documents for power grids based on an adaptive attention mechanism, characterized in that, include: Obtain power grid document information input by the user; The common attention mechanism model is used to extract the text features of user input from the power grid documents and generate a context feature vector. The context feature vector is used to assign corresponding weights to the text features of user input, so that the model can obtain the multi-window text features of user input. The text features of user input are modeled by a sentence BiLSTM model to generate sentence topics. Specifically, the common attention mechanism model is a ResNet model. Automatic generation of power grid documents using a word BiLSTM model based on an adaptive attention mechanism; specifically, when generating each word in a power grid document, the document text features are first generated using a word BiLSTM model, and then the adaptive attention mechanism determines whether to generate the current word based on the text features input by the user, the sentence topic generated by the sentence BiLSTM model, or the already generated document text features. After manually verifying and confirming the automatically generated power grid documents, the results of the manual verification are expanded into the power grid document corpus.

2. The method according to claim 1, characterized in that, The information in the power grid documents includes: guidelines, policies and regulations for power grid document writing, keywords and phrases, core sentences, and document titles.

3. The method according to claim 1, characterized in that: Before expanding the automatically generated power grid documents into the power grid document corpus after manual verification and confirmation of the automatically generated documents, the method further includes: when manually verifying the automatically generated power grid documents, displaying the source and related information of the power grid document corpus of automatically generated sentences according to user instructions; the power grid document corpus includes historical power grid documents and previously automatically generated documents that have been manually confirmed.

4. An automatic power grid document generation device based on an adaptive attention mechanism, characterized in that, include: The system includes an input module, a text feature recognition module, a sentence topic generation module, a power grid document generation module, and a sample supplementation module. The input module is used to obtain power grid document information input by the user; The text feature recognition module uses a common attention mechanism model to extract the text features input by the user from the power grid documents and generates a context feature vector. The context feature vector is used to assign corresponding weights to the text features input by the user, enabling the model to obtain the multi-window text features input by the user. Specifically, the common attention mechanism model is a ResNet model. The sentence topic generation module models the text features input by the user using a sentence BiLSTM model. Generate sentence topics; The power grid document generation module is used to automatically generate power grid documents using a word BiLSTM model based on an adaptive attention mechanism. Specifically, when generating each word in the power grid document, the document text features are first generated through the word BiLSTM model, and then the adaptive attention mechanism determines whether to generate the current word based on the text features input by the user, the sentence topic generated by the sentence BiLSTM model, or the already generated document text features. The sample supplementation module is used to expand the manually verified results into the power grid document corpus after the automatically generated power grid documents have been manually verified and confirmed.

5. The apparatus according to claim 4, characterized in that: The information in the power grid documents includes: guidelines, policies and regulations for power grid document writing, keywords and phrases, core sentences, and document titles.

6. The apparatus according to claim 4, characterized in that: Prior to the sample replenishment module, a source display module is also included; The source display module is used to display the source and related information of the power grid document corpus of automatically generated sentences according to user instructions when manually verifying automatically generated power grid documents; the power grid document corpus includes historical power grid documents and previously automatically generated documents that have been manually verified.

Citation Information

Patent Citations

  • Text generation method and device and storage medium

    CN109635150A

  • Natural language text generation from a set of keywords using machine learning and templates

    US20210342552A1