Bidding file generation method based on neural network model and related device
Through the bidding document sorting model and chapter splitting model combined with the large language model, the problem of legal and format omissions in the generation of bidding documents in the existing technology is solved, and the bidding document generation that meets user needs is achieved.
Patent Information
- Application Number
- CN202510849295.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-08-26
AI Technical Summary
When generating bidding documents in the procurement field, existing document generation technology lacks legal and industry knowledge in the procurement field, and is prone to omit relevant legal or industry requirements. The output content lacks the font and paragraph format information of the formal bidding documents.
The closest bidding documents are selected through the bidding document sorting model, and the chapter splits are split through the chapter split model, and each chapter is polished and modified in combination with the large language model to generate bidding documents that meet user needs.
Improve the accuracy and format consistency of bidding documents to ensure that the generated files meet the user's needs for input information.
Smart Images

Figure CN120542402A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for generating bidding documents based on a neural network model and related devices. Background Art
[0002] The most basic function of large language models is to understand and generate natural language text. They can process and respond to various language tasks, from translation to question-answering, from text summarization to sentiment analysis. These models are trained through deep learning and large amounts of data, enabling them to provide intelligent language processing capabilities in a variety of application scenarios.
[0003] In the existing technology for generating documents, documents are generated according to user needs through a pre-trained or fine-tuned large language model. The main steps include: building an index of the historical document library; obtaining user demand data; based on the user data, combined with vector retrieval and prompt words of historical documents, using the pre-trained or fine-tuned large language model to generate bidding document output.
[0004] However, when generating procurement tender documents, existing document generation technologies often omit relevant legal or industry requirements when outputting them based on the type of procurement project, as large language models lack legal and industry knowledge. Furthermore, since large language models output plain text, they lack the font and paragraph formatting typical of formal tender documents. Summary of the Invention
[0005] An embodiment of the present invention provides a method and related device for generating a bidding document based on a neural network model. The most similar bidding document is selected through a bidding document sorting model, and the bidding document is split into chapters through a chapter splitting model, and each chapter of the bidding document is polished and modified through a large language model, so that the bidding document conforms to the user's input information, allowing the user to obtain a bidding document that meets the user's needs.
[0006] In a first aspect, the present application provides a method for generating bidding documents based on a neural network model, comprising: 101. Obtain user input information; 102. Input the input information into a bidding document relevance ranking model to obtain bidding documents whose similarity to the input information exceeds a first threshold; 103. Modify the text of each section of the bidding document by calling a large language model to generate a target section corresponding to the input information; 104. Assemble the generated target chapters into the final bidding document in order.
[0007] In conjunction with the first aspect, in one implementation of the embodiment of the present application, before step 102, the step further includes a step of training the bidding document relevance ranking model, including: 201. Obtain a training set including a plurality of training bidding documents; 202. Selecting a training bidding document with more fixed sections from the training bidding documents and creating a bidding document template based on the fixed sections; 203. Splitting the training bidding document into chapters using a chapter splitting model according to the bidding document template; 204. The bidding document relevance ranking model is obtained by training the bidding document after the chapter splitting.
[0008] In conjunction with the first aspect, in one implementation of the embodiment of the present application, the chapter splitting model classifies and marks the paragraphs of the input file using a first classifier C1 based on XML tags and a second classifier C2 based on a large language model, and classifies the paragraph marked as the article title and the text before the next paragraph marked as the article title as a chapter, thereby achieving chapter splitting; In conjunction with the first aspect, in one implementation of the embodiment of the present application, the chapter splitting model is collaboratively trained through the following steps: 301. For each paragraph of a portion of the training tender document, label whether it is a chapter title according to the chapter title in the tender document template, and divide the labeled paragraphs into two data sets, namely, a training set L and a validation set V. The remaining paragraphs of the training tender document are defined as an unlabeled data set U. 302. Initialize a first classifier C1 based on XML tags and a second classifier C2 based on a large language model; 303. Extracting XML view features X1 and text view features X2 from the paragraphs of the training set L; 304. Train the first classifier C1 based on the XML view feature X1 and the annotated paragraph tags, and train the second classifier C2 based on the text view feature X2 and the annotated paragraph tags. 305. Randomly remove u paragraphs from the unlabeled dataset U to the sample buffer pool U1; 306. Predict the paragraphs in the sample buffer pool U1 using the first classifier C1 to obtain a confidence level of a first prediction result. 307. Predict the paragraphs in the sample buffer pool U1 using the second classifier C2 to obtain a confidence level of a second prediction result. 308. Remove the paragraphs whose confidence of the first prediction result or the confidence of the second prediction result is greater than a second threshold and the corresponding prediction result labels from the sample buffer pool U1 to the training set L; 309. Repeat steps 303 to 308 until the accuracy of the chapter splitting model on the validation set V converges.
[0009] In conjunction with the first aspect, in one implementation of the embodiment of the present application, the bidding document relevance ranking model is specifically a Pairwise Learning to Rank pairwise ranking model, and step 204 includes: 401. Extracting basic information features and procurement list features of the procurement items from the training bidding document after the chapter splitting; 402. Obtaining the procurement experts' annotation information on the pairwise comparison of the training bidding documents; 403. Perform supervised training on the Pairwise Learning to Rank model based on the basic information features of the procurement item, the procurement list features, and the annotation information; 404. Perform parameter tuning and feature optimization on the Pairwise Learning to Rank model.
[0010] In a second aspect, an embodiment of the present application provides a bidding document generation device based on a neural network model, comprising: The acquisition module is used to obtain user input information; A processing module, configured to input the input information into a bidding document relevance ranking model to obtain bidding documents having a similarity with the input information exceeding a first threshold; The processing module is further configured to modify the text of each section of the bidding document by calling a large language model to generate a target section corresponding to the input information; The processing module is further configured to sequentially stitch the generated target chapters into a final bidding document.
[0011] In conjunction with the second aspect, in one implementation of the embodiment of the present application, the apparatus further includes a training module configured to execute a training step of the bidding document relevance ranking model, including: obtaining a training set including a plurality of training bidding documents; Selecting a training bidding document with more fixed chapters from the training bidding documents and establishing a bidding document template based on the fixed chapters; According to the bidding document template, the training bidding document is divided into chapters by using a chapter splitting model; The bidding document relevance ranking model is obtained by training the bidding document after the training is split into chapters.
[0012] In combination with the second aspect, in one implementation of an embodiment of the present application, the chapter splitting model classifies and marks the paragraphs of the input file through a first classifier C1 based on XML tags and a second classifier C2 based on a large language model, and treats the paragraph marked as the article title and the text before the next paragraph marked as the article title as a chapter to achieve chapter splitting.
[0013] In conjunction with the second aspect, in one implementation of the embodiment of the present application, the training module is further configured to: For each paragraph of a portion of the training tender documents, whether it is a chapter title is marked according to the chapter title in the tender document template, and the marked paragraphs are divided into two data sets, namely, a training set L and a validation set V. The remaining paragraphs of the training tender documents are defined as an unlabeled data set U; Initialize the first classifier C1 based on XML tags and the second classifier C2 based on the large language model; Extracting XML view features X1 and text view features X2 from paragraphs of the training set L; The first classifier C1 is trained according to the XML view feature X1 and the paragraph tags obtained by annotation, and the second classifier C2 is trained according to the text view feature X2 and the paragraph tags obtained by annotation; Randomly remove u paragraphs from the unlabeled dataset U to the sample buffer pool U1; Predicting the paragraphs in the sample buffer pool U1 by using the first classifier C1 to obtain a confidence level of a first prediction result; Predicting the paragraphs in the sample buffer pool U1 by using the second classifier C2 to obtain a confidence level of a second prediction result; Remove the paragraphs whose confidence of the first prediction result or the confidence of the second prediction result is greater than a second threshold and the corresponding prediction result labels from the sample buffer pool U1 to the training set L; Steps 303 to 308 are repeatedly performed until the accuracy of the chapter splitting model on the validation set V converges.
[0014] In conjunction with the second aspect, in one implementation of the embodiment of the present application, the bidding document relevance ranking model is specifically a Pairwise Learning to Rank pairwise ranking model, and the training module is further configured to include: Extracting basic information features and procurement list features of procurement items from the training bidding documents after the chapters are split; Obtaining annotation information of pairwise comparisons of the training bidding documents by procurement experts; Performing supervised training on the Pairwise Learning to Rank model based on the basic information features of the procurement item, the procurement list features, and the annotation information; Perform parameter tuning and feature optimization on the Pairwise Learning to Rank model.
[0015] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any of the methods described in the first aspect above.
[0018] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages: Embodiments of the present invention provide a method and related apparatus for generating bidding documents based on a neural network model. This method selects the most similar bidding documents using a bidding document ranking model, splits the bidding documents into chapters using a chapter splitting model, and polishes and modifies each chapter of the bidding document using a large language model, ensuring that the bidding document conforms to the user's input information and that the user obtains a bidding document that meets the user's needs. Embodiments of the present application also provide related apparatus.
[0019] The present application also has the following outstanding technologies: 1) Technology for Automatic Section Segmentation of Bidding Documents. This method innovatively combines XML tag parsing of Word bidding document paragraphs with the semantic information of the text content. It combines an XML tag-based approach with a large language model-based approach, and through collaborative training, improves the accuracy and robustness of automatic section segmentation of bidding documents.
[0020] 2) A bidding document ranking algorithm based on multi-feature learning. This paper proposes a feature fusion technique that integrates text features, project information features, and procurement list features to enhance the performance of the bidding document ranking algorithm. Through a specific weight allocation and feature interaction mechanism, it achieves effective integration of multi-source information. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A flowchart of a method for generating bidding documents based on a neural network model provided in an embodiment of the present application; Figure 2 A flowchart of the training steps in a method for generating bidding documents based on a neural network model provided in an embodiment of the present application; Figure 3 A flowchart of the collaborative training steps of the chapter splitting model in a method for generating bidding documents based on a neural network model provided in an embodiment of the present application; Figure 4 A flowchart of the steps of training a tender document relevance ranking model in a tender document generation method based on a neural network model provided in an embodiment of the present application; Figure 5 A schematic diagram of a tender document generation device based on a neural network model provided in an embodiment of the present application; Figure 6 A schematic diagram of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] Embodiments of the present invention provide a method and related apparatus for generating bidding documents based on a neural network model. This method selects the most similar bidding documents using a bidding document ranking model, splits the bidding documents into chapters using a chapter splitting model, and polishes and modifies each chapter of the bidding document using a large language model, ensuring that the bidding document conforms to the user's input information and that the user obtains a bidding document that meets the user's needs. Embodiments of the present application also provide related apparatus.
[0024] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0025] Figure 1A flowchart of a method for generating bidding documents based on a neural network model is provided in an embodiment of the present application. The process includes: 101. Obtain user input information; In an embodiment of the present application, the user's input information may be the user's requirements for the bidding documents, such as project information such as project name, procurement items, project category, procurement budget, and procurement list information.
[0026] In the embodiment of the present application, the user's input information can be obtained by filling out a form, or can be customized by the user, and the embodiment of the present application does not limit this.
[0027] 102. Input the input information into a bidding document relevance ranking model to obtain bidding documents whose similarity to the input information exceeds a first threshold; In this embodiment of the present application, the tender document relevance ranking model has been pre-trained and will be described in detail in subsequent sections, so it will not be repeated here. It will be understood that the tender documents are pre-stored in a database. The tender document relevance ranking model can retrieve and rank the tender documents from the database based on the input information, thereby outputting the ranking of the tender documents and the similarity between the tender documents and the input information. When this similarity exceeds a first threshold (which can be set by the administrator), the tender document is considered to be the tender document required by the user.
[0028] 103. By calling the large language model, the text of each chapter of the bidding document is modified to generate the target chapter corresponding to the input information; In some embodiments, the bidding document is pre-split into sections using a section splitting model and then stored in a database. Therefore, in this embodiment, the bidding document may be a document with sections already marked.
[0029] In the embodiment of the present application, the large language model can be an open source model such as deepseek and Qianwen, or it can be other self-developed models, and the embodiment of the present application does not limit this.
[0030] After the text is modified through the large language model, the text is more in line with the user's input information and more in line with user needs.
[0031] In actual use, users enter parameters such as user requirements and basic information. For sections with templates, such as "Bidding Instructions," the bidding document automatic generation system will fill the template with the above information to generate the current section. For sections without templates, such as "User Requirements," the bidding document automatic generation system will input the user requirements into the bidding document ranking algorithm to obtain the highest-ranked relevant historical bidding document sections. The obtained section text and the new user requirements are then combined with our prompt words and input into the large language model to obtain the "User Requirements" section consistent with the new user requirements.
[0032] 104. Assemble the generated target chapters into the final bidding document in sequence.
[0033] In an embodiment of the present application, the computer program splices the text of the target chapter in the order of the chapters in the bidding document with the highest similarity. Then, for the chapters that are not in the bidding document with the highest similarity, the chapters can be placed after the spliced chapters to finally obtain the bidding document.
[0034] In some embodiments, before step 102, the steps further include a training step of a bidding document relevance ranking model, such as Figure 2 As shown, including: 201. Obtain a training set including a plurality of training bidding documents; In this embodiment of the present application, training bidding documents can be collected through the data collection module. Specifically, procurement projects, bidding documents, and project information from different organizations can be collected. Alternatively, a large number of Word format bidding documents and project-related information, such as the purchaser and procurement content, can be collected from historical procurement projects.
[0035] In some embodiments, during the data cleaning and standardization step, the bidding documents in Word format are retained, and procurement projects that lack necessary project information in the bidding document relevance ranking model are eliminated.
[0036] In some embodiments, the bidding documents used for training can be stored in a database after the training is completed, so as to be retrieved when the model is used.
[0037] 202. Select a training bidding document with more fixed sections from the training bidding documents and create a bidding document template based on the fixed sections; In this embodiment, step 202 actually involves creating templates for different types of tender documents. In some embodiments, tender documents can be categorized with the help of professional procurement personnel, and templates can be created for sections with relatively fixed formats. Sections with more flexible formats and personalized content can be generated by recalling document fragments from similar historical procurement projects.
[0038] 203. According to the bidding document template, the training bidding document is split into chapters using the chapter splitting model; In an embodiment of the present application, the chapter splitting model classifies and marks the paragraphs of the input file through a first classifier C1 based on XML tags and a second classifier C2 based on a large language model, and treats the paragraph marked as the article title and the text before the next paragraph marked as the article title as a chapter to achieve chapter splitting.
[0039] The first classifier C1 based on XML tags and the second classifier C2 based on the large language model can complete the training steps through collaborative training, which will be described in detail in subsequent chapters and will not be repeated here.
[0040] 204. The bidding document relevance ranking model is obtained by training the bidding document after the chapter splitting.
[0041] In the embodiment of the present application, the specific training method of step 204 is described in subsequent chapters and will not be repeated here.
[0042] The following describes the collaborative training steps of the first classifier C1 and the second classifier C2 of the chapter splitting model, that is, before step 203, the collaborative training steps are also included, such as Figure 3 As shown, the following steps are included: 301. For each paragraph of a portion of the training tender documents, label whether it is a chapter title based on the chapter title in the tender document template. The labeled paragraphs are divided into two datasets, namely the training set L and the validation set V. The remaining paragraphs of the training tender documents are defined as the unlabeled dataset U. In an embodiment of the present application, the training set L is used to train the chapter splitting model, the validation set V is used to verify whether the chapter splitting model reaches the set accuracy, and the unlabeled dataset U is used to supplement the training set L during the collaborative training process.
[0043] It is understandable that in the embodiment of the present application, the initial annotation of the bidding documents for training can be manually annotated by procurement experts. Procurement experts can classify the collected bidding documents, establish a template for the bidding documents for the chapters with a relatively fixed format, and then perform paragraph annotation on the bidding documents with fixed chapters to obtain a training set L and a verification set V. The parts with non-fixed formats and more personalized content will be generated with the assistance of recalling document fragments of historical similar procurement projects. Some unannotated bidding documents can be used as an unlabeled data set U. The specific implementation method can be partially adjusted according to the actual situation, and the embodiment of the present application does not limit this.
[0044] 302. Initialize a first classifier C1 based on XML tags and a second classifier C2 based on a large language model; In the embodiment of the present application, during the official document processing process, there are usually certain format requirements, but due to different writers, writing habits are also different. As a result, some paragraphs in the bidding documents have similar appearance formats, but the XML tags for text, fonts, etc. are not uniform. When read using the python-docx library, the format differences are large, making it difficult to automatically process based on XML tags alone. In order to effectively solve the problem of Word document format differences, a classifier based on Word's XML tags and a text content classifier based on a large language model are combined to improve the accuracy and robustness of the split through collaborative training.
[0045] 303. Extract XML view features X1 and text view features X2 from the paragraphs of the training set L; In this embodiment, the two classifiers input different views X1 and X2 of the same paragraph instance, and output whether the current paragraph is a chapter title. XML view features X1 may include XML tags such as the paragraph's font, font size, boldface, page break, and table of contents level tags. Text view features X2 may be the paragraph's text content.
[0046] 304. Train a first classifier C1 based on the XML view feature X1 and the annotated paragraph tags, and train a second classifier C2 based on the text view feature X2 and the annotated paragraph tags. In the embodiment of the present application, after the first classifier C1 and the second classifier C2 are preliminarily trained using the training set L, these two classifiers can be used to predict paragraph instances in the unlabeled dataset U.
[0047] 305. Randomly remove u paragraphs from the unlabeled dataset U to the sample buffer pool U1; In this embodiment of the present application, for an unlabeled dataset U, u instances are randomly selected to create a sample buffer pool U1. Prediction is performed using both an XML tag-based classifier and a large model-based classifier. For each classifier, the sample with the highest confidence level is selected. Furthermore, after randomly removing u paragraphs from the unlabeled dataset U to the sample buffer pool U1, the unlabeled dataset U is updated such that U (after update) = U (before update) - U1.
[0048] 306. Predict the paragraph in the sample buffer pool U1 using the first classifier C1 to obtain a confidence level of the first prediction result. 307. Predict the paragraph in the sample buffer pool U1 using the second classifier C2 to obtain a confidence level of the second prediction result. 308. Remove the paragraphs whose confidence of the first prediction result or the confidence of the second prediction result is greater than the second threshold and the corresponding prediction result labels from the sample buffer pool U1 to the training set L; In an embodiment of the present application, the second threshold is a threshold set in collaborative training, and being greater than the threshold indicates that these instance predictions are relatively accurate and can be used as a training set for further training. Generally, the second threshold is set to 95%. When the confidence of the first prediction result is greater than the second threshold, the paragraph instance corresponding to the first prediction result is added to the training set L, and the paragraph instance corresponding to the first prediction result is removed from the sample buffer pool U1. Alternatively, when the confidence of the second prediction result is greater than the second threshold, the paragraph instance corresponding to the second prediction result is added to the training set L, and the paragraph instance corresponding to the second prediction result is removed from the sample buffer pool U1. The result of this approach is to allow the correct prediction results of the first classifier C1 and the second classifier C2 to supervise each other, combine the advantages of the two classifiers, prevent missed detection, and conduct collaborative training to improve the accuracy and robustness of the automatic splitting of tender document chapters.
[0049] 309. Repeat steps 303 to 308 until the accuracy of the chapter splitting model on the validation set V converges.
[0050] After training, the results of the two classifiers are used to classify the paragraphs of the tender document. The average of the output probabilities of the two classifiers is calculated, and the final classification result is determined based on the average probability to obtain the final tender document chapter segmentation result.
[0051] The following describes the training of the bidding document relevance ranking model: In the embodiment of the present application, the bidding document relevance ranking model is specifically a Pairwise Learning to Rank pairwise ranking model, and step 204 includes steps 401 to 404, such as Figure 4 As shown: 401. Extract the basic information features of the procurement items and the procurement list features from the training bidding documents after the chapters are split; In an embodiment of the present application, the feature extraction of the bidding document mainly includes two parts: basic information of the procurement project, including the name of the procurement project, procurement items, and procurement budget, etc.; the procurement list of the bidding document, which uses a large language model to extract the names of all goods or services to be purchased by the current bidding document from the bidding document.
[0052] 402. Obtaining the annotation information of the procurement experts on the pairwise comparison of the training bidding documents; During the manual annotation process for the training dataset, we used a Pairwise Learning to Rank model to have procurement experts compare and annotate bidding documents in pairs based on the similarity of historical documents. Compared to Listwise comparison, pairwise comparison annotation uses less labeled data to learn the ranking function and enables the model to effectively learn the relative relationships between documents.
[0053] 403. Perform supervised training on the Pairwise Learning to Rank model based on the basic information features of the procurement items, the features of the procurement list, and the annotation information. In an embodiment of the present application, a Transformer-based ranking model is used to perform supervised training in combination with the above-mentioned features and labels. The input content is the project information such as the project name, procurement items, project category, procurement budget, etc. of the projects to which the two bidding documents belong, as well as the extracted procurement list. After the encoding layer and the output layer, the output is the predicted score of the similarity of the two bidding documents, and LambdaRank is selected as the loss function. LambdaRank can efficiently capture the relative relationship between commodities and directly optimize the ranking evaluation indicators (such as NDCG) by introducing Lambda weights λi j and a carefully designed loss function, thereby improving the performance of the recommendation system. NDCG (Normalized Discounted Cumulative Gain) and MAP (Mean Average Precision) are selected as evaluation indicators.
[0054] 404. Perform parameter tuning and feature optimization on the Pairwise Learning to Rank model.
[0055] In the embodiment of the present application, hyperparameters of the model are tuned, feature selection is performed based on the model performance, unimportant features are removed, and features that have a greater impact on the ranking results are retained.
[0056] After the training of the bidding document relevance ranking model is completed, we can sort the bidding documents of historical procurement projects according to the new requirements filled in by the user (project information such as project name, procurement items, project category, procurement budget, and procurement list), select files with similarity exceeding a specific threshold for output, and provide them to users as a reference for new bidding documents.
[0057] In some embodiments, the bidding document section slices recalled in the previous step can be modified using the tested prompt words based on the large language model to keep them consistent with new user information and user needs.
[0058] Next, an application example provided by this application is described: This application example provides a bidding document automatic generation system, which can generate a Word bidding document based on the text or table requirements entered by the user.
[0059] First, the data collection module collects procurement projects, bidding documents, and project information from different organizations. During the data cleaning and standardization step, bidding documents in Word format are retained, while procurement projects that lack the necessary project information for the bidding document relevance ranking model are eliminated.
[0060] Then, construct a bidding document template for the structured content such as the cover of the bidding document and the bidding instructions in Chapter 1.
[0061] Next, during the automatic segmentation phase of the bidding documents, the model is trained to automatically identify chapter titles. We will manually annotate a batch of chapter title data. Then, using the python-docx library, we extract tags such as font, size, and centering for each paragraph in the bidding documents, as well as important information such as whether a page break precedes the paragraph. Using the annotated data, we initialize and train a model based on XML tags and an algorithm based on a large language model. We then use both algorithms to classify unlabeled data, selecting paragraphs with high confidence in both algorithms and assigning them to chapter titles. We then iteratively train the two classification algorithms, ultimately resulting in a model capable of automatically segmenting bidding documents into chapters.
[0062] Afterwards, the bidding document ranking algorithm is trained according to the steps of the above embodiment based on the split bidding document sections.
[0063] In actual use, users enter parameters such as user requirements and basic information. For sections with templates, such as "Bidding Instructions," the bidding document automatic generation system will fill the template with the above information to generate the current section. For sections without templates, such as "User Requirements," the bidding document automatic generation system will input the user requirements into the bidding document ranking algorithm to obtain the highest-ranked relevant historical bidding document sections. The obtained section text and the new user requirements are then combined with our prompt words and input into the large language model to obtain the "User Requirements" section that is consistent with the new user requirements.
[0064] Finally, piece together each chapter in sequence to obtain the final bidding document.
[0065] This embodiment of the application utilizes Word-formatted bidding documents from historical procurement projects and the python-docx library to assist in generating bidding documents that conform to the font and paragraph formatting of official bidding documents. A bidding document sorting algorithm is used to recall relevant historical documents, generating more standardized and formal content. This recalled content is then modified using a large language model and prompt words to align with new user needs.
[0066] Figure 5 A schematic diagram of a tender document generation device based on a neural network model provided in an embodiment of the present application, the device comprising: Acquisition module 501, used to obtain user input information; Processing module 502, configured to input the input information into a bidding document relevance ranking model, and obtain bidding documents having a similarity with the input information exceeding a first threshold; The processing module 502 is further configured to modify the text of each section of the bidding document by calling the large language model to generate a target section corresponding to the input information; The processing module 502 is further configured to sequentially assemble the generated target chapters into a final bidding document.
[0067] In some embodiments, the apparatus further includes a training module 503 for executing a training step of a bidding document relevance ranking model, including: obtaining a training set including a plurality of training bidding documents; Select a training bidding document with more fixed chapters from the training bidding documents and create a bidding document template based on the fixed chapters; According to the bidding document template, the training bidding document is split into chapters using the chapter splitting model; The bidding document relevance ranking model is obtained by training the bidding documents after chapter splitting.
[0068] In some embodiments, the chapter splitting model classifies and marks the paragraphs of the input file through a first classifier C1 based on XML tags and a second classifier C2 based on a large language model, and treats the paragraph marked as the article title and the text before the next paragraph marked as the article title as a chapter to achieve chapter splitting.
[0069] In some embodiments, the training module 503 is further configured to: For each paragraph of a portion of the training tender documents, we annotate whether it is a chapter title based on the chapter title in the tender document template. The annotated paragraphs are divided into two datasets, namely the training set L and the validation set V. The remaining paragraphs of the training tender documents are defined as the unlabeled dataset U. Initialize the first classifier C1 based on XML tags and the second classifier C2 based on the large language model; Extract XML view features X1 and text view features X2 from the paragraphs of the training set L; The first classifier C1 is trained based on the XML view feature X1 and the paragraph tags obtained by annotation, and the second classifier C2 is trained based on the text view feature X2 and the paragraph tags obtained by annotation; Randomly remove u paragraphs from the unlabeled dataset U to the sample buffer pool U1; Predict the paragraphs in the sample buffer pool U1 using the first classifier C1 to obtain the confidence of the first prediction result; The second classifier C2 is used to predict the paragraphs in the sample buffer pool U1, and the confidence of the second prediction result is obtained; Remove the paragraphs whose confidence of the first prediction result or the confidence of the second prediction result is greater than the second threshold and the corresponding prediction result labels from the sample buffer pool U1 to the training set L; Steps 303 to 308 are repeated until the accuracy of the chapter splitting model on the validation set V converges.
[0070] In some embodiments, the bidding document relevance ranking model is specifically a Pairwise Learning to Rank model, and the training module 503 is further configured to include: Extract the basic information features of procurement items and procurement list features from the training bidding documents after the chapters are split; Obtaining procurement experts' annotation information on pairwise comparisons of training bidding documents; The Pairwise Learning to Rank model is supervised and trained based on the basic information features of the procurement items, the features of the procurement list, and the annotation information. Perform parameter tuning and feature optimization on the Pairwise Learning to Rank model.
[0071] Figure 6 Schematic diagram of a data processing device provided in an embodiment of the present application. The data processing device 600 includes a memory 602, a processor 601, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the following is achieved: Figures 1 to 4 The corresponding methods of each embodiment.
[0072] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0073] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various method embodiments when executing the computer program product.
[0074] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0075] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0076] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0077] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0078] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0079] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating bidding documents based on a neural network model, characterized in that: The following steps are involved:
101. Obtain user input information; 102. Input the input information into a bidding document relevance ranking model to obtain bidding documents whose similarity to the input information exceeds a first threshold; 103. Modify the text of each section of the bidding document by calling a large language model to generate a target section corresponding to the input information; 104. Assemble the generated target chapters into the final bidding document in order.
2. The method according to claim 1, characterized in that Before step 102, the steps further include a step of training the bidding document relevance ranking model, including the following steps:
201. Obtain a training set including a plurality of training bidding documents; 202. Selecting a training bidding document with more fixed sections from the training bidding documents and creating a bidding document template based on the fixed sections; 203. Splitting the training bidding document into chapters using a chapter splitting model according to the bidding document template; 204. The bidding document relevance ranking model is obtained by training the bidding document after the chapter splitting.
3. The method according to claim 2, characterized in that The chapter splitting model classifies and marks the paragraphs of the input file through a first classifier C1 based on XML tags and a second classifier C2 based on a large language model, and regards the paragraph marked as the article title and the text before the next paragraph marked as the article title as a chapter to achieve chapter splitting.
4. The method according to claim 2, characterized in that The chapter splitting model is trained collaboratively through the following steps:
301. For each paragraph of a portion of the training tender document, label whether it is a chapter title according to the chapter title in the tender document template, and divide the labeled paragraphs into two data sets, namely, a training set L and a validation set V. The remaining paragraphs of the training tender document are defined as an unlabeled data set U.
302. Initialize a first classifier C1 based on XML tags and a second classifier C2 based on a large language model; 303. Extracting XML view features X1 and text view features X2 from the paragraphs of the training set L; 304. Train the first classifier C1 based on the XML view feature X1 and the annotated paragraph tags, and train the second classifier C2 based on the text view feature X2 and the annotated paragraph tags.
305. Randomly remove u paragraphs from the unlabeled dataset U to the sample buffer pool U1; 306. Predict the paragraphs in the sample buffer pool U1 using the first classifier C1 to obtain a confidence level of a first prediction result.
307. Predict the paragraphs in the sample buffer pool U1 using the second classifier C2 to obtain a confidence level of a second prediction result.
308. Remove the paragraphs whose confidence of the first prediction result or the confidence of the second prediction result is greater than a second threshold and the corresponding prediction result labels from the sample buffer pool U1 to the training set L; 309. Repeat steps 303 to 308 until the accuracy of the chapter splitting model on the validation set V converges.
5. The method according to claim 2, characterized in that The bidding document relevance ranking model is specifically a Pairwise Learning to Rank pairwise ranking model, and step 204 includes:
401. Extracting basic information features and procurement list features of the procurement items from the training bidding document after the chapter splitting; 402. Obtaining the procurement experts' annotation information on the pairwise comparison of the training bidding documents; 403. Perform supervised training on the Pairwise Learning to Rank model based on the basic information features of the procurement item, the procurement list features, and the annotation information; 404. Perform parameter tuning and feature optimization on the Pairwise Learning to Rank model.
6. A bidding document generation device based on a neural network model, characterized in that: include: The acquisition module is used to obtain user input information; A processing module, configured to input the input information into a bidding document relevance ranking model to obtain bidding documents having a similarity with the input information exceeding a first threshold; The processing module is further configured to modify the text of each section of the bidding document by calling a large language model to generate a target section corresponding to the input information; The processing module is further configured to sequentially stitch the generated target chapters into a final bidding document.
7. The device according to claim 6, characterized in that The system further includes a training module for executing the training steps of the bidding document relevance ranking model, including: obtaining a training set including a plurality of training bidding documents; selecting a training bidding document with more fixed chapters from the training bidding documents and establishing a bidding document template based on the fixed chapters; According to the bidding document template, the training bidding document is divided into chapters by using a chapter splitting model; The bidding document relevance ranking model is obtained by training the bidding document after the training is split into chapters.
8. The device according to claim 7, characterized in that The training module is also used to: For each paragraph of a portion of the training tender documents, whether it is a chapter title is marked according to the chapter title in the tender document template, and the marked paragraphs are divided into two data sets, namely, a training set L and a validation set V. The remaining paragraphs of the training tender documents are defined as an unlabeled data set U; Initialize the first classifier C1 based on XML tags and the second classifier C2 based on the large language model; Extracting XML view features X1 and text view features X2 from paragraphs of the training set L; The first classifier C1 is trained according to the XML view feature X1 and the paragraph tags obtained by annotation, and the second classifier C2 is trained according to the text view feature X2 and the paragraph tags obtained by annotation; Randomly remove u paragraphs from the unlabeled dataset U to the sample buffer pool U1; Predicting the paragraphs in the sample buffer pool U1 by using the first classifier C1 to obtain a confidence level of a first prediction result; Predicting the paragraphs in the sample buffer pool U1 by using the second classifier C2 to obtain a confidence level of a second prediction result; Remove the paragraphs whose confidence of the first prediction result or the confidence of the second prediction result is greater than a second threshold and the corresponding prediction result labels from the sample buffer pool U1 to the training set L; Repeat the steps after the feature extraction until the accuracy of the chapter splitting model on the validation set V converges.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Document segmentation method and device, computer equipment and storage medium
CN119474250A
Bid invitation file generation method, device and equipment based on pattern analysis and readable storage medium
CN120104775A