Event automatic extraction method for construction quality design specification
By cleaning the data of building construction quality specifications and identifying event trigger words using deep learning models, and combining this with clustering algorithms to generate event datasets, the problem of difficulty in obtaining construction quality specification datasets has been solved, and efficient automatic event extraction and data utilization have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2023-05-31
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, it is difficult to obtain data sets of building construction quality standards, which makes research on automated detection difficult, requires a large amount of preliminary work, and affects research efficiency and effectiveness.
By acquiring the original standard text, performing data cleaning and preliminary segmentation, using a deep learning model to identify event trigger words, and processing single and multiple trigger words, the event dataset is generated by combining the K-means++ clustering algorithm and the jieba word segmenter, and a database is established with formulas and tables referenced.
It enables automatic extraction of events from building construction quality design specifications, generates event datasets, supports subsequent event graph generation, visualization, and question-and-answer system construction, and improves detection efficiency and data utilization.
Smart Images

Figure CN116628126B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of big data processing technology and relates to an automatic event extraction method for construction quality design specifications. Background Technology
[0002] The quality of construction projects directly affects the speed of construction, as well as the durability, reliability, and practicality of buildings. It also affects the economic and social benefits of enterprises, and even more so, the safety of people's lives and property.
[0003] In the architecture, engineering, and construction (AEC) industry, the entire lifecycle of the built environment is governed by various regulations, requirements, and standards, and building projects must be inspected against numerous building codes. Manual inspection methods are extremely time-consuming, making automated code inspection a key focus for researchers. Furthermore, automated inspection requires an effective dataset to perform code inspections.
[0004] Although there are many existing building code inspection documents, only a few publicly available Chinese building datasets with small data volumes and clear data targeting are available for current research on automatic code inspection. Moreover, code datasets specific to construction quality are extremely difficult to find. The lack of publicly available datasets requires a lot of preliminary work, which hinders the rapid progress of research, reduces the effectiveness of research, and may even prevent research from being carried out. Summary of the Invention
[0005] The purpose of this invention is to provide an automatic event extraction method for construction quality design specifications. This method can realize the event-based processing of construction quality design specifications in the construction field, thereby generating an event dataset.
[0006] The technical solution adopted in this invention is an automatic event extraction method for construction quality design specifications, the steps of which are as follows:
[0007] Step 1: Obtain the original specification text;
[0008] Step 2: Clean the text obtained in Step 1 and remove useless sentences;
[0009] Step 3: Use periods to perform preliminary segmentation on the text processed in Step 2 to obtain a complete event description;
[0010] Step 4: Use a deep learning model to identify event trigger words;
[0011] Step 5: Handle the cases where the event has a single trigger word and the case with multiple trigger words respectively;
[0012] Step 6: Supplement the event semantics based on the processing results of Step 5;
[0013] Step 7: Establish a database based on the results obtained in Step 6;
[0014] Step 8: Reference the formulas and tables contained in the event in the database by querying.
[0015] The invention is further characterized by:
[0016] In step 1, the original code texts are obtained by crawling from the construction standards website and from paper building code books.
[0017] In step 4, the deep learning model is the Bert+BiLSTM+CRF model. The output of the model is the current event sentence and the labels of the characters in the sentence. There are two cases: the current event sentence contains only one event trigger word (single trigger word) and the current event sentence contains multiple event trigger words (multiple trigger words). The event trigger word is the marker of the existence of the event and mainly exists in the form of predicates.
[0018] In step 5, for a single trigger word, which can independently support a complete semantic expression of the event, the current independent and complete event can be directly output;
[0019] For multiple trigger words, the colons, semicolons, and commas contained within them are identified and segmented sequentially.
[0020] The processing of colons, semicolons, and commas in multiple trigger words in step 5 is as follows:
[0021] Step A) For the segmentation of the colon, the colon is used as the dividing line of the event. It is determined whether the sentence after the colon is a complete event. If the sentence after the colon is a complete event, the result is obtained directly through segmentation. If the sentence after the colon is not a complete event, the subject of the sentence before the colon is obtained as a candidate to supplement the subject of the incomplete event after the colon. The incomplete event is supplemented by selecting the best candidate. The selection criterion is to select the one with the highest cosine similarity, as shown in the following formula (1):
[0022]
[0023] Where A and B represent sentence vector A and sentence vector B, A·B represents the dot product of the two vectors, and ||A|| and ||B|| represent the magnitudes of the two vectors, respectively;
[0024] Step B) For the semicolon segmentation, the semicolon is used as the dividing line of the event. It is determined whether each clause can be an event independently. When a clause cannot be an event independently, the highest cosine similarity between clauses and the subject supplementation method in step A) are used to complete the semantic supplementation of the event, and finally the event segmentation and extraction are completed.
[0025] Step C involves processing the comma segmentation. Using the comma as the event delimiter, the process identifies whether a trigger word exists in each segmented sentence. If no trigger word exists in a segmented sentence, the current sentence is considered the next sentence or a state event of the event; otherwise, it is considered a separate event.
[0026] Then determine whether it is a complete event. If it is complete, check the next sentence. If it is incomplete, use the subject supplementation method in step B) to complete the semantic supplementation of the event.
[0027] In step 6, the K-means++ clustering algorithm is used to mine the unit of measurement table and the term of measurement table. Event sentences containing units of measurement are matched out, and the jieba word segmenter is used to segment words to obtain units of measurement. The K-means++ clustering algorithm is then used to cluster the units of measurement and the terms of measurement to obtain the clustering results. Based on the events with units of measurement and terms of measurement, the number of connections between the terms of measurement and terms of measurement is counted. The clustering results of the terms of measurement and terms of measurement are then linked one-to-one. After nouns and before verbs, and after nouns and before stop words in events with units of measurement, new terms of measurement are added based on the clustering and association results. Finally, the Pearson correlation coefficient is used to calculate the similarity between the event sentences after the addition of new terms of measurement and the event sentences before the addition of new terms of measurement. The formula for calculating the Pearson correlation coefficient is as follows:
[0028]
[0029] Where X and Y are the vectors of the event sentences before and after the supplementary measurement terms, respectively, and σ X σ Y μ is the product of the standard deviations of X and Y. X and μ Y The expected values of X and Y are respectively, E[(X-μ) X )(Y-μ Y )] represents the covariance of variables X and Y.
[0030] The beneficial effects of this invention are that it automatically extracts events from construction quality design specifications in the building field, obtains event datasets and formulas and tables mentioned in the events, and establishes a database for subsequent tasks such as event graph generation, visualization, event prediction, question-and-answer system construction, and on-site media monitoring. Attached Figure Description
[0031] Figure 1 This is a general block diagram of the automatic event extraction method for the construction quality design specification of the present invention;
[0032] Figure 2 This is a flowchart of colon recognition, event segmentation, and event processing for the standard event sentence in the automatic event extraction method of the construction quality design specification of this invention;
[0033] Figure 3 This is a flowchart of semicolon recognition, event segmentation, and event processing in the automatic event extraction method of the construction quality design specification of this invention;
[0034] Figure 4 This is a flowchart of comma recognition, event segmentation, and event processing in the automatic event extraction method of the construction quality design specification of this invention. Detailed Implementation
[0035] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0036] Example 1
[0037] The automatic event extraction method for the construction quality design specification of this invention has the following process: Figure 1 As shown, the specific steps include the following:
[0038] Step 1: Obtain the original text of the building design code, which has relatively uniform characteristics of conciseness, terminology, and standardization. This can be done by crawling from the building standards website or obtaining the required original text from printed building code books. For example, taking the printed book "Standard for Acceptance of Construction Quality of Railway Concrete Engineering" as an example, the original text can be obtained by taking photos to recognize the text and manually sorting and merging it.
[0039] Step 2 involves data cleaning of the acquired data. For each specification, remove "useless sentences" such as titles, prefaces, and general provisions that lack specific target audience or actual specification requirements and cannot be used for review. For example, remove the specification stating that "the compilation of various quality inspection reports, inspection and acceptance records, and other engineering technical data for railway concrete and masonry engineering shall comply with relevant regulations and shall implement a system of signature confirmation by the responsible person." Also remove erroneous sentences and blanks that may have occurred during the specification acquisition process, such as printing errors in printed books or errors in website specification recognition leading to incorrect information retrieval, including errors in recognizing Chinese and English symbols, and omissions or misuse of symbols.
[0040] Step 3: Use periods to initially segment the original specification text, simplifying the semantic information of the design specification and obtaining simple or complex independent and complete event expressions from the initial segmentation. For example, segment the specification "When the mortar bar expansion rate of aggregate is greater than or equal to 0.20% and less than 0.30%, in addition to the concrete alkali content meeting the requirements of Table 6.3.2, technical measures such as adding mineral admixtures to inhibit alkali-aggregate reaction should be adopted, and the inhibition should be proven effective by testing. The test method for the effectiveness of inhibiting alkali-aggregate reaction should be carried out in accordance with Railway Concrete TB / T 3275" into "When the mortar bar expansion rate of aggregate is greater than or equal to 0.20% and less than 0.30%, in addition to the concrete alkali content meeting the requirements of Table 6.3.2, technical measures such as adding mineral admixtures to inhibit alkali-aggregate reaction should be adopted, and the inhibition should be proven effective by testing" and "The test method for the effectiveness of inhibiting alkali-aggregate reaction should be carried out in accordance with Railway Concrete TB / T 3275".
[0041] Step 4, trigger word recognition, uses the deep learning model BERT+BiLSTM+CRF to identify event trigger words. The deep learning model architecture mainly consists of three parts: BERT, BiLSTM, and CRF. The model parameters use default parameters and are fine-tuned to some extent during the training process for trigger word recognition. The training, validation, and experimental sets are obtained from the preliminary simplified results of Step 3, split in an 8:2:1 ratio. The experimental output of the model is the current event sentence and the labels of its characters, with two possible cases: the current event sentence contains only one event trigger word and the current event sentence contains multiple event trigger words. Event trigger words are markers of the existence of an event and mainly exist in the form of predicates. For example, the standard "The cumulative steam curing and subsequent wet curing time of reactive powder concrete shall not be less than 7 days" contains one event trigger word "should not be less than". The standard "Coarse aggregate should be clean crushed stone with good particle shape, reasonable gradation, firm texture, low water absorption and small coefficient of linear expansion. C40 and below concrete without tensile and fatigue resistance requirements can also use crushed stone that meets the requirements" contains two event trigger words "select" and "adopt".
[0042] Step 5: Process the single-trigger words and multiple-trigger words that existed in Step 4 again.
[0043] Step 5.1: The appearance of a single trigger word means that the event does not have a complex logical relationship and can independently support the complete semantic expression of the event. The current independent and complete event can be directly output.
[0044] Step 5.2: Multiple trigger words often contain colons, semicolons, and commas. Therefore, the colons, semicolons, and commas contained within are identified and segmented. For each of these three cases, a preliminary segmentation result is processed sequentially: the result of colon segmentation is used as input for semicolon segmentation, and the result of semicolon segmentation is used as input for comma segmentation. When these three symbols are not present, the following processing is unnecessary, and even if the following processing is performed, it will not change the final result; the final result is still the original event sentence containing multiple trigger words. This event is also a complete event expression and can be stored directly.
[0045] Step 5.2.1, colon segmentation, using colons as event separators. The standardization process for colon recognition, event segmentation, and event handling in event sentences is as follows: Figure 2 As shown. Determining whether the sentence after the colon is a complete event involves a binary classification operation (using the deep learning model BERT to judge the completeness of a single sentence; the core of this judgment is whether the current sentence lacks a subject; if it does not lack a subject, it is a complete event). If the sentence after the colon is a complete event, it is directly segmented to obtain the result; if the sentence after the colon is not a complete event, the subject of the sentence before the colon is obtained as a candidate to supplement the subject of the incomplete event after the colon, and the incomplete event is then selected from the candidates to complete the event. When determining whether the event after the colon is a complete event, it is necessary to start from the first clause. Clauses are obtained one by one from the meta-event clause set. The meta-event clause set is formed by trigger word identification; that is, trigger words are identified in the sentences segmented by commas and semicolons, and if a clause contains a trigger word, it is stored in the meta-event clause set. Then, the binary classification operation described above is used to determine whether the clause is a complete event. If it is a complete event, the next clause is checked; otherwise, the loop ends directly. By recognizing the trigger word of the single clause before the colon, the subject before the colon is directly placed into the subject supplement candidate. The subject of the complete event clause preceding the incomplete event in the meta-event clause set is also placed into the subject supplement candidate. The subject supplement for the incomplete event is selected from the candidates. If the candidate only contains the subject before the colon, it is directly added to the incomplete event. If there are multiple candidates, cosine similarity calculation based on Word2Vec is used to select the candidate with the highest similarity.
[0046] Based on Word2Vec, cosine similarity calculation first involves word segmentation of the sentence, training word vectors using Gensim's Word2Vec algorithm to obtain the word vector for each word, then summing all the word vectors and averaging them to obtain the sentence vector. Finally, the cosine value of the two sentence vectors is calculated using the following formula:
[0047]
[0048] Where A and B represent sentence vector A and sentence vector B, A·B represents the dot product of the two vectors, and ||A|| and ||B|| represent the magnitudes of the two vectors, respectively. θ is the angle between sentence vector A and sentence vector B.
[0049] Step 5.2.2, semicolon segmentation: using semicolons as event separators. The standardization process for semicolon recognition, event segmentation, and event processing for event sentences is as follows: Figure 3 As shown. Similarly, to determine whether each clause can stand alone as an event, a binary classification operation is used (the BERT deep learning model is used to determine the completeness of a single sentence; the core of this determination is whether the current sentence lacks a subject; if it does not lack a subject, it is a complete event). When a clause cannot stand alone as an event, the similarity between clauses and the subject supplementation method in step 5.2.1 are used to complete the semantic supplementation of the event, ultimately completing the event segmentation and extraction. The input in this step is the result of step 5.2.1. After segmentation using semicolons, the meta-event clause set is obtained for each clause based on commas, incomplete events are identified, and subject supplementation within a clause is performed once. The difference from step 5.2.1 in subject supplementation is that when multiple candidates exist, and these candidates are used sequentially as subjects for supplementation, and cosine similarity based on Word2Vec is used for calculation, the calculation objects include not only the original text and the supplemented text, but also the inter-clause similarity, i.e., the supplemented clause and the preceding clause.
[0050] Step 5.2.3, comma segmentation, using commas as event separators. The standardization process for comma recognition, event segmentation, and event processing in event sentences is as follows: Figure 4 As shown. The process identifies whether a trigger word exists in each segmented sentence. If no trigger word exists, the current sentence is considered the next sentence or a state event of the event. If a trigger word exists, it is considered a separate event, and then it is determined whether it is a complete event (the BERT deep learning model is used to determine the completeness of a single sentence; the core of this determination is whether the current sentence lacks a subject; if it does not lack a subject, it is a complete event). If complete, the next sentence is checked; if incomplete, the subject supplementation method in step 5.2.2 is used to complete the semantic supplementation of the event. The input in this step is the result of step 5.2.2, which is segmented using commas, trigger words are identified, and the completeness of the event is determined. When a subject needs to be supplemented, the supplemented subject comes from subject supplementation candidates, which are the subjects of all previous complete events within the sentence of the event to be supplemented. Similar to the supplementation method in step 5.2.2, cosine similarity calculation based on Word2Vec is used, with the calculation objects being the original text and the supplemented text, and the previous sentence and the supplemented sentence.
[0051] Based on the current processing results, event sentences are filtered out, and event sentences that need to be supplemented with event semantics are selected by using rule matching (providing a set of regular expressions to match event sentences with fixed rule templates).
[0052] Step 6: Semantic Supplementation of Events. The K-means++ clustering algorithm is used to mine a table of units of measurement and a table of terms of measurement, as shown in Table 1. Event sentences containing units of measurement are matched, and the jieba word segmenter is used to segment the words to obtain the terms and units of measurement. The K-means++ clustering algorithm is then used to cluster the terms and units of measurement to obtain the clustering results. Based on the events with both units of measurement and terms of measurement, the number of connections between the terms and units of measurement is statistically analyzed, and the clustering results of the terms and units of measurement are linked one-to-one. After nouns and before verbs, and after nouns and before stop words in events containing units of measurement, terms of measurement are supplemented based on the clustering and association results. Finally, the Pearson correlation coefficient is used to calculate the similarity between the event sentences with supplemented terms and the event sentences without supplementation, improving the expressive power of the events.
[0053] Step 7: Database Establishment. Based on the complete events obtained and supplemented in Steps 5 and 6, as well as the formulas and tables included in the specification, a database is established to store the obtained events and the formulas and tables included in the specification. Specifically, this includes the single minimum event after specification processing; a single minimum event refers to a sentence that does not contain colons, semicolons, or commas and can independently support the expression of a complete semantic event; formulas in the specification; and the content of tables in the specification.
[0054] Step 8: Referencing Formulas and Tables. Formulas and tables contained in the event are referenced in the database through a query. That is, when a required specification contains a formula or table, that formula or table can be queried and referenced in the database by name.
[0055] Example 2
[0056] Building upon Example 1, in step 4, the BERT model, short for Bidirectional Encoding Representation from Transformers, is constructed from 12 stacked Transformer Encoder layers. Each Transformer Encoder is built upon Multi-head Self-Attention by adding Residual Connections, Layer Normalization, and linear transformations. The model input is obtained by querying a word vector table to convert each character in the text into a one-dimensional vector, connecting the position vector and the text vector. The model output is the word embedding vector after the Transformer.
[0057] BiLSTM stands for Bidirectional Long Short-Term Memory Network. Its structure consists of bidirectional LSTMs, and the input results of the two LSTMs are concatenated and output through a fully connected layer.
[0058] That is, the model inputs word vectors into a bidirectional LSTM, learns contextual information, and finally outputs the score probability of each word corresponding to each label.
[0059] CRF stands for Conditional Random Field. It uses the output of all BiLSTMs as input to the CRF layer, decodes the sequential dependencies between labels by learning them, calculates the optimal label sequence, and obtains the final BIO label prediction result.
[0060] Example 3
[0061] Based on Example 2, the specific process of the clustering algorithm in step 6 is as follows:
[0062] The K-means++ clustering algorithm randomly selects one sample from the metric and one from the unit of measurement as initial cluster centers c1 and c1', respectively; calculates the shortest distance between each sample and existing cluster centers, denoted by D(x) and D(x'); and calculates the probability that each sample will be selected as the next cluster center. and Where X and X' are the sets of measurement terms and units of measurement, respectively; repeat the above steps until K and K' cluster centers are selected; for each sample x in the measurement terms and units of measurement... i and x i ', calculate their distances to K and K' cluster centers respectively and assign them to the class corresponding to the cluster center with the smallest distance; for each class c i and c i ', recalculate its cluster centers and Repeat the first two steps until the positions of the cluster centers no longer change. Output the clustering results.
[0063] The formula for calculating the Pearson correlation coefficient is:
[0064]
[0065] Where X and Y are the vectors of the event sentences before and after the supplementary measurement terms, respectively, and σ X σ Y μ is the product of the standard deviations of X and Y. X and μ Y The expected values of X and Y are respectively, E[(X-μ) X )(Y-μ Y )] represents the covariance of variables X and Y.
[0066] Table 1. Correspondence between units of measurement and measurement terms
[0067]
Claims
1. An automatic event extraction method for construction quality design specifications, characterized in that: The steps are as follows: Step 1: Obtain the original specification text; In step 1, the original standard text is obtained by crawling from the construction standard website and from paper building code books; Step 2: Clean the text obtained in Step 1 and remove useless sentences; Step 3: Use periods to perform preliminary segmentation on the text processed in Step 2 to obtain a complete event description; Step 4: Use a deep learning model to identify event trigger words; In step 4, the deep learning model is a Bert+BiLSTM+CRF model. The output of the model is the current event sentence and the labels of the characters in the sentence. There are two cases: the current event sentence contains only one event trigger word (single trigger word) and the current event sentence contains multiple event trigger words (multiple trigger words). The event trigger word is the marker of the existence of the event and mainly exists in the form of predicates. Step 5: Handle the cases where the event has a single trigger word and the case with multiple trigger words respectively; In step 5, for a single trigger word, which can independently support the complete semantic expression of the event, the current independent and complete event can be directly output; For multiple trigger words, the colons, semicolons, and commas contained within them are identified and segmented sequentially; The processing of colons, semicolons, and commas in multiple trigger words in step 5 is as follows: Step A) For the segmentation of the colon, the colon is used as the dividing line of the event. It is determined whether the sentence after the colon is a complete event. If the sentence after the colon is a complete event, the result is obtained directly through segmentation. If the sentence after the colon is not a complete event, the subject of the sentence before the colon is obtained as a candidate to supplement the subject of the incomplete event after the colon. The incomplete event is supplemented by selecting the best candidate. The selection criterion is to select the one with the highest cosine similarity, as shown in the following formula (1): (1); Where A and B represent sentence vector A and sentence vector B, A·B represents the dot product of the two vectors, and ||A|| and ||B|| represent the magnitudes of the two vectors, respectively; Step B) For the semicolon segmentation, the semicolon is used as the dividing line of the event. It is determined whether each clause can stand alone as an event. When a clause cannot stand alone as an event, the highest cosine similarity between clauses and the subject supplementation method in step A) are used to complete the semantic supplementation of the event, and finally the event segmentation and extraction are completed. Step C involves processing the comma segmentation. Using the comma as the event delimiter, the process identifies whether a trigger word exists in each segmented sentence. If no trigger word exists in a segmented sentence, the current sentence is considered the next sentence or a state event of the event; otherwise, it is considered a separate event. Then determine whether it is a complete event. If it is complete, check the next sentence. If it is incomplete, use the subject supplementation method in step B) to complete the semantic supplementation of the event. Step 6: Supplement the event semantics based on the processing results of Step 5; In step 6, the K-means++ clustering algorithm is used to mine the unit of measurement table and the term of measurement table. Event sentences containing units of measurement are matched out, and the jieba word segmenter is used to segment words to obtain units of measurement. The K-means++ clustering algorithm is then used to cluster the units of measurement and the terms of measurement to obtain the clustering results. Based on the events with units of measurement and terms of measurement, the number of connections between the terms of measurement and terms of measurement is counted. The clustering results of the terms of measurement and terms of measurement are then linked one-to-one. After nouns and before verbs, and after nouns and before stop words in events with units of measurement, additional terms of measurement are added based on the clustering and association results. Finally, the Pearson correlation coefficient is used to calculate the similarity between the event sentences after the addition of terms of measurement and the event sentences before the addition. The formula for calculating the Pearson correlation coefficient is as follows: (2); Where X and Y are the vectors of the event sentence before and after the supplementary measurement terms, respectively. The product of the standard deviations of X and Y and Let X and Y be the expected values, respectively. Let X be the covariance of variables X and Y. Step 7: Establish a database based on the results obtained in Step 6; Step 8: Reference the formulas and tables contained in the event in the database by querying.
Citation Information
Patent Citations
Knowledge graph construction-oriented text time extraction and standardization method
CN108304523A
Causal event map construction method, system and device and storage medium
CN109726293A
Rail transit event knowledge graph construction method based on deep learning
CN111597350A