Power industry report copywriting generation method and system based on natural language processing
By constructing a copywriting generation model based on natural language processing, labeling and reorganizing initial data, the problem of insufficient personalization of copywriting generation in the power industry is solved, and high-quality and personalized copywriting generation is achieved.
Patent Information
- Application Number
- CN202411586938.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-11
AI Technical Summary
It is difficult for the existing technology to achieve independent generation and personalization of report copy in the power industry, resulting in poor personality of generated copy.
By constructing a copywriting generation model based on natural language processing, initial data are obtained, data is marked and reorganized, and the power industry report copy is generated. The model is configured to reorganize text keywords and user keywords to improve the personalization of copywriting.
It realizes the independent generation and personalization of report copy in the power industry, and improves the quality and user satisfaction of generated copy.
Smart Images

Figure CN119599000A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of document generation, and specifically to a method and system for generating report documents for the power industry based on natural language processing. Background Art
[0002] With the rapid development of the power industry, the demand for power industry report copywriting has also increased significantly. A qualified power industry report copywriting is based on the analysis of a large amount of initial data, and this process will consume a lot of manpower and material resources. Therefore, it is necessary to study how to achieve the autonomous generation of power industry report copywriting.
[0003] With the development of natural language processing technology, autonomous analysis of initial data has become possible. Therefore, it is necessary to study the application of natural language processing technology in the generation of report copy in the power industry.
[0004] Chinese patent number CN202111634927.7 discloses a method and system for generating dynamic analysis text of education data report, which relates to the field of education system, especially to the method and system for generating dynamic analysis text of education data report, and the method for generating dynamic analysis text of education data report includes: obtaining text configuration information and data source; extracting analysis data in the data source according to the text configuration information, and determining data indicators; sorting and analyzing the analysis data based on the data indicators and the text configuration information, and obtaining analysis results; establishing analysis text based on the analysis results and the text configuration information. This invention fails to realize the user's intervention in the process of generating text, resulting in poor personality of the generated text.
[0005] In summary, the existing technology urgently needs an optimized technical solution for generating report text for the power industry based on natural language processing. Summary of the invention
[0006] The purpose of this application is to provide a method and system for generating report text for the power industry based on natural language processing to solve the technical problems raised in the above-mentioned background technology.
[0007] To achieve the above objectives, this application discloses the following technical solutions:
[0008] In a first aspect, the present application discloses a method for generating report text for the power industry based on natural language processing, the method comprising:
[0009] S1: Build a copywriting generation model;
[0010] S2: Get initial data;
[0011] S3: running the copywriting generation model to annotate the initial data and generate annotated data;
[0012] S4: running the text generation model to reorganize the annotated data and generate a report text for the power industry;
[0013] The initial data stores text data used to generate the report copy for the power industry;
[0014] The copywriting generation model is configured to perform a first reorganization and a second reorganization; the first reorganization is configured to perform a reorganization based on text keywords; and the second reorganization is configured to perform a reorganization based on user keywords.
[0015] Preferably, the construction of the copywriting generation model specifically includes:
[0016] Obtain a copywriting generation learning model preset using natural language processing technology, and train the copywriting generation learning model to perform the following steps:
[0017] A1: labeling the initial data;
[0018] A2: Generate the annotation data;
[0019] A3: performing the first reorganization and the second reorganization on the labeled data;
[0020] A4: Generate the report document of the power industry;
[0021] The text generation learning model that meets the preset generation success rate after training is output and defined as the text generation model.
[0022] Preferably, the text keywords are keywords obtained based on text analysis of the initial data; the text analysis at least includes word frequency statistics and part-of-speech analysis.
[0023] Preferably, the user keywords are keywords input by the user when generating the power industry report copy.
[0024] Preferably, the marking of the initial data specifically includes:
[0025] Annotating the initial data based on the text keywords;
[0026] The initial data is labeled based on the user keywords.
[0027] Preferably, the generating of the annotation data specifically includes:
[0028] Counting the number of first annotations corresponding to the text keywords during annotation;
[0029] Counting the number of second annotations corresponding to the user keywords during annotation;
[0030] The first marking times, the second marking times, and the initial data with marking traces retained are packaged and defined as the marking data.
[0031] Preferably, the first reorganization is specifically:
[0032] The text keywords are processed by using the first marking times and a preset text keyword threshold, and the text keywords are divided into a first core word and a first auxiliary word in combination with semantic analysis;
[0033] The labeled data is reorganized based on the first core word and the first auxiliary word to obtain a first reorganization result.
[0034] Preferably, the second reorganization is specifically:
[0035] Processing the user keyword by using the second marking number and a preset user keyword threshold, and dividing the user keyword into a second core word and a second auxiliary word in combination with semantic analysis;
[0036] The first reorganization result is reorganized based on the second core word and the second auxiliary word to obtain the electric power industry report copy.
[0037] Preferably, the initial data includes at least industry information, technical information, equipment information, management information and policy information.
[0038] In a second aspect, the present application discloses a system for generating electric power industry report copy based on natural language processing, the system is applicable to the method for generating electric power industry report copy based on natural language processing as described above, and the system comprises:
[0039] A model building module, wherein the model building module is configured to build a copywriting generation model;
[0040] A data acquisition module, wherein the data acquisition module is configured to acquire initial data;
[0041] A first generating module, wherein the first generating module is configured to: run the copywriting generation model to annotate the initial data to generate annotated data;
[0042] A second generation module, wherein the second generation module is configured to: run the text generation model to reorganize the annotated data and generate a power industry report text;
[0043] The initial data stores text data used to generate the report copy for the power industry;
[0044] The copywriting generation model is configured to perform a first reorganization and a second reorganization; the first reorganization is configured to perform a reorganization based on text keywords; and the second reorganization is configured to perform a reorganization based on user keywords.
[0045] Beneficial effects: The method and system for generating electric power industry report copy based on natural language processing of the present application provide a data basis for generating electric power industry report copy by acquiring initial data, realize autonomous generation of electric power industry report copy by constructing a copy generation model, provide a data basis for generating electric power industry report copy by converting initial data into annotated data, realize reorganization based on text keywords of the initial data itself through a first reorganization, and realize reorganization based on user needs by introducing user keywords through a second reorganization, thereby improving the personalization of generated copy and realizing optimization of electric power industry report copy generation based on natural language processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A flowchart of a method for generating a report for the electric power industry based on natural language processing provided in an embodiment of the present application;
[0048] Figure 2 A structural block diagram of a power industry report copy generation system based on natural language processing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0050] In this article, the term "comprising" is 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprising..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0051] In a first aspect, this embodiment discloses Figure 1 A method for generating report copy for the power industry based on natural language processing is shown, the method comprising:
[0052] S1: Build a copywriting generation model;
[0053] S2: Get initial data;
[0054] S3: Run the copywriting generation model to annotate the initial data and generate annotated data;
[0055] S4: Run the copy generation model to reorganize the labeled data and generate the report copy for the power industry.
[0056] The initial data storage contains text data used to generate report copy for the power industry.
[0057] The copywriting generation model is configured to perform a first reorganization and a second reorganization; the first reorganization is configured to perform a reorganization based on text keywords; and the second reorganization is configured to perform a reorganization based on user keywords.
[0058] Based on the above, this embodiment provides technical support for the generation of report text for the power industry by constructing a text generation model, provides a data basis for the generation of report text for the power industry by acquiring initial data, and realizes the annotation and reorganization of the initial data by running the text generation model, thereby realizing the generation of report text for the power industry.
[0059] Specifically, the copywriting generation model is constructed, including:
[0060] Obtain a copywriting generation learning model preset using natural language processing technology, and train the copywriting generation learning model to perform the following steps:
[0061] A1: Label the initial data;
[0062] A2: Generate labeled data;
[0063] A3: Perform the first and second reorganizations on the labeled data;
[0064] A4: Generate report copy for the power industry.
[0065] The copy generation learning model that meets the preset generation success rate after training is output and defined as the copy generation model.
[0066] It should be noted that the presetting and training of the copy generation learning model in this embodiment use existing model building technology, aiming to realize the function of the copy generation model to autonomously label and reorganize the initial data to realize the generation of power industry report copy.
[0067] Based on the above, the construction of the copy generation module provides technical support for the generation of autonomous power industry report copy.
[0068] Specifically, the text keywords are keywords obtained when performing text analysis on the initial data; the text analysis at least includes word frequency statistics and part-of-speech analysis.
[0069] It should be noted that the text analysis used in this embodiment is based on the existing natural language processing, and is intended to achieve the function of extracting text keywords. It can be understood that the text keywords are keywords in the initial data obtained based on text analysis, such as "core technology", "key indicators" and "main equipment". In this regard, this embodiment obtains text keywords based on the text analysis of the initial data itself, thereby achieving effective processing of the initial data and providing a data basis for the first reorganization.
[0070] Specifically, the user keywords are keywords input by the user when generating the report copy for the power industry.
[0071] It is understandable that the user keywords of this embodiment are input into the copywriting generation model based on the experience or needs known to those skilled in the art. For example, the user keywords may include, but are not limited to, keywords such as "new energy generation", "cost" and "benefit". In this regard, this embodiment achieves adaptation to the personalized needs of users by introducing user keywords, realizes the personalization of the generated power industry report, and provides a data basis for the second reorganization.
[0072] Specifically, the initial data is marked, including:
[0073] Label the initial data based on text keywords;
[0074] The initial data is labeled based on user keywords.
[0075] It should be noted that this embodiment uses existing annotation technology to implement the annotation of text keywords and user keywords in the initial text, providing a data basis for reorganization. Furthermore, the copy generation model in this embodiment will store the initial data with annotation traces, providing the required data for model optimization and artificial generation of power industry report copy.
[0076] Based on the above, this embodiment realizes the processing of adapting the initial data to generate the report text of the power industry by marking the initial data, and provides a data basis for the first reorganization and the second reorganization.
[0077] Specifically, generating annotation data includes:
[0078] Counting the first annotation times corresponding to the text keywords during annotation; the first annotation times are specifically the annotation times of each text keyword in the initial data;
[0079] Counting the second marking times corresponding to the user keywords during marking; the second marking times are specifically the marking times of each user keyword in the initial data;
[0080] The first annotation times, the second annotation times and the initial data with annotation traces retained are packaged and defined as the annotation data.
[0081] Based on the above, this embodiment provides an accurate data basis for performing the first reorganization and the second reorganization through the first marking times, the second marking times and the initial data with marking traces retained.
[0082] Specifically, the first reorganization is as follows:
[0083] The text keywords are processed by using the first marking times and the preset text keyword threshold, and the text keywords are divided into the first core words and the first auxiliary words in combination with the semantic analysis;
[0084] It should be noted that the text keyword threshold in this embodiment is set based on the experience known to technical personnel in the field, and is intended to realize the analysis of keywords from the word frequency. The semantic analysis combined here is an existing natural language processing technology. Those skilled in the art can combine semantic analysis to assign semantic values to keywords. In one implementation of this embodiment, the division of text keywords is realized by calculating the text keyword score. The calculation formula of the text keyword score is specifically:
[0085]
[0086] Among them, TKS is the text keyword score, α is the first annotation times scaling parameter known by technicians in this field based on the results of semantic analysis and experience, that is, the semantic assignment in the previous text. This parameter is used to correct the first annotation times of the keyword in the initial data based on its own semantics. For example, when the keyword is "core technology", although its first annotation times in the initial data are small, it needs to be amplified by α because of its important semantics to improve its text keyword score. Furthermore, this parameter can be set independently by the user, so as to further improve the rationality of the generated power industry report copy. AT 1_x is the first annotation number and x corresponds to each text keyword, TK x_τ is the text keyword threshold and x corresponds to each text keyword, if α*AT 1_x ≥TK x_τ It means that when α*AT 1_x ≥TKx_τ When TKS=1, it is the first core word, else it means when α*AT 1_x ≥TK x_τ When it is not true, TKS = 0 is the first auxiliary word;
[0087] The annotated data is reorganized based on the first core word and the first auxiliary word to obtain a first reorganization result. At this time, the initial data has been reorganized based on text keywords.
[0088] Specifically, the second reorganization is as follows:
[0089] The user keywords are processed by using the second marking times and a preset user keyword threshold, and the user keywords are divided into second core words and second auxiliary words in combination with semantic analysis;
[0090] It should be noted that the setting of the user keyword threshold in this embodiment is the same as the setting of the text keyword threshold in the previous text, and this text will not be repeated here. In one implementation of this embodiment, the user keyword classification is achieved by calculating the user keyword score, and the calculation formula of the user keyword score is specifically:
[0091]
[0092] Among them, UKS is the user keyword score, β is the second annotation times scaling parameter known by the technicians in this field based on the results of semantic analysis and experience, that is, the semantic assignment in the previous text. This parameter is used to correct the second annotation times of the keyword in the initial data based on its own semantics. For example, when the keyword is "cost", although its second annotation times in the initial data are small, its semantics are more important, so it needs to be amplified by β to improve its user keyword score. Furthermore, this parameter can be set independently by the user, so as to further improve the rationality and personalization of the generated power industry report copy. AT 2_y is the second annotation number and y corresponds to each user's keyword, UK y_τ is the user keyword threshold and y corresponds to each user keyword, if β*AT 2_y ≥UK y_τ It means that when β*AT 2_y ≥UK y_τ When UKS=1, it is the second core word, else means when β*AT 2_y ≥UK y_τ When it is not true, UKS = 0 is the second auxiliary word;
[0093] The first reorganization result is reorganized based on the second core word and the second auxiliary word to obtain the report copy of the electric power industry.
[0094] Based on the above, this embodiment realizes the reorganization of text keywords based on the initial data itself through the first reorganization, ensures the integrity of the initial data, provides a data basis for the second reorganization, and realizes the reorganization of user keywords based on user needs through the second reorganization, thereby improving the personalization of the generated power industry report.
[0095] Specifically, the initial data includes at least industry information, technical information, equipment information, management information and policy information.
[0096] It should be noted that the initial data obtained corresponds to the user's needs or is imported by the user himself. The industry information, technical information, equipment information, management information and policy information are all text data corresponding to information known to technical personnel in this field, and are used to provide data reference for generating power industry reports.
[0097] In a second aspect, this embodiment discloses Figure 2 A system for generating electric power industry report text based on natural language processing is shown, and the system is applicable to the method for generating electric power industry report text based on natural language processing as described above, and the system includes:
[0098] A model building module, the model building module is configured to build a copywriting generation model;
[0099] A data acquisition module, the data acquisition module is configured to acquire initial data;
[0100] A first generation module, the first generation module is configured to: run the copywriting generation model to annotate initial data and generate annotated data;
[0101] The second generation module is configured to: run the copy generation model to reorganize the annotation data and generate the power industry report copy;
[0102] The initial data storage includes text data used to generate reports for the power industry;
[0103] The copywriting generation model is configured to perform a first reorganization and a second reorganization; the first reorganization is configured to perform a reorganization based on text keywords; and the second reorganization is configured to perform a reorganization based on user keywords.
[0104] It should be noted that the electric power industry report copy generation system based on natural language processing of this embodiment corresponds to the electric power industry report copy generation method based on natural language processing in the previous text. Therefore, the contents not specifically described in the electric power industry report copy generation system based on natural language processing of this embodiment may include but are not limited to functional definitions, working principles and technical effects, which are the same as those of the electric power industry report copy generation method based on natural language processing in the previous text, and this text will not elaborate on them here.
[0105] In summary, the method and system for generating electric power industry report copy based on natural language processing in this embodiment provide a data basis for generating electric power industry report copy by acquiring initial data, realize autonomous generation of electric power industry report copy by constructing a copy generation model, provide a data basis for generating electric power industry report copy by converting initial data into annotated data, realize reorganization based on text keywords of the initial data itself through the first reorganization, and realize reorganization based on user needs by introducing user keywords through the second reorganization, thereby improving the personalization of generated copy and realizing the optimization of electric power industry report copy generation based on natural language processing.
[0106] In the embodiments provided in the present application, it should be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code or any appropriate combination thereof. For hardware implementation, the processor can be implemented in one or more of the following units: application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, other electronic units designed to implement the functions described herein or their combination. For software implementation, part or all of the flow of the embodiment can be completed by instructing the relevant hardware through a computer program. When implemented, the above program can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a computer can access. The computer-readable storage medium can include but is not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer.
[0107] Finally, it should be noted that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating report copy for the power industry based on natural language processing, characterized in that: The method includes: S1: Build a copywriting generation model; S2: Get initial data; S3: running the copywriting generation model to annotate the initial data and generate annotated data; S4: running the text generation model to reorganize the annotated data and generate a report text for the power industry; The initial data stores text data used to generate the report copy for the power industry; The copywriting generation model is configured to perform a first reorganization and a second reorganization; the first reorganization is configured to perform a reorganization based on text keywords; and the second reorganization is configured to perform a reorganization based on user keywords.
2. The method for generating electric power industry report copy based on natural language processing according to claim 1 is characterized in that: The construction of the copywriting generation model specifically includes: Obtain a copywriting generation learning model preset using natural language processing technology, and train the copywriting generation learning model to perform the following steps: A1: labeling the initial data; A2: Generate the annotation data; A3: performing the first reorganization and the second reorganization on the labeled data; A4: Generate the report document of the power industry; The text generation learning model that meets the preset generation success rate after training is output and defined as the text generation model.
3. The method for generating electric power industry report copy based on natural language processing according to claim 1 is characterized in that: The text keywords are specifically keywords obtained when performing text analysis on the initial data; the text analysis at least includes word frequency statistics and part-of-speech analysis.
4. The method for generating electric power industry report copy based on natural language processing according to claim 1 is characterized in that: The user keywords are specifically keywords input by the user when generating the power industry report copy.
5. The method for generating electric power industry report copy based on natural language processing according to claim 1 is characterized in that: The marking of the initial data specifically includes: Annotating the initial data based on the text keywords; The initial data is labeled based on the user keywords.
6. The method for generating electric power industry report copy based on natural language processing according to claim 1 is characterized in that: The generating of the annotation data specifically includes: Counting the number of first annotations corresponding to the text keywords during annotation; Counting the number of second annotations corresponding to the user keywords during annotation; The first marking times, the second marking times, and the initial data with marking traces retained are packaged and defined as the marking data.
7. The method for generating electric power industry report copy based on natural language processing according to claim 6 is characterized in that: The first reorganization is specifically: The text keywords are processed by using the first marking times and a preset text keyword threshold, and the text keywords are divided into a first core word and a first auxiliary word in combination with semantic analysis; The labeled data is reorganized based on the first core word and the first auxiliary word to obtain a first reorganization result.
8. The method for generating electric power industry report copy based on natural language processing according to claim 7 is characterized in that: The second reorganization is specifically: Processing the user keyword by using the second marking number and a preset user keyword threshold, and dividing the user keyword into a second core word and a second auxiliary word in combination with semantic analysis; The first reorganization result is reorganized based on the second core word and the second auxiliary word to obtain the electric power industry report copy.
9. The method for generating electric power industry report copy based on natural language processing according to claim 1 is characterized in that: The initial data includes at least industry information, technical information, equipment information, management information and policy information.
10. A system for generating electric power industry report copy based on natural language processing, the system being applicable to the method for generating electric power industry report copy based on natural language processing as described in any one of claims 1 to 9, characterized in that: The system includes: A model building module, wherein the model building module is configured to build a copywriting generation model; A data acquisition module, wherein the data acquisition module is configured to acquire initial data; A first generating module, wherein the first generating module is configured to: run the copywriting generation model to annotate the initial data to generate annotated data; A second generation module, wherein the second generation module is configured to: run the text generation model to reorganize the annotated data and generate a power industry report text; The initial data stores text data used to generate the report copy for the power industry; The copywriting generation model is configured to perform a first reorganization and a second reorganization; the first reorganization is configured to perform a reorganization based on text keywords; and the second reorganization is configured to perform a reorganization based on user keywords.
Citation Information
Patent Citations
Dynamic analysis copywriting generation method and system for education data report
CN114417842A