Voice-driven government affair report intelligent generation method
Through the voice-driven intelligent generation method of government affairs reports, voice recognition and large-scale model technology are used to generate government affairs official documents, solving the problems of insufficient flexibility, controllability and convenience in the existing system, and achieving efficient, authentic and credible generation of government affairs official documents.
Patent Information
- Application Number
- CN202411543787.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-25
AI Technical Summary
The existing intelligent auxiliary generation system for government affairs official documents is not flexible enough, and it is impossible to achieve multiple types of official document generation assistance without fixed templates. It is insufficient controllability and it is difficult to generate official document content that fully meets the user's command requirements and has real and accurate content. It is insufficient convenience. Users need to perform multiple rounds of interaction and manual modification, which is relatively inefficient.
The intelligent generation method of government affairs report driven by voice-driven is adopted, and the user's voice is converted into text through voice recognition technology, and a large model is used to logically sort out the user's colloquial instructions to generate the overall generation requirements, outline and paragraph content of government affairs documents. The system supports users to modify requirements through voice or text input, and call text modification and polishing large model for automatic modification until satisfactory government affairs documents are generated.
It significantly improves the speed and efficiency of the generation and modification of government official documents, simplifies the complexity of human-computer interaction, ensures that the generated official documents are authentic and credible, with high quality and professionalism, and solves the problems of insufficient flexibility, controllability and convenience.
Smart Images

Figure CN119517014A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech recognition and large-model assisted government document generation, and in particular to a speech-driven government report intelligent generation method. Background Art
[0002] In government administration, the preparation of work reports and official documents is a complex and time-consuming task that requires the integration of a large amount of data and information, as well as systematic analysis and summary. The traditional official document writing process requires not only manual collation and statistical data, but also requires the writers to have high writing skills and in-depth understanding of policies, which consumes a lot of time and human resources. Therefore, there is an urgent need for semi-automatic and automatic generation of government official documents through computer-assisted methods, which can greatly improve the work efficiency of government staff and ensure that the output reports have high quality. Different from general report or text generation, government official documents usually have certain format and writing style requirements according to their types, and involve a large amount of data, policies, and external file references, and often require multiple rounds of modification. This places high demands on the government document generation system, requiring the system to provide users with a convenient requirement or instruction input interface, accurately understand the complex semantics of the user input instructions, and be able to retrieve real-time databases for statistical analysis, consult historical documents and policy libraries for reading comprehension, and complete the document generation based on user instructions and queried real data, ensuring the accuracy and readability of the generated content and reducing the workload of manual modification by users.
[0003] Currently, the auxiliary generation of government documents mainly includes two categories: template-based document generation method and artificial intelligence-based document generation method.
[0004] A method of generating official documents based on template
[0005] This method is to manually predefine templates of different types of official documents (such as notices, work summaries, special analysis reports, etc.), use fixed structures and placeholders, and generate the final official document by filling in specific data.
[0006] The characteristics of this method are: easy to use, relatively simple to develop and use, and no need for complex technology. High stability, due to the fixed structure, the generated documents are highly consistent and have a low error rate. Efficient generation, can quickly generate documents, and at the same time has low requirements for computing power, suitable for application scenarios with a high degree of standardization.
[0007] Problems: Low flexibility. The fixed structure of the template limits the diversity and flexibility of the content of the document, making it difficult to cope with complex and changing needs. Poor customization capabilities. Templates need to be designed for different report types, resulting in high maintenance costs. Strong data dependence. The template must rely on high-quality, consistent data input, otherwise formatting problems may occur.
[0008] Official document generation method based on artificial intelligence (big model)
[0009] With the rapid development of information technology, artificial intelligence (AI) technology, especially big models (such as GPT-4), is increasingly used in various fields. The emergence of artificial intelligence technologies such as big models provides a new solution for the automatic generation of government reports. Big models have powerful natural language processing (NLP) capabilities and can understand and generate more complex text content. By training the model and assisting with external knowledge bases to master knowledge in specific fields, the model can automatically generate report texts that meet the requirements based on the input data and information.
[0010] The characteristics of this method are: strong generation capability, capable of generating high-quality, natural and fluent official documents, applicable to a variety of complex scenarios; high flexibility, large models can handle various types of data inputs and generate diverse official document content; strong customization capability, through fine-tuning, it can generate high-quality reports that meet the needs of specific fields.
[0011] Existing problems: Hallucinations exist. The large model itself has hallucination problems. The grammar and text may be correct but the content may be wrong during the generation process, and it is not easy to check. Large resource consumption. The training and reasoning of large models require a lot of computing resources and the operating cost is high. Knowledge lag. The knowledge of the large model itself is difficult to update, which may cause bias or backward knowledge. Especially when it comes to government affairs, strict verification and review are required.
[0012] It can be seen from this that the current intelligent assisted generation of government documents is not flexible enough and cannot achieve various types of document generation assistance without fixed templates; it is not controllable enough and it is difficult to generate official documents that fully meet user instructions and have true and accurate content through large models; it is not convenient enough and the generation of a document requires users to interact with the system in multiple rounds through page selection, text input and other methods, and the generated results need to be manually modified, which is inefficient.
[0013] Therefore, it is necessary to provide a voice-driven intelligent generation method for government reports to solve the above technical problems. Summary of the invention
[0014] The present invention provides a voice-driven intelligent generation method for government affairs reports, which solves the problems of insufficient flexibility in the current intelligent assisted generation of government affairs documents, inability to implement various types of document generation assistance without fixed templates, insufficient controllability, and insufficient convenience.
[0015] In order to solve the above technical problems, the present invention provides a voice-driven government affairs report intelligent generation method, comprising the following steps:
[0016] S1. The user inputs the complete requirements of the official document through voice input. The input can be made once or multiple times. The form is spoken, and there is no need to implement rigorous wording. The system first converts the user's voice into text through voice recognition technology, and then uses a large model to logically sort out the user's spoken instructions to make them into the overall generation requirements of government documents with smooth sentences, clear expressions, and smooth logic;
[0017] S2. Users can check and modify the overall generation requirements of government documents generated by S1;
[0018] S3, users can check and modify the outline of government documents generated by S2;
[0019] S4, based on the recognition of paragraph intention completed in S3, different special paragraph generation models are called according to the specific paragraph type, the overall outline and the outline of the paragraph are combined according to the prompt template requirements of the special paragraph generation model to generate prompt words, and the prompt words are input into the model to complete the paragraph generation;
[0020] S5, users can check and modify the draft of government documents generated by S4;
[0021] S6. The user can check and modify the official draft of the government document in S5, and can add, delete, modify paragraphs, etc., and repeat S4 and S5 until a satisfactory government document is generated;
[0022] S7. Step description: When checking and modifying at each step, the user can select the modification scope and input the modification requirements described in natural language through voice or text input. The system will call the text modification and polishing model to perform automatic modification.
[0023] Preferably, the large model in S1 generates an outline of the government document according to the requirements for generating government documents, and the outline includes a description of the entire document and a segmented description, and specifically describes the content and form of each paragraph outline.
[0024] Preferably, the system in S3 inputs the outline of the government document, identifies the intent of each paragraph outline through the intention analysis big model, and determines the nature of the paragraph, which specifically includes: descriptive paragraphs that do not require external knowledge, data analysis paragraphs that need to query the structured database, paragraphs that need to query the document knowledge base, and paragraphs that need to query the knowledge graph and perform knowledge reasoning analysis. There are four categories in total, and each category corresponds to a dedicated paragraph generation big model.
[0025] Preferably, the paragraph generation macro model comprises the following method:
[0026] S31, generating a large model for description paragraphs;
[0027] S311, continue pre-training;
[0028] S312, domain data supervision fine-tuning;
[0029] S32, data analysis paragraphs generate large models;
[0030] S33, paragraph generation model enhanced by document knowledge base;
[0031] S34. Knowledge Graph-Enhanced Paragraph Generation Model
[0032] Preferably, the S311 is suitable for generating descriptive official document paragraphs according to prompts, using Baichuan-13b with better Chinese performance as the base model, collecting descriptive paragraphs in government documents, and continuing pre-training aims to make the model better adapt to the style and wording of official document writing.
[0033] Preferably, the S312 is designed with fine-tuning tasks suitable for government document writing, for example: generating documents with a specific language style and a specific theme, generating complete paragraphs from key points, etc., and constructing question-answer pairs for the above tasks, where the input is a prompt containing key points such as the theme and language style of the government document to be generated, and the output is the corresponding government document paragraph, forming a supervised fine-tuning data set. Using the supervised fine-tuning data set, fine-tuning training is performed on the basis of the pre-trained model in an efficient parameter fine-tuning manner to obtain Lora parameters, and complete the training of a large model for generating descriptive paragraphs.
[0034] Preferably, in the process of writing government documents in S32, data analysis and reporting are often involved. The traditional method requires that a database engineer with certain experience fully communicate with the government document writer to convert the writer's needs into corresponding database query statements, thereby realizing data query; after obtaining accurate data, the writer logically expresses the data through text. This process involves communication between different professionals and requires multiple rounds of iterations, which consumes a lot of time and manpower costs;
[0035] Using NL2SQL technology, the big model is trained to generate corresponding SQL statements based on the paragraph outline description, thereby completing the database query and generating government documents with data analysis paragraphs based on the queried data. This form can compress the workload that originally took hours or even days into minutes, which can significantly improve efficiency. At the same time, since real data is used to assist in the generation of the big model, the problem of empty content in the generated government documents is effectively solved, making the generated content more practical.
[0036] Preferably, in said S33, by combining the big model and the search enhancement generation technology, the understanding and generation capabilities of the big model in the field of government documents can be improved, and the generated paragraphs can be cited and referenced to the relevant literature content and the knowledge involved. In this way, the big model can access and utilize the private government document knowledge base, so as to generate more accurate and highly relevant paragraph content;
[0037] The construction of the paragraph generation model includes: using data collection tools to collect government documents, historical work reports, special reports, etc., and unifying the format of the documents, including document extraction through OCR and other methods, pre-processing the original documents, slicing according to length, punctuation, and semantics, as the smallest unit for subsequent knowledge base retrieval, and completing the vectorization of text fragments through the text embedding model. These high-dimensional vectors contain the semantic information of the text, which is convenient for subsequent semantic calculation and matching. The text fragment vectors are stored in the vector database and the vector index is established to facilitate efficient search. When generating paragraphs, the paragraphs are The generated outline or prompt is converted into a semantic vector, which is compared with the text fragment vector in the knowledge vector library. The vector closest to the query vector semantics is found by minimizing the cosine distance, and then the corresponding text fragment is retrieved. The outline is generated based on the query and retrieved context information combined with the paragraph, and a prompt template is constructed. It is input into the big model to generate the paragraph content so that it has the content and knowledge contained in the text fragment. The paragraph generation big model enhanced by the document knowledge base is tested for its effect, and related parameters are optimized, such as the maximum number of words in the text slice, the similarity threshold, the number of text fragments recalled at a single time, etc., to improve the generation effect of the big model.
[0038] Preferably, the government affairs field in S34 contains complex industry and field knowledge, which involves a large amount of business knowledge and logic. The content generated by the large model is random, and it is difficult to ensure that it is well in line with the government affairs professional knowledge; the knowledge graph can well represent this knowledge in the form of a graph, but lacks natural and flexible means of expression. Therefore, combining the large model with the government affairs knowledge graph can well solve the problem of generating official document paragraphs based on business knowledge, and can effectively improve the professionalism and logic of the generated paragraphs;
[0039] The components of the knowledge graph-enhanced paragraph generation model include: collecting and organizing government-related laws and regulations, policy documents, historical documents and other data, using natural language processing technology to extract key entities and relationships, building a knowledge graph, introducing graph data in the training phase, converting graph triples into a token text as input, and masking its entities or relationships for pre-training, so that the large model can directly learn the knowledge contained in the knowledge graph in the pre-training phase. When generating paragraphs, the corresponding data in the graph is matched through natural language instructions, and the graph query is completed using the NL2Cypher method. The queried graph data is introduced as context into the prompt for generating paragraphs, so that the large model can generate paragraph content that conforms to business knowledge and logic with the assistance of institutionalized graph data.
[0040] Preferably, S5 takes the overall generation requirements of government documents, the outline of government documents and the first draft of government documents as input, and the combined model completes the text sorting, style unification and other tasks of the entire government document. The big model checks whether the first draft of the government document meets the overall generation requirements and the requirements of the document outline, and outputs the formal draft of the government document after detail adjustments.
[0041] Compared with the related art, the voice-driven intelligent generation method of government affairs report provided by the present invention has the following beneficial effects:
[0042] The present invention provides a voice-driven intelligent generation method for government affairs reports, which improves overall efficiency by introducing voice input and natural language interaction: the government affairs document generation requirements can be input in natural language through voice, without manual input and specific speech description requirements. The large model automatically generates government affairs document generation instructions according to the input voice content, which can greatly simplify the complexity of human-computer interaction and reduce the thinking time of users to organize language. For the generation results of each intermediate step, it supports the issuance of modification opinions through voice, and the modification results can be seen in real time, which significantly improves the overall government affairs document generation and modification speed;
[0043] Improve the effect of government document generation through intention recognition + dedicated paragraph generation model: the system first generates an overall outline based on the instructions provided by the user, so that the user can understand the logical thinking of the entire document and the general content of each paragraph, and control the whole. Then, the intention of each paragraph of the outline is recognized through the big model, and then a dedicated big model generation method is called for each paragraph, ensuring the generation effect and professionalism of each paragraph. Finally, the paragraphs are combined to form a government document with overall logic and professionalism, which greatly improves the usability of the generated document.
[0044] Through the enhanced generation of external structured databases, graph databases, and document knowledge bases, the illusion of big models is effectively reduced, making the generated content of government documents authentic and credible: different paragraph generation big models support retrieval and enhanced generation of big models through structured data, graph data, and document data respectively. The system queries the real and real-time data related to the paragraph generation instructions from the database, and inputs the found data into the big model as the context of the paragraph generation instructions, ensuring that the generated paragraphs contain the found real data and express it in the form of official documents, which solves the common problems of empty content, lack of domain knowledge, and difficulty in ensuring data authenticity in the previous intelligent generation of government documents; by plugging in various types of databases, the timeliness of the data is guaranteed, so that the generated documents contain real and reliable real data. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A structural schematic diagram of a preferred embodiment of a voice-driven government affairs report intelligent generation method provided by the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described below in conjunction with the accompanying drawings and implementation modes.
[0047] Please refer to Figure 1 ,in, Figure 1 A schematic diagram of a preferred embodiment of a voice-driven government affairs report intelligent generation method provided by the present invention. A voice-driven government affairs report intelligent generation method comprises the following steps:
[0048] S1. The user inputs the complete requirements of the official document through voice input. The input can be made once or multiple times. The form is spoken, and there is no need to implement rigorous wording. The system first converts the user's voice into text through voice recognition technology, and then uses a large model to logically sort out the user's spoken instructions to make them into the overall generation requirements of government documents with smooth sentences, clear expressions, and smooth logic;
[0049] S2. Users can check and modify the overall generation requirements of government documents generated by S1;
[0050] S3, users can check and modify the outline of government documents generated by S2;
[0051] S4, based on the recognition of paragraph intention completed in S3, different special paragraph generation models are called according to the specific paragraph type, the overall outline and the outline of the paragraph are combined according to the prompt template requirements of the special paragraph generation model to generate prompt words, and the prompt words are input into the model to complete the paragraph generation;
[0052] S5, users can check and modify the draft of government documents generated by S4;
[0053] S6. The user can check and modify the official draft of the government document in S5, and can add, delete, modify paragraphs, etc., and repeat S4 and S5 until a satisfactory government document is generated;
[0054] S7. Step description: When checking and modifying at each step, the user can select the modification scope and input the modification requirements described in natural language through voice or text input. The system will call the text modification and polishing model to perform automatic modification.
[0055] For example: (1) Select a paragraph and enter the modification requirement: "Increase the number of words and provide a detailed description of the content." The system will call the big model to complete the expansion of the paragraph and add a detailed description. (2) Select the entire document and enter the modification requirement: "Revise to a grassroots-oriented style, make the text easy to understand, concise and clear, remove unnecessary specialized vocabulary and use common vocabulary instead." The system will call the big model to complete the style conversion of the government document, modify the interrupted complex sentence structure to a simple sentence structure, and transform the specialized vocabulary and expressions into common vocabulary and direct expressions, ensuring that the grassroots and non-industry personnel can quickly understand the content of the document.
[0056] The large model in S1 generates an outline of a government document according to the requirements for generating government documents. The outline includes a description of the entire document and a description of each section. Specifically, the outline of each section describes the content and form.
[0057] The system in S3 inputs the outline of the government document, identifies the intent of each paragraph outline through the intention analysis big model, and determines the nature of the paragraph, which specifically includes: descriptive paragraphs that do not require external knowledge, data analysis paragraphs that need to query the structured database, paragraphs that need to query the document knowledge base, and paragraphs that need to query the knowledge graph and perform knowledge reasoning analysis. There are four categories in total, and each category corresponds to a dedicated paragraph generation big model.
[0058] The paragraph generation model includes the following methods:
[0059] S31, generating a large model for description paragraphs;
[0060] S311, continue pre-training;
[0061] S312, domain data supervision fine-tuning;
[0062] S32, data analysis paragraphs generate large models;
[0063] S33, paragraph generation model enhanced by document knowledge base;
[0064] S34. Knowledge Graph-Enhanced Paragraph Generation Model
[0065] The S311 is suitable for generating descriptive official document paragraphs according to prompts, using Baichuan-13b with better Chinese performance as the base model to collect descriptive paragraphs in government documents. The purpose of continuing pre-training is to make the model better adapt to the style and wording of official document writing.
[0066] The S312 is designed to design fine-tuning tasks suitable for government document writing, for example: generating documents with a specific language style and a specific theme, generating complete paragraphs from key points, etc., and construct question-answer pairs for the above tasks, where the input is a prompt containing key points such as the theme and language style of the government document to be generated, and the output is the corresponding government document paragraph, forming a supervised fine-tuning dataset. Using the supervised fine-tuning dataset, fine-tuning training is performed on the basis of the pre-trained model in an efficient parameter fine-tuning manner to obtain Lora parameters, and complete the training of a large model for generating descriptive paragraphs.
[0067] In the process of writing government documents in S32, data analysis and reporting are often involved. The traditional method requires that a database engineer with certain experience fully communicate with the government document writer to convert the writer's needs into corresponding database query statements, thereby realizing data query; after obtaining accurate data, the writer logically expresses the data through text. This process involves communication between different professionals and requires multiple rounds of iterations, which consumes a lot of time and manpower costs;
[0068] Using NL2SQL technology, the big model is trained to generate corresponding SQL statements based on the paragraph outline description, thereby completing the database query and generating government documents with data analysis paragraphs based on the queried data. This form can compress the workload that originally took hours or even days into minutes, which can significantly improve efficiency. At the same time, since real data is used to assist in the generation of the big model, the problem of empty content in the generated government documents is effectively solved, making the generated content more practical.
[0069] By combining the big model and the search enhancement generation technology in S33, the big model's ability to understand and generate government documents can be improved, and the generated paragraphs can be able to cite and refer to relevant literature content and the knowledge involved. In this way, the big model can access and utilize a private government document knowledge base to generate more accurate and relevant paragraph content.
[0070] The construction of the paragraph generation model includes: using data collection tools to collect government documents, historical work reports, special reports, etc., and unifying the format of the documents, including document extraction through OCR and other methods, pre-processing the original documents, slicing according to length, punctuation, and semantics, as the smallest unit for subsequent knowledge base retrieval, and completing the vectorization of text fragments through the text embedding model. These high-dimensional vectors contain the semantic information of the text, which is convenient for subsequent semantic calculation and matching. The text fragment vectors are stored in the vector database and the vector index is established to facilitate efficient search. When generating paragraphs, the paragraphs are The generated outline or prompt is converted into a semantic vector, which is compared with the text fragment vector in the knowledge vector library. The vector closest to the query vector semantics is found by minimizing the cosine distance, and then the corresponding text fragment is retrieved. The outline is generated based on the query and retrieved context information combined with the paragraph, and a prompt template is constructed. It is input into the big model to generate the paragraph content so that it has the content and knowledge contained in the text fragment. The paragraph generation big model enhanced by the document knowledge base is tested for its effect, and related parameters are optimized, such as the maximum number of words in the text slice, the similarity threshold, the number of text fragments recalled at a single time, etc., to improve the generation effect of the big model.
[0071] The government affairs domain in S34 contains complex industry and domain knowledge, which involves a large amount of business knowledge and logic. The content generated by the big model is random, and it is difficult to ensure that it is well in line with the government affairs professional knowledge. The knowledge graph can well represent this knowledge in the form of a graph, but lacks natural and flexible means of expression. Therefore, combining the big model with the government affairs knowledge graph can well solve the problem of generating official document paragraphs based on business knowledge, and can effectively improve the professionalism and logic of the generated paragraphs.
[0072] The components of the knowledge graph-enhanced paragraph generation model include: collecting and organizing government-related laws and regulations, policy documents, historical documents and other data, using natural language processing technology to extract key entities and relationships, building a knowledge graph, introducing graph data in the training phase, converting graph triples into a token text as input, and masking its entities or relationships for pre-training, so that the large model can directly learn the knowledge contained in the knowledge graph in the pre-training phase. When generating paragraphs, the corresponding data in the graph is matched through natural language instructions, and the graph query is completed using the NL2Cypher method. The queried graph data is introduced as context into the prompt for generating paragraphs, so that the large model can generate paragraph content that conforms to business knowledge and logic with the assistance of institutionalized graph data.
[0073] In the S5, the overall generation requirements of government documents, the outline of government documents and the first draft of government documents are taken as input, and the combined model completes the text sorting, style unification and other tasks of the entire government document. The big model checks whether the first draft of the government document meets the overall generation requirements and the requirements of the document outline, and outputs the formal draft of the government document after detail adjustments.
[0074] Supports natural language voice input. Users can directly input their needs through voice without excessive language organization. It can naturally receive users' spoken requirements for government documents, significantly improving the convenience and efficiency of operations. This interactive method reduces tedious steps such as keyboard input and page selection, and is especially suitable for government scenarios that require rapid response and processing, effectively improving the user experience.
[0075] This method first uses a big model to automatically generate an outline of a government document. The process is not limited by a fixed template and includes the theme and structure of each paragraph of the document to ensure the logic and integrity of the document. Users can control the content and style of the document through the outline at this step. After that, the system generates specific content paragraph by paragraph, and the big model performs intent analysis and calls different paragraph generation models according to the requirements of different paragraphs to ensure the professionalism of the paragraph content, thereby significantly improving the generation effect of the entire document.
[0076] In the process of paragraph generation, different paragraph generation models can call different databases or knowledge bases. With the assistance of external data and knowledge, the large model illusion problem can be effectively alleviated, and the quality of each paragraph generated content can be improved, making the generated government documents more usable.
[0077] By first generating an outline and then generating it in segments, the entire government document is generated through a combination of multiple large models such as outline generation, intent recognition, and special paragraph generation. Each large model is responsible for a single task, which reduces the capabilities and parameter requirements of the base model, and reduces the difficulty of fine-tuning and the amount of data, effectively saving computing power.
[0078] Compared with the related art, the voice-driven intelligent generation method of government affairs report provided by the present invention has the following beneficial effects:
[0079] The present invention provides a voice-driven intelligent generation method for government affairs reports, which improves overall efficiency by introducing voice input and natural language interaction: the government affairs document generation requirements can be input in natural language through voice, without manual input and specific speech description requirements. The large model automatically generates government affairs document generation instructions according to the input voice content, which can greatly simplify the complexity of human-computer interaction and reduce the thinking time of users to organize language. For the generation results of each intermediate step, it supports the issuance of modification opinions through voice, and the modification results can be seen in real time, which significantly improves the overall government affairs document generation and modification speed;
[0080] Improve the effect of government document generation through intention recognition + dedicated paragraph generation model: the system first generates an overall outline based on the instructions provided by the user, so that the user can understand the logical thinking of the entire document and the general content of each paragraph, and control the whole. Then, the intention of each paragraph of the outline is recognized through the big model, and then a dedicated big model generation method is called for each paragraph, ensuring the generation effect and professionalism of each paragraph. Finally, the paragraphs are combined to form a government document with overall logic and professionalism, which greatly improves the usability of the generated document.
[0081] Through the enhanced generation of external structured databases, graph databases, and document knowledge bases, the illusion of big models is effectively reduced, making the generated content of government documents authentic and credible: different paragraph generation big models support retrieval and enhanced generation of big models through structured data, graph data, and document data respectively. The system queries the real and real-time data related to the paragraph generation instructions from the database, and inputs the found data into the big model as the context of the paragraph generation instructions, ensuring that the generated paragraphs contain the found real data and express it in the form of official documents, which solves the common problems of empty content, lack of domain knowledge, and difficulty in ensuring data authenticity in the previous intelligent generation of government documents; by plugging in various types of databases, the timeliness of the data is guaranteed, so that the generated documents contain real and reliable real data.
[0082] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A voice-driven intelligent generation method for government affairs reports, characterized in that: The following steps are involved: S1. The user inputs the complete requirements of the official document through voice input. The input can be made once or multiple times. The form is spoken, and there is no need to implement rigorous wording. The system first converts the user's voice into text through voice recognition technology, and then uses a large model to logically sort out the user's spoken instructions to make them into the overall generation requirements of government documents with smooth sentences, clear expressions, and smooth logic; S2. Users can check and modify the overall generation requirements of government documents generated by S1; S3, users can check and modify the outline of government documents generated by S2; S4, based on the recognition of paragraph intention completed in S3, different special paragraph generation models are called according to the specific paragraph type, the overall outline and the outline of the paragraph are combined according to the prompt template requirements of the special paragraph generation model to generate prompt words, and the prompt words are input into the model to complete the paragraph generation; S5, users can check and modify the draft of government documents generated by S4; S6. The user can check and modify the official draft of the government document in S5, and can add, delete, modify paragraphs, etc., and repeat S4 and S5 until a satisfactory government document is generated; S7. Step description: When checking and modifying at each step, the user can select the modification scope and input the modification requirements described in natural language through voice or text input. The system will call the text modification and polishing model to perform automatic modification.
2. The method for intelligently generating government affairs reports driven by voice according to claim 1 is characterized in that: The large model in S1 generates an outline of a government document according to the requirements for generating government documents. The outline includes a description of the entire document and a description of each section. Specifically, the outline of each section describes the content and form.
3. The voice-driven government report intelligent generation method according to claim 1 is characterized in that: The system in S3 inputs the outline of the government document, identifies the intent of each paragraph outline through the intention analysis big model, and determines the nature of the paragraph, which specifically includes: descriptive paragraphs that do not require external knowledge, data analysis paragraphs that need to query the structured database, paragraphs that need to query the document knowledge base, and paragraphs that need to query the knowledge graph and perform knowledge reasoning analysis. There are four categories in total, and each category corresponds to a dedicated paragraph generation big model.
4. The method for intelligently generating government affairs reports driven by voice according to claim 3 is characterized in that: The paragraph generation model includes the following methods: S31, generating a large model for description paragraphs; S311, continue pre-training; S312, domain data supervision fine-tuning; S32, data analysis paragraphs generate large models; S33, paragraph generation model enhanced by document knowledge base; S34. Knowledge graph-enhanced large model for paragraph generation.
5. The method for intelligently generating government affairs reports driven by voice according to claim 4 is characterized in that: The S311 is suitable for generating descriptive official document paragraphs according to prompts, using Baichuan-13b with better Chinese performance as the base model to collect descriptive paragraphs in government documents. The purpose of continuing pre-training is to make the model better adapt to the style and wording of official document writing.
6. The method for intelligently generating government affairs reports driven by voice according to claim 4 is characterized in that: The S312 is designed to design fine-tuning tasks suitable for government document writing, for example: generating documents with a specific language style and a specific theme, generating complete paragraphs from key points, etc., and construct question-answer pairs for the above tasks, where the input is a prompt containing key points such as the theme and language style of the government document to be generated, and the output is the corresponding government document paragraph, forming a supervised fine-tuning dataset. Using the supervised fine-tuning dataset, fine-tuning training is performed on the basis of the pre-trained model in an efficient parameter fine-tuning manner to obtain Lora parameters, and complete the training of a large model for generating descriptive paragraphs.
7. The method for intelligently generating government affairs reports driven by voice according to claim 4, characterized in that: In the process of writing government documents in S32, data analysis and reporting are often involved. The traditional method requires that a database engineer with certain experience fully communicate with the government document writer to convert the writer's needs into corresponding database query statements, thereby realizing data query; after obtaining accurate data, the writer logically expresses the data through text. This process involves communication between different professionals and requires multiple rounds of iterations, which consumes a lot of time and manpower costs; Using NL2SQL technology, the big model is trained to generate corresponding SQL statements based on the paragraph outline description, thereby completing the database query and generating government documents with data analysis paragraphs based on the queried data. This form can compress the workload that originally took hours or even days into minutes, which can significantly improve efficiency. At the same time, since real data is used to assist in the generation of the big model, the problem of empty content in the generated government documents is effectively solved, making the generated content more practical.
8. The method for intelligently generating government affairs reports driven by voice according to claim 4, characterized in that: By combining the big model and the search enhancement generation technology in S33, the big model's ability to understand and generate government documents can be improved, and the generated paragraphs can be able to cite and refer to relevant literature content and the knowledge involved. In this way, the big model can access and utilize a private government document knowledge base to generate more accurate and relevant paragraph content. The construction of the paragraph generation model includes: using data collection tools to collect government documents, historical work reports, special reports, etc., and unifying the format of the documents, including document extraction through OCR and other methods, pre-processing the original documents, slicing according to length, punctuation, and semantics, as the smallest unit for subsequent knowledge base retrieval, and completing the vectorization of text fragments through the text embedding model. These high-dimensional vectors contain the semantic information of the text, which is convenient for subsequent semantic calculation and matching. The text fragment vectors are stored in the vector database and the vector index is established to facilitate efficient search. When generating paragraphs, the paragraphs are The generated outline or prompt is converted into a semantic vector, which is compared with the text fragment vector in the knowledge vector library. The vector closest to the query vector semantics is found by minimizing the cosine distance, and then the corresponding text fragment is retrieved. The outline is generated based on the query and retrieved context information combined with the paragraph, and a prompt template is constructed. It is input into the big model to generate the paragraph content so that it has the content and knowledge contained in the text fragment. The paragraph generation big model enhanced by the document knowledge base is tested for its effect, and related parameters are optimized, such as the maximum number of words in the text slice, the similarity threshold, the number of text fragments recalled at a single time, etc., to improve the generation effect of the big model.
9. The method for intelligently generating government affairs reports driven by voice according to claim 4, characterized in that: The government affairs domain in S34 contains complex industry and domain knowledge, which involves a large amount of business knowledge and logic. The content generated by the big model is random, and it is difficult to ensure that it is well in line with the government affairs professional knowledge. The knowledge graph can well represent this knowledge in the form of a graph, but lacks natural and flexible means of expression. Therefore, combining the big model with the government affairs knowledge graph can well solve the problem of generating official document paragraphs based on business knowledge, and can effectively improve the professionalism and logic of the generated paragraphs. The components of the knowledge graph-enhanced paragraph generation model include: collecting and organizing government-related laws and regulations, policy documents, historical documents and other data, using natural language processing technology to extract key entities and relationships, building a knowledge graph, introducing graph data in the training phase, converting graph triples into a token text as input, and masking its entities or relationships for pre-training, so that the large model can directly learn the knowledge contained in the knowledge graph in the pre-training phase. When generating paragraphs, the corresponding data in the graph is matched through natural language instructions, and the graph query is completed using the NL2Cypher method. The queried graph data is introduced as context into the prompt for generating paragraphs, so that the large model can generate paragraph content that conforms to business knowledge and logic with the assistance of institutionalized graph data.
10. The method for intelligently generating government affairs reports driven by voice according to claim 1, characterized in that: In the S5, the overall generation requirements of government documents, the outline of government documents and the first draft of government documents are taken as input, and the combined model completes the text sorting, style unification and other tasks of the entire government document. The big model checks whether the first draft of the government document meets the overall generation requirements and the requirements of the document outline, and outputs the formal draft of the government document after detail adjustments.
Citation Information
Patent Citations
Method and device for generating analysis report and electronic equipment
CN113642303A
Government affair service field multi-strategy fusion dialogue method based on knowledge graph
CN116628172A
Work summary generation method and device, electronic equipment and storage medium
CN117556031A
Content generation method and device and electronic equipment
CN117556788A
Text generation method and device
CN117787259A
Cited By
Heat supply industry advanced report generation method and system based on large language model
CN121052227A