Template engine-based scenario programming method and system
By using a template engine-based scheme development method, key element extraction and similarity analysis models are used to automatically fill in scheme content with high similarity, solving the problems of single function and complicated process in existing technologies, and realizing intelligent and efficient scheme development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DIANKEYUN (BEIJING) TECH CO LTD
- Filing Date
- 2023-02-13
- Publication Date
- 2026-07-24
AI Technical Summary
Existing document editing technologies have limited functionality, complex workflows, and low levels of automation, resulting in low office efficiency.
A template engine-based scheme development method is adopted. By creating templates and adding table of contents and chapters, the scheme content with high similarity is automatically filled in using key element extraction model and similarity analysis model, and the final scheme is exported using classification model.
It has enabled intelligent and automated scheme preparation, improved the standardization and accuracy of the preparation, simplified the process, and enhanced office efficiency.
Smart Images

Figure CN116258131B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information system technology, and in particular to a scheme development method and system based on a template engine. Background Technology
[0002] Word is the world's most widely used word processing system, and in daily work, a large number of documents in Word format need to be prepared. Typically, the structure of these documents follows certain standard specifications, with relatively fixed chapter headings. Furthermore, within the same or similar technical fields and industries, the content of these documents often shares similarities, leading to frequent referencing of previous similar documents during document preparation. While current online document editing technologies enable collaborative editing, their limited functionality, complex workflow, and low level of automation result in low office efficiency. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a scheme compilation method and system based on a template engine to eliminate or improve one or more defects existing in the prior art, and solve the problems of limited functionality, complex compilation process and low degree of automation in existing document editing technology.
[0004] On one hand, the present invention provides a scheme development method based on a template engine, characterized in that the method includes the following steps: Create a template, add table of contents chapters level by level in the template, and automatically generate the corresponding chapter numbers; The corresponding chapters will be assigned to designated editors for editing based on the table of contents. When the number of words in the edited content exceeds the preset number of words, the key element extraction model obtained through pre-training is used to extract key elements from the edited content. Obtain a historical database that stores previously compiled schemes; compare the schemes in the historical database based on the key elements and the pre-trained similarity analysis model, and sort them from high to low according to the similarity score; The scheme with the highest similarity score and a similarity score higher than the preset score is regarded as a highly similar scheme, and the chapter content in the highly similar scheme is automatically filled into the chapter part to be edited corresponding to the template; The completed template is classified according to the key elements using a pre-trained classification model, and exported to the corresponding category's storage location according to a preset format and layout to obtain the final solution.
[0005] In some embodiments of the present invention, the template is used to add table of contents chapters level by level, and corresponding chapter numbers are automatically generated. The method further includes: Obtain the template component library, which stores multiple chapter titles; Retrieve the corresponding chapter titles from the template component library to generate the table of contents; If a new chapter title is added to the directory, the new chapter title will be stored as a new template component in the template component library.
[0006] In some embodiments of the present invention, a template is created, in which table of contents chapters are added level by level, and corresponding chapter numbers are automatically generated. The method also includes: Retrieve the document containing the required directory structure; The document is parsed using a preset automatic extraction module, the table of contents and chapters of the document are extracted and filled into the template, and the corresponding chapter numbers are automatically generated.
[0007] In some embodiments of the present invention, the document is parsed using a preset automatic extraction module to extract the table of contents and chapters of the document and fill them into the template, and the method further includes: The order of the directory contents can be adjusted by dragging and dropping; the text and / or format can be modified by clicking on the corresponding directory contents based on preset rules.
[0008] In some embodiments of the present invention, a pre-trained key element extraction model is used to extract key elements from the edited content. The training method of the key element extraction model includes the following steps: Obtain a training dataset, which contains multiple data bars, each of which includes a portion of the content of any scheme; The training dataset is labeled using a preset tool; The labeled training dataset is processed into text vectors to obtain an initial model, which is then input into the initial model to obtain the corresponding key elements. The initial model adopts a recurrent neural network. The initial model is trained using the training dataset to obtain the key element extraction model.
[0009] In some embodiments of the present invention, the text vectorization processing uses word embedding, and the pre-trained Word2vec model is used to perform word embedding processing on the labeled training dataset.
[0010] In some embodiments of the present invention, the initial model is based on a general information extraction model to construct a unified structured extraction language, and the text of each sample is structurally encoded through a location-association structure; the structured extraction language expression includes a variety of semantic units.
[0011] In some embodiments of the present invention, it further includes: The historical database is searched using preset dimension terms; the preset dimension terms include chapter names, keywords, and document names. Select the search result and perform preset referencing to automatically paste the search result into the corresponding editable section of the template.
[0012] On the other hand, the present invention provides a template engine-based scheme creation system, characterized in that the system is used to execute the template engine-based scheme creation method as described in any of the above claims, and the system includes: A template building module is used to add a document table of contents and generate corresponding chapters and their numbers to build a template; The auxiliary editing module includes a task allocation module, a key element extraction model, a historical database, a similarity analysis model, and a content filling module, which are used to fill the template with corresponding chapter content. The document export module includes a classification model, which is used to classify the fully filled templates, export the final solution according to the preset format and layout, and store it.
[0013] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method as described in any of the above.
[0014] The beneficial effects of the present invention are at least as follows: This invention provides a template engine-based scheme preparation method and system. The method involves creating a template, adding a table of contents and generating chapter numbers, assigning chapters to editors based on the table of contents, extracting key elements from the edited content when the word count exceeds a preset limit, comparing the similarity of schemes in a historical database using a similarity analysis model, identifying the scheme with the highest similarity score (above a preset score) as highly similar, and automatically filling its chapter content into the corresponding chapter to be edited, and then classifying the completed template according to the key elements using a classification model and exporting it to the corresponding category's storage location according to a preset format and layout to obtain the final scheme. This invention designs three steps: template creation, content editing, and document export, enabling online scheme preparation. Furthermore, the pre-trained key element extraction model, similarity analysis model, and classification model make the preparation method more intelligent and automated, improving the standardization and accuracy of scheme preparation, simplifying the scheme preparation process, and enhancing office efficiency.
[0015] Furthermore, when creating a template and adding a table of contents, the table of contents is set as a template component, a template component library is built, and a historical database is built based on past solutions. This enables efficient data reuse and convenient referencing, further improving office efficiency.
[0016] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.
[0017] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1 This is a schematic diagram illustrating the steps of a template engine-based scheme development method in one embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram of the template creation process in a template engine-based scheme development method according to an embodiment of the present invention.
[0020] Figure 3 This is a schematic diagram of the content editing process in a template engine-based scheme development method according to an embodiment of the present invention.
[0021] Figure 4 This is a schematic diagram of the document export process in a template engine-based scheme development method according to an embodiment of the present invention.
[0022] Figure 5 This is a schematic diagram of the structure of a template engine-based scheme compilation system in one embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0024] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0025] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0026] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0027] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0028] It should also be emphasized that the step markers mentioned below are not a limitation on the order of the steps, but should be understood as meaning that the steps can be executed in the order mentioned in the embodiments, or in a different order than in the embodiments, or several steps can be executed simultaneously.
[0029] To address the shortcomings of existing document editing technologies, such as limited functionality, complex workflows, and low automation, this invention provides a template engine-based scheme creation method, such as... Figure 1 As shown, the method includes the following steps S101~S106: Step S101: Create a template, add table of contents chapters level by level in the template, and automatically generate the corresponding chapter numbers.
[0030] Step S102: Assign the corresponding chapters to the designated editors based on the table of contents.
[0031] Step S103: When the number of words in the edited content exceeds the preset number of words, the key element extraction model obtained through pre-training is used to extract key elements from the edited content.
[0032] Step S104: Obtain the historical database; based on the key elements and the pre-trained similarity analysis model, compare the similarity of the schemes in the historical database and sort them from high to low according to the similarity score.
[0033] Step S105: The scheme with the highest similarity score and whose similarity score is higher than the preset score is taken as the highly similar scheme, and the chapter content in the highly similar scheme is automatically filled into the corresponding chapter to be edited section of the template.
[0034] Step S106: Classify the filled template according to the key elements using the pre-trained classification model, and export it to the corresponding category storage location according to the preset format and layout to obtain the final solution.
[0035] In step S101, a template is created using a template engine, and table of contents and chapters are added.
[0036] The template engine is a development framework program used to generate Word document templates, which programmers can use to write processing code for various Word document templates.
[0037] In some embodiments, the template engine may be the Thymeleaf template engine.
[0038] like Figure 2 As shown, step S101 can be divided into two methods: manual creation and automatic extraction. For the manual creation method, the table of contents chapters are added level by level in the template, and the template will automatically generate corresponding numbers according to the added table of contents levels, thereby constructing the table of contents structure.
[0039] In some embodiments, the titles of manually added table of contents chapters can be set as template components and stored in the template component library.
[0040] In some embodiments, when manually adding chapters to the table of contents, existing chapter titles in the template component library can be used. These titles can be added via a reference button or by dragging and dropping them manually to the appropriate location. The template component library enables efficient reuse of template components.
[0041] For the automatic addition method, the document containing the required directory structure is imported into the automatic extraction module. The automatic extraction module parses the document, extracts the directory structure, creates a template, fills the corresponding directory chapters into the template, and automatically generates the corresponding chapter numbers.
[0042] In some embodiments, the table of contents generated in the automatic extraction method can be quickly rearranged by dragging and dropping manually. The text and / or format can be modified by clicking on the corresponding table of contents based on preset rules. For example, the preset rule is set to double-click, that is, double-clicking the table of contents can be used for modification. During modification, unnecessary content can be directly deleted.
[0043] In some embodiments, new chapter titles generated in the automatic extraction method can also be added to the template component library for later use.
[0044] like Figure 3 As shown, steps S102 to S105 are the content editing steps, which involve filling the chapter content into the template.
[0045] In step S102, as preset, the corresponding chapters are assigned to designated editors for editing based on the table of contents. For example, different chapters can be assigned to multiple editors, or different chapters can be assigned to the same editor.
[0046] In some embodiments, after logging in, the compiler can view the full content of the template, but can only edit the assigned corresponding chapter section.
[0047] In step S103, when the number of words in the content edited by the compiler exceeds the preset number of words, the key element extraction model obtained through pre-training is used to extract key elements from the edited content. For example, key elements include test project, test type, test time, test location, test equipment, organizing unit, participating unit, etc.
[0048] In some embodiments, the training method for the key element extraction model includes the following steps S1031~S1034: Step S1031: Obtain the training dataset, which contains multiple data bars, each of which includes a portion of the content of any scheme.
[0049] Step S1032: Label the training dataset using a preset tool.
[0050] Step S1033: Obtain the initial model by vectorizing the labeled training dataset into text and inputting it into the initial model to obtain the corresponding key elements. The initial model uses a recurrent neural network.
[0051] Step S1034: Train the initial model using the training dataset to obtain the key element extraction model.
[0052] In step S1031, the previously compiled schemes are organized, and the chapter content of each part of each scheme is randomly extracted. The extracted chapter content is used as data bars to construct a training dataset.
[0053] In step S1032, for example, the preset tool is doccano. doccano is an open-source text annotation tool that provides functions such as text classification, sequence annotation, and sequence-to-sequence annotation. In this invention, it is only necessary to upload each data bar in the training dataset to the doccano platform, annotate the keywords in each data bar according to the preset training direction, and then directly download the labeled data. The annotation types include experimental projects, experimental types, experimental times, experimental locations, participating equipment, organizing units, and participating units.
[0054] In step S1033, text representation is a fundamental task in natural language processing, and the quality of text representation directly affects the performance of the entire natural language processing system. Text vectorization is the process of representing text as a series of vectors that can express the semantics of the text, and it is an important method of text representation.
[0055] In some embodiments, word embedding is used for text vectorization, employing a pre-trained Word2vec model to perform word embedding on the labeled training dataset. For example, the Word2vec model can be trained based on the Chinese Wikipedia corpus, and its parameters can be set to window=5; min_count=5; size=64.
[0056] Input the data bar after word embedding into the initial model to obtain the key elements corresponding to the data bar.
[0057] In some embodiments, the initial model is selected as a recurrent neural network (RNN). RNNs have memory, parameter sharing and Turing completeness, and are widely used in the field of natural language processing.
[0058] In some embodiments, the initial model constructs a unified structured extraction language based on a universal information extraction model, and encodes the text of each sample structurally through a location-association structure; wherein, the structured extraction language expression includes multiple semantic units. Specifically, according to existing research, information extraction tasks can be described as text-to-structure problems, where different information extraction tasks correspond to different structures. By using a single framework to uniformly model the text-to-structure transformation of different information extraction tasks, different structural transformations will share the same underlying operations and different transformation capabilities in the universal model. Therefore, this invention designs a unified structured extraction language (SEL) based on the universal information extraction framework UIE (Universal Information Extraction), which encodes the structures of different information extraction tasks through a location-association structure. Each SEL expression contains three types of semantic units: SPOTNAME, ASSONAME, and INFOSPAN. SPOTNAME indicates the existence of a specific information block whose SPOTNAME type exists in the source text. ASSONAME indicates the existence of a specific information block in the source text, which is associated with the upper-level positioning information in its structure. INFOSPAN indicates the text range corresponding to a specific positioning or associated information block in the source text.
[0059] In step S1034, the initial model is trained using the training dataset, and the parameters are continuously updated to optimize the model performance, ultimately obtaining the key element extraction model. The trained key element extraction model has 12 layers and is capable of entity extraction from Chinese text. It also has excellent small-sample fine-tuning capabilities for specific domains and can quickly adapt to specific extraction targets.
[0060] In step S104, based on the key elements extracted in step S103, the similarity analysis model obtained through pre-training is used to compare the similarity of the schemes in the historical database, calculate the similarity score of each scheme, and sort the schemes from high to low according to the similarity score. The historical database is used to store previously compiled schemes.
[0061] In some embodiments, the similarity analysis model uses the Word Mover's Distance (WMD) algorithm to calculate the similarity of chapter content.
[0062] In some embodiments, during step S102, when the editor is editing the content of a corresponding chapter, they can actively query the historical database using preset dimension terms. The search results can be referenced in one step, or a portion of the search results can be selected and automatically pasted into the currently edited location. The preset dimension terms include chapter names, keywords, document names, etc.
[0063] In step S105, the scheme with the highest similarity score is obtained. When the similarity score of the scheme is higher than the preset score, the scheme is regarded as a highly similar scheme. The chapter content of the highly similar scheme is filled into the chapter part to be edited in the template according to the chapter of the table of contents. The preset score can be modified according to actual needs. For example, the preset score is set to 95 points.
[0064] The scheme with the highest similarity score is obtained. If the similarity score of this scheme is lower than the preset score, it is returned to the editor for further editing. When the cumulative number of edited words exceeds the preset number of words to be supplemented, the key elements of the new edited content are extracted again according to step S102 using the key element extraction model. According to step S103, the similarity analysis model is used to compare the similarity of the schemes in the historical database and calculate the similarity score. The new scheme with the highest similarity score is obtained. If the new similarity score is higher than the preset score, step S105 is executed. If the new similarity score is still lower than the preset score, the scheme to be edited is recognized as a new category, and the editor needs to fill in the chapter content independently and / or through the historical database.
[0065] In step S106, as Figure 4 As shown, the fully filled template is classified according to key elements using a pre-trained classification model, and exported to the corresponding category's storage location according to a preset format and layout to obtain the final solution.
[0066] In some embodiments, the classification model employs a recurrent neural network, and the training method for the classification model includes: Step S1061: Obtain the training dataset, which contains multiple data bars, each of which includes a portion of the content of any scheme.
[0067] Step S1062: Extract the key elements of the chapter content in each data bar and add category tags.
[0068] Step S1063: Obtain the initial classification by vectorizing the key elements into text and inputting them into the initial classification model to obtain the corresponding scheme classification for each key element.
[0069] Step S1064: Train the initial classification model using the training dataset to obtain the classification model required by the present invention.
[0070] In this invention, the completed solution is exported as a Word document according to a preset format and layout, and then stored in the corresponding location according to the category.
[0071] In some embodiments, if the new similarity score described in step 105 above is still lower than the preset score, and the scheme to be edited is recognized as a new category, a new category folder is automatically created, named according to key elements, and used as the storage location for the scheme. The folder name and storage location can be modified.
[0072] In some embodiments, when exporting the final solution as a Word document, a solution cover is automatically added according to the template's preset format, and a table of contents is generated.
[0073] In some embodiments, when exporting the final solution as a Word document, the document is automatically named in the format of "Solution Name + Export Time". The formats of the solution name and export time can be preset or modified later. For example, the document name could be "ABC Experiment Project Solution + 20000101", where the solution name is "ABC Experiment Project Solution" and the export time is January 1, 2000. The export time can also be accurate to the hour, minute, and second.
[0074] In some embodiments, the present invention is applied to the development of test project plans. The training sample set is selected from data resources in the test organization and management system. With the help of template engine technology and based on the OOXML specification, test outlines and other plans are generated, which greatly improves the standardization and accuracy of plan development.
[0075] This invention also provides a template engine-based scheme development system, which is used to execute the template engine-based scheme development method described above, such as... Figure 5 As shown, the system includes three modules: a template building module, an auxiliary editing module, and a document export module. Specifically: Template building module: The template building module is used to create templates, add table of contents and chapters to the templates, and generate the corresponding chapters and their numbers.
[0076] The auxiliary editing module includes a task allocation module, a key element extraction model, a historical database, a similarity analysis model, and a content filling module, which are used to fill the template with the corresponding chapter content.
[0077] The system comprises several modules: a task allocation module to assign chapters to designated editors; a key element extraction model to extract key elements from the edited content; a historical database to store previously compiled schemes and provide editors with chapter content from those schemes; a similarity analysis module to compare schemes in the historical database based on key elements and calculate similarity scores; and a content filling module to automatically fill the corresponding unedited chapter sections of the template with the chapter content from highly similar schemes selected by the similarity analysis module.
[0078] Document Export Module: The document export module includes a classification model, which is used to classify templates with fully populated chapter content, and export and save the final solution according to preset format and layout.
[0079] Corresponding to the above method, the present invention also provides an apparatus comprising a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus performs the steps of the method as described above.
[0080] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.
[0081] In summary, this invention provides a template engine-based scheme preparation method and system. It involves creating a template, adding table of contents and generating chapter numbers; assigning chapters to editors based on the table of contents; when the word count of the edited content exceeds a preset limit, extracting key elements using a key element extraction model; comparing the similarity of schemes in a historical database using a similarity analysis model based on these key elements; identifying the scheme with the highest similarity score (higher than a preset score) as a highly similar scheme and automatically filling its chapter content into the corresponding chapter to be edited; classifying the completed template according to the key elements using a classification model and exporting it to the corresponding category's storage location according to a preset format and layout to obtain the final scheme. This invention designs three steps: template creation, content editing, and document export, enabling online scheme preparation. Furthermore, the pre-trained key element extraction model, similarity analysis model, and classification model make the preparation method more intelligent and automated, improving the standardization and accuracy of scheme preparation, simplifying the scheme preparation process, and enhancing office efficiency.
[0082] Furthermore, when creating a template and adding a table of contents, the table of contents is set as a template component, a template component library is built, and a historical database is built based on past solutions. This enables efficient data reuse and convenient referencing, further improving office efficiency.
[0083] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0084] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0085] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0086] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A scheme development method based on a template engine, characterized in that, The method includes the following steps: Create a template, add table of contents chapters level by level in the template, and automatically generate the corresponding chapter numbers; The corresponding chapters will be assigned to designated editors for editing based on the table of contents. When the number of words in the edited content exceeds the preset number of words, the key element extraction model obtained through pre-training is used to extract key elements from the edited content. Obtain a historical database that stores previously compiled schemes; compare the schemes in the historical database based on the key elements and the pre-trained similarity analysis model, and sort them from high to low according to the similarity score; The scheme with the highest similarity score, which is higher than a preset score, is designated as a highly similar scheme. The chapter content of the highly similar scheme is automatically filled into the corresponding chapter section of the template to be edited. In this step, the scheme with the highest similarity score is obtained. If the similarity score of this scheme is lower than the preset score, it is returned to the editor for further editing. When the cumulative number of edited words exceeds the preset number of words to be supplemented, the key element extraction model is used again to extract key elements from the new edited content. The similarity analysis model is used to compare the similarity of the schemes in the historical database and calculate the similarity score. A new scheme with the highest similarity score is obtained. If the new similarity score is higher than the preset score, this step continues. If the new similarity score is still lower than the preset score, the scheme to be edited is recognized as a new category, and the editor needs to fill in the chapter content manually and / or through the historical database. The completed template is classified according to the key elements using a pre-trained classification model, and exported to the corresponding category's storage location according to a preset format and layout to obtain the final solution.
2. The template engine-based scheme development method according to claim 1, characterized in that, The template includes a hierarchical table of contents with chapters added sequentially, and corresponding chapter numbers are automatically generated. It also includes: Obtain the template component library, which stores multiple chapter titles; Retrieve the corresponding chapter titles from the template component library to generate the table of contents; If a new chapter title is added to the directory, the new chapter title will be stored as a new template component in the template component library.
3. The template engine-based scheme development method according to claim 1, characterized in that, Create a template, add table of contents chapters level by level in the template, and automatically generate corresponding chapter numbers. It also includes: Retrieve the document containing the required directory structure; The document is parsed using a preset automatic extraction module, the table of contents and chapters of the document are extracted and filled into the template, and the corresponding chapter numbers are automatically generated.
4. The template engine-based scheme development method according to claim 3, characterized in that, The document is parsed using a preset automatic extraction module, and the table of contents and chapters are extracted and filled into the template. The method also includes: Adjust the order of directory contents by dragging and dropping; modify the text and / or format of the corresponding directory contents by clicking on them according to preset rules.
5. The template engine-based scheme development method according to claim 1, characterized in that, The key element extraction model obtained through pre-training is used to extract key elements from the edited content. The training method of the key element extraction model includes the following steps: Obtain a training dataset, which contains multiple data bars, each of which includes a portion of the content of any scheme; The training dataset is labeled using a preset tool; The labeled training dataset is processed into text vectors to obtain an initial model, which is then input into the initial model to obtain the corresponding key elements. The initial model adopts a recurrent neural network. The initial model is trained using the training dataset to obtain the key element extraction model.
6. The template engine-based scheme development method according to claim 5, characterized in that, The text vectorization process uses word embedding, employing a pre-trained Word2vec model to perform word embedding on the labeled training dataset.
7. The template engine-based scheme development method according to claim 5, characterized in that, The initial model is based on a general information extraction model to construct a unified structured extraction language, which encodes the text of each sample through a location-association structure; the structured extraction language expression includes a variety of semantic units.
8. The template engine-based scheme development method according to claim 1, characterized in that, Also includes: The historical database is searched using preset dimension terms; the preset dimension terms include chapter names, keywords, and document names. Select the search result and perform preset referencing to automatically paste the search result into the corresponding editable section of the template.
9. A scheme development system based on a template engine, characterized in that, The system is used to execute the template engine-based scheme development method as described in any one of claims 1 to 8, the system comprising: A template building module is used to add a document table of contents and generate corresponding chapters and their numbers to build a template; The auxiliary editing module includes a task allocation module, a key element extraction model, a historical database, a similarity analysis model, and a content filling module, which are used to fill the template with corresponding chapter content. The document export module includes a classification model, which is used to classify the fully filled templates, export the final solution according to the preset format and layout, and store it.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
An engineering technology bidding document compilation method and device, equipment and a storage medium
CN113988020A
Method and system for automatically combining reports based on chapter labels
CN114139517A