Intelligent writing method and device based on large model, equipment and storage medium

CN122886565APending Publication Date: 2026-10-09CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610998473.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种基于大模型的智能撰写方法、装置、设备及存储介质,旨在解决如何提升基于大模型生成的专业文档的撰写效率与内容质量的技术问题

Benefits of technology

[0010]本申请提供了一种基于大模型的智能撰写方法、装置、设备及存储介质。方法包括:对待撰写文档模板配置占位符,生成包含占位符的目标模板文档;对源材料文档进行内容识别得到结构化文本信息,并构建结构化文本信息对应的语义索引;根据语义索引从结构化文本信息中检索与占位符对应的目标内容,并通过大模型对目标内容进行基于检索增强的内容优化,得到目标撰写内容;将目标撰写内容映射填充至目标模板文档中对应的占位符位置,生成目标撰写文档。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886565A_ABST
    Figure CN122886565A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent writing method and device based on a large model, equipment and a storage medium, and relates to the technical field of document writing. The method comprises the following steps: configuring a placeholder in a to-be-written document template, generating a target template document containing the placeholder; performing content recognition on a source material document to obtain structured text information, and constructing a semantic index corresponding to the structured text information; retrieving target content corresponding to the placeholder from the structured text information according to the semantic index, and performing content optimization on the target content based on retrieval enhancement through a large model to obtain target writing content; and mapping and filling the target writing content into a corresponding placeholder position in the target template document to generate a target writing document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of document writing technology, and in particular to an intelligent writing method, apparatus, device and storage medium based on a large model. Background Technology

[0002] With the rapid development of Natural Language Processing (NLP) and large language model technologies, intelligent writing tools based on large models such as GPT, BERT, and Tongyi Qianwen are gradually becoming more widespread. These tools can perform functions such as text generation, content summarization, language translation, and logical reasoning, providing efficiency support for document writing in various fields. Meanwhile, specialized government documents such as special bond implementation plans are characterized by strict formatting requirements, large volumes of reference materials, strong professional attributes, and long document lengths. Traditional purely manual writing methods suffer from low efficiency, inconsistent standards, and high labor costs. Therefore, the industry has an urgent need for automated intelligent writing technologies adapted to professional scenarios.

[0003] However, existing intelligent document writing technologies suffer from limitations in practical applications for professional long documents, including insufficient document template flexibility, long adaptation cycles, high development costs, and poor scalability. Furthermore, large-scale model generation can easily lead to factual illusions within specific professional fields, failing to meet the quality standards of formal professional documents.

[0004] Therefore, how to improve the writing efficiency and content quality of professional documents generated based on large models has become an urgent problem to be solved. Summary of the Invention

[0005] The main purpose of this application is to provide an intelligent writing method, apparatus, device, and storage medium based on a large model, aiming to solve the technical problem of how to improve the writing efficiency and content quality of professional documents generated based on a large model.

[0006] To achieve the above objectives, this application proposes an intelligent writing method based on a large model, which includes: Configure placeholders in the document template to be written, and generate a target template document containing the placeholders; Content recognition is performed on the source document to obtain structured text information, and a semantic index corresponding to the structured text information is constructed. The target content corresponding to the placeholder is retrieved from the structured text information based on the semantic index, and the target content is optimized based on retrieval enhancement using a large model to obtain the target writing content. The target writing content is mapped and filled into the corresponding placeholder positions in the target template document to generate the target writing document.

[0007] Furthermore, to achieve the above objectives, this application also proposes an intelligent writing device based on a large model, which includes: The template preprocessing module is used to configure placeholders in the template of the document to be written and generate a target template document containing the placeholders. The structured processing module is used to perform content recognition on the source document to obtain structured text information and to construct a semantic index corresponding to the structured text information. The content optimization module is used to retrieve the target content corresponding to the placeholder from the structured text information according to the semantic index, and to perform retrieval-enhanced content optimization on the target content through a large model to obtain the target writing content; The intelligent writing module is used to map and fill the target writing content into the corresponding placeholder positions in the target template document, thereby generating the target writing document.

[0008] In addition, to achieve the above objectives, this application also proposes a large-model-based intelligent writing device, the device including: a memory, a processor, and a large-model-based intelligent writing program stored in the memory and capable of running on the processor, the large-model-based intelligent writing program being configured to implement the steps of the large-model-based intelligent writing method as described above.

[0009] In addition, to achieve the above objectives, this application also provides a storage medium storing a program that implements a large-model-based intelligent writing method, wherein the program implementing the large-model-based intelligent writing method is executed by a processor to implement the steps of the large-model-based intelligent writing method as described above.

[0010] This application provides an intelligent writing method, apparatus, device, and storage medium based on a large model. The method includes: configuring placeholders in a document template to be written, generating a target template document containing the placeholders; performing content recognition on the source document to obtain structured text information, and constructing a semantic index corresponding to the structured text information; retrieving target content corresponding to the placeholders from the structured text information based on the semantic index, and performing retrieval-enhanced content optimization on the target content using a large model to obtain target writing content; and mapping and filling the target writing content into the corresponding placeholder positions in the target template document to generate the target writing document.

[0011] This application achieves accurate information extraction from long documents through content recognition and semantic indexing. By combining a large model with retrieval enhancements, it performs textual reconstruction on the target content to improve the professionalism and accuracy of the written content, effectively enhancing document quality. Furthermore, this application allows for flexible adaptation of the target written content through template placeholder configuration, thereby improving document generation efficiency. Attached Figure Description

[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a flowchart illustrating the first embodiment of the intelligent writing method based on a large model in this application; Figure 2 This is a schematic diagram of the template document processing process of the intelligent writing method based on a large model in this application; Figure 3 This is a flowchart illustrating the second embodiment of the intelligent writing method based on a large model in this application; Figure 4 This is a schematic diagram illustrating the content recognition process of the intelligent writing method based on a large model in this application; Figure 5 This is a schematic diagram of the document intelligent writing process based on the large model intelligent writing method of this application; Figure 6 This is a simplified flowchart illustrating the intelligent writing method based on a large model used in this application. Figure 7 This is a schematic diagram of the module structure of the intelligent writing device based on a large model according to an embodiment of this application; Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the intelligent writing method based on a large model in the embodiments of this application.

[0015] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0016] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application. Furthermore, all actions involving the acquisition of signals, information, or data in this application are performed in accordance with the relevant data protection regulations of the country where the application is located and with authorization from the owner of the corresponding device.

[0017] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0018] The main solution of this application is as follows: Placeholders are configured in the template of the document to be written, and a target template document containing the placeholders is generated; content recognition is performed on the source document to obtain structured text information, and a semantic index corresponding to the structured text information is constructed; the target content corresponding to the placeholders is retrieved from the structured text information according to the semantic index, and the target content is optimized based on retrieval enhancement through a large model to obtain the target writing content; the target writing content is mapped and filled into the corresponding placeholder position in the target template document to generate the target writing document.

[0019] Currently, existing intelligent document writing technologies suffer from three core shortcomings in the practical application of professional long documents. First, document templates lack flexibility. Existing tools generate documents with relatively fixed formats. To meet the differentiated format requirements of different regions and business scenarios, customized development is often required, resulting in long adaptation cycles, high development costs, and poor scalability. They also fail to support flexible customization and editing of templates. Second, source material recognition and processing capabilities are limited. For multimodal long documents of 100,000 words or more, including text, images, tables, and data visualization charts related to special-purpose bonds, the length of a single document easily exceeds the processing limit of the large model token, making full processing impossible. Furthermore, multimodal information recognition is incomplete, and the extraction accuracy of tables, charts, and other content is insufficient, making it difficult to achieve accurate structured extraction. Third, the quality of generated content is limited. Pure large-model generation in professional fields is prone to issues such as factual illusions, outdated knowledge, and insufficient professionalism. Directly extracting content from source materials generally results in concise expression and weak logical coherence, failing to meet the quality standards of formal professional documents.

[0020] To address this issue, this application proposes a method that leverages a large language model as the core computing power, combined with document template configuration, multimodal material recognition, and retrieval-enhanced generation technologies, to automatically extract information from source materials and generate target documents that meet format and professional requirements. This application achieves accurate information extraction from long documents through content recognition and semantic indexing. By combining a large model with retrieval enhancement, it improves the professionalism and accuracy of the written content through rewriting, effectively enhancing document quality. Furthermore, this application allows for flexible adaptation of the target written content through template placeholder configuration, thereby improving document generation efficiency.

[0021] It should be noted that the execution subject of this embodiment can be an intelligent writing system based on a large model, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an intelligent writing device based on a large model capable of performing the above functions. This embodiment does not specifically limit it in this way. The following uses an intelligent writing device based on a large model (hereinafter referred to as the writing device) as the execution subject to describe this embodiment and the following embodiments.

[0022] Based on this, embodiments of this application provide an intelligent writing method based on a large model, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the intelligent writing method based on a large model in this application.

[0023] In this embodiment, the intelligent writing method based on a large model includes steps S10 to S40: Step S10: Configure placeholders in the document template to be written, and generate a target template document containing the placeholders; It is understood that the above-mentioned document template can be an original benchmark document with a fixed format framework and chapter structure, with only some content needing to be dynamically filled according to the specific project. For example, in this embodiment, an original Word document (which can be called special bond identification material) that meets the reporting requirements of different regions can be set as a document template to be written. It can contain fixed application chapters, standard forms and standardized formats that meet the reporting requirements of different regions.

[0024] The placeholders mentioned above can be parameterized tags with unique identifiers, used to mark the filling positions of dynamic content in the template. In this embodiment, the placeholders can adopt a special wrapping format (such as "{Project Name}", "{Total Investment Amount}"), and each placeholder can correspond to a business element to be filled, with a one-to-one mapping relationship between it and the actual content to be dynamically filled into the template later. Therefore, in the above-mentioned document template to be written, corresponding placeholder tags can be inserted at all positions of content that needs to be dynamically written, and a mapping relationship between placeholders and business elements can be established. This embodiment can implement the visual placeholder configuration based on secondary development of Kingsoft WPS Document Service.

[0025] At this point, the target template document can be a template document that has completed all placeholder configurations and includes complete placeholder tags and mapping rules. This target template document can serve as the base carrier for the subsequent automatic filling and generation of the final document.

[0026] As one possible implementation, in this embodiment, step S10 includes steps S11 to S12: Step S11: Obtain the element fields of the document template to be written, and establish a mapping relationship between the element fields and placeholders; Understandably, the aforementioned element fields can be standardized names of business content items that need to be dynamically changed in the document template to be written, identified through a standardized element library. This represents a business abstraction of the dynamic content. In this embodiment, the business content of target documents such as special bond implementation plans can be pre-sorted, all dynamically changing content items can be extracted, and they can be classified according to business categories (project basic information, funding information, construction information, benefit information, etc.) to form a standardized element field library, with a unique field code assigned to each field. This standardized element library can be jointly reviewed and confirmed by business personnel and technical personnel to ensure the completeness and accuracy of the fields. For example, when a special bond implementation plan needs to be generated, the element fields may include several business fields such as project name, project owner, construction address, construction period, total investment, special bond quota, capital ratio, economic benefits, and social benefits.

[0027] At this point, the above mapping relationship can be a one-to-one correspondence between feature fields and placeholders. In this embodiment, the mapping relationship can be stored in the system parameter configuration library of the writing device in the form of key-value pairs. The same feature field can use the same placeholder in different templates to achieve data reuse. The key can be a unique code for the feature field, and the value can be the label text of the corresponding placeholder. For example, the project name corresponds to the placeholder "{PROJECT_NAME}", and the total investment corresponds to the placeholder "{TOTAL_INVESTMENT}".

[0028] Step S12: Based on the mapping relationship, placeholder replacement processing is performed on the content that needs to be dynamically written in the document template to be written, and a target template document containing the placeholder is generated.

[0029] Understandably, unlike the fixed, standardized chapter titles, explanatory text, and fixed-format frameworks in a template, the dynamically written content mentioned above can be content that is not fixed and changes depending on the specific project. In this case, during the placeholder replacement process, the writing device can replace the original sample text, blank spaces, and other dynamic content in the template with corresponding placeholder tags, thus achieving template parameterization.

[0030] As one possible implementation, in this embodiment, step S12 includes steps S121~S122: Step S121: Identify the table area in the document template to be written, and locate the position of the content to be dynamically written in the table area based on the table header information; It's important to understand that the aforementioned table area can refer to the content area presented in a row-column grid structure within the document template to be written. For example, when the document template is a special bond implementation plan, it includes various standard tables such as funding calculation tables, project investment estimation tables, fundraising tables, annual investment plan tables, and construction content detail tables. In this case, the writing device can parse the document's DOM (Document Object Model) structure through the WPS document interface to locate all table objects in the document. Simultaneously, for each table, it extracts information such as the total number of rows and columns, cell merging information, cell style attributes (font, border, background color, alignment), and the row number of the table header, completing the structured parsing of the table area.

[0031] Understandably, the aforementioned header information can be the title text in the first row (or first column) of the table, used to explain the meaning of the data in each column (row). It is the core basis for identifying the semantics of the table and matching corresponding elements, such as the header text in a funding calculation table, such as "Project Name," "Total Investment," "Special Bond Funds," and "Capital." In this case, the location of the aforementioned content can be the cell location in the table where dynamic data needs to be filled in. In this embodiment, the content location can refer to the data row cell corresponding to the header.

[0032] For example, in this embodiment, the writing device can perform semantic parsing on the table header text and perform semantic similarity matching with the feature field library. If the matching degree is higher than the threshold (default 90%), it is determined to be the corresponding business element, and an association relationship of "table column number - table header name - corresponding feature field - corresponding placeholder" is established. After determining the business elements corresponding to each column in the table, the position of the data row cell corresponding to each column can be located according to the column number, and marked as the position of the content to be inserted as a placeholder.

[0033] Step S122: Insert a corresponding placeholder at the content location, and adaptively expand the number of rows in the table area according to the content requirements of the table area to generate a target template document containing the placeholder.

[0034] It is easy to understand that the above-mentioned adaptive row expansion processing refers to the operation of automatically adding the corresponding number of table rows according to the style specifications (font, font size, border, row height, alignment) when the writing device detects that the number of detailed data rows to be filled exceeds the number of original data rows in the template table, and simultaneously configuring the corresponding placeholders to ensure that the table format is consistent and the data is completely contained.

[0035] For example, for single-value tables (such as a project basic information table, where one row of data corresponds to one project), the writing device can directly insert the matched placeholder label into the corresponding data cell; for detail tables (such as a construction content detail table, containing multiple detail data), the corresponding placeholder can be inserted into the data cell of the first row of the table, and that row can be marked as a "baseline extended row," recording all style attributes of that row. Furthermore, after inserting the placeholders, the writing device can highlight all placeholders in the table for user verification and confirmation, and supports manual adjustment of the correspondence between placeholders and columns.

[0036] Furthermore, for detail tables, an adaptive row number expansion rule can be set with the trigger condition "number of rows to be filled > number of baseline rows". The expansion method can be "copy baseline row style". The authoring device can bind and store this adaptive row number expansion rule with the table, saving it along with the template. Finally, after completing all table placeholder configurations and expansion rule settings, the target template document containing table placeholders and expansion configurations can be exported and saved to the template library.

[0037] It should be noted that during the subsequent document population stage, the writing device obtains the data to be populated in the corresponding table, counts the number of rows, and if the number of data rows is less than or equal to the number of template baseline rows, it directly fills in the corresponding placeholders row by row. If the number of data rows is greater than the number of template baseline rows, the writing device automatically calculates the number of rows that need to be added, and based on the row number adaptive expansion rules, copies the corresponding number of new table rows according to the style of the baseline rows, and inserts the corresponding placeholders in the cells of the new rows. Finally, after completing the row expansion, all data is filled in row by row to ensure that the table data is complete and the format is consistent.

[0038] Therefore, this embodiment can further limit the configuration method of placeholders in the table area of ​​the template, clarify the implementation scheme of table header positioning, cell placeholder insertion, and adaptive row expansion, thereby solving the problems of fixed table format in existing templates, inability to adapt to the differences in data volume of different projects, and low efficiency and error-proneness of manually adjusting the table format, and realizing flexible adaptation of table templates.

[0039] It is easy to understand that in this embodiment, the writing device can build a template visualization interface based on the document editing capabilities of WPS secondary development, and replace the selected dynamic content area with the corresponding placeholder in the template visualization interface. The placeholder can be inserted in two ways: quick insertion via right-click menu and insertion via right-side parameter panel. It also supports modification, deletion, and highlighting verification of the placeholder.

[0040] For example, for ease of understanding, refer to Figure 2 The process of generating the target template document is explained. Figure 2This diagram illustrates the template document processing procedure of the intelligent writing method based on a large model, as described in this application. Figure 2 As shown, the writing device can be configured with a client, a business system, and a document transfer platform built on Kingsoft WPS Office. For example... Figure 2 As shown, users can pre-build original special-purpose bond implementation plan templates that meet the application requirements of different regions, i.e., the aforementioned document templates to be written. During this process, users can first initiate a request to create a new implementation plan template on the client side, and the business system will save the document template and the original implementation plan document accordingly. Next, users can customize and edit the implementation plan template. The business system can query the preset parameter library to obtain the configured placeholder identifier parameters and display them to the user, while simultaneously querying the online editing template link corresponding to the file template. If the corresponding link already exists in the project plan for the file template, the business system can directly return the file editing link to the client; otherwise, it will retrieve the corresponding link from the document transfer platform and return it to the client.

[0041] Subsequently, when a user needs to edit the placeholders in the document template to generate the target template document, the user can open the corresponding document template in the client via a file editing link. Figure 2 The document can be edited using templates, while the business system can query the original implementation plan template file information corresponding to the document template to be written, load the document template to be written based on the visual interface of the document transfer platform, and render the document content of the original implementation plan on the client's front end, rendering it into an online editable document interface, while retaining all the formats, styles, tables and layouts of the original implementation plan.

[0042] Next, users can edit placeholder label information on the client based on the original implementation plan. During this process, users can select the text content to be dynamically added to the document in the editing interface of the template visualization interface. At this point, users can right-click to bring up the menu and select the "Add Parameters" option. The document transfer platform will then display a full list of placeholders generated based on the pre-established mapping relationship between feature fields and placeholders in the parameter panel on the right. This full list of placeholders supports filtering by category and keyword search. Simultaneously, after detecting that the user has selected the corresponding placeholder and confirmed the insertion, the document transfer platform will replace the originally selected content with the placeholder label. Repeating the above operations completes the replacement of placeholders for all text-based dynamic content in the document.

[0043] In addition, during the replacement process, users can enable the "Placeholder Highlighting" function. The system will mark all inserted placeholders with a yellow background, making it easier for users to check the completeness of the replacement and correct any omissions or errors. After all placeholders have been replaced, users can save the implementation plan editing document by clicking the "Save Template" button. The document transfer platform can then generate and export an implementation plan template document containing complete placeholder tags, i.e., the target template document, and store it in the business system's template library. Simultaneously, the business system can automatically record a list of all placeholders corresponding to this template, establishing a "template ID - placeholder list - element field mapping" relationship to provide a matching basis for subsequent automatic filling. Therefore, this embodiment can flexibly configure templates without coding, solving the problems of large differences in special bond templates across different regions, high costs and long development cycles for customized solutions, and poor template scalability in existing technologies.

[0044] Step S20: Perform content recognition on the source document to obtain structured text information, and construct a semantic index corresponding to the structured text information; It is understood that the aforementioned source material documents can be original reference materials used to support the writing of the target document. In this embodiment, the source material documents may include feasibility study reports for special bond projects, feasibility study approval documents, project filing certificates, etc., and may contain multimodal content such as text, tables, data charts, and images.

[0045] At this point, the aforementioned structured text information can refer to a standardized set of information formed by comprehensively using technologies such as PyPDF2 text extraction, OCR (Optical Character Recognition), OpenCV image processing, and large-scale table recognition to identify, extract, and organize the source document, and then organizing it according to a certain logic. This information may include text, tabular data, chart and graph data, etc. Furthermore, in this embodiment, the structured text information can possess a clear hierarchical structure and searchability.

[0046] Step S30: Retrieve the target content corresponding to the placeholder from the structured text information according to the semantic index, and perform content optimization based on retrieval enhancement on the target content through a large model to obtain the target writing content; Step S40: Map and fill the target writing content into the corresponding placeholder position in the target template document to generate the target writing document.

[0047] At this point, the aforementioned semantic index can be a retrieval index built based on the semantic features of structured content. In this embodiment, the semantic index can use the title identifier of the content paragraph as the index key, and associate the storage location of the corresponding content paragraph with the semantic vector, thereby facilitating the subsequent large model to quickly locate and retrieve content fragments that match the search requirements in structured text information.

[0048] It is important to understand that the aforementioned target content can be an original content fragment retrieved from the structured text information of the source material, matching the business elements corresponding to the placeholders. This fragment can serve as the foundational material for subsequent content optimization. In this context, the aforementioned retrieval enhancement can refer to RAG (Retrieval-augmented Generation) technology. Specifically, in this embodiment, effective information related to the current content can be retrieved from an external authoritative knowledge base. The retrieval results and the original content are then input into a large model to assist in generating more accurate, professional, and factually accurate target content. During this content optimization process, the large model can professionally rewrite, logically organize, refine the expression, and verify the facts of the original target content based on the effective information obtained through retrieval enhancement, thereby improving the professionalism and completeness of the content.

[0049] Therefore, the content to be written for the target document can be the final content that meets the professional expression and logical requirements of the target document after search enhancement and optimization and large model expansion and polishing, and can be directly filled into the corresponding position of the template.

[0050] Furthermore, in this embodiment, the target writing document can be a final formal document with standardized format and complete content generated after filling all the target writing content into the corresponding placeholder positions of the target template document. In this embodiment, the target writing document can be a complete special bond implementation plan document.

[0051] For example, this embodiment can accurately fill the target writing content into the corresponding placeholder position of the target template document according to the mapping relationship between placeholders and business elements, while restoring the document format style, and obtaining the final complete formal document exported after completing all content filling and format verification, that is, the target writing document.

[0052] This embodiment provides an intelligent writing method based on a large model. The method includes: configuring placeholders in the template of the document to be written, generating a target template document containing the placeholders; performing content recognition on the source document to obtain structured text information, and constructing a semantic index corresponding to the structured text information; retrieving target content corresponding to the placeholders from the structured text information according to the semantic index, and performing content optimization based on retrieval enhancement through a large model to obtain target writing content; mapping and filling the target writing content into the corresponding placeholder positions in the target template document to generate the target writing document.

[0053] This embodiment achieves accurate information extraction from long documents through content recognition and semantic indexing. By combining a large model with retrieval enhancements, it performs textual reconstruction on the target content to improve the professionalism and accuracy of the written content, effectively improving document quality. Furthermore, this application can also achieve flexible adaptation of the target written content through template placeholder configuration, thereby improving document generation efficiency.

[0054] Based on the first embodiment of this application, in the second embodiment of this application, the same or similar content as the first embodiment described above can be referred to the above description, and will not be repeated hereafter.

[0055] Based on the first embodiment, please refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the intelligent writing method based on a large model according to this application. In this embodiment, step S20 further includes steps S21 to S24: Step S21: Extract text content and recognize image content from the source material document to obtain the text information and image information of the source material document; It is understandable that the aforementioned text content extraction refers to the operation of directly extracting native, editable text content from a PDF source document using text extraction tools such as PyPDF2. For ease of understanding, please refer to... Figure 3 Provide an explanation. Figure 3 This is a schematic diagram of the content recognition process of the intelligent writing method based on a large model in this application.

[0056] like Figure 3 As shown, the writing device can load source document materials (such as special bond identification materials) using the PyPDF2 tool, read the original text of each page, concatenate all the text in page order, and retain paragraph and line breaks to output the initial text information of plain text. The aforementioned image content recognition refers to the process of extracting text information contained in non-editable text images such as pictures, scanned pages, and photocopies in source document materials using Optical Character Recognition (OCR) technology.

[0057] At this point, the aforementioned text information can be a collection of plain text content obtained through both native text extraction and OCR recognition. That is, the writing device can insert the recognized text into the corresponding positions of the text information obtained from the OCR recognition results, according to the image's position in the original document, thus supplementing and improving the initial text information. The aforementioned image information can be a collection of all image-related content in the source document, including data visualization charts, on-site photos, diagrams, etc., and the data visualization charts contain extractable quantitative indicators.

[0058] Step S22: Perform coordinate axis recognition and data point positioning processing on the data visualization chart in the image information, and extract the indicator data in the data visualization chart based on the mapping relationship between the pixel coordinates and actual data values ​​of the data visualization chart obtained after processing. Understandably, the aforementioned data visualization charts can be any type of chart that graphically displays data. In this embodiment, they mainly include line charts, pie charts, bar charts, and column charts. Here, the aforementioned coordinate axis recognition refers to the operation of identifying the position, direction, and tick marks of the horizontal and vertical axes in the chart using image processing technology. The aforementioned data point positioning refers to the operation of identifying the position of graphic elements representing data values ​​in the chart, such as the inflection points of a line chart, the tops of bars in a bar chart, and the sector boundaries of a pie chart, and obtaining their pixel coordinates in the image. At this point, the writing device can call the OpenCV image processing library to perform grayscale conversion, binarization, and edge detection preprocessing on the data visualization chart image, removing background and text interference. Then, Hough transform is used to detect straight lines on the coordinate axes, determining the origin and direction of the coordinate axes. Finally, OCR is used to extract the tick marks and values ​​on the coordinate axes, recording the pixel coordinates and corresponding values ​​for each tick mark. Finally, contour detection is used to locate the pixel coordinates of data points. For line charts, contour detection can identify all data points on the line and record the pixel coordinates of each point. For pie charts, the edge lines of each sector can be detected, and the central angle of each sector can be calculated. For bar charts, the top pixel position and width of each bar can be detected. It is understood that the mapping relationship between the aforementioned pixel coordinates and actual data values ​​can refer to the mathematical transformation relationship between the image pixel position and the actual business data value established in advance based on the scale values ​​of the coordinate axis and the pixel position, which can be expressed as a pixel-value mapping function. For example, in this embodiment, the expression of the pixel-value mapping function can be: actual value = (pixel position - starting pixel) × (scale span / pixel span).

[0059] At this point, the aforementioned indicator data can be quantitative business data extracted from data visualization charts, such as annual revenue data and investment ratio data, stored in a structured numerical format. The data processing device can then use the aforementioned pixel-to-value mapping function to convert the pixel coordinates of the data points into actual business values, and combine this with legends and axis labels for semantic annotation, generating structured indicator data.

[0060] Step S23: Identify and convert the table structure content in the source material document to obtain table structured data; Step S24: Integrate the text information, the indicator data, and the structured table data to obtain structured text information.

[0061] Understandably, the aforementioned table structure content recognition refers to the operation of parsing and extracting the structure and content of tables in source materials (including native PDF tables and image-based tables), restoring the table's row and column structure and cell content. In this embodiment, the large-scale model's table recognition capabilities can be used to achieve this process. Here, the aforementioned structured table data can be table data with a clear row and column structure after recognition and conversion. In this embodiment, the structured table data is stored in Markdown format, preserving the table hierarchy and content for easy subsequent processing and restoration. Therefore, the writing device can input table area images or native tables into the large-scale model for table recognition. The model then parses the table's row and column structure, merges cell relationships and cell content, and outputs Markdown-formatted structured table data.

[0062] Finally, the writing device can concatenate and integrate text information, chart indicator data, and structured table data according to the page order and chapter logic of the source material, and mark the source location (page number, chapter) for each part of the information, forming a complete, location-marked, unified multimodal structured data set, i.e., structured text information. Therefore, this embodiment can support the full recognition and extraction of text, tables, and data charts, improving the completeness of information extraction and avoiding the omission of key data; at the same time, the structured text information output by this embodiment in a unified format can be directly used for subsequent semantic retrieval and content filling, thereby improving information utilization.

[0063] Understandably, directly inputting existing long documents of 100,000 words into a large model can easily lead to exceeding the token limit, or problems such as low efficiency and poor accuracy in full-text retrieval. Therefore, it is necessary to achieve efficient and searchable processing of long documents. As one possible implementation method, in this embodiment, step S20 further includes steps S25-S26: Step S25: Based on the directory structure and heading level of the source material document, the structured text information is segmented to obtain several structured content segments; Understandably, the above directory structure can be the table of contents at the beginning of the source document, containing the titles and corresponding page numbers of all chapters, thus representing the overall framework of the source document. The above heading levels can be the hierarchical division of chapter headings within the document, typically divided into first-level, second-level, and third-level headings, corresponding to different fonts, font sizes, and outline levels, reflecting the hierarchical relationship between chapters in the source document.

[0064] For example, the writing device can parse the text format features in structured text information, extract the font, font size, bold attribute, and outline level of all text, and then, in combination with the table of contents of the source document, match and identify all first-level headings, second-level headings, and third-level headings, and record the text content, location, and level of each heading; finally, based on the extracted information, a complete heading tree-like hierarchical structure is constructed to clarify the subordinate relationship between headings at each level.

[0065] At this point, the aforementioned structured content segments can be independent content fragments obtained by dividing the entire text according to the heading hierarchy, and each content segment corresponds to a lowest-level chapter topic, containing all text, tables, and chart data under that chapter. In this embodiment, based on the document's directory structure and heading hierarchy, the operation of splitting complete long document structured text information into multiple independent, topic-defined structured content segments solves the problem of long documents easily exceeding the large model token limit.

[0066] For example, the writing device can use the lowest level heading (usually a third-level heading) as the segmentation benchmark. Starting from the beginning of that heading and ending at the beginning of the next same-level heading, all text, tables, and charts within that interval are divided into a structured content segment. Then, a unique paragraph ID is assigned to each content segment, and the corresponding heading paths at all levels are recorded to generate a title identifier (such as "3. Construction Plan / 3.1 Construction Content / 3.1.1 Main Project"). Finally, the length of each content segment is verified. If the number of words in a single content segment still exceeds the single-round processing token threshold of the large model (such as 4096 tokens), it can be further divided into sub-segments to ensure that the length of each content segment is within the processing range of the large model.

[0067] Step S26: Generate a semantic index based on the index relationship between the title identifier and the content semantic vector of each structured content segment.

[0068] Accordingly, the aforementioned title identifier can be a unique identifier for each structured content segment, usually composed of titles at various levels, such as "1. Project Overview / 1.1 Basic Project Information". This title identifier can be used to distinguish different content segments and simultaneously carry chapter semantic information.

[0069] Furthermore, in this embodiment, the writing device can call a text embedding model (such as bge-large-zh) to vectorize the title identifier and text summary of each structured content segment, generating semantic feature vectors of the corresponding dimensions.

[0070] The aforementioned index relationship refers to the mapping association between the title identifier and the storage location and semantic vector of the corresponding structured content segment, which can be used for rapid retrieval and location. Therefore, this embodiment can generate a unique title identifier and semantic vector for each structured content segment, and bind the semantic vector to the paragraph ID, title identifier, and storage location of the corresponding content segment, establishing a mapping relationship between the title identifier, storage location, and semantic vector to form a searchable semantic index library. At this time, each index entry in the semantic index library can contain: paragraph ID, title identifier, semantic vector, and content segment storage path, and can be stored using a vector database (such as Milvus), supporting vector similarity retrieval. Furthermore, this embodiment can perform separate storage of the index and content, that is, separate storage of the semantic index library and content segment entity files, thereby achieving a lightweight index library that can be loaded and retrieved quickly; while the content segments can be read on demand, reducing memory usage.

[0071] Therefore, this embodiment can segment long documents into independent segments through segmentation processing, enabling large-scale model processing of documents with up to 100,000 words; and by combining semantic indexing with vector retrieval, it can improve the accuracy of retrieval matching while reducing content location response time.

[0072] As one possible implementation, in this embodiment, step S30 includes steps S31 to S33: Step S31: Generate a content retrieval instruction based on preset element extraction rules, input the content retrieval instruction and the structured text information into the large model, and obtain the index position list corresponding to the placeholders output by the large model; Understandably, the aforementioned element extraction rules can be pre-defined Prompt rules for each business element field, which clearly define the element extraction requirements, format requirements, extraction scope, and validation standards, corresponding to the core prompts that guide the large model to accurately retrieve the extracted content. The aforementioned content retrieval instructions can be specific Prompt instructions generated based on the element extraction rules and the element field corresponding to the current placeholder, which can be used to input into the large model to perform content retrieval and location tasks. That is, in this embodiment, the writing device can call a preset element extraction rule template based on the element field corresponding to the current placeholder, fill in parameters such as element name and extraction requirements, and generate a retrieval Prompt that can be directly input into the large model.

[0073] For example, the writing device can traverse all placeholders in the target template, obtain the business element field corresponding to each placeholder, and then call the extraction rule template of the corresponding element from the element rule library. A template example could be: "Please locate the chapter related to [Project Construction Cycle] from the following document index, output the title identifier of the corresponding chapter, and require that the extracted content includes the project's start time and completion time." Finally, the writing device fills the current element name and extraction requirements into the template to generate a complete content retrieval instruction.

[0074] It is important to understand that the above-mentioned list of indexed locations can be a set of title identifiers of all candidate content segments matched from the semantic index by the large model according to the content retrieval instructions. In other words, it is a list of candidate content locations, which usually contains multiple matching results, such as 3-5 candidate title identifiers.

[0075] Step S32: Based on the semantic similarity scoring rules, score each index position in the index position list, and select the target structured content segment corresponding to the index position with the highest score as the initial document content; Understandably, the aforementioned semantic similarity scoring rule can refer to the calculation rule of obtaining the similarity score between 0 and 1 for each index position in the index position list by calculating the cosine similarity between the semantic vector of the retrieval instruction and the semantic vector of the candidate content segment. The higher the similarity score, the higher the content matching degree of the index position.

[0076] At this point, the initial document content mentioned above can be the complete content of the structured content segment with the highest matching degree selected from the index location list, which is the original material for extracting the target elements.

[0077] Step S33: Standardize and convert the format information in the initial document content to obtain the target content with unified format.

[0078] Understandably, the aforementioned format standardization conversion process refers to the process of uniformly converting and standardizing the formats of dates, amounts, percentages, units, etc., in the extracted content through regular expression matching and rule conversion, in order to solve the problem of inconsistent formats of similar information in different source materials. For example, converting "2024.1.1" to "January 1, 2024", and converting "120 million" to "120 million yuan".

[0079] Therefore, this embodiment can improve the accuracy of content location and reduce content extraction errors through dual screening of large model semantic matching and similarity; and ensure that the format and units of the filled content are consistent through format standardization processing, ensuring that the generated document meets the standard requirements of formal documents and avoiding manual secondary adjustments.

[0080] As one possible implementation, in this embodiment, step S30 further includes steps S34 to S36: Step S34: Retrieve related knowledge information from an external knowledge base based on the semantic features of the target content; Understandably, the aforementioned semantic features can be feature information that characterizes the core semantic meaning of the target content, typically presented in vector form, and can be used for semantic similarity calculation and retrieval matching. The aforementioned external knowledge base can be an authoritative professional knowledge database specifically constructed outside of the large model's training data. For example, regarding the implementation plan of special-purpose bonds, the corresponding external knowledge base in this embodiment may include a special-purpose bond policy and regulation database, an industry construction standard database, an excellent implementation plan template database, and a funding calculation rule database, etc. All content in this database has been manually verified and possesses authority, timeliness, and traceability. In this embodiment, the writing device can extract the semantic vector of the target content and perform similarity retrieval in the vector index of the external knowledge base. At this time, the aforementioned related knowledge information can be knowledge content retrieved from the external knowledge base that is related to the current target content theme, and can be used to assist the large model in content expansion and optimization. For example, this related knowledge information may include policy provisions, normative requirements, reference statements, calculation rules, etc.

[0081] For example, the writing device can call a text embedding model to vectorize the target content and generate a semantic feature vector of the target content; then input the semantic feature vector into the vector retrieval engine of an external knowledge base, set the recall quantity to TopN (e.g., Top5), and perform similarity retrieval; finally, retrieve the 5 most relevant related knowledge information from the knowledge base that are semantically most relevant to the target content, including corresponding policy provisions, normative requirements, reference template fragments, etc.

[0082] Step S35: Input the target content and the associated knowledge information into the large model for semantic understanding to obtain the rewritten document content; It is easy to understand that the above-mentioned extended document content can be the content generated by the large model after expanding, logically sorting, and professionally polishing the original target content and related knowledge information. Compared with the original content, it is more complete, more professional, and more logically coherent, and meets the expression requirements of formal documents.

[0083] For ease of understanding, please refer to Figure 4 Provide an explanation. Figure 4 This diagram illustrates the document intelligent writing process of the intelligent writing method based on a large model, as described in this application. Figure 4As shown, the writing device can perform knowledge deduplication on the recalled Top N related knowledge items, removing duplicate content and outdated knowledge items. Then, it extracts fragments of the retained related knowledge, extracting the core content most relevant to the target topic and removing irrelevant information. Next, it performs original text fusion, that is, it orderly splices the original target content with the filtered related knowledge to form the writing input material. The material is clearly marked with "original content" and "reference knowledge", guiding the large model to use the original content as the core and the reference knowledge as a supplement.

[0084] Then, a writing prompt with clear writing requirements and expansion logic can be configured based on the input materials. For example, "Based on the original input content and combined with reference knowledge, please expand and optimize the content. Requirements: 1. Strictly retain the core facts of the original content and do not add false information; 2. Supplement with policy basis and professional expressions to enhance the professionalism of the content; 3. Optimize paragraph logic to ensure coherent and fluent expression; 4. Conform to the formal writing style of official documents." Finally, the writing prompt and the integrated materials are input into the large model, which performs semantic understanding and generation to output the writing document content.

[0085] Step S36: Optimize the target content based on the content of the tracing document to obtain the target writing content.

[0086] It should be noted that during the above content optimization process, the writing device can first perform content verification and check, that is, compare the content of the transcribed document with the original target content to verify whether the core facts (data, time, subject, etc.) are consistent. If there are any inconsistencies, they will be corrected to ensure that the facts are accurate and without illusions. After the verification is passed, the content will be sorted according to the final document to generate orderly target writing content and output to the document filling stage.

[0087] Therefore, in this embodiment, all the tracing content of the large model can be generated based on the original materials and authoritative knowledge base, which can reduce the illusion problem of the large model and improve the accuracy of the content facts. The automated tracing proposed in this embodiment can shorten the writing time of a single paragraph from tens of minutes to a few seconds, while ensuring the quality of the content and greatly improving the efficiency of professional document writing.

[0088] This embodiment discloses the process of extracting text content and recognizing image content from source documents to obtain text and image information. Coordinate axis recognition and data point positioning are performed on data visualization charts in the image information, and indicator data is extracted from the data visualization charts based on the mapping relationship between the pixel coordinates and actual data values ​​obtained after processing. Table structure content in the source documents is recognized and converted to obtain structured table data. Text information, indicator data, and structured table data are integrated to obtain structured text information. The structured text information is segmented based on the directory structure and title hierarchy of the source documents to obtain several structured content segments. A semantic index is generated based on the index relationship between the title identifier and the content semantic vector of each structured content segment. Therefore, this embodiment achieves comprehensive extraction of text, images, and tables through multimodal parallel recognition, and achieves accurate quantitative extraction of chart data through coordinate mapping, improving the completeness and accuracy of source document information. Simultaneously, the directory structure segmentation process breaks down long documents into manageable structured content segments, and the index relationship between title identifiers and content enables rapid and accurate positioning, improving subsequent retrieval efficiency.

[0089] This embodiment also discloses a method for generating content retrieval instructions based on preset element extraction rules. The content retrieval instructions and structured text information are input into a large model to obtain a list of index positions corresponding to placeholders. Each index position in the list is scored based on semantic similarity scoring rules, and the target structured content segment corresponding to the index position with the highest score is selected as the initial document content. The format information in the initial document content is standardized to obtain the target content with a unified format. Related knowledge information is retrieved from an external knowledge base based on the semantic features of the target content. The target content and related knowledge information are input into the large model for semantic understanding to obtain the traced document content. The target content is optimized based on the traced document content to obtain the target written content. Therefore, this embodiment improves the accuracy of content retrieval by selecting the optimal index position through a semantic similarity scoring mechanism; it eliminates format differences between different source materials through format standardization conversion to ensure the consistency of the filled content. Simultaneously, by combining the large model with retrieval enhancement, external professional knowledge is introduced as a basis for traceability, improving the factual accuracy, professionalism, and traceability of the generated content.

[0090] For example, to help understand the technical concept or principle of the intelligent writing method based on a large model after combining this embodiment with the above-described Embodiments 1 and 2, please refer to Figure 6 , Figure 6 The following is a simplified flowchart of the intelligent writing method based on a large model in this application: This application constructs a fully automated writing closed loop consisting of "flexible template configuration - multimodal material structured recognition - RAG-enhanced content optimization - automatic filling generation," thereby solving three core problems in existing intelligent writing technologies: poor adaptability of fixed templates, insufficient accuracy of multimodal recognition in long documents, and the tendency for illusions and lack of professionalism in professional writing of large models. It achieves intelligent writing of long documents with high adaptability, high accuracy, and high professionalism.

[0091] like Figure 6 As shown, in this embodiment, the specific process may include the following four steps: Step 1: Configure template placeholders and generate the target template document: The intelligent writing device receives the document template uploaded by the user, loads the document based on the WPS document platform interface, sorts out all dynamic content items in the template, assigns a unique placeholder to each dynamic item, establishes a mapping table between elements and placeholders and stores it in the system parameter library. Through the visual editing interface, corresponding placeholders are inserted at all dynamic content positions in the template. At the same time, the placeholders for tables and special format areas are adapted, and the target template document containing complete placeholder tags is exported. The mapping configuration between the template and the placeholders is saved synchronously, thus completing the template preprocessing.

[0092] Step 2: Multimodal identification of source materials and construction of semantic index: The intelligent writing device receives source document documents (PDF format) uploaded by users, calls a multimodal recognition engine to perform full content recognition on the source materials, namely, extracting the original text through PyPDF2, recognizing text in images and scanned pages through OCR, extracting data chart indicators through OpenCV, and recognizing table structures through a large model. Then, it integrates all recognition results to generate complete structured text information, and segments the structured text information based on the table of contents and title hierarchy of the source materials, generating a semantic vector and a unique title identifier for each content segment, and building a semantic index library, which is stored separately from the content entities.

[0093] Step 3: Content retrieval and retrieval enhancement optimization to generate target content: Iterate through all placeholders in the target template document, generate corresponding content retrieval instructions for each business element corresponding to each placeholder, input the retrieval instructions and semantic index into the large model, locate candidate content segments through semantic matching, and extract the original target content after similarity scoring.

[0094] Then, the target content is standardized in terms of format, including date, amount, and unit. Based on the semantic features of the target content, relevant policies, regulations, and templates are retrieved from an authoritative external special bond knowledge base. Finally, the target content and related knowledge are input into a large model for content expansion, logic optimization, and professional polishing. After factual verification, the target content is obtained.

[0095] Step 4: Content mapping and filling to generate the target writing document: Based on the mapping relationship between placeholders and elements, all target writing content is precisely located to the corresponding placeholder positions in the target template document; content filling is performed, while restoring the original template's font, paragraph, table styles, and other formatting attributes to ensure accurate restoration of rich text styles; full format verification and content integrity verification are performed on the generated document; the final target writing document is exported, completing the entire intelligent writing process.

[0096] Therefore, this application can adapt to document templates with different format requirements through a placeholder-based template architecture without code development, thereby achieving flexible and configurable templates, shortening the template customization cycle, and reducing adaptation costs. Meanwhile, this application can support full-scale structured processing of multimodal documents with up to 100,000 characters, improve the recognition accuracy of text, tables, and charts, solve the token bottleneck in existing large-scale long text processing models, and achieve accurate multimodal recognition of long documents. Finally, this application can be combined with RAG retrieval enhancement technology to ensure that the content generated by the large model is factually verifiable and free of illusions, thereby improving the efficiency of writing professional documents while guaranteeing the professionalism and logical integrity of the content.

[0097] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the intelligent writing method based on the large model of this application. Any simple transformations based on this technical concept are within the protection scope of this application.

[0098] This application also provides an intelligent writing device based on a large model, please refer to... Figure 7 , Figure 7 This is a schematic diagram of the module structure of the intelligent writing device based on a large model according to an embodiment of this application. In this embodiment, the intelligent writing device based on a large model includes: The template preprocessing module 701 is used to configure placeholders in the template of the document to be written and generate a target template document containing the placeholders. The structured processing module 702 is used to perform content recognition on the source material document to obtain structured text information, and to construct a semantic index corresponding to the structured text information; The content optimization module 703 is used to retrieve the target content corresponding to the placeholder from the structured text information according to the semantic index, and to perform retrieval-enhanced content optimization on the target content through a large model to obtain the target writing content; The intelligent writing module 704 is used to map and fill the target writing content into the corresponding placeholder position in the target template document to generate the target writing document.

[0099] The intelligent writing device based on a large model provided in this application, employing the intelligent writing method based on a large model in the above embodiments, can solve the technical problem of how to improve the writing efficiency and content quality of professional documents generated based on a large model. Compared with the prior art, the beneficial effects of the intelligent writing device based on a large model provided in this application are the same as those of the intelligent writing method based on a large model provided in the above embodiments, and other technical features in the intelligent writing device based on a large model are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0100] This application provides a large-model-based intelligent writing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the large-model-based intelligent writing method in the first embodiment described above.

[0101] The following is for reference. Figure 8 This document illustrates a structural schematic diagram of a large-model-based intelligent writing device suitable for implementing embodiments of this application. The large-model-based intelligent writing device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The intelligent writing device based on a large model shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0102] like Figure 8As shown, the large-model-based intelligent writing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 1002 or programs loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the large-model-based intelligent writing device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the model-based intelligent writing device to communicate wirelessly or wiredly with other devices to exchange data. Although a model-based intelligent writing device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0103] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment disclosed in this application includes a model-based intelligent writing program product, comprising a model-based intelligent writing program carried on a computer-readable medium, the model-based intelligent writing program containing program code for performing the methods shown in the flowcharts. In such an embodiment, the model-based intelligent writing program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the model-based intelligent writing program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0104] The intelligent writing device based on a large model provided in this application, employing the intelligent writing method based on a large model in the above embodiments, can solve the technical problem of how to improve the writing efficiency and content quality of professional documents generated based on a large model. Compared with the prior art, the beneficial effects of the intelligent writing device based on a large model provided in this application are the same as those of the intelligent writing method based on a large model provided in the above embodiments, and other technical features in this intelligent writing device based on a large model are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0105] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0106] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0107] This application provides a storage medium having computer-readable program instructions (i.e., a large-model-based intelligent writing program) stored thereon, the computer-readable program instructions being used to execute the large-model-based intelligent writing method in the above embodiments.

[0108] The storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of the storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0109] The aforementioned storage medium may be included in a large-model-based intelligent writing device; or it may exist independently and not be assembled into a large-model-based intelligent writing device.

[0110] The aforementioned storage medium carries one or more programs. When the aforementioned one or more programs are executed by the intelligent writing device based on the large model, the intelligent writing device based on the large model becomes: intelligent writing based on the large model.

[0111] Large-model-based intelligent program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and large-model-based intelligent writing programs according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0113] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0114] The readable storage medium provided in this application is a storage medium that stores computer-readable program instructions (i.e., a large-model-based intelligent writing program) for executing the aforementioned large-model-based intelligent writing method. This addresses the technical problem of improving the writing efficiency and content quality of professional documents generated based on large models. Compared with the prior art, the beneficial effects of the storage medium provided in this application are the same as those of the large-model-based intelligent writing method provided in the above embodiments, and will not be repeated here.

[0115] The above are only some embodiments of this application and do not limit the scope of the solution of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of this application.

Claims

1. An intelligent writing method based on a large model, characterized in that, The method is applied to an intelligent writing device, and the method includes: Configure placeholders in the document template to be written, and generate a target template document containing the placeholders; Content recognition is performed on the source document to obtain structured text information, and a semantic index corresponding to the structured text information is constructed. The target content corresponding to the placeholder is retrieved from the structured text information based on the semantic index, and the target content is optimized based on retrieval enhancement using a large model to obtain the target writing content. The target writing content is mapped and filled into the corresponding placeholder positions in the target template document to generate the target writing document.

2. The method as described in claim 1, characterized in that, The step of configuring placeholders in the template of the document to be written and generating a target template document containing the placeholders includes: Obtain the element fields of the document template to be written, and establish a mapping relationship between the element fields and placeholders; Based on the mapping relationship, placeholder replacement processing is performed on the content that needs to be dynamically written in the document template to be written, and a target template document containing the placeholder is generated.

3. The method as described in claim 2, characterized in that, The step of replacing placeholders in the content to be dynamically written in the document template based on the mapping relationship, and generating a target template document containing the placeholders, includes: Identify the table area in the document template to be written, and locate the position of the content to be dynamically written in the table area based on the table header information; Insert a corresponding placeholder at the content location, and adaptively expand the number of rows in the table area according to the content requirements of the table area to generate a target template document containing the placeholder.

4. The method as described in claim 1, characterized in that, The step of performing content recognition on the source document to obtain structured text information includes: The source document is subjected to text content extraction and image content recognition to obtain the text information and image information of the source document; The data visualization chart in the image information is processed by coordinate axis recognition and data point positioning, and the index data in the data visualization chart is extracted based on the mapping relationship between the pixel coordinates and actual data values ​​of the processed data visualization chart. The table structure content in the source document is identified and converted to obtain table structured data; By integrating the text information, the indicator data, and the structured data in the table, structured text information is obtained.

5. The method as described in claim 4, characterized in that, The step of constructing the semantic index corresponding to the structured text information includes: Based on the directory structure and heading hierarchy of the source document, the structured text information is segmented to obtain several structured content segments. A semantic index is generated based on the index relationship between the title identifier of each structured content segment and the content semantic vector.

6. The method as described in claim 5, characterized in that, The step of retrieving the target content corresponding to the placeholder from the structured text information based on the semantic index includes: Based on preset element extraction rules, a content retrieval instruction is generated. The content retrieval instruction and the structured text information are input into a large model to obtain a list of index positions corresponding to the placeholders output by the large model. The index positions in the index position list are scored based on semantic similarity scoring rules, and the target structured content segment corresponding to the index position with the highest score is selected as the initial document content. The format information in the initial document content is standardized and converted to obtain the target content with a unified format.

7. The method as described in claim 1, characterized in that, The step of performing retrieval-enhanced content optimization on the target content using a large model to obtain the target written content includes: Retrieve related knowledge information from an external knowledge base based on the semantic features of the target content; The target content and the associated knowledge information are input into a large model for semantic understanding to obtain the rewritten document content. Based on the content of the tracing document, the target content is optimized to obtain the target writing content.

8. An intelligent writing device based on a large model, characterized in that, The intelligent writing device based on a large model includes: The template preprocessing module is used to configure placeholders in the template of the document to be written and generate a target template document containing the placeholders. The structured processing module is used to perform content recognition on the source document to obtain structured text information and to construct a semantic index corresponding to the structured text information. The content optimization module is used to retrieve the target content corresponding to the placeholder from the structured text information according to the semantic index, and to perform retrieval-enhanced content optimization on the target content through a large model to obtain the target writing content; The intelligent writing module is used to map and fill the target writing content into the corresponding placeholder positions in the target template document, thereby generating the target writing document.

9. An intelligent writing device based on a large model, characterized in that, The device includes: a memory, a processor, and a large-model-based intelligent writing program stored in the memory and executable on the processor, the large-model-based intelligent writing program being configured to implement the steps of the large-model-based intelligent writing method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a large-model-based intelligent writing program, which, when executed by a processor, implements the steps of the large-model-based intelligent writing method as described in any one of claims 1 to 7.