Method for automatically generating document based on label and template library and product thereof
By obtaining the document generation request, determining the template document based on the scene information, and modifying the tag content attributes in response to the tag typing operation, it solves the problem of repetition and inefficiency in the writing of document sets in complex business scenarios, and realizes efficient and accurate generation of the document set.
Patent Information
- Application Number
- CN202411753569.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, when writing document sets of complex business scenarios, there are problems of repetition of steps and inefficiency, and errors are prone to.
By obtaining the document generation request, multiple corresponding template documents are determined from the template library based on the scene information, modify the content properties of the tag in response to the typing operation of the tag, and write these properties to the template document to generate the document.
The synchronous modification of multiple documents is realized, which improves the efficiency and accuracy of document writing, and solves the problems of repetition of steps and inefficiency.
Smart Images

Figure CN119849462A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method for automatically generating documents based on tags and template libraries and a product thereof. Background Art
[0002] Existing complex business scenarios usually have multiple transaction processes, and multiple documents need to be written for each transaction process. For example, in the software development process, various document supports are needed, such as requirement specifications, software design specifications, interface specifications, test plans, test reports, etc., to form a document collection for the business scenario.
[0003] For scenarios where document sets can be quickly written, it is usually necessary to write multiple related template documents at the same time, and multiple key information needs to be synchronized in multiple documents. Therefore, there are problems of repeated steps and low efficiency, and it is also very easy to make mistakes. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method and product for automatically generating documents based on tags and template libraries, so as to solve the problems of repeated steps and low efficiency in the current writing of document sets.
[0005] To solve the above technical problems, an embodiment of the present invention provides a method for automatically generating documents based on tags and template libraries, the method comprising: obtaining a document generation request, the generation request comprising scenario information; based on the scenario information, determining from a template library a plurality of template documents corresponding to the scenario information, wherein the plurality of template documents reference at least one same tag; in response to a typing operation on the tag, modifying content attributes of the tag according to input data included in the typing operation; and writing the content attributes of the tag into the template document to generate a document.
[0006] An embodiment of the present invention also provides a device for automatically generating documents based on tags and template libraries, the device comprising a request receiving module, a determination module, a data receiving module, and a document generating module; the request receiving module is used to obtain a document generating request, the generating request comprising scenario information; the determination module is used to determine a plurality of template documents corresponding to the scenario information from the template library, wherein the plurality of template documents reference at least the same tag; the data receiving module is used to respond to a typing operation on the tag and modify the content attributes of the tag according to the input data included in the typing operation; the document generating module writes the content attributes of the tag into the template document to generate a document.
[0007] An embodiment of the present invention also provides an electronic device, comprising: 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 so that the at least one processor can execute the above-mentioned method.
[0008] An embodiment of the present invention further provides a computer program product, which includes computer executable instructions. When the computer executable instructions are executed, they are used to implement the above method.
[0009] Compared with the prior art, the embodiment of the present invention determines multiple template documents according to the needs of the user application scenario, modifies the tag attribute value in each template, and fills the attribute value into the template to generate a document; at the same time, because the same tag can be referenced by multiple template documents at the same time, after modifying the attribute value of a tag, multiple documents can be modified synchronously. The above method solves the problem of repeated steps and low efficiency in the current writing of document sets.
[0010] In addition, before obtaining the document generation request, the method also includes: building a template library, responding to template setting instructions, and adding and / or deleting the template document according to the template setting instructions; building a tag library, displaying the referenced tags of the template document through a tree structure, responding to tag setting instructions, and adding and / or deleting operation instructions to set the tags according to the tag setting instructions. The present invention provides an editing interface for templates and tag libraries, allowing users to easily manage each template in the template library, quickly create and edit required documents, and easily add new tags to refine classifications, or delete and modify existing tags to adapt to changes in document content. The efficiency and accuracy of document writing are greatly improved to meet the document writing needs of different projects or scenarios.
[0011] In addition, the content attributes of the tag include: a reference path and reference content; the input data includes file path information and text data; the response to the typing operation on the tag modifies the content attributes of the tag according to the input data included in the typing operation, including: modifying the value of the reference path attribute according to the file path information; modifying the value of the reference content attribute according to the text data.
[0012] In addition, the content attributes of the tag are written into the template document to generate a document, including: determining the corresponding file based on the file path information indicated by the reference path attribute, and writing the content of the file into the corresponding position of the tag in the template document; writing the text data indicated by the reference content attribute into the corresponding position of the tag in the template document.
[0013] In addition, the types of tags include ordinary replacement tags, description tags and header and footer tags; wherein the ordinary replacement tags are used to replace the paragraph content at the corresponding position in the template document according to the reference content value of the tag; the description tags are used to explain the corresponding paragraph content of the tag in the template document; the header and footer tags are used to replace the header and footer in the template document. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0015] Figure 1 is a flow chart of a document generation method in an embodiment of the present invention;
[0016] Figure 2 It is a schematic diagram of a transaction process and a template document page in an embodiment of the present invention;
[0017] Figure 3 It is a schematic diagram of the operation of the transaction process and the template document page in the embodiment of the present invention;
[0018] Figure 4 is a schematic diagram of a tag structure page in an embodiment of the present invention;
[0019] Figure 5 is a schematic diagram of an input box control for a label content attribute in an embodiment of the present invention;
[0020] Figure 6 is a schematic diagram of an initial document page in an embodiment of the present invention;
[0021] Figure 7 is a block diagram of a document automatic generation device in an embodiment of the present invention;
[0022] Figure 8 is a flow chart of the actual application process in an embodiment of the present invention;
[0023] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it can be understood by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present invention can also be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0025] An embodiment of the present invention relates to a method for automatically generating documents based on tags and template libraries. The core of this implementation is to obtain a document generation request, which includes scenario information; based on the scenario information, multiple template documents corresponding to the scenario information are determined from the template library, wherein at least the same tag is referenced in the multiple template documents; in response to a typing operation on the tag, the content attributes of the tag are modified according to the input data included in the typing operation; the content attributes of the tag are written into the template document to generate the document. By determining multiple template documents according to the needs of the user's application scenario, modifying the tag attribute values in each template, and filling the attribute values into the template to generate the document; at the same time, because the same tag can be referenced by multiple template documents at the same time, after modifying the attribute value of a tag, multiple documents can be modified synchronously. The above method is used to solve the problems of repeated steps and low efficiency that currently occur in writing document sets.
[0026] The following is a specific description of the implementation details of the method for automatically generating documents based on tags and template libraries in this embodiment in conjunction with the flowchart. The following content is only the implementation details provided for easy understanding and is not necessary for implementing this solution.
[0027] See also Figure 1 , Figure 1 1 is a flowchart of a method for automatically generating a document provided by an embodiment of the present invention, the method comprising the following steps:
[0028] Step S101: Obtain a document generation request, where the generation request includes scenario information.
[0029] The document may be a Document file, or other files, which is not limited in the embodiment of the present invention.
[0030] Among them, the scenario can be understood as a business scenario, each business scenario includes multiple transaction processes, and one or more documents need to be generated for each transaction process. For example, the scenario information can be the writing of internal enterprise reports, the preparation of product manuals, or the drafting of legal documents. Each scenario information is a complete work transaction process that requires the writing of multiple documents to form a document set. In the present invention, a corresponding template library is prepared for each business scenario, and the template library is displayed in the form of transaction processes and template documents included in each transaction process.
[0031] Step S102: multiple template documents corresponding to the scene information are determined in the template library.
[0032] Specifically, at least one template document corresponding to the scenario information is determined from the template library, the transaction process is first determined according to the scenario information, at least one target item is determined according to the transaction process, and at least one template document is determined for any target item.
[0033] The template library includes: a transaction process corresponding to each scenario information, and several template documents corresponding to the transaction process. In addition, the user can also add and / or delete template documents in the template library by giving template setting instructions.
[0034] The template document may be a Document file, and the template document references at least one tag.
[0035] like Figure 2 As shown, Figure 2 A schematic diagram of a transaction process and a template document page provided in an embodiment of the present invention.
[0036] After determining the scenario, the user can enter the corresponding transaction process and template document page management interface. Figure 2 The template document management interface corresponding to the two scenarios is displayed. It can be seen that different scenarios include different business processes, and each business process includes at least one template document. The scenario name is displayed in the upper left corner of the template management interface corresponding to any scenario, and the business process list is below. The upper right corner of the business process list interface indicates that users can add new documents under this process.
[0037] like Figure 3 As shown, Figure 3 It is a schematic diagram of the operation of the transaction process and the template document page in the embodiment of the present invention.
[0038] In this page, users can add template files to this module to meet the document writing needs of different projects or scenarios; at the same time, for templates that are no longer needed, users can easily delete them to keep the template library tidy and efficient. In addition, the template modification and viewing functions allow users to adjust the template style, structure and content at any time to ensure the timeliness and accuracy of the template, providing a basis for subsequent document generation.
[0039] Furthermore, in an embodiment of the present invention, the method for determining the generation of a template document may also be: the front end sends a document generation request, and after the back end server receives the document generation request, it determines the parameters of the scene information by parsing the message parameters, and further determines the corresponding transaction process and template document in the database according to the scene information parameters.
[0040] Step S103: In response to a typing operation on the tag, modify the content attribute of the tag according to input data included in the typing operation.
[0041] In the embodiment of the present invention, the tag is stored in a tag library, and the same tag can be referenced by multiple template documents at the same time, and each tag indicates content that can be changed in the template document.
[0042] Among them, tag types may include: common replacement tags (also known as general tags), description tags, and header and footer tags. Each tag is embedded in the corresponding position in the template document according to its type. Common replacement tags are used to replace the paragraph content at the corresponding position in the template document according to the reference content value of the tag; description tags are used to explain the corresponding paragraph content of the tag in the template document; header and footer tags are used to replace the header and footer in the template document.
[0043] Each tag and the information under the tag correspond to one or more lines of document layout information, and also include corresponding filling content data.
[0044] The tags may include: common replacement tags (also known as general tags), description tags, and header and footer tags. Common replacement tags are replaced according to the tag reference content, description tags are only used to describe the current content, and header and footer tags are applicable to the replacement of headers and footers. After the document is generated, all edited tags are replaced and cleared.
[0045] The attribute information of the tag may further include: width attribute, height attribute, percentage attribute, left-align attribute, right-align attribute, hidden attribute and other document style attribute information.
[0046] Among them, after confirming the template document, the user can edit the tag content referenced by each document, such as editing the text content, files, pictures and other multimedia resources bound to each tag, and then replace the content of the corresponding position of the tag in the template document after editing the content attributes of the tag.
[0047] Among them, the user opens the input box control of the tag attribute by clicking the tag modification option, and enters data by typing in the corresponding attribute input box of the tag, so as to transfer the content to the corresponding position in the template document through the tag, thereby realizing the modification of the template document.
[0048] like Figure 4 As shown, Figure 4 A schematic diagram of the label structure page of this embodiment is given.
[0049] After selecting the corresponding transaction process and target template document, the user enters the corresponding tag management interface. On the left side of the page are all the tags included in each template document, as well as the tag structure organization information. The user can select the root node and add nodes to construct a tree structure that conforms to the document structure. Figure 4 It can be seen that any template document includes at least one tag, and any tag can be referenced by multiple template documents at the same time. Therefore, when the content of a tag is modified, all references to the tag will synchronize the modified content data.
[0050] The user enters the corresponding tag management interface and clicks the tag modification option to open the tag attribute input box control, such as Figure 5 As shown, Figure 5 It is a schematic diagram of an input box control of a label content attribute in an embodiment of the present invention.
[0051] As shown in the figure, after opening the input box control of the label content attribute, the user can modify the label content attribute in the corresponding dialog box. Among them, the label name and label description attributes cannot be modified.
[0052] The user sets the reference path attribute of the tag content attribute by typing, and imports the content of other files by setting the path information of the target file. Or, the user sets the reference content attribute of the tag content attribute by typing.
[0053] Step S104: Write the content attributes of the tag into the template document to generate the document.
[0054] The system obtains the content attributes of the tag. In this embodiment, the system mainly obtains the reference path attribute and the reference content attribute in the tag content attributes.
[0055] Furthermore, in some embodiments, the corresponding file is determined based on the file path information indicated by the reference path attribute, and the content of the file is written into the corresponding position of the tag in the template document; the text data indicated by the reference content attribute is written into the corresponding position of the tag in the template document.
[0056] like Figure 6 As shown, Figure 6 A schematic diagram of an initial document page is given. The figure shows that a document includes multiple tags. When actually generating a document, it is only necessary to fill in the value corresponding to the content attribute of the tag into the corresponding position of the tag in the template document.
[0057] Among them, if the reference path attribute in the content attribute of the tag is modified, the system obtains and parses the corresponding target file by reading the reference path attribute value, so as to insert multimodal content such as pictures, ordinary tables, merged or split tables, and various statistical charts into the template document. Taking the implementation of picture insertion as an example, the value of the reference path attribute of the tag inserted in the template document is identified, it is determined that the referenced file is a picture, the corresponding interface is called, the picture tag is deleted, and the specific content of the picture is filled in the original picture tag position.
[0058] If the reference content attribute in the content attribute of the tag is modified, the system will identify the value of the reference content attribute of the tag inserted in the template document, obtain the corresponding text data, call the corresponding interface, delete the text tag, and fill in the specific text content in the original text tag position. In addition, the system will automatically skip the tags that have not been edited and retain the original tag style in the document.
[0059] It should be noted that when generating a document, it is also necessary to identify the type of label.
[0060] If the tag type is a general replacement tag, the paragraph content at the corresponding position in the template document will be replaced according to the reference content value of the tag; if the tag type is an explanation tag, the corresponding paragraph content of the tag in the template document will be explained; if the tag type is a header and footer tag, the header and footer in the template document will be replaced.
[0061] It should be noted that setting the tag type here to be a general replacement tag, a description tag, and a header and footer tag is one possible implementation. In specific applications, the corresponding tags and tag types in the template document can be added or modified according to user needs.
[0062] In some embodiments, step S102 may specifically include: determining a transaction process including multiple target items based on scenario information; and determining at least one template document for each target item.
[0063] In some embodiments, step S103 may specifically include: modifying the value of the reference path attribute and the value of the reference content attribute of the tag according to the input data included in the input operation. The input data at least includes the path information and text data of any type of file; modifying the value of the reference path attribute according to the path information of the any type of file; and modifying the reference content attribute of the tag according to the text data.
[0064] In some embodiments, step S104 may specifically include: writing the value of the content attribute of the tag into the corresponding position of the tag in the template document according to the reference relationship between the template document and the tag to generate the target document; determining the corresponding file according to the path information of the reference path attribute, and writing the content of the file into the corresponding position of the tag in the template document; writing the text data of the reference content attribute of the tag into the corresponding position of the tag in the template document.
[0065] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0066] The technical solution of this embodiment is to obtain a document generation request, wherein the generation request includes scenario information; based on the scenario information, multiple template documents corresponding to the scenario information are determined from a template library, wherein at least the same tag is referenced in the multiple template documents; in response to a typing operation on the tag, the content attributes of the tag are modified according to the input data included in the typing operation; and the content attributes of the tag are written into the template document to generate the document. By determining multiple template documents according to the needs of the user's application scenario, modifying the tag attribute values in each template, and filling the attribute values into the template to generate the document; at the same time, because the same tag can be referenced by multiple template documents at the same time, after modifying the attribute value of a tag, multiple documents can be modified synchronously. The above method can solve the problems of repeated steps and low efficiency that occur in the current writing of document sets.
[0067] Another embodiment of the present invention relates to a device for automatically generating documents based on tags and template libraries. This device embodiment is a device embodiment corresponding to the method. This embodiment can be applied to document generation. The device can be implemented in software and / or hardware. The device can be integrated in any device that provides document generation functions, such as Figure 7 As shown, the document generating device specifically includes: a request receiving module 63, a determining module 64, a data receiving module 65, and a document generating module 66.
[0068] The request receiving module 63 is used to obtain a document generation request, wherein the generation request includes scenario information;
[0069] A determination module 64, configured to determine, from a template library, a plurality of template documents corresponding to the scene information, wherein at least one same tag is referenced in the plurality of template documents;
[0070] A data receiving module 65, configured to respond to a typing operation on the tag and modify the content attribute of the tag according to input data included in the typing operation;
[0071] The document generation module 66 is used to write the content attributes of the tag into the template document to generate a document.
[0072] Optionally, the determination module 64 is specifically configured to:
[0073] Determine the transaction process including multiple target items based on scenario information;
[0074] At least one template document is determined for each target item.
[0075] Optionally, the data receiving module 65 is specifically used for:
[0076] In response to a typing operation on the tag, modifying a content attribute of the tag according to input data included in the typing operation;
[0077] Modify the value of the reference path attribute according to the file path information;
[0078] Modifies the value of a reference content property based on text data.
[0079] Optionally, the document generation module 66 is specifically used for:
[0080] Determine the corresponding file according to the file path information indicated by the reference path attribute, and write the content of the file into the corresponding position of the tag in the template document;
[0081] Write the text data indicated by the reference content attribute into the corresponding position of the tag in the template document.
[0082] The types of tags include ordinary replacement tags, description tags, and header and footer tags;
[0083] The common replacement tag is used to replace the paragraph content at the corresponding position in the template document according to the reference content value of the tag;
[0084] The description tag is used to explain the content of the corresponding paragraph of the tag in the template document;
[0085] The header and footer tags are used to replace the header and footer in the template document.
[0086] like Figure 7 As shown, the device for automatically generating documents based on tags and template libraries may also include: a tag management module 61 and a template management module 62 .
[0087] The tag management module 61 is used to construct a tag library, display the referenced tags of the template document through a tree structure, respond to tag setting instructions, and add and / or delete operation instructions to set tags according to the tag setting instructions.
[0088] The template management module 62 is used to construct a template library, respond to template setting instructions, and add and / or delete template documents according to the template setting instructions.
[0089] Optionally, the tag management module 61 is specifically used for:
[0090] Build a template library, respond to template setting instructions, and add and / or delete template documents according to template setting instructions.
[0091] Optionally, the template management module 62 is specifically used for:
[0092] Build a tag library, display the referenced tags of the template document through a tree structure, respond to tag setting instructions, and add and / or delete operation instructions to set tags according to the tag setting instructions.
[0093] The technical solution of this embodiment is to obtain a document generation request, wherein the generation request includes scenario information; based on the scenario information, multiple template documents corresponding to the scenario information are determined from a template library, wherein at least the same tag is referenced in the multiple template documents; in response to a typing operation on the tag, the content attributes of the tag are modified according to the input data included in the typing operation; and the content attributes of the tag are written into the template document to generate the document. By determining multiple template documents according to the needs of the user's application scenario, modifying the tag attribute values in each template, and filling the attribute values into the template to generate the document; at the same time, because the same tag can be referenced by multiple template documents at the same time, after modifying the attribute value of a tag, multiple documents can be modified synchronously. The above method can solve the problems of repeated steps and low efficiency that occur in the current writing of document sets.
[0094] It is not difficult to find that this implementation is a device embodiment corresponding to the aforementioned method embodiment, and this embodiment can be implemented in conjunction with the aforementioned method embodiment. The relevant technical details mentioned in the aforementioned method embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the aforementioned method embodiment.
[0095] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.
[0096] like Figure 8 As shown, the embodiment of the present invention provides an example of a practical application process.
[0097] A company has built a set of complete solution document templates for the bidding document production process based on the method and device of the present invention. For each project, each bid may require modification of part of the document content. In order to avoid arbitrary modification or omission by different personnel, the company converts the fields, tables, figures and other modules that must be modified in each template document into labels based on the label management module, and then uses the template management module to organize all templates into a template library for unified management. At the same time, all labels can also be managed uniformly based on the label management module. The template files in the template library organized by the company's bidding personnel with this technology can be added, deleted, modified and viewed as needed. The label management module can modify the reference content of the label according to the needs of each project. In this process, the modifier cannot modify the template directly, but only needs to modify the label content specified by the company. Finally, after editing, the template file in the template library is selected, and the relevant documents required for bidding are generated based on the content referenced by the label based on the generation module. It is also possible to select some template documents to generate a document set.
[0098] Another embodiment of the present invention relates to an electronic device, such as Fig. 9 As shown, it includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method embodiment.
[0099] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0100] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0101] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for automatically generating documents based on tags and template libraries, characterized in that: The method comprises: Obtaining a document generation request, wherein the generation request includes scenario information; Based on the scenario information, determining a plurality of template documents corresponding to the scenario information from a template library, wherein at least one same tag is referenced in the plurality of template documents; In response to a typing operation on the tag, modifying a content attribute of the tag according to input data included in the typing operation; The content attribute of the tag is written into the template document to generate a document.
2. The method for automatically generating documents based on tags and template libraries according to claim 1, characterized in that: Before obtaining the document generation request, the method further includes: Build a template library, respond to template setting instructions, and add and / or delete the template documents according to the template setting instructions; A tag library is constructed to display the tags referenced by the template document in a tree structure, and in response to tag setting instructions, operation instructions are added and / or deleted according to the tag setting instructions to set the tags.
3. The method for automatically generating documents based on tags and template libraries according to claim 1, characterized in that: Based on the scenario information, a plurality of template documents corresponding to the scenario information are determined from a template library, including: Determine a transaction process including multiple target items according to the scenario information; At least one template document is determined for each of the target items.
4. The method for automatically generating documents based on tags and template libraries according to claim 1, characterized in that: The content attributes of the tag include reference path and reference content; the input data includes file path information and text data; The step of responding to a typing operation on the tag and modifying a content attribute of the tag according to input data included in the typing operation includes: Modify the value of the reference path attribute according to the file path information; The value of the reference content attribute is modified according to the text data.
5. The method for automatically generating documents based on tags and template libraries according to claim 4, characterized in that: Writing the content attribute of the tag into the template document to generate a document includes: Determine the corresponding file according to the file path information indicated by the reference path attribute, and write the content of the file into the corresponding position of the tag in the template document; The text data indicated by the reference content attribute is written into the corresponding position of the tag in the template document.
6. The method for automatically generating documents based on tags and template libraries according to any one of claims 4 to 5, characterized in that: The types of tags include common replacement tags, description tags, and header and footer tags; The common replacement tag is used to replace the paragraph content at the corresponding position in the template document according to the reference content value of the tag; The description tag is used to explain the content of the corresponding paragraph of the tag in the template document; The header and footer tags are used to replace the header and footer in the template document.
7. A device for automatically generating documents based on tags and template libraries, characterized in that: The device includes a request receiving module, a determining module, a data receiving module, and a document generating module; wherein, The request receiving module is used to obtain a document generation request, wherein the generation request includes scenario information; The determining module is used to determine a plurality of template documents corresponding to the scenario information from a template library, wherein at least one same tag is referenced in the plurality of template documents; The data receiving module is used to respond to a typing operation on the tag and modify the content attribute of the tag according to input data included in the typing operation; The document generation module is used to write the content attributes of the tag into the template document to generate a document.
8. The device for automatically generating documents based on tags and template libraries according to claim 7, characterized in that: The device also includes a label management module and a template management module: The template management module is used to build a template library, respond to template setting instructions, and add and / or delete the template document according to the template setting instructions; The tag management module is used to build a tag library, display the tags referenced by the template document in a tree structure, respond to tag setting instructions, and add and / or delete operation instructions according to the tag setting instructions to set the tags.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed 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 perform the method according to any one of claims 1 to 6.
10. A computer program product, comprising computer executable instructions, which are used to implement the method of any one of claims 1 to 6 when executed.
Citation Information
Cited By
Automatic secret evaluation compliance document generation system and method based on strategic data management and control and full-link verification
CN121212111A
A system and method for automatically generating confidentiality compliance documents based on strategy-based data control and end-to-end verification.
CN121212111B