Method, system, device and computer equipment for programmatic reconstruction of building structure

By extracting geometric feature maps from point cloud data and converting them into building coding statements and target building trees, the problem of recovery of complex building three-dimensional models in low-quality point cloud data is solved, and efficient and accurate three-dimensional model reconstruction is achieved.

CN119720363BActive Publication Date: 2025-06-06SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510223784.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-06
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently and accurately restore complex building three-dimensional models from low-quality point cloud data, especially when facing sparse, noise-rich and unevenly distributed point cloud data.

Method used

By obtaining the point cloud data of the target building, feature extraction is performed to obtain the geometric feature map, converting the geometric feature map into architectural coding statements based on the preset coding language, further converting the building coding statements into target building trees, and finally building a three-dimensional architectural model based on the target building tree.

Benefits of technology

It realizes efficient and accurate recovery of complex building three-dimensional models from low-quality point cloud data, improves the stability and accuracy of the reconstruction model, and enhances the visual effect of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720363B_ABST
    Figure CN119720363B_ABST
Patent Text Reader

Abstract

The present application relates to a method, system, device and computer equipment for programmatic reconstruction of building structures. The method comprises: obtaining point cloud data of a target building, extracting features from the point cloud data, and obtaining a geometric feature map; based on a preset coding language, converting the geometric feature map into a building coding statement, the building coding statement is used to characterize the building structure; converting the building coding statement into a target building tree, the target building tree includes multiple nodes, each of which characterizes the height and outline of different levels in the target building; based on the target building tree, constructing a three-dimensional building model of the target building. The use of this method can effectively solve the challenges faced by the prior art in processing sparse, noisy and unevenly distributed point cloud data, and provides a new way to efficiently and accurately restore complex building three-dimensional models from low-quality point cloud data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, device, computer equipment, computer-readable storage medium and computer program product for programmatic reconstruction of building structures. Background Art

[0002] Existing building model reconstruction methods mainly rely on the processing of high-density point cloud data, and reconstruct building model by detecting geometric elements (such as planes, cubes, etc.) and combining them. However, such methods have high requirements on the integrity and quality of point cloud data. When faced with sparse, noisy and unevenly distributed point clouds commonly seen in practical applications, the reconstruction effect is significantly reduced. In addition, if a neural network is used directly to generate a model from a sparse point cloud, the noise and missing of the input data may easily lead to instability and loss of details in the generated result. Therefore, there is an urgent need for a method that can efficiently and accurately restore complex building 3D models from low-quality point cloud data. Summary of the invention

[0003] Based on this, it is necessary to provide a method, system, device, computer equipment, computer-readable storage medium and computer program product for programmatic reconstruction of building structures that can efficiently and accurately restore complex building three-dimensional models from low-quality point cloud data in response to the above-mentioned technical problems.

[0004] In a first aspect, the present application provides a method for programmatic reconstruction of a building structure, comprising:

[0005] Acquire point cloud data of the target building, perform feature extraction on the point cloud data, and obtain a geometric feature map;

[0006] Based on a preset coding language, the geometric feature graph is converted into a building coding statement, where the building coding statement is used to characterize the building structure;

[0007] Converting the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0008] Based on the target building tree, a three-dimensional building model of the target building is constructed.

[0009] In one embodiment, based on a preset coding language, converting the geometric feature graph into a building coding statement includes:

[0010] The geometric feature map is predicted by an autoregressive method to obtain a symbol sequence, wherein the symbols in the symbol sequence represent the heights and contours of different levels in the target building; based on a preset coding language, the symbol sequence is encoded and converted to obtain a building coding statement.

[0011] In one embodiment, converting the building coding statement into a target building tree includes:

[0012] For each building coding statement, the building coding statement is parsed to obtain the height information and two-dimensional outline information represented by the building coding statement; the preset ground height information is obtained, and a root node is created based on the preset ground height information; a child node is created based on the height information and two-dimensional outline information parsed from each building coding statement; a target building tree is generated based on the root node and the child nodes corresponding to each building coding statement.

[0013] In one embodiment, generating a target building tree based on the root node and the child nodes corresponding to each building coding statement includes:

[0014] Acquire an initial building tree corresponding to the root node; determine the hierarchical relationship between each child node based on the height information parsed from each building coding statement; determine the position of each child node in the initial building tree based on the hierarchical relationship between each child node; add each child node to the initial building tree based on the position of each child node in the initial building tree to obtain a target building tree.

[0015] In one embodiment, constructing a three-dimensional building model of the target building based on the target building tree includes:

[0016] Determine the height information and two-dimensional contour information corresponding to the building level represented by the root node in the target building tree; determine the three-dimensional contour information corresponding to the building level represented by the root node based on the height information and two-dimensional contour information corresponding to the building level represented by the root node; traverse each child node in the target building tree in hierarchical order to determine the height information and two-dimensional contour information corresponding to the building level represented by each child node; determine the three-dimensional contour information corresponding to the building level represented by each child node based on the height information and two-dimensional contour information corresponding to the building level represented by each child node; generate a three-dimensional building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node.

[0017] In one embodiment, generating a three-dimensional building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node includes:

[0018] Based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node, generate the initial building model of the target building; start from the root node and traverse each child node in hierarchical order, and for the child node currently traversed, determine the parent node corresponding to the child node currently traversed; based on the two-dimensional contour information of the child node currently traversed, determine the vertices of the contour line of the child node currently traversed; based on the two-dimensional contour information of the parent node corresponding to the child node currently traversed, determine the vertices of the contour line of the parent node corresponding to the child node currently traversed; based on the vertices of the contour line corresponding to the child node currently traversed in the initial building model and the vertices of the contour line of the parent node corresponding to the child node currently traversed, correct the position of the initial building model of the target building to obtain the three-dimensional building model of the target building. The present application also provides a training method for a programmatic reconstruction network of a building structure, including:

[0019] Obtaining a preset point cloud data training set and a building code sentence training set, wherein the point cloud data training set includes multiple groups of point cloud data to be trained, and the building code sentence training set includes multiple annotated building code sentences to be trained, and the multiple groups of point cloud data to be trained and the multiple annotated building code sentences to be trained are in a one-to-one mapping relationship;

[0020] For each set of point cloud data to be trained, feature extraction is performed on the point cloud data to be trained through an initial three-dimensional convolutional encoder to obtain a geometric feature map in the training stage;

[0021] Converting the geometric feature map of the training phase into an architectural encoding sentence of the training phase through an initial attention decoder;

[0022] Based on the sentence differences between the labeled architectural coding sentences that have a one-to-one mapping relationship with the point cloud data to be trained and the architectural coding sentences in the training stage, the parameters in the loss functions of the initial three-dimensional convolutional encoder and the initial attention decoder are adjusted until the sentence differences meet the preset iteration conditions, thereby obtaining the trained three-dimensional convolutional encoder and the attention decoder.

[0023] In a second aspect, the present application also provides a system for procedural reconstruction of building structures, including a procedural generator, a three-dimensional convolutional encoder, an attention decoder, and a geometric compiler, wherein the system includes:

[0024] The programmatic generator trains the initial three-dimensional convolutional encoder and the initial attention decoder based on a preset point cloud data training set and a building coding sentence training set to obtain the trained three-dimensional convolutional encoder and the attention decoder;

[0025] The three-dimensional convolution encoder acquires point cloud data of the target building, performs feature extraction on the point cloud data, and obtains a geometric feature map;

[0026] The attention decoder converts the geometric feature map into an architectural coding sentence based on a preset coding language, and the architectural coding sentence is used to characterize the building structure;

[0027] The geometry compiler converts the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0028] The geometry compiler constructs a three-dimensional building model of the target building based on the target building tree.

[0029] In a third aspect, the present application also provides a device for programmatic reconstruction of a building structure, comprising:

[0030] An extraction module is used to obtain point cloud data of a target building, perform feature extraction on the point cloud data, and obtain a geometric feature map;

[0031] A conversion module, used for converting the geometric feature graph into a building coding statement based on a preset coding language, wherein the building coding statement is used for representing a building structure;

[0032] A generating module, configured to convert the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0033] A construction module is used to construct a three-dimensional building model of the target building based on the target building tree.

[0034] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0035] Acquire point cloud data of the target building, perform feature extraction on the point cloud data, and obtain a geometric feature map;

[0036] Based on a preset coding language, the geometric feature graph is converted into a building coding statement, where the building coding statement is used to characterize the building structure;

[0037] Converting the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0038] Based on the target building tree, a three-dimensional building model of the target building is constructed.

[0039] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0040] Acquire point cloud data of the target building, perform feature extraction on the point cloud data, and obtain a geometric feature map;

[0041] Based on a preset coding language, the geometric feature graph is converted into a building coding statement, where the building coding statement is used to characterize the building structure;

[0042] Converting the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0043] Based on the target building tree, a three-dimensional building model of the target building is constructed.

[0044] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0045] Acquire point cloud data of the target building, perform feature extraction on the point cloud data, and obtain a geometric feature map;

[0046] Based on a preset coding language, the geometric feature graph is converted into a building coding statement, where the building coding statement is used to characterize the building structure;

[0047] Converting the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0048] Based on the target building tree, a three-dimensional building model of the target building is constructed.

[0049] The above-mentioned method, system, device, computer equipment, computer-readable storage medium and computer program product for programmatic reconstruction of building structures obtain point cloud data of the target building, extract features from the point cloud data, and obtain a geometric feature map. Extracting features from the original point cloud data instead of directly attempting to reconstruct a three-dimensional model can effectively reduce the negative effects caused by the sparsity, noise and uneven distribution of the point cloud data.

[0050] Based on the preset coding language, the geometric feature map is converted into an architectural coding statement, which is used to characterize the building structure. Converting the geometric feature map into an architectural coding statement can not only abstractly represent the building structure, but also ignore the noise and missing parts in the input point cloud data to a certain extent. This operation at an abstract level makes the model generation process more stable and reduces the dependence on the integrity of the original data. In addition, the use of architectural coding statements can also easily apply grammatical constraints to ensure that the generated building model is both logical and structural.

[0051] The building coding statement is converted into a target building tree, which includes multiple nodes, each of which represents the height and outline of different levels in the target building. The process of building a building tree allows the information of the building structure to be organized in a hierarchical manner, which helps to better understand and process the details of complex buildings. By decomposing the building structure into multiple levels of nodes, the specific properties of each layer (such as height and outline) can be more precisely controlled and the correct relationship between the layers can be ensured.

[0052] Based on the target building tree, a 3D building model of the target building is constructed, which enables the method to maintain high robustness when facing low-quality point cloud data, and generate a relatively ideal 3D building model even when there is a lot of noise or missing data.

[0053] Through the above steps, the challenges faced by existing technologies in processing sparse, noisy and unevenly distributed point cloud data are effectively solved, providing a new way to efficiently and accurately restore complex building 3D models from low-quality point cloud data. This not only improves the stability of the reconstructed model, but also significantly enhances the accuracy and visual effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A diagram of an application environment of a method for programmatic reconstruction of a building structure in one embodiment;

[0056] Figure 2 It is a schematic diagram of a flow chart of a method for programmatic reconstruction of a building structure in one embodiment;

[0057] Figure 3 A diagram of the construction process from a program to a three-dimensional building model in one embodiment;

[0058] Figure 4 A schematic diagram of a flow chart of a method for programmatic reconstruction of a building structure in another embodiment;

[0059] Figure 5 A structural block diagram of a system for programmatic reconstruction of a building structure in one embodiment;

[0060] Figure 6 It is a structural block diagram of a device for programmatic reconstruction of a building structure in one embodiment;

[0061] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] The method for programmatic reconstruction of building structures provided in the embodiments of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 is used to generate a programmatic reconstruction request for the building structure, and send the programmatic reconstruction request for the building structure to the server 104, so that the server 104 builds a three-dimensional building model of the target building based on the target building tree. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0064] In an exemplary embodiment, Figure 2 As shown, a method for procedural reconstruction of building structures is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 208. Among them:

[0065] Step 202, obtaining point cloud data of the target building, performing feature extraction on the point cloud data, and obtaining a geometric feature map.

[0066] Among them, the target building refers to the specific building that needs to be reconstructed in three dimensions. It can be any existing building, such as a residential building, a commercial building, or an industrial plant. Point cloud data refers to a data set about the surface geometry of the target building obtained by 3D scanning equipment (such as laser scanners or photogrammetry technology). Each point contains a coordinate (x, y, z) in space, and these points together constitute a digital representation of the target building. The geometric feature map refers to the key information about the target building extracted from the point cloud data, which is used to describe the basic shape and structural characteristics of the building. This includes but is not limited to geometric elements such as the height, outline, edge, plane, and surface of the building.

[0067] Specifically, first collect the three-dimensional spatial coordinate information of the target building, namely the point cloud data. For example, use a 3D scanning device (such as a laser scanner or through photogrammetry) to capture the surface information of the target building from different angles. Optionally, for low-quality point clouds in real scenes, various defect situations can be simulated by uneven sampling, introducing incompleteness and adding noise, thereby enhancing the robustness of the model in practical applications. The purpose is to clean the point cloud data and remove noise and unnecessary background information.

[0068] Then, a 3D convolutional network is used as an encoder to extract features from the input sparse point cloud data and extract a geometric feature map from the point cloud data. The 3D convolutional network can extract the spatial structure information implicit in the point cloud, such as the height, width, and contour shape of each part of the building. It can be understood that after the above steps, the obtained geometric feature map contains important information about the building structure.

[0069] Step 204: based on a preset coding language, convert the geometric feature graph into a building coding statement, where the building coding statement is used to represent the building structure.

[0070] Among them, the preset coding language is a special language specially designed for this application, which is specially created for describing building structures and can represent building structures in a hierarchical program form. It is designed to encode two key pieces of information: ground height and building outline shape. The preset coding language allows complex building structures to be simplified into a series of operable statements, and these statements can be processed, modified and interpreted in a programmatic manner. The building coding statement refers to the programmatic expression of the geometric feature map extracted from the point cloud data using the above-mentioned preset coding language. For example, a building coding statement may describe that the height of a certain floor is 5 meters and its two-dimensional outline is a polygon. It can be understood that the building coding statement is to convert the geometric feature map describing the building structure into a formal language expression that can be understood and processed by a computer through specific language rules (i.e., the preset coding language). This expression not only facilitates subsequent processing steps (such as building a target building tree), but also improves the interpretability and flexibility of the model.

[0071] Specifically, as a preliminary step, a language specifically used to describe building structures, namely a preset coding language, needs to be created. The preset coding language represents the building structure in a hierarchical program form and can encode key information such as ground height and building outline shape. Then, a three-dimensional convolutional network is used as an encoder to extract geometric feature maps from the input sparse point cloud data. Using a decoder based on the Transformer architecture, the extracted geometric feature maps are predicted by autoregression to form a symbol sequence under the preset coding language. These symbols represent different elements in the building structure, such as the height of the layer, the two-dimensional outline, etc. Finally, after obtaining the symbol sequence, the symbols in these symbol sequences are encoded and converted according to the preset preset coding language rules to form the final building coding statements. These building coding statements can not only hierarchically represent the height, outline and other information of the building, but also exist in the form of an intermediate layer, which is convenient for further processing and editing.

[0072] Optionally, you first need to define all the legal statement structures and rules in the preset coding language. For example, determine how to represent information such as ground height and floor outline, and formulate the arrangement and relationship of these elements in the program.

[0073] Then, a finite state machine is designed according to the grammatical rules of the preset coding language. This finite state machine contains all possible states and the transition conditions between states. Each state represents a specific situation or stage in the decoding process, such as which part of the building description is being processed (such as the ground height or the height of a certain floor).

[0074] Next, a decoder based on the attention mechanism (Transformer) is used to autoregressively predict the sequence of symbols that constitute the preset coding language sentence. The decoder will gradually generate a sequence of tokens based on the input point cloud features. At each decoding step, the currently generated token sequence is checked, and based on the state transition table of the finite state machine, it is decided which subsequent tokens are legal. If the most recently generated token is of a certain type (for example, representing ground height), then the next token must comply with the provisions of the preset coding language regarding the elements that should follow the ground height. Dynamically mask token options that do not conform to the current context. For example, if the current state requires that the next token should be a numerical type (such as a height value), the non-numerical type token will be masked and cannot be selected as the next step.

[0075] Finally, every time a new token is predicted, the system verifies whether it conforms to the allowed token type in the current state. If the verification passes, the token is accepted and the finite state machine is advanced to the next corresponding state. If an inappropriate token is encountered (i.e., it does not meet the expectations in the current state), the token will be ignored or resampled until a qualifying token is found. When all necessary tokens are successfully predicted and added to the program, the entire building coding program is complete. At this point, there should be a complete, grammatically correct building program that can be further parsed and used for the construction of a 3D model.

[0076] The finite state machine mask strategy can dynamically limit possible choices during the decoding process, thereby ensuring that the generated building program strictly follows the predefined preset coding language grammar rules, avoiding semantic breaks or structural violations that may occur in traditional neural network generation.

[0077] Step 206: convert the building coding statement into a target building tree, where the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building.

[0078] The target building tree refers to a hierarchical data structure used to represent the building structure. It abstracts the building into a rooted tree, where each node represents a part of the building (such as a floor). Through this tree structure, the hierarchical relationship between the parts inside the building and the specific attributes of each floor (such as height, outline shape, etc.) can be clearly described. It can be understood that the target building tree allows complex building structures to be modeled programmatically and is convenient for converting them into three-dimensional models in subsequent steps.

[0079] A node is the basic unit in the target building tree, and each node represents a component of the building. Each node contains two main attributes: height and 2D outline. The height refers to the height of the layer relative to the ground. The 2D outline refers to the polygon that defines the plane shape of the layer, that is, the boundary shape of the layer from the top. In addition, there is a parent-child relationship between nodes to describe the hierarchy of the building structure. For example, the ground layer may be the root node, and each layer above it is a child node of the ground layer.

[0080] The height of different levels refers to the height difference between the floors represented by each child node in the building and the floor represented by the parent node. For example, in a multi-story building, the first floor may be 5 meters above the ground, the second floor is 5 meters above the first floor, and so on. This height information helps determine the spatial layout and vertical distribution of the interior of the building.

[0081] The outline is the plan shape formed by the edge of each floor or roof, usually in the form of a polygon. The outline describes the horizontal extension and shape of the building. The outlines may be different for different levels, reflecting changes in the building design or differences in functional areas. For example, the ground floor may be rectangular, while the top floor may be L-shaped or polygonal due to the setback design.

[0082] Specifically, the building coding statements generated in the above steps are converted into the target building tree through the geometry compiler, including: first, the building coding statements generated by the decoder need to be parsed. This process involves reading and understanding various instructions and parameters in the building coding statements, such as the hierarchical structure of the building, the height of each floor, and the corresponding two-dimensional outline. Then, based on the parsed results, a building tree (i.e., a rooted tree) is constructed, in which each node represents a part of the building and contains corresponding attributes, such as height and two-dimensional outline.

[0083] Step 208: construct a three-dimensional building model of the target building based on the target building tree.

[0084] Among them, a three-dimensional building model refers to a digital representation in three-dimensional space, which describes in detail the building's shape, internal structure and the spatial relationship of its components.

[0085] Specifically, the target building tree generated in the above steps is converted into a three-dimensional building model through a geometry compiler, including: first initializing basic data, starting from the root node of the building tree, obtaining ground height information, and further obtaining two-dimensional contour information related to the ground height.

[0086] Then traverse the building tree and process each layer in hierarchical order. For each layer, its height and corresponding 2D outline need to be determined. And further, according to the height value of the current layer and its position relative to the ground, its height coordinate in 3D space is determined. For example, if the ground height is 0 meters and the first floor height is 5 meters, the actual height coordinate of the first floor is 5 meters.

[0087] Then expand each layer of the 2D contour to 3D space. This means that a z-axis coordinate (i.e., height) needs to be added to the vertex of each 2D contour line. For example, the 2D contour is a square, and the coordinates of the four corner points are (x1, y2), (x2, y1), (x2, y2), and (x1, y1). If the height of this layer is 5 meters, the coordinates of these four points in 3D space become (x1, y2, 5), (x2, y1, 5), (x2, y2, 5), and (x1, y1, 5).

[0088] Finally, when constructing the 3D building model, ensure that each layer is at its correct height position and that the connection relationship between the layers conforms to the hierarchical structure of the building tree. If there are multiple child nodes (for example, a main building has multiple layers), these child nodes should be adjusted in height accordingly based on their positions in the building tree to generate a preliminary initial building model. Optionally, perform geometric corrections on the initially generated initial building model to ensure that the vertices of the contour lines of each layer of child nodes are accurately aligned to the nearest point or boundary position of the parent node contour. This step helps improve the geometric accuracy and visual quality of the model.

[0089] In one of the embodiments, the symbol sequence is predicted by autoregression.

[0090] Among them, the geometric feature map contains various key information that can describe the building structure, such as the height of the layer, the two-dimensional outline, etc. Through this linear representation, the complex three-dimensional geometric information is simplified into a series of ordered data points or vectors, which is convenient for further analysis and processing.

[0091] A symbol sequence is a set of symbols that are used to form a domain-specific language (i.e., a preset coding language) statement after autoregressive prediction. The symbols in the symbol sequence represent different elements in the building structure, such as the height of the floor, the two-dimensional outline, etc. Each symbol corresponds to a part of the preset coding language, which is used to describe a specific attribute of the building. The symbol sequence is essentially a high-level abstraction of the geometric feature map sequence, which expresses the information of the building in a structured, easy-to-understand and editable form.

[0092] Specifically, a 3D convolutional network (as an encoder) is first used to extract geometric feature maps from the input sparse point cloud data. These features reflect important information such as the height, width, and outline shape of each part of the building.

[0093] Then, a decoder based on the attention mechanism (Transformer) is used to autoregressively predict the sequence of symbols that constitute the preset coding language for the geometric feature map. The decoder gradually predicts the next most likely symbol based on the previously generated symbols until the entire sequence is completed. Each symbol represents a different element in the building structure, such as the height of a layer, a two-dimensional outline, etc.

[0094] Finally, based on the preset coding language, the symbol sequence obtained by the autoregressive prediction is converted into a code. This process involves mapping the symbol sequence back into a readable and editable architectural programming language expression. The resulting architectural coding statement can hierarchically represent the building's height, outline and other information, and exists in the form of an intermediate layer for further processing and editing.

[0095] By converting complex 3D geometric information into a linear sequence of geometric feature maps, the data is easier to process and analyze. This linear representation helps to simplify the subsequent data processing process. And the symbol sequence is encoded and converted through a preset coding language (DSL) to form a building coding statement, which can accurately describe the different levels of the building and its key attributes such as height and outline in a hierarchical manner. This is not only easy to understand and edit, but also provides a solid foundation for subsequent automated 3D modeling.

[0096] In one of the embodiments, for each building code statement, the building code statement is parsed to obtain height information and two-dimensional outline information represented by the building code statement; preset ground height information is obtained, and a root node is created based on the preset ground height information; child nodes are created based on the height information and two-dimensional outline information parsed from each building code statement; and a target building tree is generated based on the root node and the child nodes corresponding to each building code statement.

[0097] The height information in this application refers to the parent node information, such as the parent node number, which is used to indicate the height difference between the floors represented by each child node and the floor represented by the parent node in the building. For example, in a multi-story building, the first floor may be 5 meters above the ground, the second floor is 5 meters above the first floor, and so on. This height information helps determine the spatial layout and vertical distribution of the interior of the building.

[0098] 2D outline information refers to the plane figure formed by the edge of each floor or roof, usually expressed as a polygon. It defines the horizontal extension and shape of the building. For example, the bottom floor may be rectangular, while the top floor may be L-shaped or polygonal due to the setback design. 2D outline information is essential for constructing the specific shape of each floor.

[0099] The preset ground height information refers to a base height set in the building model, which is used as the basis for calculating the height of other building levels. Usually, the ground is regarded as a height of 0, but different values ​​may be set according to actual conditions. This information is the starting point for creating a building tree, that is, the basis for the root node.

[0100] The root node is the starting point in the target building tree, representing the base of the entire building structure, usually the ground floor or the lowest floor. The root node contains two main attributes: height, which is the actual height of the floor relative to the preset ground height. The two-dimensional outline is the polygon that defines the plane shape of the floor, that is, the boundary shape of the floor when viewed from the top.

[0101] Subnodes are nodes added layer by layer based on the root node, representing the superstructure or other components of the building. Each subnode also contains two main attributes: height, which is the height difference of the layer relative to the ground or other reference layer. The two-dimensional outline is the polygon that defines the plane shape of the layer.

[0102] Specifically, refer to Figure 3 In the process from (a) to (b), each architectural coding statement, i.e., program (a), is first parsed. The explanation of the statements in program (a) is as follows:

[0103] The SetGround function is used to define the ground position of the building model. The parameter (-.28) represents the z-axis position of the ground in the global coordinate system (i.e., the ground height). 1 , L 2 , L 3 and L 4 They represent the layers above the ground layer respectively. (-.28) is a floating point number that can change and is used to represent the height of the ground.

[0104] CreateLayer is used to create a new layer. You need to specify the parent layer, height, and contour. The parent layer can be represented by a symbol to indicate that other layers are created with the parent layer as a reference; the height can be represented by a floating point number; the contour is a polygon that uses multiple coordinate points (i.e. contour points) to describe the shape of the layer.

[0105] For example, parent= To specify L 1 The parent node of the layer is the ground layer, i.e. the base layer. height=.09 means setting L 1 The height of the layer is 0.09. contour=[…] is used to define L 1The two-dimensional shape of the layer is described by a series of (x, y) coordinate points. These points form the edges of the polygon, thus forming the plane shape of this layer. For the following L 2 , L 3 , L 4 It is described in the same way.

[0106] These statements together constitute a procedural representation for describing building structures. In this way, complex building structures can be simplified into a series of easy-to-process instructions, thereby achieving the goal of efficiently and accurately recovering the three-dimensional structure of the building from sparse and low-quality point cloud data.

[0107] Each statement contains key information about a specific building level or part, such as height and 2D outline. The parsed information includes the height of the level relative to the ground or other reference layer (height information), and the polygon that defines the plane shape of the level (2D outline information). Then get the preset ground height information, such as 0 meters, which can also be adjusted according to actual conditions. Create the root node of the building tree based on this ground height information. The root node represents the ground layer or the lowest layer, and it contains two main attributes: height (usually ground height) and 2D outline (the shape of the ground layer). Next, use the height information and 2D outline information in each building coding statement parsed in the above steps to create the corresponding child nodes. Among them, each child node represents a level or part of the building, including its height difference relative to the floor represented by the parent node and the corresponding 2D outline information. Finally, use the root node created in the above steps as the starting point. Add all the created child nodes in turn, and establish parent-child relationships based on their relative positions in the building. Make sure that each layer is at the correct height position and that the connection relationship between layers conforms to the hierarchical structure of the building tree.

[0108] Since architectural coding statements are used to describe building structures, the complexity of the original point cloud data can be greatly simplified. Through programmatic processing, the need for manual intervention is reduced and work efficiency is improved. As a readable and editable form of an intermediate layer, architectural coding statements allow users to quickly adjust or redesign building models according to actual needs. For example, modifying the height or outline shape of a certain floor becomes simple and direct. Further, by parsing architectural coding statements and creating root nodes and child nodes, complex building structures can be represented in a hierarchical form. Each node (including root nodes and child nodes) contains height information and two-dimensional outline information, which enables the building model to accurately reflect the key features of the actual building, such as height and shape.

[0109] In one of the embodiments, an initial building tree corresponding to a root node is obtained; based on the height information parsed from each building coding statement, the hierarchical relationship between each child node is determined; based on the hierarchical relationship between each child node, the position of each child node in the initial building tree is determined; based on the position of each child node in the initial building tree, each child node is added to the initial building tree to obtain a target building tree.

[0110] The initial building tree refers to a preliminary, basic hierarchical data structure created based on the root node. This tree structure initially contains only one root node (usually the ground level or the lowest level), which represents the basic part of the entire building structure. Specifically: the root node contains ground height information and two-dimensional contour information, which serves as the starting point of the entire building tree. And the initial building tree has only this one root node at the beginning, and subsequent child nodes will be gradually added to this initial structure based on the parsed height information and two-dimensional contour information.

[0111] Hierarchical relationships refer to the height relationships of the various parts of a building (i.e., the child nodes) relative to each other and to the parent node. These relationships define the spatial hierarchy of the various parts within the building.

[0112] Specifically, first, a root node is created using the preset ground height information. The root node represents the ground layer or the lowest layer, including its height (usually the ground height) and the two-dimensional outline (the shape of the ground layer). Based on this root node, an empty building tree structure is initialized, called the initial building tree. At this time, the building tree only contains one root node.

[0113] Then, each building coding statement is parsed to obtain the height information in each building coding statement, and further, based on the height information in each statement, the hierarchical relationship between each node is obtained.

[0114] Next, based on the hierarchical relationship determined in the above steps, decide where each child node should be inserted in the initial building tree, including: a child node may be a direct child of the root node, while another child node may be a child of an existing child node. For example, if the height value of a child node is 5 meters higher than the root node, it should be a direct child of the root node; if the height value of another child node is 5 meters higher than the first child node, it should be a child of the first child node.

[0115] Finally, according to the positions determined in the above steps, all child nodes are added to the initial building tree in sequence. For each child node, insert it under the corresponding parent node to form the correct parent-child relationship. For example, if a child node should be a direct child of the root node, add it as a child of the root node; if a child node should be a child of another child node, add it as a child of the corresponding child node. Finally, a complete, hierarchical data structure is formed - the target building tree. In this tree structure, each node represents a part of the building, and the hierarchical relationship between the internal parts of the building is described through the parent-child relationship.

[0116] Since an initial building tree containing a root node is created, a basic framework is provided for the subsequent addition of child nodes. The root node, as the starting point of the entire building tree, ensures that all subsequent operations have a clear reference point. Finally, by gradually adding child nodes to the initial building tree, a complete hierarchical data structure is eventually formed, ensuring the integrity and accuracy of the building tree, laying a solid foundation for the subsequent 3D model construction.

[0117] In one of the embodiments, the height information and two-dimensional contour information corresponding to the building level represented by the root node in the target building tree are determined; based on the height information and two-dimensional contour information corresponding to the building level represented by the root node, the three-dimensional contour information corresponding to the building level represented by the root node is determined; each child node in the target building tree is traversed in hierarchical order to determine the height information and two-dimensional contour information corresponding to the building level represented by each child node; based on the height information and two-dimensional contour information corresponding to the building level represented by each child node, the three-dimensional contour information corresponding to the building level represented by each child node is determined; based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node, a three-dimensional building model of the target building is generated.

[0118] The 3D contour information corresponding to the building level represented by the root node refers to combining the height information of the root node with the 2D contour information to determine the specific shape of the layer in 3D space. This means adding a z-axis coordinate (i.e., height value) to each point in the 2D contour to form a 3D polygon or other geometric shape.

[0119] The 3D contour information corresponding to the building level represented by each sub-node refers to combining the height information and 2D contour information of each sub-node to determine the specific shape of the layer in 3D space. This means adding a z-axis coordinate (i.e., height value) to each point in the 2D contour to form a 3D polygon or other geometric shape.

[0120] Specifically, refer to Figure 3In the process from (b) to (c), the height information (usually the ground height) and the two-dimensional contour information (the shape of the ground layer) of the root node are first extracted from the target building tree. This information describes the boundary shape of the ground layer on the horizontal plane and its height relative to the reference plane. A z-axis coordinate (i.e., the height value of the root node) is added to each point in the two-dimensional contour of the root node to form a three-dimensional polygon or geometry. For example, if the height of the ground layer is 0 meters, z=0 is added to each point in the two-dimensional contour to form a three-dimensional shape located on the ground.

[0121] Then, traverse each child node in the target building tree in hierarchical order (usually from bottom to top). For each child node, extract its height information and two-dimensional contour information. This information describes the boundary shape of the layer on the horizontal plane and its height relative to the reference plane. And for each child node, add a z-axis coordinate (that is, the height value of the child node) to each point in its two-dimensional contour to form a three-dimensional polygon or geometry. For example, if the height of a layer is 5 meters, add z=5 to each point in the two-dimensional contour of the layer, thereby forming a three-dimensional shape at a height of 5 meters.

[0122] Finally, the 3D contour information of the root node and all child nodes are integrated together to form a complete 3D building model. Optionally, to ensure the correct connection between the layers, necessary geometric corrections are made to improve the accuracy and visual quality of the model. Specifically, it includes: ensuring that each layer is at the correct height position and that the connection relationship between the layers conforms to the hierarchical structure of the building tree. The 2D contour of each layer is extended to 3D space, which means that a z-axis coordinate (i.e., height) needs to be added to the vertex of each 2D contour line. Recursively adjust the vertices of the contour line of each layer of nodes so that they are accurately aligned to the nearest point or boundary position of the parent node contour, thereby improving the geometric accuracy and visual effect of the model.

[0123] By parsing the height information and 2D contour information of the root node and each child node and converting them into 3D contour information, it is possible to ensure that the position and shape of each layer in 3D space are accurately represented. This method avoids the errors that may occur when generating a mesh model directly from point cloud data and improves the accuracy of the final 3D model.

[0124] In one of the embodiments, an initial building model of a target building is generated based on three-dimensional contour information corresponding to a building level represented by a root node and three-dimensional contour information corresponding to a building level represented by each child node; each child node is traversed in hierarchical order starting from the root node, and for a child node currently traversed, a parent node corresponding to the child node currently traversed is determined; based on two-dimensional contour information of the child node currently traversed, vertices of a contour line of the child node currently traversed are determined; based on two-dimensional contour information of a parent node corresponding to the child node currently traversed, vertices of a contour line of a parent node corresponding to the child node currently traversed are determined; based on a geometric relationship between vertices of contour lines of the child node currently traversed and the parent node corresponding to the child node currently traversed, positions of vertices of a contour line corresponding to the child node currently traversed and vertices of a contour line of the parent node corresponding to the child node currently traversed in the initial building model are adjusted to obtain a three-dimensional building model of the target building.

[0125] The initial building model refers to the 3D building model initially constructed based on the 3D outline information of the root node and all child nodes. This model contains the basic shape and position information of each part of the building, but may need further adjustment to ensure that the geometric relationship between each layer is correct.

[0126] A parent node refers to a node directly above the current node in a hierarchical data structure (i.e., the target building tree). In a building tree, a parent node usually represents a building part one level lower than the current node. For example, in a multi-story building, the first floor may be a child node of the ground floor (root node), and the second floor is a child node of the first floor. In this application, the height information index contained in the child nodes can be used to determine which nodes should be considered at the same level and which nodes should be considered at a higher or lower level. This relationship helps to clarify the spatial hierarchy of the various parts inside the building.

[0127] The vertices of the contour line refer to the vertex coordinates of the polygons that define the plane shape of a building layer (whether it is a root node or a child node). These points describe the boundary shape of the layer on the horizontal plane. For example, for a rectangular floor, the vertices of its contour line are the coordinates of the four corner points; for more complex shapes, the number and position of the contour line vertices will be different. It can be understood that each contour line vertex has an x, y coordinate (i.e. two-dimensional contour information), and a z coordinate (height information), which together constitute the position in three-dimensional space.

[0128] Specifically, a basic 3D building model containing all levels is first constructed based on the 3D outline information (including height information and 2D outline information) of the root node and all its child nodes. This model contains the basic shape and position information of each part of the building, but may need further adjustment to ensure that the geometric relationship between each layer is correct.

[0129] Then, starting from the root node, traverse each child node in the target building tree in hierarchical order. For each child node currently traversed, determine its corresponding parent node. For example, in a multi-story building, the second floor is a child node of the first floor, and the first floor is a child node of the ground floor (root node).

[0130] Based on the 2D contour information of the currently traversed child node, all the contour line vertices are extracted. These points define the boundary shape of the layer on the horizontal plane. The height of the layer is added as the z coordinate.

[0131] Next, based on the 2D contour information of the parent node corresponding to the current child node, all the contour line vertices are extracted. These points define the boundary shape of the parent node on the horizontal plane. Add the height of the layer as the z coordinate.

[0132] Finally, the geometric relationship between the currently traversed child node and the vertex of the contour line of its corresponding parent node is used to adjust the position of the vertices of the contour line of the current child node and the vertices of the contour line of the parent node in the initial building model (the specific operation may include recursively adjusting the vertices of the contour line of each layer of nodes to accurately align them to the nearest point or boundary position of the parent node contour, thereby improving the overall accuracy and visual effect of the model). It can be understood that the purpose of this step is to ensure that the position of the child node relative to the parent node is more natural and smooth, and to reduce or eliminate unreasonable geometric dislocation.

[0133] According to the geometric relationship between the vertices of the child node and the parent node's contour line, the vertex position of the child node's contour line is adjusted to better align with the parent node's contour, optimizing the geometric accuracy and visual effect of the entire building model. This step ensures a smooth transition between layers and improves the overall consistency of the model.

[0134] In an exemplary embodiment, a training method for a programmatic reconstruction network of a building structure is also provided, comprising the following steps:

[0135] A preset point cloud data training set and a building coding sentence training set are obtained, wherein the point cloud data training set includes multiple groups of point cloud data to be trained, and the building coding sentence training set includes multiple annotated building coding sentences to be trained, and the multiple groups of point cloud data to be trained and the multiple annotated building coding sentences to be trained are in a one-to-one mapping relationship; for each group of point cloud data to be trained, feature extraction is performed on the point cloud data to be trained by an initial three-dimensional convolution encoder to obtain a geometric feature map of the training stage; the geometric feature map of the training stage is converted into an architectural coding sentence of the training stage by an initial attention decoder; based on the sentence difference between the annotated building coding sentences in a one-to-one mapping relationship with the point cloud data to be trained and the building coding sentences in the training stage, the parameters in the loss function of the initial three-dimensional convolution encoder and the initial attention decoder are adjusted until the sentence difference meets the preset iteration condition, so as to obtain a trained three-dimensional convolution encoder and attention decoder.

[0136] Specifically, first obtain the preset point cloud data training set and building code sentence training set. Here, the point cloud data training set should include multiple groups of point cloud data to be trained, and the building code sentence training set contains multiple labeled building code sentences. Ensure that each group of point cloud data has a corresponding correctly labeled building code sentence to form a one-to-one mapping relationship.

[0137] Then, for each set of point cloud data to be trained in the point cloud data training set, the initial 3D convolution encoder is used to perform feature extraction to generate a geometric feature map for the set of data. The purpose of this step is to identify key geometric features from the original point cloud data in preparation for subsequent processing.

[0138] Next, the initial attention decoder is used to convert the geometric feature map obtained in the above steps into an architectural encoding sentence. This process involves converting the geometric feature map into a language expression that can represent the architectural structure through the decoder.

[0139] Finally, the differences between the architectural coding sentences generated by the decoder and the corresponding annotated architectural coding sentences are compared. Based on these differences, the loss function parameters in the initial 3D convolutional encoder and the initial attention decoder are adjusted. The above process is repeated until the sentence differences meet the predetermined iteration conditions. At this point, the obtained 3D convolutional encoder and attention decoder are considered to be trained.

[0140] Through the above steps, a procedural reconstruction network for building structures can be effectively trained, enabling it to learn and accurately reconstruct a simplified model of the building structure from given point cloud data. This method not only improves the robustness to low-quality or noisy point cloud data, but also improves the accuracy and stability of the reconstruction results.

[0141] In an exemplary embodiment, Figure 4 As shown, it includes steps 402 to 408. Among them:

[0142] Step 402, obtaining point cloud data of the target building, performing feature extraction on the point cloud data, and obtaining a geometric feature map;

[0143] Step 404: obtain a symbol sequence by predicting in an autoregressive manner, wherein the symbols in the symbol sequence represent the heights and outlines of different levels in the target building; perform encoding conversion on the symbol sequence based on a preset encoding language to obtain a building encoding statement, wherein the building encoding statement is used to represent the building structure;

[0144] Step 406: for each building code statement, parse the building code statement to obtain the height information and two-dimensional outline information represented by the building code statement; obtain the preset ground height information, and create a root node based on the preset ground height information; create a child node based on the height information and two-dimensional outline information parsed from each building code statement; obtain an initial building tree corresponding to the root node; determine the hierarchical relationship between each child node based on the height information parsed from each building code statement; determine the position of each child node in the initial building tree based on the hierarchical relationship between each child node; add each child node to the initial building tree based on the position of each child node in the initial building tree to obtain a target building tree;

[0145] Step 408, determine the height information and two-dimensional contour information corresponding to the building level represented by the root node in the target building tree; determine the three-dimensional contour information corresponding to the building level represented by the root node based on the height information and two-dimensional contour information corresponding to the building level represented by the root node; traverse each child node in the target building tree in hierarchical order to determine the height information and two-dimensional contour information corresponding to the building level represented by each child node; determine the three-dimensional contour information corresponding to the building level represented by each child node based on the height information and two-dimensional contour information corresponding to the building level represented by each child node; based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node information, generate an initial building model of the target building; start from the root node and traverse each child node in hierarchical order, and for the child node currently traversed, determine the parent node corresponding to the child node currently traversed; based on the two-dimensional contour information of the child node currently traversed, determine the vertices of the contour line of the child node currently traversed; based on the two-dimensional contour information of the parent node corresponding to the child node currently traversed, determine the vertices of the contour line of the parent node corresponding to the child node currently traversed; based on the vertices of the contour line corresponding to the child node currently traversed in the initial building model and the vertices of the contour line of the parent node corresponding to the child node currently traversed, correct the position of the initial building model of the target building to obtain the three-dimensional building model of the target building.

[0146] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0147] Based on the same inventive concept, the embodiment of the present application also provides a system for programmatic reconstruction of building structures for implementing the programmatic reconstruction method of building structures involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the programmatic reconstruction system for building structures provided below can refer to the limitations of the programmatic reconstruction method for building structures above, and will not be repeated here.

[0148] The programmatic reconstruction system of building structures includes a programmatic generator, a 3D convolutional encoder, an attention decoder, and a geometric compiler, where:

[0149] The programmatic generator trains the initial three-dimensional convolutional encoder and the initial attention decoder based on the preset point cloud data training set and the architectural coding sentence training set to obtain the trained three-dimensional convolutional encoder and attention decoder;

[0150] The 3D convolution encoder obtains the point cloud data of the target building, extracts features from the point cloud data, and obtains a geometric feature map;

[0151] The attention decoder converts the geometric feature map into architectural coding sentences based on the preset coding language, and the architectural coding sentences are used to represent the building structure;

[0152] The geometry compiler converts the building coding statement into a target building tree, where the target building tree includes a plurality of nodes, each of which represents the height and outline of a different level in the target building;

[0153] The geometry compiler constructs a three-dimensional building model of the target building based on the target building tree.

[0154] Specifically, refer to Figure 5 , the 3D convolutional encoder is used to extract geometric feature maps from the input sparse point cloud data, including:

[0155] Through the programmatic generator, the initial 3D convolutional encoder and attention decoder are trained based on the preset point cloud data training set and architectural coding sentence training set, and finally the 3D convolutional encoder and attention decoder that have been trained and optimized are obtained. For example, first prepare a dataset containing multiple sets of point cloud data to be trained and their corresponding annotated architectural coding sentences. Then, use this dataset to iteratively train the 3D convolutional encoder and attention decoder until the model can accurately convert the geometric feature map into architectural coding sentences.

[0156] The input point cloud data is processed using a 3D convolutional network (as an encoder) to extract geometric feature maps that can represent the building structure. The extracted geometric feature maps are expanded into a feature sequence so that subsequent processing steps can operate based on this feature sequence.

[0157] The attention decoder is used to autoregressively predict the symbol sequence that constitutes the preset coding language and ensure that the generated program syntax is correct. Specifically, it uses a decoder based on the attention mechanism (Transformer) to process the geometric feature map sequence provided by the encoder. The decoder predicts the symbol sequence that constitutes the DSL statement one by one. The symbols in these symbol sequences represent different elements in the building structure, such as the height of the layer, the two-dimensional outline, etc. After obtaining the symbol sequence, these symbol sequences are encoded and converted based on the preset coding language to form the final building coding statement. The finite state machine mask strategy is introduced to dynamically mask the token options that do not conform to the grammatical rules during the decoding process to ensure that the generated program syntax is correct.

[0158] The geometry compiler is used to convert the building program generated in the above steps into a three-dimensional model, which specifically includes: reading and understanding the building coding statements generated by the decoder, including information such as the building's hierarchy, the height of each floor, and the corresponding two-dimensional outline. Based on the results of the parsing, a building tree (i.e., a rooted tree) is constructed, where each node represents a part of the building and contains corresponding attributes, such as height and two-dimensional outline. The spatial position of each layer and its corresponding three-dimensional coordinates are calculated based on the information of the building tree. This includes expanding the two-dimensional outline into three-dimensional space and ensuring the correct hierarchical relationship between the layers. After the three-dimensional model is initially generated, geometric correction is implemented to improve the geometric accuracy and visual quality of the model. This step is achieved by recursively adjusting the vertices of the outline of each layer of nodes so that they are accurately aligned to the nearest point or boundary position of the parent node outline.

[0159] The programmatic reconstruction system of building structures integrates programmatic generators, 3D convolutional encoders, attention decoders, and geometric compilers to efficiently and accurately restore complex building 3D models from low-quality point cloud data. This method not only improves the stability of the reconstructed model, but also significantly enhances the accuracy and visual effects of the model, solving the challenges faced by existing technologies in processing sparse, noisy, and unevenly distributed point cloud data.

[0160] Based on the same inventive concept, the embodiment of the present application also provides a programmatic reconstruction device for building structures for implementing the programmatic reconstruction method of building structures involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more embodiments of the programmatic reconstruction device for building structures provided below can refer to the limitations of the programmatic reconstruction method for building structures above, and will not be repeated here.

[0161] In an exemplary embodiment, Figure 6As shown, a programmatic reconstruction device 600 for a building structure is provided, comprising: an extraction module 602, a conversion module 604, a generation module 606 and a construction module 608, wherein:

[0162] The extraction module 602 is used to obtain the point cloud data of the target building, perform feature extraction on the point cloud data, and obtain a geometric feature map;

[0163] A conversion module 604, configured to convert the geometric feature graph into an architectural coding statement based on a preset coding language, wherein the architectural coding statement is used to represent the building structure;

[0164] A generating module 606, configured to convert the building coding statement into a target building tree, wherein the target building tree includes a plurality of nodes, each of which represents a height and an outline of a different level in the target building;

[0165] The construction module 608 is used to construct a three-dimensional building model of the target building based on the target building tree.

[0166] In one embodiment, the conversion module 604 is used to predict a symbol sequence by autoregression, where the symbols in the symbol sequence represent the heights and outlines of different levels in the target building; based on a preset coding language, the symbol sequence is converted into a coding to obtain a building coding statement.

[0167] In one of the embodiments, the generation module 606 is used to parse the targeted building coded statement for each building coded statement to obtain the height information and two-dimensional outline information represented by the targeted building coded statement; obtain the preset ground height information, and create a root node based on the preset ground height information; create a child node based on the height information and two-dimensional outline information parsed from each building coded statement; and generate a target building tree based on the root node and the child nodes corresponding to each building coded statement.

[0168] In one embodiment, the generation module 606 is used to obtain an initial building tree corresponding to the root node; determine the hierarchical relationship between each child node based on the height information parsed from each building coding statement; determine the position of each child node in the initial building tree based on the hierarchical relationship between each child node; and add each child node to the initial building tree based on the position of each child node in the initial building tree to obtain a target building tree.

[0169] In one of the embodiments, the construction module 608 is used to determine the height information and two-dimensional outline information corresponding to the building level represented by the root node in the target building tree; determine the three-dimensional outline information corresponding to the building level represented by the root node based on the height information and two-dimensional outline information corresponding to the building level represented by the root node; traverse each child node in the target building tree in hierarchical order to determine the height information and two-dimensional outline information corresponding to the building level represented by each child node; determine the three-dimensional outline information corresponding to the building level represented by each child node based on the height information and two-dimensional outline information corresponding to the building level represented by each child node; generate a three-dimensional building model of the target building based on the three-dimensional outline information corresponding to the building level represented by the root node and the two-dimensional outline information corresponding to the building level represented by each child node.

[0170] In one embodiment, the construction module 608 is used to generate an initial building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node; traverse each child node in hierarchical order starting from the root node, and determine the parent node corresponding to the child node currently traversed for the child node currently traversed; determine the vertices of the contour line of the child node currently traversed based on the two-dimensional contour information of the child node currently traversed; determine the vertices of the contour line of the parent node corresponding to the child node currently traversed based on the two-dimensional contour information of the parent node corresponding to the child node currently traversed; based on the vertices of the contour line corresponding to the child node currently traversed in the initial building model and the vertices of the contour line of the parent node corresponding to the child node currently traversed, correct the position of the initial building model of the target building to obtain the three-dimensional building model of the target building.

[0171] Each module in the above-mentioned programmatic reconstruction device of building structure can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0172] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the programmatic reconstruction of the building structure. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for programmatic reconstruction of the building structure is implemented.

[0173] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0174] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0175] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0176] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0178] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0179] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0180] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for programmatic reconstruction of a building structure, characterized in that: The method comprises: Acquire point cloud data of the target building, perform feature extraction on the point cloud data, and obtain a geometric feature map; Based on a preset coding language, the geometric feature graph is converted into a building coding statement, where the building coding statement is used to characterize the building structure; For each building coding statement, the building coding statement is parsed to obtain the height information and two-dimensional outline information represented by the building coding statement; the preset ground height information is obtained, and a root node is created based on the preset ground height information; a child node is created based on the height information and two-dimensional outline information parsed from each building coding statement; a target building tree is generated based on the root node and the child nodes corresponding to each building coding statement, the target building tree includes a plurality of nodes, and the plurality of nodes each represent the height and outline of different levels in the target building; Determine the height information and two-dimensional contour information corresponding to the building level represented by the root node in the target building tree; determine the three-dimensional contour information corresponding to the building level represented by the root node based on the height information and two-dimensional contour information corresponding to the building level represented by the root node; traverse each child node in the target building tree in hierarchical order to determine the height information and two-dimensional contour information corresponding to the building level represented by each child node; determine the three-dimensional contour information corresponding to the building level represented by each child node based on the height information and two-dimensional contour information corresponding to the building level represented by each child node; generate a three-dimensional building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node.

2. The method according to claim 1, characterized in that The converting the geometric feature graph into a building coding statement based on a preset coding language includes: Predicting the geometric feature map by autoregression to obtain a symbol sequence, wherein the symbols in the symbol sequence represent the heights and contours of different levels in the target building; Based on a preset coding language, the symbol sequence is coded and converted to obtain a building coding statement.

3. The method according to claim 1, characterized in that The generating a target building tree based on the root node and the child nodes corresponding to each building coding statement includes: Obtaining an initial building tree corresponding to the root node; Based on the height information parsed from each building coding statement, determine the hierarchical relationship between each child node; Based on the hierarchical relationship between each child node, determining the position of each child node in the initial building tree; Based on the position of each child node in the initial building tree, each child node is added to the initial building tree to obtain a target building tree.

4. The method according to claim 1, characterized in that: The generating of the three-dimensional building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node comprises: Generate an initial building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node; Starting from the root node, traverse each child node in hierarchical order, and for the child node currently traversed, determine the parent node corresponding to the child node currently traversed; Based on the two-dimensional contour information of the child node currently traversed, determine the vertex of the contour line of the child node currently traversed; Based on the two-dimensional contour information of the parent node corresponding to the child node currently traversed, determine the vertex of the contour line of the parent node corresponding to the child node currently traversed; Based on the vertices of the contour line corresponding to the child node currently traversed in the initial building model and the vertices of the contour line of the parent node corresponding to the child node currently traversed, the initial building model of the target building is position-corrected to obtain a three-dimensional building model of the target building.

5. A training method for a programmatic reconstruction network of a building structure, characterized in that: The method comprises: Obtaining a preset point cloud data training set and a building code sentence training set, wherein the point cloud data training set includes multiple groups of point cloud data to be trained, and the building code sentence training set includes multiple annotated building code sentences to be trained, and the multiple groups of point cloud data to be trained and the multiple annotated building code sentences to be trained are in a one-to-one mapping relationship; For each set of point cloud data to be trained, feature extraction is performed on the point cloud data to be trained through an initial three-dimensional convolutional encoder to obtain a geometric feature map in the training stage; Converting the geometric feature map of the training phase into an architectural encoding sentence of the training phase through an initial attention decoder; Based on the sentence difference between the labeled architectural coding sentence in a one-to-one mapping relationship with the point cloud data to be trained and the architectural coding sentence in the training phase, adjusting the parameters in the loss function of the initial three-dimensional convolutional encoder and the initial attention decoder until the sentence difference meets the preset iteration condition, thereby obtaining the trained three-dimensional convolutional encoder and the attention decoder; Through the geometry compiler, for each labeled building coding statement, the labeled building coding statement is parsed to obtain the height information and two-dimensional contour information represented by the labeled building coding statement; the preset ground height information is obtained, and a root node is created based on the preset ground height information; a child node is created based on the height information and two-dimensional contour information parsed from each labeled building coding statement; a target building tree is generated based on the root node and the child nodes corresponding to each labeled building coding statement, the target building tree including a plurality of nodes, each of which represents the height and contour of different levels in the target building; Determine the height information and two-dimensional contour information corresponding to the building level represented by the root node in the target building tree; determine the three-dimensional contour information corresponding to the building level represented by the root node based on the height information and two-dimensional contour information corresponding to the building level represented by the root node; traverse each child node in the target building tree in hierarchical order to determine the height information and two-dimensional contour information corresponding to the building level represented by each child node; determine the three-dimensional contour information corresponding to the building level represented by each child node based on the height information and two-dimensional contour information corresponding to the building level represented by each child node; generate a three-dimensional building model of the target building in the training phase based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node.

6. A system for procedural reconstruction of building structures, characterized in that: The architectural structure programmatic reconstruction system includes a programmatic generator, a three-dimensional convolutional encoder, an attention decoder and a geometric compiler, and the system includes: The programmatic generator trains the initial three-dimensional convolutional encoder and the initial attention decoder based on a preset point cloud data training set and a building coding sentence training set to obtain the trained three-dimensional convolutional encoder and the attention decoder; The three-dimensional convolution encoder acquires point cloud data of the target building, performs feature extraction on the point cloud data, and obtains a geometric feature map; The attention decoder converts the geometric feature map into an architectural coding sentence based on a preset coding language, and the architectural coding sentence is used to characterize the building structure; The geometry compiler parses each building coding statement to obtain height information and two-dimensional contour information represented by the building coding statement; obtains preset ground height information, and creates a root node based on the preset ground height information; creates a child node based on the height information and two-dimensional contour information parsed from each building coding statement; generates a target building tree based on the root node and the child nodes corresponding to each building coding statement, the target building tree including a plurality of nodes, each of which represents the height and contour of different levels in the target building; The geometry compiler determines the height information and two-dimensional contour information corresponding to the building level represented by the root node in the target building tree; determines the three-dimensional contour information corresponding to the building level represented by the root node based on the height information and two-dimensional contour information corresponding to the building level represented by the root node; traverses each child node in the target building tree in hierarchical order to determine the height information and two-dimensional contour information corresponding to the building level represented by each child node; determines the three-dimensional contour information corresponding to the building level represented by each child node based on the height information and two-dimensional contour information corresponding to the building level represented by each child node; generates a three-dimensional building model of the target building based on the three-dimensional contour information corresponding to the building level represented by the root node and the three-dimensional contour information corresponding to the building level represented by each child node.

7. A device for programmed reconstruction of building structures, characterized in that: The device comprises: An extraction module is used to obtain point cloud data of a target building, perform feature extraction on the point cloud data, and obtain a geometric feature map; A conversion module, used for converting the geometric feature graph into a building coding statement based on a preset coding language, wherein the building coding statement is used for representing a building structure; A generation module is used to parse each building coding statement to obtain the height information and two-dimensional outline information represented by the building coding statement; obtain preset ground height information, and create a root node based on the preset ground height information; create a child node based on the height information and two-dimensional outline information parsed from each building coding statement; generate a target building tree based on the root node and the child nodes corresponding to each building coding statement, the target building tree including a plurality of nodes, each of which represents the height and outline of different levels in the target building; A construction module is used to determine the height information and two-dimensional outline information corresponding to the building level represented by the root node in the target building tree; determine the three-dimensional outline information corresponding to the building level represented by the root node based on the height information and two-dimensional outline information corresponding to the building level represented by the root node; traverse each child node in the target building tree in hierarchical order to determine the height information and two-dimensional outline information corresponding to the building level represented by each child node; determine the three-dimensional outline information corresponding to the building level represented by each child node based on the height information and two-dimensional outline information corresponding to the building level represented by each child node; generate a three-dimensional building model of the target building based on the three-dimensional outline information corresponding to the building level represented by the root node and the three-dimensional outline information corresponding to the building level represented by each child node.

8. The device according to claim 7, characterized in that The conversion module is used to predict the geometric feature map by autoregression to obtain a symbol sequence, wherein the symbols in the symbol sequence represent the heights and contours of different levels in the target building; based on a preset coding language, the symbol sequence is coded and converted to obtain a building coding statement.

9. The device according to claim 7, characterized in that The generating module is used to obtain an initial building tree corresponding to the root node; Based on the height information parsed from each building coding statement, determine the hierarchical relationship between each child node; Based on the hierarchical relationship between each child node, determining the position of each child node in the initial building tree; Based on the position of each child node in the initial building tree, each child node is added to the initial building tree to obtain a target building tree.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Construction three-dimensional model building method and system

    CN101887597A

  • Building three-dimensional point cloud line feature extraction method based on deep learning

    CN118570485A