Large model semantic coding BIM data and engineering entity matching system and method
Through large-scale semantic coding technology, a knowledge graph is constructed and the BIM data is matched with engineering entities using search enhancement model, which solves the problems of inefficiency and insufficient accuracy in the existing technology, and achieves efficient and accurate matching effects.
Patent Information
- Application Number
- CN202411543399.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art is difficult to effectively solve the matching problem between BIM data and engineering entities, resulting in inefficiency, error-prone and difficult to deal with complex projects.
The method of large-model semantic coding is adopted to achieve efficient matching between BIM data and engineering entities through knowledge graph construction modules, BIM data and engineering entity coding modules, similar semantic search modules and matching modules. The specific steps include encoding BIM data and engineering entities using a Chinese pre-trained language model, using the search enhancement generative model to retrieve similar vectors in the knowledge graph, and final matching through cosine similarity calculation.
Improves the matching efficiency and accuracy between BIM data and engineering entities, reduces human errors, enhances the processing capacity of complex projects, and improves the flexibility and consistency of the system.
Smart Images

Figure CN119646171A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building information models, and in particular to a system and method for matching large model semantically encoded BIM data with engineering entities. Background Art
[0002] In the current application field of Building Information Modeling (BIM), there are many challenges, one of which is the matching problem between BIM data and engineering entities. This link is crucial to achieving the interoperability and consistency of BIM data. However, traditional processing methods have many limitations, which has brought great troubles to all parties involved in the project.
[0003] Traditional manual processing methods face problems such as low efficiency, easy errors, and difficulty in dealing with complex projects when dealing with the matching problem between BIM data and engineering entities. First, manual processing requires a lot of time and energy, with a low degree of automation, and the processing efficiency is difficult to meet the needs of current project management. Secondly, human errors are difficult to completely avoid during repeated inspections and proofreading, which can easily lead to omissions or missing information. In addition, in the face of changes in project requirements or new data processing requirements, traditional methods often lack flexibility and are difficult to adjust quickly.
[0004] General data processing tools are also unable to effectively address the challenges brought about by the structural complexity and diversity of BIM data and engineering entities. These tools often have difficulty accurately understanding and processing the special structures and relationships in BIM data, resulting in insufficient accuracy and completeness of mapping results.
[0005] Therefore, there is an urgent need for a new intelligent technology to improve the efficiency and accuracy of matching between BIM data and engineering entities. Summary of the invention
[0006] The purpose of the present invention is to address the defects of the prior art and provide a system and method for matching BIM data with engineering entities using semantic encoding of a large model.
[0007] The present invention provides a large model semantically encoded BIM data and engineering entity matching system, comprising:
[0008] Knowledge graph building module, used to build knowledge graph based on historical data of construction projects;
[0009] A BIM data and engineering entity encoding module, used to encode the current BIM data into the current BIM data vector, or encode the current engineering entity into the current engineering entity vector, using a Chinese pre-trained language model;
[0010] A BIM data and engineering entity similarity semantic retrieval module is used to use a retrieval enhancement generation model to retrieve a number of engineering entity vectors similar to the current BIM data vector in the knowledge graph, or to use a retrieval enhancement generation model to retrieve a number of BIM data vectors similar to the current engineering entity vector in the knowledge graph;
[0011] The BIM data and engineering entity matching module is used to use cosine similarity to calculate a first similarity score between a current BIM data vector and several similar engineering entity vectors retrieved by a retrieval enhancement generation model, and match the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or use cosine similarity to calculate a second similarity score between the current engineering entity vector and several similar BIM data vectors retrieved by a retrieval enhancement generation model, and match the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score.
[0012] Furthermore, the specific method of the knowledge graph construction module to establish the knowledge graph based on the historical data of the construction project is as follows:
[0013] A large language model is used to extract entities and relationships between entities in the historical data of construction projects. The Embedding model is then used to encode the extracted entities and relationships between entities to obtain entity vectors and relationship vectors. A clustering algorithm is then used to cluster the entity vectors and relationship vectors to obtain a knowledge graph.
[0014] Furthermore, in the BIM data and engineering entity similarity semantic retrieval module, the specific method of using the retrieval enhancement generation model to retrieve several engineering entity vectors similar to the current BIM data vector in the knowledge graph, or using the retrieval enhancement generation model to retrieve several BIM data vectors similar to the current engineering entity vector in the knowledge graph is as follows:
[0015] First, the large language model in the retrieval-enhanced generation model is used to divide the knowledge graph into communities based on the degree of correlation between entity groups. Then, the retrieval-enhanced generation model is used to decompose the current BIM data vector into several current BIM data sub-vectors, or decompose the current engineering entity vector into several current engineering entity sub-vectors. The retrieval-enhanced generation model retrieves corresponding similar vectors in each community in the knowledge graph based on several current BIM data sub-vectors or several current engineering entity sub-vectors, and merges the corresponding retrieval results to obtain a set of similar engineering entity vectors or a set of similar BIM data vectors.
[0016] Furthermore, the large language model is the Zhipu glm-4-plus large model. The Zhipu glm-4-plus large model is used to extract entities and relationships between entities in the historical data of the construction project. The specific method is as follows:
[0017] The large model prompt word engineering of the GLM-4-Plus large model is used to extract entities from the text. According to the application scenarios and requirements of the construction project, the entity relationship patterns that need to be extracted are defined. The large model prompt word engineering of the GLM-4-Plus large model is used to extract entity pairs and their relationships that conform to the defined entity relationship patterns from the text.
[0018] Furthermore, the Chinese pre-trained language model is text2vec-base-chinese. The Chinese pre-trained language model text2vec-base-chinese is used to encode the current BIM data into the current BIM data vector, or to encode the current engineering entity into the current engineering entity vector. The specific method is:
[0019] Extract each level information of the current BIM data or the current engineering entity, and convert the level information into a text format, input the level information converted into a text format into a text2vec-base-chinese model, and the text2vec-base-chinese model converts the level information converted into a text format into a vector representation. For each level of the current BIM data and the current engineering entity, the above method is used for encoding to obtain the corresponding semantic vector, and the semantic vectors of each level of the BIM data and the engineering entity are merged to obtain the current BIM data and the current engineering entity vectors respectively.
[0020] Furthermore, the retrieval enhancement generation model is a GraphRAG model. First, the knowledge graph data is loaded into a format that can be processed by the GraphRAG model, and then the large language model in GraphRAG is used to analyze the correlation between entities in the knowledge graph to divide the knowledge graph into multiple communities, and the current BIM data vector is decomposed into several current BIM data sub-vectors using a decomposition method based on an attention mechanism, and the current engineering entity vector is decomposed into several current engineering entity sub-vectors using a decomposition method based on an attention mechanism. For each decomposed current BIM data sub-vector or current engineering entity sub-vector, the GraphRAG model is used to perform similar vector retrieval in the corresponding community of the knowledge graph, and the similar vectors retrieved for each current BIM data sub-vector or current engineering entity sub-vector in the corresponding community are merged. The merging strategy is based on the similarity score to obtain a set of engineering entity vectors similar to the current BIM data or a set of BIM data vectors similar to the current engineering entity.
[0021] Furthermore, the embedding model is the Zhipu coding model embedding-3. The Zhipu coding model embedding-3 is used to encode the extracted entities and the relationship between entities to obtain the entity vector and the relationship vector. The specific method is:
[0022] The entities and the relationships between entities are sequentially input into the embedding layer and encoding layer of the Embedding-3 model for forward propagation, and the entity vectors and relationship vectors are generated in the output layer of the Embedding-3 model.
[0023] Furthermore, in the BIM data and engineering entity matching module, the first similarity score between the current BIM data vector and several similar engineering entity vectors retrieved by the retrieval enhancement generation model is calculated using cosine similarity, and the current BIM data vector is matched with the corresponding similar engineering entity vector according to the first similarity score, or the second similarity score between the current engineering entity vector and several similar BIM data vectors retrieved by the retrieval enhancement generation model is calculated using cosine similarity, and the specific method of matching the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score is as follows:
[0024] The formula for the cosine similarity is as follows:
[0025]
[0026] Wherein, vector a is a similar BIM data vector, vector b is a current engineering entity vector, or vector a is a similar engineering entity vector, vector b is a current BIM data vector, a·b represents the dot product of vector a and vector b, ||a|| and ||b|| represent the modulus lengths of vector a and vector b respectively, and the value range of cosine similarity is between [-1,1]. The closer the value is to 1, the more similar the two texts are, and the closer the value is to -1, the less similar the two texts are;
[0027] Take the first n similar BIM data vectors arranged in descending order of similarity score cosine_similarity(a,b) and match them with the corresponding current engineering entity vector, or take the first n similar engineering entity vectors arranged in descending order of similarity score cos i ne_similarity(a,b) and match them with the corresponding current BIM data vector.
[0028] A method for matching large model semantically encoded BIM data with engineering entities comprises the following steps:
[0029] Build a knowledge graph based on historical data of construction projects;
[0030] Use the Chinese pre-trained language model to encode the Chinese text of the current BIM data into the current BIM data vector, or encode the Chinese text of the current engineering entity into the current engineering entity vector;
[0031] A retrieval enhancement generation model is established by combining a large language model and a knowledge graph. The retrieval enhancement generation model is used to retrieve several engineering entity vectors similar to the current BIM data vector in the knowledge graph, or the retrieval enhancement generation model is used to retrieve several BIM data vectors similar to the current engineering entity vector in the knowledge graph.
[0032] Use cosine similarity to calculate a first similarity score between the current BIM data vector and several similar engineering entity vectors retrieved by the retrieval enhancement generation model, and match the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or use cosine similarity to calculate a second similarity score between the current engineering entity vector and several similar BIM data vectors retrieved by the retrieval enhancement generation model, and match the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score.
[0033] A computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the above-mentioned method for matching BIM data with engineering entities encoded by large model semantics is implemented.
[0034] The beneficial effects of the present invention are:
[0035] 1. The present invention constructs a retrieval enhancement generation model, so that the retrieval capability for the content in the knowledge graph is higher than that of using only the large prediction model for retrieval, and obtains several similar engineering entities corresponding to the current BIM data in the knowledge graph, or several similar BIM data corresponding to the current engineering entity, and finally uses cosine similarity to calculate the retrieval result with the highest similarity again for the retrieval results. After two screenings, the final result is very accurately matched with the input current BIM data or current engineering entity, and is more efficient than manual matching. Even in the face of changes in project requirements or new data processing requirements, because the content of the knowledge graph is rich enough, the technical solution of the present invention is more flexible.
[0036] 2. The retrieval enhancement generation model can enhance the large language model's ability to understand the text in the knowledge graph. Therefore, during the retrieval process, the large language model can more accurately understand and identify the key information and features in the BIM data, reducing the impact of human factors on data accuracy and improving the reliability and consistency of information. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a system block diagram of the present invention. DETAILED DESCRIPTION
[0038] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] Example 1
[0040] refer to Figure 1 , a large model semantically encoded BIM data and engineering entity matching system, including:
[0041] Knowledge graph building module, used to build knowledge graph based on historical data of construction projects;
[0042] A BIM data and engineering entity encoding module, used to encode the current BIM data into the current BIM data vector, or encode the current engineering entity into the current engineering entity vector, using a Chinese pre-trained language model;
[0043] A BIM data and engineering entity similarity semantic retrieval module is used to use a retrieval enhancement generation model to retrieve a number of engineering entity vectors similar to the current BIM data vector in the knowledge graph, or to use a retrieval enhancement generation model to retrieve a number of BIM data vectors similar to the current engineering entity vector in the knowledge graph;
[0044] The BIM data and engineering entity matching module is used to use cosine similarity to calculate a first similarity score between a current BIM data vector and several similar engineering entity vectors retrieved by a retrieval enhancement generation model, and match the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or use cosine similarity to calculate a second similarity score between the current engineering entity vector and several similar BIM data vectors retrieved by a retrieval enhancement generation model, and match the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score.
[0045] (1) The specific method of the knowledge graph construction module to establish the knowledge graph based on the historical data of the construction project is as follows:
[0046] A large language model is used to extract entities and relationships between entities in the historical data of construction projects. The Embedding model is then used to encode the extracted entities and relationships between entities to obtain entity vectors and relationship vectors. A clustering algorithm is then used to cluster the entity vectors and relationship vectors to obtain a knowledge graph.
[0047] The historical data of construction projects includes not only a large amount of BIM data, but also a large amount of engineering entity data, which provides a lot of basis for subsequent matching work. The structured format of the knowledge graph enables the large language model to better understand and utilize the relationship between different information and discover the hidden information connections.
[0048] (2) In the BIM data and engineering entity encoding module, the BIM data contains information such as category, family, type, instance, and attributes, and the engineering entity contains information such as unit engineering, division engineering, sub-division engineering, and sub-item engineering. The Chinese pre-trained language model is used to encode the semantics of each level of the current BIM data and the current engineering entity, and then the semantics of each level are merged to form the current BIM data and the current engineering entity vector respectively. This enhances the semantic understanding of the current BIM data and the current engineering entity by the retrieval enhancement generation model.
[0049] (3) In the BIM data and engineering entity similarity semantic retrieval module, the specific method of using the retrieval enhancement generation model to retrieve a number of engineering entity vectors similar to the current BIM data vector in the knowledge graph, or using the retrieval enhancement generation model to retrieve a number of BIM data vectors similar to the current engineering entity vector in the knowledge graph is as follows:
[0050] First, the large language model in the retrieval-enhanced generation model is used to divide the knowledge graph into communities based on the degree of correlation between entity groups. Then, the retrieval-enhanced generation model is used to decompose the current BIM data vector into several current BIM data sub-vectors, or decompose the current engineering entity vector into several current engineering entity sub-vectors. The retrieval-enhanced generation model retrieves corresponding similar vectors in each community in the knowledge graph based on several current BIM data sub-vectors or several current engineering entity sub-vectors, and merges the corresponding retrieval results to obtain a set of similar engineering entity vectors or a set of similar BIM data vectors.
[0051] The Retrieval-Augmented Generation (RAG) model is an artificial intelligence technology that combines information retrieval technology with a language generation model. For each directory label of BIM data and engineering entity data in each community, a set of related entities is retrieved in the knowledge graph through semantic similarity. These entities serve as the entry point to access the knowledge graph, and more relevant information can be extracted, such as related entities, relationships between entities, entity covariates, and community reports. In addition, relevant text blocks associated with the identified entities are extracted from the original input document. These candidate data sources are then prioritized and filtered to fit a single context window of a predefined size for generating the final retrieved text.
[0052] The retrieval-enhanced generative model has many advantages when retrieving knowledge graphs, such as improving query accuracy, enhancing model interpretability, supporting complex queries, cross-domain retrieval capabilities, multi-step reasoning capabilities, flexibility and scalability, and optimizing user experience. These advantages make the retrieval-enhanced generative model have significant advantages in handling complex knowledge query and generation tasks.
[0053] (4) In the BIM data and engineering entity matching module, a first similarity score between the current BIM data vector and a plurality of similar engineering entity vectors retrieved by the retrieval enhancement generation model is calculated using cosine similarity, and the current BIM data vector is matched with the corresponding similar engineering entity vector according to the first similarity score, or a second similarity score between the current engineering entity vector and a plurality of similar BIM data vectors retrieved by the retrieval enhancement generation model is calculated using cosine similarity, and the current engineering entity vector is matched with the corresponding similar BIM data vector according to the second similarity score. The specific method is as follows:
[0054] Normalize the similar BIM data vectors and the corresponding current engineering entity vectors, or the similar engineering entity vectors and the corresponding current BIM data vectors to ensure that the vector lengths are consistent.
[0055] The formula for the cosine similarity is as follows:
[0056]
[0057] Wherein, vector a is a similar BIM data vector, vector b is a current engineering entity vector, or vector a is a similar engineering entity vector, vector b is a current BIM data vector, a·b represents the dot product of vector a and vector b, ||a|| and ||b|| represent the modulus lengths of vector a and vector b respectively, and the value range of cosine similarity is between [-1,1]. The closer the value is to 1, the more similar the two texts are, and the closer the value is to -1, the less similar the two texts are;
[0058] Take the first n similar BIM data vectors arranged in descending order of similarity score cosine_similarity(a,b) and match them with the corresponding current engineering entity vector, or take the first n similar engineering entity vectors arranged in descending order of similarity score cos i ne_similarity(a,b) and match them with the corresponding current BIM data vector.
[0059] Afterwards, people manually select the most suitable matching object based on the matched n similar BIM data or n similar engineering entities, thus greatly improving the accuracy and efficiency of the matching process between BIM data and engineering entities.
[0060] (5) The large language model is the Zhipu glm-4-plus large model.
[0061] The specific method of using the Zhipu glm-4-plus large model to extract entities and relationships between entities in the historical data of construction projects is as follows:
[0062] Using the named entity recognition capability of the GLM-4-Plus large model, key entities such as names of people, places, and institutions are identified from the text. This is achieved by calling the large model prompt word engineering or related functions provided by the model. The identified entities are labeled for subsequent relationship extraction and text analysis. According to the specific application scenarios and requirements, the relationship patterns that need to be extracted are defined, and the relationship extraction capability of the GLM-4-Plus large model is used to identify and extract entity pairs and their relationships that conform to the predefined relationship patterns from the text. This is also achieved by calling the API or related functions provided by the model. The extracted relationships are verified and screened to ensure their accuracy and reliability, which is done by manually reviewing the relationships or automatically verifying them using other algorithms.
[0063] The GLM-4-Plus large model has powerful natural language processing capabilities and can quickly parse and understand complex information in the historical data of construction projects. Through this model, efficient data extraction can be achieved, reducing manual intervention and data processing time, thereby improving overall work efficiency. Compared with traditional manual data extraction methods, the GLM-4-Plus large model can more accurately identify entities and relationships between entities in the historical data of construction projects. After training on a large-scale corpus and optimizing algorithms, the model has excellent semantic understanding and analysis capabilities, can accurately capture key information in the data, and reduce the error rate of data extraction.
[0064] (6) The Chinese pre-trained language model is text2vec-base-chinese.
[0065] The specific method of using the Chinese pre-trained language model text2vec-base-chinese to encode the semantics of each level of the current BIM data and the current engineering entity, and then merging the semantics of each level to form the current BIM data and the current engineering entity vector is as follows:
[0066] Extract the information of each level of the current BIM data and the current engineering entity, and convert it into text format, and perform necessary cleaning and standardization on the text, such as removing irrelevant characters and unifying the format. Input the preprocessed text into the text2vec-base-chinese model, which converts the preprocessed text into a vector representation of fixed dimensions. These vectors capture the semantic information of the text. For each level of the current BIM data and the current engineering entity, the above method is used to encode and obtain the corresponding semantic vector. According to specific needs and application scenarios, select a suitable merging strategy. Common strategies include average pooling, weighted average pooling, maximum pooling, etc. Using the selected merging strategy, merge the semantic vectors of each level of BIM data and engineering entity to obtain the overall semantic vector representing the current BIM data and the current engineering entity, that is, the current BIM data and the current engineering entity vector.
[0067] As a Chinese pre-trained language model, text2vec-base-chinese has been trained on a large-scale Chinese corpus and has strong semantic understanding capabilities. By semantically encoding each level of BIM data and engineering entities, the semantic information of these data can be captured and expressed more accurately, thereby improving the accuracy of subsequent analysis and processing. BIM data and engineering entities usually contain multiple levels of information, such as buildings, floors, rooms, equipment, etc. By semantically encoding these levels through text2vec-base-chinese and merging the semantics of each level, a vector representation containing complete information can be formed. This vector representation not only contains the specific information of each level, but also reflects the association and dependency between the levels, which helps to achieve cross-level information integration and analysis.
[0068] (7) The retrieval enhancement generation model is a GraphRAG model.
[0069] The large language model in the retrieval enhancement generation model GraphRAG is used to divide the knowledge graph into communities based on the degree of correlation between entity groups. The retrieval enhancement generation model is then used to decompose the current BIM data vector into several current BIM data sub-vectors, or the current engineering entity vector is decomposed into several current engineering entity sub-vectors. The retrieval enhancement generation model retrieves corresponding similar vectors in each community in the knowledge graph according to several current BIM data sub-vectors or several current engineering entity sub-vectors, and merges the corresponding search results to obtain a set of similar engineering entity vectors or a set of similar BIM data vectors. The specific method is as follows:
[0070] The knowledge graph data is loaded into a format that can be processed by the GraphRAG model. The large language model in GraphRAG (the Zhipu glm-4-plus large model in this embodiment) is used to analyze the relationship between entities in the knowledge graph. The knowledge graph is divided into multiple communities according to the degree of relevance between entities (such as similarity, connection strength, etc.). The current BIM data vector or the current engineering entity vector is decomposed into several sub-vectors (current BIM data sub-vectors and current engineering entity sub-vectors) using a certain method (such as attention-based decomposition, VAE and other variational autoencoders). These sub-vectors should be able to represent different aspects or features of the original vector. For each decomposed sub-vector, the GraphRAG model is used to retrieve similar vectors in the corresponding community of the knowledge graph. The retrieval-enhanced generation model combines the advantages of traditional retrieval methods and generation models, and can more accurately retrieve vectors similar to the query sub-vector from the knowledge graph. The similar vectors retrieved for each sub-vector in the corresponding community are merged. The merging strategy is based on similarity scoring, vector weighted average and other methods. According to the merged results, a set of engineering entity vectors or a set of BIM data vectors similar to the current BIM data or the current engineering entity are obtained.
[0071] By dividing the knowledge graph into different communities, GraphRAG can more accurately locate knowledge areas related to the current BIM data or engineering entities. Compared with traditional global retrieval, this community-based information retrieval method can significantly reduce the interference of irrelevant information and improve the accuracy of retrieval. GraphRAG uses a large language model to vectorize BIM data and engineering entities, breaking down complex query tasks into smaller subtasks. This decomposition method makes the retrieval process more efficient and can find similar vectors related to the query more quickly.
[0072] (8) The Embedding model is the Zhipu coding large model embedding-3.
[0073] The specific method of using the Zhipu coding large model embedding-3 to encode the extracted entities and the relationship between entities to obtain the entity vector and relationship vector is as follows:
[0074] The Embedding-3 model contains one or more embedding layers to map the input entity and relation data to a low-dimensional vector space. These embedding layers are usually trained to capture the underlying relationships and structures of the input data. After the embedding layer, the model contains a series of encoding layers (such as convolutional layers, recurrent layers, attention layers, etc.) to further process and extract features of the input data. These encoding layers can capture the complex relationships between entities and relations and generate higher-level vector representations.
[0075] The input data (entities, relationships between entities) are forward propagated through the embedding layer and the encoding layer. Each layer generates a new vector representation based on the output of the previous layer. In this process, the model learns how to map the input data to a low-dimensional vector space and capture the potential relationships therein. Finally, the model generates vector representations of entities and relationships at the output layer.
[0076] Entity vectors and relationship vectors are dense vectors in high-dimensional space that can capture the semantic information and structural features of the input data.
[0077] The embedding-3 large model has a powerful representation learning capability, which can map entities and their relationships into a high-dimensional vector space while maintaining their original semantic information and structural relationships. This vectorized representation is not only concise and clear, but also can more accurately capture the subtle differences and potential connections between data.
[0078] Example 2
[0079] A method for matching large model semantically encoded BIM data with engineering entities, comprising:
[0080] Build a knowledge graph based on historical data of construction projects;
[0081] Use the Chinese pre-trained language model to encode the current BIM data into the current BIM data vector, or encode the current engineering entity into the current engineering entity vector;
[0082] A retrieval enhancement generation model is established by combining a large language model and a knowledge graph. The retrieval enhancement generation model is used to retrieve several engineering entity vectors similar to the current BIM data vector in the knowledge graph, or the retrieval enhancement generation model is used to retrieve several BIM data vectors similar to the current engineering entity vector in the knowledge graph.
[0083] Use cosine similarity to calculate a first similarity score between the current BIM data vector and the corresponding several similar engineering entity vectors, and match the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or use cosine similarity to calculate a second similarity score between the current engineering entity vector and the corresponding several similar BIM data vectors, and match the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score.
[0084] (1) The specific method of establishing a knowledge graph based on historical data of construction projects is as follows:
[0085] A large language model is used to extract entities and relationships between entities in the historical data of construction projects. The Embedding model is then used to encode the extracted entities and relationships between entities to obtain entity vectors and relationship vectors. A clustering algorithm is then used to cluster the entity vectors and relationship vectors to obtain a knowledge graph.
[0086] The historical data of construction projects includes not only a large amount of BIM data, but also a large amount of engineering entity data, which provides a lot of basis for subsequent matching work. The structured format of the knowledge graph enables the large language model to better understand and utilize the relationship between different information and discover the hidden information connections.
[0087] (2) BIM data contains information such as category, family, type, instance, and attributes, and engineering entities contain information such as unit projects, divisional projects, sub-divisional projects, and sub-item projects. The Chinese pre-trained language model is used to encode the semantics of each level of the current BIM data and the current engineering entity, and then the semantics of each level are merged to form the current BIM data and the current engineering entity vectors. This enhances the semantic understanding of the current BIM data and the current engineering entity by the retrieval-enhanced generation model.
[0088] (3) Using the retrieval enhancement generation model to retrieve several engineering entity vectors similar to the current BIM data vector in the knowledge graph, or using the retrieval enhancement generation model to retrieve several BIM data vectors similar to the current engineering entity vector in the knowledge graph is as follows:
[0089] First, the large language model in the retrieval-enhanced generation model is used to divide the knowledge graph into communities based on the degree of correlation between entity groups. Then, the retrieval-enhanced generation model is used to decompose the current BIM data vector into several current BIM data sub-vectors, or decompose the current engineering entity vector into several current engineering entity sub-vectors. The retrieval-enhanced generation model retrieves corresponding similar vectors in each community in the knowledge graph based on several current BIM data sub-vectors or several current engineering entity sub-vectors, and merges the corresponding retrieval results to obtain a set of similar engineering entity vectors or a set of similar BIM data vectors.
[0090] The Retrieval-Augmented Generation (RAG) model is an artificial intelligence technology that combines information retrieval technology with a language generation model. For each directory label of BIM data and engineering entity data in each community, a set of related entities is retrieved in the knowledge graph through semantic similarity. These entities serve as the entry point to access the knowledge graph, and more relevant information can be extracted, such as related entities, relationships between entities, entity covariates, and community reports. In addition, relevant text blocks associated with the identified entities are extracted from the original input document. These candidate data sources are then prioritized and filtered to fit a single context window of a predefined size for generating the final retrieved text.
[0091] The retrieval-enhanced generative model has many advantages when retrieving knowledge graphs, such as improving query accuracy, enhancing model interpretability, supporting complex queries, cross-domain retrieval capabilities, multi-step reasoning capabilities, flexibility and scalability, and optimizing user experience. These advantages make the retrieval-enhanced generative model have significant advantages in handling complex knowledge query and generation tasks.
[0092] (4) Using cosine similarity to calculate a first similarity score between the current BIM data vector and the corresponding several similar engineering entity vectors, and matching the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or using cosine similarity to calculate a second similarity score between the current engineering entity vector and the corresponding several similar BIM data vectors, and matching the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score. The specific method is as follows:
[0093] Normalize the similar BIM data vectors and the corresponding current engineering entity vectors, or the similar engineering entity vectors and the corresponding current BIM data vectors to ensure that the vector lengths are consistent.
[0094] The formula for the cosine similarity is as follows:
[0095]
[0096] Wherein, vector a is a similar BIM data vector, vector b is a current engineering entity vector, or vector a is a similar engineering entity vector, vector b is a current BIM data vector, a·b represents the dot product of vector a and vector b, ||a|| and ||b|| represent the modulus lengths of vector a and vector b respectively, and the value range of cosine similarity is between [-1,1]. The closer the value is to 1, the more similar the two texts are, and the closer the value is to -1, the less similar the two texts are;
[0097] Take the first n similar BIM data vectors arranged in descending order of similarity score cosine_similarity(a,b) and match them with the corresponding current engineering entity vector, or take the first n similar engineering entity vectors arranged in descending order of similarity score cos i ne_similarity(a,b) and match them with the corresponding current BIM data vector.
[0098] Afterwards, people manually select the most suitable matching object based on the matched n similar BIM data or n similar engineering entities, thus greatly improving the accuracy and efficiency of the matching process between BIM data and engineering entities.
[0099] (5) The large language model is the Zhipu glm-4-plus large model.
[0100] The specific method of using the Zhipu glm-4-plus large model to extract entities and relationships between entities in the historical data of construction projects is as follows:
[0101] Using the named entity recognition capability of the GLM-4-Plus large model, key entities such as names of people, places, and institutions are identified from the text. This is achieved by calling the large model prompt word engineering or related functions provided by the model. The identified entities are labeled for subsequent relationship extraction and text analysis. According to the specific application scenarios and requirements, the relationship patterns that need to be extracted are defined, and the relationship extraction capability of the GLM-4-Plus large model is used to identify and extract entity pairs and their relationships that conform to the predefined relationship patterns from the text. This is also achieved by calling the API or related functions provided by the model. The extracted relationships are verified and screened to ensure their accuracy and reliability, which is done by manually reviewing the relationships or automatically verifying them using other algorithms.
[0102] The GLM-4-Plus large model has powerful natural language processing capabilities and can quickly parse and understand complex information in the historical data of construction projects. Through this model, efficient data extraction can be achieved, reducing manual intervention and data processing time, thereby improving overall work efficiency. Compared with traditional manual data extraction methods, the GLM-4-Plus large model can more accurately identify entities and relationships between entities in the historical data of construction projects. After training on a large-scale corpus and optimizing algorithms, the model has excellent semantic understanding and analysis capabilities, can accurately capture key information in the data, and reduce the error rate of data extraction.
[0103] (6) The Chinese pre-trained language model is text2vec-base-chinese.
[0104] The specific method of using the Chinese pre-trained language model text2vec-base-chinese to encode the semantics of each level of the current BIM data and the current engineering entity, and then merging the semantics of each level to form the current BIM data and the current engineering entity vector is as follows:
[0105] Extract the information of each level of the current BIM data and the current engineering entity, and convert it into text format, and perform necessary cleaning and standardization on the text, such as removing irrelevant characters and unifying the format. Input the preprocessed text into the text2vec-base-chinese model, which converts the preprocessed text into a vector representation of fixed dimensions. These vectors capture the semantic information of the text. For each level of the current BIM data and the current engineering entity, the above method is used to encode and obtain the corresponding semantic vector. According to specific needs and application scenarios, select a suitable merging strategy. Common strategies include average pooling, weighted average pooling, maximum pooling, etc. Using the selected merging strategy, merge the semantic vectors of each level of BIM data and engineering entity to obtain the overall semantic vector representing the current BIM data and the current engineering entity, that is, the current BIM data and the current engineering entity vector.
[0106] As a Chinese pre-trained language model, text2vec-base-chinese has been trained on a large-scale Chinese corpus and has strong semantic understanding capabilities. By semantically encoding each level of BIM data and engineering entities, the semantic information of these data can be captured and expressed more accurately, thereby improving the accuracy of subsequent analysis and processing. BIM data and engineering entities usually contain multiple levels of information, such as buildings, floors, rooms, equipment, etc. By semantically encoding these levels through text2vec-base-chinese and merging the semantics of each level, a vector representation containing complete information can be formed. This vector representation not only contains the specific information of each level, but also reflects the association and dependency between the levels, which helps to achieve cross-level information integration and analysis.
[0107] (7) The retrieval enhancement generation model is a GraphRAG model.
[0108] The large language model in the retrieval enhancement generation model GraphRAG is used to divide the knowledge graph into communities based on the degree of correlation between entity groups. The retrieval enhancement generation model is then used to decompose the current BIM data vector into several current BIM data sub-vectors, or the current engineering entity vector is decomposed into several current engineering entity sub-vectors. The retrieval enhancement generation model retrieves corresponding similar vectors in each community in the knowledge graph according to several current BIM data sub-vectors or several current engineering entity sub-vectors, and merges the corresponding search results to obtain a set of similar engineering entity vectors or a set of similar BIM data vectors. The specific method is as follows:
[0109] The knowledge graph data is loaded into a format that can be processed by the GraphRAG model. The large language model in GraphRAG (the Zhipu glm-4-plus large model in this embodiment) is used to analyze the relationship between entities in the knowledge graph. The knowledge graph is divided into multiple communities according to the degree of relevance between entities (such as similarity, connection strength, etc.). The current BIM data vector or the current engineering entity vector is decomposed into several sub-vectors (current BIM data sub-vectors and current engineering entity sub-vectors) using a certain method (such as attention-based decomposition, VAE and other variational autoencoders). These sub-vectors should be able to represent different aspects or features of the original vector. For each decomposed sub-vector, the GraphRAG model is used to retrieve similar vectors in the corresponding community of the knowledge graph. The retrieval-enhanced generation model combines the advantages of traditional retrieval methods and generation models, and can more accurately retrieve vectors similar to the query sub-vector from the knowledge graph. The similar vectors retrieved for each sub-vector in the corresponding community are merged. The merging strategy is based on similarity scoring, vector weighted average and other methods. According to the merged results, a set of engineering entity vectors or a set of BIM data vectors similar to the current BIM data or the current engineering entity are obtained.
[0110] By dividing the knowledge graph into different communities, GraphRAG can more accurately locate knowledge areas related to the current BIM data or engineering entities. Compared with traditional global retrieval, this community-based information retrieval method can significantly reduce the interference of irrelevant information and improve the accuracy of retrieval. GraphRAG uses a large language model to vectorize BIM data and engineering entities, breaking down complex query tasks into smaller subtasks. This decomposition method makes the retrieval process more efficient and can find similar vectors related to the query more quickly.
[0111] (8) The Embedding model is the Zhipu coding large model embedding-3.
[0112] The specific method of using the Zhipu coding large model embedding-3 to encode the extracted entities and the relationship between entities to obtain the entity vector and relationship vector is as follows:
[0113] The Embedding-3 model contains one or more embedding layers to map the input entity and relation data to a low-dimensional vector space. These embedding layers are usually trained to capture the underlying relationships and structures of the input data. After the embedding layer, the model contains a series of encoding layers (such as convolutional layers, recurrent layers, attention layers, etc.) to further process and extract features of the input data. These encoding layers can capture the complex relationships between entities and relations and generate higher-level vector representations.
[0114] The input data (entities, relationships between entities) are forward propagated through the embedding layer and the encoding layer. Each layer generates a new vector representation based on the output of the previous layer. In this process, the model learns how to map the input data to a low-dimensional vector space and capture the potential relationships therein. Finally, the model generates vector representations of entities and relationships at the output layer.
[0115] Entity vectors and relationship vectors are dense vectors in high-dimensional space that can capture the semantic information and structural features of the input data.
[0116] The embedding-3 large model has a powerful representation learning capability, which can map entities and their relationships into a high-dimensional vector space while maintaining their original semantic information and structural relationships. This vectorized representation is not only concise and clear, but also can more accurately capture the subtle differences and potential connections between data.
[0117] Example 3
[0118] A computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the method for matching BIM data and engineering entities in the semantically encoded large model in Example 2 is implemented.
[0119] The contents not described in detail in this specification belong to the prior art known to those skilled in the art. It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0120] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the pending claims of the invention.
Claims
1. A large model semantically encoded BIM data and engineering entity matching system, characterized in that: include: Knowledge graph building module, used to build knowledge graph based on historical data of construction projects; A BIM data and engineering entity encoding module, used to encode the current BIM data into the current BIM data vector, or encode the current engineering entity into the current engineering entity vector, using a Chinese pre-trained language model; A BIM data and engineering entity similarity semantic retrieval module is used to use a retrieval enhancement generation model to retrieve a number of engineering entity vectors similar to the current BIM data vector in the knowledge graph, or to use a retrieval enhancement generation model to retrieve a number of BIM data vectors similar to the current engineering entity vector in the knowledge graph; The BIM data and engineering entity matching module is used to use cosine similarity to calculate a first similarity score between a current BIM data vector and several similar engineering entity vectors retrieved by a retrieval enhancement generation model, and match the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or use cosine similarity to calculate a second similarity score between the current engineering entity vector and several similar BIM data vectors retrieved by a retrieval enhancement generation model, and match the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score.
2. The system for matching BIM data and engineering entities with semantically coded large models according to claim 1, characterized in that: The specific method of the knowledge graph construction module to establish a knowledge graph based on the historical data of the construction project is as follows: A large language model is used to extract entities and relationships between entities in the historical data of construction projects. The Embedding model is then used to encode the extracted entities and relationships between entities to obtain entity vectors and relationship vectors. A clustering algorithm is then used to cluster the entity vectors and relationship vectors to obtain a knowledge graph.
3. The system for matching BIM data and engineering entities with semantically coded large models according to claim 1, characterized in that: In the BIM data and engineering entity similarity semantic retrieval module, the specific method of using the retrieval enhancement generation model to retrieve several engineering entity vectors similar to the current BIM data vector in the knowledge graph, or using the retrieval enhancement generation model to retrieve several BIM data vectors similar to the current engineering entity vector in the knowledge graph is as follows: First, the large language model in the retrieval-enhanced generation model is used to divide the knowledge graph into communities based on the degree of correlation between entity groups. Then, the retrieval-enhanced generation model is used to decompose the current BIM data vector into several current BIM data sub-vectors, or decompose the current engineering entity vector into several current engineering entity sub-vectors. The retrieval-enhanced generation model retrieves corresponding similar vectors in each community in the knowledge graph based on several current BIM data sub-vectors or several current engineering entity sub-vectors, and merges the corresponding retrieval results to obtain a set of similar engineering entity vectors or a set of similar BIM data vectors.
4. The system for matching BIM data and engineering entities with semantically coded large models according to claim 2 or 3, characterized in that: The large language model is the Zhipu glm-4-plus large model; Use the Zhipu glm-4-plus large model to extract entities and relationships between entities in the historical data of construction projects. The specific method is as follows: The large model prompt word engineering of the GLM-4-Plus large model is used to extract entities from the text. According to the application scenarios and requirements of the construction project, the entity relationship patterns that need to be extracted are defined. The large model prompt word engineering of the GLM-4-Plus large model is used to extract entity pairs and their relationships that conform to the defined entity relationship patterns from the text.
5. The system for matching BIM data and engineering entities with semantically coded large models according to claim 1, characterized in that: The Chinese pre-trained language model is text2vec-base-chinese; Use the Chinese pre-trained language model text2vec-base-chinese to encode the current BIM data into the current BIM data vector, or encode the current engineering entity into the current engineering entity vector. The specific method is as follows: Extract each level information of the current BIM data or the current engineering entity, and convert the level information into a text format, input the level information converted into a text format into a text2vec-base-chinese model, and the text2vec-base-chinese model converts the level information converted into a text format into a vector representation. For each level of the current BIM data and the current engineering entity, the above method is used for encoding to obtain the corresponding semantic vector, and the semantic vectors of each level of the BIM data and the engineering entity are merged to obtain the current BIM data and the current engineering entity vectors respectively.
6. The system for matching BIM data and engineering entities with semantically coded large models according to claim 1 or 3, characterized in that: The retrieval enhancement generation model is a GraphRAG model; First, the knowledge graph data is loaded into a format that can be processed by the GraphRAG model. Then, the large language model in GraphRAG is used to analyze the correlation between entities in the knowledge graph and divide the knowledge graph into multiple communities. The current BIM data vector is decomposed into several current BIM data sub-vectors using a decomposition method based on the attention mechanism. The current engineering entity vector is decomposed into several current engineering entity sub-vectors using a decomposition method based on the attention mechanism. For each decomposed current BIM data sub-vector or current engineering entity sub-vector, the GraphRAG model is used to retrieve similar vectors in the corresponding community of the knowledge graph. The similar vectors retrieved in the corresponding community for each current BIM data sub-vector or current engineering entity sub-vector are merged. The merging strategy is based on the similarity score to obtain a set of engineering entity vectors similar to the current BIM data or a set of BIM data vectors similar to the current engineering entity.
7. The system for matching BIM data and engineering entities with semantically encoded large models according to claim 2, characterized in that: The Embedding model is the Zhipu coding large model embedding-3; The extracted entities and relationships between entities are encoded using the embedding-3 model of Zhipu coding to obtain entity vectors and relationship vectors. The specific method is as follows: The entities and the relationships between entities are sequentially input into the embedding layer and encoding layer of the Embedding-3 model for forward propagation, and the entity vectors and relationship vectors are generated in the output layer of the Embedding-3 model.
8. The system for matching BIM data and engineering entities with semantically coded large models according to claim 1, characterized in that: In the BIM data and engineering entity matching module, a first similarity score between the current BIM data vector and a plurality of similar engineering entity vectors retrieved by the retrieval enhancement generation model is calculated using cosine similarity, and the current BIM data vector is matched with the corresponding similar engineering entity vector according to the first similarity score, or a second similarity score between the current engineering entity vector and a plurality of similar BIM data vectors retrieved by the retrieval enhancement generation model is calculated using cosine similarity, and the current engineering entity vector is matched with the corresponding similar BIM data vector according to the second similarity score. The specific method is as follows: The formula for the cosine similarity is as follows: Wherein, vector a is a similar BIM data vector, vector b is a current engineering entity vector, or vector a is a similar engineering entity vector, vector b is a current BIM data vector, a·b represents the dot product of vector a and vector b, ||a|| and ||b|| represent the modulus lengths of vector a and vector b respectively, and the value range of cosine similarity is between [-1,1]. The closer the value is to 1, the more similar the two texts are, and the closer the value is to -1, the less similar the two texts are; Take the first n similar BIM data vectors arranged in descending order of similarity score cos i ne_similarity(a,b) and match them with the corresponding current engineering entity vector, or take the first n similar engineering entity vectors arranged in descending order of similarity score cos i ne_similarity(a,b) and match them with the corresponding current BIM data vector.
9. A method for matching BIM data with engineering entities using semantic coding of a large model, characterized in that: The following steps are involved: Build a knowledge graph based on historical data of construction projects; Use the Chinese pre-trained language model to encode the Chinese text of the current BIM data into the current BIM data vector, or encode the Chinese text of the current engineering entity into the current engineering entity vector; A retrieval enhancement generation model is established by combining a large language model and a knowledge graph. The retrieval enhancement generation model is used to retrieve several engineering entity vectors similar to the current BIM data vector in the knowledge graph, or the retrieval enhancement generation model is used to retrieve several BIM data vectors similar to the current engineering entity vector in the knowledge graph. Use cosine similarity to calculate a first similarity score between the current BIM data vector and several similar engineering entity vectors retrieved by the retrieval enhancement generation model, and match the current BIM data vector with the corresponding similar engineering entity vector according to the first similarity score, or use cosine similarity to calculate a second similarity score between the current engineering entity vector and several similar BIM data vectors retrieved by the retrieval enhancement generation model, and match the current engineering entity vector with the corresponding similar BIM data vector according to the second similarity score.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by the processor, the method for matching BIM data and engineering entities with semantically encoded large models as described in claim 9 is implemented.
Citation Information
Cited By
IFC data analysis method and device, equipment, storage medium and program product
CN119962521A
Bridge steel structure collaborative design method and system based on BIM technology
CN120632994A