Similarity recommendation-based residential area landscape plan generation method and system, terminal and storage medium

Through the method based on similarity recommendation, combined with the steps of landscape scheme recommendation, design layout generation and stylized processing, the problem that landscape design cannot independently generate plan solutions in the existing technology is solved, and the efficient generation of landscape floor layout diagrams that meet actual needs is achieved.

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

Patent Information

Application Number
CN202510695146.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-06-27
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

In the prior art, based on machine learning, it is impossible to generate plan solutions completely autonomously during landscape design, and it is impossible to generate landscape plan layout diagrams that meet actual needs.

Method used

Using a similarity recommendation method, the building node connection diagram of the target residential area is obtained, and input it into the landscape scheme recommendation model for similarity analysis, and output the reference scheme full-node connection diagram. Then, the design layout is generated by combining the generation of the scheme building node diagram and the boundary condition diagram, and finally the landscape plan generation model is stylized to generate the landscape plan effect diagram.

Benefits of technology

It realizes the rapid selection of the most suitable layout data from existing design plans, and performs site adaptability adjustments to generate landscape floor layout diagrams that meet actual needs, improving the work efficiency of landscape design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219552A_ABST
    Figure CN120219552A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a similarity recommendation-based residential area landscape planar graph generation method and system, a terminal and a storage medium, and the method comprises the steps that a landscape scheme recommendation model carries out the similarity analysis of a building node connection graph, and outputs a reference scheme full-node connection graph; the design layout generation model performs design layout according to the reference scheme full-node connection diagram, the generation scheme building node diagram and the generation scheme boundary condition diagram to obtain a generation scheme landscape element layout diagram; and the landscape scheme generation model performs stylization processing on the generated scheme landscape element layout map to obtain a generated scheme landscape plane effect picture. Based on the similarity recommendation technology, layout data most suitable for the current demand is rapidly screened out, site adaptability adjustment is carried out on the basis, the landscape plane layout diagram meeting the actual demand is finally generated, the influence of the data set number on the generation quality is effectively reduced, and the working efficiency of landscape design is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, system, terminal and computer-readable storage medium for generating a residential area landscape plan based on similarity recommendation. Background Art

[0002] In the rapid development of urbanization, landscape design, as an important means to improve the living environment and enhance the urban quality, has received extensive attention. As a design method with a long history, the process and method of traditional landscape design have gradually formed and been continuously improved in long-term practice. However, with the diversification of social needs, the enhancement of ecological environmental protection awareness, and the rapid development of modern technology, some disadvantages of the traditional landscape design process have gradually emerged, making it difficult to fully meet the high requirements of modern society for landscape design. Against the background of the rapid development of digital technology, the disadvantages of the traditional landscape design process have become more obvious, such as low design efficiency and lack of flexibility in the design process. Modern landscape design is gradually developing towards digitalization and intelligence.

[0003] Machine learning has developed rapidly in the field of architecture, but there has been little exploration in landscape design. As an element closely related to architecture, landscape design is a unique and crucial design task, involving design issues such as the coordination of element positions and the construction of landscape perception spaces. Currently, unique optimal solutions are drawn through parametric modeling tools, but designs cannot be generated independently; the Generative Adversarial Network (GAN) model realizes the end-to-end generation of park plans through supervised learning. For example, pix2pix (Image-to-Image Translation with Conditional Adversarial Networks, image-to-image conversion based on conditional GAN) and CycleGAN (Cycle-Consistent Adversarial Networks, image-to-image conversion without paired data) are used to achieve the automated design of small and medium-sized park green spaces based on simple sketches. For example, pix2pix is used to generate the plan of a small residential garden from a simple sketch, but a simple design sketch needs to be provided to the model, and the generation of the plan cannot be fully autonomous.

[0004] Due to data limitations, the application of machine learning in the field of landscape design is still in its initial stage, and the complex spatial layout in landscape plans makes the collection and annotation of high-quality datasets difficult.

[0005] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention

[0006] The main object of the present invention is to provide a method, system, terminal and computer-readable storage medium for generating a landscape plan view of a residential area based on similarity recommendation, aiming to solve the problem in the prior art that when conducting landscape design based on machine learning, it is impossible to completely autonomously generate a plane plan and impossible to generate a landscape plane layout map that meets the actual requirements.

[0007] To achieve the above object, the present invention provides a method for generating a landscape plan view of a residential area based on similarity recommendation. The method for generating a landscape plan view of a residential area based on similarity recommendation includes the following steps: Obtain the building node connection diagram of the target residential area, input the building node connection diagram into the landscape plan recommendation model, and the landscape plan recommendation model performs similarity analysis on the building node connection diagram and outputs a reference plan full node connection diagram according to the similarity analysis result; Obtain the building node diagram of the generated plan and the boundary condition diagram of the generated plan, input the reference plan full node connection diagram, the building node diagram of the generated plan and the boundary condition diagram of the generated plan into the design layout generation model, and the design layout generation model performs design layout according to the reference plan full node connection diagram, the building node diagram of the generated plan and the boundary condition diagram of the generated plan to obtain the layout diagram of landscape elements of the generated plan; Input the layout diagram of landscape elements of the generated plan into the landscape plan generation model, and the landscape plan generation model performs stylization processing on the layout diagram of landscape elements of the generated plan to obtain the generated plan landscape plane effect diagram of the target residential area.

[0008] Optionally, in the method for generating a landscape plan view of a residential area based on similarity recommendation, the step of obtaining the building node connection diagram of the target residential area, inputting the building node connection diagram into the landscape plan recommendation model, the landscape plan recommendation model performing similarity analysis on the building node connection diagram and outputting a reference plan full node connection diagram according to the similarity analysis result specifically includes: Obtain the building node connection diagram of the generated plan of the target residential area and multiple reference plan building node connection diagrams, and input them into the landscape plan recommendation model based on similarity recommendation; The landscape plan recommendation model uses a graph convolutional network to encode the building node connection diagram of the generated plan and each reference plan building node connection diagram into low-dimensional embedding vectors respectively, and uses an attention mechanism to calculate the matching weights between nodes to obtain the similarity scores between the building node connection diagram of the generated plan and each reference plan building node connection diagram, and outputs the reference plan full node connection diagram corresponding to the reference plan with the highest similarity score.

[0009] Optionally, in the method for generating a residential area landscape plan view based on similarity recommendation, the training process of the landscape plan recommendation model includes: Randomly generate graph pair data using a random graph model to construct an original dataset A, collect satellite images of residential communities with building layouts, and construct an original dataset B; By combining graph editing operations and heuristic search, calculate the graph edit distance between each pair of graphs in the original dataset A, where the graph edit distance is used to measure the structural similarity between two graphs; Preprocess and partition the original dataset B to obtain a generated plan dataset and a reference plan dataset for the landscape plan recommendation model respectively; Generate node features through a global label set, convert the label of each node into a binary vector of a fixed dimension, convert the original edge list into a symmetric adjacency matrix, and represent it as an undirected graph. Normalize the graph edit distance, and through exponential function transformation, map the data to a preset interval as the true value of similarity. The data input to the landscape plan recommendation model includes the node feature matrices, adjacency matrices, and target values of two graphs; Use a multi-layer graph convolutional network to perform representation learning on the nodes in each input graph to generate node-level embeddings; After obtaining the embedding of each node, aggregate the node embeddings into a global representation representing the entire graph through an attention mechanism to capture the overall structural information of the graph; Compare the embeddings of corresponding nodes in the two graphs to obtain a node pairing similarity matrix, calculate the histogram of the node pairing similarity matrix, and obtain a feature vector through tensor product operation by combining the graph-level embedding and node-level representation of each graph; Perform prediction based on the histogram and feature vector through a fully connected layer, and output a normalized similarity score; Among them, the loss function of the landscape plan recommendation model uses mean squared error, and the optimization process uses the Adam algorithm.

[0010] Optionally, in the method for generating a residential area landscape plan view based on similarity recommendation, the preprocessing includes: spatial standardization, feature extraction and normalization, and creation of boundary condition graphs and node connection graphs.

[0011] Optionally, in the method for generating a residential area landscape plan view based on similarity recommendation, the preprocessing of the original dataset B specifically includes: Perform spatial standardization on all graphic data in the original dataset B, convert all plan views to a unified coordinate system, and scale them according to a set standard ratio so that the spatial scales of different design schemes are consistent; Each plan in the original data set B is segmented using the SegNet semantic segmentation model to obtain the distribution of landscape design elements in each plan, normalize all elements except the site boundary, and represent each corresponding element by calculating the geometric center point of each element to eliminate the drawing differences between different schemes; Extract the site boundary data in the original data set B, analyze the spatial relationship between the building and the site boundary, obtain the boundary condition graph, and create a full node connection graph and a building node connection graph for each element node according to the adjacency relationship between different elements; The generated scheme data set includes: a scheme diagram, a boundary condition diagram and a building node connection diagram of each scheme; The reference solution data set includes: a solution diagram, a full node connection diagram and a building node connection diagram of each solution.

[0012] Optionally, the residential area landscape plan generation method based on similarity recommendation, wherein the design layout generation model performs design layout according to the reference scheme full node connection graph, the generated scheme building node graph and the generated scheme boundary condition graph to obtain the generated scheme landscape element layout graph, specifically includes: Delete the building nodes, entrance and exit nodes and related connection lines in the full node connection diagram of the reference solution, add the building nodes and entrance and exit nodes of the generated solution, and obtain the full node connection diagram of the generated solution; Based on the full-node connection graph of the generation scheme and the boundary condition graph of the generation scheme, position matching, node position adjustment and element drawing are performed to obtain the landscape element layout graph of the generation scheme.

[0013] Optionally, in the residential area landscape plan generation method based on similarity recommendation, the training process of the landscape plan generation model includes: Use a crawler tool to crawl data according to preset keywords, clean the crawled data, remove duplicate, incomplete and irrelevant pictures, and obtain the original data set C of the residential landscape plan. The original data set C includes the plan and label text; Format all floor plans, annotate the contents of the floor plans with text labels, remove irrelevant information and noise in the label text, and obtain the processed data set C; The landscape scheme generation model is obtained by combining the stable diffusion model and the low-rank adaptation model; Use the processed dataset C as the training dataset, retain the original weights of the stable diffusion model, insert the low-rank matrix into the key layer of the stable diffusion model, freeze the original pre-trained weights, and train the low-rank matrix; During the training process, the gradient descent optimization algorithm is used to optimize the low-rank matrix to minimize the loss function, and the learning rate and batch size are set according to the complexity of the task. According to the design requirements of the residential area landscape plan, the trained landscape plan generation model is used to generate the landscape plan rendering that meets the requirements.

[0014] In addition, to achieve the above object, the present invention also provides a residential area landscape plan generation system based on similarity recommendation, wherein the residential area landscape plan generation system based on similarity recommendation includes: A landscape plan recommendation model for performing similarity analysis on the building node connection diagram and outputting a full-node connection diagram of the reference plan according to the similarity analysis result; A design layout generation model for performing a design layout according to the full-node connection diagram of the reference plan, the building node diagram of the generated plan, and the boundary condition diagram of the generated plan to obtain the landscape element layout diagram of the generated plan; A landscape plan generation model for stylizing the landscape element layout diagram of the generated plan to obtain the landscape plan rendering of the target residential area.

[0015] In addition, to achieve the above object, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a residential area landscape plan generation program based on similarity recommendation stored on the memory and executable on the processor. When the residential area landscape plan generation program based on similarity recommendation is executed by the processor, the steps of the above-mentioned residential area landscape plan generation method based on similarity recommendation are implemented.

[0016] In addition, to achieve the above object, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a residential area landscape plan generation program based on similarity recommendation. When the residential area landscape plan generation program based on similarity recommendation is executed by a processor, the steps of the above-mentioned residential area landscape plan generation method based on similarity recommendation are implemented.

[0017] In the present invention, a building node connection diagram of a target residential area is obtained, and the building node connection diagram is input into a landscape plan recommendation model. The landscape plan recommendation model performs similarity analysis on the building node connection diagram and outputs a reference plan full-node connection diagram according to the similarity analysis result; a generated plan building node diagram and a generated plan boundary condition diagram are obtained, and the reference plan full-node connection diagram, the generated plan building node diagram, and the generated plan boundary condition diagram are input into a design layout generation model. The design layout generation model performs design layout according to the reference plan full-node connection diagram, the generated plan building node diagram, and the generated plan boundary condition diagram to obtain a generated plan landscape element layout diagram; the generated plan landscape element layout diagram is input into a landscape plan generation model, and the landscape plan generation model performs stylization processing on the generated plan landscape element layout diagram to obtain a generated plan landscape plane effect diagram of the target residential area. Based on the similarity recommendation technology, the present invention quickly screens out the layout data most suitable for the current requirements from the existing design plans, and performs site adaptability adjustment on this basis, and finally generates a landscape plane layout diagram that meets the actual requirements, effectively reducing the impact of the number of data sets on the generation quality and improving the work efficiency of landscape design. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flowchart of a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 2 is a schematic diagram of the data calculation process in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 3 is a schematic diagram of the edit distance of a graph in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 4 is a schematic diagram of the semantic segmentation result of a residential area plan in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 5 is a schematic diagram of the training process of the landscape plan recommendation model in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 6 is a schematic diagram of the design layout generation model generating a landscape element layout diagram in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 7 is a schematic diagram of performing node matching, boundary constraint calculation, and generating an element layout diagram in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention; Figure 8It is a schematic diagram of the network structure of the landscape plan generation model in the preferred embodiment of the residential area landscape plan generation method based on similarity recommendation of the present invention; Figure 9 It is a structural diagram of the preferred embodiment of the terminal of the present invention. Detailed implementation manners

[0019] In order to make the objectives, technical solutions and advantages of the present invention clearer and more definite, the present invention will be further described in detail below with reference to the accompanying drawings and by way of examples. It should be understood that the specific examples described herein are only used to explain the present invention and are not used to limit the present invention.

[0020] The residential area landscape plan generation method based on similarity recommendation described in the preferred embodiment of the present invention, as Figure 1 and Figure 2 shown, the residential area landscape plan generation method based on similarity recommendation includes the following steps: Step S10: Obtain the building node connection diagram of the target residential area, input the building node connection diagram into the landscape plan recommendation model, the landscape plan recommendation model performs similarity analysis on the building node connection diagram, and outputs a reference plan full node connection diagram according to the similarity analysis result.

[0021] Step S20: Obtain the generated plan building node diagram and the generated plan boundary condition diagram, input the reference plan full node connection diagram, the generated plan building node diagram and the generated plan boundary condition diagram into the design layout generation model, and the design layout generation model performs design layout according to the reference plan full node connection diagram, the generated plan building node diagram and the generated plan boundary condition diagram to obtain the generated plan landscape element layout diagram.

[0022] Step S30: Input the generated plan landscape element layout diagram into the landscape plan generation model, and the landscape plan generation model performs stylization processing on the generated plan landscape element layout diagram to obtain the generated plan landscape plane effect diagram of the target residential area.

[0023] As Figure 2 shown, the process of the residential area landscape plan generation method based on similarity recommendation of the present invention consists of three parts, specifically as follows: One is a landscape plan recommendation model based on similarity recommendation. The input data is the building node connection diagram of the target residential area (the building node connection diagram of the generated plan and the building node connection diagrams of multiple reference plans). The landscape plan recommendation model uses Graph Convolutional Networks (GCN) to encode the building node connection diagram of the generated plan and each reference plan's building node connection diagram into low-dimensional embedding vectors respectively, and uses the attention mechanism to calculate the matching weights between nodes to achieve the similarity measurement of the two node connection diagrams, obtain the similarity scores between the building node connection diagram of the generated plan and each reference plan's building node connection diagram, and output the reference plan's full node connection diagram corresponding to the most similar (i.e., the highest prediction score) reference plan.

[0024] Two is the design layout generation model of the residential area landscape plan. The design layout generation model takes the reference plan's full node connection diagram output by the landscape plan recommendation model, the boundary condition diagram of the generated plan, and the building node connection diagram of the generated plan as input data, and obtains the layout diagram of the landscape elements of the generated plan containing five design elements: the entrance position, the building position, the road, the public green space, and the entrance square through operations such as boundary adjustment and node-element conversion.

[0025] Three is the landscape plan generation model based on stable diffusion + Lora (Low-Rank Adaptation). The landscape plan generation model takes the layout diagram of the landscape elements of the generated plan output by the design layout generation model as input, uses "Residential area plan", "landscape plan", etc. as guiding words, and combines the trained Lora model to stylize the input data to obtain the landscape plan rendering of the generated plan with richer design details such as plant arrangement and road grass texture.

[0026] (1). The model training and data processing of the landscape plan recommendation model based on similarity recommendation are as follows: 1). Dataset preparation: The dataset of the landscape plan recommendation model is divided into two parts: the original dataset A (graph pair data) and the original dataset B (satellite map of the residential community) for training the model.

[0027] Use a random graph model (such as the Erdős–Rényi random graph model) to randomly generate graph pair data to construct the original dataset A. The number of nodes in each graph is between 5 and 16, and the edge connection probability is between 0.4 and 0.7. The generated graphs are guaranteed to be connected to avoid the appearance of isolated nodes and ensure the effectiveness of subsequent Graph Edit Distance (GED) calculations.

[0028] Construct the original dataset B by collecting satellite images of residential communities with building layouts. This original dataset B is sourced from the original satellite maps, ensuring that the collected data has a unified drawing scale and includes a relatively complete landscape design layout, facilitating subsequent data labeling and processing.

[0029] 2) Dataset processing: Calculate the graph edit distance (GED) between each pair of graphs in the original dataset A. This distance measures the structural similarity between two graphs ( Figure 3 Indicates a schematic diagram of the graph edit distance, as Figure 3 shown. The operations are respectively deletion → addition → remapping). Use a heuristic optimization algorithm to quickly estimate the minimum number of edit operations (including addition, deletion, and remapping of nodes and edges). By combining graph edit operations and heuristic search to approximately calculate the graph edit distance, quickly find a better solution while avoiding exhaustive enumeration of all possibilities, and take the result of the first iteration as the GED label for the graph pair. The final dataset A is 11,000 graph pair files with added GED data. Each graph pair file includes the graph (edge list), label (node degree), and GED data of the graph pair for two graphs (the graph pair data is generated using the Erdős–Rényi random graph model, that is, there will be information of two graphs in one file, and these two graphs are two random graphs generated during the dataset preparation stage within one graph pair file).

[0030] Preprocess and partition the original dataset B to obtain the generated scheme dataset and the reference scheme dataset for the landscape scheme recommendation model respectively. The generated scheme dataset mainly contains preset information for landscape design, including buildings, entrances, and site boundaries extracted from the landscape scheme. The reference scheme dataset focuses on extracting functional elements in the landscape scheme, mainly including buildings, roads, public green spaces, squares, etc.

[0031] The specific operations for data preprocessing of the original dataset B are as follows: a. Spatial standardization: To ensure that all design schemes can be compared and calculated under a unified coordinate system, it is necessary to perform spatial standardization on all graphic data. All floor plans will be converted to a unified coordinate system and scaled according to the set standard scale to make the spatial scales of different design schemes consistent.

[0032] b. Feature extraction and normalization: First, use the SegNet semantic segmentation model (SegNet is a deep fully convolutional neural network structure and a model for image semantic segmentation) to segment each picture in the original dataset B to obtain the distribution of landscape design elements for each floor plan. Then, perform normalization processing on all elements except the site boundary, and represent each element by calculating the geometric center point of each element to eliminate the drawing differences between different schemes.

[0033] The residential area floor plan includes the site boundary, entrance and exit locations, building locations, roads, public green spaces, and entrance and exit squares, as Figure 4 shown.

[0034] c. Create the boundary condition diagram and node connection diagram: First, obtain the boundary condition diagram by extracting the site boundary data and analyzing the spatial relationship between the buildings and the site boundary. Then, create a full node connection diagram and a building node connection diagram for each calculated element node according to the adjacency relationship between different elements. Among them, the square and green space are divided into rectangles of 8m * 8m, and the divided rectangular nodes are extracted as the square nodes and public green space nodes.

[0035] Finally, the generated solution dataset contains the solution diagram, boundary condition diagram, and building node connection diagram data (the building node connection diagram data refers to the building node connection diagram obtained above) for each solution in the dataset, and the reference solution dataset contains the solution diagram, full node connection diagram, and building node connection diagram data for each solution in the dataset.

[0036] 3). Model construction and training: As Figure 5 shown, in the training stage, a similarity graph neural network (i.e., the simGNN model) is constructed based on the graph neural network (Graph Neural Network, GNN). This simGNN model uses the graph edit distance (GED) data as supervision and realizes similarity measurement through technologies such as graph convolutional networks (Graph Convolutional Networks, GCN), attention mechanism (Attention Mechanism, ATT), neural tensor network (Neural Tensor Network, NTN), and node comparison.

[0037] a. Input feature construction: The similarity graph neural network generates node features through the global label set, converts the label of each node into a binary vector of a fixed dimension using the one-hot encoding method to ensure the structured expression of semantic information; converts the original edge list into a symmetric adjacency matrix and represents it as an undirected graph; normalizes the original graph edit distance (GED) data and maps the data to the interval (0, 1] through exponential function conversion as the true value of similarity.

[0038] The final input includes the node feature matrices, adjacency matrices, and target values of two graphs.

[0039] b. Model architecture design (as Figure 5 shown): b1. Node feature extraction: Use multi-layer graph convolutional networks (GCNs) to perform representation learning on the nodes in each input graph, generating node-level embeddings.

[0040] Each graph is processed through an independent graph convolutional network (GCN). The GCN passes information through the adjacency relationships of the nodes, gradually updating the embedding representation of each node , and these node embeddings capture the local structural information of the nodes. The input graphs share the same GCN parameters (referring to when processing different graphs, all graphs use the same weight and bias parameters for convolutional calculations, which are the parameters of the graph convolutional network), ensuring the consistency of the feature space.

[0041] b2. Generation of graph-level representation: After obtaining the embeddings of each node, the model aggregates the node embeddings into a global representation that can represent the entire graph through an attention mechanism (ATT), which can capture the overall structural information of the graph.

[0042] By performing a weighted sum of the node-level embeddings and the node attention weights , the embedding of the entire graph is obtained .

[0043] b3. Calculation of inter-graph similarity: The calculation of inter-graph similarity mainly includes two parts: pairwise comparison at the node level and neural tensor network.

[0044] The pairwise comparison at the node level obtains a node pairing similarity matrix by comparing the embeddings of corresponding nodes in two graphs, and calculates the histogram of this matrix; the neural tensor network combines the graph-level embedding and node-level representation of each graph through a tensor product operation to obtain a feature vector.

[0045] b4. Prediction of similarity: The obtained histogram and feature vector are further processed through a fully connected layer, and the normalized similarity score y (i.e., the prediction score) is output through the sigmoid function, where y ∈ [0, 1].

[0046] The model loss function uses mean squared error (MSE). The optimization process uses the Adam algorithm with an initial learning rate of 0.001, and implements a progressive strategy of decaying by 30% every 50 rounds to balance the convergence speed and stability.

[0047] (2). The data processing of the residential area landscape scheme design and layout generation model is as follows (as Figure 6 shown): 1). Obtain the fully connected graph of all nodes of the generated scheme: Calculate the full-node connection diagram of the generated scheme according to the most similar recommended scheme. First, delete the building nodes, entrance and exit nodes, and related connection lines in the obtained reference scheme full-node connection diagram; then, supplement the building nodes and entrance and exit nodes of the generated scheme to obtain the full-node connection diagram of the generated scheme.

[0048] 2) Obtain the element layout diagram: Draw the element layout diagram based on the obtained full-node connection diagram of the generated scheme and the boundary condition diagram of the generated scheme.

[0049] First, perform position matching on the full-node connection diagram of the generated scheme and the boundary condition diagram according to the correspondence between the building nodes and the building units in the boundary condition diagram. The result is as shown in Figure 7 (a) in. The following processing needs to be performed on the matched result: a. Node position adjustment: According to the relevant design specifications, it is uniformly stipulated that within 5m on the entrance side of the building unit, 3m on the non-entrance side, and 2m on the gable wall, it is prohibited to set elements such as roads, public green spaces, and squares, which becomes the building boundary constraint line. According to the building boundary constraint line, perform partial deletion operations on the road nodes, road connection line square nodes, and public green space nodes, and supplement the connection between the building nodes and the road system along the building boundary constraint line.

[0050] Delete the square nodes and public green space nodes outside the boundary according to the site red line boundary; to ensure the integrity of the road system, adjust the road nodes outside the boundary to the inside of the boundary. The adjustment rule is: Denote the node a outside the boundary, calculate the node b closest to point a on the boundary red line, and move node a along the direction of a→b by a distance of 2 times the line segment ab to obtain the node adjustment diagram. The boundary constraint calculation result is as shown in Figure 7 (b) in.

[0051] b. Element layout diagram drawing: According to the relevant design regulations, set the width of the main road in the residential area plane to refer to the 8m of the community road, and the secondary road refers to the 4m of the group road size. The green spaces and squares are drawn with each node representing an area of 8m*8m. Finally, draw in the order of building units, roads, public green spaces, and squares to obtain the complete drawing result of the residential area element layout diagram as shown in Figure 7 (c) in.

[0052] (3) The model training and data processing of the landscape scheme generation model based on Stable Diffusion + Lora are as follows: 1) Dataset preparation: Use a crawler tool to crawl data from relevant search engines with keywords such as "residential area landscape plan", "community landscape plan", and "residential area landscape scheme". Clean the crawled data, remove duplicate, incomplete, and irrelevant pictures, and obtain the original dataset C of residential area landscape plans.

[0053] 2) Dataset processing: The processed dataset C includes plan drawings and label texts. First, format all plan drawings, unify the size to 1024*1024, ensure that the images are not distorted and clear, and can clearly express the landscape design content in the scheme. Then, annotate the content of the plan drawings with text labels, remove irrelevant information and possible noise in the label texts, so that the label texts can clearly describe the overall and local content and style of the landscape design.

[0054] 3) Model construction and training: The design scheme generation model adopts an architecture that combines Stable Diffusion and Lora. The StableDiffusion model and the Lora model are combined to obtain the landscape scheme generation model. Since directly training the SD model requires high data volume and computing power, the SD large model is fine-tuned (indirect training) by training the Lora lightweight fine-tuning model to achieve efficient image generation tasks. Stable Diffusion is used as the basic model, and the Lora technology is introduced to adaptively fine-tune the model, making the model more adaptable to the performance on the residential area landscape plan drawings, while reducing the computational cost of training. The network structure diagram of the design scheme generation model is as Figure 8 shown.

[0055] As Figure 8 shown, z, zt, zt-1 are latent representations at different time steps. "zt" represents the current latent state, and "zt-1" represents the latent state of the previous time step; Q, K, and V represent Query, Key, and Value respectively; A and B represent weight matrices; when the model generates, the initial image is transformed into latent features z through the VAE encoder, Gaussian noise is added to the latent features z during the diffusion process to form a noisy image zt. The prompt word obtains the text embedding ∂ through the text encoder. The denoising process combines the text embedding ∂ and the noisy image zt to gradually remove the noise through multiple iterations to obtain the denoised latent features zt-1. ControlNet (conditional control network) can further control the image generation process according to the preprocessed conditional information c. Finally, the denoised latent noise zt-1 is reconstructed into a pixel-level image through the VAE decoder to complete the image generation based on the initial image and the prompt word.

[0056] a. Model training: The principle of Lora model training is to improve the performance of specific tasks by performing adaptive fine-tuning on the basis of existing pre-trained models. By introducing low-rank matrices, the large model can be efficiently fine-tuned, avoiding the huge computational and storage costs required for full training.

[0057] The model uses the processed dataset C as the training dataset, selects a pre-trained large model suitable for landscape tasks as the basis, and retains its original weights. Insert low-rank matrices into the key layers of the base model, freeze the original pre-trained weights, and train the low-rank matrices.

[0058] During the training process, the gradient descent optimization algorithm (Adam algorithm) is used to optimize the low-rank matrices to minimize the loss function and improve the quality of the generated images; appropriate learning rates and batch sizes are set according to the complexity of the task to ensure the stability and efficiency of the training process. In terms of training configuration, the method controls the number of training steps between 4000 and 15000 steps, and the number of training sampling times for each image between 20 and 50 times.

[0059] b. Generation of residential area landscape plan: The obtained Lora model is used to generate the residential area landscape plan. According to the design requirements of the residential area landscape plan, select a suitable large landscape model, combine the trained Lora model and the recommended default parameter values of each model to generate a residential area landscape plan that meets the requirements. The default preset parameters (parameters when using the SD model) mainly include: positive and negative guidance words, sampling methods, sizes, prompt word guidance coefficients, and random number seeds, etc.

[0060] During the model training process, fix the random number seed, and use the graph to screen out the excellent model iteration steps and Lora model weight values. By analyzing the performance of the model under different weights and steps, select the best parameter configuration to ensure that the generated residential area landscape plan not only meets the design requirements but also reaches the ideal standard in terms of visual effect and spatial layout.

[0061] Through the two steps of Lora model training and residential area landscape plan generation, the model can achieve an efficient landscape plan generation process based on Stable Diffusion. Under the fine-tuning of Lora, the model can quickly adapt to the landscape plan dataset with less data volume and show high quality and efficiency in the generation task.

[0062] The present invention uses a similarity-based recommendation method to generate the residential area landscape floor plan, efficiently utilizes small-sample and high-quality residential area landscape schemes, learns the distribution of various landscape elements in the recommended schemes, adapts to the site boundaries, and realizes the generation of the residential area landscape plane based on small samples. Based on the similarity-based recommendation technology, the present invention quickly screens out the layout data most suitable for the current needs from the existing design schemes, makes site adaptability adjustments on this basis, and finally generates a landscape plane layout map that meets the actual needs.

[0063] Key points and beneficial effects of the innovation of the present invention: (1) The present invention breaks through the limitations of the traditional end-to-end generation in the landscape field, organically combines three key steps of recommendation, adjustment, and stylization processing, integrates them into a coherent design generation method, designs and implements a method for generating a residential area landscape floor plan based on similarity recommendation, and effectively reduces the influence of the number of data sets on the generation quality.

[0064] (2) The present invention converts the design conditions and design elements in the residential area landscape floor plan into a reasonable graph structure, and then uses a graph neural network model to evaluate the similarity between the design conditions, and gives the current optimal landscape design scheme for different design conditions.

[0065] (3) The present invention introduces regularized node adjustment and element drawing to ensure that the generated residential area landscape floor plan meets the requirements of space, function, etc., increases the standardization and executability of the generation results; at the same time, improves the visual effect with the help of the generation model, and improves the work efficiency of landscape design.

[0066] Furthermore, as Figure 2 shown, based on the above-mentioned method for generating a residential area landscape floor plan based on similarity recommendation, the present invention also correspondingly provides a system for generating a residential area landscape floor plan based on similarity recommendation, wherein the system for generating a residential area landscape floor plan based on similarity recommendation includes: A landscape scheme recommendation model, which is used to perform similarity analysis on the building node connection diagram and output a reference scheme full node connection diagram according to the similarity analysis result; A design layout generation model, which is used to perform design layout according to the reference scheme full node connection diagram, the generated scheme building node diagram, and the generated scheme boundary condition diagram to obtain the generated scheme landscape element layout diagram; A landscape scheme generation model, which is used to perform stylization processing on the generated scheme landscape element layout diagram to obtain the generated scheme landscape plane effect diagram of the target residential area.

[0067] Furthermore, as Figure 9As shown, based on the above method and system for generating a residential area landscape plan drawing based on similarity recommendation, the present invention also correspondingly provides a terminal, which includes a processor 10, a memory 20, and a display 30. Figure 9 Only some components of the terminal are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.

[0068] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as the hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk equipped on the terminal, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 20 may also include both the internal storage unit and the external storage device of the terminal. The memory 20 is used to store application software installed on the terminal and various types of data, such as the program code for installing the terminal. The memory 20 may also be used to temporarily store data that has been output or will be output. In one embodiment, a program 40 for generating a residential area landscape plan drawing based on similarity recommendation is stored on the memory 20, and this program 40 for generating a residential area landscape plan drawing based on similarity recommendation can be executed by the processor 10, thereby implementing the method for generating a residential area landscape plan drawing based on similarity recommendation in this application.

[0069] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chips, and is used to run the program code stored in the memory 20 or process data, such as executing the method for generating a residential area landscape plan drawing based on similarity recommendation, etc.

[0070] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The processor 10, the memory 20, and the display 30 of the terminal communicate with each other through a system bus.

[0071] In one embodiment, when the processor 10 executes the program 40 for generating a residential area landscape plan drawing based on similarity recommendation stored in the memory 20, the steps of the method for generating a residential area landscape plan drawing based on similarity recommendation as described above are implemented.

[0072] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program for generating a residential area landscape plan view based on similarity recommendation. When the program for generating a residential area landscape plan view based on similarity recommendation is executed by a processor, the steps of the method for generating a residential area landscape plan view based on similarity recommendation as described above are implemented.

[0073] In summary, the present invention provides a method, a system, a terminal and a computer-readable storage medium for generating a residential area landscape plan view based on similarity recommendation. The method includes: obtaining a building node connection diagram of a target residential area, inputting the building node connection diagram into a landscape plan recommendation model, the landscape plan recommendation model performing similarity analysis on the building node connection diagram, and outputting a reference plan full-node connection diagram according to the similarity analysis result; obtaining a generated plan building node diagram and a generated plan boundary condition diagram, inputting the reference plan full-node connection diagram, the generated plan building node diagram and the generated plan boundary condition diagram into a design layout generation model, the design layout generation model performing design layout according to the reference plan full-node connection diagram, the generated plan building node diagram and the generated plan boundary condition diagram to obtain a generated plan landscape element layout diagram; inputting the generated plan landscape element layout diagram into a landscape plan generation model, the landscape plan generation model performing stylization processing on the generated plan landscape element layout diagram to obtain a generated plan landscape plan view effect diagram of the target residential area. Based on the similarity recommendation technology, the present invention quickly screens out the most suitable layout data from the existing design plans, and performs site adaptability adjustment on this basis, and finally generates a landscape plan layout that meets the actual requirements, effectively reducing the impact of the number of data sets on the generation quality and improving the work efficiency of landscape design.

[0074] It should be noted that in this article, the terms "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or terminal including the element.

[0075] Certainly, those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium that can be read by a computer. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disk, etc.

[0076] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or modifications can be made according to the above description, and all such improvements and modifications shall fall within the protection scope of the appended claims of the present invention.

Claims

1. A method for generating a landscape plan of a residential area based on similarity recommendation, characterized in that, The method for generating a residential area landscape plan view based on similarity recommendation includes: Obtain the building node connection diagram of the target residential area, input the building node connection diagram into the landscape plan recommendation model. The landscape plan recommendation model performs similarity analysis on the building node connection diagram and outputs a reference plan full node connection diagram according to the similarity analysis result; Obtain the generated plan building node diagram and the generated plan boundary condition diagram, input the reference plan full node connection diagram, the generated plan building node diagram, and the generated plan boundary condition diagram into the design layout generation model. The design layout generation model performs design layout according to the reference plan full node connection diagram, the generated plan building node diagram, and the generated plan boundary condition diagram to obtain the generated plan landscape element layout diagram; Input the generated plan landscape element layout diagram into the landscape plan generation model. The landscape plan generation model performs stylization processing on the generated plan landscape element layout diagram to obtain the generated plan landscape plan view of the target residential area.

2. The method for generating a residential area landscape plan view based on similarity recommendation according to claim 1, wherein The step of obtaining the building node connection diagram of the target residential area, inputting the building node connection diagram into the landscape plan recommendation model, the landscape plan recommendation model performing similarity analysis on the building node connection diagram, and outputting a reference plan full node connection diagram according to the similarity analysis result specifically includes: Obtain the generated plan building node connection diagram of the target residential area and multiple reference plan building node connection diagrams, and input them into the landscape plan recommendation model based on similarity recommendation; The landscape plan recommendation model uses a graph convolutional network to encode the generated plan building node connection diagram and each reference plan building node connection diagram into low-dimensional embedding vectors respectively, and uses an attention mechanism to calculate the matching weights between nodes to obtain the similarity scores between the generated plan building node connection diagram and each reference plan building node connection diagram, and outputs the reference plan full node connection diagram corresponding to the reference plan with the highest similarity score.

3. The method for generating a residential area landscape plan view based on similarity recommendation according to claim 1, characterized in that The training process of the landscape plan recommendation model includes: Use a random graph model to randomly generate graph pair data to construct the original dataset A, and collect satellite images of residential communities with building layouts to construct the original dataset B; Calculate the graph edit distance between each pair of graphs in the original dataset A by combining graph editing operations and heuristic search. The graph edit distance is used to measure the structural similarity between two graphs; Perform preprocessing and partitioning on the original dataset B to respectively obtain the generated plan dataset and the reference plan dataset of the landscape plan recommendation model; Generate node features through the global label set, convert the label of each node into a binary vector with a fixed dimension, convert the original edge list into a symmetric adjacency matrix, and represent it as an undirected graph. Normalize the graph edit distance, and through exponential function conversion, map the data to a preset interval as the true value of similarity. The data input into the landscape plan recommendation model includes the node feature matrices, adjacency matrices, and target values of two graphs; Use a multi-layer graph convolutional network to perform representation learning on the nodes in each input graph to generate node-level embeddings; After obtaining the embeddings of each node, the node embeddings are aggregated into a global representation representing the entire graph through an attention mechanism to capture the overall structural information of the graph; The embeddings of corresponding nodes in the two graphs are compared to obtain a node pairing similarity matrix, and the histogram of the node pairing similarity matrix is calculated. Through a tensor product operation, the graph-level embedding and node-level representation of each graph are combined to obtain a feature vector; Predictions are made through a fully connected layer based on the histogram and the feature vector, and a normalized similarity score is output; Among them, the loss function of the landscape scheme recommendation model uses the mean squared error, and the optimization process uses the Adam algorithm.

4. The method for generating a residential area landscape plan based on similarity recommendation according to claim 3, wherein, The preprocessing includes: spatial standardization, feature extraction and normalization, and creation of boundary condition graphs and node connection graphs.

5. The method for generating a residential area landscape floor plan based on similarity recommendation according to claim 4, wherein The preprocessing of the original dataset B specifically includes: Performing spatial standardization on all graphic data in the original dataset B, converting all floor plans into a unified coordinate system, and scaling according to a set standard ratio to make the spatial scales of different design schemes consistent; Using the SegNet semantic segmentation model to segment each floor plan in the original dataset B, obtaining the distribution of landscape design elements of each floor plan, normalizing all elements except the site boundary, and representing each corresponding element by calculating the geometric center point of each element to eliminate drawing differences between different schemes; Extracting the site boundary data in the original dataset B, analyzing the spatial relationship between the building and the site boundary to obtain a boundary condition graph, and creating a full node connection graph and a building node connection graph for each element node according to the adjacency relationship between different elements; The generated scheme dataset includes: the scheme diagram, boundary condition graph, and building node connection graph of each scheme; The reference scheme dataset includes: the scheme diagram, full node connection graph, and building node connection graph of each scheme.

6. The method for generating a residential area landscape floor plan based on similarity recommendation according to claim 1, wherein The design layout generation model performs a design layout based on the reference scheme full node connection graph, the generated scheme building node graph, and the generated scheme boundary condition graph to obtain a generated scheme landscape element layout diagram, specifically including: Deleting the building nodes, entrance and exit nodes, and related connection lines in the reference scheme full node connection graph, and supplementing the building nodes and entrance and exit nodes of the generated scheme to obtain the generated scheme full node connection graph; Based on the generated scheme full node connection graph and the generated scheme boundary condition graph, perform position matching, node position adjustment, and element drawing to draw the generated scheme landscape element layout diagram.

7. The method for generating a residential area landscape plan based on similarity recommendation according to claim 1, characterized in that The training process of the landscape scheme generation model includes: Using a crawler tool to perform data crawling according to preset keywords, cleaning the crawled data, and removing duplicate, incomplete, and irrelevant pictures to obtain the original dataset C of residential area landscape floor plans, where the original dataset C includes floor plans and label texts; Performing formatting processing on all floor plans, performing text label annotation on the content of the floor plans, and removing irrelevant information and noise in the label texts to obtain the processed dataset C; Using a combination of a stable diffusion model and a low-rank adaptation model to obtain a landscape scheme generation model; Use the processed dataset C as the training dataset, retain the original weights of the Stable Diffusion model, insert low-rank matrices in the key layers of the Stable Diffusion model, freeze the original pre-trained weights, and train the low-rank matrices; During the training process, use the gradient descent optimization algorithm to optimize the low-rank matrices to minimize the loss function, and set the learning rate and batch size according to the complexity of the task; According to the design requirements of the residential area landscape plan, use the trained landscape plan generation model to generate the generated plan landscape plan effect diagram that meets the requirements.

8. A residential area landscape plan drawing generation system based on similarity recommendation, characterized in that, The residential area landscape plan generation system based on similarity recommendation includes: A landscape plan recommendation model for performing similarity analysis on the building node connection diagram and outputting a reference plan full-node connection diagram according to the similarity analysis result; A design layout generation model for performing design layout based on the reference plan full-node connection diagram, the generated plan building node diagram, and the generated plan boundary condition diagram to obtain the generated plan landscape element layout diagram; A landscape plan generation model for stylizing the generated plan landscape element layout diagram to obtain the generated plan landscape plan effect diagram of the target residential area.

9. A terminal, characterized in that, The terminal includes: a memory, a processor, and a residential area landscape plan generation program based on similarity recommendation stored on the memory and executable on the processor. When the residential area landscape plan generation program based on similarity recommendation is executed by the processor, it implements the steps of the residential area landscape plan generation method based on similarity recommendation according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a residential area landscape plan generation program based on similarity recommendation. When the residential area landscape plan generation program based on similarity recommendation is executed by a processor, it implements the steps of the residential area landscape plan generation method based on similarity recommendation according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for generating rural complex planning layout scheme, and medium

    CN118396248A

  • Generative Interior Design in Video Games

    US20230061250A1