# Research on the Generation and Design Method of Residential Community Scheme Based on Improving Design

Authors: Chunyu Li; Lei Wang
Journal: Scientific Programming
 (2021)

---

## Abstract

Along with the urban renewal and development, the urban living environment has given rise to various problems that need to be solved. With an eye on the future development model of residential communities, an experimental preliminary design for the construction of architectural space, public space, and landscape space based on people’s actual needs is carried out in an attempt to alleviate the more urgent symbiotic relationship between people and urban environment. To this end, this paper proposes a planning and design generation framework for the constructed external spatial environment of building groups based on a recursive double-adversarial network model. Firstly, we extract the features of the constructed external spatial environment of the building group in depth and generate the expression feature map, which is used as a supervisory signal to generate an expression seed image of the constructed external spatial environment of the building group; then we use the generated seed image together with the constructed external spatial environment of the original target building group as the input to generate a feature-holding image as the output of the current frame, and the feature-holding image is also used as the input for the next. Finally, the seed image generation network and the feature-holding image generation network are recursively used to generate the next frame, and the video sequence of the expressions of the constructed external spatial environment of the building group with the same feature-holding expressions as the original input is recursively obtained several times. The experimental results on the building group database show that the proposed method can generate clear and natural video frames of the constructed external spatial environment of the building group, which can be gradually derived from the design of building units to the construction of the building group and penetrate into the planning and design of the external spatial environment in order to comprehensively improve the living environment of urban population and provide a design method and theoretical support for the design of future urban residential communities.


---

## Body

## 1. Introduction

At present, along with the rapid development of the global economy and the leapfrogging take-off of China’s economy, the overall social environment is also facing various problems such as economic, environmental, and urbanization. On the economic front, prices are rising; housing prices are still high; employment pressure is high; and various resources are becoming increasingly scarce due to various uncertainties. On the environmental side, the negative effects of climate and environmental pollution continue [1]; on the urbanization side, the rapid development of cities and population expansion have become the norm, which also leads to the lack of management resources, social conflicts, urban environmental degradation, and other serious problems [2]. There are four major problems in urban development as follows.The tendency for higher demand for living areas: people have continued to pursue new housing in all periods of social development. Although the living area and per capita area of urban households have increased, the average housing area of typical urban households continues to be lower than the national urban average, and the gap has widened [3]. As the urban household population continues to increase, urban housing tends to develop more and more highly.Continuous expansion of urban form: the first level of urban areas is the distribution of town clusters in the macroregion; the second level is the external spatial form of the city, that is, the plan form and facade form of the city; and the third level is the zoning form within the city [4]. As the urban form continues to expand, the scope of the “urban fringe” area continues to expand.Traffic congestion and environmental pollution in cities: with the increasing number of cars and population in cities, the problems arising from traffic in cities are becoming more and more prominent. In many cities today, the excessive number of cars often leads to traffic jam, frequent traffic accidents, and atmospheric pollution [5]. Traffic problems have brought a serious impact on the socioeconomic development of cities.Continued high urban energy consumption: China’s urban energy consumption is exploding, and China’s electric energy mainly comes from coal-based thermal power, thus causing a surge in CO2 emissions. In the face of the above-mentioned situations, the expansion of urban areas cannot solve the fundamental problems, and a good urban development cycle requires targeted spatial construction solutions and attempts [6]. Along with the urban renewal and development, the urban living environment has given rise to various problems that need to be solved. Focusing on the future development mode of residential communities, we try to alleviate the urgent symbiotic relationship between people and the urban environment by conducting experimental preliminary design for the construction of architectural space, public space, and landscape space based on the actual needs of people. To this end, this paper proposes a planning and design generation framework for the constructed external spatial environment of building groups based on a recursive double-adversarial network model. Firstly, we extract the features of the constructed external spatial environment of the building group in depth and generate the expression feature map, which is used as a supervisory signal to generate an expression seed image of the constructed external spatial environment of the building group; then we use the generated seed image together with the constructed external spatial environment of the original target building group as the input to generate a feature-holding image as the output of the current frame, and the feature-holding image is also used as the input for the next. Finally, the seed image generation network and the feature-holding image generation network are recursively used to generate the next frame, and the video sequence of the expressions of the constructed external spatial environment of the building group with the same feature-holding expressions as the original input is recursively obtained several times [7]. The experimental results on the building group database show that the proposed method can generate clear and natural video frames of the constructed external spatial environment of the building group, which can be gradually derived from the design of building units to the construction of the building group and penetrate into the planning and design of the external spatial environment in order to comprehensively improve the living environment of urban population and provide a design method and theoretical support for the design of future urban residential communities [8].


## 2. Possible Ways of Constructing the Architectural Space Form of Future Residential Communities

### 2.1. Functional Requirements for the Construction of Architectural Forms

At this stage, the structure of urban buildings is basically frame type; however, the existing environment, area restrictions, traffic requirements, energy-saving, functional changes, style outlook and people’s lifestyles, the future building energy system, integrated cleaning system, green ecological system, media interface system, air system, lifestyle, and other systems need to have an overall comprehensive consideration [9].Dutch architect Rem Koolhaas has made it clear that the global economic crisis will lead to a decrease in showy buildings and an increase in buildings that are more “socially responsible” and better serve the public. In the current economic downturn, architectural design is placing more emphasis on space utilization. Therefore, the future structure and form of buildings will pay more attention to ecology and environmental protection, focusing on the construction of a small ecological environment. Innovative new materials are used to build units, and different forms of construction styles are tried [10]. The space formed between different shaped units will be used for greening, which can greatly save the land on the one hand and form a good integrated microcirculation system on the other hand and finally make the whole building form a unique ecological group [11].


### 2.2. The Generation of Architectural Space: From Unitary to Group Structure

It is a source of ideas in today’s architectural space design to form new forms of architectural space by continuously repeating and combining unitary buildings. The process of constructing a group of units is similar to building a box, and the form of the building constructed in this way is similar to children’s building blocks. The space formed between the different shaped units can be used for landscaping, and the whole building can thus form an independent ecological cluster [12]. The design structure of this building unit can meet the functional needs of the occupants on the one hand and increase the green space on the other.Nowadays, if you need 3 acres of land to build a community, you may have to set aside 1 acre for green space and public space, while in the future, this modular building will form more public space between its units, which will not only save land resources but also increase the area of greenery and make it dispersed in the building system [13].


### 2.3. Generation and Design Evolution of Architectural Units

In this experimental construction, the initial single building consists of two overlapping square boxes, with the upper box picking out a part and its common part running through the two upper and lower spaces, and then the single building is continuously stacked and combined to form a group structure and finally form a group of buildings, that is, the whole building, as shown in Figure1 [14].Figure 1
Generation and design evolution of building units.


### 2.4. Generation of Building Plan Layout

The whole building plan was linear in the predesign period and evolved into art for the sake of light and visual needs. The curved plan layout makes the building more vivid. Each building has 96° of curvature; each floor has 12 unit buildings; the whole building has 96 degrees of curvature; each group of unit buildings has 8° of curvature; and 96 divided by 12 is exactly equal to 8, thus forming the final initial plane of the single building, as shown in Figure2. The three circles in the middle are the public space, and the two buildings are interconnected through this group of public spaces [15].Figure 2
Generation of building plan layout.


### 2.5. Design Analysis of Building Unit A

Building unit A (see Figure3) has single floors 1-8 in a curved block consisting of 12 individual units combined and each with a driveway of 7 meters in width. Two elevator shafts are provided for easy access to the floors. The second floor of each house is a living room, bathroom, kitchen, and so on, and the second floor is mainly a study and bedroom [16]. The composition of the double-layer structure of 1–8 floors in the designed building is the same as the composition of the single-layer structure of 1–8 floors, but with the opposite house type; each house also has a driveway with a width of 7 meters and an elevator shaft, but the difference from the single story is that the double story has an extended balcony. The living room, bathroom, and kitchen are on the second floor of each house, and the study and bedroom are on the second floor, as shown in Figure 4. Building A’s 9-25 single floors are the same as 1-8 single floors in terms of layout and composition, but the biggest difference is that there is no driveway on 9-25 single floors, but there are still two separate automatic elevator passages and corridors, as shown in Figure 5.Figure 3
Structure of networkφ1 (GAN) generator for initial generation.Figure 4
Building A rendering.Figure 5
Building B flow analysis diagram.


### 2.6. Design Analysis of Building Unit B

Building B is also curved, as opposed to building A, which is more youthful and dynamic, as shown in Figure5. The curved form of the building is more convenient to dye and so on. The traffic problem has brought a serious impact on the socioeconomic development of the city [17].


### 2.7. Continued Climb in Urban Energy Consumption

Energy consumption in China’s cities is currently exploding, and the fact that China’s electricity is mainly generated by coal-based thermal power has led to a surge in CO2 emissions. In the face of the above-mentioned situation, the expansion of urban areas cannot solve the fundamental problems, and a good urban development cycle requires targeted spatial construction solutions and attempts [18].


## 2.1. Functional Requirements for the Construction of Architectural Forms

At this stage, the structure of urban buildings is basically frame type; however, the existing environment, area restrictions, traffic requirements, energy-saving, functional changes, style outlook and people’s lifestyles, the future building energy system, integrated cleaning system, green ecological system, media interface system, air system, lifestyle, and other systems need to have an overall comprehensive consideration [9].Dutch architect Rem Koolhaas has made it clear that the global economic crisis will lead to a decrease in showy buildings and an increase in buildings that are more “socially responsible” and better serve the public. In the current economic downturn, architectural design is placing more emphasis on space utilization. Therefore, the future structure and form of buildings will pay more attention to ecology and environmental protection, focusing on the construction of a small ecological environment. Innovative new materials are used to build units, and different forms of construction styles are tried [10]. The space formed between different shaped units will be used for greening, which can greatly save the land on the one hand and form a good integrated microcirculation system on the other hand and finally make the whole building form a unique ecological group [11].


## 2.2. The Generation of Architectural Space: From Unitary to Group Structure

It is a source of ideas in today’s architectural space design to form new forms of architectural space by continuously repeating and combining unitary buildings. The process of constructing a group of units is similar to building a box, and the form of the building constructed in this way is similar to children’s building blocks. The space formed between the different shaped units can be used for landscaping, and the whole building can thus form an independent ecological cluster [12]. The design structure of this building unit can meet the functional needs of the occupants on the one hand and increase the green space on the other.Nowadays, if you need 3 acres of land to build a community, you may have to set aside 1 acre for green space and public space, while in the future, this modular building will form more public space between its units, which will not only save land resources but also increase the area of greenery and make it dispersed in the building system [13].


## 2.3. Generation and Design Evolution of Architectural Units

In this experimental construction, the initial single building consists of two overlapping square boxes, with the upper box picking out a part and its common part running through the two upper and lower spaces, and then the single building is continuously stacked and combined to form a group structure and finally form a group of buildings, that is, the whole building, as shown in Figure1 [14].Figure 1
Generation and design evolution of building units.


## 2.4. Generation of Building Plan Layout

The whole building plan was linear in the predesign period and evolved into art for the sake of light and visual needs. The curved plan layout makes the building more vivid. Each building has 96° of curvature; each floor has 12 unit buildings; the whole building has 96 degrees of curvature; each group of unit buildings has 8° of curvature; and 96 divided by 12 is exactly equal to 8, thus forming the final initial plane of the single building, as shown in Figure2. The three circles in the middle are the public space, and the two buildings are interconnected through this group of public spaces [15].Figure 2
Generation of building plan layout.


## 2.5. Design Analysis of Building Unit A

Building unit A (see Figure3) has single floors 1-8 in a curved block consisting of 12 individual units combined and each with a driveway of 7 meters in width. Two elevator shafts are provided for easy access to the floors. The second floor of each house is a living room, bathroom, kitchen, and so on, and the second floor is mainly a study and bedroom [16]. The composition of the double-layer structure of 1–8 floors in the designed building is the same as the composition of the single-layer structure of 1–8 floors, but with the opposite house type; each house also has a driveway with a width of 7 meters and an elevator shaft, but the difference from the single story is that the double story has an extended balcony. The living room, bathroom, and kitchen are on the second floor of each house, and the study and bedroom are on the second floor, as shown in Figure 4. Building A’s 9-25 single floors are the same as 1-8 single floors in terms of layout and composition, but the biggest difference is that there is no driveway on 9-25 single floors, but there are still two separate automatic elevator passages and corridors, as shown in Figure 5.Figure 3
Structure of networkφ1 (GAN) generator for initial generation.Figure 4
Building A rendering.Figure 5
Building B flow analysis diagram.


## 2.6. Design Analysis of Building Unit B

Building B is also curved, as opposed to building A, which is more youthful and dynamic, as shown in Figure5. The curved form of the building is more convenient to dye and so on. The traffic problem has brought a serious impact on the socioeconomic development of the city [17].


## 2.7. Continued Climb in Urban Energy Consumption

Energy consumption in China’s cities is currently exploding, and the fact that China’s electricity is mainly generated by coal-based thermal power has led to a surge in CO2 emissions. In the face of the above-mentioned situation, the expansion of urban areas cannot solve the fundamental problems, and a good urban development cycle requires targeted spatial construction solutions and attempts [18].


## 3. Dual Network Model

The key idea of the method in this paper is to construct a double-adversarial network structure model for recursively generating the constructed external spatial environment of building groups by using a constructed external spatial environment generator for building groups focusing on expression features and a constructed external spatial environment generator for building groups focusing on features such as texture features and image light and dark details and to connect the two networks in series to form a recursive model [19]. The structure is recursive, and the U-net-like jump connection is added to the model, which can effectively maintain the texture information of the underlying image in the image generation, and is used to synthesize fine expressions of the constructed external spatial environment of the building group. In expression video generation, the conventional algorithm uses a separate image for all expression synthesis, which is not conducive to the continuous maintenance of the generated video frames. It is to be noted that the changes in the expressions of the built external spatial environment of the building group in the video frames are often reversible and small, using the image generated in the previous frame as the input for the next frame can generate the same quality of images using a smaller model and effectively reduce the number of model parameters [20].


### 3.1. Dual Network Model

Our proposed dual network model consists of two deep learning-based generative adversarial networks, including a networkφ1 (FaceGAN) for seed image generation and a network φ2 (FineGAN) for generating feature-preserving images, and the two networks are connected in series to form a dual network model.


### 3.2. Model Architecture

For the constructed external spatial environment image S of the target building group and the expression feature image B, nonreciprocal codecs are used for the two images since they provide different information, where the constructed external spatial environment feature image B of the building group is used as supervisory information in the generation of seed imageO11 to generate the seed image corresponding to the expression feature, while the original target image S provides texture and other image detail features in the generation of the seed image and the feature-holding image. Each component of the model is composed of a convolutional layer and a pooling layer. In the φ1 network, unlike the traditional generative network, the U-net [21] network structures are borrowed, and jump connections are used between different feature layers for maintaining the texture information of the underlying target image in the generated expression image [22].φ2 network structure is shown in Figure 3; for the expression feature image B of the constructed external spatial environment of the building group, multiple convolutions and pooling layers are used to extract the depth features, and the expression feature image extractor is used to extract the expression information of the constructed external spatial environment of the building group, which is used as the supervisory information in the image reconstruction; relatively speaking, it contains less information. In order to reduce the number of network parameters and improve the system speed, the depth of the feature extractor should be reduced appropriately [23].The image S of the external environment of the target building group can be constructed by the feature extractor, since the constructed external spatial environment target image of the building group provides texture and individual features in generating the constructed external spatial environment expression animation of the building group; the constructed external spatial environment target image feature extraction and feature decoding of the building group need to preserve more details of the constructed external spatial environment of the building group [24]. Extracting different features in the image S of the external environment of the building complex can increase the depth of the encoder network; using jump connection, the low-level image texture features are preserved, and the constructed external spatial environment feature image of the building group and the constructed external spatial environment of the target building group are connected separately and simultaneously across layers of features, and finally more information is fused in the decoder stage to improve the image fineness [25].As shown in Figure6, two inputs are used in φ2, one of which is the seed image O1 output by φ1, and the other input is the original constructed external spatial environment image S of the target building group, so two feature extractors with the same structure are used in φ2 but without sharing parameters. In the decoding stage, more jump connections are added.Figure 6
The framework of expression generation of the external spatial environment for the construction of architectural groups: (a) recursive generation flowchart and (b) recursively generate flow chart data flow.In addition, the enhanced discriminator of the VGG network with stronger classification power is used in theφ2 discriminator, which enables φ2 to distinguish of more subtle differences between the generated and real images. Since the stronger discriminator makes the generative network more difficult to train, some φ1 network parameters are shared in φ2 when training φ2.


### 3.3. Recursive Video Frame Generation

The consistency between different frames in the generated video is not considered in the literature related to the expression of the constructed external spatial environment of the building group based on deep learning [26], and most of them are generated only for single graphics, although the static image generation has achieved a very fine and realistic effect, but once the related generation of the video is performed, it exposes the generation of different image frames with the problem of large differences in brightness and darkness, that is, some frames are brighter and some frames are darker, and has the problem of uneven distribution, which leads to flicker and video fidelity degradation during video playback [27]. The recursive generation method proposed in this paper uses the seed image generation network to obtain the expression seed image, then uses the feature retention network to generate the feature retention image, and then uses the generated feature retention image as the input of a new frame for a recursive generation. Finally, the color, brightness, and texture of all the video frames are more uniform, and the generated video is more realistic and natural [28].Two networks are used to generate the constructed external spatial environment of the building group separately: first, the seed image of the constructed external spatial environment of the building group is generated byφ1, and then the generated image is further optimized for recursive generation using φ2 to obtain the output image of the constructed external spatial environment of the building group with features maintained.In the recursive generation, let the input sequence of driving image frames be B, the correspondingi-th frame driving image be bi, and the constructed external spatial environment image of the target building group be S. The flow of recursive generation is shown in Figure 4. The seed O11 image generation of the constructed external spatial environment expression of the building group is performed by φ1. O11 will be used as the input of φ2. At the same time, the constructed external space environment of the target building group will also be used as the input of φ2 to obtain the feature-holding image O12 of the constructed external space environment of the first frame building group and output it. Then, input the construction external space environment boundary sequence B2 of the building group in the second frame, take the feature holding Image O12 finally output in the first frame and the construction external space environment feature image B2 of the building group corresponding to the second frame as φ1 input, and generate the second frame seed image O12. Then, the second frame feature-holding image O22 is generated by O12. With this loop, the output of all expression frames is generated recursively, as shown in the following equations:(1)ψ1S,bi=O1i,(2)ψ2S,O1i=O2i,where O2i is the output of the i-th frame.


### 3.4. Residential Community Architectural Space Form Generation

In this experimental construction, the initial single building consists of two overlapping square boxes, with the upper box picking out a part and its common part running through the two upper and lower spaces, and then the single building is continuously stacked and combined to form a group structure and finally form a group of buildings, that is, the whole building, as shown in Figure4.Building B also has an arc-shaped unit, as opposed to building A, which is more energetic like young people. The arc-shaped building form is more convenient for lighting, and the sunlight from the second floor can shine through the second-floor windows to the first floor, which is good for lighting and sufficient light. The elevator shaft on both sides leads from the first-floor garage to the top floor. The 9-25 floors of building B are residential space, but the single-story units are the opposite of the double-story units [29–31].In addition, unlike building A, building B is lit mainly through the windows on the back of the building; in order to make up for the lack of light on the first floor, the light can reach the first floor through the second floor for better lighting effect, and the curved building form is more convenient for lighting [32].


### 3.5. Performance Evaluation

In this paper, two experiments are designed to investigate the dichotomous (normal and anomaly) and five-class performance of our model (K = 100). To compare with other machine learning methods, comparison experiments were also designed to compare the classification performance of our model model with machine learning methods such as C4.5 decision trees, random forests, random trees, support vector machines, and recurrent neural networks [32].(1) Binary Classification. Table 1 shows the classification results of the our model model on the test set in the binary classification experiment. The experiments show that after 100 iterations, the our model has a high detection accuracy of 97.44% in the training set and 91.88% in the test set.Table 1
Classification results of the our model model in the binary classification experiment.
Correct categoryPrediction resultsAnomalyNormalAnomaly11,5071,326Normal5059,206The results compared with previous researchers’ proposed C4.5 decision trees, random forests, random trees, support vector machines, and recurrent neural networks on the same benchmark data set are shown in Figure7. It is clear that the our model outperforms all the other classification algorithms in the binary classification experiments [33].Figure 7
Detection accuracies of the binary classification model on the training and test sets.(2) Five Classifications. In the five classification experiments, as shown in Figure 8 that our detection model achieves an accuracy of 97.47% on the training set and 82.40% on the test set. The results of our model on the test set are shown in Table 2. Table 3 shows the detection accuracy and recall rates for different attack types.Figure 8
Comparison of the performance of the models for the second classification.Table 2
Classification results of our model in the five classification experiments.
Correct categoryPrediction resultsNormalDosProbeR2LU2RNormal9,278152267410Dos9386,39893821Probe2161072,09530R2L1,9691007723U2R15209534Table 3
Detection accuracy and recall for different attack types.
TypeAccuracy (%)Recall rate (%)Dos95.9785.79Probe85.0286.53R2L97.4738.95U2R50.0017.00As shown in Figure9, the detection accuracy of the our model model is higher than that obtained by classification algorithms such as C4.5 decision trees, random forests, random trees, support vector machines, and recurrent neural networks. Due to the uneven distribution of samples in the dataset, the detection accuracy of the model with five classifications decreases compared to the two classifications [34].Figure 9
Accuracy rate of each model in five categories.


## 3.1. Dual Network Model

Our proposed dual network model consists of two deep learning-based generative adversarial networks, including a networkφ1 (FaceGAN) for seed image generation and a network φ2 (FineGAN) for generating feature-preserving images, and the two networks are connected in series to form a dual network model.


## 3.2. Model Architecture

For the constructed external spatial environment image S of the target building group and the expression feature image B, nonreciprocal codecs are used for the two images since they provide different information, where the constructed external spatial environment feature image B of the building group is used as supervisory information in the generation of seed imageO11 to generate the seed image corresponding to the expression feature, while the original target image S provides texture and other image detail features in the generation of the seed image and the feature-holding image. Each component of the model is composed of a convolutional layer and a pooling layer. In the φ1 network, unlike the traditional generative network, the U-net [21] network structures are borrowed, and jump connections are used between different feature layers for maintaining the texture information of the underlying target image in the generated expression image [22].φ2 network structure is shown in Figure 3; for the expression feature image B of the constructed external spatial environment of the building group, multiple convolutions and pooling layers are used to extract the depth features, and the expression feature image extractor is used to extract the expression information of the constructed external spatial environment of the building group, which is used as the supervisory information in the image reconstruction; relatively speaking, it contains less information. In order to reduce the number of network parameters and improve the system speed, the depth of the feature extractor should be reduced appropriately [23].The image S of the external environment of the target building group can be constructed by the feature extractor, since the constructed external spatial environment target image of the building group provides texture and individual features in generating the constructed external spatial environment expression animation of the building group; the constructed external spatial environment target image feature extraction and feature decoding of the building group need to preserve more details of the constructed external spatial environment of the building group [24]. Extracting different features in the image S of the external environment of the building complex can increase the depth of the encoder network; using jump connection, the low-level image texture features are preserved, and the constructed external spatial environment feature image of the building group and the constructed external spatial environment of the target building group are connected separately and simultaneously across layers of features, and finally more information is fused in the decoder stage to improve the image fineness [25].As shown in Figure6, two inputs are used in φ2, one of which is the seed image O1 output by φ1, and the other input is the original constructed external spatial environment image S of the target building group, so two feature extractors with the same structure are used in φ2 but without sharing parameters. In the decoding stage, more jump connections are added.Figure 6
The framework of expression generation of the external spatial environment for the construction of architectural groups: (a) recursive generation flowchart and (b) recursively generate flow chart data flow.In addition, the enhanced discriminator of the VGG network with stronger classification power is used in theφ2 discriminator, which enables φ2 to distinguish of more subtle differences between the generated and real images. Since the stronger discriminator makes the generative network more difficult to train, some φ1 network parameters are shared in φ2 when training φ2.


## 3.3. Recursive Video Frame Generation

The consistency between different frames in the generated video is not considered in the literature related to the expression of the constructed external spatial environment of the building group based on deep learning [26], and most of them are generated only for single graphics, although the static image generation has achieved a very fine and realistic effect, but once the related generation of the video is performed, it exposes the generation of different image frames with the problem of large differences in brightness and darkness, that is, some frames are brighter and some frames are darker, and has the problem of uneven distribution, which leads to flicker and video fidelity degradation during video playback [27]. The recursive generation method proposed in this paper uses the seed image generation network to obtain the expression seed image, then uses the feature retention network to generate the feature retention image, and then uses the generated feature retention image as the input of a new frame for a recursive generation. Finally, the color, brightness, and texture of all the video frames are more uniform, and the generated video is more realistic and natural [28].Two networks are used to generate the constructed external spatial environment of the building group separately: first, the seed image of the constructed external spatial environment of the building group is generated byφ1, and then the generated image is further optimized for recursive generation using φ2 to obtain the output image of the constructed external spatial environment of the building group with features maintained.In the recursive generation, let the input sequence of driving image frames be B, the correspondingi-th frame driving image be bi, and the constructed external spatial environment image of the target building group be S. The flow of recursive generation is shown in Figure 4. The seed O11 image generation of the constructed external spatial environment expression of the building group is performed by φ1. O11 will be used as the input of φ2. At the same time, the constructed external space environment of the target building group will also be used as the input of φ2 to obtain the feature-holding image O12 of the constructed external space environment of the first frame building group and output it. Then, input the construction external space environment boundary sequence B2 of the building group in the second frame, take the feature holding Image O12 finally output in the first frame and the construction external space environment feature image B2 of the building group corresponding to the second frame as φ1 input, and generate the second frame seed image O12. Then, the second frame feature-holding image O22 is generated by O12. With this loop, the output of all expression frames is generated recursively, as shown in the following equations:(1)ψ1S,bi=O1i,(2)ψ2S,O1i=O2i,where O2i is the output of the i-th frame.


## 3.4. Residential Community Architectural Space Form Generation

In this experimental construction, the initial single building consists of two overlapping square boxes, with the upper box picking out a part and its common part running through the two upper and lower spaces, and then the single building is continuously stacked and combined to form a group structure and finally form a group of buildings, that is, the whole building, as shown in Figure4.Building B also has an arc-shaped unit, as opposed to building A, which is more energetic like young people. The arc-shaped building form is more convenient for lighting, and the sunlight from the second floor can shine through the second-floor windows to the first floor, which is good for lighting and sufficient light. The elevator shaft on both sides leads from the first-floor garage to the top floor. The 9-25 floors of building B are residential space, but the single-story units are the opposite of the double-story units [29–31].In addition, unlike building A, building B is lit mainly through the windows on the back of the building; in order to make up for the lack of light on the first floor, the light can reach the first floor through the second floor for better lighting effect, and the curved building form is more convenient for lighting [32].


## 3.5. Performance Evaluation

In this paper, two experiments are designed to investigate the dichotomous (normal and anomaly) and five-class performance of our model (K = 100). To compare with other machine learning methods, comparison experiments were also designed to compare the classification performance of our model model with machine learning methods such as C4.5 decision trees, random forests, random trees, support vector machines, and recurrent neural networks [32].(1) Binary Classification. Table 1 shows the classification results of the our model model on the test set in the binary classification experiment. The experiments show that after 100 iterations, the our model has a high detection accuracy of 97.44% in the training set and 91.88% in the test set.Table 1
Classification results of the our model model in the binary classification experiment.
Correct categoryPrediction resultsAnomalyNormalAnomaly11,5071,326Normal5059,206The results compared with previous researchers’ proposed C4.5 decision trees, random forests, random trees, support vector machines, and recurrent neural networks on the same benchmark data set are shown in Figure7. It is clear that the our model outperforms all the other classification algorithms in the binary classification experiments [33].Figure 7
Detection accuracies of the binary classification model on the training and test sets.(2) Five Classifications. In the five classification experiments, as shown in Figure 8 that our detection model achieves an accuracy of 97.47% on the training set and 82.40% on the test set. The results of our model on the test set are shown in Table 2. Table 3 shows the detection accuracy and recall rates for different attack types.Figure 8
Comparison of the performance of the models for the second classification.Table 2
Classification results of our model in the five classification experiments.
Correct categoryPrediction resultsNormalDosProbeR2LU2RNormal9,278152267410Dos9386,39893821Probe2161072,09530R2L1,9691007723U2R15209534Table 3
Detection accuracy and recall for different attack types.
TypeAccuracy (%)Recall rate (%)Dos95.9785.79Probe85.0286.53R2L97.4738.95U2R50.0017.00As shown in Figure9, the detection accuracy of the our model model is higher than that obtained by classification algorithms such as C4.5 decision trees, random forests, random trees, support vector machines, and recurrent neural networks. Due to the uneven distribution of samples in the dataset, the detection accuracy of the model with five classifications decreases compared to the two classifications [34].Figure 9
Accuracy rate of each model in five categories.


## 4. Conclusions

The design of urban residential communities focuses on people’s living requirements, emphasizes community participation, and puts itself in the shoes of users, especially the user groups’ usage requirements, living customs, and emotional psychology. In this paper, we propose a planning and design generation framework for constructing external spatial environments of building groups based on a recursive dual-adversarial network model. The experimental results on the building group database show that the proposed method can generate clear and natural video frames of the external spatial environment of the building group, which can be gradually derived from the design of the building units to the building group and penetrate into the planning and design of the external spatial environment.



---

*Source: 5053494-2021-11-12.xml*