Document content generation method based on title structured requirement and related equipment
By performing structured analysis of electronic documents and associating them with personalized requirements, and by using artificial intelligence models to generate and insert content, the problem of AI writing tools being unable to understand document structure is solved. This achieves improved flexibility and efficiency in document generation, and provides a seamlessly integrated intelligent writing experience.
Patent Information
- Application Number
- CN202511039291.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-21
AI Technical Summary
Existing AI writing tools cannot understand document structure, resulting in an inability to generate targeted content for different chapters. The operation process is cumbersome and difficult to iterate and optimize. They also have low integration and cannot provide seamless support in mainstream word processing software.
By performing structured analysis on the target electronic document, extracting title elements, and receiving personalized requirements from users for these elements, the system uses an artificial intelligence model to generate content and inserts the generated content into the appropriate positions, supporting batch generation and selective optimization.
It improves the flexibility and efficiency of document content generation, allowing users to quickly generate and iteratively optimize structured documents, providing a seamless and integrated intelligent writing experience.
Smart Images

Figure CN120995990A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a document content generation method based on title structured requirements and related equipment. BACKGROUND
[0002] In the current work environment, the writing of structured documents such as reports, plans, technical documents, etc. is a time-consuming and complex task. The writer usually needs to follow an established outline or template and fill in the content for each chapter that meets the specific requirements. Existing artificial intelligence writing tools, although they can generate general text, generally have the following problems:
[0003] (1) Lack of structured perception: general AI tools usually treat the entire document as a flat piece of text and cannot understand structured concepts such as "chapter", "title", "hierarchy", etc., so it is difficult to generate content targeted at different chapters. (2) Complicated interactive process: the user needs to manually copy the title and requirements of each chapter into the AI tool, and then copy the generated content back into the Word document. The operation process is fragmented and inefficient. (3) Difficulty in iterative optimization: when a chapter needs to be modified, the user needs to repeat the above copy and paste process. If batch modification or template-based generation is required, existing tools can hardly provide effective support. (4) Low integration: existing tools are mostly independent web pages or applications, and the integration with mainstream word processing software such as Microsoft Word is not high, and they cannot provide seamless intelligent support in the writing environment. SUMMARY
[0004] The main purpose of the embodiments of the present application is to provide a document content generation method based on title structured requirements and related equipment to improve the flexibility of generating document content.
[0005] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application provides a document content generation method based on title structured requirements, which comprises the following steps:
[0006] Structurally analyzing a target electronic document and extracting at least one title element in the target electronic document;
[0007] Receiving a user's input of personalized requirements for the title element and data associating the personalized requirements with the title element; wherein the personalized requirements are used to guide content generation;
[0008] Combining each title element and the data-associated personalized requirements into a generation request, and sending the generation request to an artificial intelligence model;
[0009] Using the artificial intelligence model to obtain generated content according to the generation request;
[0010] inserting the generated content into the target electronic document at a position corresponding to the title element.
[0011] In some embodiments, before the receiving the personalized requirement input by the user for the title element, the method further comprises the following steps:
[0012] displaying each of the title elements on a user interface;
[0013] determining the title element selected by the user on the user interface;
[0014] The receiving the personalized requirement input by the user for the title element comprises the following steps:
[0015] receiving the personalized requirement input by the user for the title element selected on the user interface.
[0016] In some embodiments, the combining each of the title elements and the corresponding personalized requirement associated therewith into a generation request comprises the following steps:
[0017] In response to a batch generation instruction, traversing all of the title elements associated with the personalized requirement data, and combining the title elements and the corresponding personalized requirement associated therewith into the generation request.
[0018] In some embodiments, the method further comprises the following steps:
[0019] determining that the user selects one or more of the title elements through a user interface;
[0020] returning the receiving the personalized requirement input by the user for the title element, and the data associating the personalized requirement with the corresponding title element.
[0021] In some embodiments, the combining each of the title elements and the corresponding personalized requirement associated therewith into a generation request comprises the following steps:
[0022] combining the title element selected by the user through the user interface, the corresponding personalized requirement associated therewith, and original content into the generation request; wherein the original content is content associated with the title element selected by the user through the user interface and already existing in the target electronic document.
[0023] In some embodiments, the combining each of the title elements and the corresponding personalized requirement associated therewith into a generation request comprises the following steps:
[0024] In combination of the generation request, a text placeholder is replaced by text content of the title element corresponding to the personalized requirement data association; wherein the personalized requirement comprises the text placeholder.
[0025] In some embodiments, the method further comprises the steps of:
[0026] All the title elements and the personalized requirements associated with data are taken as a data set, the data set is serialized and saved as a template file;
[0027] In processing other electronic documents, the template file is read, the data set is obtained by deserialization, and the data association between the title elements and the personalized requirements in the other electronic documents is completed according to the text matching relationship of the title elements.
[0028] To achieve the above object, another aspect of the embodiment of the present application proposes a document content generation device based on title structured requirements, the device comprises:
[0029] A title element extraction unit is configured to perform structured analysis on a target electronic document and further extract at least one title element in the target electronic document;
[0030] A data association unit is configured to receive a personalized requirement input by a user for the title element, and associate the personalized requirement with the title element; wherein the personalized requirement is used to guide content generation;
[0031] A generation request determination unit is configured to combine each title element and the personalized requirement associated with the title element into a generation request, and send the generation request to an artificial intelligence model;
[0032] A generated content acquisition unit is configured to acquire generated content from the artificial intelligence model according to the generation request;
[0033] A generated content insertion unit is configured to insert the generated content into a position related to the title element in the target electronic document.
[0034] To achieve the above object, another aspect of the embodiment of the present application proposes an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.
[0035] To achieve the above object, another aspect of the embodiment of the present application proposes a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.
[0036] To achieve the above object, another aspect of the embodiment of the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
[0037] The embodiment of the present application at least has the following beneficial effects:
[0038] The present application provides a document content generation method based on title structured demand and related equipment, the scheme of the present application is analyzed by the target electronic document structured and further extracts at least one title element in the target electronic document; receive the personalized requirements input by the user to the title element, and data association is carried out to the personalized requirements and the corresponding title element; wherein, the personalized requirements are used to guide content generation; each title element and the personalized requirements corresponding to data association are combined into a generation request, and the generation request is sent to an artificial intelligence model; the generated content is obtained by using the artificial intelligence model according to the generation request; the generated content is inserted into the target electronic document and the position related to the corresponding title element. The present application firstly analyzes the target electronic document, can deeply understand the document structure, sets the generation request of each title element independently through different personalized requirements, that is, allows the user to set independent generation requirements for different title elements, and different generated contents can be obtained according to each generation request by using the artificial intelligence model, and then inserted into the related position of the target electronic document, which can realize the intelligent document processing scheme of batch generation and selective optimization, greatly improve the flexibility of document processing. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1 A flowchart of a document content generation method based on title structured demand provided by the embodiment of the present application is shown in the figure.
[0041] Figure 2 A structure diagram of a document content generation device based on title structured demand provided by the embodiment of the present application is shown in the figure.
[0042] Figure 3 A hardware structure diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0043] In order to make the purposes, technical solutions, and advantages of the present application clearer, further, the present application is described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with embodiments of the present application. They are merely examples of apparatuses and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to limit the present application.
[0045] Embodiments of the present application provide a document content generation method based on title structuring requirements and related equipment, relating to the technical field of artificial intelligence. The document content generation method based on title structuring requirements and related equipment provided by the embodiments of the present application can be applied in a terminal, can also be applied in a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms, and the server can also be a node server in a blockchain network; the software can be an application that implements a document content generation method based on title structuring requirements, and the like, but is not limited to the above forms.
[0046] The application is operable with numerous general purpose or special purpose computer system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that can be suitable for use with the application include personal computers, server computers, handheld or laptop devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media including memory storage devices.
[0047] Referring Figure 1 The embodiment of the application provides a document content generation method based on title structure demand, which can include but is not limited to S100 to S140, and specifically as follows:
[0048] S100: performing structured analysis on a target electronic document to extract at least one title element in the target electronic document;
[0049] S110: receiving a personalized requirement input by a user for the title element, and associating the personalized requirement with the title element; wherein the personalized requirement is used to guide content generation;
[0050] S120: combining each title element and the data-associated personalized requirement to form a generation request, and sending the generation request to an artificial intelligence model;
[0051] S130: acquiring generated content by using the artificial intelligence model according to the generation request;
[0052] S140: inserting the generated content into a position related to the title element in the target electronic document.
[0053] Optionally, before the receiving a personalized requirement input by a user for the title element, the method further includes the following steps:
[0054] displaying each title element on a user interface;
[0055] determining the title element selected by the user on the user interface;
[0056] The receiving a personalized requirement input by a user for the title element includes the following steps:
[0057] receiving the personalized requirements input by the user to the title elements selected in the user interface.
[0058] Optionally, the combining of each of the title elements and the corresponding personalized requirements associated therewith into a generation request comprises the following steps:
[0059] In response to a batch generation instruction, traversing all of the title elements that have been associated with the personalized requirements data, and combining the title elements and the corresponding personalized requirements associated therewith into the generation request.
[0060] Optionally, the method further comprises the following steps:
[0061] determining that the user selects one or more of the title elements through the user interface;
[0062] returning the personalized requirements input by the user to the title elements, and associating the personalized requirements with the corresponding title elements.
[0063] Optionally, the combining of each of the title elements and the corresponding personalized requirements associated therewith into a generation request comprises the following steps:
[0064] combining the title elements selected by the user through the user interface, the corresponding personalized requirements associated therewith, and original content into the generation request; wherein the original content is content associated with the title elements selected by the user through the user interface and already existing in the target electronic document.
[0065] Optionally, the combining of each of the title elements and the corresponding personalized requirements associated therewith into a generation request comprises the following steps:
[0066] In the combining of the generation request, replacing a text placeholder with text content of the title element corresponding to the personalized requirements data associated therewith; wherein the personalized requirements comprise the text placeholder.
[0067] Optionally, the method further comprises the following steps:
[0068] serializing and saving the data set comprising all of the title elements and the personalized requirements associated therewith as a template file;
[0069] In processing other electronic documents, reading the template file, obtaining the data set by deserialization, and completing the association of the title elements and the personalized requirements in the other electronic documents according to the text matching relationship of the title elements.
[0070] Next, combined with specific application examples, some optional embodiments of the present application will be described in detail.
[0071] The present embodiment aims to solve the problems in the prior art that AI writing tools cannot perceive document structure, cannot generate differentiated content for each chapter, and the iterative modification process is cumbersome. An efficient method is provided that can automatically and batch generate and update structured document content.
[0072] Technical solution:
[0073] The present embodiment discloses a document content generation method based on title structure requirements. The method first automatically analyzes and extracts all titles by scanning the paragraph style of the Word document. Users can see these titles in the plug-in interface and can set detailed writing requirements (Prompts) for each title. When generating for the first time, the system can send all titles with requirements and their requirements to a large language model (such as DeepSeek) in one time and batch, and automatically and accurately insert the returned content below each title to complete the rapid construction of the initial draft of the report. The key innovation of the present invention lies in its selective regeneration mechanism. When the user needs to optimize or rewrite some chapters of the report, there is no need to repeat the tedious operation. Only need to select the titles that need to be modified in the title list of the plug-in interface through the check box, then update the requirements of these titles, and finally click "Regenerate selected paragraphs". The system will only regenerate the content for the selected chapters by calling AI again, and replace the old content with the new content, while the other parts of the document remain unchanged. The present embodiment can greatly improve the modification and iteration efficiency of the report.
[0074] Specifically, the present embodiment provides a document content generation method based on title structure requirements, including the following steps:
[0075] Analysis step: in response to a user instruction, performing a structured analysis on a target electronic document, automatically identifying and extracting one or more title elements within the document;
[0076] Correlation step: displaying the title elements on a user interface, receiving personalized requirements input by a user for at least one title element for guiding content generation, and data correlating the personalized requirements with the corresponding title elements;
[0077] Batch generation step: in response to a batch generation instruction, traversing all title elements with associated personalized requirements, combining each title element and its associated personalized requirements into a generation request, sending it to an artificial intelligence model, and receiving the returned generated content;
[0078] Content insertion step: inserting each generated content returned by the artificial intelligence model into the electronic document at a position after the title element corresponding to the generated content.
[0079] The embodiment further includes the following steps:
[0080] Selection step: receiving a selection instruction of the user checking one or more title elements through the user interface;
[0081] Regeneration step: in response to the regeneration instruction, only for the title elements checked in the selection step, the batch generation step and the content insertion step are executed to realize the targeted update or optimization of the partial content of the document.
[0082] Further, in the regeneration step, the generation request further contains the original content associated with the checked title element and already existing in the electronic document, so as to be optimized, rewritten or continued by the artificial intelligence model.
[0083] Optionally, the individualization requirement contains a preset text placeholder, which is automatically replaced by the text content of the title element corresponding to the requirement when the generation request is combined.
[0084] Optionally, the embodiment further includes the following steps:
[0085] Template saving step: serializing and saving the data set of all title elements in the electronic document and the associated individualization requirements as an external template file;
[0086] Template loading step: when processing other electronic documents, reading the external template file, deserializing to obtain the data set, and automatically associating the title elements in the other electronic documents with the individualization requirements according to the text matching relationship of the title elements.
[0087] Next, the technical solution of the embodiment will be described in a more specific implementation manner.
[0088] The embodiment scheme can be realized by the following modules, each of which is realized in the SectionAnalyzerForm class and its associated classes as a Word VSTO plug-in:
[0089] 1. Title analysis module (Title Analysis Module):
[0090] Implemented in the btnAnalyze_Click event handler. When the user clicks the "Analyze Headings" button, this module iterates through all Paragraph objects of the currently active Word.Document. It identifies heading paragraphs by checking if the style name (style.NameLocal) returned by Paragraph.get_Style() starts with "Heading" or "Heading ". It stores the identified Word.Paragraph objects in a list (e.g., currentHeadings) and displays their text content (para.Range.Text) in the CheckedListBox control on the interface.
[0091] 2. Requirement Management Module:
[0092] A dictionary (e.g., Dictionary<Word.Paragraph, string> sectionRequirements) is used to store the association between headings and requirements. The Key is the Word.Paragraph object of a heading paragraph, and the Value is the requirement string entered by the user. When the user enters a requirement in the txtRequirement textbox and clicks btnSaveRequirement_Click, the system stores the currently selected heading object and the requirement text in the dictionary. The use of the $$$ placeholder in the requirement string is supported. Before calling the AI, the system preprocesses the string by replacing $$$ with the actual text of the heading.
[0093] 3. AI Interaction & Batch Generation Module:
[0094] Implemented in the btnAI_Click event handler. This module iterates through all entries in the sectionRequirements dictionary. For each entry, it combines the heading text and the processed requirement text into a complete prompt (Prompt) and constructs a request body (messages list) that conforms to the DeepSeek API specification. The request is sent asynchronously to the AI model through the DeepSeekClient class. Upon receiving the AI's return content, it is stored in another content dictionary (e.g., Dictionary<Word.Paragraph, string> sectionContents) associated with the heading object. After all requests are completed, the content insertion module is called to update the document.
[0095] 4、Selective Regeneration Module:
[0096] Implemented in the btnRegenerate_Click event handler. This module first checks which items in the checkedListBoxSections control are checked by the user. It only iterates over the Word.Paragraph objects corresponding to the checked headings. For each checked heading, it performs similar operations as the Bulk Generation Module: gets the requirements from sectionRequirements, constructs the Prompt, calls the AI. Optimization point: when constructing the Prompt, in addition to the heading and requirements, it also sends the existing content under this heading (obtained via the GetSectionContent method) as the user's content to the AI, so that the AI performs "polishing" or "optimization" instead of completely rewriting. After completion, it calls the Content Insertion Module to update the corresponding section.
[0097] 5、Content Insertion Module:
[0098] Implemented in the UpdateSectionContentInternal method. This method receives a heading Word.Paragraph object and a new content string as parameters. It first determines the content range that needs to be replaced: from the end position of the heading paragraph (heading.Range.End) to the start position of the next heading paragraph (nextHeading.Range.Start). If there is no next heading, the range extends to the end of the document. Use contentRange.Text = "" to clear the old content in this range. Then, insert a line break and new content after the heading paragraph (insertRange.InsertAfter("\r\n"+newContent)). Finally, iterate over all the newly inserted paragraphs and set their style to "normal" (wdStyleNormal) to avoid format errors.
[0099] Through the coordinated work of the above modules, this embodiment realizes a complete closed loop from structure analysis, requirement definition, to bulk generation and precise iteration, providing an efficient and reliable technical solution for intelligent creation of structured documents.
[0100] Advantages:
[0101] 1. Efficiency Revolution: Automate manual and repetitive writing work, users only need to focus on proposing high-quality requirements, and can quickly generate a complete report framework, with writing efficiency improved by orders of magnitude.
[0102] 2. Content precision control: By setting independent generation requirements for each title, it ensures that the AI output content is highly consistent with the specific goals of each chapter, avoiding the general and superficial content generated by general models.
[0103] 3. Seamless iterative optimization: The innovative "check and regenerate" mechanism makes it extremely simple to modify specific chapters, achieving true modular and non-destructive editing.
[0104] 4. Knowledge and process reuse: Support for saving the pairing relationship between titles and requirements as a template file (JSON format), allowing the same type of report (such as project weekly and monthly reports) to load the requirement template with one key, quickly generating.
[0105] 5. Deep integration experience: As a Word plug-in, all operations are completed in the familiar Word environment, without the need to switch applications, providing a smooth and integrated user experience.
[0106] Refer Figure 2 , the application embodiment further provides a document content generation device based on title structured requirements, which can realize the above-mentioned document content generation method based on title structured requirements. The device comprises:
[0107] a title element extraction unit for structurally analyzing a target electronic document and extracting at least one title element in the target electronic document;
[0108] a data association unit for receiving user input of individual requirements for the title elements and associating the individual requirements with the corresponding title elements; wherein the individual requirements are used to guide content generation;
[0109] a generation request determination unit for combining each title element and the individual requirements corresponding to the data association into a generation request, and sending the generation request to an artificial intelligence model;
[0110] a generated content acquisition unit for acquiring generated content from the artificial intelligence model according to the generation request;
[0111] a generated content insertion unit for inserting the generated content into the target electronic document at a position related to the corresponding title element.
[0112] It can be understood that the content in the above method embodiment is applicable to the device embodiment. The device embodiment specifically realizes the same functions as the above method embodiment, and achieves the same beneficial effects as the above method embodiment.
[0113] The embodiment of the present application further provides an electronic device, which comprises a memory and a processor. The memory stores a computer program, and the processor implements the method of the embodiment of the present application when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0114] It can be understood that the contents in the method embodiments are applicable to the device embodiments, the device embodiments specifically implement the functions of the method of the present application, and achieve the same beneficial effects as the method of the present application.
[0115] Please refer to Figure 3 , Figure 3 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:
[0116] The processor 301 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0117] The memory 302 can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 302 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 302 and are called and executed by the processor 301 to implement the method of the present application.
[0118] The input / output interface 303 is used to realize information input and output.
[0119] The communication interface 304 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0120] The bus 305 is used to transmit information between various components (for example, the processor 301, the memory 302, the input / output interface 303, and the communication interface 304) of the device.
[0121] The processor 301, the memory 302, the input / output interface 303, and the communication interface 304 are connected to each other through the bus 305 to realize the communication connection between them in the device.
[0122] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the method of the present application.
[0123] It can be understood that the contents in the above method embodiments are applicable to the present storage medium embodiment, the present storage medium embodiment specifically realizes the functions of the above method embodiments, and achieves the same beneficial effects as the above method embodiments.
[0124] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the method.
[0125] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0126] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0127] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures shown, or combine certain steps, or different steps.
[0128] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0130] The terms "first", "second", "third", "fourth", and the like in the description and in the claims of this application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological mundane operation, reverse order operation, based on circuitry availability, based on stated preference or the like, and that "default" or other orderings are thus permissible. Further, the terms "comprise", "comprising", "include", "including", and the like, are specifically intended to be open-ended. That is, references to individual steps and the like do not suhstantially exclude the presence of two or more of a given step or its integral presence in the process, method, system, article, or apparatus having been made with a wider scope. The use of notation such as "first", "second", "third", etc. does not generally limit the areas, but is used to connect like elements or to distinguish one claim from another. These terms can be used interchangeably when appropriate. Terms concerning the relative position of elements can be interpreted such that their use adheres to their normal meaning, but they can also be interpreted to mean the opposite according to specific claims.
[0131] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0132] In several embodiments provided by the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0133] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0134] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0135] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.
[0136] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not intended to limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method for generating document content based on heading structure requirements, characterized in that, The method includes the following steps: The target electronic document is subjected to structured analysis to extract at least one title element from the target electronic document; The system receives personalized requests from users for the title element and associates these personalized requests with the corresponding title element; wherein the personalized requests are used to guide content generation. The personalized requirements corresponding to each of the title elements and data associations are combined into a generation request, and the generation request is sent to the artificial intelligence model; The artificial intelligence model is used to obtain the generated content based on the generation request; The generated content is inserted into the target electronic document at the position related to the corresponding title element.
2. The document content generation method based on title structuring requirements according to claim 1, characterized in that, Before receiving the user's personalized request for the title element, the method further includes the following steps: Display each of the aforementioned title elements on the user interface; Determine the title element selected by the user on the user interface; Receiving personalized requests from users for the title element includes the following steps: Receive the user's personalization request for the title element selected in the user interface.
3. The document content generation method based on title structuring requirements according to claim 1, characterized in that, The step of combining the personalized requirements corresponding to each title element and data association into a generated request includes the following steps: In response to the batch generation instruction, all the title elements that have been associated with the personalized requirements data are traversed, and the traversed title elements and the personalized requirements corresponding to the data associations are combined into the generation request.
4. The document content generation method based on title structuring requirements according to claim 1, characterized in that, The method further includes the following steps: Determine that the user selects one or more of the title elements through the user interface; Return to the step of receiving the user's personalized requirements for the title element and associating the personalized requirements with the corresponding title element.
5. A document content generation method based on title structuring requirements according to claim 4, characterized in that, The step of combining the personalized requirements corresponding to each of the title elements and data associations into a generated request includes the following steps: The title element selected by the user through the user interface, the personalized requirements corresponding to the data association, and the original content are combined into the generation request; wherein, the original content is content that already exists in the target electronic document and is associated with the title element selected by the user through the user interface.
6. The document content generation method based on title structuring requirements according to claim 1, characterized in that, The step of combining the personalized requirements corresponding to each of the title elements and data associations into a generated request includes the following steps: When combining the generation request, the text placeholder is replaced with the text content of the title element corresponding to the personalized requirement data association; wherein, the personalized requirement includes the text placeholder.
7. A document content generation method based on heading structure requirements according to any one of claims 1 to 6, characterized in that, The method further includes the following steps: Collect all the title elements and the personalized requirements associated with the data as a dataset, serialize the dataset and save it as a template file; When processing other electronic documents, the template file is read, the dataset is obtained by deserialization, and the data association between the title elements in the other electronic documents and the personalized requirements is completed based on the text matching relationship of the title elements.
8. A document content generation device based on heading structuring requirements, characterized in that, The device includes: The title element extraction unit is used to perform structured analysis on the target electronic document and then extract at least one title element from the target electronic document; A data association unit is used to receive personalized requirements input by the user for the title element and to associate the personalized requirements with the corresponding title element; wherein, the personalized requirements are used to guide content generation; The request generation determination unit is used to combine the personalized requirements corresponding to each of the title elements and data associations into a request generation and send the request generation to the artificial intelligence model. A content acquisition unit is used to acquire content to be generated based on the generation request using the artificial intelligence model. The content insertion unit is used to insert the generated content into the target electronic document at a position related to the corresponding title element.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Cited By
Document asset generation method and device based on variable entries and medium
CN121301353A
Method, device and medium for generating document assets based on variable entries
CN121301353B