Fabricated bridge modeling method and system based on large model and RAG technology
By combining large language models with RAG technology, a standard bridge component library was established and vectorized, solving the problems of parameter errors and low efficiency in traditional prefabricated bridge design. This enabled efficient and accurate 3D model generation, suitable for the digital construction of highway and urban bridges.
Patent Information
- Application Number
- CN202511210384.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-21
AI Technical Summary
In traditional prefabricated bridge design, manually determining component parameters is prone to errors, resulting in low design efficiency and difficulty in quickly and accurately matching component parameters for complex bridge types, which restricts the intelligent and efficient development of prefabricated bridge modeling.
Based on large language model and retrieval-enhanced generation (RAG) technology, a standard bridge component library is established. Knowledge sentences are converted into vectors through word embedding, and RAG technology is used for parameter parsing and optimization to generate a three-dimensional model.
It improves design efficiency and accuracy, reduces errors caused by human factors, lowers labor costs and design error risks, and enables intelligent generation of 3D models to meet diverse design needs.
Smart Images

Figure CN120996025A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bridge engineering design and artificial intelligence, specifically to a prefabricated bridge modeling method and system based on large model and RAG technology. Background Technology
[0002] In the field of modern bridge construction, prefabricated bridges have become an important development direction in bridge construction due to their significant advantages such as high construction efficiency, controllable quality, and minimal environmental impact. In the traditional prefabricated bridge design process, designers need to manually select and determine suitable component parameters based on design specifications, engineering experience, and a large number of standard component drawings, and then manually construct a 3D model. This design method is not only inefficient and prone to errors or omissions in parameter selection due to human factors, but also makes it difficult for designers to quickly and accurately match the most suitable component parameters when facing complex bridge types (such as skew bridges and curved bridges) and diverse span requirements. This greatly restricts the intelligent and efficient development of prefabricated bridge modeling. Summary of the Invention
[0003] This application provides a prefabricated bridge modeling method and system based on large model and RAG technology, aiming to solve the technical problems of error-proneness and low design efficiency caused by manually determining component parameters and then constructing a three-dimensional model in related technologies.
[0004] This application provides a method for modeling prefabricated bridges based on large models and RAG technology, which includes the following steps: A standard bridge component library is established based on the standard drawing set of prefabricated bridges. The standard bridge component library includes bridge type, span, component type and component parameters. The large language model is invoked to generate standardized knowledge statements based on the bridge standard component library; The standardized knowledge statements are converted into vectors using a word embedding method and stored in a vector database; The input natural language query is converted into a vector using a word embedding method, and then retrieved from the vector database to obtain standardized knowledge statements related to the query. Using RAG technology, the retrieved standardized knowledge statements are parsed and optimized based on the large language model to generate parameters for each component. Based on the parameters of each component, a component modeling algorithm is called to generate a three-dimensional model of the component. The three-dimensional model of the component is then assembled to obtain a prefabricated bridge model.
[0005] In one implementation, establishing a bridge standard component library based on prefabricated bridge standard drawing sets includes: Collect standard drawings and engineering drawings of prefabricated bridges, and extract the component types and parameters; Based on the component types and parameters, a standard bridge component library is established according to the bridge span and bridge type.
[0006] In one embodiment, the establishment of a bridge standard component library based on prefabricated bridge standard drawing set further includes: The bridge standard component library was cross-checked and verified by experts.
[0007] In one implementation, the step of converting the standardized knowledge statement into a vector using a word embedding method and storing it in a vector database includes: The standardized knowledge statement is segmented into sub-words using a word embedding method. Sub-words are mapped to initial vectors through a word embedding layer. After positional encoding, contextual semantic fusion is performed through the multi-head self-attention mechanism of the Transformer encoder to generate context-aware sub-word vectors. The context-aware sub-word vectors are aggregated to obtain sentence vector representations, which are then stored in a vector database.
[0008] In one implementation, the numerical parameters in the normalized knowledge statement are semantically expressed through explicit encoding of numerical features and deep integration with the contextual modeling capabilities of the Transformer encoder.
[0009] In one implementation, the step of converting the input natural language query into a vector using a word embedding method, and then retrieving it from the vector database to obtain normalized knowledge statements related to the query, includes: The word embedding method is used to convert the input natural language query into a query vector; The search is performed in the vector database by calculating cosine similarity or Euclidean distance; Dynamically adjust similarity or distance thresholds to filter out standardized knowledge statements relevant to the query.
[0010] In one implementation, the use of RAG technology to parse and optimize the retrieved standardized knowledge statements based on the large language model to generate parameters for each component includes: The retrieved standardized knowledge statements are subjected to query statement matching processing, which includes: determining whether the natural statement query and the retrieved standardized knowledge statements are completely matched; if so, the component parameters corresponding to the retrieved standardized knowledge statements are returned; if not, the mismatched component parameters in the retrieved standardized knowledge statements are removed. Based on the obtained component parameters, parameter type differentiation processing is performed, including: if the component parameter is a discrete parameter, the nearest neighbor method is used to calculate the closest discrete value; if the component parameter is a continuous parameter, an interpolation algorithm is used to calculate the optimal value. The parameter verification and generation based on the parameter association constraint model includes: establishing a parameter association matrix and defining the value range and coupling relationship of the component parameters; reasoning the feasibility of parameter combinations based on the value range, coupling relationship and large language model; and using a multi-objective optimization method, combined with engineering specifications and feasibility reasoning results, to iteratively optimize and generate parameter combinations that meet the constraints, so as to generate the parameters of each component.
[0011] In one implementation, the step of generating a 3D model of a component based on the parameters of each component using a component modeling algorithm, assembling the 3D model of the component, and obtaining a prefabricated bridge model includes: Based on the component parameters of each component, the component modeling algorithm is invoked to generate a three-dimensional model of the component through stretching, blending, and lofting operations; Based on the assembly relationship of each component, the three-dimensional model of the component is assembled to obtain the prefabricated bridge model.
[0012] This application also provides a prefabricated bridge modeling system based on large model and RAG technology, which applies the prefabricated bridge modeling method based on large model and RAG technology as described in any of the above claims, and includes: The bridge standard component library creation module is configured to: create a bridge standard component library based on prefabricated bridge standard drawings; The knowledge statement generation module is configured to: call the large language model and generate standardized knowledge statements based on the bridge standard component library; The retrieval module is configured to: convert the standardized knowledge statements into vectors using a word embedding method and store them in a vector database; convert the input natural language query into a vector using a word embedding method and retrieve it from the vector database to obtain the standardized knowledge statements related to the query; The RAG module is configured to: use RAG technology to perform parameter parsing and optimization on the retrieved standardized knowledge statements based on the large language model, so as to generate parameters for each component; The modeling and assembly module is configured to: generate a 3D model of the component based on the parameters of each component by calling the component modeling algorithm, assemble the 3D model of the component, and obtain a prefabricated bridge model.
[0013] In one implementation, the RAG module includes: The query statement matching processing unit is configured to perform query statement matching processing on the retrieved standardized knowledge statement, which includes: determining whether the natural statement query and the retrieved standardized knowledge statement are completely matched; if yes, then returning the component parameters corresponding to the retrieved standardized knowledge statement; if no, then removing the mismatched component parameters from the retrieved standardized knowledge statement. The parameter type differentiation processing unit is configured to perform parameter type differentiation processing based on the obtained component parameters, including: if the component parameter is a discrete parameter, using the nearest neighbor method to calculate the closest discrete value; if the component parameter is a continuous parameter, using an interpolation algorithm to calculate the optimal value. The parameter association constraint model verification unit is configured to: establish a parameter association matrix, define the value range and coupling relationship of the component parameters, and, based on the value range, coupling relationship and the feasibility of parameter combination reasoning using a large language model, use a multi-objective optimization method, combined with engineering specifications and feasibility reasoning results for iterative optimization, to generate parameter combinations that satisfy the constraints, so as to generate the parameters of each component.
[0014] The beneficial effects of the technical solutions provided in this application include: This application provides a prefabricated bridge modeling method and system based on large model and RAG technology. The bridge standard component library is established based on the standard drawing set of prefabricated bridges, which ensures the accuracy of component parameters and eliminates the need for designers to obtain a set of bridge design parameters based on experience and reference materials. It integrates Large Language Model (LLM) and Retrieval Enhanced Generation (RAG) technology, relying on the intelligent processing capabilities of the LLM and the precise semantic retrieval of word embedding technology to effectively avoid parameter errors caused by human factors, significantly improving design efficiency and accuracy, and reducing labor costs and the risk of design errors. The intelligent drive to directly generate 3D models through natural language queries reduces the time designers spend building models, and the models also have higher accuracy. Therefore, this application is an intelligent modeling solution that organically integrates functions such as component parameter sorting, intelligent combination of knowledge statements, efficient semantic retrieval, parameter optimization, and automatic 3D model generation, improving modeling efficiency and quality, meeting the increasingly diverse and personalized design needs of prefabricated bridges, and can be widely applied to the digital construction of prefabricated bridge structures such as highways and urban bridges. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the steps of a prefabricated bridge modeling method based on large model and RAG technology in one embodiment of the present invention.
[0017] Figure 2 This is a schematic diagram of a prefabricated bridge modeling system based on large model and RAG technology in one embodiment of the present invention.
[0018] Figure 3 This is a schematic diagram of a three-dimensional model of a component in one embodiment of the present invention.
[0019] Figure 4 This is a schematic diagram of a prefabricated bridge model according to one embodiment of the present invention. Detailed Implementation
[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0021] This application provides a prefabricated bridge modeling system based on large models and RAG technology, aiming to solve the technical problems of error-proneness and low design efficiency caused by manually determining component parameters and then constructing a three-dimensional model in related technologies.
[0022] Large Language Models (LLMs), also known as large models, are artificial intelligence models trained on massive amounts of text data using deep learning. They are capable of understanding, generating, and reasoning about natural language. They belong to generative AI and can be used for various tasks such as dialogue, writing, translation, and code generation. The working principle of a large language model is as follows: First, there is the training process, such as training on massive amounts of text data to learn the statistical patterns of language (e.g., word collocation, grammatical structure); self-supervised learning is used (e.g., predicting the next word, masked language modeling); then comes the reasoning process, such as when the user inputs a prompt, the large model predicts the most likely output based on probability.
[0023] Retrieval-Augmented Generation (RAG) is a technique that combines information retrieval and large language model generation. It aims to improve the accuracy and timeliness of generated content by dynamically incorporating external knowledge bases, while reducing the "hallucination" problem of large models. The core idea of RAG is to retrieve relevant information from external databases (such as documents, web pages, and knowledge graphs) before generating an answer, and then combine the retrieval results to generate the final response.
[0024] Word embedding is a technique that transforms words in natural language into numerical vectors (i.e., a set of numbers) that computers can process. Its core goal is to enable machines to understand the semantics and contextual relationships of words, thereby improving the performance of natural language processing (NLP) tasks. The core idea of word embedding is to express the semantic information of words through low-dimensional dense vectors. For example, similar words are close in distance in the vector space, and vector operations can reflect semantic relationships.
[0025] like Figure 1 As shown, where, Figure 1 This is a flowchart illustrating the steps of a prefabricated bridge modeling method based on large model and RAG technology in one embodiment of the present invention.
[0026] This embodiment provides a method for modeling prefabricated bridges based on large models and RAG technology, which includes the following steps: Step S1: Establish a standard bridge component library based on the standard drawing set of prefabricated bridges. The standard bridge component library includes bridge type, span, component type and component parameters. Step S2: Call the large language model to generate standardized knowledge statements based on the bridge standard component library; Step S3: Use word embedding to convert standardized knowledge statements into vectors and store them in a vector database; Step S4: Use word embedding to convert the input natural language query into a vector, and search in the vector database to obtain the standardized knowledge statement related to the query; Step S5: Using RAG technology, the retrieved standardized knowledge statements are parsed and optimized based on a large language model to generate parameters for each component. Step S6: Based on the parameters of each component, call the component modeling algorithm to generate a 3D model of the component, assemble the 3D model of the component, and obtain the prefabricated bridge model.
[0027] This embodiment provides a prefabricated bridge modeling method based on large model and RAG technology. The bridge standard component library is established based on the standard drawing set of prefabricated bridges, which ensures the accuracy of component parameters and eliminates the need for designers to obtain a set of bridge design parameters based on experience and reference materials. It integrates Large Language Model (LLM) and Retrieval Enhanced Generation (RAG) technology, relying on the intelligent processing capabilities of the LLM and the precise semantic retrieval of word embedding technology to effectively avoid parameter errors caused by human factors, significantly improving design efficiency and accuracy, and reducing labor costs and the risk of design errors. The intelligent drive to directly generate 3D models through natural language queries reduces the time designers spend building models, and the models also have higher accuracy. Therefore, this embodiment is an intelligent modeling scheme that organically integrates functions such as component parameter sorting, intelligent combination of knowledge statements, efficient semantic retrieval, parameter optimization, and automatic 3D model generation, improving modeling efficiency and quality, meeting the growing diversified and personalized design needs of prefabricated bridges, and can be widely applied to the digital construction of prefabricated bridge structures such as highways and urban bridges.
[0028] In one embodiment, step S1, establishing a bridge standard component library based on prefabricated bridge standard drawing set, includes: Step S11: Collect standard drawings and engineering drawings of prefabricated bridges, and extract the component types and component parameters.
[0029] Specifically, standard drawings and engineering drawings for prefabricated bridges can be sourced from different bridges in different regions. Component types can include small box girders, cap beams, piers, etc. Component parameters are their geometric dimensions. For example, the dimensions of a small box girder may include top plate width, bottom plate width, top inner chamfer width, bottom inner chamfer width, beam height, bottom plate thickness, top plate thickness, web thickness, cantilever end thickness, cantilever root thickness, and web slope. The dimensions of a cap beam may include top width, bottom width, block top width, block inner width, block height, beam height, longitudinal length, cross slope, and edge slope. The dimensions of a pier may include transverse width, longitudinal width, and fillet radius. The more detailed and comprehensive the collected geometric dimensions of standard components, the better the overall parameter completeness.
[0030] Step S12: Based on component type and component parameters, establish a standard bridge component library according to bridge span and bridge type.
[0031] Specifically, bridge spans can range from 10 to 50 meters, and bridge types can include straight bridges, skew bridges, and curved bridges. Therefore, the standard bridge component library includes bridge span, bridge type, component type, and component parameters.
[0032] In one embodiment, step S1, establishing a bridge standard component library based on prefabricated bridge standard drawing set, further includes: Step S13: Cross-check and expert verification of the standard bridge component library.
[0033] Specifically, cross-checking involves different engineers independently analyzing and verifying the parameters of the same component, while expert verification involves domain experts conducting a final review of the component parameters to further ensure their accuracy.
[0034] In step S2, the large language model interface is invoked to combine the span, bridge type, component type, and component parameters from the bridge standard component library based on the large model prompt word project, generating standardized knowledge statements. Furthermore, the prompt word template contains placeholders for span, bridge type, main beam type, special parameters, and dimensional parameters. By filling in the specific parameters from the bridge standard component library, the large language model interface is invoked to generate knowledge statements.
[0035] In one embodiment, step S3, converting standardized knowledge statements into vectors using a word embedding method and storing them in a vector database, includes: Step S31: The standardized knowledge statement is segmented into sub-words using the word embedding method. The sub-words are mapped to initial vectors through the word embedding layer. After position encoding, the context semantics are fused through the multi-head self-attention mechanism of the Transformer encoder to generate context-aware sub-word vectors. Step S32: Aggregate the context-aware sub-word vectors (e.g., take the [CLS] tag vector) to obtain the sentence vector representation, and store it in the vector database.
[0036] In this context, numerical parameters in standardized knowledge statements are semantically expressed through explicit encoding of numerical features and deep integration with the context modeling capabilities of the Transformer encoder.
[0037] The above scheme integrates bridge standard drawing sets from different regions into knowledge statements and vectors and stores them in a database. This facilitates the storage, management and sharing of knowledge, provides rich knowledge resources for subsequent bridge design projects, enables efficient reuse of knowledge, and reduces design costs.
[0038] In one embodiment, step S4 involves converting the input natural language query into a vector using a word embedding method, and then retrieving it from a vector database to obtain standardized knowledge statements related to the query, including: Step S41: Use word embedding to convert the input natural language query into a query vector; Step S42: Search the vector database by calculating cosine similarity or Euclidean distance; Step S43: Dynamically adjust the similarity or distance threshold to filter out standardized knowledge statements related to the query.
[0039] The above solution efficiently processes diverse natural language input from users. Whether it is a conventional straight bridge or a complex skew or curved bridge design, it can quickly retrieve relevant information and provide matching knowledge statements for the subsequent generation of component parameters, significantly improving matching and retrieval efficiency.
[0040] In one embodiment, step S5 involves using RAG technology to parse and optimize the retrieved standardized knowledge statements based on a large language model, generating parameters for each component, including: Step S51: Perform query statement matching processing on the retrieved standardized knowledge statements, which includes: determining whether the natural statement query and the retrieved standardized knowledge statements are completely matched; if yes, return the component parameters corresponding to the retrieved standardized knowledge statements; if no, remove the mismatched component parameters from the retrieved standardized knowledge statements. Step S52: Perform parameter type differentiation processing based on the obtained component parameters, including: if the component parameter is a discrete parameter, use the nearest neighbor method to calculate the closest discrete value; if the component parameter is a continuous parameter, use an interpolation algorithm to calculate the optimal value. Linear interpolation is suitable for scenarios where the parameter changes in a linear relationship. Step S53: Verification based on parameter association constraint model, which includes: establishing parameter association matrix, defining the value range and coupling relationship of component parameters, reasoning the feasibility of parameter combinations based on value range, coupling relationship and large language model, adopting multi-objective optimization method (such as genetic algorithm), combining engineering specifications and feasibility reasoning results for iterative optimization, generating parameter combinations that meet constraints, so as to generate the parameters of each component.
[0041] The above scheme involves performing three levels of parameter analysis and optimization to complete the optimization, adjustment, and determination of parameters.
[0042] In one embodiment, step S6, generating a 3D model of a component based on the parameters of each component using a component modeling algorithm, assembling the 3D model of the component, and obtaining a prefabricated bridge model includes: Step S61: Based on the component parameters of each component, call the component modeling algorithm and construct a three-dimensional solid model through stretching, blending, and lofting operations; Step S62: Based on the assembly relationship of each component, assemble the three-dimensional model of the components to obtain the prefabricated bridge model.
[0043] Specifically, based on the optimized parameters, the parametric modeling algorithm is called to automatically generate three-dimensional models of components such as small box girders, cap beams, and piers. The geometric shape, dimensional accuracy, and compliance of assembly interference are verified by the model inspection tool, and finally assembled to form a complete three-dimensional model of the prefabricated bridge.
[0044] The above solution, through automated knowledge combination and model generation processes, significantly reduces the workload of engineers in manual design, greatly improves modeling efficiency, shortens the design cycle, and can quickly respond to diverse design needs compared to traditional design methods.
[0045] like Figure 2 As shown, Figure 2 This is a schematic diagram of a prefabricated bridge modeling system based on large model and RAG technology in one embodiment of the present invention.
[0046] This embodiment also provides a prefabricated bridge modeling system based on large models and RAG technology. Applying the above method, it includes: The bridge standard component library creation module is configured to: create a bridge standard component library based on prefabricated bridge standard drawings; The knowledge statement generation module is configured to: call the large language model and generate standardized knowledge statements based on the bridge standard component library; The retrieval module is configured to: convert standardized knowledge statements into vectors using word embedding methods and store them in a vector database; convert the input natural language query into a vector using word embedding methods and retrieve it from the vector database to obtain standardized knowledge statements related to the query. The RAG module is configured to: use RAG technology to parse and optimize the parameters of the retrieved standardized knowledge statements based on a large language model in order to generate parameters for each component; The modeling and assembly module is configured to: generate a 3D model of a component based on the parameters of each component by calling the component modeling algorithm, assemble the 3D model of the component, and obtain a prefabricated bridge model.
[0047] In one embodiment, the RAG module includes: The query statement matching processing unit is configured to perform query statement matching processing on the retrieved standardized knowledge statement, which includes: determining whether the natural statement query and the retrieved standardized knowledge statement are completely matched; if so, returning the component parameters corresponding to the retrieved standardized knowledge statement; if not, removing the mismatched component parameters from the retrieved standardized knowledge statement. The parameter type differentiation processing unit is configured to perform parameter type differentiation processing based on the obtained component parameters, including: if the component parameter is a discrete parameter, using the nearest neighbor method to calculate the closest discrete value; if the component parameter is a continuous parameter, using an interpolation algorithm to calculate the optimal value. The parameter association constraint model verification unit is configured to: establish a parameter association matrix, define the value range and coupling relationship of component parameters, infer the feasibility of parameter combinations based on the value range, coupling relationship and large language model, adopt a multi-objective optimization method, combine engineering specifications and feasibility inference results for iterative optimization, generate parameter combinations that meet the constraints, and generate parameters for each component.
[0048] The functions of each module have been described in the above methods and will not be repeated here.
[0049] like Figure 3 and Figure 4 As shown, where, Figure 3 This is a schematic diagram of a three-dimensional model of a component in one embodiment of the present invention. Figure 3 From top to bottom, the structure consists of a small box girder, a cap beam, and a pier column. Figure 4 This is a schematic diagram of a prefabricated bridge model according to one embodiment of the present invention.
[0050] The following example, using a prefabricated bridge design project for a city's expressway, details the specific implementation process: Step S1: Establish a standard bridge component library based on the standard drawings of prefabricated bridges. The standard bridge component library includes bridge type, span, component type and component parameters.
[0051] We collected standardized design atlases for prefabricated bridges and actual engineering project drawings from the region and surrounding cities. Five senior bridge engineers were organized to extract parameters for components such as small box girders, cap beams, and piers under different spans (20m, 25m, 30m, 35m, 40m) and different bridge types (including straight bridges, skew bridges (skew angles of 15° and 30°), and curved bridges (radii of 60m, 80m, 100m, 125m, and 150m)). A total of 17 parameter categories were compiled, creating a standard bridge component library containing 2208 parameter records. The library underwent expert verification to ensure the accuracy of the parameters. Step S2: Call the large language model to generate standardized knowledge statements based on the bridge standard component library.
[0052] Using a standard bridge component library as input, and combining prompt word templates with information on span, bridge type, main beam type, special parameters, and dimensional parameters, the GLM-4-32B large language model interface is invoked to generate detailed knowledge statements. For example, the question "Question: What are the design parameters for a bridge with a span of 20 meters, a skew bridge type, a skew angle of 30 degrees, and a main girder type of small box girder?" is answered: The design parameters for a bridge with a span of 20 meters, a skew bridge type, a skew angle of 30 degrees, and a main girder type of small box girder are: small box girder dimensions {"A1":1200,"A2": 1000,"A3": 1200,...}, cap beam dimensions {"B1":12000,"B2": 1600,"B3": 1300,...}, and pier dimensions {"C1":1800,"C2": 2000,"C3":1500,...}. Utilizing the powerful natural language processing capabilities of the large model, the generated knowledge statements are ensured to be logically clear, expressively standardized, and comprehensively and accurately reflect the component parameter information. Step S3: Use word embedding to convert standardized knowledge statements into vectors and store them in a vector database.
[0053] The generated standardized knowledge statements are stored as vectors. Word embedding technology is used, employing operations such as sub-word segmentation and semantic fusion to convert each knowledge statement into a low-dimensional vector form, ensuring that semantically similar knowledge items are close in distance within the vector space. Vector feature example: vector = [ 0.254, -0.167, 0.033, ...,# Bridge type semantic area 1.892, -0.425, 0.731, ...,# Numerical characteristic region of span 0.642, 1.205, -0.338, ...,# Special parameter feature area of type -2.173, 0.056, 0.884, ...# Main beam type associated parameter area ]” The transformed vectors are stored in a high-performance vector database, providing an efficient data foundation for subsequent knowledge retrieval. Step S4: Use word embedding to convert the input natural language query into a vector, and then search in the vector database to obtain the standardized knowledge statement related to the query.
[0054] When a user inputs a natural language query, the input question is first standardized. For example, when a user inputs queries such as "Create a 22-meter short box girder straight bridge," "Design a straight bridge with a 22-meter short box girder span," or "Design a 22-meter span straight bridge with a short box girder main beam," the query is converted into "Design parameters for a bridge with a 22-meter span, a straight bridge type, and a short box girder main beam type" using a large model. Next, the query is vectorized, and a retrieval operation is performed in a vector database. By calculating the cosine similarity or Euclidean distance between the input vector and each knowledge vector in the database, the most relevant data knowledge is matched to the user's needs. By setting a similarity threshold of 0.85, three knowledge statements with a similarity greater than 0.85 to the input natural language query are selected as the retrieved, standardized knowledge statements relevant to the query.
[0055] Step S5: Using RAG technology, the retrieved standardized knowledge statements are parsed and optimized based on a large language model to generate parameters for each component.
[0056] Using RAG technology, in-depth analysis was conducted based on a large model to optimize and determine the parameters. By matching the retrieved standardized knowledge statements with the query statements, data belonging to curved bridges was removed, resulting in parameters for 20-meter and 25-meter span short box girder straight bridges. Based on the obtained component parameters, parameter type differentiation was applied, and the nearest neighbor method and linear interpolation were used to calculate the parameters. Simultaneously, the parameters were validated based on a parameter association constraint model (constraints on the ratio of beam height to span, the relationship between web thickness and beam height, and the relationship between top and bottom plate thickness and beam height according to specifications) to ensure that the calculated component parameters meet engineering specifications. Finally, the determined parameters were output in standard JSON format.
[0057] Step S6: Based on the parameters of each component, call the component modeling algorithm to generate a 3D model of the component, assemble the 3D model of the component, and obtain the prefabricated bridge model.
[0058] Based on the determined component parameters, the automated creation and generation of 3D models is further realized. Specially designed parametric modeling algorithms for small box girders, cap beams, and piers are used, based on operations such as stretching, blending, and lofting, to generate solid 3D models. The assembly relationships of each component are determined according to the overall design information, and the generated component 3D models are assembled to construct a complete prefabricated bridge 3D model. Model checking tools are used to conduct preliminary checks and verifications on the geometry, dimensional accuracy, and assembly interference of the generated model to ensure that the model meets design specifications and engineering requirements.
[0059] Through the above implementation process, this application has successfully realized a prefabricated bridge modeling method based on large model and RAG technology, which effectively meets the actual engineering design needs.
[0060] In the description of this application, it should be noted that the terms "upper," "lower," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two elements. For those skilled in the art, the specific meaning of the above terms in this application can be understood according to the specific circumstances.
[0061] It should be noted that in this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 limitations, 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.
[0062] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0063] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A prefabricated bridge modeling method based on a large model and RAG technology, characterized in that, It comprises the following steps: A bridge standard component library is established based on the prefabricated bridge standard atlas, and the bridge standard component library comprises a bridge type, a span, a component type, and component parameters; A large language model is called to generate standardized knowledge sentences based on the bridge standard component library; The standardized knowledge sentences are converted into vectors using a word embedding method and stored in a vector database; An input natural language query is converted into a vector using a word embedding method, and the vector database is searched to obtain standardized knowledge sentences related to the query; RAG technology is used to analyze and optimize the retrieved standardized knowledge sentences based on the large language model to generate component parameters. Based on the component parameters, a component modeling algorithm is called to generate a component three-dimensional model, and the component three-dimensional models are assembled to obtain a prefabricated bridge model.
2. The large model and RAG technology-based assembled bridge modeling method of claim 1, wherein, The bridge standard component library is established based on the prefabricated bridge standard atlas, which comprises: Collect prefabricated bridge standard atlases and engineering drawings, and extract component types and component parameters; Based on the component type and component parameter, the bridge standard component library is established according to the bridge span and bridge type.
3. The large model and RAG technology-based assembled bridge modeling method of claim 2, wherein, The bridge standard component library is established based on the prefabricated bridge standard atlas, which further comprises: Cross-checking and expert checking of the bridge standard component library.
4. The large model and RAG technology-based assembled bridge modeling method of claim 1, wherein, The standardized knowledge sentences are converted into vectors using a word embedding method and stored in a vector database, which comprises: The standardized knowledge sentences are segmented into subwords using a word embedding method, and the subwords are mapped to initial vectors through a word embedding layer. After combining the position encoding, the context semantic fusion is performed through the multi-head self-attention mechanism of the Transformer encoder to generate the context-aware subword vector. The context-aware subword vector is aggregated to obtain a sentence vector representation, which is stored in the vector database.
5. The large model and RAG technology-based assembled bridge modeling method of claim 4, wherein, The numerical parameters in the standardized knowledge sentences are semantically expressed by combining the numerical feature explicit coding with the deep context modeling capability of the Transformer encoder.
6. The large model and RAG technology-based assembled bridge modeling method of claim 1, wherein, The input natural language query is converted into a vector using a word embedding method, and the vector database is searched to obtain standardized knowledge sentences related to the query, which comprises: The input natural language query is converted into a query vector using a word embedding method; The cosine similarity or Euclidean distance is calculated in the vector database to perform retrieval; The similarity or distance threshold is dynamically adjusted to filter out the standardized knowledge sentences related to the query.
7. The large model and RAG technology-based assembled bridge modeling method of claim 1, wherein, The RAG technology is used to analyze and optimize the retrieved standardized knowledge sentences based on the large language model to generate component parameters, which comprises: The retrieved standardized knowledge sentences are processed for query sentence matching, which comprises: determining whether the natural language query and the retrieved standardized knowledge sentences are completely matched; if yes, the component parameters corresponding to the retrieved standardized knowledge sentences are returned; if not, the unmatched component parameters in the retrieved standardized knowledge sentences are excluded. The parameter type differentiation processing unit is configured to perform parameter type differentiation processing according to the obtained component parameters, which includes: if the component parameter is a discrete parameter, calculating the closest discrete value by using a nearest neighbor value method; and if the component parameter is a continuous parameter, calculating the optimal value by using an interpolation algorithm. The parameter verification and generation based on the parameter association constraint model includes: establishing a parameter association matrix, defining the value range and coupling relationship of the component parameters, and based on the value range, coupling relationship and feasibility of reasoning parameter combination of the large language model, iteratively optimizing the combination of parameters that meet the constraints by using a multi-objective optimization method in combination with engineering specifications and feasible reasoning results to generate the combination of parameters that meet the constraints, so as to generate each component parameter.
8. The large model and RAG technology-based assembled bridge modeling method of claim 1, wherein, The component modeling algorithm is called based on the component parameters of each component to generate a component three-dimensional model through stretching, fusion and lofting operations. The component three-dimensional models are assembled based on the assembly relationship of each component to obtain the assembly type bridge model. The application of the assembly type bridge modeling method based on the large model and RAG technology according to any one of claims 1 to 8 includes:
9. A prefabricated bridge modeling system based on a large model and RAG technology, characterized in that, The bridge standard component library establishment module is configured to establish a bridge standard component library based on an assembly type bridge standard atlas; The knowledge sentence generation module is configured to call a large language model and generate standardized knowledge sentences based on the bridge standard component library; The retrieval module is configured to convert the standardized knowledge sentences into vectors by using a word embedding method and store the vectors in a vector database, convert an input natural language query into a vector by using a word embedding method, and perform retrieval in the vector database to obtain standardized knowledge sentences related to the query; The RAG module is configured to use RAG technology to perform parameter analysis and optimization on the retrieved standardized knowledge sentences based on the large language model to generate component parameters; The modeling and assembly module is configured to call a component modeling algorithm based on the component parameters to generate a component three-dimensional model and assemble the component three-dimensional models to obtain an assembly type bridge model. The RAG module includes:
10. The large model and RAG technology-based assembled bridge modeling system of claim 9, wherein, The query sentence matching processing unit is configured to perform query sentence matching processing on the retrieved standardized knowledge sentences, which includes: determining whether the natural language query and the retrieved standardized knowledge sentences are completely matched; if yes, returning the component parameters corresponding to the retrieved standardized knowledge sentences; and if no, eliminating the unmatched component parameters in the retrieved standardized knowledge sentences; The parameter type differentiation processing unit is configured to perform parameter type differentiation processing according to the obtained component parameters, which includes: if the component parameter is a discrete parameter, calculating the closest discrete value by using a nearest neighbor value method; and if the component parameter is a continuous parameter, calculating the optimal value by using an interpolation algorithm. The parameter association constraint model checking unit is configured to: establish a parameter association matrix, define a value range and a coupling relationship of the component parameters, based on the value range, the coupling relationship and a large language model inference parameter combination feasibility, adopt a multi-objective optimization method, combine engineering specifications and feasible inference results for iterative optimization, and generate a parameter combination satisfying the constraints to generate each component parameter.
Citation Information
Cited By
Three-dimensional CAD automatic modeling method and system based on sequence and retrieval enhancement
CN121480336A