A guardrail generation method and device based on a large language model and a medium
By using a large language model to deeply understand the semantics of building models and construction method documents and extract information in a structured manner, the problem of poor adaptability of traditional expert rule systems is solved, and the accurate generation of guardrails that meet safety standards is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI LIANGZHEN CONSTR TECH CO LTD
- Filing Date
- 2026-02-09
- Publication Date
- 2026-04-28
AI Technical Summary
Existing expert rule systems struggle to adapt to the different modeling habits and naming conventions of various design teams when generating building guardrails. This leads to omissions or errors in location identification, an inability to obtain accurate surface thickness information, and an inability to generate guardrails that comply with safety regulations.
A large language model is used to semantically understand the room names in the building model, a knowledge base of building construction vectors is constructed, construction hierarchy information is extracted, and combined with geometric data and protection height data, the height of railing instances and layout traces are automatically calculated to generate a 3D model of protective railings that conforms to the specifications.
It enables flexible adaptation to changing modeling habits and naming rules, accurately obtains surface layer thickness information, ensures that the generated guardrails comply with national standards in terms of geometric position and protection height, and eliminates safety hazards.
Smart Images

Figure CN121659436B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, device and medium for generating guardrails based on a large language model. Background Technology
[0002] In the field of Building Information Modeling (BIM) design and construction drawing, generating safety-compliant guardrails in open locations such as balconies, corridors, and accessible roofs is a crucial and complex task. Currently, the mainstream method for achieving this function relies on predefined expert rule systems. Such systems require users to strictly follow established rules to standardize the naming and modeling of model elements. The system then identifies the locations where guardrails need to be placed through character matching and calculates the guardrail parameters based on the limited geometric information in the model.
[0003] However, in actual construction projects, there are significant differences in modeling habits and naming rules among different design teams and even within the same team. Furthermore, model depth often stops at the main structure, while detailed structural layers such as wall and floor finishes are recorded in separate construction practice tables in natural language. This makes it difficult for a fixed expert rule system to exhaustively and flexibly adapt to the ever-changing non-standard naming conventions, leading to omissions or errors in location identification. More importantly, the system cannot understand and utilize the construction practice tables described in natural language, thus failing to obtain the precise surface thickness information necessary for calculating railing height. Consequently, the final generated railing may not meet the actual completion requirements in terms of walkable surface determination and protective height, posing safety hazards. Summary of the Invention
[0004] This application provides a method, device, and medium for generating guardrails based on a large language model to solve the above-mentioned technical problems.
[0005] On the one hand, embodiments of this application provide a method for generating guardrails based on a large language model, including:
[0006] Obtain room list data from the target building model, and perform semantic understanding of the room names in the room list data based on a large language model to output a specific set of rooms of the target room type; the specific set of rooms includes the target room types that require the installation of guardrails.
[0007] Obtain the construction method file corresponding to the target building model, and perform content segmentation processing on the construction method file based on the large language model to construct a construction method vector knowledge base. Based on the room names in the specific room set, search the construction method vector knowledge base to extract the structural hierarchy information associated with the specific room set. The construction method file includes natural language descriptions of the material and structural hierarchy information of the building components. The structural hierarchy information includes at least the structural thickness data of the two sides and the top of the wall and the structural thickness data of the floor slab.
[0008] Based on the building type data of the target building model, the target protection height data corresponding to the specific room set is determined. Based on the geometric data, wall surface layer thickness data, floor surface layer thickness data and the target protection height data of the specific room set, it is determined whether guardrails need to be installed on the open wall positions of the specific room set, so as to filter out the target wall set that needs to be installed with guardrails and the corresponding walkable surface data.
[0009] Based on the geometric data of the target wall set, the walkable surface data, and the target protection height data, the height data of the railing instance and the horizontal layout trace data corresponding to each target wall are generated, and based on the railing instance height data and the horizontal layout trace data, the corresponding 3D model instance of the protective railing is generated in the target building model.
[0010] In one implementation of this application, semantic understanding of the room names in the room list data is performed based on a large language model, and a specific set of rooms of the target room type is output, specifically including:
[0011] Construct a semantic understanding prompt word template for target room type identification; the semantic understanding prompt word template includes target building type variable, target room type variable, alias mapping variable for target room type, and room list data variable to be filtered;
[0012] Assign values to the target building type variable based on the current project information, and assign values to the target room type variable based on the type of protected location to be identified; the protected location types include balconies, corridors, and accessible roofs;
[0013] The room list data is assigned to the room list data variable, and the alias mapping variable corresponding to the target room type is assigned a value according to the preset historical modeling habit database to generate a complete prompt word; the complete prompt word contains specific task and context information;
[0014] The complete prompt text is input into a pre-trained large-scale language model to calculate the semantic similarity of room names in the room list data based on the alias mapping variable of the target room type.
[0015] Receive the first structured response text output by the large language model; the first structured response text contains the candidate room identifier, candidate room name and corresponding confidence data corresponding to the target room type;
[0016] Candidate rooms are filtered according to a preset confidence threshold, and the spatial relationship of the filtered candidate rooms is verified based on the target room type. If the target room type is a corridor, the candidate room is further verified to see if it is an outdoor open corridor, so as to obtain a set of specific rooms of the preset type.
[0017] In one implementation of this application, the building practice document is segmented based on the large language model to construct a building practice vector knowledge base, specifically including:
[0018] The construction method document is converted into plain text data in markup language format, and it is determined whether the number of characters in the plain text data in markup language format exceeds a preset character threshold.
[0019] If the preset character threshold is exceeded, the plain text data in the markup language format and the preset splitting parameters are input into the large language model to perform semantic analysis on the plain text data in the markup language format to split the complete table data into multiple sub-table fragments, and receive the second structured response output by the large language model; the second structured response contains multiple sub-table fragments.
[0020] If the preset threshold is not exceeded, the plain text data in the markup language format is split line by line to generate sub-table fragments;
[0021] Each sub-table fragment is transformed into a high-dimensional vector representation using a text embedding model. All sub-table fragments and their corresponding vectors are then mapped to the plain text data and stored in a vector database to form a vector knowledge base for architectural practices.
[0022] In one implementation of this application, based on the room names in the specific room set, a search is performed in the building practice vector knowledge base to extract construction hierarchy information associated with the specific room set, specifically including:
[0023] Extract the room names of all target spaces from the specific room set to form a search query text set, and use a text embedding model to convert each search query text in the search query text set into a query vector;
[0024] Calculate the similarity between the query vector and the sub-table fragment vector in the building practice vector knowledge base, and filter out multiple sub-table fragments with similarity greater than a preset similarity threshold for the retrieval query text to form a candidate text fragment set;
[0025] Construct a structured prompt word template for structured information extraction, and fill the structured prompt word template with room names from the specific room set and sub-table fragments from the candidate text fragment set to generate information extraction instructions;
[0026] The information extraction instruction is input into the large language model, and the construction hierarchy information associated with the specific room set is output; the construction hierarchy information is organized in the form of key-value pairs, and includes at least the wall surface layer construction thickness data and floor slab surface layer construction thickness data corresponding to the target room name.
[0027] In one implementation of this application, based on the geometric data of the specific set of rooms, the structural thickness data, and the target protection height data, it is determined whether guardrails need to be installed on the open walls of the specific set of rooms, so as to filter out the target wall set that needs to be equipped with guardrails and the corresponding walkable surface data, specifically including:
[0028] Traverse each room in the specific set of rooms, obtain the geometric data of all walls on the boundary of the room, and filter out the walls on the outdoor open side to form an initial candidate wall set;
[0029] For each wall in the initial candidate wall set, the first elevation data of the top surface of the wall is obtained from the target building model, and the structural thickness data of the two sides and the top surface of the wall in the room where the wall is located is obtained from the structural hierarchy information, and the second elevation data of the finished wall surface is calculated.
[0030] For each wall in the initial candidate wall set, the third elevation data of the floor slab structure of the room where the wall is located is obtained from the target building model, and the floor slab surface layer construction thickness data of the corresponding room is obtained from the construction layer information. The fourth elevation data of the finished floor slab surface is calculated by combining the floor slab structure thickness for verification and correction.
[0031] Calculate the first vertical elevation difference between the second elevation data and the fourth elevation data;
[0032] The first vertical height difference data is compared with the target protection height data. If the first vertical height difference data is less than the target protection height data, the wall is determined to be a wall that needs to be fitted with guardrails, and the wall is added to the first intermediate set.
[0033] The plane represented by the fourth elevation data is used as the first candidate treadable surface data, and the plane represented by the second elevation data is used as the second candidate treadable surface data.
[0034] Based on the preset rules for determining walkable surfaces, and combined with the first vertical height difference data and the thickness data of the surface layer on both sides and the top of the wall, the final walkable surface data is determined from the first candidate walkable surface data and the second candidate walkable surface data. The walls in the first intermediate set and their corresponding walkable surface data are then jointly determined as the target wall set and their corresponding walkable surface data.
[0035] In one implementation of this application, based on the geometric data of the target wall set, the walkable surface data, and the target protection height data, the railing instance height data and horizontal arrangement trace data corresponding to each target wall are generated, specifically including:
[0036] For each target wall in the target wall set, extract the centerline geometric data of the target wall on the horizontal plane as the initial layout trace data;
[0037] Obtain the horizontal offset parameters of the railing input by the user, and perform an offset operation on the initial layout trace data based on the horizontal offset parameters of the railing to generate intermediate trace data;
[0038] The intermediate trace data is checked based on the geometric data of the target wall. If the offset horizontal trace exceeds the top surface range of the target wall, the horizontal trace is offset and placed at the boundary position of the target wall so that the intermediate trace data is within the top surface range of the target wall, thus obtaining the final horizontal arrangement trace data.
[0039] For each target wall in the target wall set, obtain the elevation information of the walkable surface data and the target protection height data bound to the target wall;
[0040] Determine whether the walkable surface data is the finished top surface of the target wall. If not, calculate the difference between the target protection height data and the first vertical height difference data to obtain the first railing height data. If yes, use the target protection height data as the second railing height data.
[0041] The first or second railing height data is standardized to generate the final railing instance height data.
[0042] In one implementation of this application, candidate rooms are filtered according to a preset confidence threshold, and spatial relationship verification is performed on the filtered candidate rooms based on the target room type. If the target room type is a corridor, the verification process continues to determine whether the candidate room is an outdoor open corridor, in order to obtain a specific set of rooms of a preset type, specifically including:
[0043] Rooms with confidence scores lower than a preset confidence threshold in the candidate rooms returned by the large language model are deleted to obtain a list of high-confidence candidate rooms. For rooms in the high-confidence candidate room list whose room type is identified as a corridor, the boundary wall geometry data of the current corridor room is obtained.
[0044] Based on the topological relationship of the target building model, analyze the spatial attribute data on the other side of each boundary wall segment. If the spatial attribute data on the other side of any boundary wall segment is empty or marked as outdoor space, then the current wall segment is determined to be an open wall.
[0045] The total length of the open walls in the boundary of the corridor room is counted. If the total length is greater than zero, the corridor room is determined to be an outdoor corridor that requires the installation of guardrails, and the corridor room is added to a specific room set; otherwise, the corridor room is excluded from the candidate rooms.
[0046] In one implementation of this application, based on a preset walkable surface determination rule, and combined with the first vertical height difference data and the thickness data of the surface layer on both sides and the top of the wall, the final walkable surface data is determined from the first candidate walkable surface data and the second candidate walkable surface data. The walls in the first intermediate set and their corresponding walkable surface data are then collectively determined as the target wall set and its corresponding walkable surface data. Specifically, this includes:
[0047] The first vertical height difference data is compared with the upper limit parameter of the walkable surface height in the preset walkable surface determination rule to generate the first comparison result data;
[0048] The total structural thickness data of the current target wall is extracted from the structural layer information, and the total structural thickness data is compared with the lower limit parameter of the walkable surface width in the preset walkable surface determination rule to generate a second comparison result data; the total structural thickness data includes the sum of the wall base thickness and the thickness of the two side layers;
[0049] If the first comparison result data is that the first vertical height difference data is greater than the upper limit parameter of the treadable surface height, then the first candidate treadable surface data is determined to be the final treadable surface data; if the first comparison result data is that the first vertical height difference data is less than or equal to the upper limit parameter of the treadable surface height, then the second comparison result data is determined.
[0050] If the second comparison result data shows that the total structural thickness data is less than the lower limit parameter of the treadable surface width, then the first candidate treadable surface data is determined to be the final treadable surface data. If the total structural thickness data is greater than or equal to the lower limit parameter of the treadable surface width, then the second candidate treadable surface data is determined to be the final treadable surface data.
[0051] On the other hand, embodiments of this application also provide a guardrail generation device based on a large language model, the device comprising:
[0052] At least one processor;
[0053] And, a memory communicatively connected to the at least one processor;
[0054] The memory stores instructions that can be executed by the at least one processor, which are then executed by the at least one processor to enable the at least one processor to perform a guardrail generation method based on a large language model as described above.
[0055] On the other hand, this application also provides a non-volatile computer storage medium storing computer-executable instructions, which, when executed, implement the above-described method for generating guardrails based on a large language model.
[0056] This application provides a method, device, and medium for generating guardrails based on a large language model, which has at least the following beneficial effects:
[0057] By introducing a large language model to perform deep semantic understanding and recognition of room names in architectural models, this approach addresses the shortcomings of traditional expert rule systems, which rely too heavily on naming conventions and have poor adaptability. It can understand the shared concepts behind various natural language variations and aliases. By applying the information structure extraction capabilities of the large language model to architectural practice documents, it can automatically and accurately retrieve and extract thickness data of wall surfaces, floor surfaces, and other structural elements related to the target room from architectural practice documents described in natural language tables. This descriptive text is then transformed into machine-calcifiable structured parameters. By integrating the aforementioned semantic recognition results with the structured extracted structural information, it can automatically determine the standard protective height based on the building type. Based on real geometric data and surface thickness, it accurately calculates the location of walkable surfaces and the final height and layout trajectory of railing instances. This ensures that the generated 3D model of the protective railing is not only accurate in geometric location but also strictly meets national mandatory standards in the calculation of protective height, fundamentally eliminating safety hazards caused by neglecting surface construction methods or misjudging walkable surfaces. Attached Figure Description
[0058] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0059] Figure 1 A flowchart illustrating a method for generating guardrails based on a large language model, provided in an embodiment of this application;
[0060] Figure 2 This is a schematic diagram of the internal structure of a guardrail generation device based on a large language model, provided in an embodiment of this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0063] Figure 1 This is a flowchart illustrating a method for generating guardrails based on a large language model, as provided in an embodiment of this application.
[0064] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a server as an example.
[0065] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.
[0066] like Figure 1 As shown in the embodiment of this application, a method for generating guardrails based on a large language model is provided, including:
[0067] Step 101: Obtain the room list data in the target building model, and perform semantic understanding of the room names in the room list data based on the large language model to output a specific set of rooms of the target room type.
[0068] It should be noted that the specific room set in this application embodiment includes the target room type that requires the installation of guardrails.
[0069] Large Language Models (LLMs) refer to language models with billions to hundreds of billions of parameters, based on the Transformer architecture, and trained on a large scale without supervision. They are capable of performing various natural language tasks such as text generation, understanding, and reasoning. The LLM in this application can be a third-party large model accessed from the cloud or a large model deployed locally.
[0070] In this embodiment, the target building model refers to a 3D digital model created in BIM design software such as Revit and ArchiCAD, containing geometric and attribute information. The room list data is a structured dataset extracted from this model, containing at least the room identifiers (such as unique IDs) and room names of all defined rooms in the model. The room list data is exported as JSON and denoted as the variable RoomList. For example, the room name text is freely entered by the designer and may include names such as living room balcony, outdoor corridor, or rooftop leisure platform. Naming methods vary depending on the project, team, and even personal habits, exhibiting a high degree of non-standardization. Understandably, directly using rules based on fixed keywords for matching can easily lead to numerous missed or incorrect judgments due to naming differences, such as synonyms, abbreviations, and typos. Therefore, this application uses a large language model to perform semantic understanding of room names with varying naming methods.
[0071] First, the system constructs a semantic understanding prompt template for identifying the target room type. This template is a pre-defined text framework containing several key variable placeholders, such as {{building type}}, {{target room type}}, {{alias mapping}}, and {{room list}}. It's important to note that the assignment of these variables is dynamic and context-based. The building type is determined based on the overall attributes of the project (e.g., residential, public building); the target room type is assigned based on the type of protected location to be identified, such as balcony, walkway, or accessible roof; the alias mapping variable is assigned a list generated based on a historical modeling habit database or domain knowledge summary, containing various aliases, colloquialisms, or English translations that may appear for the target room type. For example, for a balcony, the alias mapping might include terrace, platform, Balcony, etc. Finally, the room list data actually extracted from the model is assigned to the {{room list}} variable.
[0072] Next, the completed prompt text is input into a pre-trained LLM large-scale language model. The model's task is not simply string comparison, but rather to perform inference based on its understanding of architectural terminology and natural language context. It analyzes the semantic categories defined by the target room type and its alias mappings, and then evaluates the probability that each name in the room list belongs to that category. The model outputs a first structured response text, typically in JSON format, which lists the identifiers and names of the candidate rooms it identified, along with confidence data reflecting its level of certainty in judging them.
[0073] The system then filters candidate rooms based on a preset confidence threshold, eliminating recognition results with low confidence and forming a list of high-confidence candidate rooms, thereby improving the reliability of the recognition results.
[0074] Finally, spatial relationship verification is required for the identified room types, especially for corridor types. Specifically, for rooms in the high-confidence list that are corridors, the system obtains the geometric data of their boundary walls and analyzes the spatial attribute data on the other side of each wall segment based on the topological relationship of the target building model. If there are no rooms on the other side of a wall segment, i.e., the attribute data is empty or it is identified as outdoor, then that wall segment is determined to be an open wall. For example, the system will count the total length of the open walls in the boundary of the corridor room. If the total length is greater than zero, then the room is finally determined to be an outdoor corridor that needs to be equipped with guardrails and is included in the final set of specific rooms; otherwise, it is excluded. This ensures that even in cases of ambiguous naming, indoor and outdoor spaces can be accurately distinguished through geometric relationships, thereby precisely delineating all target locations where guardrails need to be generated.
[0075] Specifically, the preset confidence threshold represents the minimum acceptable standard for the model's confidence in its recognition results. All room entries in the candidate room list returned by the large language model with confidence scores below this threshold are deleted, thus filtering out potentially ambiguous or erroneous recognition results, such as misclassifying a room with an odd name or misspelling as the target type. This yields a high-confidence candidate room list, improving the overall quality and reliability of subsequent data processing.
[0076] Next, the system needs to select rooms identified as corridors from this high-quality list for in-depth analysis. It's important to note that "corridor" is a functional description; it can refer to a walkway entirely within the building (such locations typically do not require overhead railings) or an outdoor walkway or connecting corridor open on one or both sides (such locations must have railings). The name alone cannot distinguish between the two; the geometric information from the model is necessary.
[0077] Therefore, for each candidate room in the corridor whose confidence level exceeds a preset threshold, the system retrieves the geometric data of the room's boundary walls by calling the application programming interface (API) of the building information modeling (BIM) software. This data includes not only the wall's location, length, and height, but also the precisely defined topological relationships within the model. Based on these topological relationships, the system can analyze each wall segment constituting the corridor boundary and query the spatial attribute data on its opposite side.
[0078] Spatial attribute data is the core of determining whether a wall is open or not. For example, on a wall separating two rooms, the spatial attribute data on the other side will explicitly point to the identifier of the other room. On a wall serving as an exterior wall, the other side may not be associated with any architectural space object, and its spatial attribute data will be empty; or, under certain modeling specifications, it may be explicitly marked as outdoor or external. If the spatial attribute data on the other side of a wall is empty, or is identified as outdoor space, then that wall is determined to be an open wall.
[0079] Finally, the system needs to perform a global assessment of the perimeter of the entire corridor room, counting the total length of all boundary walls of the room that are identified as open spaces, excluding cases where there are only door or window openings rather than continuous open walls. If the total length is greater than zero, it proves that the corridor has at least one continuous, unprotected open edge, posing a risk of falling, and is therefore determined to be an outdoor corridor requiring guardrails, officially added to the final set of specific rooms. Conversely, if the total length is zero, it means that all walls of the corridor are enclosed by other architectural spaces on the other side, making it an indoor corridor, and should be excluded from the target for guardrail generation. This ensures that the identification of special functional spaces such as corridors utilizes the flexibility of natural language processing while strictly adhering to the physical nature and safety regulations of architectural spaces, achieving closed-loop verification of semantic and geometric information.
[0080] Step 102: Obtain the construction method file corresponding to the target building model, and perform content segmentation processing on the construction method file based on the large language model to build a construction method vector knowledge base. Then, based on the room names in a specific room set, search the construction method vector knowledge base to extract the construction hierarchy information associated with the specific room set.
[0081] It should be noted that the building practice documents in this application embodiment include natural language descriptions of the material and structural layer information of the building components. The structural layer information includes at least the structural thickness data of the two sides of the wall, the top of the wall, and the structural thickness data of the floor slab.
[0082] Construction drawings in a building practices document depict the construction methods used for building components such as floors, walls, ceilings, and roofs. Each practice typically includes multiple structural layers, each employing different materials, construction techniques, and thicknesses. The table organization of building practices documents varies between companies and projects, and the descriptions tend to be in natural language. This information is usually organized into a single table, either as a separate Excel spreadsheet or presented on construction drawings in CAD or PDF formats.
[0083] In this embodiment, a button to generate a guardrail is provided to the user through a user interface. After the user clicks the button, an upload page for the building construction method file pops up, prompting the user to upload the building construction method file in the corresponding location. After the building construction method file is uploaded, it is converted into plain text data in markup language format, such as a Markdown table, preserving its table structure and semantics. Since the total number of characters in the building construction method table file generally far exceeds the context window of the LLM, directly allowing the LLM to perform semantic understanding and structure extraction will result in extremely poor performance or truncation due to exceeding the LLM context length. Therefore, it is necessary to perform content segmentation processing on the plain text data. First, it is determined whether the number of characters in the plain text data exceeds a preset character threshold, which is related to the context window length of the large language model. If it does not exceed the threshold, a simple method of splitting by row can be used to generate sub-table fragments. If it exceeds the threshold, it is necessary to enable the large language model for intelligent semantic segmentation. Specifically, the system fills the original table text and preset segmentation parameters into a special table segmentation prompt word template and submits it to the LLM model. The segmentation parameters are within the expected range of the number of sub-tables. The LLM model uses semantic analysis to break down the original large table into multiple semantically complete, data-complete, and non-overlapping sub-table fragments, and returns them in JSON format, i.e., the second structured response. This can effectively handle complex table structures such as merged cells.
[0084] Then, using a text embedding model, such as text-embedding-ada-002 or a similar open-source model, each sub-table fragment is converted into a high-dimensional vector representation, i.e., a sub-table fragment vector. All sub-table fragments and their corresponding vectors are stored in a vector database, thereby constructing a knowledge base that can be efficiently retrieved based on semantics, i.e., a building practice vector knowledge base.
[0085] Subsequently, retrieval and extraction are performed based on a specific set of rooms. Room names are extracted from the specific set of rooms to form a set of retrieval query texts. Using the same text embedding model, each query text is transformed into a query vector. Next, in the constructed vector knowledge base, the similarity between each query vector and all sub-table fragment vectors is calculated, and multiple sub-table fragments with similarity greater than a preset similarity threshold are selected for each query vector to form a set of candidate text fragments. These fragments contain descriptions of the practices related to the queried room.
[0086] Finally, the structured extraction of hierarchical construction information is performed. The system constructs a structured prompt template for information extraction, filling in the room name and its corresponding set of candidate text fragments to form a clear instruction that requires the large language model to extract the construction methods of the specified room from these natural language fragments. The output of the large language model is the structured hierarchical construction information, usually organized in key-value pairs, such as JSON, explicitly listing key information such as the wall surface layer thickness data and floor slab surface layer thickness data corresponding to the room, thereby transforming unstructured text into computable data.
[0087] Step 103: Based on the building type data of the target building model, determine the target protection height data corresponding to the specific room set, and based on the geometric data, wall surface layer thickness data, floor surface layer thickness data and target protection height data of the specific room set, determine whether guardrails need to be installed on the open wall positions of the specific room set, so as to filter out the target wall set that needs to be installed with guardrails and the corresponding walkable surface data.
[0088] Guardrails are fixed safety components in buildings used to prevent people from falling or colliding. They are typically installed at the edges of balconies, stairs, roofs, platforms, etc., and have sufficient height and strength to ensure personal safety. The walkable surface refers to the horizontal structure at the bottom (or inside) of the guardrail. When its clear width is ≥0.22m and its height from the floor (ground) is ≤0.45m, a normal person can easily place their feet completely on it and stand. This horizontal surface is considered a walkable surface according to regulations. When a walkable surface exists, the guardrail's protective height must be recalculated from the top of the walkable surface, not from the original floor level; otherwise, the effective protective height will be insufficient, creating a fall hazard. The protective height refers to the vertical clearance above the walkable surface of the guardrail, used to prevent people from falling. It must meet the minimum values specified in regulations, such as ≥1.05m for residential buildings under six stories, and ≥1.10m for buildings six stories and above.
[0089] Since the code has different requirements for the railing protection height of different building types, it is necessary to determine the protection height that needs to be set for the railings in the current model by the user selecting the building type of the model. First, based on the building type data of the target building model, such as high-rise residential buildings and multi-story office buildings, and combined with the built-in code knowledge base or rules, determine the minimum protection height values (H_guifan) required for different positions of balconies, outdoor walkways, and accessible roofs. Exemplarily, taking the building type as a residential building, the target protection railing height corresponding to the railings at the balcony and outdoor walkway positions is 1100 mm, and the target protection railing height corresponding to the railings at the accessible roof position is 1200 mm.
[0090] In this embodiment, the system traverses each room, obtains the geometric data of all the walls on its boundary, and filters out the walls on the outdoor airside to form an initial candidate wall set. For each segment of the wall in this set, obtain the first elevation data of the wall top surface from the model, that is, H1, which is usually the structural surface elevation. Then, from the construction level information, parse out the total thickness of the surface layer at the top of the wall of this room, and calculate the second elevation data of the final completed surface of the wall, that is, H1', specifically calculated by the following formula: H1' = H1 + the thickness of the top surface layer of the wall. Obtain the third elevation data of the floor structure of this room from the model, that is, H2_bare, the elevation of the top of the structural slab. Similarly, from the construction level information, parse out the total thickness of the floor surface layer of this room, and combined with the verification of the floor structure thickness, calculate the fourth elevation data of the final completed surface of the floor, that is, H2, specifically calculated by the following formula: H2 = H2_bare + the thickness of the floor surface layer. According to the second elevation data and the fourth elevation data, calculate the first vertical height difference data B, specifically calculated by the following formula: B = H1' - H2.
[0091] Then, compare B with the target protection height data H_guifan. If B < H_guifan, it means that the height of this wall itself is insufficient and a railing needs to be arranged, then add this wall to the first intermediate set. At the same time, define the first candidate tread surface data (the plane of the fourth elevation data H2) and the second candidate tread surface data (the plane of the second elevation data H1').
[0092] Finally, it is determined whether a walkable surface exists, and based on this, the starting point for calculating the protective height is determined. It should be noted that the preset judgment rules include an upper limit parameter for walkable surface height and a lower limit parameter for walkable surface width. The first vertical height difference data B is compared with the upper limit parameter to generate the first comparison result data. The total structural thickness data C of the current wall (including the base layer and both side layers) is extracted from the structural layer information and compared with the lower limit parameter to generate the second comparison result data. The final judgment rule is: if B is greater than the upper limit, the first candidate walkable surface (floor slab surface) is determined as a valid walkable surface; if B is less than or equal to the upper limit, further judgment is needed: if C is less than the lower limit, the valid walkable surface remains the first candidate surface; if C is greater than or equal to the lower limit, the valid walkable surface is the second candidate surface (top surface of the wall). This determines the final walkable surface data for each wall segment in the first intermediate set, and these walls and their walkable surface data are output together as the target wall set and the corresponding walkable surface data.
[0093] It should be noted that the walkable surface is not a fixed geometric surface, but rather a functional plane that needs to be logically deduced based on the standard definition and the specific site structure. Understandably, incorrectly identifying the walkable surface will directly lead to an insufficient calculated effective guardrail height, posing a serious safety hazard.
[0094] Specifically, the first vertical height difference data B represents the vertical distance between the finished wall surface and the finished floor slab surface. The total structural thickness data C refers to the total thickness of the wall from one surface of its base layer (such as blocks or concrete) to the other, which includes the thickness of the wall base layer and the sum of the thicknesses of all surface layers (such as plaster and decorative layers) attached to both sides of the base layer. For example, a 200 mm thick aerated concrete block wall with 15 mm thick plaster on each side has a total structural thickness C of 230 mm.
[0095] The first stage involves a height comparison. The initial vertical height difference data (B) is compared with the upper limit parameter for the walkable surface height, generating the first comparison result data. This result determines whether a person can easily lift their foot to the top of the wall. If B is greater than this upper limit, it means the top of the wall is relatively high, and a normal person's foot cannot easily step directly onto it. In this case, the standard considers the finished floor surface to be the primary fall initiation surface. Therefore, the system determines the first candidate walkable surface data (i.e., the finished floor surface) as the final valid walkable surface data.
[0096] The second stage is triggered when B is less than or equal to the upper limit height parameter. At this point, because the top surface of the wall is relatively low, it already meets the height requirement to be a walkable surface, but its width requirement still needs to be evaluated. The system compares the total structural thickness data C with the lower limit width parameter of the walkable surface, generating a second comparison result data to determine whether the top surface of the wall has sufficient width for a person to stand on. If C is less than the lower limit width, it indicates that the wall is relatively thin and the top width is insufficient, making it unstable to stand on. Therefore, it will still not be considered a walkable surface, and the final walkable surface will still be the finished floor slab surface. Conversely, if C is greater than or equal to the lower limit width, it indicates that the top surface of the wall simultaneously meets the two conditions of being low and wide, and the standard clearly defines it as a walkable part. In this case, the top surface of the wall itself becomes a new and more dangerous fall initiation surface, so the system determines the second candidate walkable surface data (i.e., the finished wall surface) as the final valid walkable surface data.
[0097] Step 104: Based on the geometric data, treadable surface data, and target protection height data of the target wall set, generate the railing instance height data and horizontal layout trace data for each target wall, and generate the corresponding 3D model instance of the protective railing in the target building model based on the railing instance height data and horizontal layout trace data.
[0098] In the software modeling phase, the height of a 3D model instance of a guardrail corresponds to the height attribute of a guardrail family instance in Revit, i.e., an attribute in the modeling software. During the construction phase, the height of the guardrail 3D model instance corresponds to the actual height of the guardrail component. However, since the bottom surface of the guardrail is not the same as the walkable surface, the height of the guardrail instance is not necessarily the required protective height specified in the code. For example, if a residential building requires a guardrail with a protective height of 1100mm, but the wall beneath the guardrail already provides 300mm, then the guardrail instance placed on top of the wall only needs to be 800mm high. The sum of these two heights provides the required protective height, and this is sufficient.
[0099] In this embodiment, the horizontal positioning of the railing is first processed, i.e., horizontal layout trace data is generated. For each target wall segment in the target wall set, the system extracts its centerline geometry data on the horizontal projection plane. This centerline is the basic line segment describing the wall's orientation, and using it as the initial layout trace data means that the initial idea is to place the railing on the wall's central axis. However, in actual design, the railing may need to be offset from the wall's centerline due to factors such as building facade effects, drainage ditch layout, or structural avoidance. Therefore, the system allows the acquisition of user-inputted horizontal offset parameters for the railing. This parameter is a directional distance value, for example, an offset of 50 mm towards the interior. Based on this parameter, the system performs an offset operation on the initial layout trace data, generating a parallel intermediate trace data. However, the offset line segment may partially exceed the actual range of the wall's top surface, for example, at wall corners. Therefore, the system must check this intermediate trace based on the precise geometric boundary data of the target wall. If the offset horizontal trace exceeds the top surface range of the target wall, the horizontal trace will be offset and placed at the boundary position of the target wall to ensure that the final horizontal arrangement trace data is completely within the effective area of the top surface of the wall, thereby ensuring that the generated railing is feasible on the plane.
[0100] While solving the horizontal positioning, the system calculates the vertical dimensions of the railing in parallel, i.e., the railing instance height data. The system first obtains the elevation information of the finally determined walkable surface data bound to the current target wall, as well as the target protection height data H_guifan corresponding to that location. Then, it determines whether the current walkable surface data is the finished top surface of the target wall. If the determination is no, meaning the final walkable surface is the finished floor slab surface, then the required protection height H_guifan is the total height from the floor to the top of the railing. The wall itself has already contributed height B, i.e., the first vertical height difference data; therefore, the railing itself only needs to make up the remaining height difference. First railing height data = H_guifan - B. If the determination is yes, meaning the final walkable surface is the top surface of the wall itself, then the required protection height must be entirely provided by the railing starting from the top of the wall upwards. Therefore, the height of the railing itself must equal the complete protection height. In this case, the system directly uses the target protection height data H_guifan as the second railing height data.
[0101] Understandably, the railing height data calculated using any path is usually a theoretical value. To conform to the modularity of actual building materials (such as the standard length of steel pipes) or design conventions, the system standardizes this height data. For example, it rounds up to a 50mm modulus to ensure that the final railing instance height data is reasonable and easy to produce and install. At this point, all the defined parameters of the railing in three-dimensional space are complete. The horizontal layout trace data determines its meandering path on the plane, the finished wall elevation determines its bottom mounting surface, and the standardized railing instance height data determines its vertical extension range. These data together constitute all the instructions required to instantiate a parametric railing family in BIM software.
[0102] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a guardrail generation device based on a large language model, the structure of which is as follows: Figure 2 As shown.
[0103] Figure 2 This is a schematic diagram of the internal structure of a guardrail generation device based on a large language model, provided as an embodiment of this application. Figure 2 As shown, the device includes:
[0104] At least one processor;
[0105] And, a memory that is communicatively connected to at least one processor;
[0106] The memory stores instructions that can be executed by at least one processor, and the instructions, when executed by at least one processor, enable at least one processor to:
[0107] Obtain the room list data from the target building model, and perform semantic understanding of the room names in the room list data based on a large language model to output a specific set of rooms of the target room type; the specific set of rooms includes the target room type that needs to be equipped with guardrails.
[0108] Obtain the construction method files corresponding to the target building model, and perform content segmentation processing on the construction method files based on the large language model to construct a construction method vector knowledge base. Then, based on the room names in a specific set of rooms, search the construction method vector knowledge base to extract the structural hierarchy information associated with the specific set of rooms. The construction method files include natural language descriptions of the materials and structural hierarchy information of the building components. The structural hierarchy information includes at least the structural thickness data of the two sides of the wall, the top of the wall, and the floor slab.
[0109] Based on the building type data of the target building model, determine the target protection height data corresponding to a specific set of rooms. Based on the geometric data, wall surface layer thickness data, floor surface layer thickness data and target protection height data of the specific set of rooms, determine whether guardrails need to be installed on the open wall positions of the specific set of rooms, so as to filter out the target wall sets that need to be installed with guardrails and the corresponding walkable surface data.
[0110] Based on the geometric data, walkable surface data, and target protection height data of the target wall set, generate the railing instance height data and horizontal layout trace data for each target wall, and generate the corresponding 3D model instance of the guardrail in the target building model based on the railing instance height data and horizontal layout trace data.
[0111] This application also provides a non-volatile computer storage medium storing computer-executable instructions, which, when executed, can:
[0112] Obtain the room list data from the target building model, and perform semantic understanding of the room names in the room list data based on a large language model to output a specific set of rooms of the target room type; the specific set of rooms includes the target room type that needs to be equipped with guardrails.
[0113] Obtain the construction method files corresponding to the target building model, and perform content segmentation processing on the construction method files based on the large language model to construct a construction method vector knowledge base. Then, based on the room names in a specific set of rooms, search the construction method vector knowledge base to extract the structural hierarchy information associated with the specific set of rooms. The construction method files include natural language descriptions of the materials and structural hierarchy information of the building components. The structural hierarchy information includes at least the structural thickness data of the two sides of the wall, the top of the wall, and the floor slab.
[0114] Based on the building type data of the target building model, determine the target protection height data corresponding to a specific set of rooms. Based on the geometric data, wall surface layer thickness data, floor surface layer thickness data and target protection height data of the specific set of rooms, determine whether guardrails need to be installed on the open wall positions of the specific set of rooms, so as to filter out the target wall sets that need to be installed with guardrails and the corresponding walkable surface data.
[0115] Based on the geometric data, walkable surface data, and target protection height data of the target wall set, generate the railing instance height data and horizontal layout trace data for each target wall, and generate the corresponding 3D model instance of the guardrail in the target building model based on the railing instance height data and horizontal layout trace data.
[0116] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0117] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0118] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0122] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0123] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0124] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0125] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, 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 that element.
[0126] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for generating guardrails based on a large language model, characterized in that, The method includes: Obtain room list data from the target building model, and perform semantic understanding of the room names in the room list data based on a large language model to output a specific set of rooms of the target room type; the specific set of rooms includes the target room types that require the installation of guardrails. Obtain the construction method file corresponding to the target building model, and perform content segmentation processing on the construction method file based on the large language model to construct a construction method vector knowledge base. Based on the room names in the specific room set, search the construction method vector knowledge base to extract the structural hierarchy information associated with the specific room set. The construction method file includes natural language descriptions of the material and structural hierarchy information of the building components. The structural hierarchy information includes at least the structural thickness data of the two sides and the top of the wall and the structural thickness data of the floor slab. Based on the building type data of the target building model, the target protection height data corresponding to the specific room set is determined. Based on the geometric data, wall surface layer thickness data, floor surface layer thickness data and the target protection height data of the specific room set, it is determined whether guardrails need to be installed on the open wall positions of the specific room set, so as to filter out the target wall set that needs to be installed with guardrails and the corresponding walkable surface data. Based on the geometric data of the target wall set, the walkable surface data, and the target protection height data, the height data of the railing instance and the horizontal layout trace data corresponding to each target wall are generated, and based on the railing instance height data and the horizontal layout trace data, the corresponding 3D model instance of the protective railing is generated in the target building model.
2. The method for generating guardrails based on a large language model according to claim 1, characterized in that, Based on a large language model, semantic understanding is performed on the room names in the room list data, and a specific set of rooms of the target room type is output, including: Construct a semantic understanding prompt word template for target room type identification; the semantic understanding prompt word template includes target building type variable, target room type variable, alias mapping variable for target room type, and room list data variable to be filtered; Assign values to the target building type variable based on the current project information, and assign values to the target room type variable based on the type of protected location to be identified; the protected location types include balconies, corridors, and accessible roofs; The room list data is assigned to the room list data variable, and the alias mapping variable corresponding to the target room type is assigned a value according to the preset historical modeling habit database to generate a complete prompt word; the complete prompt word contains specific task and context information; The complete prompt text is input into a pre-trained large-scale language model to calculate the semantic similarity of room names in the room list data based on the alias mapping variable of the target room type. Receive the first structured response text output by the large language model; the first structured response text contains the candidate room identifier, candidate room name and corresponding confidence data corresponding to the target room type; Candidate rooms are filtered according to a preset confidence threshold, and the spatial relationship of the filtered candidate rooms is verified based on the target room type. If the target room type is a corridor, the candidate room is further verified to see if it is an outdoor open corridor, so as to obtain a set of specific rooms of the preset type.
3. The method for generating guardrails based on a large language model according to claim 1, characterized in that, Based on the aforementioned large language model, the building practice documents are segmented to construct a building practice vector knowledge base, specifically including: The construction method document is converted into plain text data in markup language format, and it is determined whether the number of characters in the plain text data in markup language format exceeds a preset character threshold. If the preset character threshold is exceeded, the plain text data in the markup language format and the preset splitting parameters are input into the large language model to perform semantic analysis on the plain text data in the markup language format to split the complete table data into multiple sub-table fragments, and receive the second structured response output by the large language model; the second structured response contains multiple sub-table fragments. If the preset threshold is not exceeded, the plain text data in the markup language format is split line by line to generate sub-table fragments; Each sub-table fragment is transformed into a high-dimensional vector representation using a text embedding model. All sub-table fragments and their corresponding vectors are then mapped to the plain text data and stored in a vector database to form a vector knowledge base for architectural practices.
4. The method for generating guardrails based on a large language model according to claim 3, characterized in that, Based on the room names in the specific room set, a search is performed in the building practice vector knowledge base to extract the construction hierarchy information associated with the specific room set, specifically including: Extract the room names of all target spaces from the specific room set to form a search query text set, and use a text embedding model to convert each search query text in the search query text set into a query vector; Calculate the similarity between the query vector and the sub-table fragment vector in the building practice vector knowledge base, and filter out multiple sub-table fragments with similarity greater than a preset similarity threshold for the retrieval query text to form a candidate text fragment set; Construct a structured prompt word template for structured information extraction, and fill the structured prompt word template with room names from the specific room set and sub-table fragments from the candidate text fragment set to generate information extraction instructions; The information extraction instruction is input into the large language model, and the construction hierarchy information associated with the specific room set is output; the construction hierarchy information is organized in the form of key-value pairs, and includes at least the wall surface layer construction thickness data and floor slab surface layer construction thickness data corresponding to the target room name.
5. The method for generating guardrails based on a large language model according to claim 1, characterized in that, Based on the geometric data of the specific set of rooms, the structural thickness data, and the target protection height data, it is determined whether guardrails need to be installed on the open walls of the specific set of rooms, so as to filter out the target wall sets that need to be equipped with guardrails and the corresponding walkable surface data, specifically including: Traverse each room in the specific set of rooms, obtain the geometric data of all walls on the boundary of the room, and filter out the walls on the outdoor open side to form an initial candidate wall set; For each wall in the initial candidate wall set, the first elevation data of the top surface of the wall is obtained from the target building model, and the structural thickness data of the two sides and the top surface of the wall in the room where the wall is located is obtained from the structural hierarchy information, and the second elevation data of the finished wall surface is calculated. For each wall in the initial candidate wall set, the third elevation data of the floor slab structure of the room where the wall is located is obtained from the target building model, and the floor slab surface layer construction thickness data of the corresponding room is obtained from the construction layer information. The fourth elevation data of the finished floor slab surface is calculated by combining the floor slab structure thickness for verification and correction. Calculate the first vertical elevation difference between the second elevation data and the fourth elevation data; The first vertical height difference data is compared with the target protection height data. If the first vertical height difference data is less than the target protection height data, the wall is determined to be a wall that needs to be fitted with guardrails, and the wall is added to the first intermediate set. The plane represented by the fourth elevation data is used as the first candidate treadable surface data, and the plane represented by the second elevation data is used as the second candidate treadable surface data. Based on the preset rules for determining walkable surfaces, and combined with the first vertical height difference data and the thickness data of the surface layer on both sides and the top of the wall, the final walkable surface data is determined from the first candidate walkable surface data and the second candidate walkable surface data. The walls in the first intermediate set and their corresponding walkable surface data are then jointly determined as the target wall set and their corresponding walkable surface data.
6. The method for generating guardrails based on a large language model according to claim 5, characterized in that, Based on the geometric data of the target wall set, the walkable surface data, and the target protection height data, generate the railing instance height data and horizontal layout trace data for each target wall, specifically including: For each target wall in the target wall set, extract the centerline geometric data of the target wall on the horizontal plane as the initial layout trace data; Obtain the horizontal offset parameters of the railing input by the user, and perform an offset operation on the initial layout trace data based on the horizontal offset parameters of the railing to generate intermediate trace data; The intermediate trace data is checked based on the geometric data of the target wall. If the offset horizontal trace exceeds the top surface range of the target wall, the horizontal trace is offset and placed at the boundary position of the target wall so that the intermediate trace data is within the top surface range of the target wall, thus obtaining the final horizontal arrangement trace data. For each target wall in the target wall set, obtain the elevation information of the walkable surface data and the target protection height data bound to the target wall; Determine whether the walkable surface data is the finished top surface of the target wall. If not, calculate the difference between the target protection height data and the first vertical height difference data to obtain the first railing height data. If yes, use the target protection height data as the second railing height data. The first or second railing height data is standardized to generate the final railing instance height data.
7. The method for generating guardrails based on a large language model according to claim 2, characterized in that, Candidate rooms are filtered according to a preset confidence threshold, and spatial relationship verification is performed on the filtered candidate rooms based on the target room type. If the target room type is a corridor, the verification is further performed to determine whether the candidate room is an outdoor open corridor, so as to obtain a specific set of rooms of a preset type, specifically including: Rooms with confidence scores lower than a preset confidence threshold in the candidate rooms returned by the large language model are deleted to obtain a list of high-confidence candidate rooms. For rooms in the high-confidence candidate room list whose room type is identified as a corridor, the boundary wall geometry data of the current corridor room is obtained. Based on the topological relationship of the target building model, analyze the spatial attribute data on the other side of each boundary wall segment. If the spatial attribute data on the other side of any boundary wall segment is empty or marked as outdoor space, then the current wall segment is determined to be an open wall. The total length of the open walls in the boundary of the corridor room is counted. If the total length is greater than zero, the corridor room is determined to be an outdoor corridor that requires the installation of guardrails, and the corridor room is added to a specific room set; otherwise, the corridor room is excluded from the candidate rooms.
8. The method for generating guardrails based on a large language model according to claim 5, characterized in that, Based on preset walkable surface determination rules, and combined with the first vertical height difference data and the thickness data of the surface layer on both sides and the top of the wall, the final walkable surface data is determined from the first candidate walkable surface data and the second candidate walkable surface data. The walls and their corresponding walkable surface data in the first intermediate set are then collectively determined as the target wall set and its corresponding walkable surface data. Specifically, this includes: The first vertical height difference data is compared with the upper limit parameter of the walkable surface height in the preset walkable surface determination rule to generate the first comparison result data; The total structural thickness data of the current target wall is extracted from the structural layer information, and the total structural thickness data is compared with the lower limit parameter of the walkable surface width in the preset walkable surface determination rule to generate a second comparison result data; the total structural thickness data includes the sum of the wall base thickness and the thickness of the two side layers; If the first comparison result data is that the first vertical height difference data is greater than the upper limit parameter of the treadable surface height, then the first candidate treadable surface data is determined to be the final treadable surface data; if the first comparison result data is that the first vertical height difference data is less than or equal to the upper limit parameter of the treadable surface height, then the second comparison result data is determined. If the second comparison result data shows that the total structural thickness data is less than the lower limit parameter of the treadable surface width, then the first candidate treadable surface data is determined to be the final treadable surface data. If the total structural thickness data is greater than or equal to the lower limit parameter of the treadable surface width, then the second candidate treadable surface data is determined to be the final treadable surface data.
9. A guardrail generation device based on a large language model, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a guardrail generation method based on a large language model as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, they implement the guardrail generation method based on a large language model as described in any one of claims 1-8.
Citation Information
Patent Citations
Large-scale building information model and three-dimensional digital city integration method
CN103942388A
Building information model intelligent extraction method and system based on large language model
CN117332069A