House plan control generation and editing method and device, equipment and storage medium

By obtaining floor plan control constraints and codebooks, dividing the boundaries of the whole house and selecting the candidate room shapes, generating the initial floor plan, and adjusting the shape when the editing instructions are detected, the problem of insufficient accuracy of floor plan in the prior art is solved, and higher accuracy and diversity are achieved.

CN119622893AInactive Publication Date: 2025-03-14SHENZHEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510149702.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the automatic generation of floor plan layout of floor plan, the generated floor plan matches the constraints with poor degree, and there are accuracy problems.

Method used

Provide a method of generating and editing floor plan control, obtaining floor plan control constraints and codebooks, dividing the boundaries of the whole house, selecting the shape of the candidate room, generating the initial floor plan, and adjusting the shape when the editing instructions are detected to ensure the accuracy of the floor plan.

Benefits of technology

By accurately capturing spatial relationships and handling constraints such as load-bearing walls, the accuracy and diversity of floor plans are improved, the post-processing needs are reduced, and the user's personalized needs and actual design intentions are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622893A_ABST
    Figure CN119622893A_ABST
Patent Text Reader

Abstract

The invention relates to a floor plan control generation and editing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a house type image control constraint and a codebook; dividing room boundaries of a whole house according to the house type diagram control constraint to obtain a whole house layout; according to the whole house layout, candidate room shapes corresponding to the codebook are selected, and an initial house type image is obtained; and when an editing instruction is detected, performing shape adjustment according to the editing instruction and the initial house type image to obtain an edited house type image. By adopting the method, the spatial relationship can be more accurately captured, and the accuracy of the house type image is at least ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for controlling generation and editing of floor plan. Background Art

[0002] With the development of deep learning technology, the field of automatic generation of floor plan layouts has made progress, but it still faces many challenges. In spatial layout planning, it is necessary to balance functional areas, traffic flow, natural lighting and ventilation, and other factors. At the same time, it is necessary to collaborate with multiple disciplines such as structural engineering to ensure that the layout is practical and compliant. Accurate data collection is also crucial. These factors make designing an artificial intelligence system that can comprehensively consider all aspects a key research problem.

[0003] In traditional technology, the ActFloor-GAN model is used for generative adversarial training to obtain the corresponding floor plans. However, the generated floor plans do not match the constraints well and have accuracy issues. Summary of the invention

[0004] Based on this, it is necessary to provide a floor plan control generation and editing method, device, computer equipment, computer readable storage medium and computer program product to address the above-mentioned technical problems, which can more accurately capture spatial relationships and at least ensure the accuracy of the floor plan.

[0005] In a first aspect, the present application provides a method for controlling, generating and editing a floor plan, the method comprising:

[0006] Obtain floor plan control constraints and codebook;

[0007] Dividing the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house; selecting the candidate room shapes corresponding to the code book according to the layout of the whole house to obtain an initial floor plan;

[0008] When an editing instruction is detected, the shape is adjusted according to the editing instruction and the initial floor plan to obtain an edited floor plan.

[0009] In a second aspect, the present application also provides a floor plan control generation and editing device, comprising:

[0010] A control module, used to obtain the control constraints and codebook of the floor plan;

[0011] A generation module is used to divide the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house; according to the layout of the whole house, select the candidate room shapes corresponding to the code book to obtain an initial floor plan;

[0012] The editing module is used to adjust the shape of the denoised floor plan according to the editing instruction when an editing instruction is detected to obtain an edited floor plan.

[0013] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of controlling generation and editing of the floor plan in any of the above embodiments are implemented.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of controlling generation and editing of floor plan in any of the above embodiments.

[0015] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of controlling generation and editing of the floor plan in any of the above embodiments are implemented.

[0016] The above-mentioned floor plan control generation and editing method, device, computer equipment, computer-readable storage medium and computer program product obtain floor plan control constraints and codebooks; the codebook corresponds to candidate room shapes, so that the generated room meets the expected geometric structure and functional distribution under the floor plan control constraints through the candidate room shapes in the codebook, so that the room shape of the floor plan has an accurate basis; on this basis, the room boundaries of the whole house are first divided according to the floor plan control constraints to obtain the whole house layout, so as to clearly divide the basic features in the whole house and form a feature arrangement at the whole house level, and let the user define key constraints at the whole house level to generate an overall layout; then, according to the whole house layout, the candidate room shapes in the codebook are selected, so as to select the corresponding geometric structure in a directional manner and obtain the initial floor plan, so as to accurately model and generate and construct the indoor space, represent the room as an editable polygon, and use the codebook to achieve accurate modeling and generation of the indoor space, so as to improve the accuracy and diversity of the plane layout, reduce the need for post-processing, so as to improve the accuracy and diversity of the plane layout, and reduce the need for post-processing of editing instructions. When an editing instruction is detected, the shape is adjusted according to the editing instruction and the initial floor plan to obtain the edited floor plan; since the editing instruction is to modify the room shape, it belongs to the room level, thus effectively combining automation and user-driven design to meet the user's personalized needs and actual design intentions. In this way, accurate modeling and generation are achieved while balancing automation and user control. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] 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.

[0018] Figure 1 A diagram of an application environment of a method for controlling generation and editing of a floor plan in an embodiment;

[0019] Figure 2 A schematic diagram of a flow chart of a method for controlling generation and editing of a floor plan in one embodiment;

[0020] Figure 3 A schematic diagram of a process for obtaining a whole house layout in one embodiment;

[0021] Figure 4 A schematic diagram of a process of using a noise reduction model in one embodiment;

[0022] Figure 5 A framework diagram for generating and editing a plan layout in one embodiment;

[0023] Figure 6 A schematic diagram of a forward process of guiding a model in one embodiment;

[0024] Figure 7 A schematic diagram of the RGD-Net architecture for obtaining an initial floor plan in one embodiment;

[0025] Figure 8 is a schematic diagram of an editing operation in an embodiment;

[0026] Fig. 9 is an initial floor plan in one embodiment;

[0027] Fig.10 A floor plan of a hand-drawn non-axis-aligned boundary in one embodiment;

[0028] Fig.11 A qualitative comparison diagram generated for a floor plan in one embodiment;

[0029] Fig.12 It is a structural block diagram of a device for controlling generation and editing of floor plan in one embodiment;

[0030] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0031] 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.

[0032] The floor plan control generation and editing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0033] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0034] In an exemplary embodiment, Figure 2 As shown, a method for controlling the generation and editing of floor plan is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 202 to 206. Among them:

[0035] Step 202, obtaining floor plan control constraints and codebook.

[0036] The floor plan control constraints are the key control data of the floor plan and the constraint data of the whole house layout. The floor plan control constraints include at least the whole house boundary and the number of rooms in the whole house, so as to construct a certain number of whole house layouts for a specific range. The floor plan control constraints may also include room types, so as to refine the use of each room in the whole house layout by room type. Room types include but are not limited to bedrooms, kitchens, toilets, washrooms and other uses. In addition to the whole house boundary, number of rooms and room types, the floor plan control constraints may also include layout structure constraints such as load-bearing walls to improve the structural rationality and reliability of the layout, so that the generated plane layout is more in line with building specifications and actual needs.

[0037] The codebook is a set of indexes corresponding to the candidate room shapes, and the codeword corresponding to the index is the candidate room shape. When the codebook is used for matching, the candidate room shape can be processed by using the index instead of the candidate room shape. Since the index can be a positive number, and the candidate room shape is mainly in the form of a multi-dimensional vector, the amount of data in the codebook is relatively small to ensure processing efficiency. Since the amount of data required to use the codebook is small, more candidate room shapes can be determined by obtaining the codebook.

[0038] Exemplarily, the user may input the floor plan control constraint, and the codebook may be obtained through the server. The floor plan control constraint and the codebook may also be received by the terminal, and the codebook may also be constructed based on pre-trained code vectors.

[0039] Step 204, dividing the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house; according to the layout of the whole house, selecting the candidate room shapes corresponding to the code book to obtain the initial floor plan.

[0040] The whole house layout is the layout information for the complete floor plan. The whole house layout can be in the form of image data or vector. The whole house layout can reflect the overall framework of the floor plan to form information at the whole house level. The whole house layout includes at least room boundaries to determine the initial floor plan through the room boundaries; the whole house layout also includes room structure features, and the room structure features include room boundaries, and room types that can contain floor plan control constraints to extract, so as to adaptively screen candidate room shapes through room types. The room structure features can also contain distribution pattern features composed of floor plan control constraints as feature points to adapt to corresponding distribution requirements. For example, the distribution pattern feature can be a Gaussian distribution feature.

[0041] The initial floor plan is a floor plan composed of candidate room shapes under the whole house layout. When the candidate room shapes corresponding to the codebook are selected, a large number of candidate room shapes can be determined through the codebook, and then the initial floor plan can be determined more accurately.

[0042] At least one of a clustering method, a three-dimensional point cloud instance segmentation technology, and a transformer network can be used to group the whole house layout, and then based on the global layout features of each group, the candidate room shapes corresponding to the codebook are selected to obtain an initial floor plan.

[0043] Optionally, when the floor plan control constraints include the boundaries of the entire house and the number of rooms in the entire house, a corresponding number of room boundaries can be divided within the boundaries of the entire house according to the floor plan control constraints, and the house layout can be estimated based on the number of rooms and adaptively adjusted to construct a certain number of whole-house layouts for a specific range.

[0044] Optionally, when the floor plan control constraints also include the boundaries of the entire house, the number of rooms in the entire house, and the room types, the space size of each room type can be adaptively planned and defined within the boundaries of the entire house by the number of rooms of each room type, thereby forming the boundaries of each room in the entire house. For example, the area of ​​each living room is larger than the area of ​​the bathroom. When the floor plan control constraints include the boundaries of the entire house, the number of rooms and room types, as well as layout structural constraints such as load-bearing walls, the rationality and reliability of the layout in structure can be improved, so that the generated plane layout is more in line with building specifications and actual needs.

[0045] Optionally, when the whole house layout includes room boundaries, the initial floor plan can be obtained based on the matching results of the room boundaries and the codebook. Specifically, the corresponding room boundary feature set can be formed by the edges or corner points of the room boundaries, and then the room boundary feature set can be matched with the codebook to obtain the candidate room shape matched by the room boundary feature set; the candidate room shapes matched by the room boundary feature set can be combined to obtain the initial floor plan.

[0046] In the case where the room structure feature includes a room boundary and a room type, a two-dimensional room structure feature is formed based on the room boundary and the room type. The two-dimensional room structure feature is matched with a codebook to obtain a candidate room shape matched by the two-dimensional room structure feature; the candidate room shapes matched by the two-dimensional room structure feature are combined to obtain an initial floor plan.

[0047] When the room structure feature includes room boundary and room type, and the room structure feature corresponds to Gaussian distribution feature, since Gaussian distribution feature includes mean and variance, a four-dimensional structure feature can be formed based on room boundary, room type and Gaussian distribution feature. The four-dimensional structure feature is matched with the codebook to obtain the candidate room shape matched by the four-dimensional structure feature; the candidate room shapes matched by the four-dimensional structure feature are combined to obtain the initial floor plan.

[0048] Step 206, when an editing instruction is detected, the shape is adjusted according to the editing instruction and the initial floor plan to obtain an edited floor plan.

[0049] The editing instruction is an operation instruction for adjusting the room shape. The editing instruction includes but is not limited to operation instructions such as adding, deleting, adjusting size and shape, and each operation instruction can be processed based on the previous operation instruction to adjust the shape through multiple iterations.

[0050] Editing commands can be implemented through move operators, add operators, delete operators, and anchor operators. Among them, the move operator is used to adjust the position or corner points of the room. For example, a bedroom is moved from the top to the lower left corner, which blends well with the layout of the nearby space. Add operator: This operation allows users to add a new room to the floor plan. By selecting the target location and specifying the number of corner points and room type, users can add rooms as needed. For example, adding a bathroom next to a bedroom demonstrates this functionality. The delete operator is used to remove the selected room from the layout, effectively reversing the add operation. The anchor operator means that the user can retain the current position of the room while modifying the surrounding area. For example, the area outside the two balconies and one bedroom remains unchanged, while the area outside the two balconies and one bedroom is regenerated. This adjustment resulted in a change in the shape of the bedroom as well as the living room, dining room, and other surrounding rooms.

[0051] The edited floor plan is the result of the editing instruction. Optionally, the edited floor plan can be directly applied to the initial floor plan, or can be applied to the adjustment result of the initial floor plan. For example, when the initial floor plan is denoised by a diffusion model, a denoised floor plan can be obtained. At this time, the editing instruction is used to process the denoised floor plan to further ensure the processing effect.

[0052] In one example, an interactive system for generating and editing floor plans based on deep learning is used, with a two-level approach: at the whole house level, users define the room outline, room type, and load-bearing wall constraints, and the network generates the overall layout accordingly; at the room level, users can add, delete, resize, and reshape rooms based on the generated layout and iterate multiple times. Specifically, after using Gaussian distribution to construct a room codebook and determining the preparations for multiple network deep neural networks to work together, the room boundaries of the whole house are divided based on a certain neural network model floor plan control constraint to obtain the whole house layout; the whole house layout includes the intersection of wall lines, and the intersection of wall lines is converted into room indexes (tokens), and the relevant attributes are decoded based on the codebook and room indexes to generate the initial floor plan; the initial floor plan supports users to modify the layout interactively in real time, and ensures structural coherence to achieve high-quality, customizable floor plan generation.

[0053] In the above-mentioned floor plan control generation and editing method, the floor plan control constraints and codebook are obtained; the codebook corresponds to the candidate room shapes, so that the generated room meets the expected geometric structure and functional distribution under the floor plan control constraints through the candidate room shapes in the codebook, so that the room shape of the floor plan has an accurate basis; on this basis, the room boundaries of the whole house are first divided according to the floor plan control constraints to obtain the whole house layout, so as to clearly divide the basic features in the whole house and form a feature arrangement at the whole house level, and let the user define key constraints at the whole house level to generate the overall layout; then, according to the whole house layout, the candidate room shapes in the codebook are selected, so as to directionally select the corresponding geometric structure to obtain the initial floor plan, so as to accurately model and generate the indoor space, represent the room as an editable polygon, and use the codebook to realize the accurate modeling and generation of the indoor space, so as to improve the accuracy and diversity of the plane layout, reduce the need for post-processing, so as to improve the accuracy and diversity of the plane layout, and reduce the need for post-processing of editing instructions. When an editing instruction is detected, the shape is adjusted according to the editing instruction and the initial floor plan to obtain the edited floor plan; since the editing instruction is to modify the room shape, it belongs to the room level, thus effectively combining automation and user-driven design to meet the user's personalized needs and actual design intentions. In this way, accurate modeling and generation are achieved while balancing automation and user control.

[0054] In some embodiments, Figure 3 As shown. According to the control constraints of the floor plan, the room boundaries of the whole house are divided to obtain the layout of the whole house, including:

[0055] Step 302: Convert the control constraints of the floor plan into a set of feature points of the whole house according to the signed distance function under the multi-layer perceptron.

[0056] The multi-layer perceptron is a neural network model trained with the whole house layout as the goal; the multi-layer perceptron can extract features of the control constraints of the floor plan based on multiple dimensions in turn, so as to convert the features of the control constraints of the floor plan into a feature point set for the whole house. The multiple dimensions of the multi-layer perceptron are hidden layers, and each hidden layer is used in turn to perform weighted summation of the data under the previous dimension to obtain a weighted result; then based on the activation function, the weighted result is nonlinearly changed to obtain an activation result; this activation result is input into the output layer used to represent the signed distance function for linear change, and the linear change of the output layer is obtained; the linear change result of the output layer is used as the feature point set for the whole house.

[0057] The signed distance function is used to obtain the function of the feature points of the whole house. The signed distance function is set for each room. The signed distance function is used to linearly map the results output by the multi-layer perceptron to obtain the feature points of the whole house with signed distances. The signed distance is used to represent the relative position of each feature point and each room, and then determine the room where each feature point is located.

[0058] The whole house feature point set is a set of feature points with signed distances. The whole house feature point set consists of multiple whole house feature points. The attributes of the whole house feature points at least include the whole house feature point positions and the signed distances of the whole house feature points. The whole house feature point positions are used to determine the positions where geometric primitives need to be added, and the signed distances are used to determine the rooms to which the geometric primitives need to be added.

[0059] Exemplarily, the control constraints of the floor plan are input into a multilayer perceptron to obtain a point matrix output by the multilayer perceptron; the point matrix is ​​substituted into the signed distance function to obtain a vector of signed distances for the Nth room; wherein, a positive signed distance indicates that the feature point of the entire house belongs to the Nth room, and a negative signed distance indicates that the feature point of the entire house belongs to outside the Nth room.

[0060] Step 304, combining the geometric primitives of the whole house according to the whole house feature point set to obtain the room outlines in the whole house; wherein the room outlines in the whole house belong to a type of whole house layout.

[0061] The room outline of the whole house is a polygonal line used to represent the whole house. The polygonal line has certain intersections, which are the corners of the whole house. The room outline of the whole house can accurately reflect the polygonal line, so as to facilitate the data processing of the room level.

[0062] The whole house geometry primitive is a set of geometric lines used to construct the whole house. The whole house geometry primitive includes one or more lines. By combining the whole house feature point set, the boundaries of each room in the whole house can be more accurately divided, thereby forming the room outlines in the whole house.

[0063] Exemplarily, these primitives can be combined into polygons of each room based on the result of a summation operation on the feature point set of the whole house, or based on the result of a minimum pooling operation on the feature point set of the whole house, so as to form the room outlines in the whole house.

[0064] In this embodiment, the control constraint of the floor plan is used as the input data of the multi-layer perceptron model, and the feature extraction is performed through the multi-layer perceptron model, so as to carefully explore the internal connection of the control constraint, so as to form the features under the overall framework. Since the features under the overall framework are output based on the signed distance function, the calculation result of the signed distance function represents the room distance to which each whole-house feature point belongs, so it is helpful to accurately analyze the whole-house feature points used to construct each room, and the whole-house feature points here constitute the whole-house feature point set, so the whole-house feature points are compatible with each room, which helps to more accurately select the whole-house geometric primitives for combination, so that each whole-house geometric primitive is adaptively combined, thereby constructing the room outline in the whole house.

[0065] In some embodiments, the floor plan control constraint includes the number of rooms in the whole house and the whole house boundary, and the whole house boundary represents the whole house area range. The number of rooms in the whole house is the total number of rooms within the whole house boundary, and the whole house boundary is the range within the floor plan. The whole house boundary at least includes the area and overall shape of the whole house area range; the number of rooms in the whole house and the whole house boundary can be selected from preset data. The whole house boundary can also include one or more room boundaries in the whole house, and the room boundary can be a load-bearing wall boundary, or the room boundary can also not be a load-bearing wall boundary.

[0066] According to the signed distance function under the multi-layer perceptron, the control constraints of the floor plan are converted into a set of feature points for the whole house, including: determining the number of feature points for the whole house according to the number of rooms in the whole house; converting the boundary of the whole house into feature point representation parameters of the signed distance function according to the multi-layer perceptron; and determining the feature point set for the whole house according to the feature point representation parameters and the number of feature points for the whole house.

[0067] The number of whole-house feature points is the number of whole-house feature points that need to be represented. Each room corresponds to one or more whole-house feature points; the number of whole-house feature points can be used to control the data granularity of the whole-house feature point set. The more whole-house feature points each room corresponds to, the finer the data granularity, and the more accurate the whole-house feature point set; the fewer whole-house feature points each room corresponds to, the coarser the data granularity, and the higher the processing efficiency of the whole-house feature point set.

[0068] The feature point representation parameters are parameters used to construct the signed distance function, and the corresponding feature points of the whole house can be constructed through the feature point representation parameters. The feature point representation parameters are parameters of the feature point representation function, which are used to adaptively construct the properties of the feature points of the whole house. Exemplarily, the parameters of the feature point representation function are the implicit equation ax + by + c = 0, and the feature point representation parameters include a, b, c, and at least one point coordinate selected by the implicit equation. The signed distance of the point coordinate can be obtained by mapping a, b, c with at least one point coordinate.

[0069] Exemplarily, the floor plan control constraints are information that the user must provide, which include the boundaries of the whole house and the number of each room type. In order to directly capture the outline of each room, it is crucial to obtain a set of corner points within the boundaries of the apartment. Obtaining a variable number of point sets is challenging. Therefore, this problem is solved by predicting lines that can be combined to form the shape of the room. The prediction of the hyperplane parameters, which are the parameters of the feature point representation parameters, is defined by at least one implicit equation ax + by + c = 0, which is a line parameter for p rooms, and the implicit function is selected on a set of n feature point coordinates of the whole house.

[0070] Specifically, the feature code of the whole house boundary is substituted into the multi-layer perceptron MLP to generate an initial matrix corresponding to the feature point representation parameters. The initial matrix is ​​adjusted by a binary matrix used to group the lines into geometric primitives to obtain an adjusted matrix; then, each set of whole house feature point coordinates is combined with the adjusted matrix by multiplication or other methods to form a vector of signed distance for each room. Finally, these primitives are combined into a shape using summation or minimum pooling operations. Through these steps, the lines that best fit the shape of each room can be determined. Once the parameters of these segmentation lines are determined, the intersection of all lines is calculated, which contains the corner points that define each room.

[0071] In this embodiment, the number of feature points of the whole house is determined according to the number of rooms in the whole house, so as to control the data granularity of the feature points of the whole house, and the accuracy of the feature point set of the whole house is controlled by the data granularity. According to the multi-layer perceptron, the boundary of the whole house is converted into the feature point representation parameter of the signed distance function, so as to adjust the feature point representation parameter according to the room adaptability in different spaces, so as to control the corresponding processing process more accurately; finally, according to the number of feature points of the whole house, the feature point representation parameter is used to form each feature point of the whole house, so as to construct the feature point set of the whole house, so as to control the feature points more finely.

[0072] In some embodiments, according to the whole house layout, the candidate room shapes corresponding to the code book are selected to obtain an initial floor plan, including: through a transformer network, the whole house layout is feature transformed to obtain a room prediction value of each room; the whole house of the floor plan contains each room; according to the room prediction value, the candidate room shapes corresponding to the code book are selected to obtain an initial floor plan.

[0073] The Transformer network is a neural network based on the attention mechanism. Through the Transformer network, the features of each image block in the image of the whole house layout can be determined, and each image block feature can be converted into a query and index key of the image block feature with different weights, as well as the value corresponding to the index key. The query represents the focus of attention of each image block feature when performing self-attention calculation, so as to query and determine which other areas the current image block feature should be combined with to capture the long-distance dependencies in the image. Exemplarily, by performing similarity calculation with the index key of other image blocks, the attention weight is obtained according to the calculated similarity; the attention weight represents the long-distance dependencies in the image; according to the attention weight, the value corresponding to the index key is weighted to obtain the room prediction value of each room, so as to dynamically focus on the most relevant area.

[0074] In one example, the layout of the whole house is based on the lines output by the binary boundary partitioning network (BBPNet). In this case, the transformer network can also be called a room network (RoomNet); the lines output by the binary boundary partitioning network (BBPNet) have corner points. In order to use the corner points of the lines output by BBPNet, these corner points are first grouped to create a polygon-based representation. The quality of this grouping is critical to the success of the subsequent generation process; however, it is difficult to achieve high-quality grouping using clustering methods or 3D point cloud instance segmentation techniques. To solve this problem, a transformer network is used to encode the corner points and room type information contained in the whole house layout to obtain room prediction values ​​for each room; the room prediction values ​​for each room are room labels. The decoder then predicts the index and retrieves the value from the codebook. These values ​​are used to sample and generate initial 2D polygons.

[0075] In this embodiment, the whole house layout is encoded through the transformer network, and local features such as corner points can be determined more accurately based on the global information of the whole house layout. Moreover, since the transformer network itself has an encoding function, the room prediction value output by the transformer network can be directly compared with the index in the code book to more efficiently select the candidate room shape.

[0076] In some embodiments, Figure 4 As shown, before the shape adjustment is performed according to the editing instruction and the initial floor plan to obtain the edited floor plan, the method further includes steps 402 to 406; correspondingly, the shape adjustment is performed according to the editing instruction and the initial floor plan to obtain the edited floor plan, including step 408, wherein:

[0077] Step 402, determining room polygon features of the initial floor plan at a target time step.

[0078] The target time step is at least one time step in the back propagation of the diffusion model. In the back propagation process of the diffusion model, the order from the last time step to the first time step is used. At this time, the room polygon feature of the t-th time step is sampled based on the room polygon feature of the (t-1) time step, so the room polygon feature is gradually optimized. In the case where the (t-1) time step is the last time step, the room polygon feature of the (t-1) time step can be the initial floor plan or the feature extracted from the initial floor plan.

[0079] Step 404 , adjusting the noise corresponding to each diffusion element of the target time step according to Gaussian distribution to obtain each adjusted noise.

[0080] The noise corresponding to each diffusion element of the target time step is the noise of the target time step in the back propagation. The noise corresponding to each diffusion element includes the task generation and editing parameters of the denoising network model and the denoising coefficient of the target time step. That is, the noise corresponding to each diffusion element at least includes the combination result of the denoising coefficient of the target time step and the task generation and editing parameters, and the combination result can be in the form of product, accumulation, etc.

[0081] The task generation and editing parameters depend on the image boundary of the i-th diffusion element. The denoising coefficient includes the denoising factor of the target time step and the ratio or other difference between the denoising factors accumulated in the previous time step of the target time step; the denoising factor of the target time step is the predicted value output by the denoising network model, and the denoising factor accumulated in the previous time step is negatively correlated with the diffusion coefficient.

[0082] The adjusted noise is the result of adjusting the Gaussian distribution. The case of adjusting according to the Gaussian distribution means that the noise corresponding to each diffusion element is adjusted based on the noise mean corresponding to each diffusion element and the noise standard deviation. Among them, based on the noise standard deviation, the combination result of the above-mentioned denoising coefficient and the task generation and editing parameters can be nonlinearly adjusted (such as at least one of multiplication and division) to obtain the adjusted first combination result; then based on the noise mean, the adjusted first combination result is linearly adjusted (such as at least one of addition and subtraction) to obtain the adjusted second combination result; the adjusted second combination result is used as each adjusted noise.

[0083] Gaussian distribution is a noise distribution characterized by the characteristic mean and standard deviation at the t-th time step. If the time step before the target time step is the first time step of forward propagation, the noise corresponding to each diffusion element at the first time step is obtained by sampling the initial noise according to the Gaussian distribution. The initial noise is the noise added to the diffusion element at the target time step during the diffusion model training process, so it can also be called element-level initial noise. Since the initial noise may not be the same as the actual noise, it is sampled through high-speed distribution to ensure accuracy.

[0084] Step 406, back propagation is performed based on the feature difference between the room polygon feature at the target time step and each adjusted noise to obtain a denoised floor plan.

[0085] The feature difference is the feature difference or feature ratio between the room polygon feature and each adjusted noise feature in the target time step. In each target time step, the feature difference is gradually reduced to achieve back propagation. The denoised floor plan is the result of multiple back propagation of the diffusion model.

[0086] In the above back propagation, the above feature difference can be scaled based on the scaling factor, and the corresponding parameters of the Gaussian distribution can be linearly combined with the scaling result. The scaling factor is positively correlated with the inverse of the denoising factor of the target time step. The corresponding parameters of the Gaussian distribution include the noise mean, the noise standard deviation, and the combination of the noise standard deviation and the result obtained by random sampling of the standard Gaussian distribution.

[0087] Step 408, according to the editing instruction, the shape of the denoised floor plan is adjusted to obtain an edited floor plan.

[0088] The editing instruction is an operation instruction for adjusting the room shape. The editing instruction includes but is not limited to operation instructions such as adding, deleting, adjusting size and shape, and each operation instruction can be processed based on the previous operation instruction to adjust the shape through multiple iterations.

[0089] The edited floor plan is the result of the editing instruction. In this embodiment, by using the diffusion model to reduce the noise of the initial floor plan, a denoised floor plan can be obtained, and the editing instruction is used to process the denoised floor plan to further ensure the processing effect.

[0090] In this embodiment, in order to gradually perform noise reduction by back propagation, noise reduction is performed time by time step based on the room polygon features of the initial floor plan at the target time step. In this process, the initial noise contained in each diffusion element at the target time step is sampled according to the Gaussian distribution to obtain the noise corresponding to each diffusion element, so as to estimate the noise of each diffusion element through the Gaussian distribution; then, according to the noise coefficient predicted at the target time step, the noise of each diffusion element is adjusted to make each adjusted noise more accurate; finally, back propagation is performed based on the difference between the room polygon features at the target time step and each adjusted noise, so as to gradually reduce the noise, more accurately capture the spatial relationship, and obtain the denoised floor plan; according to the editing instruction, the shape of the denoised floor plan is adjusted to obtain the edited floor plan.

[0091] In some embodiments, the method also includes: adjusting the room shape samples based on the sample differences between the whole-house feature point samples and the room shape samples to obtain the candidate room shapes corresponding to the codebook; the whole-house feature point samples are represented by the room structure samples and the Gaussian distribution features corresponding to the room structure samples; based on the transformer network to be trained, converting the whole-house feature point samples to obtain the room prediction values ​​corresponding to the whole-house feature point samples; based on the room prediction values ​​corresponding to the whole-house feature point samples and the differences between the indexes corresponding to the candidate room shapes, training the transformer network to be trained to obtain the room network model; the room network model is used to determine the initial floor plan.

[0092] The whole house feature point samples are the whole house feature points used to obtain the codebook. The whole house feature point samples can be collected from clear images. The whole house feature point samples are used to represent the room features in the whole house. The room shape samples are pre-determined room shapes. The room shape samples can be the whole house geometric primitives that serve as training samples.

[0093] The room structure sample is a sample of the room structure feature. The room structure sample can be a four-dimensional structure feature. Since the Gaussian distribution feature includes a mean and a variance, the four-dimensional structure feature can be composed based on the room boundary, the room type and the Gaussian distribution feature.

[0094] The transformer network to be trained is a neural network model in training. The transformer network to be trained can be the transformer network mentioned above before training, so as to obtain the room prediction value corresponding to the feature point sample through the attention mechanism. The index corresponding to the candidate room shape can belong to the codebook. The room network model is the transformer network mentioned above after training.

[0095] In the case of using a room network model, according to the whole house layout, the candidate room shape corresponding to the code book is selected to obtain an initial floor plan, including: inputting the whole house layout into the room network model for mapping to obtain a mapping result; according to the index indicated by the mapping result in the code book, the candidate room shape corresponding to the code book is selected to obtain the initial floor plan.

[0096] Exemplarily, the room network model can be called RoomNet; the codebook can be trained based on the K-mean algorithm, and the loss function quantifies the sample difference between each room vector f and the corresponding code vector VQ in the codebook, so that when the sample difference is minimized or other convergence conditions are met, the candidate room shape corresponding to the codebook is obtained, and the codebook is constructed. Next, the cross entropy loss function is used to train RoomNet, and the probability distribution predicted by the model is used as the room prediction value, and the room prediction value is compared with the index corresponding to the candidate room shape. The comparison result is used for training until it is minimized or other convergence conditions are met, and a binary boundary partitioning network model is obtained.

[0097] In this embodiment, on the one hand, based on the sample difference, the room shape samples are optimized to ensure that the candidate room shape can accurately express the actual shape by minimization and other methods. Since the whole house feature point samples are represented by room structure samples and Gaussian distribution features corresponding to the room structure samples, the codebook of the room is constructed using Gaussian distribution, so that the candidate room shape corresponding to the codebook can accurately reflect the indoor space and capture the precise room structure features and layout pattern. On the other hand, based on the room prediction values ​​corresponding to the whole house feature point samples and the difference between the indexes corresponding to the candidate room shapes, the transformer network to be trained is trained, and the transformer network to be trained can be positively guided by the codebook to ensure that the whole house layout is accurately converted into the initial floor plan.

[0098] Based on this, in order to overcome the problems of existing methods in generation performance such as FID score, generation failure probability, generation speed, etc. and quality, the present invention optimizes the generation process through a carefully designed network module, reduces the FID score, reduces the generation failure probability, and improves the generation efficiency, ensuring that the generated floor plan is of better quality and more closely matches the actual layout, and can provide users with high-quality, reasonable and practical floor plan solutions.

[0099] In one embodiment, all the above embodiments are combined to solve multiple technical problems in the field of plane layout generation. In terms of balancing automation and user control, in view of the lack of interactivity, accuracy and design diversity under complex spatial constraints in previous methods, as well as the difficulty in handling complex constraint combinations, random generation results and lack of control, a method for better user participation is proposed, taking into account automation and user-driven design. In terms of accurately capturing spatial relationships, efforts are made to solve the limitations of previous methods that the generated images require a lot of post-processing conversion to vector format and the layout diversity is limited due to the difficulty in accurately capturing, and the room is optimized by representing it as an editable polygon. For specific constraint processing such as load-bearing walls, in view of the shortcomings of existing methods, efforts are made to accurately handle such constraints and provide reliable solutions for architectural design and construction. At the same time, in view of the problems of unsatisfactory generation scores, high risk of generation failure, slow speed, etc. in terms of generation performance and quality of existing methods, the performance and quality of plane layout generation are improved through a unique network module design and overall framework, providing high-quality and reasonable layout.

[0100] Alternatively, for the generation of the whole house layout, the boundary-constrained planar layout design method can be used to treat layout generation as a raster image synthesis task, using models such as variational autoencoders (VAEs) and generative adversarial networks (GANs). For example, ActFloor-GAN considers human activities but has accuracy issues and lacks designer interaction; iPlan simulates the human design process but has limited adaptability; WallPlan focuses on wall prediction functions and can generate high-quality layouts but lacks design diversity; RPLAN and MaskPLAN have made progress in synthesizing layouts and refining elements, but these methods have challenges in accurately capturing spatial relationships, and the generated images require a lot of post-processing to convert into vector format, and the layout diversity is limited.

[0101] Optionally, the generation method of the whole house layout can be implemented based on the plane layout design method of graph constraints. This method mainly uses graph structure generation models such as Graph2Plan, which uses graph neural networks (GNNs) to convert layout diagrams and building boundaries into plane layouts that meet constraints, but the output needs to be post-processed; although the Factor Graph method can encode high-order constraints, it has difficulties in processing complex constraint combinations; HouseDiffusion based on diffusion models and visual transformers can directly generate vectorized plane layouts, but when faced with complex user constraints, the generated layout may lack control, and Cons2Plan enhances flexibility and diversity, but lacks accuracy at the room level. Although these graph constraint methods can capture spatial relationships, they still have their own limitations, and are still far from the precise, controllable and user-friendly plane layout generation goals that this embodiment expects to achieve, providing a reference and comparison basis for the improvement direction of this embodiment.

[0102] The application of floor plan generation technology also faces some challenges and limitations. In view of the above difficulties, the present invention aims to propose a controllable and editable floor plan generation method based on deep learning to achieve the following objectives:

[0103] (1) Accurate modeling and generation: In view of the shortcomings of the existing technology in capturing spatial relationships and representing rooms, the present invention proposes to represent rooms as editable polygons and construct a codebook using Gaussian distribution to achieve accurate modeling and generation of indoor spaces, thereby improving the accuracy and diversity of floor plans and reducing the need for post-processing.

[0104] (2) Balancing automation and user control: In view of the shortcomings of existing methods in balancing automation and user control, the present invention adopts a two-level approach. At the whole-house level, users are allowed to define key constraints and generate an overall layout. At the room level, users are supported to add, delete, resize and reshape rooms, etc., and the process is repeated multiple times until they are satisfied. This effectively combines automation and user-driven design to meet users' personalized needs and actual design intentions.

[0105] (3) Enhanced constraint processing capabilities: Considering the shortcomings of existing technologies in processing specific constraints such as load-bearing walls, the present invention is committed to accurately processing constraints such as load-bearing walls, incorporating them into the design process, improving the structural rationality and reliability of the layout, and making the generated plane layout more in line with building specifications and actual needs.

[0106] (4) Improving generation performance and quality: In order to overcome the problems of existing methods in generation performance such as FID score, generation failure probability, generation speed, etc. and quality, the present invention optimizes the generation process through a carefully designed network module, reduces the FID score, reduces the generation failure probability, and improves the generation efficiency, ensuring that the generated floor plan is of better quality and more closely matches the actual layout, thereby providing users with high-quality, reasonable and practical floor plan solutions.

[0107] like Figure 5 As shown in the figure, the framework takes user-specified apartment boundaries and room constraints as input. The system initially generates room distribution using BBPNet and RoomNet, samples the denoised floor plan (initial polygon) through DenoisingNet, and then refines it through various editing operations. After iterative adjustments, the final floor plan is obtained. It integrates automatic generation and user-driven customization functions based on specific parameters, and its structure spans two design levels: the whole house level and the room level. At the whole house level, the user defines the room outline, room type, and load-bearing wall constraints, and the network generates the overall layout based on this; the whole house layout is Figure 5 The room candidate point set in the room level; at the room level, users can obtain the denoised floor plan based on the room Gaussian distribution, and add, delete, resize and reshape the room based on the generated layout and iterate multiple times. By using Gaussian distribution to build a room codebook, multiple network deep neural networks work together to predict the intersection of wall lines, convert them into room indexes (tokens), decode related attributes and generate initial polygons. At the same time, users are supported to modify the layout interactively in real time and ensure structural coherence to achieve high-quality, customizable floor plan generation.

[0108] Optionally, the step 202 includes codebook construction. Specifically, first, a room embedding codebook is learned from a large number of two-dimensional polygon sets, and each room is quantized into a latent space to obtain the codebook and candidate room shapes corresponding to the codebook, and these candidate room shapes are represented by vectors.

[0109] The above step 202 may refer to the step of initial user input. Specifically, the user starts the process by defining the boundaries of the apartment and setting a series of constraints, including the required number of each type of room (e.g., living room, bedroom, kitchen) and optional constraints (e.g., load-bearing walls). By minimizing the learning cost for users, the system enhances flexibility and provides users with greater freedom in design.

[0110] The above step 204 may refer to a step of generating a floor plan. Specifically, a binary boundary partitioning network (BBPNet) is used to process the layout planning of the apartment level, i.e., the whole house layout; and then a transformer-based network (RoomNet) is used to specify room tags using a predefined codebook to obtain an initial room map.

[0111] Step 206 may refer to floor plan editing. Specifically, the processing of the diffusion model may also be performed based on the above 402-408. Specifically, at the room level, the diffusion model (DenoisingNet) is used to focus on refining the design and positioning of each room. By matching the broader apartment level and the detailed room level constraints, this embodiment ensures that the final design can meet both the overall functional requirements and the personalized preferences.

[0112] In one embodiment, the construction process of the above-mentioned guide network (diffusion network) and codebook is described. In the case of training a room model, it is necessary to learn room embedding. Specifically, a set of elements is considered as a polygonal representation of the floor plan, i.e., the above room shape sample; where each Represents a closed polygon consisting of a series of vertices in clockwise order. This method can accurately and precisely depict the shape of the room and help generate well-structured floor plans.

[0113] (1) GuidanceNet

[0114] The traditional diffusion model considers the elements Arranged into vectors for diffusion and denoising. The problem is that there are many equivalent arrangements of the element set, which makes the denoising process ambiguous because it is unclear which specific arrangement should be used to recover the data. A guidance mechanism is introduced in the forward process to enable the model to distinguish the room representation under various arrangements, thereby learning the characteristic distribution of the room more accurately.

[0115] like Figure 6 As shown, in the forward pass, each element is modified by adjusting the transfer distribution by its mean and standard deviation and showing its role in distinguishing room representations under permutation transformations. The forward pass of the diffusion model involves using the transfer distribution Modify each element (in It's in time Step 1 diffusion elements). This distribution is Add to the mean and multiply the standard deviation by Adjust it and get:

[0116]

[0117] in, is the diffusion coefficient. The generation process of βt is to divide a given range into T parts evenly, and then calculate the variance of a point in each time step. and depending on and time step . Similar derivation can be obtained:

[0118]

[0119]

[0120] in, is the denoising factor accumulated in the forward time step.

[0121] These functions are an integral part of GuidanceNet, which helps to integrate and to distinguish different arrangements of .

[0122] (2) Codebook

[0123] After the forward propagation of the diffusion model is completed, the diffusion model training is completed. Gaussian distribution parameters and , together with the room type and the number of corner points, is then used to construct the above-mentioned four-dimensional structural feature, namely the room vector ;in, Indicates the room type. Indicates the number of corner points.

[0124] Next, calculate The distance between vectors is calculated and specific weights are assigned to them to emphasize the importance of different features, ensuring that the calculated distance can more accurately reflect the actual differences between rooms. With the weighted distance, each room vector is compared with all existing code vectors VQ to determine the closest match, and each room vector is assigned to the area associated with its closest code vector. This iterative process continues until convergence and the codebook construction is completed. The codebook is designed to capture the precise room structure characteristics and layout patterns. By discretizing these parameters into code vectors, the codebook provides guidance during the model generation process to ensure that the generated room meets the expected geometric structure and functional distribution.

[0125] In one embodiment, steps 204 and 206 perform floor plan generation and editing. Specifically, the user experience is optimized by simplifying the required input. The information that the user must provide includes the apartment boundaries and the number of each room type. RGD-Net can generate floor plans based on this, such as Figure 7 As shown, the generation process starts with the apartment boundary and the specified room type and quantity constraints. BBPNet predicts the line structure of each room, while RoomNet processes the candidate points and room types to generate corresponding room tokens. The initial room layout is sampled from this setting and refined by DenoisingNet. This feature distinguishes this embodiment from previous work such as Graph2Plan, which requires users to explicitly specify the connections between rooms to build a graph representation and generate bounding boxes for each room - even though the actual rooms are not all rectangular.

[0126] (1) Binary Boundary Partitioning Network (BBPNet)

[0127] In order to directly capture the outline of each room, it is crucial to obtain a set of corner points within the apartment boundary. Obtaining a variable number of point sets is challenging. Therefore, this problem is solved by predicting lines that can be combined to form the shape of the room. The predicted hyperplane parameters are the line parameters for p rooms defined by the implicit equation ax+by+c=0.

[0128] Specifically, given the feature code of the boundary, a multi-layer perceptron MLP generates a matrix , these implicit functions are in a set of n point coordinates The product of This forms a vector of signed distances for each room, where the i-th distance is negative if the i-th point in h is inside the room and positive if it is outside. is a binary matrix that groups the lines into geometric primitives. Finally, these primitives are combined into a shape using a sum or min pooling operation. Through these steps, the lines that best fit the shape of each room are determined. Once the parameters of these segmentation lines are determined, the intersection points of all lines are calculated. , which contains the corner points that define each room.

[0129] (2) RoomNet

[0130] In order to use BBPNet to obtain the line , these candidate points are first grouped to create a polygon-based representation. The quality of this grouping is crucial to the success of the subsequent generation process. However, high-quality grouping is difficult to achieve using basic algorithms such as clustering methods or 3D point cloud instance segmentation techniques. To address this problem, a transformer network is used to and room type information to generate a room tag. The decoder then predicts the index and reads it from the codebook These values ​​are used to sample and generate the initial 2D polygon .

[0131] (3) Denoising Network

[0132] In each step of the reverse process, a Gaussian distribution is used generate To ensure consistency with the forward process, the KL divergence between the distributions is minimized, and the sampling equation is obtained:

[0133]

[0134] in, Represents the model parameters of DenoisingNet, which is responsible for the generation and editing tasks. Depends only on , where y represents the boundary image. It is sampled from a standard Gaussian distribution; is the noise coefficient of the tth step, that is, the denoising factor of the target time step; ; is the scaling factor.

[0135] The generation process first passes through DenoisingNet using parameters Sampling the initial polygon Then, we filter the element-wise initial noise from a Gaussian distribution Sampling is performed, which is represented by , and perform iterative denoising according to the above equation.

[0136] also, It can be modified by adjusting the number or coordinates of each element, from the distribution Resample to obtain This iterative denoising completes the reverse process, such as Figure 8 DenoisingNet supports multiple editing operations such as move (room position adjustment or corner adjustment), add (add new room), delete (remove room) and anchor (keep the room configuration unchanged when modifying the surrounding environment).

[0137] The loss function used to obtain the above model is as follows:

[0138] a) GuidanceNet loss function

[0139] To ensure effective training, triplet loss is used To quantify and The degree to which it maintains its uniqueness under various permutations. Its formal expression is as follows:

[0140]

[0141] Among them, i and j are the serial numbers of the two samples, t is the serial number of the time step, is the true data point of the i-th sample or the j-th sample, is the denoising result obtained by diffusion processing of the i-th sample or the j-th sample.

[0142] The loss used to train GuidanceNet is given by:

[0143]

[0144] Among them, except In addition, the other parameters are the noise standard deviation, noise mean, and hyperparameters.

[0145] b) Denoising Network Loss Function (DenoisingNet)

[0146] The goal of training the denoising network is to minimize the difference between the predicted noise and the actual noise, which is expressed as follows:

[0147]

[0148] c) Binary Boundary Partitioning Network Loss Function (BBPNet)

[0149] The decoder of BBPNet outputs line parameters and groups the lines. The mask formed by each group of lines is used to supervise the training, aiming to optimize the line parameters. The following equation defines a loss function for evaluating the accuracy of the model in predicting room area and contour area:

[0150]

[0151] in represents the predicted mask for each room, represents the predicted mask inside the entire contour, and are their corresponding true masks respectively.

[0152] d) Room Network Loss Function (RoomNet)

[0153] For learning RoomNet, we first train a codebook, which is described by equation Guide. The loss function The difference between each room vector f and the corresponding code vector VQ in the codebook is quantized.

[0154] For a given set of room vectors f (where p is the number of rooms), the goal is to find the codebook that corresponds to each room vector The closest code vector , ensuring that the codebook vector can more accurately represent the input data. The “closeness” is achieved by minimizing To measure, where c represents each feature dimension, is the weight assigned to this dimension.

[0155]

[0156] Next, we use the cross entropy loss function When training RoomNet, it compares the probability distribution predicted by the model with the true labels (i.e., the actual codebook indices). This comparison enables the model to learn whether each input point corresponds to a room corner, thereby improving its corner identification accuracy. The definition is as follows:

[0157]

[0158] Where p represents the number of rooms, and K=16384 represents the number of code vectors.

[0159] In one embodiment, Fig. 9 Figure 1 shows the resulting floor plans for different configurations and load-bearing wall constraints. An example of the 6 room types in the “default” configuration is provided at the top. The figure demonstrates the adaptability of the network in generating layouts with consistent room configurations, as well as the flexibility to adjust room arrangements within fixed boundaries, highlighting the impact of load-bearing wall constraints. The network autonomously optimizes room layouts while maintaining spatial organization and functionality.

[0160] In one embodiment, Fig.10 As shown, the figure demonstrates that the model of the above embodiment is able to generate floor plans beyond its training dataset.

[0161] It is necessary to understand the influence of the load-bearing wall constraint on the quality index of the floor plan. Even when the load-bearing wall constraint is added, this embodiment can still maintain a strong expression ability, as shown in Table 1. Table 1 is as follows:

[0162] Table 1

[0163]

[0164] The impact of BBPNet on floor plan generation is shown in Table 2. The graph shows the degradation of image quality and the increase in failure rate. Table 2 is as follows:

[0165] Table 2

[0166]

[0167] As shown in Table 3, the FID values ​​of different methods are compared. The results show that regardless of whether the location is included, the present embodiment has a lower FID value than other methods, indicating that the present embodiment has advantages in terms of the quality and diversity of floor plans. Table 3 is as follows:

[0168] Table 3

[0169]

[0170] like Fig.11 As shown in FIG. 1 , a qualitative comparison of floor plan generation is shown. This embodiment shows advantages in generating more reasonable and diverse layouts, as shown in FIG. Fig.11 As shown in column (c) of Fig.11 In contrast, Fig.11 The three rows of graphs in column (a) of Graph2Plan are processed by the model, which generates an unusable space (part of the second row), while Fig.11 The three rows of plots in column (b) are generated by HouseDiffusion (room diffusion model), which fails to obey the boundary constraints.

[0171] In order to prove the technical effect of the present invention, the following description is made by means of feature disassembly. Figure 9-11 , and Tables 1-3:

[0172] (1) Room Constraint Ablation Experiment

[0173] In this design, the user controls the resulting layout by specifying the room type and quantity through two main scenarios:

[0174] Default settings: The user defines the number and type of rooms at the outset. The network then generates several layout options in the default configuration. Note that only results for a living room and dining room, a balcony, a bathroom, and two bedrooms are shown here. Fig. 9 As shown in each row on the left side of the dashed line, the first two rows show how this embodiment creates floor plans with different room layouts, reflecting rich diversity.

[0175] Different configuration inputs: When provided with the same boundaries and different configurations as conditions, the network is able to adaptively meet the generation needs of different room layouts. Fig. 9 Each row in demonstrates this flexibility, showing how bedrooms, bathrooms, and balconies adjust within the boundaries to create an optimal floor plan layout. Balconies are often placed along the exterior of the building to fulfill their function, and all layouts contain a centrally located living room that is connected to other spaces. Each column reveals a different distribution of the same room type and number within different building boundaries. For example, in the sixth column, two bedrooms may be placed next to each other or apart, but always close to the bathroom. In the eighth column, even though the room types are more diverse, the living room still maintains connectivity to other rooms, illustrating the model's ability to maintain spatial layouts even under load-bearing wall constraints.

[0176] (2) Load-bearing wall constraint ablation experiment

[0177] Load-bearing walls are essential for the structural support and weight distribution of buildings. However, current state-of-the-art methods in building design fall short in handling these constraints. This limitation stems from not fully integrating the specific mechanical properties and structural importance of load-bearing walls into their algorithms. Fig. 9 As shown in the last two rows of , this embodiment can accurately handle the load-bearing wall constraint, provide a reliable solution, enhance the reliability of building design and construction, and better meet user needs. As shown in Table 1, compared with the solution without considering this constraint, this embodiment has only a small difference of 0.54.

[0178] (3) Non-axially aligned input ablation experiment

[0179] The dataset used is mainly composed of regular wall layouts, with very few curved walls, which limits the accuracy of the method to a certain extent. Fig.10 It shows that the inclined wall can still effectively constrain the room, and the corner points are closely aligned with the wall.

[0180] (4) Ablation study of network modules

[0181] To verify the rationality of the core design of the network, three ablation studies were conducted on BBPNet, RoomNet and these two components.

[0182] For BBPNet, in Table 2, BBPNet is replaced with the intersection points obtained by directly extending each edge according to the contour shape. This modification leads to an increase of 4.3 points in the FID score, which means that the image quality has deteriorated. In addition, the probability of generation failure has increased by 28.73%, indicating a significant increase in risk. Although this alternative method is able to generate, it greatly increases the possibility of generation failure.

[0183] RoomNet’s multiple solutions. A significant advantage of RoomNet is that it uses codebooks as core elements for sampling and can generate a wide variety of design options. Therefore, RoomNet provides users with a wide range of choices to meet different personalized and diverse architectural design preferences. In contrast, WallPlan

[19] has limited variations and only generates layouts through different boundaries or bubble maps.

[0184] For DenoisingNet, in order to evaluate the generation capability of this embodiment, comparative experiments were conducted with iPLAN, Graph2Plan and HouseDiffusion. To ensure a fair comparison, the input conditions of all methods were kept consistent, and two experimental settings were implemented.

[0185] Setting 1: In the absence of room location information, this example is compared with the iterative loop method used in iPLAN to generate room locations. This experiment aims to evaluate the comprehensive performance of BBPNet and RoomNet, highlighting the difference with iPLAN when room locations are not predefined.

[0186] Setting 2: In this scenario, we include pre-defined room locations and compare DenoisingNet with HouseDiffusion and Graph2Plan, focusing on its Fig.11 It is worth noting that HouseDiffusion lacks boundary elements, which affects its generation ability.

[0187] Table 3 shows that the FID value of this embodiment has a significant advantage. The score of this embodiment is 3 points lower than iPLAN and 1.26 points lower than HouseDiffusion, indicating that there is a significant performance gap. Similarly, compared with Graph2Plan, the FID value of this embodiment is reduced by 0.48 points. It is particularly noteworthy that without the post-processing step of Graph2Plan, the FID value of this embodiment is 21.16 points lower, which highlights the relative performance advantage of this embodiment. The average time to generate 500 floor plans is also compared. This embodiment takes an average of 413 milliseconds per layout - only 13 milliseconds slower than Graph2Plan, but twice as fast as WallPlan, which shows the efficiency of this embodiment in floor plan generation.

[0188] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can 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 to be 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.

[0189] Based on the same inventive concept, the embodiment of the present application also provides a floor plan control generation and editing device for implementing the floor plan control generation and editing method 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 in one or more floor plan control generation and editing device embodiments provided below can refer to the limitations of the floor plan control generation and editing method above, and will not be repeated here.

[0190] In an exemplary embodiment, Fig.12 As shown, a device for controlling, generating and editing a floor plan is provided, comprising:

[0191] A control module 1202, used to obtain floor plan control constraints and codebooks;

[0192] A generation module 1204 is used to divide the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house; according to the layout of the whole house, select the candidate room shapes corresponding to the code book to obtain an initial floor plan;

[0193] The editing module 1206 is used to adjust the shape of the denoised floor plan according to the editing instruction when an editing instruction is detected to obtain an edited floor plan.

[0194] In one embodiment, the control module 1202 is used to:

[0195] According to the signed distance function under the multi-layer perceptron, the control constraints of the floor plan are converted into a set of feature points of the whole house;

[0196] Combining the geometric primitives of the whole house according to the whole house feature point set to obtain the room outlines in the whole house;

[0197] Among them, the room outline in the whole house belongs to a type of the whole house layout.

[0198] In one embodiment, the floor plan control constraint includes the number of rooms in the whole house and the whole house boundary, and the whole house boundary represents the area range of the whole house;

[0199] The control module 1202 is used to:

[0200] Determine the number of feature points in the whole house according to the number of rooms in the whole house;

[0201] According to a multi-layer perceptron, the whole house boundary is converted into characteristic point representation parameters of a signed distance function;

[0202] A whole-house point set is determined according to the feature point representation parameters and the number of the whole-house feature points.

[0203] In one embodiment, the generating module 1204 is used to:

[0204] Through a transformer network, feature transformation is performed on the whole house layout to obtain room prediction values ​​of each room; the whole house of the floor plan contains each room;

[0205] According to the room prediction value, the candidate room shape corresponding to the codebook is selected to obtain an initial floor plan.

[0206] In one embodiment, the editing module 1206 is used to:

[0207] Determine room polygon features of the initial floor plan at a target time step;

[0208] According to Gaussian distribution, the noise corresponding to each diffusion element of the target time step is adjusted to obtain each adjusted noise;

[0209] Perform back propagation according to the feature difference between the room polygon feature at the target time step and each adjusted noise to obtain a denoised floor plan;

[0210] According to the editing instruction, the shape of the denoised floor plan is adjusted to obtain an edited floor plan.

[0211] In one embodiment, the training module corresponding to the device is used to:

[0212] Based on the sample difference between the whole house feature point samples and the room shape samples, the room shape samples are adjusted to obtain the candidate room shape corresponding to the codebook; the whole house feature point samples are represented by room structure samples and Gaussian distribution features corresponding to the room structure samples;

[0213] Converting the whole house feature point samples based on the transformer network to be trained to obtain room prediction values ​​corresponding to the whole house feature point samples;

[0214] Based on the room prediction values ​​corresponding to the whole-house feature point samples and the differences between the indexes corresponding to the candidate room shapes, the transformer network to be trained is trained to obtain a room network model; the room network model is used to determine the initial floor plan.

[0215] Each module in the above-mentioned floor plan control generation and editing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0216] 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. Fig.13 As 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 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 controlling the generation and editing of a floor plan is implemented.

[0217] Those skilled in the art will understand that Fig.13 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.

[0218] 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.

[0219] 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.

[0220] 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.

[0221] 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.

[0222] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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 the present 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.

[0223] 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.

[0224] The above-described 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 controlling, generating and editing a floor plan, characterized in that: The method comprises: Obtain floor plan control constraints and codebook; Dividing the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house; selecting the candidate room shapes corresponding to the code book according to the layout of the whole house to obtain an initial floor plan; When an editing instruction is detected, the shape is adjusted according to the editing instruction and the initial floor plan to obtain an edited floor plan.

2. The method according to claim 1, characterized in that The step of dividing the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house includes: According to the signed distance function under the multi-layer perceptron, the control constraints of the floor plan are converted into a set of feature points of the whole house; Combining the geometric primitives of the whole house according to the whole house feature point set to obtain the room outlines in the whole house; Among them, the room outline in the whole house belongs to a type of the whole house layout.

3. The method according to claim 2, characterized in that The floor plan control constraints include the number of rooms in the whole house and the whole house boundary, and the whole house boundary represents the area range of the whole house; The method of converting the control constraints of the floor plan into a set of feature points of the whole house according to the signed distance function under the multi-layer perceptron includes: Determine the number of feature points in the whole house according to the number of rooms in the whole house; According to a multi-layer perceptron, the whole house boundary is converted into characteristic point representation parameters of a signed distance function; A whole-house point set is determined according to the feature point representation parameters and the number of the whole-house feature points.

4. The method according to claim 1, characterized in that: The step of selecting the candidate room shapes corresponding to the codebook according to the whole house layout to obtain an initial floor plan includes: Through a transformer network, feature transformation is performed on the whole house layout to obtain room prediction values ​​of each room; the whole house of the floor plan contains each room; According to the room prediction value, the candidate room shape corresponding to the codebook is selected to obtain an initial floor plan.

5. The method according to claim 1, characterized in that Before adjusting the shape according to the editing instruction and the initial floor plan to obtain the edited floor plan, the method further includes: Determine room polygon features of the initial floor plan at a target time step; According to Gaussian distribution, the noise corresponding to each diffusion element of the target time step is adjusted to obtain each adjusted noise; Perform back propagation according to the feature difference between the room polygon feature at the target time step and each adjusted noise to obtain a denoised floor plan; The step of adjusting the shape according to the editing instruction and the initial floor plan to obtain an edited floor plan includes: According to the editing instruction, the shape of the denoised floor plan is adjusted to obtain an edited floor plan.

6. The method according to claim 1, characterized in that The method further comprises: Based on the sample difference between the whole house feature point samples and the room shape samples, the room shape samples are adjusted to obtain the candidate room shape corresponding to the codebook; the whole house feature point samples are represented by room structure samples and Gaussian distribution features corresponding to the room structure samples; Converting the whole house feature point samples based on the transformer network to be trained to obtain room prediction values ​​corresponding to the whole house feature point samples; Based on the room prediction values ​​corresponding to the whole-house feature point samples and the differences between the indexes corresponding to the candidate room shapes, the transformer network to be trained is trained to obtain a room network model; the room network model is used to determine the initial floor plan.

7. A device for controlling, generating and editing a floor plan, characterized in that: The device comprises: A control module, used to obtain the control constraints and codebook of the floor plan; A generation module is used to divide the room boundaries of the whole house according to the control constraints of the floor plan to obtain the layout of the whole house; according to the layout of the whole house, select the candidate room shapes corresponding to the code book to obtain an initial floor plan; The editing module is used to adjust the shape of the denoised floor plan according to the editing instruction when an editing instruction is detected to obtain an edited floor plan.

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

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • House type graph generation method and device, computer equipment and storage medium

    CN111598972A

  • Automatic generation method and device of house type layout, computer equipment and storage medium

    CN115115846A

  • Floor plan image generating method and device, computer device and storage medium

    US20220383572A1