Construction engineering document processing method and device, electronic equipment and storage medium
By extracting text and graphic key information in construction engineering documents and generating document-related Q&A pairs, the problem that the existing technology is difficult to adapt to the complexity and diversity of construction engineering documents is solved, and efficient and accurate document processing is achieved.
Patent Information
- Application Number
- CN202510168265.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to adapt to the complexity and diversity of construction engineering documents, resulting in inefficient labeling and difficulty in processing documents containing complex elements such as charts and formulas.
By extracting text key information and graphic key information in construction engineering documents, and generating information based on preset question answers to generate questions related to the document, generating answers to questions, and linking questions and answers to form a question-and-answer pair.
It has achieved the complexity and diversity of construction engineering documents, reduced the need for manual definition of rules and annotations, and ensured the accuracy of processing.
Smart Images

Figure CN119621922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of building technology, and in particular to a construction engineering document processing method, device, electronic equipment and storage medium. Background Art
[0002] Before model processing is performed based on construction engineering documents, the construction engineering documents need to be annotated to ensure the accuracy of the model processing. At present, there are many methods for automatic annotation of construction engineering documents, such as rule-based annotation, machine learning-based annotation, etc. Among them, the rule-based annotation method requires a large number of rules to be manually defined, which is difficult to adapt to the complex and changeable document structure, and the annotation efficiency is low. Although the machine learning-based annotation method can automatically learn the annotation rules, it requires a large amount of annotation data and is difficult to process documents containing complex elements such as charts and formulas. Therefore, the existing methods are difficult to adapt to the complexity and diversity of construction engineering documents. Summary of the invention
[0003] The present invention provides a construction engineering document processing method, device, electronic equipment and storage medium, which are used to solve the defect that the existing technology is difficult to adapt to the complexity and diversity of construction engineering documents, and achieve the effect of adapting to the complexity and diversity of construction engineering documents.
[0004] The present invention provides a construction engineering document processing method, comprising: Acquire a construction engineering document, pre-process the construction engineering document, extract text key information and graphic key information in the construction engineering document, and match the text key information and graphic key information in the construction engineering document; Acquire preset question and answer generation information, and generate questions related to the construction project document based on the preset question and answer generation information; An answer to the question is generated based on the text key information and the graphic key information, and the question and the answer are associated to form a question-answer pair.
[0005] According to a construction engineering document processing method provided by the present invention, generating questions related to the construction engineering document based on the preset question and answer generation information includes: Based on the preset question and answer generation information, questions related to the construction project document are generated through a preset question and answer generation model; wherein the preset question and answer generation information includes at least one of question type, question difficulty, answer format, extraction rules, question template, and answer template.
[0006] According to a construction engineering document processing method provided by the present invention, based on the preset question and answer generation information, questions related to the construction engineering document are generated by a preset question and answer generation model, including: Prompt information is generated based on the preset question and answer generation information, and based on the prompt information, questions related to the construction engineering document are generated through a preset question and answer generation model; wherein the prompt information includes at least one of a scenario, a task, and a restriction condition.
[0007] According to a construction engineering document processing method provided by the present invention, extracting text key information and graphic key information in the construction engineering document and matching the text key information and the graphic key information include: Determining the file format of the construction engineering document, and determining a corresponding target information extraction strategy according to the file format; Extracting text key information and graphic key information in the construction engineering document based on the target information extraction strategy; The graphic key information is matched with the text key information, and associated based on the matching result.
[0008] According to a construction engineering document processing method provided by the present invention, after associating the question and the answer to form a question-answer pair, the method further includes: Obtaining chapter information of the construction engineering document, and determining the number of question-answer pairs to be extracted based on the chapter information; The corresponding target question-answer pair is extracted based on the number of question-answer pairs extracted.
[0009] According to a construction engineering document processing method provided by the present invention, the preprocessing of the construction engineering document comprises: Recognize the construction engineering document based on optical character recognition technology, and convert the recognition result into text format to obtain text information; Analyzing the layout structure of the construction engineering document to obtain analysis results; The text information is segmented based on the analysis result to obtain a plurality of document elements, and each of the document elements is classified.
[0010] According to a construction engineering document processing method provided by the present invention, after associating the question and the answer to form a question-answer pair, the method further includes: The question-answer pairs are evaluated.
[0011] The present invention also provides a construction engineering document processing device, comprising: An extraction module is configured to obtain a construction engineering document, pre-process the construction engineering document, extract text key information and graphic key information in the construction engineering document, and match the text key information with the graphic key information; A first generating module is configured to obtain preset question and answer generating information, and generate questions related to the construction engineering document based on the preset question and answer generating information; The second generation module is configured to generate an answer to the question based on the text key information and the graphic key information, and associate the question with the answer to form a question-answer pair.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the construction engineering document processing method described in any one of the above methods is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the construction engineering document processing method as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned construction engineering document processing methods.
[0015] The construction engineering document processing method, device, electronic device and storage medium provided by the present invention adapt to the complexity and diversity of construction engineering documents by extracting text key information and graphic key information from the construction engineering documents. Then, questions related to the construction engineering documents are generated based on the preset question and answer generation information, answers to the questions are generated based on the text key information and graphic key information, the questions and answers are associated to form question and answer pairs, and the generated question and answer pairs can be applied in the model. Through the technical solution provided by the present application, there is no need to manually define rules, no need to annotate in the construction engineering documents, and accuracy is guaranteed at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of the construction engineering document processing method provided by the present invention.
[0018] Figure 2 It is a schematic diagram of an exemplary construction engineering document fragment in word format according to the present invention.
[0019] Figure 3 It is extracted Figure 2A schematic diagram of a construction engineering document fragment after converting the text, formulas in it into HTML format.
[0020] Figure 4 It is a schematic diagram of the result of performing layout analysis on a construction engineering document in an embodiment of the present invention.
[0021] Figure 5 It is a structural schematic diagram of the construction engineering document processing device provided by the present invention.
[0022] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Combine the following Figure 1-Figure 6 The invention describes a construction engineering document processing method, device, electronic equipment and storage medium.
[0025] Figure 1 FIG. 1 is a flowchart of a method for processing construction engineering documents according to an exemplary embodiment. Figure 1 As shown, in an exemplary embodiment, the construction engineering document processing method includes steps 110 to 130, which are described in detail as follows.
[0026] Step 110, obtaining a construction project document, preprocessing the construction project document, extracting text key information and graphic key information in the construction project document, and matching the text key information with the graphic key information.
[0027] In the embodiment of the present invention, a construction engineering document is obtained, and the construction engineering document includes a specification document and a construction drawing document. The construction engineering document is preprocessed, and text key information and graphic key information in the construction engineering document are extracted, and the extracted text key information and graphic key information are matched.
[0028] Step 120, obtaining preset question and answer generation information, and generating questions related to the construction project document based on the preset question and answer generation information.
[0029] In an embodiment of the present invention, the preset question and answer generation information includes at least one of question type, question difficulty, answer format, extraction rules, question template, and answer template, and questions related to the construction project document are generated based on the preset question and answer generation information.
[0030] Step 130, generating an answer to the question based on the text key information and the graphic key information, and associating the question and the answer to form a question-answer pair.
[0031] In an embodiment of the present invention, the generated questions are answered based on the text key information and the graphic key information to obtain the corresponding answers to each question, and the questions and the corresponding answers are associated to obtain question-answer pairs.
[0032] In an embodiment of the present invention, by extracting text key information and graphic key information from a construction project document, questions related to the construction project document are generated based on preset question and answer generation information, answers to the questions are generated based on the text key information and graphic key information, the questions and answers are associated to form question and answer pairs, and the generated question and answer pairs can be applied to the model. Through the technical solution provided by the present application, there is no need to manually define rules, and annotations can be made in construction project documents while ensuring accuracy.
[0033] In an exemplary embodiment of the present invention, the generating of questions related to the construction engineering document based on the preset question and answer generating information includes: Based on the preset question and answer generation information, questions related to the construction project document are generated through a preset question and answer generation model; wherein the preset question and answer generation information includes at least one of question type, question difficulty, answer format, extraction rules, question template, and answer template.
[0034] In an embodiment of the present invention, preset question and answer generation information is set in advance according to the application scenario and document type, that is, the rules and parameters for question and answer generation are set, the preset question and answer generation model is a pre-trained large model, and based on the preset question and answer generation information, questions related to the construction project document are generated by the preset question and answer generation model.
[0035] For example, for normative documents, the rules set in the preset question and answer generation information are: Question types: factual questions, explanatory questions; Answer format: Directly quote the regulatory clauses and provide explanations.
[0036] The parameters set in the preset question and answer generation information are: Extraction rules: Extract one question for each specification; Question templates: “What is…?”, “What is the purpose of…?”; Answer template: “According to…specifications,…”, “…means…”.
[0037] According to the above rules and parameters, for the code clause "Steel structure welding shall meet the following requirements", the question "What requirements should steel structure welding meet?" is generated and the answer "Steel structure welding shall meet the following requirements: ... (quote the content of the code clause)" is generated.
[0038] For the question and answer generation of construction drawing documents, the rules set in the preset question and answer generation information are: Question types: factual questions, application questions; Answer format: Directly quote the drawing content and provide explanations.
[0039] The parameters set in the preset question and answer generation information are: Extraction rules: Extract according to chart type and content; Question templates: "What are the dimensions of...?", "What are the materials of...?", "How should... be constructed?"; Answer template: “According to the drawings,…”, “…refers to…”, “The construction steps of…include…”.
[0040] Based on the above rules and parameters, for the beam component in the construction drawing, the question "What is the size of the beam?" is generated and the answer "The size of the beam is 1000mm x 1000mm x 1000mm (referenced from the drawing content)" is generated.
[0041] Associating key graphic information with key text information: Associating the extracted key graphic information with key text information, for example, matching the elements in the diagram with the descriptions in the text.
[0042] Question and answer generation: Use key information from graphics to assist in question and answer generation, such as generating questions based on the content of the chart and generating answers based on the questions.
[0043] When generating questions based on the text key information, graphic key information can be used for assistance. For example, the graphic elements and text descriptions in the concrete construction drawing are extracted. The size of the beam in the construction drawing is matched with the "beam" in the text description. Then, based on the concrete construction drawing, the question "What is the construction method of concrete?" is generated, and the answer "The construction method of concrete includes pouring, vibrating, curing and other steps" is generated based on the content of the drawing.
[0044] In an exemplary embodiment of the present invention, based on the preset question and answer generation information, questions related to the construction engineering document are generated by a preset question and answer generation model, including: Prompt information is generated based on the preset question and answer generation information, and based on the prompt information, questions related to the construction engineering document are generated through a preset question and answer generation model; wherein the prompt information includes at least one of a scenario, a task, and a restriction condition.
[0045] In the embodiment of the present invention, prompt information is set according to the preset question and answer generation information, such as scenarios, tasks, restrictions, etc. For example, for question and answer generation for specification documents, prompt information "specification retrieval", "engineering construction", etc. is set. Then, questions related to construction engineering documents are generated through the preset question and answer generation model.
[0046] In an exemplary embodiment of the present invention, the extracting text key information and graphic key information from the construction engineering document and matching the text key information and the graphic key information includes: Determining the file format of the construction engineering document, and determining a corresponding target information extraction strategy according to the file format; Extracting text key information and graphic key information in the construction engineering document based on the target information extraction strategy; The graphic key information is matched with the text key information, and associated based on the matching result.
[0047] In the embodiment of the present invention, the file formats of construction engineering documents can be mainly divided into two categories: word format and pdf format. There are corresponding information extraction strategies for different file formats, and the processing procedures of each information extraction are different.
[0048] For architectural engineering documents in word format, the corresponding information extraction strategy is: use the Pandoc tool to convert the architectural engineering documents into HTML format, while retaining formulas, pictures, and tables in the HTML format. Figure 2 and Figure 3 As shown, Figure 2 This is an exemplary construction engineering document fragment in word format. Figure 3 For extraction Figure 2 The formulas and texts in the document are converted into HTML-formatted architectural engineering documents, where: Figure 3 The explanation of the formula symbols in Figure 2 The fragment shown is not mentioned in Figure 2 Extracted from the full text of the corresponding construction engineering document. Extract text key information and graphic key information based on the construction engineering document converted into HTML format.
[0049] For construction engineering documents in PDF format, traditional optical character recognition (OCR) is difficult to recognize complex documents containing charts and formulas. Therefore, the embodiment of the present invention provides a corresponding information extraction strategy. First, PP-Structure (PaddleOCR) is used to analyze the layout of construction engineering documents. Figure 4 As shown, Figure 4 is an example result of layout analysis. PP-Structure can divide the layout into 10 categories. In the embodiment, 7 categories are used, namely title, table, table_caption, text, equation, figure, and figure_caption, which respectively represent title, table, table caption, text, formula, picture, and figure caption. PP-Structure outputs the category information of each area in the construction project document and its corresponding position information (such as coordinate box) to help subsequent OCR processing and chart annotation matching. For the four types of areas, title, table caption, text, and figure caption, traditional OCR technology is used to extract the text content, and the remaining tables, pictures, and formulas are saved by screenshots of bounding boxes for subsequent identification. Construction project documents contain a large number of tables, and the table format may be very complex, with merged cells, cross-page tables, etc. Accurate recognition and processing of tables is crucial to the understanding of construction project documents. For areas identified as tables, the TableOCR tool is used to identify the table and convert the table into HTML format to retain the structural information in the table (such as merged cells) to ensure that the table content is not lost. Figure 4 The "Filter Position" in Table 5 is related to multiple columns, and this information can be retained using HTML code.
[0050] For areas identified as formulas, the MixTeX tool is used to convert the formulas into LaTeX to facilitate text understanding. The LaTeX format can accurately retain the formatting of subscripts, brackets, symbols, etc. in the formula to avoid information loss during OCR recognition. Figure 4 The conversion result of the formula is k_h=\left(251\ t_{50}\right)^{-1.25}, which retains the superscript and subscript information, ensures the integrity of the formula structure, and is suitable for subsequent automated processing and text understanding.
[0051] For image recognition, this embodiment distinguishes different types of images for images with a large amount of text and on-site images and processes them. For images with a large amount of text, the text can be directly obtained using the OCR method. For other types of images, the content of the image and the corresponding image title information are retained to provide context for subsequent annotations and citations.
[0052] After extracting text, pictures, tables, and formulas, you need to match chart annotations. Match charts (such as tables and pictures) with text references in the document to achieve automatic pairing of chart annotations. The text box and chart box information obtained through layout analysis is combined with the reference number in the text (such as " Figure 1 ”, “Table 2”). First, extract the corresponding chart number information from the table, picture, and formula, and use regular expressions to match the chart number reference in the construction engineering document (for example, “ Figure 1 ”, “Table 2”, compare the chart number with the chart number cited in the construction engineering document to ensure that the association is established after matching. After matching the chart number, combine the detailed information of the chart (such as the HTML code of the table, the LaTeX representation of the formula, and the OCR recognition result of the image) to associate the content of the chart with the quoted text and generate a structured data containing the chart number, chart screenshot, formula LaTeX, table HTML content and its corresponding quoted text location. For example: If there is a reference to “ Figure 1 ", and through layout analysis, we get " Figure 1 " Figure 1 ” The corresponding image screenshot is associated with the reference location.
[0053] The above technical means can effectively improve the recognition accuracy of complex diagrams, formulas, tables and pictures in architectural documents, and ensure the accurate association of these elements with text content. Through multimodal information fusion, structured processing of tables and formulas, layout analysis and diagram annotation matching, it can provide support in the automated processing, understanding and retrieval of architectural documents.
[0054] In the embodiments of the present invention, in view of the highly coupled, complex and changeable characteristics of images and texts in construction engineering documents, the above technical means are improved in reducing the demand for manual annotation and improving the efficiency and accuracy of construction engineering document recognition processing.
[0055] In an embodiment of the present invention, extracting text key information and graphic key information from the construction engineering document and matching the text key information and the graphic key information includes: Performing semantic analysis on the construction engineering document to obtain a semantic analysis result; Extracting the key information of the text in the construction engineering document based on the semantic analysis result; Extracting the key information of the graphics in the construction engineering document based on image recognition technology; The graphic key information is associated with the text key information in the construction engineering document.
[0056] In an embodiment of the present invention, a pre-trained large model is used to convert a construction engineering document into a vector representation for semantic understanding. The large model is used to perform semantic analysis on the construction engineering document, such as identifying entities, relationships, events, etc. in the text. Based on the semantic analysis results, the text key information in the construction engineering document is extracted. The graphic key information in the construction engineering document, such as graphic elements, is extracted using image recognition technology. The extracted graphic key information is associated with the text key information in the construction engineering document, such as corresponding the elements in the diagram with the description in the text.
[0057] For example, for specification documents, you can use the big model to analyze the content of the specification clauses and extract the key text information, such as clause number, clause content, scope of application, etc. For construction drawing documents, you can use the big model to analyze the text descriptions in the construction drawings and extract the key text information, such as component name, size, material, etc.
[0058] Among them, when using the big model to perform semantic understanding of construction project documents and automatically extract key text information in the documents, dynamic parameter extraction rules can be adopted, that is, pre-setting the key text information to be extracted, and then based on the semantic understanding of the construction project documents, extract the key parameter information therein and use it for question and answer generation.
[0059] In an embodiment of the present invention, for specific chapters or parts in a construction project document, key text information can be extracted according to the document content and application scenarios, so as to generate corresponding question-answer pairs. Specifically, the content and application scenarios of the construction project document are analyzed to determine the extraction target, that is, the key parameters that need to be extracted, including text key information and / or graphic key information, such as construction period, materials, equipment, personnel, etc. According to the extraction target, set corresponding extraction rules, such as keyword matching, regular expressions, natural language processing technology, etc. Use the extraction rules to extract key parameters from the construction project document, and perform necessary processing, such as numerical calculation, unit conversion, etc. Based on the extracted key parameters, use the large model to generate corresponding question-answer pairs, such as "What is the construction period of this project?", "How much material is needed for this project?", etc.
[0060] In an exemplary embodiment of the present invention, after associating the question and the answer to form a question-answer pair, the method further includes: Obtaining chapter information of the construction engineering document, and determining the number of question-answer pairs to be extracted based on the chapter information; The corresponding target question-answer pair is extracted based on the number of question-answer pairs extracted.
[0061] In the embodiment of the present invention, for different chapters or parts in the construction project document, a predetermined number of question-answer pairs are extracted as target question-answer pairs to ensure full coverage of the document content.
[0062] In one embodiment of the present invention, different dynamic parameters are set for different types of document content to extract text key information and graphic key information, such as construction period, materials, equipment, etc.
[0063] In the embodiment of the present invention, appropriate extraction rules are selected and combined according to application scenarios and user needs to meet different question and answer generation needs.
[0064] For example, to generate a question-answer pair for a construction plan, dynamic parameter extraction can be used to extract the construction plan by setting the construction period as a dynamic parameter to generate the question "What is the construction period of the project?" and the answer "The construction period of the project is 6 months."
[0065] The generation of question-answer pairs for the construction plan can be done by extracting a predetermined number of questions. For example, for the construction process chapter in the construction plan, more than 10 question-answer pairs can be extracted as target question-answer pairs to ensure comprehensive coverage of the process content.
[0066] Specifically, for different chapters or parts of the construction engineering document, the number of question-answer pairs to be extracted is pre-set to ensure full coverage of the document content. Analyze the chapter structure of the construction engineering document and determine the parts where question-answer pairs need to be extracted. Pre-set the number of question-answer pairs to be extracted for each part based on the document content and application scenarios. Use a large model to generate question-answer pairs until the preset number is reached. Based on the question-answer generation results, optimize and adjust the question-answer pairs, such as deleting duplicate questions and answers, supplementing missing questions and answers, etc.
[0067] For example, in the process of generating question-answer pairs for a construction plan, the construction plan usually includes chapters such as construction technology, construction methods, construction process, and construction safety. Ten question-answer pairs are preset for each chapter. A large model is used to generate question-answer pairs until each chapter reaches the preset number. The question-answer pairs are optimized and adjusted, such as deleting duplicate questions and answers and supplementing missing questions and answers.
[0068] In the embodiment of the present invention, through the above steps, the large model can be used to understand the semantics of the construction engineering documents, automatically extract key information, and generate high-quality question-answer pairs according to preset rules and parameters. In addition, charts, formulas and other information can be used to assist in question-answer generation, and the quality of question-answer pair generation can be controlled through prompt information. At the same time, multiple extraction rules are supported to meet different question-answer pair generation requirements.
[0069] In an exemplary embodiment of the present invention, the preprocessing of the construction engineering document comprises: Recognize the construction engineering document based on optical character recognition technology, and convert the recognition result into text format to obtain text information; Analyzing the layout structure of the construction engineering document to obtain analysis results; The text information is segmented based on the analysis result to obtain a plurality of document elements, and each of the document elements is classified.
[0070] In an embodiment of the present invention, optical character recognition (OCR) technology is used to identify text content in a document and convert it into a text format. The layout structure of the construction engineering document is analyzed to identify different document elements in the construction engineering document, such as titles, text, charts, formulas, etc. The construction engineering document is segmented into different document elements, such as separating charts and formulas from text. The segmented document elements are classified, such as dividing the text content into specification clauses, parameters, charts, formulas, etc.
[0071] For example, for specification documents, the document can be divided into document elements such as title, clauses, appendix, etc., and the clause content can be classified. For construction drawing documents, the construction drawings can be divided into graphic elements and text descriptions, and the graphic elements can be classified.
[0072] In an exemplary embodiment of the present invention, after associating the question and the answer to form a question-answer pair, the method further includes: The question-answer pairs are evaluated.
[0073] In an embodiment of the present invention, the generated question-answer pairs may be evaluated to determine the accuracy of the questions, the accuracy of the answers, the relevance of the questions and the answers, the comprehensibility of the questions and the answers, etc.
[0074] The following is a description of the construction engineering document processing device provided by the present invention. The construction engineering document processing device described below and the construction engineering document processing method described above can be referred to each other. It should be noted that the device provided in the following embodiment and the method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, which will not be repeated here.
[0075] In an exemplary embodiment of the present invention, see Figure 5 , Figure 5 A construction engineering document processing device is shown according to an exemplary embodiment, including the following modules.
[0076] The extraction module 510 is configured to obtain a construction engineering document, pre-process the construction engineering document, extract text key information and graphic key information in the construction engineering document, and match the text key information with the graphic key information; A first generating module 520 is configured to obtain preset question and answer generating information, and generate questions related to the construction engineering document based on the preset question and answer generating information; The second generation module 530 is configured to generate an answer to the question based on the text key information and the graphic key information, and associate the question with the answer to form a question-answer pair.
[0077] In an exemplary embodiment of the present invention, the first generating module 520 includes: A generation submodule is configured to generate questions related to the construction engineering document based on the preset question and answer generation information through a preset question and answer generation model; wherein the preset question and answer generation information includes at least one of question type, question difficulty, answer format, extraction rules, question template, and answer template.
[0078] In an exemplary embodiment of the present invention, a submodule is generated, comprising: A generation unit is configured to generate prompt information based on the preset question and answer generation information, and based on the prompt information, generate questions related to the construction engineering document through a preset question and answer generation model; wherein the prompt information includes at least one of a scenario, a task, and a restriction condition.
[0079] In an exemplary embodiment of the present invention, the extraction module 510 includes: A determination submodule configured to determine the file format of the construction engineering document and determine a corresponding target information extraction strategy according to the file format; An extraction submodule, configured to extract text key information and graphic key information from the construction engineering document based on the target information extraction strategy; The association submodule is configured to match the graphic key information with the text key information and associate them based on the matching result.
[0080] In an exemplary embodiment of the present invention, the construction engineering document processing device further includes: An acquisition module configured to acquire chapter information of the construction engineering document and determine the number of question-answer pairs to be extracted based on the chapter information; An extraction module is configured to extract corresponding target question-answer pairs based on the number of question-answer pairs extracted.
[0081] In an exemplary embodiment of the present invention, the extraction module 510 includes: A recognition submodule, configured to recognize the construction engineering document based on optical character recognition technology, and convert the recognition result into a text format to obtain text information; An analysis submodule configured to analyze the layout structure of the construction engineering document to obtain an analysis result; The segmentation processing submodule is configured to segment the text information based on the analysis result to obtain multiple document elements and classify each of the document elements.
[0082] In an exemplary embodiment of the present invention, the construction engineering document processing device further includes: An evaluation module is configured to evaluate the question-answer pair.
[0083] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the construction engineering document processing method, the method comprising: acquiring a construction engineering document, preprocessing the construction engineering document, extracting text key information and graphic key information in the construction engineering document, and matching the text key information with the graphic key information; Acquire preset question and answer generation information, and generate questions related to the construction project document based on the preset question and answer generation information; An answer to the question is generated based on the text key information and the graphic key information, and the question and the answer are associated to form a question-answer pair.
[0084] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0085] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the construction engineering document processing method provided by the above methods, the method includes: obtaining a construction engineering document, preprocessing the construction engineering document, extracting text key information and graphic key information in the construction engineering document, and matching the text key information with the graphic key information; Acquire preset question and answer generation information, and generate questions related to the construction project document based on the preset question and answer generation information; An answer to the question is generated based on the text key information and the graphic key information, and the question and the answer are associated to form a question-answer pair.
[0086] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the construction engineering document processing method provided by the above methods, the method comprising: obtaining a construction engineering document, preprocessing the construction engineering document, extracting text key information and graphic key information in the construction engineering document, and matching the text key information with the graphic key information; Acquire preset question and answer generation information, and generate questions related to the construction project document based on the preset question and answer generation information; An answer to the question is generated based on the text key information and the graphic key information, and the question and the answer are associated to form a question-answer pair.
[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A construction engineering document processing method, characterized in that: include: Acquire a construction engineering document, pre-process the construction engineering document, extract text key information and graphic key information from the construction engineering document, and match the text key information with the graphic key information; Acquire preset question and answer generation information, and generate questions related to the construction project document based on the preset question and answer generation information; An answer to the question is generated based on the text key information and the graphic key information, and the question and the answer are associated to form a question-answer pair.
2. The construction engineering document processing method according to claim 1, characterized in that: The generating of questions related to the construction engineering document based on the preset question and answer generating information includes: Based on the preset question and answer generation information, questions related to the construction project document are generated through a preset question and answer generation model; wherein the preset question and answer generation information includes at least one of question type, question difficulty, answer format, extraction rules, question template, and answer template.
3. The construction engineering document processing method according to claim 2, characterized in that: Based on the preset question and answer generation information, questions related to the construction engineering document are generated by a preset question and answer generation model, including: Prompt information is generated based on the preset question and answer generation information, and based on the prompt information, questions related to the construction engineering document are generated through a preset question and answer generation model; wherein the prompt information includes at least one of a scenario, a task, and a restriction condition.
4. The construction engineering document processing method according to claim 1, characterized in that: The extracting of the text key information and the graphic key information in the construction engineering document and matching the text key information and the graphic key information includes: Determining the file format of the construction engineering document, and determining a corresponding target information extraction strategy according to the file format; Extracting text key information and graphic key information in the construction engineering document based on the target information extraction strategy; The graphic key information is matched with the text key information, and associated based on the matching result.
5. The construction engineering document processing method according to claim 1, characterized in that: After associating the question and the answer to form a question-answer pair, the method further includes: Obtaining chapter information of the construction engineering document, and determining the number of question-answer pairs to be extracted based on the chapter information; The corresponding target question-answer pair is extracted based on the number of question-answer pairs extracted.
6. The construction engineering document processing method according to any one of claims 1 to 5, characterized in that: The preprocessing of the construction engineering document comprises: Recognize the construction engineering document based on optical character recognition technology, and convert the recognition result into text format to obtain text information; Analyzing the layout structure of the construction engineering document to obtain analysis results; The text information is segmented based on the analysis result to obtain a plurality of document elements, and each of the document elements is classified.
7. The construction engineering document processing method according to any one of claims 1 to 5, characterized in that: After associating the question and the answer to form a question-answer pair, the method further includes: The question-answer pairs are evaluated.
8. A construction engineering document processing device, characterized in that: include: An extraction module is configured to obtain a construction engineering document, pre-process the construction engineering document, extract text key information and graphic key information in the construction engineering document, and match the text key information with the graphic key information; A first generating module is configured to obtain preset question and answer generating information, and generate questions related to the construction engineering document based on the preset question and answer generating information; The second generation module is configured to generate an answer to the question based on the text key information and the graphic key information, and associate the question with the answer to form a question-answer pair.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the construction engineering document processing method as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the construction engineering document processing method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Server, information providing method of server, display apparatus, controlling method of display apparatus and information providing system
CN106664450A
Question and answer pair extraction method and device, electronic equipment and storage medium
CN117407502A
Building standard knowledge question and answer model construction method, computer program product, storage medium and electronic equipment
CN118296118A
MULTIDIMENSIONAL PROCESSING OF PARTICIPATORY PRODUCTION QUESTIONS AND ANSWERS BASED ON ONTOLOGIES
FR3103936A1
Cited By
Information processing method and device, electronic equipment and storage medium
CN122220016A