Information analysis method for bidding document
By preprocessing, classifying and modularly analyzing bidding documents, structured core information is generated, and the problems of high resolution cost and low efficiency in the existing technology are solved, and efficient and accurate information analysis and structured output are achieved.
Patent Information
- Application Number
- CN202411570183.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the analysis cost of bidding documents is high, low efficiency, poor timeliness, and the manual analysis is highly subjective, resulting in inconsistent analysis results, affecting the subsequent process of bidding activities.
Using an information analysis method for bidding documents, the bidding documents are divided and analyzed through preprocessing, classification, table, core and independent analysis modules, core information is extracted, and the structured core information main table is generated through the integration module. and sub-table.
It realizes accurate and efficient analysis of different types of bidding documents, outputs the most streamlined and core information, reduces labor costs, improves analysis efficiency and accuracy, and is suitable for large-scale bidding activities.
Smart Images

Figure CN119443081A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data analysis, and in particular relates to an information analysis method for bidding documents. Background Art
[0002] With the advancement of global industrial division of labor, the industrial chains in various fields are becoming more and more complete, the number of enterprises covered by various industrial nodes in the industrial chain is also surging, and downstream enterprises have more and more choices, which has led to a large increase in bidding activities of downstream enterprises.
[0003] At present, downstream enterprises need to manually analyze the bidding documents generated in each bidding activity, and then screen the winning candidates based on the analysis results of each bidding document, and finally determine the most suitable upstream enterprise as the supplier from the winning candidates, that is, determine the winner of the current bidding activity. Manual analysis means manually simplifying the bidding documents and extracting the core information of each bidding document (such as project number, project name, purchaser name, purchaser address, subject matter name, etc.) as the analysis result.
[0004] However, in the entire bidding process, especially in the public bidding process, the bidding documents generated are not only huge in number and variety (such as bidding notices, bids, winning candidate notices, etc.), but also in various formats (such as plain text format, pure table format, and both text and table formats); and the core information in these bidding documents is scattered in many places, and the overall information density is not high, which makes manual analysis not only costly, inefficient, and time-sensitive. In addition, the process of manual analysis is to manually judge the various information in the bidding documents and independently decide which information to retain and which information to delete, so it is highly subjective. Different people may get very different analysis results based on the same bidding document, but the accuracy of the analysis results of the bidding documents is directly related to the subsequent process of the bidding activities. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies of the above-mentioned prior art and to provide a method for analyzing information of bidding documents, which can accurately and efficiently analyze the core information of various bidding documents.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for analyzing information in a bidding document comprises the following steps:
[0008] S1, after obtaining the newly added bidding documents, send them to the pre-processing module;
[0009] S2, the preprocessing module outputs the corresponding preprocessed data to the classification module;
[0010] S3, the classification module divides the content of the current pre-processed data into valid tables, core blocks and independent blocks, and sends them to the table parsing module, the core parsing module and the independent parsing module respectively;
[0011] S4, the table parsing module, the core parsing module, and the independent parsing module respectively output the first parsing data, the second parsing data, and the third parsing data to the integration module for integration to obtain core information and output it.
[0012] Preferably, S2 also includes the following sub-steps:
[0013] S21, the pre-processing module first cleans a newly added bidding document and removes irrelevant characters, and then converts it into a standard file of a set format;
[0014] S22, the preprocessing module separates the tables in the current standard file to obtain preprocessed data: that is, a unique table number is used to replace the corresponding table in the current standard file, and the table number occupies a single line. At the same time, the table content is converted into a string and bound to the corresponding table number.
[0015] Preferably, S3 also includes the following contents: the classification module sends the rows corresponding to the valid table, the rows corresponding to the core block, and the rows corresponding to the independent block to the table parsing module, the core parsing module, and the independent parsing module respectively.
[0016] Preferably, training the classification module comprises the following steps:
[0017] Step 1a, obtain i bidding documents and send them into the preprocessing module, after obtaining i corresponding preprocessed data, divide the i preprocessed data into f groups of preprocessed data, f is an integer greater than 2, the first group of preprocessed data includes M1 preprocessed data, the second group of preprocessed data includes M2 preprocessed data, ..., the fth group of preprocessed data includes M f preprocessed data, where M1+M2+…+M f =i and M1≤M2≤…≤M f ;
[0018] Step 2a, after manually labeling the content in the first group of pre-processed data by row, a first training set T1 containing M1 training data is obtained, and the labeled labels include three categories: valid table, core block and independent block;
[0019] Step 3a, using the first training set T1 to perform several rounds of training and parameter optimization on the classification module: after each round of training, the first loss function is calculated once, and the parameters in the classification module are optimized in the direction of the gradient descent of the first loss function, and then the next round of training is performed; one round of training means that the classification module is trained once using each training data in the current training set;
[0020] The classification module includes a first BERT model, a first BiLSTM model, a fully connected layer, and a first loss function calculation unit. When the training data in the first training set T1 enters the first BERT model, the first BERT model will segment and encode the current training data to obtain a word sequence corresponding to the current training data. The first BERT model captures the contextual features of each word in the current word sequence and sends them together with the current word sequence into the first BiLSTM model. The first BiLSTM model captures the long-distance dependency in the current word sequence and outputs it to the fully connected layer. The Softmax activation function in the fully connected layer calculates the label of the current row according to the long-distance dependency captured by the first BiLSTM model. The first loss function calculation unit uses the label output by the fully connected layer as input to calculate the first loss function.
[0021] Step 4a, using the second set of preprocessed data as the input of the current classification module, obtaining label annotations for each line of the M2 preprocessed data, manually verifying that the labels for each line of the M2 preprocessed data are correct, obtaining M2 training data, and aggregating the M2 training data with the M1 training data in the first training set T1 into a second training set T2;
[0022] Step 5a, using the second training set T2 to perform several rounds of training and parameter optimization on the classification module: after each round of training, the first loss function is calculated once, and the parameters in the classification module are optimized in the direction of the gradient descent of the first loss function before the next round of training;
[0023] When f≥3, the next set of preprocessed data is used as the input of the current classification module to obtain the label annotation of each line of the next set of preprocessed data. After manually verifying that the label of each line of the next set of preprocessed data is correct, it is aggregated into a new training set with the training data in the previous training set. The new training set is used to perform several rounds of training and parameter optimization on the classification module until the fth training set Tf is used to complete several rounds of training and parameter optimization of the classification module.
[0024] Preferably, S4 also includes the following contents: the table parsing module outputs the character string corresponding to the table number as the first parsing data to the integration module according to the table number of the row where the valid table is located; the core parsing module extracts the relationship combination from the core block, and outputs the relationship combination whose score meets the output condition as the second parsing data to the integration module; the independent parsing module extracts the independent entities from the independent block and labels them, and outputs them as the third parsing data to the integration module; the integration module integrates the first parsing data, the second parsing data and the third parsing data according to the core information dictionary, obtains the core information of the current bidding document and outputs it.
[0025] Preferably, training the core parsing module comprises the following steps:
[0026] Step 1b, sending j pieces of pre-processed data to the classification module to obtain j corresponding core block sets, each of which contains more than one core block;
[0027] Step 2b: divide the j core block sets into n groups of pre-processing sets, where n is an integer greater than 2, the first group of pre-processing sets includes Y1 core block sets, the second group of pre-processing sets includes Y2 core block sets, ..., the nth group of pre-processing sets includes Y n A set of core blocks, where Y1+Y2+…+Y n =j and Y1≤Y2≤…≤Y n ;
[0028] Step 3b, manually annotating the bidding data in each core block in the first preprocessing set to form the first verification set V1, the bidding data includes two types of data: party data and subject data, both of which include subject, object and relationship type;
[0029] Step 4b, taking the first group of preprocessing sets and the first validation set V1 as the first set, and performing several rounds of training and parameter optimization on the core parsing module: the first group of preprocessing sets is the training set of the first set, the first validation set V1 is the validation set of the first set, the training set of the first set is input into the core parsing module, after the core parsing module predicts the bidding data in each core block, the second loss function is calculated once based on the validation set of the first set, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function, and then the next round of training is performed;
[0030] The core parsing module includes a second BERT model, a second GPLinker model and a second loss function calculation unit. When each core block in the first preprocessing set enters the second BERT model in the core parsing module, the second BERT model performs word segmentation and encoding on each core block to obtain a word sequence corresponding to the current core block. The second BERT model captures the contextual features of each word in the current word sequence and sends them together with the current word sequence into the second GPLinker model. The second GPLinker model extracts all subjects, objects and relationship types in the current word sequence, and then scores the relationship combinations formed by each subject, object and relationship type. The relationship combinations whose scores meet the output conditions are output as the bidding data in the current core block to the second loss function calculation unit. The second loss function calculation unit calculates the second loss function based on the bidding data in the current core block and the first verification set V1.
[0031] The output conditions are:
[0032] Where p represents the type of relation that the second GPLinker model will extract from the word sequence; (S h ,S t ) represents the subject, S h and S t Respectively represent the starting position and the ending position of the subject; (O h ,O t ) represents the object, O h and O t Respectively represent the starting position and ending position of the object; Score(·) represents the scoring by the second GPLinker model; Score((S h ,O h )|p) means that under the condition of relationship type p, the starting position of the subject is S h And the object's starting position is O h When the second GPLinker model is scored; Score((S t ,O t )|p) means that under the condition of relationship type p, the subject ends at S t And the object end position is O t When , the second GPLinker model is scored;
[0033] Step 5b, taking the second set of preprocessed data sets as the input of the current core parsing module, and performing the first round of training. After the core parsing module predicts the bidding data in each core block in the first round of training, the bidding data corresponding to the bidding data in each core block is manually verified to be correct to obtain the second verification set V2, and then the second loss function is calculated once based on the second verification set V2, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function;
[0034] The second set of preprocessed data sets and the first set of preprocessed data sets are aggregated into a training set of the second set, the first verification set V1 and the second verification set V2 are aggregated into a verification set of the second set, and the training set of the second set is input into the core parsing module. After the core parsing module predicts the bidding data in each core block, the second loss function is calculated once based on the verification set of the second set, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function before the next round of training is carried out;
[0035] When n≥3, repeat step 5b, obtain the next set of validation sets based on the next set of preprocessed data, combine them with the previous set to form a new set, and use the new set to perform several rounds of training and parameter optimization on the classification module until the nth set is used to complete several rounds of training and parameter optimization of the core parsing module.
[0036] Preferably, the second loss function includes four dimensions:
[0037]
[0038]
[0039] Among them, Loss2 1 Represents the second loss function on the first dimension, Loss2 2 Represents the second loss function on the second dimension, Loss2 3 Represents the second loss function in the third dimension, Loss2 4 represents the second loss function on the fourth dimension; in the current word sequence, a correct relationship combination obtained by manual verification is recorded as (S h *,S t *,p*,O h *,O t *), the set of all possible subject start positions and all possible subject end positions in the current word sequence is recorded as N 1 , will (S h *,S t *) is recorded as set R 1 , R 1 ∈N 1 ; The set consisting of all possible object start positions and all possible object end positions in the current word sequence is recorded as N 2 , will (O h *,O t *) is recorded as set R 2 , R 2 ∈N 2 ; The set consisting of all possible subject starting positions, all possible object starting positions and all relationship types in the current word sequence is recorded as N 3 , will ((S h *,O h *)|p) is recorded as set R 3 , R 3 ∈N 3 ; The set consisting of all possible subject ending positions, all possible object ending positions and all relationship types in the current word sequence is recorded as N 4 , will ((S t *,O t *)|p) is recorded as set R 4 , R 4 ∈N 4 .
[0040] Preferably, the training of the independent parsing module includes the following contents: the independent parsing module is the third BERT model; after selecting several independent blocks, the independent entities and the corresponding independent entity labels in each independent block are manually marked and used as the independent parsing module training set, and the independent parsing module training set is used to train the independent parsing module to extract independent entities and perform labeling.
[0041] Preferably, in the trained classification module, after the fully connected layer calculates the label of the current row, the corresponding row is output to the corresponding table parsing module, the trained core parsing module, and the trained independent parsing module according to different labels; in the trained core parsing module, the second GPLinker model uses the relationship combination whose scores meet the output conditions as the second parsing data output by the current core parsing module, and outputs it to the integration module; the trained independent parsing module extracts independent entities from each independent block and labels the independent entities, and then outputs them as third parsing data to the integration module.
[0042] Preferably, the integration module outputs the core information of the current bidding document further comprising the following steps:
[0043] Step 41, the keywords in the core information dictionary include two categories: main table keywords and sub-table keywords. The integration module extracts the corresponding parsed data based on the main table keywords in the order of priority of the second parsed data, the third parsed data, and the first parsed data to form the core information main table of the current bidding document; at the same time, the integration module extracts the corresponding parsed data based on the sub-table keywords in the order of priority of the second parsed data and the first parsed data to form the core information sub-table of the current bidding document;
[0044] Step 42, the integration module normalizes the contents in the core information main table and the core information sub-table and outputs them as the core information of the current bidding document.
[0045] The beneficial effects of the present invention are:
[0046] (1) The present invention provides an information parsing method for bidding documents, that is, no matter what the type of bidding documents is, after dividing the contents in the bidding documents into three categories, namely, valid tables, core blocks and independent blocks, the valid tables, core blocks and independent blocks are then classified and simplified (i.e., the relationship combination in the core blocks is extracted, the independent entities in the independent blocks are extracted and labeled), and finally, according to the core information dictionary, the simplified first parsed data, the second parsed data and the third parsed data are extracted according to different extraction priorities, that is, the parsed data are further screened to form a core information main table and a core information sub-table. That is, the present invention can accurately and efficiently perform information parsing on different types of bidding documents, and output the most concise and core information without missing the core information, and has high versatility.
[0047] (2) The present invention parses each bidding document into a core information main table (including the core overview information of the current bidding document) and one or more core information sub-tables (including the core detailed information of the current bidding document), so that the presentation of the core information is more structured, which not only facilitates the technical personnel to view specific bidding information, but also facilitates the technical personnel to conduct subsequent market analysis, analyze the core competitiveness of the enterprise itself, understand the industry development trend, and thus adjust the industrial structure and achieve industrial upgrading.
[0048] (3) Compared with manual analysis, which is highly subjective, the accuracy of the core information obtained by the trained information analysis system in the present invention is relatively stable and does not fluctuate. That is, the present invention can maintain stable information analysis accuracy for different types of bidding documents.
[0049] (4) The parsing speed of the present invention is much higher than the manual parsing in the prior art, the parsing efficiency is high and the labor cost is greatly saved, and it can perfectly cope with the massive bidding documents generated in large-scale bidding activities and can better serve large-scale bidding activities.
[0050] (5) When the present invention trains the classification module, except for the first training set, the subsequent training sets do not need to be manually labeled. The technician only needs to verify the labeling of each row in the new set of preprocessed data by the current classification module to obtain a new training set; and with the iteration of the training set during the training process, the labeling of each row in the new set of preprocessed data by the classification module will become more and more accurate. Under the same amount of preprocessed data, the workload of the technician to correct the label during the verification process will also be smaller and smaller. The present invention also takes this into consideration. In the process of training the classification module, the number of training data increases successively with the iteration of the training set, which ensures the accuracy of all training data. Further, it also ensures the training effect of the classification module, and at the same time greatly reduces the workload of the technician, shortens the time to construct all training sets and the total time to train the classification module, and greatly improves the training efficiency of the classification module. The same is true for the core parsing module. That is, the training of the classification module and the core parsing module of the present invention is efficient and labor-saving.
[0051] (6) The prior art calculates the multi-label cross entropy loss function based on entity extraction to obtain relationship combinations. Because it is affected by the core block length (i.e., text length) and the number of relationship types, and considering that the amount of data used for each training increases dramatically with the iteration of the training set, this will result in the need to pass a very large calculation matrix during the calculation of the loss function. Each element of this calculation matrix is used to record the scores of different relationship combinations, which is not conducive to GPU calculation. In the second loss function used in the present invention, not only is the loss function calculated based on the label prediction value and the label true value, but also the true value matrix is used to replace each set during the calculation process. The special element assignment of the true value matrix makes it unnecessary to pass the entire matrix during the calculation process. Only coordinates with all values of 1 need to be passed. While ensuring the auxiliary optimization effect, the amount of data that needs to be passed is greatly reduced, the calculation pressure of the GPU is greatly reduced, and the calculation speed is improved. Furthermore, while ensuring the training effect, the training efficiency of the core parsing module is also improved.
[0052] (7) The integration module of the present invention is based on the core information dictionary, and uses the parsing data extraction priority of a specific core information main table / core information sub-table to extract the corresponding parsing data, and finally integrates it into the core information main table or core information sub-table of the current bidding text, which is not only fast but also highly accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of an information parsing method for bidding documents;
[0054] Figure 2 This is a schematic diagram of the overall architecture of the information analysis system;
[0055] Figure 3 This is a schematic diagram of the internal information flow of the classification module during the training process;
[0056] Figure 4 It is a schematic diagram of the internal information flow of the classification module during use;
[0057] Figure 5 This is a schematic diagram of the internal information flow of the core parsing module during the training process;
[0058] Figure 6 This is a schematic diagram of the internal information flow of the core parsing module during use. DETAILED DESCRIPTION
[0059] In order to make the technical solution of the present invention clearer and more specific, the present invention is clearly and completely described below in conjunction with the accompanying drawings. Any equivalent replacement of the technical features of the technical solution of the present invention and any solution derived by conventional reasoning by ordinary technicians in the field without making any creative work shall fall within the protection scope of the present invention.
[0060] Because the present invention is aimed at enterprises rather than individuals, for the convenience of description, the case where an enterprise is the applicant is defined as an applicant enterprise in the present invention.
[0061] like Figure 1 FIG. 1 is a flowchart of a method for analyzing information in a bidding document of the present invention, comprising the following steps:
[0062] S1, after acquiring the newly added bidding documents, send them to the pre-processing module in the trained information analysis system;
[0063] S2, the preprocessing module outputs the corresponding preprocessed data to the classification module in the information analysis system;
[0064] S3, after the classification module divides the content in the current pre-processed data into three categories, namely, valid tables, core blocks and independent blocks, the valid tables, core blocks and independent blocks are respectively sent to the table parsing module, the core parsing module and the independent parsing module in the information parsing system;
[0065] S4, the table analysis module, the core analysis module, and the independent analysis module respectively output the first analysis data, the second analysis data, and the third analysis data to the integration module in the information analysis system for integration to obtain the core information and output it.
[0066] When new bidding documents are obtained again, S1 to S4 are repeated.
[0067] Technical personnel can then conduct further screening based on the core information output by the information analysis system to select the winning candidates; technical personnel can also filter out the core information of specific bidding activities to assist in optimizing project management.
[0068] like Figure 2 As shown, it is a schematic diagram of the overall architecture of the information analysis system in the present invention. The information analysis system includes a preprocessing module, a classification module, a table analysis module, a core analysis module, an independent analysis module, and an integration module.
[0069] In S1, the following sub-steps are also included:
[0070] S11, after grabbing the bidding document, compare it with the bidding document stored in the local database. If the current bidding document does not exist in the local database, store the current bidding document in the local database; otherwise, discard the current bidding document;
[0071] S12, sending the newly added bidding documents in the local database to the pre-processing module in the trained information analysis system.
[0072] That is, there are no duplicate bidding documents in the local data.
[0073] In S2, the following sub-steps are also included:
[0074] S21, the pre-processing module first cleans a newly added bidding document and removes irrelevant characters, and then converts it into a standard file of a set format;
[0075] S22, the preprocessing module separates the tables in the current standard file to obtain preprocessed data: that is, a unique table number is used to replace the corresponding table in the current standard file, and the table number occupies a single line. At the same time, the table content is converted into a string and bound to the corresponding table number.
[0076] In this embodiment, the specific format is the Html format. Therefore, the irrelevant characters in this embodiment refer to characters irrelevant to Html, such as <meta> , non-breaking spaces, etc.
[0077] In S22, a table corresponds to a string. After the table content is converted into a string, the computer can restore the table in natural language from the string. The computer converts the table content into a string and restores the string into a table in natural language, which are both prior arts and will not be described here.
[0078] The information analysis systems mentioned in S1 to S4 are all trained information analysis systems, that is, the classification modules, core analysis modules, and independent analysis modules in the information analysis systems are all trained modules.
[0079] The training of the classification module includes steps 1a to 5a:
[0080] Step 1a, obtain i bidding documents and send them into the preprocessing module, after obtaining i corresponding preprocessed data, divide the i preprocessed data into f groups of preprocessed data, f is an integer greater than 2, the first group of preprocessed data includes M1 preprocessed data, the second group of preprocessed data includes M2 preprocessed data, ..., the fth group of preprocessed data includes M f preprocessed data, where M1+M2+…+M f =i and M1≤M2≤…≤M f .
[0081] Step 2a, after manually labeling the content in the first group of preprocessed data by row, a first training set T1 containing M1 training data is obtained, and the labeled labels include three categories: valid table, core block and independent block.
[0082] In the present invention, a unique table number is used to replace the corresponding table, and finally the preprocessed data is obtained, so there is no table structure in the preprocessed data. The row where the table number corresponding to the table containing the core detailed information of the bidding documents is located will be marked with the label "valid table"; the row containing a large amount of core detailed information of the bidding documents and not the table number will be marked with the label "core block"; the rows other than the core block and the valid table are marked as independent blocks. The independent block may also contain some core detailed information of the bidding documents.
[0083] The core detailed information of the bidding documents include the purchaser, the purchaser's contact address, the purchasing agency, the supervisory and management department, the successful bidder, the successful supplier, the name of the subject matter, etc.; the core overview information of the bidding documents includes the project name, project number, project location, announcement type, etc.
[0084] The lines in HTML files are closer to paragraphs in natural language, so generally the semantics of a line in HTML files are complete, and there will be no situation where words are cut off and semantics are incomplete due to line breaks in natural language.
[0085] Step 3a, use the first training set T1 to perform several rounds of training and parameter optimization on the classification module: calculate the first loss function once after each round of training, and optimize the parameters in the classification module in the direction of gradient descent of the first loss function before performing the next round of training; one round of training means training the classification module once using each training data in the current training set.
[0086] Step 4a, using the second set of preprocessed data as the input of the current classification module, obtaining label annotations for each line of the M2 preprocessed data, manually verifying that the labels for each line of the M2 preprocessed data are correct, obtaining M2 training data, and summarizing the M2 training data with the M1 training data in the first training set T1 into a second training set T2.
[0087] In step 4a, if the label of a row of content is found to be wrong during the verification process, it is manually corrected to ensure that the labels corresponding to each row of content in the M2 training data are correct.
[0088] Step 5a, use the second training set T2 to perform several rounds of training and parameter optimization on the classification module: calculate the first loss function once after each round of training, and optimize the parameters in the classification module in the direction of the gradient descent of the first loss function before performing the next round of training.
[0089] When f≥3, training the classification module also includes the following training iterations: taking the next set of preprocessed data as the input of the current classification module, obtaining the label annotation of each line of the next set of preprocessed data, manually verifying that the label of each line of the next set of preprocessed data is correct, and then aggregating it with the training data in the previous training set into a new training set, and using the new training set to perform several rounds of training and parameter optimization on the classification module: calculating the first loss function once after each round of training, and optimizing the parameters in the classification module in the direction of the gradient descent of the first loss function, and then performing the next round of training; until several rounds of training and parameter optimization of the classification module are completed using the fth training set Tf.
[0090] In this embodiment, the first loss function is a cross entropy loss function.
[0091] Figure 3 and Figure 4 These are schematic diagrams of the internal architecture of the classification module, including the first BERT model, the first BiLSTM model, the fully connected layer, and the first loss function calculation unit.
[0092] When the training data in the first training set T1 enters the first BERT model in the classification module, the first BERT model will segment and encode a piece of training data to obtain the word sequence corresponding to the current training data. The first BERT model captures the contextual features of each word in the current word sequence and sends it to the first BiLSTM model together with the current word sequence. The first BiLSTM model further captures the long-distance dependencies in the current word sequence and outputs it to the fully connected layer. The Softmax activation function in the fully connected layer calculates the most likely label for the current row based on the long-distance dependencies captured by the first BiLSTM model.
[0093] In the process of training the classification module, such as Figure 3 As shown, the first loss function calculation unit takes the label output by the fully connected layer as input to calculate the first loss function, and outputs the calculation result of the first loss function, so that the technician can optimize the parameters in the classification module based on the calculation result of the first loss function.
[0094] The internal information flow of the classification module during use is as follows Figure 4 As shown in the figure, the difference from the training process is that after the fully connected layer calculates the most likely label of the current row, the rows corresponding to each label are used as the output of the classification module and output to different subsequent modules according to different labels.
[0095] The first training set T1 is used to perform several rounds of training and parameter optimization on the classification module, so that the classification module can initially learn to determine which of the three labels of the current row, namely, valid table, core block, and independent block, based on the contextual semantics of the current row in the input information (in the training process, the input information is the preprocessed data). When the information parsing system is officially working, the fully connected layer in the classification module will classify each row in the input information according to the label and output it to different subsequent modules.
[0096] Optionally, the classification output of the fully connected layer is the first and last position coordinates of each line in the input information.
[0097] The second training set T2 does not need to be fully labeled manually. It only needs to input the second set of preprocessed data into the classification module trained by the first training set T1 to obtain the label annotation of each line of the second set of preprocessed data. Subsequent technicians only need to verify these label annotations to ensure that the label annotations in the final second training set T2 are accurate. Compared with constructing the second training set entirely by manual label annotation, it not only reduces the workload of technicians, but also shortens the time to construct the second training set while ensuring the accuracy of the training data in the second training set.
[0098] The second training set T2 is then used to train and optimize the parameters of the classification module, further improving the accuracy of the classification module's annotation of each row of labels in the input information. If there are more than two groups of preprocessed data used to train the classification module, then similarly, the subsequent training sets do not need to be all manually labeled. The technician only needs to verify the label annotation of each row in the new set of preprocessed data by the current classification module to obtain a new training set; and with the iteration of the training set during the training process, the classification module will be more and more accurate in labeling each row in the new set of preprocessed data. Under the same amount of preprocessed data, the workload of the technician in correcting the label during the verification process will also be smaller and smaller. The present invention also takes this into consideration. In the process of training the classification module, the number of training data increases successively with the iteration of the training set, which ensures that all training data are accurate. Further, it also ensures the training effect of the classification module, while greatly reducing the workload of the technician, shortening the time to build all training sets and the total time to train the classification module, and greatly improving the training efficiency of the classification module.
[0099] Optional, M1×10 (f-1) =(M1+M2)×10 (f-2) =…=(M1+M2+…+M f-1 )×10=M1+M2+…+M f =i. That is, the number of training data in the training set after each iteration is one order of magnitude higher than that of the previous training set. In this way, even if the current classification module already has a high classification accuracy, when we use the training set after the iteration to train the current classification module, we can still improve the robustness of the current classification module through 10 times the training data, find the parameters that need to be further optimized in the current classification module, and better train and optimize the classification module.
[0100] In this embodiment, f=3, M1=100, M2=900, and M3=9000.
[0101] The following are also included in S3:
[0102] After the trained classification module divides the current preprocessed data into three categories by row: valid tables, core blocks, and independent blocks, the fully connected layer in the classification module sends the rows corresponding to the valid tables, core blocks, and independent blocks in the current preprocessed data to the table parsing module, the trained core parsing module, and the trained independent parsing module respectively.
[0103] In S4, the following are also included:
[0104] The table parsing module outputs the character string corresponding to the table number as the first parsing data to the integration module according to the table number of the row where the valid table is located; the trained core parsing module extracts the relationship combination from the core block, and outputs the relationship combination whose score meets the output condition as the second parsing data to the integration module; the trained independent parsing module extracts the independent entity from the independent block and labels it and outputs it as the third parsing data to the integration module; the integration module integrates the first parsing data, the second parsing data and the third parsing data according to the core information dictionary, obtains the core information of the current bidding document and outputs it, and the core information includes a core information main table and one or more core information sub-tables.
[0105] Training the core parsing module includes steps 1b to 5b:
[0106] Step 1b: Send j pieces of preprocessed data to the trained classification module to obtain j corresponding core block sets, each of which contains more than one core block.
[0107] One piece of preprocessed data can be obtained from one bidding document, and the core block is determined according to the rows in the preprocessed data. In one piece of preprocessed data, a core block may contain more than one row, so all the core blocks in one piece of preprocessed data are recorded as the core block set corresponding to the preprocessed data, that is, one piece of preprocessed data corresponds to one core block set.
[0108] Step 2b: divide the j core block sets into n groups of pre-processing sets, where n is an integer greater than 2, the first group of pre-processing sets includes Y1 core block sets, the second group of pre-processing sets includes Y2 core block sets, ..., the nth group of pre-processing sets includes Y n A set of core blocks, where Y1+Y2+…+Y n =j and Y1≤Y2≤…≤Y n .
[0109] Step 3b, manually annotate the bidding data in each core block in the first preprocessing set to form the first verification set V1. The bidding data includes two types: party data and object data. Both party data and object data include subject, object and relationship type.
[0110] A core block contains 0 or more bidding data.
[0111] In the party data: the relationship type includes party type, contact address, contact person, etc., and the object corresponds to the subject and relationship type in the current party data. For example, in party data 1: the subject is "α1 Hospital", the relationship type is "party type", and the object is "purchaser". In party data 2: the subject is "α1 Hospital", the relationship type is "contact address", and the object is "a certain street, a certain district, a certain city, a certain province, a certain number".
[0112] In the subject data: the relationship type includes the subject type, quantity, amount, unit price, etc., and the object corresponds to the subject and relationship type in the current subject data. For example, in subject data 1: the subject is "β1 instrument", the relationship type is "subject type", and the object is "bid product". For example, in subject data 2: the subject is "β1 instrument", the relationship type is "quantity", and the object is "γ units". In subject data 3: the subject is "β1 instrument", the relationship type is "unit price", and the object is "η yuan RMB".
[0113] In a bidding document, because the relationship type is determined, the subject pointing to the object in the bidding data is unique.
[0114] Step 4b, using the first group of preprocessing sets and the first verification set V1 as the first set, perform several rounds of training and parameter optimization on the core parsing module: the first group of preprocessing sets is the training set of the first set, the first verification set V1 is the verification set of the first set, the training set of the first set is input into the core parsing module, and after the core parsing module predicts the bidding data in each core block, the second loss function is calculated once based on the verification set of the first set, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function before the next round of training is performed.
[0115] Step 5b, taking the second set of preprocessed data sets as the input of the current core parsing module, and performing the first round of training. After the core parsing module predicts the bidding data in each core block in the first round of training, the bidding data corresponding to the bidding data in each core block is manually verified to be correct to obtain the second verification set V2, and then the second loss function is calculated once based on the second verification set V2, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function.
[0116] The second preprocessed data set and the first preprocessed data set are aggregated into a training set of the second set, the first verification set V1 and the second verification set V2 are aggregated into a verification set of the second set, and the training set of the second set is input into the core parsing module. After the core parsing module predicts the bidding data in each core block, the second loss function is calculated once based on the verification set of the second set, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function before the next round of training is carried out.
[0117] When n≥3, the training of the core parsing module also includes the following training iterations: repeat step 5b, obtain the next set of verification sets based on the next set of preprocessed data, aggregate them with the previous set into a new set, input the training set of the new set into the core parsing module, and after the core parsing module predicts the bidding data in each core block, calculate the second loss function based on the verification set of the new set, and optimize the parameters in the core parsing module in the direction of the gradient descent of the second loss function, and then conduct the next round of training until the nth set is used to complete several rounds of training and parameter optimization of the core parsing module.
[0118] Figure 5 and Figure 6 These are schematic diagrams of the internal architecture of the core parsing module, including the second BERT model, the second GPLinker model, and the second loss function calculation unit.
[0119] In the process of training the core parsing module, such as Figure 5 As shown, when each core block in the first preprocessing set enters the second BERT model in the core parsing module, the second BERT model will segment and encode each core block to obtain the word sequence corresponding to the current core block. The second BERT model captures the contextual features of each word in the current word sequence, and sends it to the second GPLinker model together with the current word sequence. After the second GPLinker model extracts all the subjects, objects and relationship types in the current word sequence, it scores the relationship combination formed by each subject, object and relationship type, and uses the relationship combination whose score meets the output condition as the bidding data in the current core block predicted by the core parsing module (i.e., input 1), which is output to the second loss function calculation unit. The second loss function calculation unit calculates the second loss function based on the first verification set V1 (i.e., input 2). The bidding data is used as the label, that is, the second loss function calculation unit has two inputs, input 1 is the label prediction value output by the second GPLinker model based on the current core block, and input 2 is the label true value of the current core block, so the second loss function calculation unit calculates the second loss function based on the label prediction value and the label true value. After the second loss function calculation unit outputs the calculation result of the second loss function, the technicians use the AdamEMA optimizer to optimize the parameters in the core parsing module based on the calculation result of the second loss function.
[0120] Except that the first verification set V1 is obtained entirely by manual annotation, the second verification set V2 does not need manual annotation. It only needs to use the core analysis module trained and parameter optimized by the first set to predict the bidding data of the second set of preprocessed data sets. Subsequent technical personnel only need to verify these predicted bidding data to ensure that the final second verification set V2 is accurate. If there are more than two sets of preprocessed data sets used to train the core analysis module, then similarly, the subsequent verification sets do not need to be manually labeled. Technical personnel only need to verify the current core analysis module for the bidding data of each core block in the new set of preprocessed data sets to obtain a new verification set. Furthermore, as the set used for training is iterated, the core parsing module will predict the bidding data in a new set of preprocessed data sets more and more accurately, and the workload of technical personnel to correct the predicted erroneous bidding data during the verification process will become smaller and smaller. The present invention takes this into consideration. In the process of training the core parsing module, the amount of data in the set used for training increases successively with iteration, thus ensuring the accuracy of the data in the set used for training, and further, ensuring the training effect of the core parsing module, while greatly reducing the workload of technical personnel, shortening the total time for constructing the set used to train the core parsing module, and greatly improving the training efficiency of the core parsing module.
[0121] Optional, Y1×10 (n-1) =(Y1+Y2)×10 (n-2) =…=(Y1+Y2+…+Y n-1 )×10=Y1+Y2+…+Y n =j. That is, the set used to train the core parsing module, the amount of data after each iteration is one order of magnitude higher than the previous set, so that even if the current core parsing module can already predict the bidding data of each core block with high accuracy, when we use the iterated set to train the current core parsing module, we can still improve the robustness of the current core parsing module through 10 times the data growth, find the parameters that need to be further optimized in the current core parsing module, and better train and optimize the core parsing module.
[0122] Taking the validation set as the standard, a core block corresponds to 3 bidding data in the validation set; after the current core block is input into the core parsing module, as long as the bidding data output by the second GPLinker model in the core parsing module is not the same as the 3 bidding data in the validation set, it will be considered that the core parsing module output is wrong. Through the training and optimization of the core parsing module, the output of the core parsing module becomes more and more accurate.
[0123] The internal information flow of the core parsing module during use is as follows Figure 6As shown, the difference from the training process is that the second GPLinker model directly uses the relationship combination whose scores meet the output conditions as the second parsing data output by the current core parsing module and outputs it to the subsequent integration module.
[0124] Optionally, the second GPLinker model records the relation type extracted from the word sequence as p and the subject as (S h ,S t ), the object is denoted as (O h ,O t ), the subject and the object are both in the form of a binary group, that is, the subject (S h ,S t ) contains two elements, namely the starting position S of the subject h and the end position S t ; empathy object (O h ,O t ) contains the starting position O of the object h and end position O t .
[0125] The second GPLinker model records all the relation types in the current word sequence, p, subject (S h ,S t ) and object (O h ,O t ) is scored. If the scores of the current relationship combination meet the following conditions, the second GPLinker model outputs the current relationship combination:
[0126]
[0127] Among them, Score(·) indicates the scoring of the second GPLinker model, and the value range of Score(·) is [-1,1]; Score((S h ,O h )|p) means that under the condition of relationship type p, the starting position of the subject is S h And the object's starting position is O h When , the second GPLinker model is scored; Score((S t ,O t )|p) means that under the condition of relationship type p, the subject ends at S t And the object end position is O t When , the second GPLinker model is scored.
[0128] The second GPLinker model is based on five-tuple (S h ,S t ,p,O h,O t ), that is, the second parsed data is in the form of quintuples.
[0129] The GPLinker model scores the extracted entities (both the subject and the object are entities) as an existing technology and will not be described in detail here.
[0130] In the current word sequence, a correct relation combination obtained through manual verification is recorded as (S h *,S t *,p*,O h *,O t *), the set of all possible subject start positions and all possible subject end positions in the current word sequence is recorded as N 1 , will (S h *,S t *) is recorded as set R 1 , so R 1 ∈N 1 ; The set consisting of all possible object start positions and all possible object end positions in the current word sequence is recorded as N 2 , will (O h *,O t *) is recorded as set R 2 , so R 2 ∈N 2 ; The set consisting of all possible subject starting positions, all possible object starting positions and all relationship types in the current word sequence is recorded as N 3 , will ((S h *,O h *)|p) is recorded as set R 3 , so R 3 ∈N 3 ; The set consisting of all possible subject ending positions, all possible object ending positions and all relationship types in the current word sequence is recorded as N 4 , will ((S t *,O t *)|p) is recorded as set R 4 , so R 4 ∈N 4 ;
[0131] Calculate the output of the second GPLinker model for each quintuple (S h ,S t ,p,O h ,O t )The second loss function in four dimensions:
[0132]
[0133]
[0134] Among them, Loss2 1 Represents the second loss function on the first dimension, Loss2 2 Represents the second loss function on the second dimension, Loss2 3 Represents the second loss function in the third dimension, Loss2 4 Represents the second loss function in the fourth dimension.
[0135] The second loss functions in four dimensions are used to optimize different parameters in the core parsing module.
[0136] In the prior art, when calculating the loss function, a set is often used as a calculation matrix, and each element in the calculation matrix is used to record the scores of different relationship combinations. The calculation of the multi-label cross entropy loss function based on entity extraction to obtain relationship combinations is affected by the core block length (i.e., text length) and the number of relationship types. Considering that the amount of data used for each training increases dramatically with the iteration of the training set, this will result in the need to pass a very large calculation matrix in the calculation process of the loss function, which is not conducive to GPU calculation.
[0137] When calculating the loss function, the matrix corresponding to each set is a true value matrix, that is, only the elements in the matrix that belong to the correct relationship combination are assigned a value of 1, and the other elements in the matrix are assigned a value of 0. For example, the current word sequence contains only one correct relationship combination (S h *,S t *,p*,O h *,O t *), then in Loss2 1 In the calculation of , the true value matrix is the same as the set N 1 The corresponding two-dimensional matrix, where the X-axis represents the coordinates of all possible main starting positions in the current word sequence, and the Y-axis represents the coordinates of all possible main ending positions in the current word sequence. The set R 1 That is (S h *,S t *) The coordinates of the two-dimensional matrix are (3,1), then only the point with the coordinates (3,1) in the current true value matrix has a value of 1, and the values of other points in the current true value matrix are all 0; for example, in Loss2 3 In the calculation of , the true value matrix is the same as the set N 3 The corresponding three-dimensional matrix, where the X-axis represents all possible subject starting position coordinates in the current word sequence, the Y-axis represents all possible object starting position coordinates in the current word sequence, and the Z-axis represents all relationship types in the current core parsing module. Different coordinates on the Z-axis represent different relationship types. If the set R3 That is ((S h *,O h *)|p) has a coordinate of (3,1,6) in the two-dimensional matrix. In the current true value matrix, only the point with the coordinate of (3,1,6) has a value of 1, and the values of other points in the current true value matrix are all 0.
[0138] If the current word sequence contains more than one correct relation combination, the number of non-zero elements in the corresponding true value matrix is also greater than 1. The number of elements with a value of 1 in the true value matrix must be much smaller than the number of elements with a value of 0.
[0139] At the same time, we unify the length of each word sequence to achieve the purpose of making the real value matrix of the same size, which is easier to calculate.
[0140] Because the second loss function used in the present invention not only calculates the loss function based on the label prediction value and the label true value, but also uses the true value matrix to replace each set in the calculation process. The special element assignment of the true value matrix makes it unnecessary to transfer the entire matrix during the calculation process. Only the coordinates with all values of 1 need to be transferred. While ensuring the auxiliary optimization effect, the amount of data that needs to be transferred is greatly reduced, the calculation pressure of the GPU is greatly reduced, and the calculation speed is improved. Furthermore, while ensuring the training effect, the training efficiency of the core parsing module is also improved.
[0141] The training of the independent parsing module includes the following:
[0142] The independent parsing module is the third BERT model; after selecting several independent blocks, the independent entities and corresponding independent entity labels in each independent block are manually marked and used as the independent parsing module training set. The independent parsing module training set is used to train the independent parsing module to extract independent entities and perform labeling.
[0143] The trained independent parsing module extracts independent entities from each independent block and labels the independent entities, and then sends them to the integration module as the third parsing data.
[0144] Independent entity labels such as project number, project name, bid opening date, bid deadline, etc.
[0145] A large number of independent entities exist in independent blocks, and a small number of independent entities also exist in core blocks. These independent entities are often extracted by the core parsing blocks to form bidding data.
[0146] In the prior art, technicians manually parse the bidding documents to obtain the core information of the corresponding bidding documents. The core information is composed of several keywords and the corresponding keyword answers. For example, in a bid candidate announcement, the keywords of the core information include "first bid candidate", "second bid candidate", "third bid candidate", and the corresponding keyword answers are "Company 1", "Company 2", "Company 3". In the long-term bidding work, the technicians have summarized the keywords in the core information of various bidding documents into a core information dictionary.
[0147] In the present invention, all information outputted from the table parsing module to the integration module is the first parsing data, so the first parsing data of a bidding document also includes many pieces of data, and the same is true for the second parsing data and the third parsing data.
[0148] The integration module integrates the received first parsed data, the second parsed data and the third parsed data according to the core information dictionary to obtain and output the core information of the current bidding document, and further includes the following sub-steps:
[0149] Step 41, the keywords in the core information dictionary include two categories: main table keywords and sub-table keywords. The integration module extracts the corresponding parsed data based on the main table keywords in the order of priority of the second parsed data, the third parsed data, and the first parsed data to form the core information main table of the current bidding document; at the same time, the integration module extracts the corresponding parsed data based on the sub-table keywords in the order of priority of the second parsed data and the first parsed data to form the core information sub-table of the current bidding document.
[0150] The integration module will not extract more than two parsed data based on the same main table keyword to form a core information main table; similarly, the integration module will not extract more than two parsed data based on the same sub-table keyword to form a core information sub-table.
[0151] The main table keywords include: project name, project number, bidding type, announcement type, procurement method, project region, etc.
[0152] There are two types of sub-table keywords, namely, product sub-table keywords and party sub-table keywords. Product sub-table keywords include the name of the subject matter, specifications, quantity, winning bid price, unit of amount, etc.; party sub-table keywords include party type code, party type, party name, organization code, contact person, contact number, contact address, etc.
[0153] The core information main table contains the core overview information of the bidding document, while the core information sub-table contains the core detailed information of the bidding document. The core information finally obtained from a bidding document includes a core information main table and at least one core information sub-table. All sub-table keywords in a core information sub-table are product sub-table keywords or party sub-table keywords.
[0154] The core information main table contains at least one keyword answer that is the same as the core information sub-table. For example, in an announcement of successful bidders, there is a core information main table and four core information sub-tables. The main table keywords in the core information main table include "first successful bidder", "second successful bidder", and "third successful bidder", and the corresponding keyword answers are "Company 1", "Company 2", and "Company 3"; the four core information sub-tables include three party sub-tables (i.e., Company 1 information table, Company 2 information table, and Company 3 information table) and one product sub-table (i.e., subject matter information table). Taking the Company 1 information table as an example: the keyword answer corresponding to the sub-table keyword "party name" in the Company 1 information table is "Company 1".
[0155] In step 41, the integration module extracts the corresponding parsed data according to the keyword, and determines whether a certain keyword exists in a parsed data by regular expression. If so, the parsed data is the parsed data corresponding to the current keyword. After the parsed data is extracted, it constitutes the content of the core information main table or the core information subtable with the corresponding keyword. Because the bidding documents come from a wide range of sources, a certain keyword in the core information dictionary may be expressed differently in the parsed data of different bidding documents. The present invention determines whether a certain keyword exists in a parsed data by regular expression. If so, the corresponding keyword answer must exist in the parsed data.
[0156] Step 42, the integration module normalizes the contents in the core information main table and the core information sub-table and outputs them as the core information of the current bidding document.
[0157] An example of "the integration module normalizes the contents of the core information main table and the core information sub-table" is given below: the region to which the project belongs in the core information main table was "a certain district in a certain city" before normalization, and after normalization by the integration module, the address is "a certain district in a certain city in a certain province", so that when the technical staff subsequently searches for the bidding documents of companies with addresses in "a certain district in a certain city", there will be no omissions. That is, the integration module standardizes the contents of the core information main table and the core information sub-table in terms of expression, making it easier for the technical staff to further screen based on the core information.
[0158] "Content standardization" also includes standardizing the expressions of dates, amounts, etc.
[0159] After many experiments, the technicians of the present invention continuously adjusted the parsing data extraction priority of the core information main table / core information sub-table, and finally found that the core information main table obtained according to the extraction priority described in step 41 is not only fast but also highly accurate.
[0160] In step 41, based on the main table keyword, first extract the corresponding parsed data from the second parsed data of the current bidding document to form the core information main table of the current bidding document, then extract the corresponding parsed data from the third parsed data of the current bidding document to form the core information main table of the current bidding document, and finally extract the corresponding parsed data from the first parsed data of the current bidding document to form the core information main table of the current bidding document. If a main table keyword corresponds to 2 second parsed data and 3 third parsed data at the same time, the integration module will not extract other parsed data after extracting 1 second parsed data as the corresponding parsed data of the main table keyword, and the integration module will only extract 1 corresponding parsed data based on one main table keyword.
[0161] The summary information used to form the core information main table exists in a large amount in the independent block, and in a small amount in the core block and the effective table, but the expression of the same summary information in the core block may be more detailed and accurate than that in the independent block, so the priority of extracting the parsed data constituting the core information main table in the present invention can not only ensure that when a certain main table keyword exists in the independent block and the core block at the same time, the integration module gives priority to the relevant information of the main table keyword in the core block, and only when the main table keyword does not exist in the core block, the integration module will use the relevant information of the main table keyword in the independent block to supplement the construction of the core information main table, if the main table keyword does not exist in the independent block, the integration module will use the relevant information of the main table keyword in the effective table to supplement the construction of the core information main table, if the main table keyword does not exist in the effective table, then the main table keyword will not become the content of the core information main table of the current bidding document. At the same time, the integration module will only extract 1 corresponding parsed data based on a main table keyword to form the core information main table, avoiding the conflict when there are multiple parsed data with the same extraction priority for 1 main table keyword, and also avoiding the repeated processing of data and the waste of computing resources.
[0162] In step 41, based on the sub-table keywords, firstly extract the corresponding parsed data from the second parsed data of the current bidding document to form the core information sub-table of the current bidding document, and then extract the corresponding parsed data from the first parsed data of the current bidding document to form the core information sub-table of the current bidding document. The integration module will only extract one corresponding parsed data based on one sub-table keyword.
[0163] A large amount of detailed information used to form the core information sub-table exists in the core block, and a small amount exists in the valid table. Therefore, the extraction priority of the parsed data constituting the core information sub-table in the present invention is based on the second parsed data as the main one, and the first parsed data as the supplement. At the same time, the integration module will only extract one corresponding parsed data based on a main table keyword to form the core information sub-table, avoiding conflicts when there are multiple parsed data with the same extraction priority for one sub-table keyword, and also avoiding repeated processing of data and waste of computing resources.
[0164] In the process of processing data, the classification module, table parsing module, core parsing module and independent parsing module will pad the data to the set length if the length of a data is less than or equal to the set length; if the length of a data exceeds the set length, the data will be split.
[0165] The specific operations of each module in processing data have been described in detail in each step above, so I will not repeat them here. It should be emphasized that when processing data: the BERT model in the classification module, core parsing module, and independent parsing module encodes line by line rather than word by word, so each module will impose stricter restrictions on the length of a piece of data during data processing.
[0166] The segmentation method includes the following contents: let the length of the current data be ω, set the length to be L, and the overlapping length to be λ, 0<λ<L<ω, and the current data is segmented for the first time at the set length L to obtain two segments, then the first segment is the content contained in the 1st character to the Lth character in the current data, and the second segment is the content contained in the (L-λ)th character to the ωth character in the current data, if (ω-L+λ)>L, then repeat the aforementioned segmentation method to continue segmenting the second segment of the current data. In the present invention, once a piece of data is segmented, each segmented segment overlaps with the previous segment by λ characters, so the beginning of each segment belonging to the same super-long data will not be semantically incomplete due to segmentation, which will not only improve the efficiency of the classification module, the table parsing module, the core parsing module, and the independent parsing module in processing super-long data, but also ensure the accuracy of each module in processing super-long data.
[0167] In this embodiment, L is 512 characters and λ is 2 characters.
[0168] In two adjacent segments after segmentation, if the label prediction results for the overlapping character parts are different, the label prediction result of the segment ending with the overlapping character part shall prevail.
[0169] The information parsing method for bidding documents of the present invention is used to parse randomly selected bidding documents, and the results of 10,000 random sampling tests are displayed based on the high-quality, multiple-reviewed manual inspection results;
[0170] (1) The types of bidding documents randomly selected are diverse. The classification accuracy of the classification module of the present invention reaches 95.3%, and the accuracy of the second analysis data output by the core analysis module and the third analysis data output by the independent analysis module are both above 90%; among the core information obtained based on each bidding document, the accuracy of the core information main table is about 92%, and the accuracy of the core information sub-table is about 82%. The accuracy of the core information obtained by manual analysis by 10 people is about 88%. The accuracy of the core information analyzed by the present invention is similar to that of the manual analysis in the prior art, and compared with the manual analysis with strong subjectivity, the accuracy of the core information obtained by the trained information analysis system in the present invention is relatively stable and will not fluctuate. That is, the present invention can maintain a stable and high accuracy of information analysis for different types of bidding documents, and basically does not miss the core information.
[0171] (2) The present invention converts HTML formatted pre-processed data (one pre-processed data corresponds to one bidding document) into core information at a processing speed of 6.5 pieces / second, and supports the analysis of more than 400,000 bidding documents per day. The production capacity of the manual analysis control group consisting of 10 people is only nearly 1,000 copies. That is, the analysis speed of the present invention is much higher than the manual analysis in the prior art, the analysis efficiency is high and the labor cost is greatly saved. It perfectly copes with the massive bidding documents generated in large-scale bidding activities and can better serve large-scale bidding activities.
[0172] From the above analysis, it can be seen that the information parsing method of a bidding document of the present invention, that is, no matter what the type of bidding document is, divides the content of the bidding document into three categories: valid tables, core blocks and independent blocks, and then classifies and simplifies the valid tables, core blocks and independent blocks (that is, extracts the relationship combination in the core blocks, extracts the independent entities in the independent blocks and labels them), and finally, according to the core information dictionary, the simplified first parsed data, the second parsed data and the third parsed data are extracted according to different extraction priorities, that is, the parsed data is further screened to form a core information main table and a core information sub-table. That is, the present invention can accurately and efficiently parse information of different types of bidding documents, and output the most concise and core information without missing out on core information, with high versatility; furthermore, the present invention parses each bidding document into a core information main table (including the core overview information of the current bidding document) and one or more core information sub-tables (including the core detail information of the current bidding document), so that the presentation of core information is more structured, which not only facilitates technical personnel to view specific bidding information, but also makes it more convenient for technical personnel to conduct subsequent market analysis, analyze the core competitiveness of the enterprise itself, understand the development trend of the industry, and thus adjust the industrial structure and realize industrial upgrading.
[0173] The techniques, shapes, and structural parts not described in detail in the present invention are all well-known techniques.
[0174] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for analyzing information of bidding documents, characterized in that: The following steps are involved: S1, after obtaining the newly added bidding documents, send them to the pre-processing module; S2, the preprocessing module outputs the corresponding preprocessed data to the classification module; S3, the classification module divides the content of the current pre-processed data into valid tables, core blocks and independent blocks, and sends them to the table parsing module, the core parsing module and the independent parsing module respectively; S4, the table parsing module, the core parsing module, and the independent parsing module respectively output the first parsing data, the second parsing data, and the third parsing data to the integration module for integration to obtain core information and output it.
2. The information parsing method of a bidding document according to claim 1, characterized in that: S2 also includes the following sub-steps: S21, the pre-processing module first cleans a newly added bidding document and removes irrelevant characters, and then converts it into a standard file of a set format; S22, the preprocessing module separates the tables in the current standard file to obtain preprocessed data: that is, a unique table number is used to replace the corresponding table in the current standard file, and the table number occupies a single line. At the same time, the table content is converted into a string and bound to the corresponding table number.
3. The information parsing method of a bidding document according to claim 1, characterized in that: The following are also included in S3: The classification module sends the rows corresponding to the valid table, the rows corresponding to the core block, and the rows corresponding to the independent block to the table parsing module, the core parsing module, and the independent parsing module respectively.
4. The information parsing method of a bidding document according to claim 3 is characterized in that: Training the classification module consists of the following steps: Step 1a, obtain i bidding documents and send them into the preprocessing module, after obtaining i corresponding preprocessed data, divide the i preprocessed data into f groups of preprocessed data, f is an integer greater than 2, the first group of preprocessed data includes M1 preprocessed data, the second group of preprocessed data includes M2 preprocessed data, ..., the fth group of preprocessed data includes M f preprocessed data, where M1+M2+…+M f =i and M1≤M2≤…≤M f ; Step 2a, after manually labeling the content in the first group of preprocessed data by row, a first training set T1 containing M1 training data is obtained, and the labeled labels include valid tables, core blocks, and independent blocks; Step 3a, using the first training set T1 to perform several rounds of training and parameter optimization on the classification module: after each round of training, the first loss function is calculated once, and the parameters in the classification module are optimized in the direction of the gradient descent of the first loss function, and then the next round of training is performed; one round of training means that the classification module is trained once using each training data in the current training set; The classification module includes a first BERT model, a first BiLSTM model, a fully connected layer, and a first loss function calculation unit. When the training data in the first training set T1 enters the first BERT model, the first BERT model will segment and encode the current training data to obtain a word sequence corresponding to the current training data. The first BERT model captures the contextual features of each word in the current word sequence and sends them together with the current word sequence into the first BiLSTM model. The first BiLSTM model captures the long-distance dependency in the current word sequence and outputs it to the fully connected layer. The Softmax activation function in the fully connected layer calculates the label of the current row according to the long-distance dependency captured by the first BiLSTM model. The first loss function calculation unit uses the label output by the fully connected layer as input to calculate the first loss function. Step 4a, using the second set of preprocessed data as the input of the current classification module, obtaining label annotations for each line of the M2 preprocessed data, manually verifying that the labels for each line of the M2 preprocessed data are correct, obtaining M2 training data, and aggregating the M2 training data with the M1 training data in the first training set T1 into a second training set T2; Step 5a, using the second training set T2 to perform several rounds of training and parameter optimization on the classification module: after each round of training, the first loss function is calculated once, and the parameters in the classification module are optimized in the direction of the gradient descent of the first loss function before the next round of training; When f≥3, the next set of preprocessed data is used as the input of the current classification module to obtain the label annotation of each line of the next set of preprocessed data. After manually verifying that the label of each line of the next set of preprocessed data is correct, it is aggregated into a new training set with the training data in the previous training set. The new training set is used to perform several rounds of training and parameter optimization on the classification module until the fth training set Tf is used to complete several rounds of training and parameter optimization of the classification module.
5. According to the information parsing method of bidding documents as described in claim 3, it is characterized in that: S4 also includes the following: the table parsing module outputs the string corresponding to the table number as the first parsing data to the integration module according to the table number of the row where the valid table is located; the core parsing module extracts the relationship combination from the core block, and outputs the relationship combination whose score meets the output condition as the second parsing data to the integration module; The independent parsing module extracts independent entities from independent blocks, labels them, and outputs them as third parsing data to the integration module; the integration module integrates the first parsing data, the second parsing data, and the third parsing data according to the core information dictionary to obtain the core information of the current bidding document and output it.
6. A method for analyzing information in bidding documents according to claim 4 or 5, characterized in that: Training the core parsing module consists of the following steps: Step 1b, sending j pieces of pre-processed data to the classification module to obtain j corresponding core block sets, each of which contains more than one core block; Step 2b: divide the j core block sets into n groups of pre-processing sets, where n is an integer greater than 2, the first group of pre-processing sets includes Y1 core block sets, the second group of pre-processing sets includes Y2 core block sets, ..., the nth group of pre-processing sets includes Y n A set of core blocks, where Y1+Y2+…+Y n =j and Y1≤Y2≤…≤Y n ; Step 3b, manually annotating the bidding data in each core block in the first preprocessing set to form the first verification set V1, the bidding data includes two types of data: party data and subject data, both of which include subject, object and relationship type; Step 4b, taking the first group of preprocessing sets and the first validation set V1 as the first set, and performing several rounds of training and parameter optimization on the core parsing module: the first group of preprocessing sets is the training set of the first set, the first validation set V1 is the validation set of the first set, the training set of the first set is input into the core parsing module, after the core parsing module predicts the bidding data in each core block, the second loss function is calculated once based on the validation set of the first set, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function, and then the next round of training is performed; The core parsing module includes a second BERT model, a second GPLinker model and a second loss function calculation unit. When each core block in the first preprocessing set enters the second BERT model in the core parsing module, the second BERT model performs word segmentation and encoding on each core block to obtain a word sequence corresponding to the current core block. The second BERT model captures the contextual features of each word in the current word sequence and sends them together with the current word sequence into the second GPLinker model. The second GPLinker model extracts all subjects, objects and relationship types in the current word sequence, and then scores the relationship combinations formed by each subject, object and relationship type. The relationship combinations whose scores meet the output conditions are output as the bidding data in the current core block to the second loss function calculation unit. The second loss function calculation unit calculates the second loss function based on the bidding data in the current core block and the first verification set V1. The output conditions are: Where p represents the type of relation that the second GPLinker model will extract from the word sequence; (S h ,S t ) represents the subject, S h and S t Respectively represent the starting position and the ending position of the subject; (O h ,O t ) represents the object, O h and O t Respectively represent the starting position and ending position of the object; Score(·) represents the scoring by the second GPLinker model; Score((S h , O h )|p) means that under the condition of relationship type p, the starting position of the subject is S h And the object's starting position is O h When , the second GPLinker model is scored; Score((S t , O t )|p) means that under the condition of relationship type p, the subject ends at S t And the object end position is O t When , the second GPLinker model is scored; Step 5b, taking the second set of preprocessed data sets as the input of the current core parsing module, and performing the first round of training. After the core parsing module predicts the bidding data in each core block in the first round of training, the bidding data corresponding to the bidding data in each core block is manually verified to be correct to obtain the second verification set V2, and then the second loss function is calculated once based on the second verification set V2, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function; The second set of preprocessed data sets and the first set of preprocessed data sets are aggregated into a training set of the second set, the first verification set V1 and the second verification set V2 are aggregated into a verification set of the second set, and the training set of the second set is input into the core parsing module. After the core parsing module predicts the bidding data in each core block, the second loss function is calculated once based on the verification set of the second set, and the parameters in the core parsing module are optimized in the direction of the gradient descent of the second loss function before the next round of training is carried out; When n≥3, repeat step 5b, obtain the next set of validation sets based on the next set of preprocessed data, combine them with the previous set to form a new set, and use the new set to perform several rounds of training and parameter optimization on the classification module until the nth set is used to complete several rounds of training and parameter optimization of the core parsing module.
7. The information parsing method of bidding documents according to claim 6, characterized in that: The second loss function includes four dimensions: Among them, Loss2 1 Represents the second loss function on the first dimension, Loss2 2 Represents the second loss function on the second dimension, Loss2 3 Represents the second loss function in the third dimension, Loss2 4 represents the second loss function on the fourth dimension; in the current word sequence, a correct relationship combination obtained by manual verification is recorded as (S h *,S t *,p*,O h *,O t *), the set of all possible subject start positions and all possible subject end positions in the current word sequence is recorded as N 1 , will (S h *,S t *) is recorded as set R 1 , R 1 ∈N 1 ; The set consisting of all possible object start positions and all possible object end positions in the current word sequence is recorded as N 2 , will (O h *,O t *) is recorded as set R 2 , R 2 ∈N 2 ; The set consisting of all possible subject starting positions, all possible object starting positions and all relationship types in the current word sequence is recorded as N 3 , will ((S h *,O h *)|p) is recorded as set R 3 , R 3 ∈N 3 ; The set consisting of all possible subject ending positions, all possible object ending positions and all relationship types in the current word sequence is recorded as N 4 , will ((S t *,O t *)|p) is recorded as set R 4 , R 4 ∈N 4 .
8. The information parsing method for bidding documents according to claim 6, characterized in that: The training of the independent parsing module includes the following contents: the independent parsing module is the third BERT model; after selecting several independent blocks, the independent entities and corresponding independent entity labels in each independent block are manually marked and used as the independent parsing module training set, and the independent parsing module training set is used to train the independent parsing module to extract independent entities and label them.
9. The method for analyzing information of bidding documents according to claim 8, characterized in that: In the trained classification module, after the fully connected layer calculates the label of the current row, the corresponding row is output to the corresponding table parsing module, the trained core parsing module, and the trained independent parsing module according to different labels; In the trained core parsing module, the second GPLinker model uses the relationship combination whose scores meet the output condition as the second parsing data output by the current core parsing module and outputs it to the integration module; The trained independent parsing module extracts independent entities from each independent block and labels the independent entities, and then outputs them to the integration module as the third parsing data.
10. The information parsing method of bidding documents according to claim 9, characterized in that: The integration module outputs the core information of the current bidding document and also includes the following steps: Step 41, the keywords in the core information dictionary include two categories: main table keywords and sub-table keywords. The integration module extracts the corresponding parsed data based on the main table keywords in the order of priority of the second parsed data, the third parsed data, and the first parsed data to form the core information main table of the current bidding document; at the same time, the integration module extracts the corresponding parsed data based on the sub-table keywords in the order of priority of the second parsed data and the first parsed data to form the core information sub-table of the current bidding document; Step 42, the integration module normalizes the contents in the core information main table and the core information sub-table and outputs them as the core information of the current bidding document.
Citation Information
Patent Citations
Bidding document review analysis method based on regional processing
CN112613285A
Bid invitation file analysis table extraction method
CN115906763A
Intelligent labeling and extracting method for PDF (Portable Document Format) document
CN116070602A
Local form file intelligent analysis method based on grassroots governance
CN116842919A
Bidding participation information extraction method and device, equipment and medium
CN117391086A
Cited By
Cross-modal collaborative analysis method based on multi-modal bid invitation file
CN121579422A
A cross-modal collaborative analysis method based on a multi-modal bidding document
CN121579422B