Association method and device for specification terms and attached drawings of building specification document and medium

By constructing a vector topology map using edge detection and text detection technologies, and combining it with semantic parsing to calculate the relevance score, the problem of automatically associating attached drawings and clauses in building code documents was solved, achieving efficient and accurate image-text matching and retrieval.

CN121525699APending Publication Date: 2026-02-13山东浪潮智慧建筑科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511777694.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In existing building code documents, the association between the attached drawings and the code clauses mainly relies on manual numbering, without structured binding. Users need to browse through each chapter when searching, which can easily lead to missing key information.

Method used

By using edge detection algorithms and text detection networks to perform hierarchical processing on the attached figures, a vector topology map is constructed. The text of the specification clauses is then subjected to structured semantic parsing, and a correlation score is calculated to achieve automatic association between the specification clauses and the attached figures.

Benefits of technology

It achieves quantitative matching between standard clauses and attached diagrams, ensuring matching accuracy, forming a structured relationship between text and images, supporting bidirectional retrieval and efficient application, and avoiding omissions caused by manual numbering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525699A_ABST
    Figure CN121525699A_ABST
Patent Text Reader

Abstract

The invention discloses an association method and device for specification terms and attached drawings of a building specification document and a medium. The method comprises the steps that a specification term text set and an attached drawing set are extracted from the building specification document; performing hierarchical processing on each attached drawing in the attached drawing set through a preset edge detection algorithm and a text detection network to obtain a structural layer and a labeling layer of each attached drawing so as to construct a vector topological graph of each attached drawing; performing structured semantic analysis processing on each standard clause in the standard clause text set, and extracting a building domain entity and constraint relationship in the standard clause text to obtain a semantic feature vector and a structural constraint set of each standard clause text; calculating an association degree score of each standard clause text and the vector topological graph; and according to the association degree score, carrying out association processing on the document specification terms and the attached drawings. According to the method, the structured image-text association relationship of the building specification document is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of building information modeling and intelligent document processing technology, and in particular to a method, device and medium for associating building code document specifications and accompanying drawings. Background Technology

[0002] Building codes are formal technical documents in the construction industry that stipulate the technical standards, safety requirements, and operating guidelines for the entire process of engineering design, construction, acceptance, operation, and maintenance. Their content typically consists of textual descriptions of code clauses and corresponding graphic illustrations.

[0003] However, in most current domestic and international building code documents, the graphic illustrations are often embedded in the document as scanned bitmaps. The association between the illustrations and the code clauses mainly relies on manual numbering and lacks structured binding. Users need to search through chapters one by one when searching, which makes it easy to miss key information. Summary of the Invention

[0004] This application provides a method, device, and medium for linking building code documents with standard clauses and drawings, which addresses the problem that the association between existing building code documents and standard clauses mainly relies on manual numbering, lacks structured binding, and requires users to browse through chapters one by one when searching, making it easy to miss key information.

[0005] The embodiments of this application adopt the following technical solutions: On the one hand, embodiments of this application provide a method for associating building code document clauses with accompanying drawings, the method comprising: Extract the text set of standard clauses and the set of attached drawings from the building code documents; the text set of standard clauses and the set of attached drawings record the location information and the identifier of each standard clause and each attached drawing in the building code documents; The attached figures in the attached figure set are processed in layers by using a preset edge detection algorithm and text detection network to obtain the structural layer and annotation layer of each attached figure, so as to construct the vector topology map of each attached figure. The structured semantic parsing process is performed on each normative clause in the text set of normative clauses to extract the entities and constraints in the architectural domain from the text of the normative clauses, so as to obtain the semantic feature vector and structural constraint set of each normative clause text; Calculate the correlation score between the text of each specification clause and the vector topology diagram; Based on the aforementioned relevance score, the document specification clauses and accompanying drawings are associated.

[0006] In one example, the step of performing layered processing on each figure in the figure set using a preset edge detection algorithm and text detection network to obtain the structural layer and annotation layer of each figure, in order to construct a vector topology map of each figure, specifically includes: Edge information is extracted from each attached drawing using a preset optimized edge detection algorithm to obtain the structural layer of each attached drawing; the structural layer contains multiple independent structural elements, each structural element corresponding to a complete building component main structural line unit in the attached drawing; The annotated regions in each of the attached figures are identified and located using a text detection network. Extract the annotation content of the annotation area, associate the annotation area with the corresponding annotation content to obtain the annotation layer; the annotation layer includes multiple independent annotation elements, each annotation element corresponds to a complete annotation area and the annotation content within that area in the attached figure; By parsing the structural layer and the annotation layer, a vector topology diagram of each figure is constructed.

[0007] In one example, the step of constructing a vector topology diagram for each attached figure by parsing the structural layer and the annotation layer specifically includes: Traverse each independent structural element in the structural layer, identify the line segments in the structural element through a line detection algorithm, and obtain the endpoint coordinates, length and direction angle of each line segment; The curve segments in the structural element are identified and fitted by a curve fitting algorithm to obtain the control vertex coordinates, curvature and extension trajectory of each curve segment; The geometric parameter set of each structural element is constructed based on the endpoint coordinates, length, and direction angle of each straight line segment and the control vertex coordinates, curvature, and extension trajectory of each curve segment. Based on the set of geometric parameters of each structural element, the spatial positional relationship between adjacent structural elements is calculated to determine whether the adjacent structural elements have a topological connection relationship. When topological links exist, an initial connected graph is constructed using structural elements as nodes and topological links as edges. Traverse each independent annotation element in the annotation layer and extract the position coordinates and annotation content of the annotation area corresponding to the annotation element; Based on the position coordinates of the labeled area corresponding to the labeled element and the set of geometric parameters of each structural element, calculate the spatial distance between the labeled element and each structural element. When the spatial distance is less than a preset threshold, the annotation content of the annotation element is supplemented to the associated structural element accordingly; Based on the structural elements after association and supplementation, the initial connected graph is optimized to obtain an optimized initial connected graph. The optimized initial connected graph is converted into vector data format, and the type identifier, complete geometric parameters and topological connection relationships of each structural element are recorded to construct a vector topology graph.

[0008] In one example, the structured semantic parsing of each normative clause in the set of normative clause texts, extracting architectural domain entities and constraint relationships from the normative clause texts to obtain the semantic feature vector and structural constraint set of each normative clause text, specifically includes: Traverse each normative clause in the set of normative clause texts, preprocess the normative clause texts to obtain normative clause text fragments; By using a pre-trained entity recognition model, entity annotation is performed on the text fragments of the normative clauses to obtain the entity set of each normative clause text. By analyzing the syntactic relationships between the text entities of each normative clause, a set of structural constraints for each normative clause is constructed. The semantic feature vectors of each standard clause text are obtained by semantically encoding the pre-processed clause text fragments, the entity set of each standard clause text, and the structural constraint set of each clause text through a pre-trained language model.

[0009] In one example, calculating the correlation score between each specification clause text and the vector topology graph specifically includes: Traverse each structural element in the vector topology graph and convert the attribute information of each structural element into a feature vector to construct a set of vector object vectors corresponding to the vector topology graph; Using a pre-defined vector similarity calculation algorithm, the semantic similarity score between the semantic feature vector of each specification clause and each vector object vector in the vector object vector set is calculated. Based on the attribute information of each structural element in the vector topology diagram and the set of structural constraints of each standard clause text, the constraint matching score between the structural element and the standard clause text is calculated according to preset rules. The correlation score between the text of each specification clause and the corresponding vector object in the vector topology diagram is calculated by weighted summation formula, and the correlation score result between the text of each specification clause and the vector topology diagram is obtained.

[0010] In one example, the process of associating document specification clauses with accompanying drawings based on the relevance score specifically includes: When the correlation score between a certain standard clause text and a certain attached vector topology diagram is greater than or equal to a preset threshold, it is determined that the standard clause text and the attached diagram are initially matched. Establish a mapping relationship between the initially matched attached figures and the text of the specification clauses.

[0011] In one example, the method of associating document specification clauses with accompanying drawings based on the relevance score further includes: If the correlation score between a single specification clause text and multiple attached vector topology diagrams is greater than or equal to a preset threshold, calculate the proportion of structural elements in each attached diagram that match the specification clause text. Establish a mapping relationship between the text of the standard clauses and the attached figures that have the highest proportion of structural elements and the highest relevance score.

[0012] In one example, the method further includes: Obtain the update status data of the building code document; Based on the updated status data, the correlation score between the text of each specification clause and the vector topology diagram is recalculated.

[0013] On the other hand, embodiments of this application provide an apparatus for associating building code document specifications and drawings, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the associativity method for building code document specifications and drawings as described above.

[0014] On the other hand, embodiments of this application provide a non-volatile computer storage medium for associating building code document specifications and drawings, storing computer-executable instructions that can execute any of the above-described methods for associating building code document specifications and drawings.

[0015] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: The method provided in this application extracts the text set of normative clauses and the attached figure set, and records their location information and associated identifiers, providing standardized basic data input for subsequent processing. By calculating a correlation score, it achieves quantitative matching between clauses and vector topology diagrams, solving the problem in existing technologies where text-image association relies on subjective human judgment and lacks objective quantitative basis. Semantic and constraint-based scoring ensures matching accuracy. Based on the correlation score, it establishes an association mapping between clauses and attached figures, addressing the problems in existing technologies where text-image association relies solely on manual numbering, requiring chapter-by-chapter searching for retrieval and easily overlooking key information. This forms a structured text-image association relationship, supporting subsequent bidirectional retrieval and efficient application. Attached Figure Description

[0016] To more clearly illustrate the technical solution of this application, some embodiments of this application will be described in detail below with reference to the accompanying drawings, in which: Figure 1 A flowchart illustrating a method for associating specification clauses and drawings in a building code document, provided as an embodiment of this application; Figure 2 This is a structural schematic diagram of a device associated with a specification clause and an accompanying drawing in a building code document, provided as an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] Some embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0019] Figure 1 This is a flowchart illustrating a method for associating code clauses and accompanying drawings in a building code document, as provided in this application embodiment. This method can be applied to different business domains, and the process can be executed by computing devices in the corresponding domain. Certain input parameters or intermediate results in the process can be manually adjusted to help improve accuracy.

[0020] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a server as an example.

[0021] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.

[0022] Figure 1 The process includes the following steps: S101. Extract the text set and appendix set of the code clauses from the building code documents. The text set and appendix set of the code clauses record the location information and corresponding identifier of each code clause and appendix in the building code document.

[0023] The "Code Clause Text Set" refers to a collection of all textual code clauses in the building code document, organized by chapter and clause number, with each clause containing complete text content. The "Attachment Set" refers to a collection of all attached drawings in the building code document, organized by drawing number and associated with chapter; the attached drawings can be bitmaps or vector graphics.

[0024] For example, first, establish a set of building code document inputs. Each document consists of a chapter set C and an appendix set F.

[0025] To address issues such as noise interference and blurred boundaries in the attached figures, a series of preprocessing operations are performed on the extracted attached figure set F. For example, attached figure F can be represented in matrix form. .

[0026] Unify the recognition resolution to a standard resolution level, for example... To avoid processing errors caused by resolution differences, the threshold is dynamically adjusted when extracting the attached image, and a Gaussian blur algorithm is used to smooth the image. ,in, Dynamic adjustment based on grayscale variance is used to ensure boundary clarity.

[0027] Morphological opening and closing operations are performed to eliminate text noise, and then the closing operation is used to fill the tiny gaps in the component outline, gradually realizing the separation of the main structural lines from the background layer, clearing away interference for subsequent layer processing.

[0028] To further improve the usability of the attached figures, layer detection and normalization are performed on the preprocessed figures. Simultaneously, to ensure data transmission efficiency, an optimized edge detection algorithm is used to extract first-order edge information, resulting in a set of structural layers. Then, a text detection network is used to locate the text annotation areas in the attached diagram, forming an annotation layer set. .

[0029] To avoid cross-interference between the structure layer and the annotation layer, the overlap ratio of the two layers is calculated using a region growing algorithm. When r is less than the preset overlap ratio threshold, the structure layer and the annotation layer are determined to be independent of each other to ensure the purity of information in both layers.

[0030] To ensure high fidelity in subsequent vectorization, the module performs color histogram equalization on the image and generates a layer-normalized information matrix M, whose three-dimensional layered structure is defined as follows: Where B is the background layer, which enables structured storage of the structure layer, annotation layer, and background layer.

[0031] Finally, the processed data is serialized in Protocol Buffer format and transmitted to the vectorization module to ensure the accuracy of image layer separation and provide standardized input for downstream geometric recognition.

[0032] S102. The attached figures in the attached figure set are processed in layers by using a preset edge detection algorithm and text detection network to obtain the structural layer and annotation layer of each attached figure, so as to construct the vector topology map of each attached figure.

[0033] In some embodiments of this application, the figures in the figure set are processed in layers using a preset edge detection algorithm and text detection network to obtain the structural layer and annotation layer of each figure, thereby constructing a vector topology map of each figure, specifically including: Edge information is extracted from each attached image using a pre-defined optimized edge detection algorithm to obtain its structural layer. Each structural layer contains multiple independent structural elements, each corresponding to a complete main structural line unit of a building component in the attached image. Annotated regions in each attached image are identified using a text detection network. The annotation content of each annotated region is extracted, and the annotated regions are associated with their corresponding annotation content to obtain the annotation layer. The annotation layer contains multiple independent annotation elements, each corresponding to a complete annotated region and its annotation content in the attached image. By parsing the structural and annotation layers, a vector topology map of each attached image is constructed.

[0034] The preset optimized edge detection algorithm can be, for example, an improved version of the traditional Canny edge detection algorithm, such as adding Gaussian filtering to enhance smoothness and adaptive threshold adjustment to reduce missed detections. The text detection network is a deep learning-based text region recognition model, such as the EAST text detector.

[0035] For example, by parsing the structural layer and the annotation layer, a vector topology diagram of each attached figure is constructed, specifically including: Each independent structural element in the structural layer is traversed. A line detection algorithm is used to identify line segments within the structural element, obtaining the endpoint coordinates, length, and orientation angle of each line segment. A curve fitting algorithm is then used to identify and fit curve segments within the structural element, obtaining the control vertex coordinates, curvature, and extension trajectory of each curve segment. Based on the endpoint coordinates, length, and orientation angle of each line segment and the control vertex coordinates, curvature, and extension trajectory of each curve segment, a set of geometric parameters for each structural element is constructed. Based on the set of geometric parameters for each structural element, the spatial relationship between adjacent structural elements is calculated to determine whether a topological connection exists between them. When a topological connection exists, an initial connected graph is constructed, with structural elements as nodes and topological connections as edges.

[0036] The algorithm iterates through each independent annotation element in the annotation layer, extracting the position coordinates and annotation content of the corresponding annotation region. Based on the position coordinates of the annotation region and the geometric parameter set of each structural element, the spatial distance between the annotation element and each structural element is calculated. When the spatial distance is less than a preset threshold, the annotation content of the annotation element is added to the associated structural element. Based on the added structural elements, the initial connected graph is optimized to obtain an optimized initial connected graph. The optimized initial connected graph is converted into vector data format, and the type identifier, complete geometric parameters, and topological connection relationships of each structural element are recorded to construct a vector topology graph.

[0037] One example of a line detection algorithm is the Hough transform algorithm, which identifies line segments from structural element lines to obtain a candidate set of lines. Furthermore, the endpoint coordinates can be corrected through least-squares fitting. This improves the accuracy of the line parameters. For the local curved portions of the structuring element, for example, a B-spline interpolation function can be introduced. Perform fitting, where, For B-spline basis functions, To control the vertices, the fitting error must be strictly controlled. This ensures that the curve profile closely matches the shape of the original component.

[0038] During the geometric object parameterization definition phase, a standardized geometric object model is established for each structural element. ,in, For component type identifiers, the value range can include, for example, […]. Commonly used component types in the construction field. It is a set of geometric parameters, which includes not only the endpoint coordinates, length, and direction angle of straight line segments, and the control vertex coordinates, curvature, and extension trajectory of curve segments, but also detailed parameters such as node coordinates and elevation information. The confidence level of primitive recognition and the layer index are recorded to provide a basis for subsequent verification.

[0039] To improve the topological continuity of line segments, an angle similarity-based approach is introduced. The adaptive merging rule merges adjacent line segments with minimal directional differences, eliminating line segment breaks caused by detection errors. Simultaneously, an initial connected graph is constructed based on structural elements. ,in, Let E be the set of nodes, corresponding to the endpoints of line segments or the connection points of components, and let E be the set of edges, corresponding to the line segments themselves. This initial connected graph can be represented by an adjacency matrix. That is, when two line segments are connected, That is, when two line segments are not connected, it intuitively reflects the topological connection status between structural elements.

[0040] Subsequently, the structural element attributes were supplemented and the connectivity graph was optimized by combining the information from the annotation layer. Each independent annotation element in the annotation layer was traversed, and the position coordinates and annotation content of the annotation area were extracted. Based on the center coordinates of the annotation area and the geometric parameter set of each structural element, the spatial distance between them was calculated. When this spatial distance was less than a preset threshold, the annotation content was supplemented into the associated structural element attributes. For example, the annotation content for a 240mm thickness was supplemented into the corresponding wall structural element's attributes. Attribute fields.

[0041] Based on the structural elements supplemented by association, the initial connected graph is optimized. This optimization process may include steps such as: removing isolated nodes with no connections, correcting spurious connections discovered after attribute supplementation, and finally obtaining the optimized connected graph. This optimized connected graph is then converted into a vector data format with a resolution independent of the original image pixels, ensuring lossless scalability and compatibility with the Building Information Modeling (BIM) platform. Simultaneously, the type identifier, complete geometric parameters, and topological connections of each structural element are recorded to construct a standard vector topology graph.

[0042] Furthermore, standard vector topology diagrams can be output as standardized SVG or DXF format vector files. After obtaining the standard vector topology diagram, the geometric attributes and association information of each structural element can be written into a database table, and data access can be accelerated through a hash index mechanism. This standard vector topology diagram not only fully preserves the geometric features and topological relationships of the components in the architectural drawings, but also achieves the integration of graphics and semantics through the association of annotation attributes, providing a high-quality data foundation for subsequent integration with building information modeling platforms and association with code clauses.

[0043] S103. Perform structured semantic parsing on each standard clause in the standard clause text set, extract the building domain entities and constraint relationships in the standard clause text, so as to obtain the semantic feature vector and structural constraint set of each standard clause text.

[0044] In some embodiments of this application, structured semantic parsing is performed on each normative clause in the normative clause text set to extract architectural domain entities and constraint relationships from the normative clause text, so as to obtain the semantic feature vector and structural constraint set of each normative clause text, specifically including: The process involves traversing each normative clause in the text set, preprocessing the clause text to obtain clause text fragments, and then using a pre-trained entity recognition model to annotate these fragments, resulting in entity sets for each clause. By analyzing the syntactic relationships between entities in each clause, a set of structural constraints is constructed for each clause. Finally, a pre-trained language model is used to semantically encode the preprocessed clause text fragments, the entity sets of each clause, and the set of structural constraints, yielding semantic feature vectors for each clause.

[0045] For example, each normative clause in the set of normative clause texts can be traversed. The preprocessing of the normative clause texts may include performing preprocessing operations such as syntactic segmentation, word segmentation, part-of-speech tagging and stop word filtering on the normative clause texts to obtain clean and structured normative clause text fragments, providing high-quality input for subsequent semantic parsing.

[0046] Pre-trained entity recognition models can be, for example, improved BERT-NER models trained on building code corpora, which can annotate pre-processed code clause text fragments to accurately identify sets of building domain entities. Entities can include, for example, engineering component entities, dimensional unit entities, construction process entities, and condition entities, ensuring the accuracy and comprehensiveness of domain entity identification.

[0047] Based on the entity set and corresponding text fragments of each specification clause, a dependency syntax tree is constructed to analyze the syntactic associations and logical relationships between entities, extracting constraint triples consisting of constraint objects, constraint relationships, and constraint content. To enhance structural alignment, a rule template matching algorithm is introduced to identify key constraint expressions in the clauses through regular expression patterns, and all constraints are transformed into a standardized set of structural constraints. ,in, For constraint type, To constrain numerical values, As a constraint unit, a logical relation mapping matrix is ​​also established. In the matrix This indicates that clause i and clause j have a hierarchical or referential relationship, thus achieving a structured and logical expression of the constraint relationship.

[0048] A pre-trained language model specifically designed for the architectural domain is invoked. Preprocessed code clause text fragments, corresponding entity sets, and structural constraint sets are simultaneously input into the model, and the input information is semantically encoded uniformly. The model outputs a 768-dimensional raw vector. The vector is then normalized to ensure consistent vector dimensions and prominent semantic features. The resulting semantic feature vector accurately maps the core semantics and constraints of each specification clause, providing a semantic foundation for subsequent matching.

[0049] For example, the semantic feature vector and structural constraint set of each specification clause can be stored and transmitted in JSON format to ensure data scalability and compatibility with downstream modules.

[0050] S104. Calculate the correlation score between the text of each specification clause and the vector topology diagram.

[0051] In some embodiments of this application, the correlation score between the text of each specification clause and the vector topology graph is calculated, specifically including: Each structural element in the vector topology graph is traversed, and its attribute information is transformed into a feature vector to construct a set of vector object vectors corresponding to the vector topology graph. Using a pre-defined vector similarity calculation algorithm, the semantic similarity score between the semantic feature vector of each specification clause text and each vector object vector in the vector object vector set is calculated. Based on the attribute information of each structural element in the vector topology graph and the structural constraint set of each specification clause text, the constraint matching score between the structural element and the specification clause text is calculated according to pre-defined rules. Finally, a weighted summation formula is used to calculate the correlation score between each specification clause text and its corresponding vector object in the vector topology graph, yielding the correlation score result between each specification clause text and the vector topology graph.

[0052] For example, firstly, each structural element in the vector topology diagram is traversed, and complete attribute information of each structural element is extracted, including component type identifiers, geometric parameters, and attribute labels. Then, a pre-trained model specifically designed for the construction field, which shares the same semantic encoding as the code clauses in the standard, is invoked to map the above attribute information into vector object vectors of uniform dimension. Finally, these are integrated to form the vector object vector set O={O1,O2,…} corresponding to the vector topology diagram, mapped into object vectors. .

[0053] Secondly, a preset vector similarity calculation algorithm is adopted, such as the cosine similarity algorithm. Based on the semantic feature vector of each specification clause text, the semantic similarity between the semantic feature vector and each vector object vector in the vector object vector set is calculated one by one, quantifying the degree of matching between the two in semantic dimensions such as component type and functional attributes. For example, it can be expressed by the following formula (1). (1) in, The dot product of two vectors. , which are the L2 norms of the two vectors respectively. The calculated result is normalized to the range [0,1]. The closer the score is to 1, the higher the semantic matching degree.

[0054] Subsequently, based on the attribute information of the vector object and the structural constraint set of the corresponding specification clauses, the matching score of the two in the geometric parameter conformity dimension is calculated by the ConstraintMatch function according to the preset constraint matching rules. For example, the constraint items related to the current vector object in the clause constraint set are filtered out. Let the total number of related constraint items be m. For each related constraint item k, the actual geometric parameters of the vector object and the standard values ​​of the clause constraints are extracted. The ConstraintMatch function is substituted to calculate the matching contribution value of a single constraint item, and then the overall constraint matching score is obtained by meanization. For example, it can be expressed by the following formula (2). (2) in, As an exponential function, this ensures that the smaller the deviation between the actual parameter and the constraint value, the closer the contribution value is to 1. The larger the deviation, the closer the contribution value is to 0. The final ConstraintMatch score ranges from (0,1], and the higher the score, the higher the degree of conformity between the geometric properties and the constraints.

[0055] Finally, the semantic similarity score and constraint matching score are dynamically weighted and fused using a similarity scoring formula to obtain the final relevance score between each normative clause text and its corresponding vector object.

[0056] For example, setting dynamic weight coefficients That is, semantic similarity weight, and That is, the constraint matching weight satisfies The initial weight values ​​can be preset based on the architectural scenario.

[0057] Substituting into the weighted summation formula to calculate the correlation score, the weighted summation formula can be expressed, for example, by the following formula (3). (3) The matching process can, for example, employ a three-tiered strategy to optimize scoring reliability. The first tier is semantic filtering, which retains only vector objects with a matching degree greater than or equal to a preset first threshold for subsequent calculations, filtering out semantically irrelevant objects. The second tier is geometric compliance verification, which requires objects that pass semantic filtering to have an overall constraint matching score greater than or equal to a preset second threshold, ensuring that geometric parameters basically comply with constraints. The third tier is contextual logic correction, which corrects scoring deviations by considering the topological relationships between the object and other components in the vector topology diagram and the constraint application scenarios of the clauses.

[0058] Furthermore, a maintenance feedback learning mechanism can be set up. When a human review finds an error in the correlation score and corrects the binding relationship, the system writes the review result back to the database and updates the dynamic weights using the gradient descent algorithm. This ensures dynamic convergence.

[0059] S105. Based on the relevance score, associate the document specification clauses with the attached figures.

[0060] In some embodiments of this application, the document specification clauses are associated with the accompanying drawings based on a relevance score, specifically including: When the correlation score between a certain standard clause text and a certain attached vector topology diagram is greater than or equal to a preset threshold, it is determined that the standard clause text and the attached diagram are initially matched. An association mapping relationship is then established between the initially matched attached diagram and the standard clause text.

[0061] In some embodiments of this application, the document specification clauses are associated with the accompanying drawings based on a relevance score. The method further includes: If the correlation score between a single specification clause and multiple attached vector topology diagrams is greater than or equal to a preset threshold, the proportion of structural elements in each attached diagram that match the specification clause is calculated. A correlation mapping relationship is then established between the specification clause and the attached diagram with the highest proportion of structural elements and the highest correlation score.

[0062] Based on this, bidirectional retrieval and multimodal interaction functions between clauses and figures can be realized, ensuring that users can quickly obtain corresponding results based on any input.

[0063] For example, the preset vector index database is invoked to retrieve all... and Create a composite index When the user enters a clause number or keywords At that time, semantic vectors are generated. ,implement Return to the relevant attached figures. When entering the attached figure area... Extract the corresponding vector Perform reverse search Identify related terms. To improve the coverage of associative searches, recommendation functions based on similarity clustering can be introduced, for example. ,in, To retrieve the requested vector, For vectors of other graphic and text objects, For historical query weight, The similarity score between the two is calculated as follows: for The corresponding historical query weight.

[0064] Furthermore, to ensure the long-term stability and traceability of accuracy of the vectorized figures and clause matching results, the method also includes: Obtain the update status data of the building code documents. Based on the update status data, recalculate the correlation score between the text of each code clause and the vector topology map.

[0065] For example, vectorized objects covering different component types and constraint scenarios are extracted from building code documents and matched with clauses to construct a historical data validation set. ,in For structural elements in a vector topology graph, To and The binding specifications and each sample comes with manually annotated standard matching results.

[0066] Set a fixed verification cycle, re-execute S102 and S104 processes for all samples in the historical verification set H, and compare the re-output vectorized geometric parameters, matching results, and manually labeled standard results. For example, the consistency rate can be calculated using the following formula (4). (4) in, This is the number of samples output that are completely identical to those manually labeled. The total number of samples in the historical validation set H. When Acc is less than or equal to a preset accuracy threshold, global parameter calibration is performed.

[0067] A matching and error correction entry is set up in the interactive interface, allowing users to manually correct the correlation between clauses and attached figures, and recording the feedback data corresponding to each correction operation. .

[0068] User feedback data Errors are categorized and statistically analyzed by type. When the cumulative number of feedbacks for a certain type of error exceeds a preset threshold, local model retraining is automatically triggered. That is, the samples corresponding to that type of error are used as incremental training samples and input into the clause semantic parsing model in S103 and the correlation scoring model in S104. Only the model parameters related to the error type are fine-tuned, avoiding the waste of resources in full training, while quickly correcting local accuracy deviations.

[0069] Based on this, corresponding incremental calculations and associated updates are performed for different update types.

[0070] If it is a clause update, then execute S103 for the newly added / revised clause, and then call the S104 process to recalculate the correlation score between the clause and all attached vector topology diagrams and update the correlation mapping table.

[0071] If it is an update of a figure, execute S102 for the newly added / revised figure, and then call the S104 process to recalculate the correlation score between all specification clauses and the figure, and update the correlation mapping table synchronously.

[0072] This refers to the new data generated by updates to building code documents, specifically the changes corresponding to the updated status data. The incremental sample learning strategy is used to update the model parameters to avoid the model's accuracy from decreasing due to changes in data distribution. For example, this can be expressed by the following formula (5). (5) in, These are the model parameters before the update. This is the learning rate. The cross-entropy loss function is used to calculate the model's performance in... The prediction error. For loss function pairs The gradient guides the parameters to be updated in the direction of reducing error, ensuring that the model can quickly adapt to new data distributions.

[0073] Furthermore, the geometric accuracy and stability of the vectorized results in real time are monitored to avoid increased vectorization errors due to model parameter drift and image noise interference. For each vectorization process, the core geometric parameters of the structural element are extracted. and compared with manually annotated geometric parameter reference values Compare and calculate the vectorization precision drift value. For example, it can be represented by the following formula (6), (6) in, The number of structural elements monitored in a single instance. It is the L2 norm. This reflects the average deviation between the current vectorization result and the standard value, in millimeters.

[0074] when When the required geometric accuracy exceeds the preset threshold, the attached drawing layering and vectorization extraction process in S102 is automatically re-executed. The edge detection algorithm parameters are re-optimized, the B-spline fitting error threshold is corrected, the vector topology map of the attached drawing is regenerated, the original low-precision vectorization result is replaced, and the correlation score between the attached drawing and all clauses is updated simultaneously to ensure that the geometric accuracy always meets the application requirements of building codes.

[0075] The method provided in this application extracts the text set of normative clauses and the attached figure set, and records the location information and their respective identifiers, providing standardized basic data input for subsequent processing. It calculates a relevance score to achieve quantitative matching between clauses and vector topology maps, ensuring matching accuracy through a dual-dimensional scoring system of semantics and constraints. The relevance score establishes an association mapping between clauses and attached figures, forming a structured text-image relationship, providing support for subsequent bidirectional retrieval and efficient application.

[0076] It should be noted that, although the embodiments in this application are based on... Figure 1 Steps S101 to S105 will be described sequentially, but this does not mean that steps S101 to S105 must be performed in a strict order. The reason this embodiment follows this order is... Figure 1 The order in which steps S101 to S105 are described is provided to facilitate understanding of the technical solutions of the embodiments of this application by those skilled in the art. In other words, in the embodiments of this application, the order of steps S101 to S105 can be appropriately adjusted according to actual needs.

[0077] based on Figure 1In addition to the method described herein, this specification also provides some specific implementation schemes and extension schemes of this method, which will be further explained below.

[0078] Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.

[0079] Figure 2 A structural schematic diagram of a device associated with a specification clause and an accompanying drawing in a building code document, provided as an embodiment of this application, includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to perform a method for associating specification clauses with drawings in a building code document as described above.

[0080] Some embodiments of this application provide a non-volatile computer storage medium for associating specification clauses and drawings in a building code document, storing computer-executable instructions capable of executing any of the above-described methods for associating specification clauses and drawings in a building code document.

[0081] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0082] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0083] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0088] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0089] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0090] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0091] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the technical principles of this application should fall within the protection scope of this application.

Claims

1. A method for associating building code document clauses with accompanying drawings, characterized in that, The method includes: Extract the text set and the attached drawing set of the code clauses from the building code document; the text set and the attached drawing set record the location information and the corresponding identifier of each code clause and each attached drawing in the building code document. The attached figures in the attached figure set are processed in layers by using a preset edge detection algorithm and text detection network to obtain the structural layer and annotation layer of each attached figure, so as to construct the vector topology map of each attached figure. The structured semantic parsing process is performed on each normative clause in the text set of normative clauses to extract the entities and constraints in the architectural domain from the text of the normative clauses, so as to obtain the semantic feature vector and structural constraint set of each normative clause text. Calculate the correlation score between the text of each specification clause and the vector topology diagram; Based on the aforementioned relevance score, the document specification clauses and accompanying drawings are associated.

2. The method according to claim 1, characterized in that, The step involves performing layered processing on each figure in the attached figure set using a preset edge detection algorithm and text detection network to obtain the structural layer and annotation layer of each figure, thereby constructing a vector topology map of each figure. Specifically, this includes: Edge information is extracted from each attached drawing using a preset optimized edge detection algorithm to obtain the structural layer of each attached drawing; the structural layer contains multiple independent structural elements, each structural element corresponding to a complete building component main structural line unit in the attached drawing; The annotated regions in each of the attached figures are identified and located using a text detection network. Extract the annotation content of the annotation area, associate the annotation area with the corresponding annotation content to obtain the annotation layer; the annotation layer includes multiple independent annotation elements, each annotation element corresponds to a complete annotation area and the annotation content within that area in the attached figure; By parsing the structural layer and the annotation layer, a vector topology diagram of each figure is constructed.

3. The method according to claim 2, characterized in that, The step of constructing a vector topology diagram for each attached figure by parsing the structural layer and the annotation layer specifically includes: Traverse each independent structural element in the structural layer, identify the line segments in the structural element through a line detection algorithm, and obtain the endpoint coordinates, length and direction angle of each line segment; The curve segments in the structural element are identified and fitted by a curve fitting algorithm to obtain the control vertex coordinates, curvature and extension trajectory of each curve segment; The geometric parameter set of each structural element is constructed based on the endpoint coordinates, length, and direction angle of each straight line segment and the control vertex coordinates, curvature, and extension trajectory of each curve segment. Based on the set of geometric parameters of each structural element, the spatial positional relationship between adjacent structural elements is calculated to determine whether the adjacent structural elements have a topological connection relationship. When topological links exist, an initial connected graph is constructed using structural elements as nodes and topological links as edges. Traverse each independent annotation element in the annotation layer and extract the position coordinates and annotation content of the annotation area corresponding to the annotation element; Based on the position coordinates of the labeled area corresponding to the labeled element and the set of geometric parameters of each structural element, calculate the spatial distance between the labeled element and each structural element. When the spatial distance is less than a preset threshold, the annotation content of the annotation element is supplemented to the associated structural element accordingly; Based on the structural elements after association and supplementation, the initial connected graph is optimized to obtain an optimized initial connected graph. The optimized initial connected graph is converted into vector data format, and the type identifier, complete geometric parameters and topological connection relationships of each structural element are recorded to construct a vector topology graph.

4. The method according to claim 1, characterized in that, The process of performing structured semantic parsing on each normative clause in the set of normative clause texts to extract architectural domain entities and constraint relationships from the normative clause texts, in order to obtain the semantic feature vector and structural constraint set of each normative clause text, specifically includes: Traverse each normative clause in the set of normative clause texts, preprocess the normative clause texts to obtain normative clause text fragments; By using a pre-trained entity recognition model, entity annotation is performed on the text fragments of the normative clauses to obtain the entity set of each normative clause text. By analyzing the syntactic relationships between the text entities of each normative clause, a set of structural constraints for each normative clause text is constructed. The semantic feature vectors of each standard clause text are obtained by semantically encoding the pre-processed clause text fragments, the entity set of each standard clause text, and the structural constraint set of each clause text through a pre-trained language model.

5. The method according to claim 1, characterized in that, The calculation of the correlation score between the text of each specification clause and the vector topology diagram specifically includes: Traverse each structural element in the vector topology graph and convert the attribute information of each structural element into a feature vector to construct a set of vector object vectors corresponding to the vector topology graph; Using a pre-defined vector similarity calculation algorithm, the semantic similarity score between the semantic feature vector of each specification clause and each vector object vector in the vector object vector set is calculated. Based on the attribute information of each structural element in the vector topology diagram and the set of structural constraints of each standard clause text, the constraint matching score between the structural element and the standard clause text is calculated according to preset rules. The correlation score between the text of each specification clause and the corresponding vector object in the vector topology diagram is calculated by weighted summation formula, and the correlation score result between the text of each specification clause and the vector topology diagram is obtained.

6. The method according to claim 1, characterized in that, The process of associating document specification clauses with attached figures based on the correlation score specifically includes: When the correlation score between a certain standard clause text and a certain attached vector topology diagram is greater than or equal to a preset threshold, it is determined that the standard clause text and the attached diagram are initially matched. Establish a mapping relationship between the initially matched attached figures and the text of the specification clauses.

7. The method according to claim 1, characterized in that, The method of associating document specification clauses with accompanying drawings based on the correlation score further includes: If the correlation score between a single specification clause text and multiple attached vector topology diagrams is greater than or equal to a preset threshold, calculate the proportion of structural elements in each attached diagram that match the specification clause text. Establish a mapping relationship between the text of the standard clauses and the attached figures that have the highest proportion of structural elements and the highest relevance score.

8. The method according to claim 1, characterized in that, The method further includes: Obtain the update status data of the building code document; Based on the updated status data, the correlation score between the text of each specification clause and the vector topology diagram is recalculated.

9. A device for associating building code document clauses with accompanying drawings, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to perform a method for associating building code document specifications with drawings as described in any one of claims 1-8.

10. A non-volatile computer storage medium for associating building code document specifications and drawings, storing computer-executable instructions, characterized in that, The computer-executable instructions are capable of executing the method for associating building code document specifications and drawings as described in any one of claims 1-8.