A method, system, terminal and storage medium for generating residential area landscape plan based on similarity recommendation

Through a similarity-based recommendation method, the graph convolutional network and attention mechanism are used to calculate the similarity of the building node connection graph. Combined with the design layout and generation model, the problem that landscape design in the existing technology cannot autonomously generate landscapes that meet actual needs is solved, and efficient landscape plan layout generation is achieved.

CN120219552BActive Publication Date: 2025-09-05SHENZHEN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies based on machine learning cannot completely and autonomously generate landscape plan layouts that meet actual needs during landscape design, and data set collection and annotation are difficult.

Method used

A similarity-based recommendation method is adopted to calculate the similarity of the building node connection graph through the graph convolutional network and attention mechanism. Combined with the design layout generation model and the landscape scheme generation model, the layout data that best suits the current needs can be quickly screened from the existing design schemes, and site adaptability adjustments can be made.

Benefits of technology

Effectively reduce the impact of the number of data sets on the generation quality, improve the work efficiency of landscape design, and generate landscape plan layouts that meet actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219552B_ABST
    Figure CN120219552B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and discloses a method, system, terminal, and storage medium for generating a residential landscape plan based on similarity recommendation. The method comprises: a landscape scheme recommendation model performs similarity analysis on a building node connection diagram and outputs a reference scheme full node connection diagram; a design layout generation model performs design layout based on the reference scheme full node connection diagram, a generated scheme building node diagram, and a generated scheme boundary condition diagram to obtain a generated scheme landscape element layout diagram; and the landscape scheme generation model performs stylized processing on the generated scheme landscape element layout diagram to obtain a generated scheme landscape plan rendering. Based on similarity recommendation technology, the present invention quickly screens out layout data that best suits current needs, and on this basis, performs site adaptability adjustments, ultimately generating a landscape plan layout diagram that meets actual needs, effectively reducing the impact of the number of data sets on generation quality and improving the work efficiency of landscape design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, 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 rapidly developing urbanization process, landscape design has received widespread attention as an important means to improve the living environment and enhance the quality of cities. Traditional landscape design, as a design approach with a long history, has gradually formed and continuously improved its processes and methods through long-term practice. However, with the diversification of social needs, the increasing awareness of ecological and environmental protection, and the rapid development of modern science and technology, traditional landscape design processes have gradually revealed some disadvantages, making it difficult to fully meet the high demands of modern society for landscape design. Against the backdrop of the rapid development of digital technology, the disadvantages of traditional landscape design processes have become increasingly apparent, such as low design efficiency and lack of flexibility in the design process. Modern landscape design is gradually moving towards digitalization and intelligence.

[0003] Machine learning has rapidly developed in the field of architecture, but its application in landscape design has been less explored. As an element closely related to architecture, landscape design is a unique and critical design task, involving design issues such as the coordination of element placement and the construction of a perceptual landscape space. Currently, parametric modeling tools can generate unique optimal solutions but are unable to independently generate designs. Generative Adversarial Network (GAN) models achieve end-to-end generation of park plans through supervised learning. For example, pix2pix (Image-to-Image Translation with Conditional Adversarial Networks) and CycleGAN (Cycle-Consistent Adversarial Networks) have been used to automatically design small and medium-sized parks and green spaces based on simple sketches. For example, pix2pix can be used to generate small residential garden plans from simple sketches. However, this requires the model to be provided with a simple design sketch and cannot generate plan plans completely autonomously.

[0004] Due to data limitations, the application of machine learning in landscape design is still in its early stages. The complex spatial layout of landscape schemes makes it difficult to collect and annotate high-quality datasets.

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

[0006] The main purpose of the present invention is to provide a method, system, terminal and computer-readable storage medium for generating residential area landscape plan based on similarity recommendation, aiming to solve the problem in the existing technology that machine learning is unable to generate plan plans completely independently when performing landscape design, and is unable to generate landscape plan layouts that meet actual needs.

[0007] To achieve the above object, the present invention provides a method for generating a residential area landscape plan based on similarity recommendation, the method comprising the following steps:

[0008] Obtaining a building node connection diagram of a target residential area, inputting the building node connection diagram into a landscape scheme recommendation model, wherein the landscape scheme recommendation model performs a similarity analysis on the building node connection diagram and outputs a full node connection diagram of a reference scheme based on the similarity analysis results;

[0009] Obtaining a generation scheme building node graph and a generation scheme boundary condition graph, inputting the reference scheme full node connection graph, the generation scheme building node graph, and the generation scheme boundary condition graph into a design layout generation model, wherein the design layout generation model performs design layout according to the reference scheme full node connection graph, the generation scheme building node graph, and the generation scheme boundary condition graph to obtain a generation scheme landscape element layout graph;

[0010] The generated plan landscape element layout diagram is input into a landscape plan generation model, and the landscape plan generation model performs stylized processing on the generated plan landscape element layout diagram to obtain a generated plan landscape plan rendering of the target residential area.

[0011] Optionally, the method for generating a residential area landscape plan based on similarity recommendation, wherein the step of obtaining a building node connection diagram of a target residential area, inputting the building node connection diagram into a landscape scheme recommendation model, performing a similarity analysis on the building node connection diagram, and outputting a full node connection diagram of a reference scheme based on the similarity analysis results, specifically comprises:

[0012] Obtaining a building node connection diagram of a generated scheme and multiple building node connection diagrams of a target residential area, and inputting them into a landscape scheme recommendation model based on similarity recommendation;

[0013] The landscape scheme recommendation model uses a graph convolutional network to encode the generated scheme building node connection graph and each reference scheme building node connection graph into low-dimensional embedding vectors, and uses the attention mechanism to calculate the matching weights between nodes, obtains the similarity score between the generated scheme building node connection graph and each reference scheme building node connection graph, and outputs the reference scheme full node connection graph corresponding to the reference scheme with the highest similarity score.

[0014] Optionally, in the method for generating a residential area landscape plan based on similarity recommendation, the training process of the landscape plan recommendation model includes:

[0015] Use random graph models to randomly generate graph pair data to construct the original dataset A, and collect satellite images of residential areas with building layouts to construct the original dataset B;

[0016] By combining graph editing operations and heuristic search, the graph editing distance between each pair of graphs in the original dataset A is calculated. The graph editing distance is used to measure the structural similarity between two graphs.

[0017] Preprocessing and dividing the original data set B to obtain a generated scheme data set and a reference scheme data set of a landscape scheme recommendation model;

[0018] Node features are generated from a global label set. Each node label is converted into a fixed-dimensional binary vector. The original edge list is converted into a symmetric adjacency matrix and represented as an undirected graph. The graph edit distance is normalized and converted using an exponential function to map the data to a preset interval. This interval serves as the true value of the similarity. The data input to the landscape proposal recommendation model includes the node feature matrix, adjacency matrix, and target value of the two graphs.

[0019] Use a multi-layer graph convolutional network to learn representations of nodes in each input graph and generate node-level embeddings;

[0020] After obtaining the embedding of each node, the node embeddings are aggregated into a global representation representing the entire graph through the attention mechanism to capture the overall structural information of the graph;

[0021] Compare the embeddings of corresponding nodes in the two graphs to obtain a node pair similarity matrix, and calculate the histogram of the node pair similarity matrix. Combine the graph-level embedding and node-level representation of each graph through a tensor product operation to obtain a feature vector;

[0022] The fully connected layer makes predictions based on the histogram and feature vector, and outputs the normalized similarity score;

[0023] The loss function of the landscape scheme recommendation model adopts mean square error, and the optimization process adopts Adam algorithm.

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

[0025] Optionally, in the method for generating a residential area landscape plan based on similarity recommendation, the preprocessing of the original dataset B specifically includes:

[0026] Perform spatial standardization on all graphic data in the original data set B, convert all plan views into a unified coordinate system, and scale them according to a set standard ratio to ensure that the spatial scales of different design schemes are consistent;

[0027] Each floor plan in the original dataset B is segmented using the SegNet semantic segmentation model to obtain the distribution of landscape design elements in each floor plan. All elements except the site boundary are normalized, and the geometric center point of each element is calculated to represent the corresponding element, so as to eliminate the drawing differences between different schemes.

[0028] Extract the site boundary data in the original dataset 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 based on the adjacency relationship between different elements;

[0029] The generated scheme data set includes: a scheme diagram, a boundary condition diagram and a building node connection diagram of each scheme;

[0030] The reference solution dataset includes: a solution diagram, a full node connection diagram, and a building node connection diagram for each solution.

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

[0032] 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;

[0033] Based on the full node connection diagram of the generation scheme and the boundary condition diagram of the generation scheme, position matching, node position adjustment and element drawing are performed to obtain the landscape element layout diagram of the generation scheme.

[0034] Optionally, in the method for generating a residential area landscape plan based on similarity recommendation, the training process of the landscape plan generation model includes:

[0035] Use a crawler tool to crawl data based on preset keywords, clean the crawled data, remove duplicate, incomplete, and irrelevant images, and obtain the original dataset C of residential landscape floor plans. The original dataset C includes floor plans and label text.

[0036] Format all floor plans, annotate their contents with text labels, remove irrelevant information and noise from the label text, and obtain the processed dataset C;

[0037] The landscape scheme generation model is obtained by combining the stable diffusion model and the low-rank adaptation model;

[0038] 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;

[0039] During training, the low-rank matrix is ​​optimized using the gradient descent optimization algorithm to minimize the loss function, and the learning rate and batch size are set according to the complexity of the task;

[0040] According to the design requirements of the residential area landscape plan, the trained landscape plan generation model is used to generate a landscape plan rendering that meets the requirements.

[0041] In addition, to achieve the above-mentioned purpose, the present invention further 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:

[0042] Landscape scheme recommendation model, used to perform similarity analysis on building node connection diagrams and output the full node connection diagram of the reference scheme based on the similarity analysis results;

[0043] The design layout generation model is used to perform design layout based on the reference scheme full node connection diagram, the generated scheme building node diagram, and the generated scheme boundary condition diagram, and obtain the generated scheme landscape element layout diagram;

[0044] The landscape scheme generation model is used to stylize the landscape element layout diagram of the generation scheme to obtain the landscape plan rendering of the target residential area.

[0045] In addition, to achieve the above-mentioned purpose, 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 runnable on the processor, wherein the residential area landscape plan generation program based on similarity recommendation implements the steps of the residential area landscape plan generation method based on similarity recommendation as described above when executed by the processor.

[0046] In addition, to achieve the above-mentioned purpose, 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, and when the residential area landscape plan generation program based on similarity recommendation is executed by a processor, the steps of the residential area landscape plan generation method based on similarity recommendation as described above are implemented.

[0047] In the present invention, a building node connection diagram of a target residential area is obtained and input into a landscape scheme recommendation model. The landscape scheme recommendation model performs a similarity analysis on the building node connection diagram and outputs a reference scheme full node connection diagram based on the similarity analysis results. A generated scheme building node diagram and a generated scheme boundary condition diagram are obtained and input into a design layout generation model. The design layout generation model performs a design layout based on the reference scheme full node connection diagram, the generated scheme building node diagram, and the generated scheme boundary condition diagram to obtain a generated scheme landscape element layout diagram. The generated scheme landscape element layout diagram is input into the landscape scheme generation model. The landscape scheme generation model performs stylized processing on the generated scheme landscape element layout diagram to obtain a generated scheme landscape plan rendering of the target residential area. Based on similarity recommendation technology, the present invention quickly selects the layout data that best suits current needs from existing design schemes, and performs site adaptability adjustments based on this, ultimately generating a landscape plan rendering that meets actual needs. This effectively reduces the impact of the number of data sets on generation quality and improves the work efficiency of landscape design. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention;

[0049] Figure 2 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;

[0050] Figure 3 1 is a schematic diagram of the map edit distance in a preferred embodiment of the method for generating a residential area landscape plan map based on similarity recommendation of the present invention;

[0051] Figure 4 1 is a schematic diagram of a result of semantic segmentation of a residential area plan view in a preferred embodiment of the method for generating a residential area landscape plan view based on similarity recommendation of the present invention;

[0052] Figure 52 is a schematic diagram of a landscape plan recommendation model training process in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention;

[0053] Figure 6 It is a schematic diagram of generating a landscape element layout diagram by a design layout generation model in a preferred embodiment of the residential area landscape plan generation method based on similarity recommendation of the present invention;

[0054] Figure 7 It is a schematic diagram of performing node matching, boundary constraint calculation and generating 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;

[0055] Figure 8 1 is a schematic diagram of a network structure of a landscape plan generation model in a preferred embodiment of the method for generating a residential area landscape plan based on similarity recommendation of the present invention;

[0056] Figure 9 FIG. 4 is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0058] The method for generating a residential landscape plan based on similarity recommendation according to a preferred embodiment of the present invention is as follows: Figure 1 and Figure 2 As shown, the method for generating a residential area landscape plan based on similarity recommendation includes the following steps:

[0059] Step S10: Obtain a building node connection diagram of the target residential area, input the building node connection diagram into a landscape scheme recommendation model, and perform a similarity analysis on the building node connection diagram, and output a full node connection diagram of a reference scheme based on the similarity analysis results.

[0060] Step S20: Obtain a building node diagram of a generation scheme and a boundary condition diagram of a generation scheme, input the reference scheme full node connection diagram, the generation scheme building node diagram, and the generation scheme boundary condition diagram into a design layout generation model, and 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 landscape element layout diagram of the generation scheme.

[0061] Step S30: input the generated plan landscape element layout diagram into a landscape plan generation model, and the landscape plan generation model performs stylized processing on the generated plan landscape element layout diagram to obtain a generated plan landscape plan rendering of the target residential area.

[0062] like Figure 2 As shown, the process of the residential area landscape plan generation method based on similarity recommendation of the present invention consists of three parts, as follows:

[0063] The first is a landscape scheme recommendation model based on similarity recommendation. The input data is the building node connection graph of the target residential area (the building node connection graph of the generated scheme and the building node connection graphs of multiple reference schemes). The landscape scheme recommendation model uses graph convolutional networks (GCN) to encode the building node connection graph of the generated scheme and each reference scheme into low-dimensional embedding vectors respectively, and uses the attention mechanism to calculate the matching weights between the nodes to achieve the similarity measurement of the two node connection graphs, obtain the similarity score between the building node connection graph of the generated scheme and each reference scheme building node connection graph, and output the full node connection graph of the reference scheme corresponding to the most similar reference scheme (that is, the one with the highest prediction score).

[0064] The second is the design layout generation model of the residential landscape scheme. The design layout generation model uses the reference scheme full node connection diagram, the generated scheme boundary condition diagram and the generated scheme building node connection diagram output by the landscape scheme recommendation model as input data. After boundary adjustment, node-element conversion and other operations, the generated scheme landscape element layout diagram containing five design elements: entrance and exit locations, building locations, roads, public green spaces and entrance squares is obtained.

[0065] The third is a landscape scheme generation model based on stable diffusion + Lora (Low-Rank Adaptation). The landscape scheme generation model takes the generated scheme landscape element layout map output by the design layout generation model as input, uses "residential area plan" and "landscape plan" as guide words, and combines the trained Lora model to stylize the input data to obtain a generated scheme landscape plan rendering with richer design details such as plant arrangement and road grass texture.

[0066] (1) The model training and data processing of the landscape scheme recommendation model based on similarity recommendation are as follows:

[0067] 1) Dataset preparation:

[0068] The dataset of the landscape scheme recommendation model is divided into two parts: the original dataset A (image pair data) used to train the model and the original dataset B (satellite image of residential areas).

[0069] We construct the original dataset A by randomly generating graph pairs using a random graph model (such as the Erdős-Reni random graph model). Each graph has 5 to 16 nodes, and the edge connection probability is between 0.4 and 0.7. The generated graphs are guaranteed to be connected, avoiding isolated nodes to ensure the validity of the subsequent graph edit distance (GED) calculation.

[0070] The original dataset B is constructed by collecting satellite images of residential areas with building layouts. The original dataset B is derived from the original satellite images, ensuring that the collected data are drawn at a uniform scale and contain a relatively complete landscape design layout, which is convenient for subsequent data labeling and processing.

[0071] 2) Dataset processing:

[0072] The graph edit distance (GED) between each pair of graphs in the original dataset A is calculated. This distance measures the structural similarity between the two graphs ( Figure 3 A schematic diagram showing the graph edit distance, such as Figure 3 As shown in the figure, the operations are deletion → addition → remapping. A heuristic optimization algorithm is used to quickly estimate the minimum number of edit operations (including the addition, deletion, and remapping of nodes and edges). By combining graph edit operations with heuristic search, the graph edit distance is approximated. While avoiding exhaustive searching of all possible solutions, the optimal solution is quickly found. The result of the first iteration is used as the GED label for the graph pair. The final dataset A consists of 11,000 graph pair files with GED data added. Each graph pair file includes the graph (edge ​​list), label (node ​​degree), and GED data of two graphs (graph pair data is generated using the Erdős-Reni random graph model, meaning that two graphs are included in one file. The two graphs here are two random graphs generated during the dataset preparation phase within a graph pair file).

[0073] The original dataset B was preprocessed and partitioned to obtain the generated scenario dataset and the reference scenario dataset for the landscape proposal recommendation model. The generated scenario dataset mainly contains the landscape design preset information, including buildings, entrances, and site boundaries extracted from the landscape proposal. The reference scenario dataset focuses on extracting the functional elements of the landscape proposal, mainly including buildings, roads, public green spaces, squares, etc.

[0074] The specific operations of data preprocessing of the original data set B are as follows:

[0075] a. Spatial Standardization: To ensure that all design proposals can be compared and calculated in a unified coordinate system, all graphic data must be spatially standardized. All floor plans will be converted to a unified coordinate system and scaled according to a set standard ratio to ensure that the spatial scale of different design proposals is consistent.

[0076] b. Feature Extraction and Normalization: First, each image in the original dataset B was segmented using the SegNet semantic segmentation model (SegNet is a deep, fully convolutional neural network architecture used for image semantic segmentation) to obtain the distribution of landscape design elements for each floor plan. Then, all elements except the site boundary were normalized, and each element was represented by calculating its geometric center point to eliminate differences in the drawings between different proposals.

[0077] The residential area plan includes site boundaries, entrance and exit locations, building locations, roads, public green spaces, and entrance and exit squares, e.g. Figure 4 shown.

[0078] c. Create a boundary condition diagram and node connection diagram: First, extract the site boundary data and analyze the spatial relationship between the building and the site boundary to obtain a boundary condition diagram. Then, based on the adjacency relationships between different elements, create a full node connection diagram and a building node connection diagram for each calculated element node. The square and green space are segmented into 8m*8m rectangles, and the nodes in these segmented rectangles are extracted as square nodes and public green space nodes.

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

[0080] 3) Model construction and training:

[0081] like Figure 5 As shown in the figure, during the training phase, a similarity graph neural network (simGNN model) is constructed based on the graph neural network (GNN). The simGNN model uses graph edit distance (GED) data as supervision and implements similarity measurement through graph convolutional networks (GCN), attention mechanism (ATT), neural tensor network (NTN) and node comparison technologies.

[0082] a. Input feature construction:

[0083] The similarity graph neural network generates node features from a global label set and converts each node label into a fixed-dimensional binary vector using one-hot encoding to ensure the structured expression of semantic information. The original edge list is converted into a symmetric adjacency matrix and represented as an undirected graph. The original graph edit distance (GED) data is normalized and converted using an exponential function to map the data to the interval (0, 1) as the true value of the similarity.

[0084] The final input contains the node feature matrix, adjacency matrix and target value of the two graphs.

[0085] b. Model architecture design (e.g. Figure 5 shown):

[0086] b1. Node feature extraction:

[0087] Multi-layer graph convolutional networks (GCNs) are used to learn representations of nodes in each input graph and generate node-level embeddings.

[0088] Each figure All are processed by independent graph convolutional networks (GCNs), which pass information through the adjacency relationship of nodes and gradually update the embedding representation of each node. These node embeddings capture the local structural information of the nodes. The input graphs share the same GCN parameters (meaning that when processing different graphs, all graphs use the same weights and bias parameters for convolution calculations, which are the parameters of the graph convolutional network), ensuring consistency in the feature space.

[0089] b2. Graph-level representation generation:

[0090] After obtaining the embedding of each node, the model aggregates the node embeddings into a global representation that can represent the entire graph through the attention mechanism (ATT), which can capture the overall structural information of the graph.

[0091] By embedding the node and node attention weight Perform weighted summation to get the embedding of the entire graph .

[0092] b3. Calculation of similarity between graphs:

[0093] The calculation of graph similarity mainly includes two parts: node-level pairwise comparison and neural tensor network.

[0094] The node-level pairwise comparison compares the embeddings of corresponding nodes in the two graphs to obtain a node pairwise similarity matrix and calculates the histogram of the 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.

[0095] b4. Prediction similarity:

[0096] The obtained histogram and feature vector are further processed by the fully connected layer, and the normalized similarity score y (i.e., prediction score) is output through the sigmoid function, y∈[0,1].

[0097] 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 a progressive strategy of 30% decay every 50 rounds to balance convergence speed and stability.

[0098] (2) The data processing of the residential landscape design layout generation model is as follows (e.g. Figure 6 shown):

[0099] 1) Get the full node connection diagram of the generation scheme:

[0100] The full node connection graph of the generated solution is calculated based on the most similar recommended solution. First, the building nodes, entrance and exit nodes, and related connection lines in the obtained full node connection graph of the reference solution are deleted; then, the building nodes and entrance and exit nodes of the generated solution are added to obtain the full node connection graph of the generated solution.

[0101] 2) Get the element layout diagram:

[0102] The element layout diagram is drawn based on the obtained full-node connection diagram of the generation scheme and the boundary condition diagram of the generation scheme.

[0103] First, the full node connection diagram of the generated solution is matched with the boundary condition diagram according to the corresponding relationship between the building nodes and the building units in the boundary condition diagram. The results are as follows: Figure 7 As shown in (a) in the figure. The following processing is required for the matching results:

[0104] a. Node position adjustment:

[0105] In accordance with relevant design specifications, a uniform range of 5m from the building unit entrance, 3m from non-entrance sides, and 2m from the gable side prohibits the construction of roads, public green spaces, and plazas. These are designated as building boundary constraints. Based on these building boundary constraints, road nodes, road connector plaza nodes, and public green space nodes are partially deleted, and connections between building nodes and the road system are supplemented along these boundaries.

[0106] According to the site red line boundary, the square nodes and public green space nodes outside the boundary are deleted; to ensure the integrity of the road system, the road nodes outside the boundary are adjusted to the inside of the boundary. The adjustment rule is: record the node a outside the boundary, calculate the node b closest to the boundary red line from point a, move node a along the a→b direction by 2 times the distance of line segment ab, and obtain the node adjustment diagram. The boundary constraint calculation results are as follows: Figure 7 As shown in (b) in .

[0107] b. Drawing of element layout:

[0108] According to relevant design regulations, the width of the main roads in the residential area is set to 8m, and the width of the secondary roads is set to 4m. The green space and square are drawn with each node representing an area of ​​8m*8m. Finally, the building units, roads, public green spaces, and squares are drawn in the order of drawing to obtain the complete residential area element layout drawing result as shown below. Figure 7 As shown in (c) in the figure.

[0109] (3) Model training and data processing of the landscape solution generation model based on Stable Diffusion + Lora are as follows:

[0110] 1) Dataset preparation:

[0111] Use crawler tools to crawl data from relevant search engines using the keywords "residential area landscape plan", "community landscape plan", and "residential area landscape plan". Clean the crawled data, remove duplicate, incomplete, and irrelevant images, and obtain the original dataset C of residential area landscape plan.

[0112] 2) Dataset processing:

[0113] The processed dataset C includes floor plans and labeled text. First, all floor plans were formatted to a uniform size of 1024*1024 to ensure that the images were distortion-free and clear, clearly expressing the landscape design content of the proposal. Then, the floor plans were annotated with text labels, removing irrelevant information and possible noise from the labels so that the labels clearly describe the overall and specific content and style of the landscape design.

[0114] 3) Model construction and training:

[0115] The design solution generation model adopts an architecture that combines Stable Diffusion and Lora. The Stable Diffusion model and the Lora model are combined to obtain the landscape solution generation model. Because direct training of the SD model requires a relatively high amount of data 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 Lora technology is introduced to adaptively fine-tune the model, making the model more suitable for the performance on the residential landscape plan, while reducing the computational cost of training. The network structure of the design solution generation model is shown below. Figure 8 shown.

[0116] like Figure 8 As shown in the figure, z, zt, and zt-1 are the latent representations at different time steps, "zt" represents the current latent state, and "zt-1" represents the latent state at the previous time step. Q, K, and V represent the query (Q), key (K), and value (V), respectively. A and B represent weight matrices. During model generation, the initial image is converted into a latent feature z through a VAE encoder. Gaussian noise is added to the latent feature z and diffused to form a noisy image zt. The prompt word is processed through a text encoder to obtain a text embedding ∂. The denoising process combines the text embedding ∂ with the noisy image zt through multiple iterations to gradually remove noise and obtain the denoised latent feature zt-1. The ControlNet (conditional control network) can further control the image generation process based on the preprocessed conditional information c. Finally, the denoised latent noise zt-1 is reconstructed into a pixel-level image through a VAE decoder, completing image generation based on the initial image and prompt word.

[0117] a. Model training:

[0118] The principle of Lora model training is to improve the performance of specific tasks by adaptively fine-tuning the existing pre-trained model, and to efficiently fine-tune the large model by introducing low-rank matrices, avoiding the huge computational and storage costs required for full training.

[0119] The model uses the processed dataset C as the training dataset and selects a pre-trained large model suitable for landscape tasks as the basis, retaining its original weights. A low-rank matrix is ​​inserted into the key layers of the base model, and the original pre-trained weights are frozen, and the low-rank matrix is ​​used for training.

[0120] During training, the gradient descent optimization algorithm (Adam algorithm) is used to optimize the low-rank matrix to minimize the loss function and improve the quality of the generated images. The learning rate and batch size are set appropriately based on the complexity of the task to ensure the stability and efficiency of the training process. In terms of training configuration, the method limits the number of training steps to between 4,000 and 15,000, and the number of training samples per image to between 20 and 50.

[0121] b. Generation of residential area landscape plan:

[0122] Use the obtained Lora model to generate residential landscape plan plans. Based on the design requirements, select an appropriate large-scale landscape model. Combine the trained Lora model with the default parameter recommendations for each model to generate a residential landscape plan that meets the requirements. The default parameters (parameters for the SD model) primarily include: forward and reverse guide words, sampling method, size, guide word coefficient, and random number seed.

[0123] During model training, we fixed a random seed and used a chart to identify the best performing model iterations and Lora model weights. By analyzing the model's performance at different weights and iterations, we selected the optimal parameter configuration, ensuring that the generated residential landscape plan not only met design requirements but also achieved ideal visual quality and spatial layout.

[0124] Through the two steps of Lora model training and residential landscape plan generation, the model can achieve efficient landscape plan generation based on Stable Diffusion. With Lora fine-tuning, the model can quickly adapt to landscape plan datasets with relatively small amounts of data and demonstrate high quality and efficiency in the generation task.

[0125] This invention uses a similarity-based recommendation method to generate residential landscape plans. This method efficiently utilizes a small sample of high-quality residential landscape proposals, learning the distribution of various landscape elements and adapting to site boundaries in the recommended proposals to achieve small-sample residential landscape plan generation. Based on similarity recommendation technology, the invention quickly selects the layout data that best suits the current needs from existing design proposals, then makes site-adaptive adjustments based on this data to ultimately generate a landscape plan that meets actual needs.

[0126] The key points and beneficial effects of the invention's innovations are:

[0127] (1) This invention breaks through the limitations of traditional end-to-end generation in the landscape field, organically combines the three key steps of recommendation, adjustment, and stylization, and integrates them into a coherent design generation method. It designs and implements a residential landscape plan generation method based on similarity recommendation, effectively reducing the impact of the number of data sets on the generation quality.

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

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

[0130] Furthermore, if Figure 2 As shown, based on the above-mentioned residential area landscape plan generation method based on similarity recommendation, 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:

[0131] Landscape scheme recommendation model, used to perform similarity analysis on building node connection diagrams and output the full node connection diagram of the reference scheme based on the similarity analysis results;

[0132] The design layout generation model is used to perform design layout based on the reference scheme full node connection diagram, the generated scheme building node diagram, and the generated scheme boundary condition diagram, and obtain the generated scheme landscape element layout diagram;

[0133] The landscape scheme generation model is used to stylize the landscape element layout diagram of the generation scheme to obtain the landscape plan rendering of the target residential area.

[0134] Furthermore, if Figure 9 As shown, based on the above-mentioned method and system for generating a residential area landscape plan based on similarity recommendation, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 9 Only some of the components of the terminal are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may be implemented instead.

[0135] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a 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, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal. Furthermore, the memory 20 may include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software installed on the terminal and various types of data, such as program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is about to be output. In one embodiment, the memory 20 stores a residential area landscape plan generation program 40 based on similarity recommendation. The residential area landscape plan generation program 40 based on similarity recommendation can be executed by the processor 10, thereby implementing the residential area landscape plan generation method based on similarity recommendation in the present application.

[0136] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes or process data stored in the memory 20, such as executing the method for generating a residential landscape plan based on similarity recommendation.

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

[0138] In one embodiment, when the processor 10 executes the residential area landscape plan generation program 40 based on similarity recommendation in the memory 20, the steps of the residential area landscape plan generation method based on similarity recommendation are implemented.

[0139] 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, and when the residential area landscape plan generation program based on similarity recommendation is executed by a processor, the steps of the residential area landscape plan generation method based on similarity recommendation as described above are implemented.

[0140] In summary, the present invention provides a method, system, terminal and computer-readable storage medium for generating a residential area landscape plan 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 scheme recommendation model, the landscape scheme recommendation model performing a similarity analysis on the building node connection diagram, and outputting a reference scheme full node connection diagram based on the similarity analysis results; obtaining a generated scheme building node diagram and a generated scheme boundary condition diagram, inputting the reference scheme full node connection diagram, the generated scheme building node diagram and the generated scheme boundary condition diagram into a design layout generation model, the design layout generation model performing a design layout based on the reference scheme full node connection diagram, the generated scheme building node diagram and the generated scheme boundary condition diagram to obtain a generated scheme landscape element layout diagram; inputting the generated scheme landscape element layout diagram into a landscape scheme generation model, the landscape scheme generation model stylizing the generated scheme landscape element layout diagram to obtain a generated scheme landscape plan rendering of the target residential area. Based on similarity recommendation technology, the present invention quickly selects the layout data that best suits the current needs from existing design schemes, and makes site adaptability adjustments on this basis, ultimately generating a landscape plan layout that meets actual needs, effectively reducing the impact of the number of data sets on the generation quality and improving the work efficiency of landscape design.

[0141] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or terminal comprising the element.

[0142] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, 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 executed, the program can include the processes in the above-described method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disk, etc.

[0143] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for generating a residential landscape plan based on similarity recommendation, characterized in that: The method for generating a residential area landscape plan based on similarity recommendation includes: Obtaining a building node connection diagram of a target residential area, inputting the building node connection diagram into a landscape scheme recommendation model, wherein the landscape scheme recommendation model performs a similarity analysis on the building node connection diagram and outputs a full node connection diagram of a reference scheme based on the similarity analysis results; The method of obtaining a building node connection diagram of a target residential area and inputting the building node connection diagram into a landscape scheme recommendation model, wherein the landscape scheme recommendation model performs a similarity analysis on the building node connection diagram and outputs a full node connection diagram of a reference scheme based on the similarity analysis result, specifically includes: Obtaining a building node connection diagram of a generated scheme and multiple building node connection diagrams of a target residential area, and inputting them into a landscape scheme recommendation model based on similarity recommendation; The landscape scheme recommendation model uses a graph convolutional network to encode the generated scheme building node connection graph and each reference scheme building node connection graph into low-dimensional embedding vectors, and uses an attention mechanism to calculate the matching weights between nodes, obtains the similarity score between the generated scheme building node connection graph and each reference scheme building node connection graph, and outputs the reference scheme full node connection graph corresponding to the reference scheme with the highest similarity score; Obtaining a generation scheme building node graph and a generation scheme boundary condition graph, inputting the reference scheme full node connection graph, the generation scheme building node graph, and the generation scheme boundary condition graph into a design layout generation model, wherein the design layout generation model performs design layout according to the reference scheme full node connection graph, the generation scheme building node graph, and the generation scheme boundary condition graph to obtain a generation scheme landscape element layout graph; 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 a generated scheme landscape element layout graph, specifically including: 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 generated solution and the boundary condition graph of the generated solution, position matching, node position adjustment and element drawing are performed to obtain the landscape element layout diagram of the generated solution; Inputting the generated plan landscape element layout diagram into a landscape plan generation model, the landscape plan generation model stylizing the generated plan landscape element layout diagram to obtain a generated plan landscape plan rendering of the target residential area; The residential landscape plan is generated based on the similarity recommendation method, which efficiently utilizes small sample, high-quality residential landscape plans, learns the distribution of various landscape elements in the recommended plans, adapts to the site boundaries, and realizes the generation of residential landscape plans based on small samples.

2. 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 recommendation model includes: Use random graph models to randomly generate graph pair data to construct the original dataset A, and collect satellite images of residential areas with building layouts to construct the original dataset B; By combining graph editing operations and heuristic search, the graph editing distance between each pair of graphs in the original dataset A is calculated. The graph editing distance is used to measure the structural similarity between two graphs. Preprocessing and dividing the original data set B to obtain a generated scheme data set and a reference scheme data set of a landscape scheme recommendation model; Node features are generated from a global label set. Each node label is converted into a fixed-dimensional binary vector. The original edge list is converted into a symmetric adjacency matrix and represented as an undirected graph. The graph edit distance is normalized and converted using an exponential function to map the data to a preset interval. This interval serves as the true value of the similarity. The data input to the landscape proposal recommendation model includes the node feature matrix, adjacency matrix, and target value of the two graphs. Use a multi-layer graph convolutional network to learn representations of nodes in each input graph and generate node-level embeddings; After obtaining the embedding of each node, the node embeddings are aggregated into a global representation representing the entire graph through the 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 pair similarity matrix, and calculate the histogram of the node pair similarity matrix. Combine the graph-level embedding and node-level representation of each graph through a tensor product operation to obtain a feature vector; The fully connected layer makes predictions based on the histogram and feature vector, and outputs the normalized similarity score; The loss function of the landscape scheme recommendation model adopts mean square error, and the optimization process adopts Adam algorithm.

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

4. The method for generating a residential area landscape plan based on similarity recommendation according to claim 3, characterized in that: The preprocessing of the original data set B specifically includes: Perform spatial standardization on all graphic data in the original data set B, convert all plan views into a unified coordinate system, and scale them according to a set standard ratio to ensure that the spatial scales of different design schemes are consistent; Each floor plan in the original dataset B is segmented using the SegNet semantic segmentation model to obtain the distribution of landscape design elements in each floor plan. All elements except the site boundary are normalized, and the geometric center point of each element is calculated to represent the corresponding element, so as to eliminate the drawing differences between different schemes. Extract the site boundary data in the original dataset 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 based on 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 dataset includes: a solution diagram, a full node connection diagram, and a building node connection diagram for each solution.

5. 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: Use a crawler tool to crawl data based on preset keywords, clean the crawled data, remove duplicate, incomplete, and irrelevant images, and obtain the original dataset C of residential landscape floor plans. The original dataset C includes floor plans and label text. Format all floor plans, annotate their contents with text labels, remove irrelevant information and noise from the label text, and obtain the processed dataset 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 training, the low-rank matrix is ​​optimized using the gradient descent optimization algorithm 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 a landscape plan rendering that meets the requirements.

6. A residential area landscape plan generation system based on similarity recommendation, characterized in that: The residential area landscape plan generation system based on similarity recommendation is applied to the residential area landscape plan generation method based on similarity recommendation according to any one of claims 1 to 5, and the residential area landscape plan generation system based on similarity recommendation includes: Landscape scheme recommendation model, used to perform similarity analysis on building node connection diagrams and output the full node connection diagram of the reference scheme based on the similarity analysis results; The design layout generation model is used to perform design layout based on the reference scheme full node connection diagram, the generated scheme building node diagram, and the generated scheme boundary condition diagram, and obtain the generated scheme landscape element layout diagram; The landscape scheme generation model is used to stylize the landscape element layout diagram of the generation scheme to obtain the landscape plan rendering of the target residential area.

7. 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 in the memory and runnable on the processor. When the residential area landscape plan generation program based on similarity recommendation is executed by the processor, the steps of the residential area landscape plan generation method based on similarity recommendation as described in any one of claims 1 to 5 are implemented.

8. 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, and when the residential area landscape plan generation program based on similarity recommendation is executed by a processor, the steps of the residential area landscape plan generation method based on similarity recommendation as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

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

    CN118396248A