A text recognition method and system for a tender document
By extracting word vectors and image evidence information from the tender documents to generate a display page, the problem of low efficiency and difficulty in comparison in the traditional tender document review process is solved, and fast and accurate document comparison and review are achieved.
Patent Information
- Application Number
- CN202411101294.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Traditional tender document review processes are inefficient and make it difficult to quickly compare and comprehensively analyze documents, which may lead to inconsistencies in review results or omission of important clauses.
By searching information documents in the tender documents, extracting word vectors and image evidence information, and generating display pages using a preset display layout, the system can classify and identify tender documents and perform rapid cross-document comparison.
This improved the efficiency of reviewing bidding documents, ensured the accuracy and fairness of the review process, reduced review time, and enhanced transparency.
Smart Images

Figure CN118823812B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of tender document identification, in particular to a text recognition method and system for tender documents. BACKGROUND
[0002] In the tender process, the preparation and review of tender documents are key steps to ensure fair competition and compliance. Tender documents usually include various types of documents, such as technical specifications, commercial terms, contract conditions, drawings, bill of quantities, etc. These documents together constitute the comprehensive requirements of the tender project, which are crucial for the preparation of bidders and the evaluation of the evaluation committee.
[0003] However, the traditional tender document review process has some problems in efficiency and accuracy. Due to the large number of file types, the back-end staff often needs to open each file one by one for review when reviewing, which not only consumes time and effort, but also makes it difficult to quickly compare and analyze the files. In addition, due to the lack of centralized review platform, the reviewer may miss the associated information between files, resulting in inconsistency of the evaluation results or omission of important terms.
[0004] In order to improve the efficiency and accuracy of tender document review, a technical solution is needed that can support centralized display, comparison and review of multiple file types. Such a solution should allow reviewers to view all relevant files in a unified interface, easily compare across files, and quickly identify potential inconsistencies and problem points. In this way, review time can be greatly reduced, review quality can be improved, and the fairness and transparency of the tender process can be ensured. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a text recognition method and system for tender documents, which can improve the review efficiency of tender documents.
[0006] In order to achieve the above-mentioned purpose, the embodiments of the present application provide a text recognition method for tender documents, comprising:
[0007] Obtaining a tender document to be identified;
[0008] Searching for information documents in the tender document based on a preset label;
[0009] Iterating through each information document to determine the word vector and image of each information document;
[0010] Extracting the text information corresponding to the word vector and the proof information corresponding to the image;
[0011] Generating a display page according to a preset display layout using the text information and the proof information.
[0012] Optionally, the tender document to be identified is acquired, including:
[0013] A compressed file of the tender document is acquired.
[0014] The compressed file is decompressed.
[0015] The decompressed file is read according to a preset naming rule.
[0016] Optionally, information documents are searched in the tender document based on a preset label, including:
[0017] Index labels and corresponding page numbers of the tender document are read.
[0018] The preset label is compared with the index labels to obtain a label comparison result.
[0019] The information documents are determined according to page numbers corresponding to the label comparison result.
[0020] Optionally, the text information corresponding to the word vector and the proof information corresponding to the image are extracted, including:
[0021] The text information is acquired by using a Spire.Doc for Python tool.
[0022] The title vector, the label vector and the content vector in the text information are read respectively by using a word recognition model.
[0023] Optionally, the title vector, the label vector and the content vector in the text information are read respectively by using a word recognition model, including:
[0024] The title vector is acquired in the text information by using a preset keyword library.
[0025] The label vector in the text information is determined by using a first word vector model.
[0026] The content vector in the text information is determined by using a second word vector model.
[0027] Whether the text information is incorrect is judged according to the label vector and the content vector.
[0028] In a case where the text information is determined to be correct, the title vector, the label vector and the content vector are determined to be correct.
[0029] Optionally, the text information corresponding to the word vector and the proof information corresponding to the image are extracted, including:
[0030] inputting the image into a preset image recognition model to obtain an image label corresponding to the image;
[0031] determining a label vector corresponding to the image according to a location where the image is located;
[0032] comparing the label vector and the image label to determine whether the image is incorrect;
[0033] in a case where it is determined that the image is correct, associating the image with the corresponding label vector.
[0034] Optionally, the text information and the proof information are used to generate a display page according to a preset display layout, including:
[0035] displaying feature keywords corresponding to the title vector, the label vector, and the content vector on one side of the display page;
[0036] displaying the image on the other side of the display page at the same height according to the association relationship between the image and the corresponding label vector.
[0037] Optionally, the first word vector model includes:
[0038] a first word embedding layer configured to perform a word vector embedding operation;
[0039] a first convolutional layer, a first end of the first convolutional layer being connected to the first word embedding layer;
[0040] a first pooling layer, one end of the first pooling layer being connected to a second end of the first convolutional layer;
[0041] a first lstm layer, one end of the first lstm layer being connected to the other end of the first pooling layer;
[0042] a first Dropout layer, one end of the first Dropout layer being connected to the other end of the first lstm layer;
[0043] a first fully connected layer, one end of the first fully connected layer being connected to the other end of the first Dropout layer;
[0044] a second convolutional layer, one end of the second convolutional layer being connected to a third end of the first convolutional layer;
[0045] a second pooling layer, one end of the second pooling layer being connected to the other end of the second convolutional layer;
[0046] a second lstm layer, one end of the second lstm layer being connected to the other end of the second pooling layer;
[0047] a second dropout layer, one end of the second dropout layer being connected with another end of the second lstm layer;
[0048] a second full connection layer, one end of the second full connection layer being connected with another end of the second dropout layer;
[0049] a first output layer, connected with another end of the first full connection layer and another end of the second full connection layer, for outputting a classification result of a label vector.
[0050] Optionally, the second word vector model comprises:
[0051] a third word embedding layer, for performing a word vector embedding operation;
[0052] a third convolutional layer, a first end of the third convolutional layer being connected with the third word embedding layer;
[0053] a third pooling layer, one end of the third pooling layer being connected with a second end of the third convolutional layer;
[0054] a fourth convolutional layer, one end of the fourth convolutional layer being connected with a third end of the third convolutional layer;
[0055] a fourth pooling layer, a first end of the fourth pooling layer being connected with another end of the fourth convolutional layer;
[0056] a first concatenation layer, a first end of the first concatenation layer being connected with another end of the third pooling layer, and a second end of the first concatenation layer being connected with a second end of the fourth pooling layer;
[0057] a first rnn layer, one end of the first rnn layer being connected with a third end of the first concatenation layer;
[0058] a third dropout layer, one end of the third dropout layer being connected with one end of the first rnn layer;
[0059] a third full connection layer, one end of the third full connection layer being connected with another end of the third dropout layer;
[0060] a third lstm layer, one end of the third lstm layer being connected with a third end of the fourth pooling layer;
[0061] a fourth dropout layer, one end of the fourth dropout layer being connected with another end of the third lstm layer;
[0062] a fourth full connection layer, one end of the fourth full connection layer being connected with another end of the fourth dropout layer;
[0063] a fourth word embedding layer configured to perform a word vector embedding operation;
[0064] a fifth convolutional layer having a first end connected to the fourth word embedding layer;
[0065] a fifth pooling layer having a first end connected to a second end of the fifth convolutional layer;
[0066] a sixth convolutional layer having one end connected to a third end of the fifth convolutional layer;
[0067] a sixth pooling layer having one end connected to another end of the sixth convolutional layer;
[0068] a second concatenation layer having a first end connected to a second end of the fifth pooling layer and a second end connected to another end of the sixth pooling layer;
[0069] a second rnn layer having one end connected to a third end of the fifth pooling layer;
[0070] a fifth Dropout layer having one end connected to another end of the second rnn layer;
[0071] a fifth fully connected layer having one end connected to another end of the fifth Dropout layer;
[0072] a fourth LSTM layer having one end connected to a third end of the second concatenation layer;
[0073] a sixth Dropout layer having one end connected to another end of the fourth LSTM layer;
[0074] a sixth fully connected layer having one end connected to another end of the sixth Dropout layer;
[0075] a second output layer connected to the third fully connected layer, the fourth fully connected layer, the fifth fully connected layer, the sixth fully connected layer, and configured to output a classification result of the content vector.
[0076] In another aspect, the present application also provides a text recognition system for a tender document, the recognition system comprising a processor configured to perform the text recognition method according to any one of the above.
[0077] By means of the technical scheme, the embodiment of the present application provides a text recognition method and system for a bidding document, which searches information documents containing different types of information in the bidding document through the label, so as to complete the classification of each document in the bidding document, and then realizes the classification recognition of the bidding document through the extraction of word vectors and the extraction of image proof information of each information document. Compared with the prior art, the text recognition method and system provided by the present application recognize each information document in the bidding document respectively, and simultaneously extract word vectors and proof information, which overcomes the technical defects of the unified document arrangement method of the prior art, and improves the recognition efficiency of the bidding document.
[0078] Other features and advantages of the present application will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0079] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used to explain the embodiments of the present application together with the following specific embodiments, but do not constitute a limitation on the embodiments of the present application. In the drawings:
[0080] Figure 1 is a flowchart of a text recognition method for a bidding document according to an embodiment of the present application;
[0081] Figure 2 is an example diagram of an index label and a page number according to an embodiment of the present application;
[0082] Figure 3 is a flowchart of a method for obtaining the title vector, the label vector and the content vector according to an embodiment of the present application;
[0083] Figure 4 is a structural block diagram of a first word vector model according to an embodiment of the present application;
[0084] Figure 5 is a structural block diagram of a second word vector model according to an embodiment of the present application;
[0085] Figure 6 is a flowchart of a method for determining the association relationship of the image and the label vector according to an embodiment of the present application. DETAILED DESCRIPTION
[0086] The specific embodiments of the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application.
[0087] As Figure 1 shown is a flow chart of a text recognition method for a tender document according to an embodiment of the present application. In this Figure 1 , the text recognition method can include the following steps:
[0088] In step S10, a tender document to be recognized is acquired;
[0089] In step S11, information documents are searched in the tender document based on preset labels;
[0090] In step S12, each information document is traversed to determine a word vector and an image of each information document;
[0091] In step S13, text information corresponding to the word vector and proof information corresponding to the image are extracted;
[0092] In step S14, a display page is generated according to a preset display layout using the text information and the proof information.
[0093] In the text recognition method as Figure 1 shown, step S10 can be used to acquire a tender document (or a bid document) to be recognized, so as to preliminarily read the tender document. Further, considering that the packaged document of the tender document is generally in the file format of a compressed package or a compressed file, in this embodiment, the step S10 can be to first acquire a compressed file of the tender document, then decompress the compressed file, and finally read the decompressed file according to a preset naming rule.
[0094] Step S11 can be to search information documents in the tender document based on preset labels. The labels can be titles or names of the preset information documents, and the information documents can be files used to represent contents of different parts of the tender document. For example, in the case where the tender document includes procurement documents, business documents, technical reports, etc., the procurement documents, business documents, technical reports, etc. can be used as separate information documents.
[0095] For the specific method of searching the information documents in step S11, in an example of the present application, the index labels and corresponding page numbers of the tender document can be first read, then the preset labels are compared with the index labels to obtain a label comparison result, and finally the information documents are determined according to the page numbers corresponding to the label comparison result. An example of the index labels and page numbers is shown in Figure 2 . In this Figure 2 , the title texts on the left are index labels, and the page numbers on the right are corresponding page numbers.
[0096] Step S12 can be used to traverse each information document to determine the word vector and image of each information document. In this embodiment, since the information document includes text, tables, images and other content, the information in the information document cannot be directly read by the semantic model at this time, so the word vector and image in each information document need to be determined first through this step S12. Among them, the table will be converted into an image in most bidding documents, so for table information, it can be classified as an image in this step S12.
[0097] Step S13 can be used to extract the text information corresponding to the word vector and the proof information corresponding to the image. Specifically, in this embodiment, for this step S13, the Spire. Doc for Python tool can be used to obtain the text information first, and then the word recognition model is used to read the title vector, label vector and content vector in the text information respectively. Among them, the title vector can be used to represent the title in the text information, which is used to divide the text information into several parts, and the label vector can be used to represent the sub-title in the text information, which is used to further divide the several parts. The content vector can be used to represent the semantic information of the divided text. For the specific method of obtaining the title vector, label vector and content vector, although it can be in various forms known to those skilled in the art. But considering that the title vector is specified in the public bidding announcement, it can be directly obtained in the form of a keyword library. The label vector and the content vector are both proposed by the supplier, and it is difficult to obtain them directly in the form of a keyword library, so it is necessary to obtain them through a semantic model. Specifically, in one example of the present application, the title vector, label vector and content vector can be obtained by using the method shown in the Figure 3 In this Figure 3 The step S13 can further include the following steps:
[0098] In step S20, the title vector is obtained in the text information through the preset keyword library;
[0099] In step S21, the label vector in the text information is determined by the first word vector model;
[0100] In step S22, the content vector in the text information is determined by the second word vector model;
[0101] In step S23, it is judged whether the text information is incorrect according to the label vector and the content vector;
[0102] In step S24, in the case where it is judged that the text information is correct, it is determined that the title vector, the label vector and the content vector are correct.
[0103] In the like Figure 3In the method shown, step S21 can be used to determine the tag vector in the text information using a first word vector model. Considering that the text corresponding to the tag vector is a relatively simple keyword or keyword group, a lightweight semantic model can be used for recognition. In this example, the structure of the first word vector model can be as follows: Figure 4 As shown. In this Figure 4 The first word vector model may include a first word embedding layer, a first convolutional layer, a first pooling layer, a first LSTM (Long Short-Term Memory) layer, a first Dropout layer, a first fully connected layer, a second convolutional layer, a second pooling layer, a second LSTM layer, a second Dropout layer, a second fully connected layer, and a first output layer. The first word embedding layer is used for word vector embedding operations. One end of the first convolutional layer can be connected to the first word embedding layer. One end of the first pooling layer can be connected to the second end of the first convolutional layer. One end of the first LSTM layer can be connected to the other end of the first pooling layer. One end of the first Dropout layer can be connected to the other end of the first LSTM layer. One end of the first fully connected layer can be connected to the other end of the first Dropout layer. One end of the second convolutional layer can be connected to the third end of the first convolutional layer. One end of the second pooling layer can be connected to the other end of the second convolutional layer. One end of the second LSTM layer can be connected to the other end of the second pooling layer. One end of the second Dropout layer can be connected to the other end of the second LSTM layer. One end of the second fully connected layer can be connected to the other end of the second Dropout layer. The first output layer can be connected to the other ends of the first fully connected layer and the second fully connected layer, and is used to output the classification result of the label vector.
[0104] Step S22 can be used to determine the content vector in the text information using the second word vector model. Considering that the text corresponding to this content vector is a continuous paragraph, a more complex semantic model is needed for recognition. In this example, the structure of the second word vector model can be as follows: Figure 5 As shown. In this Figure 5 In this second word vector model, the third word embedding layer, the third convolutional layer, the third pooling layer, the fourth convolutional layer, the fourth pooling layer, the first concatenation layer, the first RNN (Convolutional Neural Networks) layer, the third Dropout layer, the third fully connected layer, the third LSTM layer, the fourth Dropout layer, the fourth fully connected layer, the fourth word embedding layer, the fifth convolutional layer, the fifth pooling layer, the sixth convolutional layer, the sixth pooling layer, the second concatenation layer, the second RNN layer, the fifth Dropout layer, the fifth fully connected layer, the fourth LSTM layer, the sixth Dropout layer, the sixth fully connected layer, and the second output layer.
[0105] The third word embedding layer can be configured to perform word vector embedding operation. A first end of the third convolutional layer can be connected with the third word embedding layer. One end of the third pooling layer can be connected with a second end of the third convolutional layer. One end of the fourth convolutional layer can be connected with a third end of the third convolutional layer. A first end of the fourth pooling layer can be connected with another end of the fourth convolutional layer. A first end of the first concatenation layer can be connected with another end of the third pooling layer, and a second end of the first concatenation layer can be connected with a second end of the fourth pooling layer. One end of the first rnn layer can be connected with a third end of the first concatenation layer. One end of the third Dropout layer can be connected with one end of the first rnn layer. One end of the third fully connected layer can be connected with another end of the third Dropout layer. One end of the third lstm layer can be connected with a third end of the fourth pooling layer. One end of the fourth Dropout layer can be connected with another end of the third lstm layer. One end of the fourth fully connected layer can be connected with another end of the fourth Dropout layer.
[0106] The fourth word embedding layer can be configured to perform word vector embedding operation. A first end of the fifth convolutional layer can be connected with the fourth word embedding layer. A first end of the fifth pooling layer can be connected with a second end of the fifth convolutional layer. One end of the sixth convolutional layer can be connected with a third end of the fifth convolutional layer. One end of the sixth pooling layer can be connected with another end of the sixth convolutional layer. A first end of the second concatenation layer can be connected with a second end of the fifth pooling layer, and a second end of the second concatenation layer can be connected with another end of the sixth pooling layer. One end of the second rnn layer can be connected with a third end of the fifth pooling layer. One end of the fifth Dropout layer can be connected with another end of the second rnn layer. One end of the fifth fully connected layer can be connected with another end of the fifth Dropout layer. One end of the fourth lstm layer can be connected with a third end of the second concatenation layer. One end of the sixth Dropout layer can be connected with another end of the fourth lstm layer. One end of the sixth fully connected layer can be connected with another end of the sixth Dropout layer. The second output layer can be connected with the third fully connected layer, the fourth fully connected layer, the fifth fully connected layer, and the sixth fully connected layer, and configured to output classification results of the content vector.
[0107] Step S23 can be used to determine whether the text information is incorrect according to the label vector and the content vector. In this example, step S23 can be to determine whether the label vector and the content vector are consistent, i.e., whether the text information is incorrect, by first constructing a semantic expression matrix of the label vector and the content vector respectively, and then calculating the Euclidean distance of the two semantic expression matrices. In the case where the Euclidean distance is greater than a preset threshold, it means that the label vector and the content vector are inconsistent, and the text information is incorrect. On the contrary, it means that the label vector and the content vector are consistent, and the text information is correct. In the case where it is determined that the text information is incorrect, it means that there is a text editing error in the bidding document, and at this time it can be confirmed that the bidding document format requirement is unqualified.
[0108] Step S14 can generate a display page according to a preset display layout based on the text information and the proof information, so as to facilitate the operator to compare each text information and the proof information in the image in real time. In order to ensure that the image and the corresponding text are positionally aligned, thereby facilitating viewing, it is necessary to first associate the image and the corresponding text. Therefore, in this embodiment, step S14 can include the steps as shown in FIG. 14. In this embodiment, in step S14, the following steps can be included: Figure 6 Figure 6 In step S14, the following steps can be included:
[0109] In step S30, the image is input into a preset image recognition model to obtain an image label corresponding to the image.
[0110] In step S31, a label vector corresponding to the image is determined according to the position where the image is located.
[0111] In step S32, the label vector and the image label are compared to determine whether the image is incorrect.
[0112] In step S33, in the case where it is determined that the image is correct, the image and the corresponding label vector are associated.
[0113] For the image recognition model in step S30, it can be various network models known to those skilled in the art, or a combination of multiple network models. Among them, considering that the images in the bidding document include various types, such as official seal documents, contract documents, identity proof documents, qualification documents, certificate documents, etc. If a single image recognition model is used, it is difficult to achieve unified high recognition efficiency. Therefore, in one example of the present application, the image recognition model can be a combination of multiple network models. In addition, considering that the combination of multiple network models will affect the response speed of the software, therefore, in another example of the present application, the image recognition model can be a network model based on an OCR algorithm.
[0114] In the case that the image recognition model comprises a network model of an OCR algorithm, step S30 can be to firstly recognize the text in the image by the OCR algorithm, and then compare the image label corresponding to the image by the keyword query method. The keyword query method can be to query by a preset keyword and a keyword library corresponding to the image label.
[0115] As for the case that step S32 judges that the image is incorrect, it means that the bidding document has a problem, which can be prompted to the reviewer in the form of marking errors.
[0116] After obtaining the association between the image and the label vector, step S14 can be to display the aforementioned title vector, label vector and content vector and the image in a layout. The specific method of the layout display can be various forms known to those skilled in the art. In one example of the present application, considering the reading habits of the reviewer, the feature keywords corresponding to the title vector, label vector and content vector can be displayed on one side of the display page, and then the image can be displayed on the other side of the display page at the same height according to the association between the image and the corresponding label vector.
[0117] On the other hand, the present application also provides a text recognition system for a bidding document, which comprises a processor configured to execute the text recognition method as described in any of the above. Specifically, the text recognition method can comprise the following steps:
[0118] In step S10, a bidding document to be recognized is obtained;
[0119] In step S11, information documents are searched in the bidding document based on a preset label;
[0120] In step S12, each information document is traversed to determine the word vector and the image of each information document;
[0121] In step S13, the text information corresponding to the word vector and the proof information corresponding to the image are extracted;
[0122] In step S14, a display page is generated according to a preset display layout using the text information and the proof information.
[0123] In the text recognition method as shown in the above Figure 1 In the text recognition method as shown in the above In the text recognition method as shown in the above
[0124] The step Sll can be searching the information document in the bidding document based on the preset label. The label can be a preset title or name of the information document, and the information document can be a file for representing the content of different parts in the bidding document. For example, when the bidding document includes a procurement document, a business document, a technical report, etc., the procurement document, the business document, the technical report, etc. can be used as separate information documents.
[0125] For the specific method of searching the information document in the step Sll, in an example of the present application, the index label and the corresponding page number of the bidding document can be read first, then the preset label is compared with the index label to obtain a label comparison result, and finally the information document is determined according to the page number corresponding to the label comparison result. For example, as shown in the following table, the left side of the title text is the index label, and the right side of the page number is the corresponding page number. Figure 2 In the table, the left side of the title text is the index label, and the right side of the page number is the corresponding page number. Figure 2
[0126] The step S12 can be used to traverse each information document to determine the word vector and the image of each information document. In the embodiment, since the information document includes text, table, image and other content, the information in the information document cannot be directly read by the semantic model at this time, so the word vector and the image in each information document need to be determined first through the step S12. Since the table is usually converted into an image in most bidding documents, for table information, it can be classified as an image in the step S12.
[0127] The step S13 can be used to extract the text information corresponding to the word vector and the proof information corresponding to the image. Specifically, in the embodiment, for the step S13, the Spire. Doc for Python tool can be used to obtain the text information first, and then the word recognition model is used to read the title vector, the label vector and the content vector in the text information respectively. The title vector can be used to represent the title in the text information, to divide the text information into several parts, the label vector can be used to represent the sub-title in the text information, to further divide the several parts, and the content vector can be used to represent the semantic information of the divided text. For the specific method of obtaining the title vector, the label vector and the content vector, although there are many forms known to those skilled in the art. However, considering that the title vector is specified in the public bidding announcement, it can be directly obtained in the form of a keyword library. The label vector and the content vector are both proposed by the supplier, and it is difficult to obtain them directly in the form of a keyword library, so a semantic model is needed to obtain them. Specifically, in an example of the present application, the word recognition model can be used to read the text information, and the semantic model can be used to read the label vector and the content vector.Figure 3 The title vector, the label vector and the content vector can be obtained by the method shown in the first aspect. Figure 3
[0128] In step S20, the title vector is obtained from the text information by a preset keyword library.
[0129] In step S21, the label vector in the text information is determined by a first word vector model.
[0130] In step S22, the content vector in the text information is determined by a second word vector model.
[0131] In step S23, it is determined whether the text information is correct according to the label vector and the content vector.
[0132] In step S24, in the case that the text information is correct, it is determined that the title vector, the label vector and the content vector are correct.
[0133] In the method shown in the first aspect, Figure 3 In step S21, the label vector in the text information is determined by a first word vector model. Considering that the text corresponding to the label vector is relatively simple keywords or keyword groups, a lightweight semantic model can be used for recognition. In this example, the structure of the first word vector model can be as shown in FIG. 2. In the Figure 4 Figure 4 The first word vector model can include a first word embedding layer, a first convolutional layer, a first pooling layer, a first lstm layer, a first Dropout layer, a first fully connected layer, a second convolutional layer, a second pooling layer, a second lstm layer, a second Dropout layer, a second fully connected layer and a first output layer. The first word embedding layer can be used for word vector embedding operation. The first end of the first convolutional layer can be connected with the first word embedding layer. One end of the first pooling layer can be connected with the second end of the first convolutional layer. One end of the first lstm layer can be connected with the other end of the first pooling layer. One end of the first Dropout layer can be connected with the other end of the first lstm layer. One end of the first fully connected layer can be connected with the other end of the first Dropout layer. One end of the second convolutional layer can be connected with the third end of the first convolutional layer. One end of the second pooling layer can be connected with the other end of the second convolutional layer. One end of the second lstm layer can be connected with the other end of the second pooling layer. One end of the second Dropout layer can be connected with the other end of the second lstm layer. One end of the second fully connected layer can be connected with the other end of the second Dropout layer. The first output layer can be connected with the other end of the first fully connected layer and the other end of the second fully connected layer, and used for outputting the classification result of the label vector.
[0134] Step S22 can be used to determine the content vector in the text information by the second word vector model. Considering that the text corresponding to the content vector is a continuous paragraph, a more complex semantic model needs to be used for recognition. In this example, the structure of the second word vector model can be as shown in Figure 5 . In this Figure 5 , the second word vector model can include a third word embedding layer, a third convolutional layer, a third pooling layer, a fourth convolutional layer, a fourth pooling layer, a first concatenation layer, a first rnn layer, a third Dropout layer, a third full connection layer, a third lstm layer, a fourth Dropout layer, a fourth full connection layer, a fourth word embedding layer, a fifth convolutional layer, a fifth pooling layer, a sixth convolutional layer, a sixth pooling layer, a second concatenation layer, a second rnn layer, a fifth Dropout layer, a fifth full connection layer, a fourth lstm layer, a sixth Dropout layer, a sixth full connection layer, and a second output layer.
[0135] Wherein, the third word embedding layer can be used for word vector embedding operation. The first end of the third convolutional layer can be connected with the third word embedding layer. One end of the third pooling layer can be connected with the second end of the third convolutional layer. One end of the fourth convolutional layer can be connected with the third end of the third convolutional layer. The first end of the fourth pooling layer can be connected with the other end of the fourth convolutional layer. The first end of the first concatenation layer can be connected with the other end of the third pooling layer, and the second end of the first concatenation layer can be connected with the second end of the fourth pooling layer. One end of the first rnn layer can be connected with the third end of the first concatenation layer. One end of the third Dropout layer can be connected with one end of the first rnn layer. One end of the third full connection layer can be connected with the other end of the third Dropout layer. One end of the third lstm layer can be connected with the third end of the fourth pooling layer. One end of the fourth Dropout layer can be connected with the other end of the third lstm layer. One end of the fourth full connection layer can be connected with the other end of the fourth Dropout layer.
[0136] The fourth word embedding layer can be configured to perform a word vector embedding operation. A first end of the fifth convolutional layer can be connected with the fourth word embedding layer. A first end of the fifth pooling layer can be connected with a second end of the fifth convolutional layer. One end of the sixth convolutional layer can be connected with a third end of the fifth convolutional layer. One end of the sixth pooling layer can be connected with another end of the sixth convolutional layer. A first end of the second concatenation layer can be connected with a second end of the fifth pooling layer, and a second end of the second concatenation layer can be connected with another end of the sixth pooling layer. One end of the second rnn layer can be connected with a third end of the fifth pooling layer. One end of the fifth Dropout layer can be connected with another end of the second rnn layer. One end of the fifth fully connected layer can be connected with another end of the fifth Dropout layer. One end of the fourth lstm layer can be connected with a third end of the second concatenation layer. The sixth Dropout layer, one end of the sixth Dropout layer is connected with another end of the fourth lstm layer. One end of the sixth fully connected layer can be connected with another end of the sixth Dropout layer. The second output layer can be connected with the third fully connected layer, the fourth fully connected layer, the fifth fully connected layer, the sixth fully connected layer, and used to output a classification result of the content vector.
[0137] The step S23 can be configured to determine whether the text information is incorrect according to the label vector and the content vector. In this example, the step S23 can be configured to determine whether the text information is incorrect by first constructing a semantic expression matrix of the label vector and a semantic expression matrix of the content vector respectively, and then calculating the Euclidean distance between the two semantic expression matrices. In the case where the Euclidean distance is greater than a preset threshold, it indicates that the label vector and the content vector are inconsistent, and the text information is incorrect. On the contrary, it indicates that the label vector and the content vector are consistent, and the text information is correct. In the case where it is determined that the text information is incorrect, it indicates that there is a text editing error in the bidding document, and the bidding document format requirement is unqualified.
[0138] The step S14 can be configured to generate a display page according to a preset display layout based on the text information and the proof information, so as to facilitate an operator to compare each text information and the proof information in the image in real time. In order to ensure that the image and the corresponding text are positionally aligned, thereby facilitating viewing, it is necessary to first associate the image and the corresponding text. Therefore, in this embodiment, the step S14 can include the steps as shown in Figure 6 Figure 6 In the step S14, the step S14 can include the following steps:
[0139] In the step S30, the image is input into a preset image recognition model to obtain an image label corresponding to the image.
[0140] In the step S31, a label vector corresponding to the image is determined according to a position where the image is located.
[0141] In step S32, the label vector and the image label are compared to determine whether the image is incorrect;
[0142] In step S33, in the case where the image is determined to be correct, the image and the corresponding label vector are associated.
[0143] For the image recognition model in step S30, it can be a variety of network models known to those skilled in the art, or a combination of multiple network models. Among them, considering that the images in the bidding document include multiple types, such as official seal documents, contract documents, identity documents, qualification documents, and certificate documents. If a single image recognition model is used, it is difficult to achieve unified high recognition efficiency. Therefore, in one example of the present application, the image recognition model can be a combination of multiple network models. In addition, considering that the combination of multiple network models will affect the response speed of the software, therefore in another example of the present application, the image recognition model can be a network model based on OCR algorithm.
[0144] In the case where the image recognition model includes a network model based on OCR algorithm, step S30 can first recognize the text in the image through the OCR algorithm, and then compare the image label corresponding to the image through the keyword query method. Among them, the keyword query method can be through a preset keyword keyword library corresponding to the image label to query.
[0145] As for the case where step S32 determines that the image is incorrect, at this time it means that the bidding document has a problem, which can be prompted to the reviewer through the error marking method.
[0146] After obtaining the association between the image and the label vector, step S14 can be to display the aforementioned title vector, label vector and content vector and the image in a layout. For the specific method of layout display, it can be a variety of forms known to those skilled in the art. In one example of the present application, considering the reading habits of the reviewer, the characteristic keywords corresponding to the title vector, label vector and content vector can be displayed on one side of the display page, and then the image can be displayed on the other side of the display page at the same height according to the association between the image and the corresponding label vector.
[0147] By means of the technical scheme, the text recognition method and system for the bidding document are provided, the information documents containing different types of information are searched in the bidding document through the label, so that the classification of each document in the bidding document is completed, then the classification recognition of the bidding document is realized through the extraction of the word vector and the extraction of the image proof information of each information document. Compared with the prior art, the text recognition method and system provided by the application are used for recognizing each information document in the bidding document, and the word vector and the proof information are extracted respectively, so that the technical defects of the unified document arrangement method of the prior art are overcome, and the recognition efficiency of the bidding document is improved.
[0148] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0149] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks. Figure 1 The functions specified in one or more flows and / or blocks.
[0150] These computer program instructions can also be stored in a computer-readable memory that can guide the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks. Figure 1 The functions specified in one or more flows and / or blocks.
[0151] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1
[0152] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0153] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technologies, about which the processor can execute instructions. The memory is an example of computer readable media.
[0154] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0155] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0156] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.
Claims
1. A method for text recognition of a tender document, characterized in that, The identification method comprises: obtaining a bidding document to be identified; searching for information documents in the bidding document based on a preset label; traversing each of the information documents to determine a word vector and an image of each of the information documents; extracting text information corresponding to the word vector and proof information corresponding to the image; generating a display page according to a preset display layout using the text information and the proof information; extracting the text information corresponding to the word vector and the proof information corresponding to the image comprises: obtaining the text information using a Spire.Doc for Python tool; reading a title vector, a label vector and a content vector in the text information using a word recognition model; reading the title vector, the label vector and the content vector in the text information using a word recognition model comprises: obtaining the title vector in the text information through a preset keyword library; determining the label vector in the text information through a first word vector model; determining the content vector in the text information through a second word vector model; determining whether the text information is correct according to the label vector and the content vector; in the case that the text information is determined to be correct, determining that the title vector, the label vector and the content vector are correct; the first word vector model comprises: a first word embedding layer for performing a word vector embedding operation; a first convolutional layer, a first end of the first convolutional layer being connected with the first word embedding layer; a first pooling layer, one end of the first pooling layer being connected with a second end of the first convolutional layer; a first lstm layer, one end of the first lstm layer being connected with another end of the first pooling layer; a first Dropout layer, one end of the first Dropout layer being connected with another end of the first lstm layer; a first fully connected layer, one end of the first fully connected layer being connected with another end of the first Dropout layer; a second convolutional layer, one end of the second convolutional layer being connected with a third end of the first convolutional layer; a second pooling layer, one end of the second pooling layer being connected with another end of the second convolutional layer; a second lstm layer, one end of the second lstm layer being connected with another end of the second pooling layer; a second Dropout layer, one end of the second Dropout layer being connected with another end of the second lstm layer; a second fully connected layer, one end of the second fully connected layer being connected with another end of the second Dropout layer; a first output layer, connected with another end of the first fully connected layer and another end of the second fully connected layer, for outputting a classification result of the label vector.
2. The identification method according to claim 1, characterized in that, obtaining a bidding document to be identified comprises: obtaining a compressed file of the bidding document; decompressing the compressed file; selecting and reading the decompressed file according to a preset naming rule.
3. The identification method according to claim 1, characterized in that, searching for information documents in the bidding document based on a preset label comprises: reading an index label and a corresponding page number of the bidding document; comparing the preset label with the index label to obtain a label comparison result; According to the page number corresponding to the label comparison result, the information document is determined.
4. The identification method according to claim 1, characterized in that, The text information corresponding to the word vector and the proof information corresponding to the image are extracted, including: The image is input into a preset image recognition model to obtain an image label corresponding to the image; According to the position where the image is located, a label vector corresponding to the image is determined; The label vector and the image label are compared to determine whether the image is correct; In the case where the image is correct, the image and the corresponding label vector are associated.
5. The identification method according to claim 1, characterized in that, The text information and the proof information are used to generate a display page according to a preset display layout, including: The feature keywords corresponding to the title vector, the label vector, and the content vector are displayed on one side of the display page; The image is displayed on the other side of the display page at the same height according to the association relationship between the image and the corresponding label vector.
6. The identification method according to claim 1, characterized in that, The second word vector model includes: A third word embedding layer for performing word vector embedding operation; A third convolutional layer, a first end of the third convolutional layer being connected with the third word embedding layer; A third pooling layer, one end of the third pooling layer being connected with a second end of the third convolutional layer; A fourth convolutional layer, one end of the fourth convolutional layer being connected with a third end of the third convolutional layer; A fourth pooling layer, a first end of the fourth pooling layer being connected with another end of the fourth convolutional layer; A first splicing layer, a first end of the first splicing layer being connected with another end of the third pooling layer, and a second end of the first splicing layer being connected with a second end of the fourth pooling layer; A first rnn layer, one end of the first rnn layer being connected with a third end of the first splicing layer; A third Dropout layer, one end of the third Dropout layer being connected with one end of the first rnn layer; A third fully connected layer, one end of the third fully connected layer being connected with another end of the third Dropout layer; A third lstm layer, one end of the third lstm layer being connected with a third end of the fourth pooling layer; A fourth Dropout layer, one end of the fourth Dropout layer being connected with another end of the third lstm layer; A fourth fully connected layer, one end of the fourth fully connected layer being connected with another end of the fourth Dropout layer; A fourth word embedding layer for performing word vector embedding operation; A fifth convolutional layer, a first end of the fifth convolutional layer being connected with the fourth word embedding layer; A fifth pooling layer, a first end of the fifth pooling layer being connected with a second end of the fifth convolutional layer; A sixth convolutional layer, one end of the sixth convolutional layer being connected with a third end of the fifth convolutional layer; A sixth pooling layer, one end of the sixth pooling layer being connected with another end of the sixth convolutional layer; A second splicing layer, a first end of the second splicing layer being connected with a second end of the fifth pooling layer, and a second end of the second splicing layer being connected with another end of the sixth pooling layer; A second rnn layer, one end of the second rnn layer being connected with a third end of the fifth pooling layer; a fifth Dropout layer, one end of the fifth Dropout layer being connected with the other end of the second rnn layer; a fifth full connection layer, one end of the fifth full connection layer being connected with the other end of the fifth Dropout layer; a fourth LSTM layer, one end of the fourth LSTM layer being connected with the third end of the second splicing layer; a sixth Dropout layer, one end of the sixth Dropout layer being connected with the other end of the fourth LSTM layer; a sixth full connection layer, one end of the sixth full connection layer being connected with the other end of the sixth Dropout layer; a second output layer connected with the third full connection layer, the fourth full connection layer, the fifth full connection layer and the sixth full connection layer, and used for outputting a classification result of a content vector.
7. A system for text recognition of a tender document, characterized in that The recognition system comprises a processor configured to perform the text recognition method according to any one of claims 1 to 6.
Citation Information
Patent Citations
PDF form information extraction method and device, equipment and storage medium
CN113297837A
Information extraction method and device
CN118070789A