Residential apartment layout generation method and system based on supervised learning
By adopting a house layout generation method based on supervised learning in architectural design, and using scoring rules and simulation environments, the problem of data dependence and compatibility is solved, the flexibility and efficiency of house design are improved, and it can adapt to a variety of work processes.
Patent Information
- Application Number
- CN202111656595.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Existing deep learning house type generation models are limited by the limited number of high-quality cases in architectural design, resulting in data dependence problems. They are also difficult to be compatible with commonly used software tools in the architectural design industry, affecting the functional scalability and design efficiency of the model.
Adopting a method based on supervised learning, by establishing a house layout generation model including a generation network, simulation environment and scoring network, using scoring rules to design a loss function to reduce data dependence, and incorporating the simulation environment into the neural network training framework to achieve flexibility in house layouts evaluate.
It reduces the dependence on training data, improves the flexibility and compatibility of house type evaluation, adapts to a variety of workflows, and enhances the functional scalability and design efficiency of the model.
Smart Images

Figure CN114330892B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of architectural design, and in particular to a residential apartment layout generation method and system based on supervised learning. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] Housing is one of the most important types of buildings, accounting for about 68% of the total housing construction in the country, and has an important impact on urban construction. With the development of the economy and the improvement of living standards, people have higher and higher requirements for housing quality, and "house design" has received more and more attention. One of the most important issues in residential design is the "house layout" problem, that is, through reasonable "spatial layout planning", to meet the functional needs of residents and achieve a solid, practical and beautiful effect. House layout design is a process that combines rationality and sensibility. It is not only restricted by objective conditions such as building functions and site conditions, but also affected by the subjective will of the designer. At present, this work mainly relies on the experience of architects and relies on "manual trial and error" to refine the plan.
[0004] In addition, in recent years, the requirements for residential design in various regions have become increasingly stringent, and the space for architects to play has been compressed. In addition, the limitations of architects' personal energy and knowledge accumulation have restricted the efficiency and design effect of residential design to a certain extent. At the same time, with the increase in the number of young homeowners and the advent of the self-media era, residents are more willing to participate in apartment design.
[0005] In the prior art, a method for generating apartment types based on generative adversarial networks has been proposed. This type of method is usually based on the technical route of raster images-convolutional neural networks. By constructing an apartment floor plan dataset, the neural network model is trained to establish a mapping relationship between apartment boundary conditions and apartment layouts. Model training relies on a large amount of case data, but in the architectural design industry, the number of high-quality residential cases that can be collected is limited, so a trade-off needs to be made between the number of cases and the quality, which affects the model training effect to a certain extent. At the same time, the existing models are mostly based on raster images, which are difficult to be compatible with commonly used software tools in the architectural design industry, affecting the functional scalability of the model.
[0006] In addition, the prior art has also proposed a deep reinforcement learning method, which combines deep learning with reinforcement learning, using a neural network as an agent. In the interaction with the environment, the agent continuously updates its own parameters based on the rewards or penalties obtained, so as to better adapt to the environment and output specific actions based on the current state of the input. The theoretical basis of deep reinforcement learning is the Markov decision process, which mainly targets "timing problems" (such as robot walking and automatic driving), that is, the actions performed by the agent have a sequence of actions. For "non-timing problems" (such as spatial planning problems), there is no sequence of actions between the cause and effect of things (the final state can be reached directly from the initial state without going through the intermediate process), so the applicability of deep reinforcement learning in such problems has certain limitations.
[0007] In summary, the supervisory signals for the existing deep learning apartment generation model training are mostly based on "labeled data". In the architectural design industry, the number of high-quality residential cases that can be collected is limited, so a trade-off needs to be made between data quantity and data quality, which affects the model training effect to a certain extent. In addition, the loss function of the current deep learning framework (Pytorch, Tensorflow, etc.) needs to be defined within the framework in a format supported by the framework. The apartment evaluation rules are relatively complex, and it is difficult to define the loss function based on the apartment evaluation rules directly within the deep learning framework, which limits the flexibility and scalability of apartment design evaluation.
[0008] Therefore, there is an urgent need for a housing layout generation scheme that can overcome the above defects, reduce data dependence, and improve the flexibility of housing evaluation. Summary of the invention
[0009] In order to solve the problems existing in the prior art, the present invention proposes a residential apartment layout generation method and system based on supervised learning. The present invention solves the problem of supervised learning based on rules. During the training of the neural network, the supervisory signal comes from a set of scoring rules. The loss function is designed according to the scoring rules. In other words, as long as the output apartment fully meets the scoring rules, it is considered to be a qualified apartment. In this way, the dependence on apartment data can be reduced. At the same time, the problem of incorporating the simulation environment into the neural network training framework is also solved, and the evaluation of the apartment type is realized through the simulation environment, and the neural network training is guided.
[0010] In a first aspect of an embodiment of the present invention, a residential unit layout generation method based on supervised learning is proposed, comprising:
[0011] Establish a model for generating apartment layouts, including a generation network, a simulation environment, and a scoring network;
[0012] Acquire apartment type sample data, input the apartment type sample data into a generation network, and output apartment type layout data;
[0013] According to the apartment sample data, apartment design conditions are obtained, the apartment design conditions and apartment layout data are input into a simulation environment, and the apartment layout is scored;
[0014] According to the evaluation network, the apartment layout data is used as input data, and the scores output by the simulation environment are used as annotations, the evaluation network is trained and the score data is output;
[0015] The scoring data is back-propagated to the generative network, the parameters of the generative network are updated, and the generative network is trained. When the output result of the generative network meets the preset requirements, the training is stopped to obtain a trained apartment layout generation model;
[0016] The apartment design conditions entered by the user are obtained, input into the trained apartment layout generation model, and the apartment layout diagram is output.
[0017] In a second aspect of an embodiment of the present invention, a residential unit layout generation system based on supervised learning is proposed, comprising:
[0018] The model building module is used to build a model for generating apartment layouts, including a generation network, a simulation environment, and a scoring network;
[0019] An example data processing module is used to obtain apartment type example data, input the apartment type example data into a generation network, and output apartment type layout data;
[0020] A scoring module, used to obtain apartment design conditions according to the apartment sample data, input the apartment design conditions and apartment layout data into a simulation environment, and score the apartment layout;
[0021] An evaluation network training module is used to train the evaluation network according to the evaluation network, using the apartment layout data as input data and the scores output by the simulation environment as annotations, and output the score data;
[0022] The back-propagation module is used to back-propagate the rating data to the generating network;
[0023] A generation network training module is used to update generation network parameters, train the generation network, and stop training when the output result of the generation network meets the preset requirements to obtain a trained apartment layout generation model;
[0024] The apartment layout output module is used to obtain the apartment design conditions entered by the user, input them into the trained apartment layout generation model, and output the apartment layout diagram.
[0025] In a third aspect of an embodiment of the present invention, a computer device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a residential unit layout generation method based on supervised learning when executing the computer program.
[0026] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a residential unit layout generation method based on supervised learning is implemented.
[0027] In a fifth aspect of an embodiment of the present invention, a computer program product is proposed. The computer program product includes a computer program. When the computer program is executed by a processor, a residential unit layout generation method based on supervised learning is implemented.
[0028] The residential unit layout generation method and system based on supervised learning proposed in the present invention can reduce the dependence on training data and reduce the impact caused by data quality or quantity. The present invention incorporates the simulation environment into the neural network training framework, which can improve the flexibility of unit evaluation, has stronger compatibility, and can better adapt to various workflows. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 It is a flow chart of a residential apartment layout generation method based on supervised learning according to an embodiment of the present invention.
[0031] Figure 2 It is a relationship diagram of a housing layout generation model according to an embodiment of the present invention.
[0032] Figure 3 It is a schematic diagram of the training process of the apartment layout generation model according to a specific embodiment of the present invention.
[0033] Figure 4 It is a schematic diagram of a flow chart of generating a housing layout according to a specific embodiment of the present invention.
[0034] Figure 5 It is a schematic diagram of the architecture of a residential apartment layout generation system based on supervised learning according to an embodiment of the present invention.
[0035] Figure 6 It is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0037] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0038] According to an embodiment of the present invention, a residential unit layout generation method and system based on supervised learning are proposed, which relates to the field of architectural design technology. The present invention can reduce the dependence on training data and reduce the impact caused by data quality or quantity. The present invention incorporates the simulation environment into the neural network training framework, which can improve the flexibility of unit evaluation, has stronger compatibility, and can better adapt to various workflows.
[0039] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.
[0040] Figure 1 FIG. 1 is a flow chart of a residential unit layout generation method based on supervised learning according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0041] S101, establishing a housing layout generation model, which includes a generation network, a simulation environment, and a scoring network;
[0042] S102, obtaining apartment type sample data, inputting the apartment type sample data into a generation network, and outputting apartment type layout data;
[0043] S103, obtaining apartment design conditions according to the apartment sample data, inputting the apartment design conditions and apartment layout data into a simulation environment, and scoring the apartment layout;
[0044] S104, according to the evaluation network, using the apartment layout data as input data and the scores output by the simulation environment as annotations, training the evaluation network and outputting score data;
[0045] S105, back-propagating the scoring data to the generation network, updating the generation network parameters, training the generation network, and stopping the training when the output result of the generation network meets the preset requirements, thereby obtaining a trained apartment layout generation model;
[0046] S106, obtaining the apartment design conditions input by the user, inputting them into the trained apartment layout generation model, and outputting the apartment layout diagram.
[0047] In the residential apartment layout generation method based on supervised learning proposed by the present invention, the apartment layout generation model mainly includes three parts: a generation network, an evaluation network, and a simulation environment. An apartment layout evaluation rule is constructed in the simulation environment, and any apartment layout can be scored; secondly, the evaluation network is trained by using the simulation environment score as the labeled data to directly score the output result of the generation network; finally, the score output by the evaluation network is used as the supervisory signal of the generation network to train the generation network, so as to output the ideal apartment layout according to certain input conditions. This method draws on the model structure characteristics of the generative adversarial network and the idea of deep reinforcement learning training model based on environmental rewards, and realizes the inclusion of the simulation environment into the neural network training framework. The neural network can be trained according to specific rules (simulation environment scores), which alleviates the dependence on labeled data sets in neural network training.
[0048] In order to explain the above-mentioned residential unit layout generation method based on supervised learning more clearly, each step is described in detail below.
[0049] refer to Figure 2 , which is a relationship diagram of a housing layout generation model according to an embodiment of the present invention.
[0050] The construction method of the simulation environment at least includes:
[0051] 1. Use Python to manually define the scoring rules for outputting apartment layouts; or,
[0052] 2. Use the API interface provided by parametric architectural design software tools (such as Rhino, Revit, etc.) to establish an information interaction channel between the Python unit and the software, use the functional modules provided by the software tools to extract and calculate the generated results, and transmit them back to the Python unit.
[0053] The first method is suitable for relatively simple scoring calculations; the second method is suitable for more complex scoring calculations involving more parameters. The choice of simulation environment construction method can be determined according to the content and complexity of the evaluation function, and can also include other methods.
[0054] In order to calculate and generate network output housing types for quantitative evaluation, the present invention builds a simulation environment to perform 3D modeling of the housing types, extract necessary information and calculate scores.
[0055] In S103 of this embodiment, for the input conditions, the apartment type example data can be decomposed into site range information and target room relationship information to obtain the apartment type design conditions.
[0056] In S104-S105 of this embodiment, the training of the generated network needs to rely on the evaluation network, and the training of the evaluation network needs to rely on the simulation environment.
[0057] The optimization function of the evaluation network is as described in equations (1) to (3):
[0058]
[0059]
[0060] X={M,c,e,w,b} (3)
[0061] in, is the loss value; The evaluation function in the simulation environment is used to score the output apartment layout; is the output value of the evaluation network; M is the target spatial relationship adjacency matrix; I is the target room size interval; X is the input variable, X is the parameter set of boundary c, entrance e, lighting surface w, and adjacent building b; is the output house type information of the neural network, is the parameter set of room coordinate cord and room size size; G(X;θ') is the generative network; θ' is the generative network parameter;
[0062] The evaluation network scores the output apartment layout through the evaluation function in the simulation environment, and subtracts the absolute value from the output result of the evaluation network D as the loss value. The gradient of θ is calculated and the parameters θ are updated according to the gradient.
[0063] The optimization function of the generated network is as described in formula (4):
[0064]
[0065] in, is the loss value; is the output value of the evaluation network; θ' is the generation network parameter;
[0066] Will As the basis for calculating the loss value, the gradient of the generated network G is obtained, and the parameters of the generated network G are updated; when the output result of the evaluation network D tends to 0, the output apartment type tends to meet the preset requirements.
[0067] In S103, the specific calculation method for scoring the apartment layout is:
[0068] Through the evaluation function To evaluate the apartment type, the relationship is as described in formula (5):
[0069]
[0070] in, is the evaluation function; is the room relationship score function; is the room size score function; The boundary filling area score function.
[0071] These three functions represent the three evaluation dimensions of apartment rationality. It indicates the rationality of the spatial relationship between the internal rooms of the house and between the internal rooms and the external environment. It shows the rationality of the size of each room. The purpose is to ensure that the generated results conform to the general rules of urban residential units, for example, the rooms must be closely adjacent to each other, without any gaps, and cannot exceed the boundary range.
[0072] In addition, architectural drawing usually introduces a "modulus", which specifies a minimum size, and the sizes involved in the apartment are all multiples of this minimum size. The building area is divided into grids according to the "modulus", and the size and coordinates of the room are aligned with the grid, converting the output results from continuous variables to discrete variables.
[0073] Specifically, the room relationship score, room size score, and border filling area score are calculated as follows:
[0074] 1. Room Relationship Score:
[0075] The room relation score is calculated according to the room relation score function, as described in equations (6) to (9):
[0076]
[0077] d i,x ,d i,y =f(size i ) (7)
[0078]
[0079]
[0080] in, is the room relationship score function; Output the i-th value of the room adjacency matrix for the neural network; M i is the i-th value of the target adjacency matrix; d i,x , d i,y are the target distances on the x-axis and y-axis between the rooms corresponding to the i-th value in the adjacency matrix of the output result; are the current distances on the x-axis and y-axis between the rooms corresponding to the i-th value in the target adjacency matrix; d module is the size modulus; size i , cord i are the size and coordinates of the i-th room in the output apartment; n is the last value of the adjacency matrix; m is the calculation function of the adjacency matrix of the room in the output apartment of the neural network;
[0081] During the calculation, the adjacency matrix of the model output apartment and the target adjacency matrix are traversed. When the values of the corresponding positions of the two matrices are consistent, the spatial relationship of the corresponding rooms is consistent, and the score is recorded as 0; when the numbers are inconsistent, the distance between the two rooms and the target state is calculated.
[0082] Among them, d i,x d i,y , They are calculated by the built-in functions of the simulation environment.
[0083] 2. Room size score:
[0084] In order to ensure the reasonable function of the room type, the room size of the output apartment type must meet certain requirements. For this, the room size score can be calculated according to the room size score function, as described in formula (10):
[0085]
[0086] in, is the room size score function; I i is the target size interval of the i-th room; I i,min , I i,max are the minimum and maximum values of the target size interval of the i-th room respectively; N is the last room;
[0087] If the output room size meets the target size range, the score is recorded as 0, otherwise it is the distance between the current size and the target size range.
[0088] 3. Boundary filling area score:
[0089] In order to ensure that the room does not exceed the boundary and there are no gaps inside the apartment, it is necessary to calculate the room area that exceeds the boundary and the remaining area inside the boundary that is not filled, and score based on the sum of the excess area and the remaining area.
[0090] Specifically, the boundary filling area score is calculated according to the boundary filling area score function, as described in formula (11):
[0091]
[0092] in, is the boundary filling area score function; A b is the boundary area; A is the area function; is the calculation function of the part of the i-th room within the building range; is the calculation function of the part of the i-th room outside the building;
[0093] Take the union of the parts of all rooms outside the building scope and calculate the excess area; take the union of the parts of all rooms within the building scope and calculate the remaining area that is not fully filled within the boundary, and convert the score based on the sum of the excess area and the remaining area.
[0094] After the above training process, a trained apartment layout generation model can be obtained; according to the apartment design conditions entered by the user, they are input into the trained apartment layout generation model to output the apartment layout diagram.
[0095] It should be noted that, although the operations of the method of the present invention are described in a specific order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0096] In order to explain the above residential unit layout generation method based on supervised learning more clearly, a specific embodiment is used for illustration below.
[0097] refer to Figure 3 , is a schematic diagram of the training process of the apartment layout generation model according to a specific embodiment of the present invention. Figure 3 As shown, the ideal apartment example 10 can be decomposed into a site range 20 and a target room relationship 30, and these two factors together constitute the basic design conditions of an apartment.
[0098] The site range 20 and the target room relationship 30 are input into the generation network 40, and the apartment layout 50 can be output.
[0099] In order to evaluate the apartment layout 50, the site range 20, the target room relationship 30 and the apartment layout 50 need to be simultaneously input into the simulation environment 60. The simulation environment 60 scores whether the apartment layout 50 meets the conditions of the site range 20 and the target room relationship 30, and the scoring content mainly includes three aspects: room relationship score, room size score, and boundary filling area score.
[0100] However, since the simulation environment 60 exists independently of the generation network 40, the calculation graph of the generation network 40 will be interrupted before the data is passed into the simulation environment 60, so that the output score of the simulation environment 60 cannot be directly back-propagated back to the generation network 40. In this regard, it is necessary to introduce the evaluation network 70 to fit the function of the simulation environment 60, that is, by taking the output apartment layout 50 as input data and the output score of the simulation environment 60 as annotation data, the evaluation network 70 is trained to directly output the score of the apartment layout 50 instead of the simulation environment. Since the evaluation network 70 and the generation network 40 are both neural networks, the score output by the evaluation network 70 can be back-propagated back to the generation network 40 without interrupting the calculation graph of the generation network 40, so that the parameters of the generation network 40 can be updated.
[0101] The training generation network 40 makes its output result approach the condition requirement of the site range 20 and the target room relationship 30 continuously, so as to obtain the ideal result; after the training is completed, the trained apartment layout generation model is obtained.
[0102] Combination Figure 4 , is a flow chart of generating a house layout according to a specific embodiment of the present invention. Figure 4 As shown, based on the trained apartment layout generation model, the design prerequisites such as the boundary range 21 and the room space relationship 31 can be used as input content, input into the apartment layout generation model 80, and the apartment layout 90 corresponding to the conditions can be output.
[0103] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 5 A residential unit layout generation system based on supervised learning according to an exemplary embodiment of the present invention is introduced.
[0104] The implementation of the residential unit layout generation system based on supervised learning can refer to the implementation of the above method, and the repetitions will not be repeated. The terms "module" or "unit" used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0105] Based on the same inventive concept, the present invention also proposes a residential unit layout generation system based on supervised learning, such as Figure 5 As shown, the system includes:
[0106] Model building module 510, used to build a housing layout generation model, including a generation network, a simulation environment and a scoring network;
[0107] The sample data processing module 520 is used to obtain sample apartment data, input the sample apartment data into the generation network, and output apartment layout data;
[0108] A scoring module 530 is used to obtain apartment design conditions according to the apartment sample data, input the apartment design conditions and apartment layout data into a simulation environment, and score the apartment layout;
[0109] An evaluation network training module 540 is used to train the evaluation network according to the evaluation network, using the apartment layout data as input data and the scores output by the simulation environment as annotations, and output the score data;
[0110] A back propagation module 550, for back propagating the scoring data to the generating network;
[0111] A generation network training module 560 is used to update generation network parameters, train the generation network, and stop training when the output result of the generation network meets the preset requirements to obtain a trained apartment layout generation model;
[0112] The apartment layout output module 570 is used to obtain the apartment design conditions entered by the user, input them into the trained apartment layout generation model, and output the apartment layout diagram.
[0113] It should be noted that although several modules of the residential unit layout generation system based on supervised learning are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be concretized in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be concretized.
[0114] Based on the above invention concept, Figure 6 As shown, the present invention also proposes a computer device 600, including a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and executable on the processor 620, wherein the processor 620 implements the aforementioned residential unit layout generation method based on supervised learning when executing the computer program 630.
[0115] Based on the aforementioned inventive concept, the present invention proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the aforementioned residential unit layout generation method based on supervised learning is implemented.
[0116] Based on the aforementioned inventive concept, the present invention proposes a computer program product, which includes a computer program, and when the computer program is executed by a processor, a residential unit layout generation method based on supervised learning is implemented.
[0117] 1. The supervised learning based on scoring rules of the present invention can reduce the dependence on training data. Unlike the previous deep learning apartment generation model training, where the supervisory signals are mostly based on "labeled data", the model proposed in the present invention uses a set of scoring rules to train the neural network. This method has at least the following advantages:
[0118] (1) Reduce the impact of data quality: Since generative adversarial networks or supervised learning need to rely on existing case data for training, and there is a problem of uneven quality of housing types on the market, it is necessary to make a trade-off between data quantity and data quality, which in turn affects the model training effect. The supervised learning framework based on scoring rules relies on the "scoring rules" rather than labeled data as the supervision signal, which can reduce the impact of case data quality.
[0119] (2) Reduce the impact of data quantity: Use the "scoring rules" as the source of supervision signals so that any input condition has a corresponding score. Based on this feature, the input data can be appropriately changed based on the collected case characteristics, and the amount of input data can be artificially expanded to reduce dependence on the amount of data.
[0120] (3) Greater flexibility: Since the “scoring rules” are set manually, the rules can be adjusted accordingly when facing different projects or needs, which also makes the model more flexible and applicable.
[0121] 2. The present invention incorporates the simulation environment into the neural network training framework, which can improve the flexibility of the housing type evaluation. The present invention solves the problem of incorporating the simulation environment into the neural network training framework, realizes the evaluation of the housing type through the simulation environment, and guides the neural network training. The technical route based on vector graphics has two advantages:
[0122] (1) Stronger compatibility: 3D modeling software tools commonly used in the architectural design industry can be incorporated into the house model generation system. These software support vector data, have API interfaces, and have a rich plug-in library (such as lighting simulation, ventilation simulation, energy consumption simulation, carbon emission calculation, etc.). The inclusion of these software means that more factors affecting the design can be integrated into the generation calculation, and the generation results can be analyzed more deeply, and the model has better 3D modeling capabilities and visualization functions.
[0123] (2) Better adaptability to workflow: Since these 3D modeling software are commonly used design tools by architects, incorporating them can make the generated models better conform to the working habits of architects, thereby better embedding the apartment generation model into the existing workflow of the architectural design unit.
[0124] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0125] The present invention is described with reference to flowcharts and / or block diagrams of methods and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0128] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A residential unit layout generation method based on supervised learning, characterized in that: include: Establish a housing layout generation model, which includes a generation network, a simulation environment, and an evaluation network; Acquire apartment type sample data, input the apartment type sample data into a generation network, and output apartment type layout data; According to the apartment sample data, apartment design conditions are obtained, the apartment design conditions and apartment layout data are input into a simulation environment, and the apartment layout is scored; According to the evaluation network, the apartment layout data is used as input data, and the scores output by the simulation environment are used as annotations, the evaluation network is trained and the score data is output; The scoring data is back-propagated to the generative network, the parameters of the generative network are updated, and the generative network is trained. When the output result of the generative network meets the preset requirements, the training is stopped to obtain a trained apartment layout generation model; Obtain the apartment design conditions entered by the user, input them into the trained apartment layout generation model, and output the apartment layout diagram; According to the evaluation network, the apartment layout data is used as input data, the score output by the simulation environment is used as a label, the evaluation network is trained and the score data is output, including: The optimization function of the evaluation network is as described in equations (1) to (3): in, is the loss value; The evaluation function in the simulation environment is used to score the output apartment layout; is the output value of the evaluation network; M is the target spatial relationship adjacency matrix; I is the target room size interval; X is the input variable, X is the parameter set of boundary c, entrance e, lighting surface w, and adjacent building b; is the output house type information of the neural network, is the parameter set of room coordinate cord and room size size; G(X;θ') is the generative network; θ' is the generative network parameter; The evaluation network scores the output apartment layout through the evaluation function in the simulation environment, and subtracts the absolute value from the output result of the evaluation network D as the loss value. The gradient of θ is calculated and the parameters θ are updated according to the gradient.
2. The method according to claim 1, characterized in that According to the apartment type sample data, apartment type design conditions are obtained, including: The apartment type sample data is decomposed into site range information and target room relationship information to obtain the apartment type design conditions.
3. The method according to claim 1, characterized in that: The construction method of the simulation environment includes: Use Python to manually define the scoring rules for outputting apartment layouts; or, By using the API interface provided by the parametric architectural design software tool, an information interaction channel is established between the Python unit and the software. The functional modules provided by the software tool are used to extract and calculate the generated results and transmit them back to the Python unit.
4. The method according to claim 1, characterized in that The scoring data is back-propagated to the generative network, the parameters of the generative network are updated, and the generative network is trained. When the output result of the generative network meets the preset requirements, the training is stopped to obtain the trained apartment layout generation model, including: The optimization function of the generated network is as described in formula (4): in, is the loss value; is the output value of the evaluation network; θ' is the generation network parameter; Will As the basis for calculating the loss value, the gradient of the generated network G is obtained, and the parameters of the generated network G are updated; when the output result of the evaluation network D tends to 0, the output apartment type tends to meet the preset requirements.
5. The method according to claim 3, characterized in that: According to the apartment sample data, apartment design conditions are obtained, the apartment design conditions and apartment layout data are input into a simulation environment, and the apartment layout is scored, including: Through the evaluation function To evaluate the apartment type, the relationship is as described in formula (5): in, is the evaluation function; is the room relationship score function; is the room size score function; The boundary filling area score function.
6. The method according to claim 5, characterized in that include: The room relation score is calculated according to the room relation score function, as described in equations (6) to (9): d i,x ,d i,y =f(size i ) (7) in, is the room relationship score function; Output the i-th value of the room adjacency matrix for the neural network; M i is the i-th value of the target adjacency matrix; d i,x , d i,y are the target distances on the x-axis and y-axis between the rooms corresponding to the i-th value in the adjacency matrix of the output result; are the current distances on the x-axis and y-axis between the rooms corresponding to the i-th value in the target adjacency matrix; d module is the size modulus; size i , cord i are the size and coordinates of the i-th room in the output apartment; n is the last value of the adjacency matrix; m is the calculation function of the adjacency matrix of the room in the output apartment of the neural network; During the calculation, the adjacency matrix of the model output apartment and the target adjacency matrix are traversed. When the values of the corresponding positions of the two matrices are consistent, the spatial relationship of the corresponding rooms is consistent, and the score is recorded as 0; when the numbers are inconsistent, the distance between the two rooms and the target state is calculated.
7. The method according to claim 5, characterized in that include: The room size score is calculated according to the room size score function, as described in formula (10): in, is the room size score function; I i is the target size interval of the i-th room; I i,min , I i,max are the minimum and maximum values of the target size interval of the i-th room respectively; N is the last room; If the output room size meets the target size range, the score is recorded as 0, otherwise it is the distance between the current size and the target size range.
8. The method according to claim 5, characterized in that include: The boundary filling area score is calculated according to the boundary filling area score function, as described in formula (11): in, is the boundary filling area score function; A b is the boundary area; A is the area function; is the calculation function of the part of the i-th room within the building range; is the calculation function of the part of the i-th room outside the building; Take the union of the parts of all rooms outside the building scope and calculate the excess area; take the union of the parts of all rooms within the building scope and calculate the remaining area that is not fully filled within the boundary, and convert the score based on the sum of the excess area and the remaining area.
9. A residential unit layout generation system based on supervised learning, characterized in that: include: The model building module is used to build a model for generating apartment layouts, including a generation network, a simulation environment, and an evaluation network; An example data processing module is used to obtain apartment type example data, input the apartment type example data into a generation network, and output apartment type layout data; A scoring module, used to obtain apartment design conditions according to the apartment sample data, input the apartment design conditions and apartment layout data into a simulation environment, and score the apartment layout; An evaluation network training module is used to train the evaluation network according to the evaluation network, using the apartment layout data as input data and the scores output by the simulation environment as annotations, and output the score data; The back-propagation module is used to back-propagate the scoring data to the generating network; A generation network training module is used to update generation network parameters, train the generation network, and stop training when the output result of the generation network meets the preset requirements to obtain a trained apartment layout generation model; The apartment layout output module is used to obtain the apartment design conditions entered by the user, input them into the trained apartment layout generation model, and output the apartment layout diagram; Wherein, the evaluation network training module is specifically used for: The optimization function of the evaluation network is as described in equations (1) to (3): X={M,c,e,w,b} (3) in, is the loss value; The evaluation function in the simulation environment is used to score the output apartment layout; is the output value of the evaluation network; M is the target spatial relationship adjacency matrix; I is the target room size interval; X is the input variable, X is the parameter set of boundary c, entrance e, lighting surface w, and adjacent building b; is the output house type information of the neural network, is the parameter set of room coordinate cord and room size size; G(X;θ') is the generative network; θ' is the generative network parameter; The evaluation network scores the output apartment layout through the evaluation function in the simulation environment, and subtracts the absolute value from the output result of the evaluation network D as the loss value. The gradient of θ is calculated and the parameters θ are updated according to the gradient.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
