Engineering quantity list processing method and system based on double analysis correction

By adopting a dual analytical correction method in the processing of bill of quantities, combining projective geometry, Hough transformation, Bayesian algorithm and large language model, the inefficiency and inaccuracy problems caused by relying on manual labor in the existing technology are solved, and efficient and accurate bill of quantities are achieved.

CN119623476AActive Publication Date: 2025-03-14ZHEJIANG YUANDA ENG CONSULTING CO LTD

Patent Information

Application Number
CN202510151815.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-03-14
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

The preparation of the existing bill of quantities completely relies on manual verification, with huge workload and extremely low efficiency, which is prone to artificial missed items and wrong items, resulting in untimely and inaccurate list modifications.

Method used

The bill of quantities processing method based on double analytical correction is adopted. By combining projective geometry and Hough transformation algorithm, the paper-to-electronic version is converted, and the Bayesian algorithm and large language model are used for semantic analysis, multiple analysis and correction are realized to ensure the accuracy and consistency of the extraction results.

Benefits of technology

It reduces manual workload, significantly improves the accuracy and efficiency of the identification of the bill of quantities, can update the bill of quantities in a timely manner, and improves the overall efficiency and safety of the project.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623476A_ABST
    Figure CN119623476A_ABST
Patent Text Reader

Abstract

The invention provides an engineering quantity list processing method and system based on double analysis and correction, and relates to the technical field of data processing, and the method comprises the steps: obtaining an engineering quantity list; carrying out electronic version conversion on the paper version engineering quantity list; extracting a plurality of identification engineering categories of the target engineering quantity list and the identification engineering quantity of each identification engineering category based on a target detection algorithm; extracting an initial text of the target bill of quantity in combination with a Bayesian algorithm; performing semantic analysis on the initial text in combination with a large language model taking dynamic context lexical elements as input data, and outputting a semantic text of a target bill of quantity; aligning each identification project category and each analysis project category to a target entity; comparing the identification work amount and the analysis work amount which belong to the same target entity; and under the condition that the comparison results are consistent, outputting the semantic text as an engineering quantity list processing result, otherwise, marking a comparison difference result in the semantic text. And the compiling efficiency and accuracy of the bill of quantity are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for processing a bill of quantities based on double analytical correction. Background Art

[0002] The bill of quantities is an important component of the bidding documents and engineering contract terms. It is also the common basis for controlling the construction cost, compiling the base price of the engineering project, adjusting the construction quantity and serving as the bid quotations for bidders in highway engineering projects.

[0003] Accurate processing of the bill of quantities is crucial because it directly affects the cost control, resource allocation and construction plan of the project. Each engineering category and corresponding engineering quantity in the list is related to the budget and final expenditure of the project. If the data is wrong or incomplete, it will lead to cost overruns, construction delays and even quality problems. Therefore, accurate processing of the bill of quantities helps to ensure the economy and execution efficiency of the project and reduce project risks.

[0004] However, the existing preparation of the bill of quantities relies entirely on manual verification, which is a common problem in the engineering industry. After the design unit modifies the drawings, it is necessary to manually re-check the adjusted project quantities. This tedious work is prone to human omissions and errors in the preparation process, resulting in untimely and inaccurate modifications to the bill of quantities. Summary of the invention

[0005] In order to solve the problem that the preparation of the bill of quantities in the prior art completely relies on manual verification, which is a common problem in the engineering industry and has a huge workload and extremely low efficiency, after the design unit modifies the drawings, it is necessary to manually re-check the adjusted project quantities. This tedious work is very likely to result in human omissions and errors in the preparation process, leading to technical problems such as untimely and inaccurate list modifications, the present invention provides a bill of quantities processing method and system based on dual analysis and correction.

[0006] The technical solution provided by the embodiment of the present invention is as follows: First aspect An embodiment of the present invention provides a method for processing a bill of quantities based on double analysis and correction, comprising: S1: Obtain the bill of quantities in the engineering drawing, where the bill of quantities includes a paper bill of quantities and an electronic bill of quantities; S2: Combine the parallelism preservation principle of projective geometry and the Hough transform algorithm to convert the paper version of the bill of quantities into an electronic version; S3: extracting multiple identified engineering categories and identified engineering quantities of each identified engineering category of a target bill of quantities, wherein the target bill of quantities includes an electronic bill of quantities and a converted paper bill of quantities; S4: Extract the initial text of the target bill of quantities using the Bayesian algorithm; S5: semantically parse the initial text in combination with a large language model that uses dynamic context words as input data, and output a semantic text of the target bill of quantities, wherein the semantic text includes multiple parsed engineering categories and parsed engineering quantities corresponding to each parsed engineering category; S6: aligning each recognition engineering category and each parsing engineering category to the target entity; S7: comparing the identification engineering quantity corresponding to the identification engineering category and the analysis engineering quantity corresponding to the analysis engineering category belonging to the same target entity; S8: When the comparison results are consistent, the semantic text is output as the result of the bill of quantities processing; otherwise, the comparison difference results are marked in the semantic text.

[0007] Second aspect An embodiment of the present invention provides a system for processing a bill of quantities based on dual analysis and correction, comprising: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for processing a bill of quantities based on double analysis and correction as described in the first aspect is implemented.

[0008] The third aspect An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for processing a bill of quantities based on double analysis and correction as described in the first aspect is implemented.

[0009] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: In the present invention, the processing method for the bill of quantities is divided into two parallel methods: image-based text extraction and semantic recognition-based text extraction. Based on the entity alignment technology, the two extracted results are verified for consistency on the same target entity, avoiding the problem that the single text extraction cannot ensure the validity and accuracy of the extraction results. Before text extraction, the paper version of the bill of quantities is corrected by combining the parallelism maintenance principle of projective geometry and the Hough transform algorithm to convert the paper version of the bill of quantities into an electronic version, avoiding the problem of irrelevant factors affecting the extraction results, and ensuring the accuracy of the entire text extraction process. In the text extraction process, the initial text of the target bill of quantities is extracted by combining the Bayesian algorithm, the semantic rationality problem of the extracted initial text is corrected, and the initial text is semantically parsed by a large language model with dynamic context words as input data, which can reduce the semantic recognition result error accumulation and context semantic recognition fault caused by the sliding window length constraint in the text recognition process, and improve the accuracy of the semantic text extraction results. Finally, according to the comparison result, the accuracy of the extracted text can be quickly verified, and the difference results are marked and output by comparison, reminding relevant personnel to quickly lock and check the relevant content. This multiple analysis and revision of the bill of quantities processing method reduces manual workload and greatly increases the accuracy and efficiency of the bill of quantities recognition. It can update the bill of quantities in a timely manner after the engineering drawings are modified, thereby improving the overall efficiency of the project and the safety of the project. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 A schematic flow chart of a method for processing a bill of quantities based on double analytical correction provided by an embodiment of the present invention; Figure 2 A schematic structural diagram of a bill of quantities processing system based on dual analytical correction provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0012] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0013] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0014] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0015] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0016] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0017] Reference Manual Attached Figure 1 , showing a flow chart of a method for processing a bill of quantities based on double analytical correction provided by an embodiment of the present invention.

[0018] The embodiment of the present invention provides a method for processing a bill of quantities based on dual analysis and correction, which can be implemented by a bill of quantities processing device based on dual analysis and correction, and the bill of quantities processing device based on dual analysis and correction can be a terminal or a server. The processing flow of the method for processing a bill of quantities based on dual analysis and correction can include the following steps: S1: Get the bill of quantities from the engineering drawing.

[0019] Among them, the bill of quantities includes paper version and electronic version.

[0020] It should be noted that the bill of quantities is obtained by parsing the engineering drawings. The bill of quantities includes both paper and electronic versions. The purpose of this step is to extract and record the engineering quantity information in the drawings to provide a data basis for subsequent data conversion and automated processing.

[0021] S2: Combining the parallelism-preserving principle of projective geometry and the Hough transform algorithm, the paper version of the bill of quantities is converted into an electronic version.

[0022] Among them, the parallelism-preserving principle of projective geometry is that in projective geometry, parallel lines can maintain their directional relationship after projective transformation, ensuring that the transformed image can truly restore the shape of the object. The Hough transform algorithm is an image processing algorithm that is mainly used to detect shapes (such as lines or circles) in images. By mapping points in the image to parameter space, the Hough transform can effectively detect and identify straight lines or other shapes in the image. The parallelism-preserving principle of projective geometry is used to ensure the true restoration of paper images. At the same time, the Hough transform algorithm is combined to detect lines in the image, convert the paper bill of quantities into an accurate electronic version, realize the digital conversion of data, and improve the recognition accuracy of subsequent bills of quantities.

[0023] In a possible implementation, S2 specifically includes: S201: Acquire a bill of quantities image of a paper version of the bill of quantities.

[0024] S202: Combine the parallelism preservation principle and the Hough transform algorithm to establish an image correction matrix:

[0025] in, Indicates the tilt angle of the bill of quantities image. Indicates the horizontal offset distance of the bill of quantities image. Vertical offset distance from the bill of quantities image The offset parameter, Represents the pixel coordinates of the bill of quantities image, a and b denote the perspective parameters caused by the horizontal and vertical folds of the bill of quantities image, respectively. represents the rotation matrix used to correct the tilt angle of the bill of quantities image, represents the translation matrix used to correct the offset distance of the bill of quantities image, represents the perspective transformation matrix used to correct wrinkles in the bill of quantities image. sin and cos represent the sine function and cosine function respectively.

[0026] in, and The solution is to substitute the four corner points of the bill of quantities image into the following formula and solve it using the least squares method:

[0027] in, The corrected bill of quantities image is shown in i The expected coordinates of the corner points, i =1,2,3,4, Represents the uncorrected bill of quantities image ini The coordinates of the corner points.

[0028] Among them, the expected coordinates are usually determined in advance. In the process of image correction, the expected coordinates represent the positions of the four corner points of the image in an ideal state, and are usually set according to the actual geometric proportions and alignment requirements of the image. For example, assuming that the goal is to correct the image into a rectangle, the four expected coordinates may be the coordinates of the four corner vertices of the rectangle. These coordinates are determined before correction and are used as the standard position that the corrected image should reach. In practical applications, by aligning the corner point coordinates of the uncorrected image with these expected coordinates, the least squares method can solve the transformation parameters of the image, thereby correcting the distorted image into an ideal, flat electronic image.

[0029] S203: Perform image correction on the bill of quantities image using an image correction matrix to obtain a corrected bill of quantities image, and output the corrected bill of quantities image as a result of conversion of the paper version of the bill of quantities into the electronic version:

[0030] in, Represents the pixel coordinates of the corrected bill of quantities image.

[0031] Specifically, in this process, the image of the paper version of the bill of quantities is first collected. Then, by combining the parallelism preservation principle and the Hough transform algorithm, an image correction matrix is ​​established, which corrects the image according to parameters such as the tilt angle, offset distance, and wrinkles of the image. Specifically, the least squares method is used to determine parameters such as offset and tilt angle to ensure that the parallel relationship and true proportion in the image are restored. Finally, the correction matrix is ​​used to adjust the image so that the image content is correct and distortion-free, and a corrected image for electronic version conversion is obtained. This step ensures high-quality digitization of the content of the paper list and provides a data basis for subsequent accurate identification.

[0032] S3: extracting multiple identified engineering categories of the target engineering quantity list and the identified engineering quantities of each identified engineering category based on the target detection algorithm.

[0033] Among them, the target bill of quantities includes the electronic bill of quantities and the converted paper bill of quantities.

[0034] Among them, the target detection algorithm is a computer vision technology used to identify and locate specific targets in an image. Identifying engineering categories refers to automatically detecting and classifying different components or project types in engineering drawings. Identifying engineering quantities refers to the extraction of specific quantities or sizes of each identified engineering category. The target detection algorithm is used to automatically identify each engineering category and the corresponding engineering quantity from the bill of quantities, covering both the electronic version and the converted paper version of the bill, ensuring that detailed engineering data for each project is accurately extracted. The extraction results serve as the data basis for subsequent comparisons, jointly ensuring the accuracy of the compilation of the bill of quantities.

[0035] In a possible implementation, S3 specifically includes: S301: Determine a detection area through a pre-trained target detection model, wherein the detection area includes an engineering category detection area and an engineering quantity detection area, wherein the target detection model includes a YOLO target detection model, a Faster R-CNN target detection model, and an SSD target detection model.

[0036] Among them, the YOLO (You Only Look Once) target detection model, the Faster R-CNN (Region-based Convolutional Neural Network) target detection model and the SSD (Single Shot MultiBox Detector) target detection model can all perform target detection quickly.

[0037] S302: Perform text recognition on the engineering category detection area and the engineering quantity detection area respectively, and output the identified engineering category and the identified engineering quantity of the identified engineering category.

[0038] Optionally, in step S302, optical character recognition (OCR) may be used to directly perform semantic recognition. Alternatively, OCR combined with a Bayesian algorithm in step S4 may be used for recognition.

[0039] S303: Repeat steps S301 to S303 until the target bill of quantities is extracted, and output a plurality of identified engineering categories and the identified engineering quantities of each identified engineering category.

[0040] It should be noted that the system first uses pre-trained target detection models (such as YOLO, Faster R-CNN, SSD) to identify detection areas in engineering drawings, including engineering categories and engineering quantity areas. Subsequently, in S302, text recognition is performed on these areas to extract specific engineering category names and quantities. This process is repeated until all engineering items and corresponding engineering quantities in the list are extracted and output, and finally a complete structured data list is generated. This method realizes automated data extraction and effectively reduces manual intervention. This target detection-based text extraction can quickly locate key areas in engineering drawings, ensure that only required text content is extracted, and avoid resource consumption of full-image scanning. At the same time, the recognition efficiency and accuracy are improved, which greatly reduces the workload of manual annotation and manual verification. It is suitable for automatic processing of large-scale engineering data, provides accurate comparison data for subsequent result comparison, and completes effective and reliable result mutual verification.

[0041] S4: Combine the Bayesian algorithm to extract the initial text of the target bill of quantities.

[0042] The probabilistic optimization scheme improves recognition accuracy by combining the image recognition output (the result of the OCR model) and the language model (prior probability). The prior probability helps the model correct the recognition results based on language common sense, especially for blurry or noisy image content, this method can significantly reduce errors.

[0043] Among them, the Bayesian algorithm is based on the Bayesian theorem and calculates the posterior probability of an event by combining the prior probability and conditional probability of the event. In text recognition, the Bayesian algorithm helps correct recognition errors through context information. The initial text of the bill of quantities is extracted using the Bayesian algorithm, and the recognition results are corrected using the prior probability and context information, thereby improving the accuracy of text extraction and reducing recognition errors.

[0044] In a possible implementation manner, S4 specifically includes: S401: Recognize the first initial text of the target bill of quantities through OCR.

[0045] S402: Combine the language model and Bayesian probability to establish a priori probability describing the correctness of the language rules:

[0046] in, W represents the first initial text, I represents the target bill of quantities, Indicates that in a given I In the case W The posterior probability of occurrence, Indicates the value obtained by OCR calculation in a given W In the caseI The probability of occurrence, Representation based on language model W The prior probability of Indicates i word In the i -1 word The probability of appearing later, , n Indicates the total number of tokens in the first initial text.

[0047] Optionally, the language model can be an n-gram model. The n-gram model provides the probability of a certain word sequence by calculating the probability of one word being followed by another word. For example, it is more reasonable to have "list" followed by the word "engineering quantity" than to have "weather". We can use this language model to constrain the OCR results and improve the rationality of the OCR output.

[0048] S403: Optimize the first initial text according to the prior probability and output the initial text:

[0049] in, Represents the initial text, Indicates that the maximum value is obtained W .

[0050] In actual application, this process is actually to use prior knowledge to help OCR make more accurate guesses to improve recognition accuracy. Prior knowledge can be understood as contextual common sense and language rules of text content. We use Bayesian probability to combine this knowledge, so that OCR not only relies on the image itself to recognize text, but also refers to language habits to improve the rationality of recognition results. This is also the data basis for the accuracy of subsequent semantic text recognition.

[0051] Specifically, OCR first simply recognizes each character or word in the image, but this process is isolated and lacks the help of "context". It's like "guessing blindly" - judging what the character might be just based on the shape of the image. For example, it might recognize "Engineering quantity clearing and", but due to the unclear image, it might mistake "宂" for a similar "程" and "且" for "单". However, in engineering-related documents, what is commonly seen is "Engineering quantity list" rather than "Engineering quantity clearing and". This language habit is the so-called "prior probability". That is to say, when OCR is recognizing, it can借助 a "lexicon" or "language model", which will tell the system that combinations like "Engineering quantity list" are more common and more in line with language habits. When OCR gets the recognition result of "Engineering quantity clearing and", it won't output it immediately but will re-evaluate the rationality of this result. OCR will think: "In engineering documents, the possibility of 'Engineering quantity list' appearing is much higher than that of 'Engineering quantity clearing and'." So it makes a judgment using Bayes' theorem and believes that the overall possibility of the recognition result of "Engineering quantity list" is higher. Finally, OCR combines the image information and language habits and outputs a more reasonable result of "Engineering quantity list". This way avoids OCR directly outputting the incorrect content in image recognition but instead uses "prior knowledge" to correct the result, significantly reducing the incorrect recognition of the initial text by OCR.

[0052] S5: Combine a large language model with dynamic context tokens as input data to perform semantic parsing on the initial text and output the semantic text of the target engineering quantity list.

[0053] Among them, the semantic text includes multiple parsed engineering categories and the parsed engineering quantities corresponding to each parsed engineering category.

[0054] Among them, dynamic context tokens are a technique in natural language processing that gradually adjusts the input tokens, enabling the model to more flexibly focus on key context information in different rounds of input. Each input will dynamically adjust the context tokens according to the previous tokens and changes in the context to capture a wider range of text dependencies. This mechanism helps the model process longer texts within a limited context window and avoid losing the front-back relevance due to window limitations. Using dynamic context tokens as input to the large language model to perform semantic parsing on the initial text ensures the accurate extraction of the parsed engineering categories and engineering quantities in the context relationship, and finally generates a complete list text with semantic associations.

[0055] Optionally, the large language model can be a BERT model, a RoBERTa model, an ERNIE model, or an XLNet model, etc.

[0056] It is understandable that the existing large model has a good recognition effect on short texts, but because the extracted semantic text is continuous, it is impossible to split it manually in a time-consuming and laborious manner. If the splitting workload is too large, the recognition of such long texts is usually limited by the size of the model context window, which makes it impossible to input it all at once. This may lead to the inability to fully capture the content with previous and subsequent correlations, and then the problem of semantic truncation of the extracted semantic text occurs, which has a huge impact on the accounting of the bill of quantities that requires rigorous processing. Dynamic context words as input data can overcome the limitations of the context window. In the process of each input, the bias of each round of input, the attention score of the predicted word, and the continuity of the input word are considered to improve the context word of each round of input to make up for the shortcomings of semantic truncation and the recognition accuracy of semantic text caused by the limited context window.

[0057] In a possible implementation, S5 specifically includes: S501: Taking the context window length of the large language model as a constraint, extracting a first word-unit sequence from the initial text in order, inputting the first word-unit sequence into the large language model, and outputting a first predicted word-unit.

[0058] S502: Generate the topic of the first word sequence through the LDA model:

[0059] in, Indicates the subject, Represents the first word sequence about each candidate topic z The probability distribution of express z The probability of appearing in the first meta-sequence, Indicates that The alternative topic when taking the maximum value, LDA represents the LDA model, Representation and The associated subject headings, Indicates the first word in the sequence i word, express In Theme The probability of occurrence in Indicates the word unit screening probability threshold.

[0060] Among them, the LDA (Latent Dirichlet Allocation) model is a topic model used for topic extraction in text analysis.

[0061] S503: Calculate the attention score of each word in the first word sequence relative to the first predicted word, and select multiple words with attention scores greater than a preset attention score from the first word sequence:

[0062] in, Representation word Relative to the first predicted word The attention score, express The query vector is S Indicates the selected word. express The key vector of represents the key vector dimension, represents the attention score threshold, , , Respectively represent the selected word length, topic word length and context window length, Represents the adaptive proportion coefficient.

[0063] In a possible implementation, the adaptive proportion coefficient is calculated based on information density and information entropy, and the adaptive proportion coefficient is calculated in the following manner:

[0064] in, express S The information density, express S The information entropy of represents the basic proportion coefficient, express In the collection S The relative importance of , log represents the logarithmic function, Indicates the first j A word.

[0065] Among them, information density refers to the concentration of effective information in an information sequence or data set. It can be understood as how much "important" information is contained in a piece of content. Information entropy is a measure of uncertainty in a piece of information. This adaptive proportion coefficient dynamically adjusts the retention ratio of words in the window according to information density and information entropy. In the case of high information complexity, the proportion of attention paid to new words is increased to ensure that important information is not ignored due to the limitation of the context window. This mechanism effectively optimizes information selection, takes into account the integrity and importance of information when processing long texts, and improves the accuracy and coherence of overall parsing.

[0066] It is understandable that more space is reserved for new words when the information is complex (high information entropy) because in this case, more new information needs to be captured to avoid excessive occupation of existing information. Among them, the maximum basic proportion coefficient is 0.5, and 0.2 can also be taken to avoid the problem of large deviations caused by multiple rounds of recognition and retain the words with higher contribution in the previous round, so as to ensure the continuity of the entire text recognition to the greatest extent.

[0067] S504: concatenate the word-grams corresponding to the topic and the selected word-grams, and store the concatenated word-gram sequence into the placeholder.

[0068] S505: extracting a second word sequence in sequence from the initial text, wherein the length of the second word sequence is the difference between the context window length and the placeholder length.

[0069] S506: Concatenate the placeholder with the second word-gram sequence, input the concatenated second word-gram sequence into the large language model, and output a second predicted word-gram.

[0070] S507: Use the second word-gram sequence as the first word-gram sequence and return to step S502 until the initial text input is completed and a plurality of second predicted word-grams are obtained.

[0071] S508: Concatenate the obtained first predicted word-unit and the obtained second predicted word-unit, and output the concatenation result as a semantic text.

[0072] Specifically, the whole process first uses the context window length of the large language model as a limit, gradually extracts word-meta sequences from the initial text, and inputs them into the model for prediction in sequence. The LDA model generates topics for each sequence, and selects high-probability word-meta related to the topic. Next, the attention score of each word-meta to the predicted word-meta is calculated, and the word-meta with a score higher than the threshold is selected to capture the semantic association. Then, the topic word-meta and the word-meta with a high attention score are concatenated and stored in the placeholder. Next, the second word-meta sequence is extracted from the initial text and concatenated with the placeholder, and input into the large language model to generate the next predicted word-meta. Repeat this process until the initial text is parsed, and all predicted word-meta are concatenated and output as semantic text. This process ensures semantic continuity and the accuracy of extracting semantic text by dynamically building context.

[0073] It should be noted that by dynamically adjusting the context, the words with high attention scores are stored in the placeholder together with the words related to the topic, and then spliced ​​with the subsequent second word sequence. In this way, each input not only retains the current semantic focus, but also introduces new words, gradually enriches the context information, and avoids semantic truncation. This mechanism ensures the coherence and integrity of long text parsing, enables the semantic information to be fully expressed, reduces the information loss caused by window limitations, and improves the overall parsing accuracy.

[0074] S6: Align each recognition engineering category and each parsing engineering category to the target entity.

[0075] The target entity refers to the standardized project category finally determined in the project list. This ensures that the data remains consistent and clear at all stages. By aligning the identified project category with the parsed project category to the target entity, the consistency of each project category in the list is ensured, providing standardized basic data for subsequent comparison and calculation.

[0076] In a possible implementation, S6 specifically includes: S601: Convert each recognition engineering category and each parsing engineering category into vectors through a word embedding model.

[0077] S602: Calculate the cosine similarity between the converted recognition engineering category and the parsed engineering category.

[0078] S603: Align the recognition engineering categories and the analysis engineering categories whose cosine similarity is greater than a preset cosine similarity to a target entity, wherein the target entity is the recognition engineering category or the analysis engineering category.

[0079] Specifically, the identified and parsed engineering categories are converted into vector representations through a word embedding model, and then the cosine similarity between them is calculated to evaluate their semantic proximity. Category pairs with cosine similarity greater than a set threshold are considered similar and aligned, thereby unifying the identified and parsed engineering categories into the same target entity. This method ensures that engineering categories from different sources remain consistent in data, which facilitates accurate inventory comparison and calculation.

[0080] It should be noted that those skilled in the art can set the size of the preset cosine similarity according to actual needs, and the present invention is not limited here.

[0081] S7: Compare the identification engineering quantity corresponding to the identification engineering category and the analysis engineering quantity corresponding to the analysis engineering category belonging to the same target entity.

[0082] S8: When the comparison results are consistent, the semantic text is output as the result of the bill of quantities processing; otherwise, the comparison difference results are marked in the semantic text.

[0083] In a possible implementation manner, after S8, the method further includes: In case of discrepancies in the comparison results, an early warning is issued.

[0084] It should be noted that when there is a discrepancy between the identified and parsed quantities in the comparison results, the added early warning mechanism will automatically issue an early warning reminder, ensuring that users can promptly discover and handle data inconsistencies, which helps improve the accuracy and reliability of the bill of quantities.

[0085] In the actual application process, first, the data in the engineering drawings is parsed and converted into an electronic version, and the engineering categories and quantities are extracted using the target detection algorithm. The initial text is then corrected with the Bayesian algorithm to ensure the accuracy of the text. Subsequently, the dynamic context word unit is input into the large language model for semantic parsing to generate a list text with complete semantics. Next, the identified and parsed categories are aligned to the target entity to ensure data consistency, and the engineering quantities are compared to verify accuracy. Finally, if the data is consistent, the results are output, otherwise the differences are marked for review. This method effectively improves the accuracy and efficiency of list processing and reduces manual operations.

[0086] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: In the present invention, the processing method for the bill of quantities is divided into two parallel methods: image-based text extraction and semantic recognition-based text extraction. Based on the entity alignment technology, the two extracted results are verified for consistency on the same target entity, avoiding the problem that the single text extraction cannot ensure the validity and accuracy of the extraction results. Before text extraction, the paper version of the bill of quantities is corrected by combining the parallelism maintenance principle of projective geometry and the Hough transform algorithm to convert the paper version of the bill of quantities into an electronic version, avoiding the problem of irrelevant factors affecting the extraction results, and ensuring the accuracy of the entire text extraction process. In the text extraction process, the initial text of the target bill of quantities is extracted by combining the Bayesian algorithm, the semantic rationality problem of the extracted initial text is corrected, and the initial text is semantically parsed by a large language model with dynamic context words as input data, which can reduce the semantic recognition result error accumulation and context semantic recognition fault caused by the sliding window length constraint in the text recognition process, and improve the accuracy of the semantic text extraction results. Finally, according to the comparison result, the accuracy of the extracted text can be quickly verified, and the difference results are marked and output by comparison, reminding relevant personnel to quickly lock and check the relevant content. This multiple analysis and revision of the bill of quantities processing method reduces manual workload and greatly increases the accuracy and efficiency of the bill of quantities recognition. It can update the bill of quantities in a timely manner after the engineering drawings are modified, thereby improving the overall efficiency of the project and the safety of the project.

[0087] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a bill of quantities processing system based on double analytical correction provided by the present invention.

[0088] The present invention further provides a bill of quantities processing system 20 based on dual analysis and correction, which is applied to the above-mentioned bill of quantities processing method based on dual analysis and correction, and comprises: Processor 201.

[0089] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, the bill of quantities processing method based on double analysis and correction as in the method embodiment is implemented.

[0090] The bill of quantities processing system 20 based on dual analysis and correction provided by the present invention can execute the above-mentioned bill of quantities processing method based on dual analysis and correction, and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0091] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: In the present invention, the processing method for the bill of quantities is divided into two parallel methods: image-based text extraction and semantic recognition-based text extraction. Based on the entity alignment technology, the two extracted results are verified for consistency on the same target entity, avoiding the problem that the single text extraction cannot ensure the validity and accuracy of the extraction results. Before text extraction, the paper version of the bill of quantities is corrected by combining the parallelism maintenance principle of projective geometry and the Hough transform algorithm to convert the paper version of the bill of quantities into an electronic version, avoiding the problem of irrelevant factors affecting the extraction results, and ensuring the accuracy of the entire text extraction process. In the text extraction process, the initial text of the target bill of quantities is extracted by combining the Bayesian algorithm, the semantic rationality problem of the extracted initial text is corrected, and the initial text is semantically parsed by a large language model with dynamic context words as input data, which can reduce the semantic recognition result error accumulation and context semantic recognition fault caused by the sliding window length constraint in the text recognition process, and improve the accuracy of the semantic text extraction results. Finally, according to the comparison result, the accuracy of the extracted text can be quickly verified, and the difference results are marked and output by comparison, reminding relevant personnel to quickly lock and check the relevant content. This multiple analysis and revision of the bill of quantities processing method reduces manual workload and greatly increases the accuracy and efficiency of the bill of quantities recognition. It can update the bill of quantities in a timely manner after the engineering drawings are modified, thereby improving the overall efficiency of the project and the safety of the project.

[0092] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0093] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0094] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0095] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0096] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0097] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0098] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0100] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0103] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0104] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a method for processing a bill of quantities based on double analysis correction as in the method embodiment.

[0105] A computer-readable storage medium provided by the present invention can implement the steps and effects of the bill of quantities processing method based on double analysis and correction of the above method embodiment. To avoid repetition, the present invention will not go into details.

[0106] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: In the present invention, the processing method for the bill of quantities is divided into two parallel methods: image-based text extraction and semantic recognition-based text extraction. Based on the entity alignment technology, the two extracted results are verified for consistency on the same target entity, avoiding the problem that the single text extraction cannot ensure the validity and accuracy of the extraction results. Before text extraction, the paper version of the bill of quantities is corrected by combining the parallelism maintenance principle of projective geometry and the Hough transform algorithm to convert the paper version of the bill of quantities into an electronic version, avoiding the problem of irrelevant factors affecting the extraction results, and ensuring the accuracy of the entire text extraction process. In the text extraction process, the initial text of the target bill of quantities is extracted by combining the Bayesian algorithm, the semantic rationality problem of the extracted initial text is corrected, and the initial text is semantically parsed by a large language model with dynamic context words as input data, which can reduce the semantic recognition result error accumulation and context semantic recognition fault caused by the sliding window length constraint in the text recognition process, and improve the accuracy of the semantic text extraction results. Finally, according to the comparison result, the accuracy of the extracted text can be quickly verified, and the difference results are marked and output by comparison, reminding relevant personnel to quickly lock and check the relevant content. This multiple analysis and revision of the bill of quantities processing method reduces manual workload and greatly increases the accuracy and efficiency of the bill of quantities recognition. It can update the bill of quantities in a timely manner after the engineering drawings are modified, thereby improving the overall efficiency of the project and the safety of the project.

[0107] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0108] There are a few points to note: (1) The drawings of the embodiments of the present invention only involve structures related to the embodiments of the present invention. Other structures may refer to conventional designs.

[0109] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0110] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0111] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for processing bill of quantities based on double analytical correction, characterized in that: include: S1: Obtain a bill of quantities in an engineering drawing, wherein the bill of quantities includes a paper bill of quantities and an electronic bill of quantities; S2: Combining the parallelism preservation principle of projective geometry and the Hough transform algorithm, converting the paper version of the bill of quantities into an electronic version; S3: extracting multiple identified engineering categories and identified engineering quantities of each identified engineering category of a target engineering quantity list based on a target detection algorithm, wherein the target engineering quantity list includes the electronic engineering quantity list and the converted paper engineering quantity list; S4: extracting the initial text of the target bill of quantities in combination with a Bayesian algorithm; S5: performing semantic parsing on the initial text in combination with a large language model using dynamic context words as input data, and outputting a semantic text of the target bill of quantities, wherein the semantic text includes a plurality of parsed engineering categories and parsed engineering quantities corresponding to each parsed engineering category; S6: aligning each recognition engineering category and each parsing engineering category to the target entity; S7: comparing the identification engineering quantity corresponding to the identification engineering category and the analysis engineering quantity corresponding to the analysis engineering category belonging to the same target entity; S8: When the comparison results are consistent, the semantic text is output as the result of bill of quantities processing; otherwise, the comparison difference results are marked in the semantic text.

2. The method for processing bill of quantities based on double analytical correction according to claim 1 is characterized in that: The S2 specifically includes: S201: Acquire a bill of quantities image of the paper version of the bill of quantities; S202: Combining the parallelism preservation principle and the Hough transform algorithm, an image correction matrix is ​​established: ; in, Indicates the tilt angle of the bill of quantities image. Indicates the horizontal offset distance of the bill of quantities image. Vertical offset distance from the bill of quantities image The offset parameter, Represents the pixel coordinates of the bill of quantities image, a and b denote the perspective parameters caused by the horizontal and vertical folds of the bill of quantities image, respectively. represents the rotation matrix used to correct the tilt angle of the bill of quantities image, represents the translation matrix used to correct the offset distance of the bill of quantities image, represents the perspective transformation matrix used to correct the wrinkles of the bill of quantities image, sin and cos represent the sine function and cosine function respectively; S203: performing image correction on the bill of quantities image using the image correction matrix to obtain a corrected bill of quantities image, and outputting the corrected bill of quantities image as the electronic version conversion result of the paper version of the bill of quantities: ; in, Represents the pixel coordinates of the corrected bill of quantities image.

3. The method for processing bill of quantities based on double analytical correction according to claim 1 is characterized in that: The S3 specifically includes: S301: determining a detection area through a pre-trained target detection model, wherein the detection area includes an engineering category detection area and an engineering quantity detection area, wherein the target detection model includes a YOLO target detection model, a Faster R-CNN target detection model, and an SSD target detection model; S302: performing text recognition on the engineering category detection area and the engineering quantity detection area respectively, and outputting the identified engineering category and the identified engineering quantity of the identified engineering category; S303: Repeat steps S301 to S303 until the target bill of quantities is extracted, and output a plurality of identified engineering categories and the identified engineering quantities of each identified engineering category.

4. The method for processing bill of quantities based on double analytical correction according to claim 1 is characterized in that: The S4 specifically includes: S401: recognizing a first initial text of the target bill of quantities by OCR; S402: Combine the language model and Bayesian probability to establish a priori probability describing the correctness of the language rules: ; in, W represents the first initial text, I represents the target bill of quantities, Indicates that in a given I In the case W The posterior probability of occurrence, Indicates the value obtained by OCR calculation in a given W In the case I The probability of occurrence, Representation based on language model W The prior probability of Indicates i word In the i -1 word The probability of appearing later, , n represents the total number of tokens in the first initial text; S403: Optimize the first initial text according to the prior probability and output the initial text: ; in, Represents the initial text, Indicates that the maximum value is obtained W .

5. The method for processing bill of quantities based on double analytical correction according to claim 1 is characterized in that: The S5 specifically includes: S501: extracting a first word-gram sequence from the initial text in order based on the context window length of the large language model as a constraint, inputting the first word-gram sequence into the large language model, and outputting a first predicted word-gram; S502: Generate the topic of the first word-gram sequence through the LDA model: ; in, Indicates the subject, Represents the first word sequence about each candidate topic z The probability distribution of express z The probability of appearing in the first meta-sequence, Indicates that The alternative topic when taking the maximum value, LDA represents the LDA model, Representation and The associated subject headings, Indicates the first word in the sequence i word, express On topic The probability of occurrence in Indicates the probability threshold of word unit screening; S503: Calculate the attention score of each word in the first word-unit sequence relative to the first predicted word-unit, and select multiple words with attention scores greater than a preset attention score from the first word-unit sequence: ; in, Representation word Relative to the first predicted word The attention score, express The query vector is S Indicates the selected word. express The key vector of represents the key vector dimension, represents the attention score threshold, , , Respectively represent the selected word length, topic word length and context window length, Represents the adaptive proportion coefficient; S504: splicing the word-grams corresponding to the topic and the selected word-grams, and storing the spliced ​​word-gram sequence into a placeholder; S505: extracting a second word sequence in sequence from the initial text, wherein the length of the second word sequence is the difference between the length of the context window and the length of the placeholder; S506: concatenating the placeholder with the second word-gram sequence, inputting the concatenated second word-gram sequence into the large language model, and outputting a second predicted word-gram; S507: taking the second word-gram sequence as the first word-gram sequence, and returning to step S502 until the initial text input is completed, and obtaining a plurality of second predicted word-grams; S508: Concatenate the obtained first predicted word-unit and the obtained second predicted word-unit, and output the concatenation result as the semantic text.

6. The method for processing bill of quantities based on double analytical correction according to claim 5 is characterized in that: The adaptive proportion coefficient is calculated based on information density and information entropy, and the adaptive proportion coefficient is calculated in the following manner: ; in, express S The information density, express S The information entropy of represents the basic proportion coefficient, express In the collection S The relative importance of , log represents the logarithmic function, Indicates the first j A word.

7. The method for processing bill of quantities based on double analytical correction according to claim 1 is characterized in that: The S6 specifically includes: S601: Convert each recognition engineering category and each parsing engineering category into a vector through a word embedding model; S602: Calculate the cosine similarity between the converted recognition engineering category and the parsing engineering category; S603: Align the recognition engineering categories and the analysis engineering categories whose cosine similarity is greater than a preset cosine similarity to the target entity, wherein the target entity is the recognition engineering category or the analysis engineering category.

8. The method for processing bill of quantities based on double analytical correction according to claim 1 is characterized in that: After S8, the method further includes: In the event of a difference in the comparison results, an early warning is issued.

9. A bill of quantities processing system based on dual analytical correction, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for processing a bill of quantities based on double analysis correction as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for processing a bill of quantities based on double analysis correction as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Table semantic information extraction method, system and equipment based on cell coordinate optimization and medium

    CN116543404A

  • Table information updating method and system based on intelligent recognition text

    CN119206756A

Cited By

  • Method, system and equipment for correcting and combining bidding documents of road and bridge engineering and medium

    CN121029705A