A template generation method and system based on a bidding document
By intelligently parsing and combining the bidding documents, blank templates are generated, which solves the problem of low efficiency of traditional manual operation and realizes the efficient automatic generation of bidding document templates.
Patent Information
- Application Number
- CN202411102023.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The generation of traditional bidding document templates relies on manual operations, resulting in inefficient project progress.
By obtaining sample files of bidding documents, breaking them down into module files, parsing content and format keywords, generating blank templates, and combining them into complete templates.
It realizes the intelligent automatic generation of bidding document templates, improves efficiency and reduces the inefficiency of manual operation.
Smart Images

Figure CN118798148B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent generation of bidding documents, and in particular to a method and system for generating a template based on bidding documents. Background Art
[0002] In traditional bidding processes, the generation of bidding document templates often relies on manual labor. This process involves multiple steps, including detailed analysis of project requirements, checking the applicability of laws and regulations, formulating commercial terms, and compiling document formats. Because these tasks require a high degree of focus and precision, they are often completed manually by employees with specialized knowledge. This significantly reduces project efficiency. Summary of the Invention
[0003] The purpose of the embodiments of the present invention is to provide a method and system for generating a template based on a bidding document, wherein the method and system can intelligently generate a template for a bidding document.
[0004] To achieve the above objectives, an embodiment of the present invention provides a method for generating a template based on a bidding document, comprising:
[0005] Get sample files of tender documents;
[0006] Decomposing the example file to obtain each module file in the example file;
[0007] Parsing the module file to obtain content keywords and format keywords of the module file;
[0008] Generate multiple blank files;
[0009] Add the content keyword as prompt content into the blank file to obtain a corresponding blank module file;
[0010] Generating a format constraint of the blank module file according to the format keyword;
[0011] The blank module files are combined to obtain a template for the bidding document.
[0012] Optionally, decomposing the example file to obtain each module file in the example file includes:
[0013] Get each header in the sample file;
[0014] generating a title matrix according to the hierarchical order of the titles;
[0015] Calculating a commonality matrix of the title matrices of all said sample documents;
[0016] The example file is divided according to the titles in the commonality matrix and the corresponding positions in the example file to obtain a plurality of module files.
[0017] Optionally, generating a title matrix according to the hierarchical order of the titles includes:
[0018] Determining the number of rows of the title matrix according to the level of the lowest-level title;
[0019] Determine the title matrix according to formula (1),
[0020]
[0021] Where T is the title matrix, t ij is the jth level title under the i-th level title, t 1n is the nth level title under the first level title, t m1 is the mth first-level title, t mn The nth level title of the mth first level title;
[0022] Set the blank titles in the title matrix to 0.
[0023] Optionally, calculating the commonality matrix of the title matrices of all the example files includes:
[0024] Obtain each title at each position of each title matrix and construct a corresponding title sequence at the same position;
[0025] determining the occurrence frequency of each title according to the title sequence;
[0026] sorting the titles according to the frequency of occurrence;
[0027] Calculate the difference between the maximum and the second maximum frequency;
[0028] Determining whether the difference is greater than or equal to a preset threshold;
[0029] When it is determined that the difference is greater than or equal to the threshold, the title corresponding to the maximum value is added to the commonality matrix.
[0030] Optionally, calculating the commonality matrix of the title matrices of all the example files includes:
[0031] If it is determined that the difference is less than the threshold, determining the number of titles whose appearance frequency is greater than or equal to a preset frequency according to the title sequence;
[0032] Determining whether the number of titles is greater than or equal to a quantity threshold;
[0033] If it is determined that the number of titles is greater than or equal to the number threshold, deleting the titles;
[0034] When it is determined that the number of titles is less than the quantity threshold, a title is randomly selected from titles whose appearance frequency is greater than or equal to the preset frequency and added to the commonality matrix.
[0035] Optionally, parsing the module file to obtain content keywords and format keywords of the module file includes:
[0036] Delete the table components and images in the module file;
[0037] Deleting text adjacent to the table component or image;
[0038] The format of the remaining text in the module file is read to obtain the format keyword.
[0039] Optionally, the template generation method further includes:
[0040] The text in the module file of the sample file is randomly selected and added to the blank module file as a sample text.
[0041] On the other hand, the present invention further provides a template generation system based on a bidding document, wherein the template generation system includes a processor, and the processor is configured to execute any of the template generation methods described above.
[0042] Through the above technical solution, embodiments of the present invention provide a method and system for generating templates based on bidding documents. This method and system automatically generates blank templates by parsing sample bidding documents and generating blank module files based on the parsed content and format. Compared to the manual compilation methods of the prior art, the template generation method provided by the present invention overcomes the technical drawback of low manual operation and improves the efficiency of automatic generation and call of blank templates.
[0043] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:
[0045] Figure 1 is a flow chart of a method for generating a template based on a bidding document according to one embodiment of the present invention;
[0046] Figure 2is a flowchart of a method for obtaining a module file according to one embodiment of the present invention;
[0047] Figure 3 is a flow chart of a method for determining a commonality matrix according to one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.
[0049] like Figure 1 The figure is a flow chart of a method for generating a template based on a bidding document according to one embodiment of the present invention. Figure 1 In the template generation method, the template generation method may include the following steps:
[0050] In step S10, a sample file of the bidding document is obtained;
[0051] In step S11, the example file is decomposed to obtain each module file in the example file;
[0052] In step S12, the module file is parsed to obtain content keywords and format keywords of the module file;
[0053] In step S13, a plurality of blank files are generated;
[0054] In step S14, the content keyword is added as a prompt content into the blank file to obtain a corresponding blank module file;
[0055] In step S15, format constraints of the blank module file are generated according to the format keywords;
[0056] In step S16, the blank module files are combined to obtain a template of the bidding document.
[0057] In this Figure 1 In the method shown, step S10 can be used to obtain an example file of the bidding document, wherein the example file can be an electronic version of a packaged integrated file of the bidding document.
[0058] Step S11 can be used to decompose the example file to obtain each module file in the example file. In this embodiment, since the bidding document generally includes files of multiple modules, that is, multiple module files. Each module file is used to record specific content, such as qualification documents, which are generally used to record the qualification certificates of suppliers, such as relevant certificates, certificates, etc., and quotation documents, which are generally used to record the quotations of suppliers for different types of services, such as material quotations, service quotations, etc. The specific method for obtaining the module file can be a variety of forms known to those skilled in the art. In one example of the present invention, the method for obtaining the module file can include the following: Figure 2 The steps shown. Figure 2 The method for obtaining the module file may include the following steps:
[0059] In step S20, each title in the sample file is obtained;
[0060] In step S21, a title matrix is generated according to the hierarchical order of the titles;
[0061] In step S22, the commonality matrix of the title matrices of all example files is calculated;
[0062] In step S23 , the example file is segmented according to the titles in the commonality matrix and the corresponding positions in the example file to obtain a plurality of module files.
[0063] Step S21 can be used to generate a title matrix. Considering that in a file, titles are generally divided into first-level titles, second-level titles, and third-level titles, and different module files include different numbers of titles and different lowest-level titles, when generating the title matrix, the number of rows of the title matrix can be determined first according to the level of the lowest-level title, and then the title matrix can be determined according to formula (1).
[0064]
[0065] Where T is the title matrix, t ij is the jth level title under the i-th level title, t 1n is the nth level title under the first level title, t m1 is the mth first-level title, t mn is the nth level title of the mth first level title. Finally, in order to facilitate subsequent processing of the title matrix, the blank titles in the title matrix can be set to 0.
[0066] Step S22 can be used to calculate the commonality matrix of the title matrices of all example files. The commonality matrix is used to represent the common title template of all example files. The specific method for obtaining the commonality matrix can be various forms known to those skilled in the art. In one example of the present invention, step S22 may include: Figure 3 The steps shown in Figure 3 In the step S22, the following steps may be included:
[0067] In step S30, each title at each position of each title matrix is obtained, and a corresponding title sequence at the same position is constructed;
[0068] In step S31, the occurrence frequency of each title is determined according to the title sequence;
[0069] In step S32, the titles are sorted according to the frequency of occurrence;
[0070] In step S33, the difference between the maximum and the second maximum occurrence frequencies is calculated;
[0071] In step S34, it is determined whether the difference is greater than or equal to a preset threshold;
[0072] In step S35, when it is determined that the difference is greater than or equal to the threshold, the title corresponding to the maximum value is added to the commonality matrix.
[0073] In step S36, when it is determined that the difference is less than the threshold, the number of titles whose appearance frequency is greater than or equal to the preset frequency is determined based on the title sequence;
[0074] In step S37, it is determined whether the number of titles is greater than or equal to the number threshold;
[0075] In step S38, if it is determined that the number of titles is greater than or equal to the number threshold, the titles are deleted;
[0076] In step S39, when it is determined that the number of titles is less than the number threshold, a title is randomly selected from the titles whose appearance frequency is greater than or equal to the preset frequency and added to the commonality matrix.
[0077] In this Figure 3 In the illustrated method, step S30 is used to obtain each title at each position in each title matrix and construct a corresponding title sequence for the same position. Specifically, step S30 may first obtain the title at the same position (same row and column number) in each title matrix, then extract the title to construct the corresponding title sequence.
[0078] After determining the title sequence, it is necessary to further find the common titles of each title sequence to obtain a common sequence. In this embodiment, in order to find the common titles, it is necessary to consider three situations:
[0079] First, each bidding document complies with the original mandatory naming rules when it is produced. In this case, the corresponding title names should be exactly the same. Even if there are differences due to input errors by personnel, they should only be a few. Therefore, for this situation, screening can be performed through steps 32 to S35.
[0080] Second, the original soft naming rules of the bidding document when it is produced, that is, the subject is limited, but the specific naming is manually input by the production staff. In this case, due to the limited subject, the final title is generally a specific number of types, so it can be screened by step S39.
[0081] The third is undefined rules. This is generally the case when the title is created by the production personnel in the module file. In this case, the title names and types are diverse and obviously cannot constitute a complete module file alone. Therefore, the title can be deleted through step S38.
[0082] After determining the commonality matrix, the module file can be further parsed in step S12 to obtain content keywords and format keywords of the module file. Specifically, in this embodiment, step S12 can first delete the table components and images in the module file to avoid incorrect format recognition, then delete the text adjacent to the table components or images to prevent the format of the table components or images from interfering with the format of the main text, and finally read the format of the remaining text in the module file to obtain the format keywords.
[0083] After the module files are determined, a blank file can be generated for each module file to serve as a blank template. To ensure that each template can accurately guide the person filling out the form, in this embodiment, content keywords can be added to the blank file in step S14, and format keywords can be converted into format constraints in step S15, thereby forming a complete blank template. In addition, to further facilitate the guidance of the person filling out the form, in one example of the present invention, the template generation method can also randomly select text from the module files of the example files and add it to the blank module file to serve as an example text.
[0084] On the other hand, the present invention also provides a template generation system based on a bidding document, the template generation system including a processor configured to execute any of the above-described template generation methods. Specifically, the template generation method may include the following steps:
[0085] Step S11 can be used to decompose the example file to obtain each module file in the example file. In this embodiment, since the bidding document generally includes files of multiple modules, that is, multiple module files. Each module file is used to record specific content, such as qualification documents, which are generally used to record the qualification certificates of suppliers, such as relevant certificates, certificates, etc., and quotation documents, which are generally used to record the quotations of suppliers for different types of services, such as material quotations, service quotations, etc. The specific method for obtaining the module file can be a variety of forms known to those skilled in the art. In one example of the present invention, the method for obtaining the module file can include the following: Figure 2 The steps shown. Figure 2 The method for obtaining the module file may include the following steps:
[0086] In step S20, each title in the sample file is obtained;
[0087] In step S21, a title matrix is generated according to the hierarchical order of the titles;
[0088] In step S22, the commonality matrix of the title matrices of all example files is calculated;
[0089] In step S23 , the example file is segmented according to the titles in the commonality matrix and the corresponding positions in the example file to obtain a plurality of module files.
[0090] Step S21 can be used to generate a title matrix. Considering that in a file, titles are generally divided into first-level titles, second-level titles, and third-level titles, and different module files include different numbers of titles and different lowest-level titles, when generating the title matrix, the number of rows of the title matrix can be determined first according to the level of the lowest-level title, and then the title matrix can be determined according to formula (1).
[0091]
[0092] Where T is the title matrix, t ij is the jth level title under the i-th level title, t 1n is the nth level title under the first level title, t m1 is the mth first-level title, t mn is the nth level title of the mth first level title. Finally, in order to facilitate subsequent processing of the title matrix, the blank titles in the title matrix can be set to 0.
[0093] Step S22 can be used to calculate the commonality matrix of the title matrices of all example files. The commonality matrix is used to represent the common title template of all example files. The specific method for obtaining the commonality matrix can be various forms known to those skilled in the art. In one example of the present invention, step S22 may include: Figure 3 The steps shown in Figure 3 In the step S22, the following steps may be included:
[0094] In step S30, each title at each position of each title matrix is obtained, and a corresponding title sequence at the same position is constructed;
[0095] In step S31, the occurrence frequency of each title is determined according to the title sequence;
[0096] In step S32, the titles are sorted according to the frequency of occurrence;
[0097] In step S33, the difference between the maximum and the second maximum occurrence frequencies is calculated;
[0098] In step S34, it is determined whether the difference is greater than or equal to a preset threshold;
[0099] In step S35, when it is determined that the difference is greater than or equal to the threshold, the title corresponding to the maximum value is added to the commonality matrix.
[0100] In step S36, when it is determined that the difference is less than the threshold, the number of titles whose appearance frequency is greater than or equal to the preset frequency is determined based on the title sequence;
[0101] In step S37, it is determined whether the number of titles is greater than or equal to the number threshold;
[0102] In step S38, if it is determined that the number of titles is greater than or equal to the number threshold, the titles are deleted;
[0103] In step S39, when it is determined that the number of titles is less than the number threshold, a title is randomly selected from the titles whose appearance frequency is greater than or equal to the preset frequency and added to the commonality matrix.
[0104] In this Figure 3 In the illustrated method, step S30 is used to obtain each title at each position in each title matrix and construct a corresponding title sequence for the same position. Specifically, step S30 may first obtain the title at the same position (same row and column number) in each title matrix, then extract the title to construct the corresponding title sequence.
[0105] After determining the title sequence, it is necessary to further find the common titles of each title sequence to obtain a common sequence. In this embodiment, in order to find the common titles, it is necessary to consider three situations:
[0106] First, each bidding document complies with the original mandatory naming rules when it is produced. In this case, the corresponding title names should be exactly the same. Even if there are differences due to input errors by personnel, they should only be a few. Therefore, for this situation, screening can be performed through steps 32 to S35.
[0107] Second, the original soft naming rules of the bidding document when it is produced, that is, the subject is limited, but the specific naming is manually input by the production staff. In this case, due to the limited subject, the final title is generally a specific number of types, so it can be screened by step S39.
[0108] The third is undefined rules. This is generally the case when the title is created by the production personnel in the module file. In this case, the title names and types are diverse and obviously cannot constitute a complete module file alone. Therefore, the title can be deleted through step S38.
[0109] After determining the commonality matrix, the module file can be further parsed in step S12 to obtain content keywords and format keywords of the module file. Specifically, in this embodiment, step S12 can first delete the table components and images in the module file to avoid incorrect format recognition, then delete the text adjacent to the table components or images to prevent the format of the table components or images from interfering with the format of the main text, and finally read the format of the remaining text in the module file to obtain the format keywords.
[0110] After the module files are determined, a blank file can be generated for each module file to serve as a blank template. To ensure that each template can accurately guide the person filling out the form, in this embodiment, content keywords can be added to the blank file in step S14, and format keywords can be converted into format constraints in step S15, thereby forming a complete blank template. In addition, to further facilitate the guidance of the person filling out the form, in one example of the present invention, the template generation method can also randomly select text from the module files of the example files and add it to the blank module file to serve as an example text.
[0111] Through the above technical solution, embodiments of the present invention provide a method and system for generating templates based on bidding documents. This method and system automatically generates blank templates by parsing sample bidding documents and generating blank module files based on the parsed content and format. Compared to the manual compilation methods of the prior art, the template generation method provided by the present invention overcomes the technical drawback of low manual operation and improves the efficiency of automatic generation and call of blank templates.
[0112] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0113] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0114] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0116] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0117] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0118] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0119] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0120] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for generating a template based on a bidding document, characterized in that: The generation method comprises: Get sample files of tender documents; Decomposing the example file to obtain each module file in the example file; Parsing the module file to obtain content keywords and format keywords of the module file; Generate multiple blank files; Add the content keyword as prompt content into the blank file to obtain a corresponding blank module file; Generating a format constraint of the blank module file according to the format keyword; Combining the blank module files to obtain a template for the bidding document; Decompose the example file to obtain each module file in the example file, including: Get each header in the sample file; generating a title matrix according to the hierarchical order of the titles; Calculating a commonality matrix of the title matrices of all said sample documents; Segmenting the example file according to the titles in the commonality matrix and the corresponding positions in the example file to obtain a plurality of module files; Generate a title matrix according to the hierarchical order of the titles, including: Determining the number of rows of the title matrix according to the level of the lowest-level title; Determine the title matrix according to formula (1), ,(1) in, is the title matrix, For the First level heading Level title, For the first level heading Level title, For the A first-level title, For the The first level heading Level title; Set the blank titles in the title matrix to 0; Calculate the commonality matrix of the title matrices of all the sample files, including: Obtain each title at each position of each title matrix and construct a corresponding title sequence at the same position; determining the occurrence frequency of each title according to the title sequence; sorting the titles according to the frequency of occurrence; Calculate the difference between the maximum and the second maximum frequency; Determining whether the difference is greater than or equal to a preset threshold; When it is determined that the difference is greater than or equal to the threshold, adding the title corresponding to the maximum value to the commonality matrix; Calculate the commonality matrix of the title matrices of all the sample files, including: If it is determined that the difference is less than the threshold, determining the number of titles whose appearance frequency is greater than or equal to a preset frequency according to the title sequence; Determining whether the number of titles is greater than or equal to a quantity threshold; If it is determined that the number of titles is greater than or equal to the number threshold, deleting the titles; When it is determined that the number of titles is less than the quantity threshold, a title is randomly selected from titles whose appearance frequency is greater than or equal to the preset frequency and added to the commonality matrix.
2. The template generation method according to claim 1, characterized in that: Parsing the module file to obtain content keywords and format keywords of the module file includes: Delete the table components and images in the module file; Deleting text adjacent to the table component or image; The format of the remaining text in the module file is read to obtain the format keyword.
3. The template generation method according to claim 1, characterized in that: The template generation method further includes: The text in the module file of the sample file is randomly selected and added to the blank module file as a sample text.
4. A template generation system based on bidding documents, characterized in that: The template generation system includes a processor, and the processor is used to execute the template generation method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Electronic bidding document and clause matching method and device and medium
CN116303909A
Index-based resume data processing method, device, apparatus, and storage medium
WO2019227585A1