Urban space layout generation method and device

CN122508666BActive Publication Date: 2026-10-23BEIJING FORESTRY UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610644544.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-12
Publication Date
2026-10-23
Estimated Expiration
2046-05-12

AI Technical Summary

Technical Problem

[0003]然而,在实现本发明构思的过程中,发现相关技术至少存在如下问题:相关技术中多通过经训练的模型输出设计好的布局图像,然而由于模型生成过程难以充分匹配实际设计需求,存在生成结果与设计需求脱节、实用性不足的技术问题

Benefits of technology

[0017]本发明的第五方面还提供了一种计算机程序产品,包括计算机程序或指令,上述计算机程序或指令被处理器执行时实现上述方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122508666B_ABST
    Figure CN122508666B_ABST
Patent Text Reader

Abstract

The application provides a city space layout generation method and device, which can be applied to the field of artificial intelligence technology. The method comprises the following steps: inputting a basic base map of a space to be planned into a layout generation model, taking space constraint elements included in the basic base map as constraint conditions, and generating an initial layout map including space layout elements; performing layout structure visualization and layout structure correction on the initial layout map based on the element state of each space layout element in the initial layout map and the space constraint elements, to obtain a corrected layout map; performing layout quality evaluation on the corrected layout map based on the distribution characteristics of the structured space layout elements in the corrected layout map, to obtain evaluation indexes; performing hierarchical decoupling processing on the corrected layout map, to obtain a hierarchical layout map including element layers; associating the element layers with the evaluation indexes, and displaying them in a display interface, so that a target object can edit each element layer; and generating a target layout map based on the edited hierarchical layout map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically to a method and device for generating urban spatial layout. Background Technology

[0002] With the continuous development of artificial intelligence technology, urban spatial layout design is gradually transforming towards intelligence and digitalization. Automated urban spatial layout design based on deep learning and other AI technologies can improve planning and design efficiency and provide new technological pathways for urban spatial planning.

[0003] However, in the process of realizing the concept of this invention, it was found that the related technologies have at least the following problems: the related technologies mostly output the designed layout image through a trained model. However, since the model generation process is difficult to fully match the actual design requirements, there are technical problems such as the generation result being out of touch with the design requirements and insufficient practicality. Summary of the Invention

[0004] In view of the above problems, the present invention provides a method and device for generating urban spatial layout.

[0005] According to a first aspect of the present invention, a method for generating urban spatial layout is provided, comprising: in response to receiving a layout generation task for a space to be planned, inputting a base map of the space to be planned into a layout generation model, using spatial constraint elements included in the base map as constraints, to generate an initial layout map including spatial layout elements; based on the element status and spatial constraint elements of each spatial layout element in the initial layout map, revealing and correcting the layout structure of the initial layout map to obtain a corrected layout map including structured spatial layout elements; and based on the distribution characteristics of each structured spatial layout element in the corrected layout map, evaluating the layout quality of the corrected layout map to obtain at least one evaluation result. The process involves: estimating indicators; performing layered decoupling on the modified layout map according to the type of each structured spatial layout element to obtain a layered layout map including element layers of each structured spatial layout element; associating the element layers corresponding to the same structured spatial layout element with evaluation indicators, and displaying the layered layout map and each evaluation indicator in the display interface so that the target object can edit the geometric features of each element layer based on the evaluation indicators; updating and displaying the evaluation indicators associated with the edited element layers in the edited layered layout map in response to the target object's indicator calculation instruction; and generating the target layout map based on the edited layered layout map in response to the target object's generation instruction.

[0006] According to an embodiment of the present invention, the element state includes the visual and geometric features of the spatial layout elements in the initial layout diagram; based on the element state and spatial constraint elements of each spatial layout element in the initial layout diagram, the initial layout diagram is made explicit and modified to obtain a modified layout diagram including structured spatial layout elements, including: making the layout structure of the initial layout diagram explicit based on the visual features and spatial constraint elements of each spatial layout element in the initial layout diagram to obtain an intermediate layout diagram; and reconstructing the geometric features of each spatial layout element in the intermediate layout diagram according to the element geometric rules corresponding to the type of each spatial layout element to obtain the modified layout diagram.

[0007] According to an embodiment of the present invention, spatial layout elements are represented by pixel regions composed of multiple pixels in an initial layout diagram; visual features include the pixel values ​​of each pixel in the pixel region; spatial constraint elements include spatial boundary elements; based on the visual features and spatial constraint elements of each spatial layout element in the initial layout diagram, the layout structure of the initial layout diagram is made explicit to obtain an intermediate layout diagram, including: normalizing the pixel values ​​of each spatial layout element in the initial layout diagram based on preset pixel values ​​corresponding to the type of each spatial layout element to obtain a first layout diagram; using morphological operations and geometric fitting methods, reconstructing the element boundaries of each spatial layout element in the first layout diagram to generate closed element boundaries to obtain a second layout diagram; mapping each spatial layout element in the second layout diagram to a base map so that each spatial layout element is constrained within the spatial range defined by the spatial boundary elements to obtain an intermediate layout diagram.

[0008] According to embodiments of the present invention, geometric features include at least one of the following: geometric shape, topology, scale, location, and element boundary; the element geometric rules corresponding to the types of each spatial layout element include: when the type of the spatial layout element is a building type, the element geometric rule is to reconstruct the geometric shape of the spatial layout element into a target geometric shape; when the type of the spatial layout element is a road type, the element geometric rule is to perform skeletonization processing on the spatial layout element and repair breaks so that the topology of the spatial layout element meets the preset connectivity requirements; when the type of the spatial layout element is a plant type, the element geometric rule is to reconstruct the geometric shape of the spatial layout element into a planar shape or a point shape according to the scale of the spatial layout element; when the type of the spatial layout element is a paved type or a water body type, the element geometric rule is to smooth the element boundary of the spatial layout element.

[0009] According to an embodiment of the present invention, updating and displaying the evaluation metrics associated with the edited feature layers in the edited layered layout diagram includes: comparing the layered layout diagram after editing the target object with the layered layout diagram to determine the edited feature layers in the edited layered layout diagram; recalculating the evaluation metrics associated with the edited feature layers to obtain updated evaluation metrics; and displaying the updated evaluation metrics in the display interface.

[0010] According to an embodiment of the present invention, the urban spatial layout generation method further includes: comparing the evaluation index or the updated evaluation index with the preset index specification to obtain a comparison result; in response to the comparison result indicating that the evaluation index or the updated evaluation index does not meet the preset index specification, generating modification suggestions for the target element layer associated with the evaluation index or the updated evaluation index based on the comparison result, the modification suggestions being used to guide the target object to adjust the target element layer to meet the preset index specification; and displaying the modification suggestions in the display interface.

[0011] According to an embodiment of the present invention, a layered decoupling process is performed on the modified layout map according to the type of each structured spatial layout element to obtain a layered layout map including the element layers of each structured spatial layout element. This includes: determining the type of each structured spatial layout element based on the pixel values ​​of each pixel region in the modified layout map; dividing each structured spatial layout element into corresponding layer levels based on the mapping relationship between type and layer level to obtain a third layout map including at least one layer level; and extracting the structured spatial layout elements included in the other layer levels of the third layout map except the bottom layer along the element boundaries to obtain a layered layout map including the element layers.

[0012] According to an embodiment of the present invention, the method further includes: in response to receiving a layout rendering instruction for a target object, determining layout constraint information based on the target layout diagram; and rendering the target layout diagram into a real-world layout image under the constraints of the layout constraint information.

[0013] According to an embodiment of the present invention, based on the distribution characteristics of each structured spatial layout element in the modified layout map, the layout quality of the modified layout map is evaluated to obtain at least one evaluation index, including: based on the distribution characteristics of each structured spatial layout element in the modified layout map, at least one of the following evaluation indices is used as the evaluation index: element proportion index, landscape pattern index, and spatial accessibility index; wherein, the element proportion index includes at least one of building coverage, paving and road coverage, grassland proportion, tree proportion, green space proportion, water body proportion, and permeability, used to measure the spatial allocation of different types of structured spatial layout elements in the space to be planned; the landscape pattern index includes at least one of edge density, patch density, Shannon diversity index, average patch shape index, aggregation index, and maximum patch index, used to measure the ecological spatial pattern of the modified layout map; the spatial accessibility index includes at least one of the following: number of road connectivity components, proportion of the largest connectivity component, and average shortest path length, used to measure road network connectivity.

[0014] A second aspect of the present invention provides an urban spatial layout generation apparatus, comprising: a first generation module, configured to, in response to receiving a layout generation task for a space to be planned, input a base map of the space to be planned into a layout generation model, using spatial constraint elements included in the base map as constraints, to generate an initial layout map including spatial layout elements; a correction module, configured to, based on the element status and spatial constraint elements of each spatial layout element in the initial layout map, reveal and correct the layout structure of the initial layout map, to obtain a corrected layout map including structured spatial layout elements; and a first evaluation module, configured to, based on the distribution characteristics of each structured spatial layout element in the corrected layout map, evaluate the layout quality of the corrected layout map, to obtain at least one evaluation index; and processing. The first module is used to perform layered decoupling processing on the modified layout map according to the type of each structured spatial layout element, resulting in a layered layout map including element layers of each structured spatial layout element; the second module is used to associate the element layers corresponding to the same structured spatial layout element with the evaluation indicators, and display the layered layout map and each evaluation indicator in the display interface, so that the target object can edit the geometric features of each element layer based on the evaluation indicators; the third module is used to update and display the evaluation indicators associated with the edited element layers in the edited layered layout map in response to the indicator calculation instructions received from the target object; the fourth module is used to generate the target layout map based on the edited layered layout map in response to the generation instructions received from the target object.

[0015] A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0016] A fourth aspect of the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.

[0017] A fifth aspect of the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0018] According to the urban spatial layout generation method of the present invention, by inputting a base map including spatial constraint elements into the layout generation model, the initial layout map of the space to be planned can be made to better fit the actual spatial constraint requirements through constraints. On this basis, based on the element status and spatial constraint elements of each spatial layout element in the initial layout map, the initial layout map is modified, which can transform each spatial layout element from a pixel-level expression into a more structured expression, thereby facilitating subsequent hierarchical decoupling processing and improving the accuracy of layout quality assessment.

[0019] Subsequently, a layered decoupling operation is performed on each structured spatial layout element in the revised layout diagram to form independently editable element layers. Each element layer is then associated with its corresponding evaluation index and displayed synchronously on the interactive interface. The target user can select and edit any element layer based on actual design requirements and evaluation indexes, and the editing process will not affect the spatial structure of other elements. When an index calculation instruction is received from the target user, the evaluation indexes associated with the edited element layer are recalculated and displayed to assist the target user in determining whether the element layer still needs modification. Once the target user determines that no modification is needed and receives the generation instruction, the target layout diagram is generated based on the latest edited layered layout diagram. By employing a closed-loop layout generation process involving conditional constraint generation, structural explicit correction, index evaluation, and interactive optimization, the layout diagram of the space to be planned is generated. This at least partially solves the technical problems of the generated results being disconnected from design requirements and lacking practicality in related technologies, achieving the technical effect of improving the editability and actual usability of the layout diagram. Attached Figure Description

[0020] The above-mentioned contents, as well as other objects, features and advantages of the present invention, will become clearer from the following description of embodiments of the present invention with reference to the accompanying drawings.

[0021] Figure 1 The illustration shows an application scenario of the urban spatial layout generation method and apparatus according to an embodiment of the present invention.

[0022] Figure 2 A flowchart of a method for generating urban spatial layout according to an embodiment of the present invention is shown.

[0023] Figure 3 A schematic diagram of the base map and initial layout diagram according to an embodiment of the present invention is shown.

[0024] Figure 4 A schematic diagram of an intermediate layout according to an embodiment of the present invention is shown.

[0025] Figure 5 A schematic diagram of a modified layout according to an embodiment of the present invention is shown.

[0026] Figure 6 A schematic diagram of a layered layout diagram and a real-world layout diagram edited by a target object according to an embodiment of the present invention is shown.

[0027] Figure 7 A structural block diagram of an urban spatial layout generation device according to an embodiment of the present invention is shown.

[0028] Figure 8 A block diagram of an electronic device suitable for implementing a method for generating urban spatial layouts according to an embodiment of the present invention is shown. Detailed Implementation

[0029] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0030] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0032] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0033] Related technologies typically use input text prompts and other information to output spatial layout images using trained deep learning models. However, research has revealed that this approach primarily focuses on visual simulation of form in practical applications. For evaluation, other methods, such as manual assessment, are required, leading to a disconnect between the evaluation process and the design generation process.

[0034] Furthermore, end-to-end generative models in related technologies typically couple all spatial elements together as a whole. If a designer is not satisfied with a local element of the design (such as the shape or boundary location of a certain green space), they often need to readjust the text prompts and regenerate, making it difficult to achieve precise decoupling control that allows for local modifications without affecting the overall design.

[0035] Furthermore, the research revealed that the spatial layout images output by the model may appear reasonable but are structurally unusable, such as: color mixing and blurred boundaries between different spatial elements; noisy pixels and discontinuous areas within the same layout; and fractures, distortions, or unstable forms in key structures such as roads and buildings. These issues will also make it difficult to evaluate various indicators.

[0036] Furthermore, regarding the aforementioned problems, this invention has found that if methods such as increasing the model size or training data volume, introducing more constraints or loss functions into the generative model, or directly embedding evaluation metrics into the black-box training process of the generative model are adopted, structural problems will be hidden inside the model, resulting in a lack of interpretability and controllability, and a lack of operable correction methods once the generated results do not meet the evaluation requirements.

[0037] Therefore, embodiments of the present invention provide a method for generating urban spatial layout, comprising: in response to receiving a layout generation task for a space to be planned, inputting a base map of the space to be planned into a layout generation model, using the spatial constraint elements included in the base map as constraints, to generate an initial layout map including spatial layout elements; based on the element status and spatial constraint elements of each spatial layout element in the initial layout map, revealing and correcting the layout structure of the initial layout map to obtain a corrected layout map including structured spatial layout elements; and based on the distribution characteristics of each structured spatial layout element in the corrected layout map, evaluating the layout quality of the corrected layout map to obtain at least one evaluation. The system performs layered decoupling on the modified layout map according to the type of each structured spatial layout element, resulting in a layered layout map that includes element layers of each structured spatial layout element. It then associates the element layers corresponding to the same structured spatial layout element with evaluation indicators, and displays the layered layout map and each evaluation indicator in the display interface, allowing the target object to edit the geometric features of each element layer based on the evaluation indicators. In response to receiving the target object's indicator calculation instruction, it updates and displays the evaluation indicators associated with the edited element layers in the edited layered layout map. Finally, in response to receiving the target object's generation instruction, it generates the target layout map based on the edited layered layout map.

[0038] Figure 1 The diagram illustrates an application scenario of the urban spatial layout generation method and apparatus according to an embodiment of the present invention.

[0039] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0040] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0041] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0042] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0043] It should be noted that the urban spatial layout generation method provided in this embodiment of the invention can generally be executed by server 105. Correspondingly, the urban spatial layout generation device provided in this embodiment of the invention can generally be located in server 105. The urban spatial layout generation method provided in this embodiment of the invention can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the urban spatial layout generation device provided in this embodiment of the invention can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0044] It should be understood that Figure 1 The number of first terminal devices, second terminal devices, third terminal devices, networks, and servers shown in the diagram is merely illustrative. Depending on implementation needs, any number of first terminal devices, second terminal devices, third terminal devices, networks, and servers can be included.

[0045] The following will be based on Figure 1 The described scene, through Figures 2-6 The method for generating urban spatial layout according to the embodiments of the invention will be described in detail.

[0046] Figure 2 A flowchart of a method for generating urban spatial layout according to an embodiment of the present invention is shown.

[0047] like Figure 2 As shown, the method includes operations S210 to S270.

[0048] In operation S210, in response to receiving the layout generation task of the space to be planned, the base map of the space to be planned is input into the layout generation model, so as to use the spatial constraint elements included in the base map as constraint conditions to generate an initial layout map including spatial layout elements.

[0049] In operation S220, based on the element status and spatial constraint elements of each spatial layout element in the initial layout diagram, the layout structure of the initial layout diagram is made explicit and the layout structure is corrected to obtain a corrected layout diagram including structured spatial layout elements.

[0050] In operation S230, based on the distribution characteristics of each structured spatial layout element in the modified layout map, the layout quality of the modified layout map is evaluated to obtain at least one evaluation index.

[0051] In operation S240, the modified layout diagram is decoupled into layers according to the type of each structured spatial layout element, resulting in a layered layout diagram that includes the element layers of each structured spatial layout element.

[0052] In operation S250, the feature layers and evaluation indicators corresponding to the same structured spatial layout feature are associated, and the hierarchical layout map and each evaluation indicator are associated and displayed in the display interface so that the target object can edit the geometric features of each feature layer based on the evaluation indicators.

[0053] In operation S260, in response to receiving the indicator calculation instruction for the target object, the evaluation indicators associated with the edited feature layer in the edited hierarchical layout diagram are updated and displayed.

[0054] In operation S270, in response to receiving the target object generation instruction, a target layout diagram is generated based on the edited layered layout diagram.

[0055] The task objective of the layout generation task is not limited. This layout generation task can be used to generate any type of spatial layout in the city, such as urban parks, residential communities or commercial districts and other urban functional spaces.

[0056] The base map can be an image that can represent the actual spatial constraints of the space to be planned, such as spatial constraint elements including the boundaries of the space to be planned, water bodies, building foundations, and the surrounding external environment (such as surrounding urban roads).

[0057] Layout generation models can be used to generate initial layout maps based on base maps. The specific implementation is not limited; any trained model capable of producing an initial layout map from an input base map can be used. Examples include Generative Adversarial Networks (GANs), Conditional Generative Adversarial Networks (CGANs), pixel-to-pixel generation models (pix2pix), and Diffusion Models (DM).

[0058] In some embodiments, a conditional layout generation model can be trained by inputting a base map and textual constraint information such as the position information and pixel value information of each spatial constraint element in the base map. By inputting the base map and the corresponding textual constraint information into the conditional layout generation model, the constraint effect of the constraints on the layout generation process can be further enhanced.

[0059] Spatial layout elements can be the basic units that constitute a spatial layout, such as green spaces, water systems, paving, and buildings—elements with functional attributes. Since each spatial layout element has a corresponding semantic meaning, it can also be called a semantic element.

[0060] Upon receiving a task to generate a spatial layout to be planned, a base map can be obtained and input into the layout generation model. The model uses the spatial constraint elements in the base map as constraints to automatically generate an initial layout map including spatial layout elements.

[0061] Element status can be used to characterize the current attribute information of spatial layout elements in the initial layout diagram. For example, it can include the visual and geometric features of the spatial layout elements. Visual features are used to characterize the features of the elements from a visual perspective. Geometric features can be used to describe the shape, structure, and spatial relationships of the spatial layout elements.

[0062] When optimizing and adjusting based on the current state of elements and spatial constraints, structural processing of visual and geometric features can be performed on each spatial layout element. For example, visual features may involve unifying or standardizing pixel values, specifically, unifying the color representation of elements of the same type. Geometric features may include regularizing element boundaries, such as alignment and smoothing; standardizing and adjusting dimensions; and optimizing topological relationships, such as correcting adjacency relationships. Furthermore, it can detect whether there are conflicts between spatial layout elements and spatial constraint elements; if so, modify the spatial layout elements based on the spatial constraint elements to improve the structure and compliance of the layout.

[0063] During the layout quality assessment, the pixel information contained in the layout map can be analyzed to identify and classify the pixel regions of each element. Then, the built-in automated assessment module is invoked to calculate multiple quantitative indicators based on a preset ecological performance evaluation system. These indicators cover element proportion indicators, such as green coverage rate and water area ratio; landscape pattern indicators, such as edge density and clustering index; and spatial accessibility indicators, such as the number of road connectivity components and accessibility of public facilities. Through these assessment indicators, the performance of the layout scheme in at least one aspect—ecological benefits, spatial efficiency, and ease of use—can be objectively measured.

[0064] Layered decoupling processing focuses on separating elements in the modified layout map into independent layers according to the type of structured spatial layout elements. In implementation, image or vector data can first be segmented based on the semantic tags or types of each structured spatial layout element. Then, each structured spatial layout element is extracted and stored as a separate layer, while preserving the geometric accuracy and spatial relationships of each element layer. The resulting layered layout map allows users or subsequent algorithms to perform independent operations on element layers, such as adjusting the shape of water bodies independently without interfering with the content of other element layers.

[0065] You can associate feature layers and their evaluation metrics with each other that correspond to the same structured spatial layout feature. For example, you can create a unique identifier for each feature layer and bind the evaluation metrics calculated by the automated evaluation module as attribute fields to the metadata of that feature layer.

[0066] In some embodiments, if the relevant features of the feature layer are used when calculating an evaluation index, the evaluation index is associated with the feature layer. That is, if the relevant features of multiple feature layers are used when calculating the evaluation index, the evaluation index can be associated with multiple feature layers.

[0067] In the front-end display interface, a layered visualization approach can be used to associate and present the layered layout map with evaluation indicators. For example, the names of each feature layer can be displayed through a layer panel list, and when the mouse hovers over or selects a feature layer, the corresponding evaluation indicators can be displayed in the form of floating labels, pop-ups, sidebars, color blocks, or heatmaps. Evaluation indicators can also be mapped to different colors, transparency levels, or textures based on whether they meet the specifications, allowing users to intuitively perceive the strengths and weaknesses of different areas or features.

[0068] The target object can be the user. During the interaction, the user can modify the geometric features of each element layer, such as size, element shape (e.g., shape) and position. During the editing process, the user can determine the changes in indicators caused by each editing action at any time.

[0069] For example, during the interaction, the system can automatically identify the feature boundaries and control nodes of different feature layers, allowing users to adjust each feature layer based on evaluation metric feedback and layout requirements. This includes: overall movement (translating individual spatial features); shape adjustment (changing the shape and scale of features by dragging endpoints or control nodes); and copying and deleting specific features. In this interaction, local modifications do not affect the global structure. While maintaining the overall layout topology stability, local geometry updates are possible. Evaluation metrics can be updated in real time after the user finishes editing or after receiving the user's metric calculation instructions, forming a closed-loop optimization process.

[0070] Control nodes can be control points on the edges or inside of spatial layout elements. In interaction design, they serve as a tool for user operations, used to precisely adjust the geometry and spatial position of spatial layout elements. They can be vertices or inflection points of the element's outline, or internal shape control points. Users can drag and drop single or batch control nodes to perform operations such as translation, stretching or shrinking, and contour deformation of elements.

[0071] When the target object completes the editing operation on a certain feature layer and initiates the indicator calculation command, the indicator of the corresponding feature layer can be recalculated, that is, the indicator value of the indicator is recalculated and the calculation result is returned to the front-end display interface and updated in the corresponding indicator display area, so that the target object can obtain the quantitative feedback of the editing operation on the layout effect in real time, thereby guiding the target object to make further fine adjustments.

[0072] Once the target object confirms that the geometric features and layout relationships of all feature layers meet the design requirements, it can trigger the generation command.

[0073] Upon receiving a generation instruction from the target object, the system can traverse all feature layers and merge them based on the currently edited layered layout diagram, i.e., the latest edited layered layout diagram, to obtain the target layout diagram.

[0074] According to embodiments of the present invention, by inputting a base map including spatial constraint elements into a layout generation model, constraints can be applied to make the initial layout map of the space to be planned more closely match the actual spatial constraint requirements. Based on this, the initial layout map is modified according to the element states and spatial constraint elements of each spatial layout element in the initial layout map. This transforms the pixel-level representation of each spatial layout element into a more structured representation, thereby facilitating subsequent hierarchical decoupling processing and improving the accuracy of layout quality assessment.

[0075] Subsequently, a layered decoupling operation is performed on each structured spatial layout element in the revised layout diagram to form independently editable element layers. Each element layer is then associated with its corresponding evaluation index and displayed synchronously on the interactive interface. The target user can select and edit any element layer based on actual design requirements and evaluation indexes, and the editing process will not affect the spatial structure of other elements. When an index calculation instruction is received from the target user, the evaluation indexes associated with the edited element layer are recalculated and displayed to assist the target user in determining whether the element layer still needs modification. Once the target user determines that no modification is needed and receives the generation instruction, the target layout diagram is generated based on the currently edited layered layout diagram. By employing a closed-loop layout generation process involving conditional constraint generation, structural explicit correction, index evaluation, element decoupling, and interactive optimization, the layout diagram of the space to be planned is generated. This at least partially solves the technical problems of the generated results being disconnected from design requirements and lacking practicality in related technologies, achieving the technical effect of improving the editability and actual usability of the layout diagram.

[0076] According to an embodiment of the present invention, the element state includes the visual features and geometric features of the spatial layout elements in the initial layout diagram; based on the element state and spatial constraint elements of each spatial layout element in the initial layout diagram, the initial layout diagram is made explicit and the layout structure is corrected to obtain a corrected layout diagram including structured spatial layout elements, which may include the following operations.

[0077] Based on the visual features and spatial constraints of each spatial layout element in the initial layout diagram, the layout structure of the initial layout diagram is made explicit to obtain an intermediate layout diagram; according to the element geometric rules corresponding to the type of each spatial layout element, the geometric features of each spatial layout element in the intermediate layout diagram are reconstructed to obtain a revised layout diagram.

[0078] Figure 3 A schematic diagram of the base map and initial layout diagram according to an embodiment of the present invention is shown.

[0079] like Figure 3 As shown, the base map 310 includes spatial constraint elements such as surrounding city roads 311 and spatial boundaries 312. By inputting the base map 310 into the layout generation model, an initial layout map 320 can be obtained. This map can include multiple spatial layout elements of different colors and shapes, such as water bodies 321. Observing the initial layout map 320 reveals that there is still color mixing and blurred boundaries among the different spatial layout elements; noisy pixels and discontinuous areas exist within the same spatial layout element; and structures such as roads and buildings suffer from breaks, distortions, or unstable shapes. Therefore, layout structure correction of the initial layout map 320 is particularly important. Layout structure correction can include making the layout structure explicit and reconstructing geometric features.

[0080] In the process of making the layout structure of the initial layout diagram visible, the visual features of each spatial layout element in the initial layout diagram can be analyzed. For example, visual information such as color, texture or brightness in each pixel area can be identified, and the spatial layout elements corresponding to each pixel area can be determined through these pixel-level data.

[0081] Based on this, combined with the predefined visual feature specifications of each spatial layout element, such as the color of the grass being light green, the visual features of each spatial layout element in the initial layout diagram are made explicit. In addition, spatial boundary reinforcement and relationship sorting are carried out in combination with spatial constraint elements, thereby generating an intermediate layout diagram. Compared with the initial layout diagram, the intermediate layout diagram reduces the visual ambiguity of each spatial layout element and spatial boundary, and the spatial relationships are initially made explicit, laying the foundation for subsequent geometric reconstruction.

[0082] During the reconstruction of geometric features, corresponding geometric rules can be invoked for different types of spatial layout elements. For example, for spatial layout elements like roads, geometric rules can require them to be skeletonized and broken to ensure that the topological structure of the spatial layout element meets preset connectivity requirements. The reconstruction process not only corrects the geometric shape of individual elements but also coordinates the relationships between elements through topological rules, such as ensuring accurate connection of the endpoints of adjacent roads. After the geometric feature reconstruction operation, the elements in the intermediate layout diagram are given more precise dimensions, more regular shapes, and more rigorous topological relationships.

[0083] According to embodiments of the present invention, by analyzing visual features and incorporating spatial constraint elements, the semantic ambiguity and structural ambiguity in the initial layout diagram are reduced, thereby transforming pixel-level image information into an intermediate layout diagram with clear element boundaries and well-defined spatial relationships. The geometric feature reconstruction stage then, based on this, reconstructs the elements in the intermediate layout diagram more accurately according to the geometric rules corresponding to the element types, thus giving each element a more standardized geometric shape and topological connection relationship. Through the above operations, each structured spatial layout element in the corrected layout diagram is no longer a simple collection of pixels, but a more structured object, making the entire layout scheme easier to calculate metrics, evaluate performance, and interactively modify.

[0084] According to an embodiment of the present invention, spatial layout elements are represented by pixel regions consisting of multiple pixels in the initial layout diagram; visual features include the pixel values ​​of each pixel in the pixel region; spatial constraint elements include spatial boundary elements; based on the visual features and spatial constraint elements of each spatial layout element in the initial layout diagram, the layout structure of the initial layout diagram is made explicit to obtain an intermediate layout diagram, which may include the following operations.

[0085] Based on the preset pixel values ​​corresponding to the types of each spatial layout element, the pixel values ​​of each spatial layout element in the initial layout map are normalized to obtain the first layout map; using morphological operations and geometric fitting methods, the element boundaries of each spatial layout element in the first layout map are reconstructed to generate closed element boundaries to obtain the second layout map; each spatial layout element in the second layout map is mapped to the base map so that each spatial layout element is constrained within the spatial range defined by the spatial boundary elements to obtain the intermediate layout map.

[0086] The visual characteristics of each spatial layout element, such as color, grayscale, or brightness, can all be represented by pixel values. Among them, color can be represented by the combination of values ​​of the three channels of red, green, and blue (RGB). For example, the preset pixel value corresponding to green area can be (0, 255, 0).

[0087] Based on the preset pixel values ​​corresponding to the types of each spatial layout element, the pixel areas occupied by each element in the initial layout diagram are normalized. This may include: normalizing the mixed pixels to the pixel values ​​corresponding to a single spatial layout element, and removing noise pixels that do not belong to the specified elements, such as black spots and other interfering pixel values, thereby obtaining a semantically pure first layout diagram.

[0088] Morphological operations and geometric fitting methods can be used to reconstruct the boundaries of each spatial layout element in the first layout diagram, generating closed and continuous element boundaries to regularize the geometric shape of the elements and eliminate jagged edges or breaks, thus obtaining the second layout diagram.

[0089] Subsequently, each spatial layout element in the second layout diagram can be mapped to the base map containing spatial boundary elements. By accurately copying the element value or color of each spatial layout element to the corresponding position in the base map, all spatial layout elements can be strictly constrained within the spatial range defined by the site boundary, and the image no longer contains any noise other than the specified element color. This results in a structured intermediate layout diagram that can be directly called by the index calculation module.

[0090] Figure 4 A schematic diagram of an intermediate layout according to an embodiment of the present invention is shown.

[0091] like Figure 4As shown, the intermediate layout image removes noise, illegal colors, and local noise from the initial layout image, mapping the originally continuous and blurry probabilistic color distribution onto visual feature specifications, i.e., preset pixel values, corresponding to the types of spatial layout elements. Furthermore, by regularizing and aligning the boundaries of various spatial layout elements, they are ensured to accurately fall within the spatial boundary constraints of the space to be planned. This transforms the originally generated result, which "looks like a layout but cannot be directly calculated," into a semantically clear, color-uniform, and boundary-defined layout representation that can be used for quantitative statistics, providing a foundation for subsequent layout structure optimization and index calculation.

[0092] According to embodiments of the present invention, pixel value normalization reduces semantic clutter and noise interference in the image, resulting in a more accurate representation of each spatial layout element. Morphological operations and geometric fitting methods are used to reconstruct closed, continuous element boundaries, giving the layout elements precise, computable geometric shapes. Furthermore, by mapping the elements to a base map and strictly constraining them within the site boundaries, the spatial validity and compliance of the generated results are ensured. The structured layout image output at this stage not only better guarantees visual presentation but also enhances the structural degree of the layout.

[0093] According to embodiments of the present invention, geometric features include at least one of the following: geometric shape, topology, scale, location, and feature boundary; the feature geometric rules corresponding to the type of each spatial layout feature may include the following.

[0094] When the spatial layout element type is building, the element geometry rule is to reconstruct the geometric shape of the spatial layout element into the target geometric shape; when the spatial layout element type is road, the element geometry rule is to skeletonize the spatial layout element and repair breaks so that the topological structure of the spatial layout element meets the preset connectivity requirements; when the spatial layout element type is plant, the element geometry rule is to reconstruct the geometric shape of the spatial layout element into a planar or point-like shape according to the scale of the spatial layout element; when the spatial layout element type is paved or water, the element geometry rule is to smooth the element boundary of the spatial layout element.

[0095] Based on the intermediate layout diagram, the geometric features of various spatial layout elements can be reconstructed and optimized according to the structural rules of semantic design for various scenarios (such as parks) to achieve adjustment of geometric angles.

[0096] For example, for building elements, the geometric rules can reconstruct any initially possible geometric shape into a target geometric shape such as a rectangle. This operation can make building elements conform to the cognition of conventional building forms and be identifiable, thus ensuring the stability of the calculation of building area and coverage. At the same time, it can reserve room for modification for users to adjust irregular buildings according to actual needs in the subsequent interaction stage.

[0097] For road elements, a skeletonization algorithm can be used to extract their centerlines and repair broken connection points. Through topology reconstruction, the connectivity of the road network can meet the preset requirements, thereby ensuring the integrity and smooth flow of the streamline elements.

[0098] For plant elements, their spatial scale can be used for judgment: larger-scale plant communities or clumps are reconstructed into planar morphology to represent their coverage, while single plants or small-scale plants can be reconstructed into point morphology for accurate positioning and statistical management.

[0099] For paving and water features, the geometric rules focus on smoothing the boundaries of the features, eliminating jagged edges through curve fitting or morphological operations, so that the outlines are more in line with the smooth aesthetics of natural or artificial designs.

[0100] Figure 5 A schematic diagram of a modified layout according to an embodiment of the present invention is shown.

[0101] like Figure 5 As shown, the spatial layout elements in the revised layout diagram have been transformed into more structured elements. Specifically, the boundaries between different spatial layout elements are further strengthened, the boundaries of the same spatial layout element are clearer, and the forms of continuous spatial layout elements such as roads and buildings are more stable, such as road 501 and plant 502.

[0102] According to embodiments of the present invention, through the above-mentioned geometric reconstruction of different types of elements, an improvement from structural explicitness to design optimization is achieved, so that the revised layout diagram, while maintaining computability, is closer to the professional semantics and aesthetic requirements of layout design.

[0103] According to an embodiment of the present invention, based on the distribution characteristics of each structured spatial layout element in the modified layout map, the layout quality of the modified layout map is evaluated to obtain at least one evaluation index, which may include the following operations.

[0104] Based on the distribution characteristics of each structured spatial layout element in the revised layout map, at least one of the element proportion index, landscape pattern index, and spatial accessibility index is used as the evaluation index.

[0105] The structured spatial layout elements in the modified layout map can be analyzed to calculate at least one of the ecological performance parameters, including element ratio indicators, landscape pattern indicators, and spatial accessibility indicators.

[0106] During the calculation process, the distribution characteristics of each structured spatial layout element can be determined through pixel-level analysis or vector data, such as area, boundaries, location, and adjacency relationships. Based on this, the corresponding algorithm modules are called for calculation for different types of evaluation metrics.

[0107] For example, for indicator types such as element proportions, area statistics methods can be used to calculate the proportion of pixels or area of ​​each element in the total land area.

[0108] Among them, the element ratio index can include at least one of the following: Building Ratio (BR), Pavement and Road Ratio (PRR), Grass Ratio (GR), Tree Ratio (TR), Green Ratio (GR), Water Ratio (WR), and Permeable Ratio (PR), which are used to measure the spatial distribution of different types of structured spatial layout elements in the space to be planned.

[0109] Landscape pattern indicators include at least one of Edge Density (ED), Patch Density (PD), Shannon Diversity Index (H), Mean Shape Index (MSI), Aggregation Index (AI), and Largest Patch Index (LPI), used to measure the ecological spatial pattern of the modified layout map.

[0110] Spatial accessibility metrics include at least one of the following: Road Component Count (RCC), Road Largest Component Ratio (RLCR), and Road Avg Shortest Path Length (RASP_m), used to measure road network connectivity.

[0111] According to embodiments of the present invention, the spatial distribution characteristics of the modified layout map are transformed into objective and quantifiable evaluation indicators, which can provide a more intuitive basis for the layout quality of the layout scheme. The comprehensive calculation of element proportion indicators, landscape pattern indicators, and spatial accessibility indicators enables designers to quickly identify the advantages and disadvantages of the layout scheme in terms of ecological benefits, spatial efficiency, and functionality, and make targeted adjustments and optimizations accordingly, thereby improving the scientificity and rationality of the final design scheme.

[0112] According to an embodiment of the present invention, the modified layout diagram is subjected to layered decoupling processing according to the type of each structured spatial layout element to obtain a layered layout diagram including the element layer of each structured spatial layout element, which may include the following operations.

[0113] Based on the mapping relationship between the type of structured spatial layout elements and the layer level, each structured spatial layout element in the modified layout map is divided into the corresponding layer level to obtain a third layout map including at least one layer level; the structured spatial layout elements included in the other layer levels in the third layout map except the bottom layer are extracted along the element boundary to obtain a layered layout map including element layers.

[0114] Based on the pixel values ​​of each pixel region in the modified layout diagram, and according to the preset correspondence between the pixel values ​​and each structured spatial layout element, the type of each structured spatial layout element, such as buildings, roads, plants, water bodies, paving, etc., can be identified and determined.

[0115] Based on a predefined mapping relationship between type and layer level, these different types of features are assigned to their corresponding layer levels. For example, the bottom layer may contain spatial boundaries and city roads. In some embodiments, it may also include green space as a background.

[0116] Other elements can be assigned to the upper layer in a set order (e.g., from bottom to top: paving, water, roads, buildings, and plants) to generate a third layout map containing multiple layer levels.

[0117] Based on this, the structured spatial layout elements contained in the other layer levels of the third layout diagram, except for the bottom layer, can be precisely extracted along their element boundaries to form independent and editable element layers, ultimately resulting in a layered layout diagram.

[0118] This layered layout allows users to interactively adjust the shape, size, boundary, or spatial position of any feature layer in the upper layer. All editing operations only apply to the current feature layer and do not affect the spatial structure of the underlying background or other feature layers, thus achieving flexible semantic editing capabilities.

[0119] The representation format of each element layer is not limited and can be determined based on the geometric shape and boundary of each structured spatial layout element. For example, building elements are represented by rectangular geometry; road elements are represented by center lines and endpoint nodes; plant elements are represented by point or area geometry; and water bodies and paving are represented by polygonal boundaries.

[0120] During the interaction, the geometric boundaries and control nodes of different feature layers can be automatically identified, so that users can edit each feature layer. This process enables precise, local, and controllable modification of the generated results, avoiding the global uncertainty caused by regeneration.

[0121] According to embodiments of the present invention, the types of each structured spatial layout element are identified and layer levels are divided according to mapping relationships, achieving precise semantic separation of different layout elements in the layout scheme. This deconstructs the originally mixed image information into clearly layered editable units, where the bottom layer serves as the anchor point for site boundaries and background, providing a spatial reference for independent operation of upper-layer elements. Secondly, by extracting structured spatial layout elements from the upper-layer layers along element boundaries, each element layer retains its complete geometric shape and semantic attributes. This allows users to flexibly adjust the shape, size, boundary, or spatial position of any landscape element through interactive operations, thus solving the problem of difficulty in making local fine-grained adjustments to end-to-end generated models. This enables iterative optimization of local designs while maintaining overall layout stability, improving the flexibility and controllability of the design process.

[0122] According to embodiments of the present invention, updating and displaying evaluation metrics associated with the edited feature layer in the edited hierarchical layout diagram may include the following operations.

[0123] Compare the edited layered layout map with the original layered layout map to determine the edited feature layers in the edited layered layout map; recalculate the evaluation indicators associated with the edited feature layers to obtain updated evaluation indicators; and display the updated evaluation indicators in the display interface.

[0124] During interactive adjustments, the system can respond to user-defined indicator calculation commands, re-evaluate indicators on the layered layout map edited by the target object, and provide real-time feedback of the updated indicator results to the display interface, thus achieving an indicator-driven real-time feedback mechanism. Alternatively, it can identify the user-modified feature layers from the layered layout map edited by the target object, and then perform targeted indicator updates only on the edited feature layers that have been modified.

[0125] For example, during implementation, in response to indicator calculation commands triggered by the target object, the edited layered layout map can be compared and analyzed layer by layer with the original stored layered layout map. By detecting changes in the geometric shape, boundary position, size parameters, or spatial distribution characteristics of the feature layers, modified feature layers can be identified. Based on the type of these feature layers and their associated evaluation indicators, the built-in automated evaluation module can be invoked for targeted recalculation: for example, if the modification involves building elements, then feature ratio indicators such as building density and floor area ratio can be recalculated. The recalculation process can be performed only on the affected indicator items, without having to recalculate all indicators, thereby improving computational efficiency.

[0126] After the update is completed, the generated update evaluation metrics can be pushed to the display interface in real time, so that the target object can intuitively perceive the quantitative impact of the editing operation on the layout performance, providing immediate feedback for subsequent iterative optimization.

[0127] According to embodiments of the present invention, by constructing a closed-loop process of generation, evaluation, interaction, and regeneration, repeated manual adjustments and external evaluation operations can be reduced, the design cycle can be shortened, and the generation efficiency of complex planning schemes can be improved. In this process, evaluation indicators are no longer merely post-hoc verification tools, but are integrated into the design decision-making process as real-time feedback signals, enabling each interactive modification to be based on quantitative performance. Simultaneously, the calculation results are presented intuitively in a visual form, helping designers to instantly perceive the comprehensive impact of local editing operations on the overall layout performance, thereby supporting more accurate and efficient iterative optimization.

[0128] According to an embodiment of the present invention, the urban spatial layout generation method may further include the following operations.

[0129] The evaluation index or updated evaluation index is compared with the preset index specification to obtain the comparison result. In response to the comparison result indicating that the evaluation index or updated evaluation index does not meet the preset index specification, modification suggestions are generated for the target feature layer associated with the evaluation index or updated evaluation index based on the comparison result. The modification suggestions are used to guide the target object to adjust the target feature layer to meet the preset index specification. There are one or more target feature layers. The modification suggestions are displayed in the display interface.

[0130] The calculated or updated evaluation indicators can be compared one by one with the corresponding preset indicator specifications. Through threshold judgment or rule matching algorithm, it can be determined whether each indicator meets the specification requirements, thereby generating comparison results.

[0131] If the comparison results indicate that one or more indicators of the target feature layer do not meet the standards, such as green coverage rate being lower than the lower limit or building density exceeding the upper limit, then based on the comparison results, combined with the degree of indicator deviation and the feature type of the target feature layer, targeted optimization suggestions can be matched or generated from a predefined modification suggestion knowledge base, such as increasing green area, adjusting building outlines, or optimizing road connectivity.

[0132] Evaluation metrics and updated evaluation metrics can be metrics associated with a single target feature layer or metrics associated with multiple target feature layers, such as the Shannon Diversity Index. When evaluation metrics or updated evaluation metrics are associated with multiple target feature layers, modification suggestions can be based on a holistic approach, ensuring that after adjustments to multiple or a single target feature layer, the edited layered layout map meets the corresponding preset metric specifications from a global perspective.

[0133] These modification suggestions will be displayed in real time in a designated area of ​​the display interface in the form of text or visualization. The corresponding target element layers that do not meet the specifications can also be highlighted to guide the target object to make precise interactive adjustments until all indicators meet the preset specification requirements.

[0134] At the same time, evaluation indicators that meet the standards can also be summarized, such as: "This evaluation indicator has met the standards," so that the target audience can review it.

[0135] According to embodiments of the present invention, a closed-loop optimization process of "structure explicitation, index evaluation, human-computer interaction, and re-evaluation" is constructed. Its characteristics are: the generative model is responsible for the initial exploration of the design space; structural rules ensure the computability and stability of the results; human-computer interaction undertakes local structural optimization and design judgment; and the index system provides quantitative feedback and constraint guidance. This process avoids completely embedding complex design knowledge into the black box of the generative model, realizing an interpretable, controllable, and scalable generative spatial layout design method.

[0136] Furthermore, the human-computer interaction modification process proposed in this invention is not a simple drag-and-drop, replacement, or visual manual modification of the generated results, but rather a "structural constraint re-injection mechanism" embedded in the generation-evaluation closed loop. This process offers a systematic solution to the phenomena of "generated results being difficult for designers to effectively intervene in, structural semantics becoming decoupled from model constraints after manual modification, and modified results being ununderstood and uninherited by the model." In this step, the designer's interactive operations directly affect specific layout elements, allowing adjustments or corrections to the size, relationships, and layout of these elements. The corrected element layers can be temporarily saved, and clicking on the calculation index allows for the calculation of the evaluation index of the modified element layers, with the index calculation results provided as feedback.

[0137] According to embodiments of the present invention, the above method may further include the following operations.

[0138] In response to receiving a layout rendering instruction for the target object, the layout constraint information is determined based on the target layout diagram; under the constraints of the layout constraint information, the target layout diagram is rendered into a real-world layout image.

[0139] Upon receiving the layout rendering instruction for the target object, the system can match the corresponding textures, maps, or geometric models from the preset material library or 3D model library based on the type of each target spatial layout element in the target layout image. Then, through ray tracing or rasterization algorithms, it can simulate the physical lighting, shadows, and reflection effects of the real world, converting the two-dimensional vector or pixel layer into a realistic real-world layout image, i.e., a high-fidelity image, so that the target object can intuitively examine the visual effect of the layout scheme in the actual environment.

[0140] Figure 6 A schematic diagram of a layered layout diagram and a real-world layout diagram edited by a target object according to an embodiment of the present invention is shown.

[0141] like Figure 6 As shown, layout constraint information can be extracted from the target layout diagram 610 edited by the target object. This layout constraint information can include the geometric boundaries, spatial positions, geometric shapes, and types of each element layer. This layout constraint information can be used as structural control input and introduced into the image regeneration stage. The original color block-style layered layout diagram is gradually rendered into a realistic layout image 620 with rich textures, lighting, and material details, that is, transformed from an abstract color block diagram into a high-fidelity color planar image. The entire rendering process ensures that the generated image maintains spatial organization consistent with the layout of the target layout diagram 610.

[0142] The implementation method of the above process is not limited; any method that can extract layout constraint information and generate a realistic layout image based on the constraints is acceptable. For example, a control network (ControlNet, a structural control plugin for stabilizing diffusion models) can be used to apply spatial constraints consistent with the layout structure to the generation process of the diffusion model (a generative model that generates high-quality images through iterative denoising). Under the guidance of the control network, a realistic layout image is generated.

[0143] According to embodiments of the present invention, by extracting local constraint information and applying spatial structural constraints to the regeneration process, the destruction of the original layout logic during the rendering stage can be reduced, thereby improving the spatial accuracy and expressive reliability of the final design results.

[0144] Based on the above-described method for generating urban spatial layouts, this invention also provides an apparatus for generating urban spatial layouts. The following will be combined with... Figure 7The device is described in detail.

[0145] Figure 7 A structural block diagram of an urban spatial layout generation device according to an embodiment of the present invention is shown.

[0146] like Figure 7 As shown, the urban spatial layout generation device 700 of this embodiment includes a first generation module 710, a correction module 720, a first evaluation module 730, a processing module 740, a display module 750, a second evaluation module 760, and a second generation module 770.

[0147] The first generation module 710 is used to respond to receiving a layout generation task for the space to be planned, input the base map of the space to be planned into the layout generation model, and use the spatial constraint elements included in the base map as constraint conditions to generate an initial layout map including spatial layout elements; in one embodiment, the first generation module 710 can be used to perform the operation S210 described above, which will not be repeated here.

[0148] The correction module 720 is used to make the layout structure explicit and correct the layout structure of the initial layout diagram based on the element status and spatial constraint elements of each spatial layout element in the initial layout diagram, so as to obtain a corrected layout diagram including structured spatial layout elements. In one embodiment, the correction module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0149] The first evaluation module 730 is used to evaluate the layout quality of the modified layout map based on the distribution characteristics of each structured spatial layout element in the modified layout map, and obtain at least one evaluation index. In one embodiment, the first evaluation module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0150] The processing module 740 is used to perform layered decoupling processing on the modified layout map according to the type of each structured spatial layout element to obtain a layered layout map including the element layer of each structured spatial layout element; in one embodiment, the processing module 740 can be used to perform the operation S240 described above, which will not be repeated here.

[0151] Display module 750 is used to associate feature layers and evaluation indicators corresponding to the same structured spatial layout features, and to display the layered layout map and each evaluation indicator in the display interface so that the target object can edit the geometric features of each feature layer based on the evaluation indicators. In one embodiment, display module 750 can be used to perform the operation S250 described above, which will not be repeated here.

[0152] The second evaluation module 760 is used to update and display the evaluation metrics associated with the edited feature layer in the edited hierarchical layout diagram in response to receiving the metric calculation instruction for the target object. In one embodiment, the second evaluation module 760 can be used to perform the operation S260 described above, which will not be repeated here.

[0153] The second generation module 770 is used to generate a target layout diagram based on the edited layered layout diagram in response to receiving a generation instruction for the target object. In one embodiment, the second generation module 770 can be used to perform the operation S270 described above, which will not be repeated here.

[0154] According to embodiments of the present invention, any plurality of modules among the first generation module 710, correction module 720, first evaluation module 730, processing module 740, display module 750, second evaluation module 760, and second generation module 770 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the first generation module 710, correction module 720, first evaluation module 730, processing module 740, display module 750, second evaluation module 760, and second generation module 770 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the first generation module 710, correction module 720, first evaluation module 730, processing module 740, display module 750, second evaluation module 760, and second generation module 770 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0155] Figure 8 A block diagram of an electronic device suitable for implementing a method for generating urban spatial layouts according to an embodiment of the present invention is shown.

[0156] like Figure 8As shown, an electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0157] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of the present invention by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in said one or more memories.

[0158] According to an embodiment of the present invention, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0159] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0160] According to embodiments of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that includes or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present invention, a computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.

[0161] Embodiments of the present invention also include a computer program product comprising a computer program including program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of the present invention.

[0162] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this invention. According to embodiments of the invention, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0163] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code included in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0164] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this embodiment of the invention. According to embodiments of the invention, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0165] According to embodiments of the present invention, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0167] Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.

[0168] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.

Claims

1. A method for generating urban spatial layout, characterized in that, The method includes: In response to receiving a layout generation task for a space to be planned, the base map of the space to be planned is input into the layout generation model, and the spatial constraint elements included in the base map are used as constraint conditions to generate an initial layout map including spatial layout elements. Based on the element status of each spatial layout element in the initial layout diagram and the spatial constraint elements, the initial layout diagram is made explicit and modified to obtain a modified layout diagram including structured spatial layout elements. Based on the distribution characteristics of each of the structured spatial layout elements in the modified layout diagram, the layout quality of the modified layout diagram is evaluated to obtain at least one evaluation index. According to the type of each of the structured spatial layout elements, the modified layout diagram is subjected to layered decoupling processing to obtain a layered layout diagram including the element layers of each of the structured spatial layout elements. The feature layers and evaluation indicators corresponding to the same structured spatial layout feature are associated, and the hierarchical layout map and each of the evaluation indicators are associated and displayed in the display interface so that the target object can edit the geometric features of each feature layer based on the evaluation indicators; In response to receiving the indicator calculation instruction for the target object, update and display the evaluation indicators associated with the edited feature layer in the edited hierarchical layout diagram; In response to receiving the generation instruction for the target object, a target layout diagram is generated based on the edited layered layout diagram.

2. The method according to claim 1, characterized in that, The element status includes the visual and geometric features of the spatial layout elements in the initial layout diagram; The step of making the layout structure explicit and correcting the initial layout diagram based on the element states of each spatial layout element and the spatial constraint elements in the initial layout diagram, to obtain a corrected layout diagram including structured spatial layout elements, includes: Based on the visual features of each spatial layout element in the initial layout diagram and the spatial constraint elements, the layout structure of the initial layout diagram is made explicit to obtain an intermediate layout diagram. According to the element geometry rules corresponding to the type of each spatial layout element, the geometric features of each spatial layout element in the intermediate layout diagram are reconstructed to obtain the corrected layout diagram.

3. The method according to claim 2, characterized in that, The spatial layout elements are represented by pixel regions consisting of multiple pixels in the initial layout diagram; the visual features include the pixel values ​​of each pixel in the pixel region; the spatial constraint elements include spatial boundary elements. The step of visualizing the layout structure of the initial layout diagram based on the visual features of each spatial layout element and the spatial constraint elements to obtain an intermediate layout diagram includes: Based on the preset pixel values ​​corresponding to the types of each spatial layout element, the pixel values ​​of the pixel areas occupied by each spatial layout element in the initial layout diagram are normalized to obtain the first layout diagram. Using morphological operations and geometric fitting methods, the spatial layout elements in the first layout diagram are reconstructed to generate closed element boundaries, thus obtaining the second layout diagram. The spatial layout elements in the second layout diagram are mapped to the base map so that each spatial layout element is constrained within the spatial range defined by the spatial boundary elements, thus obtaining the intermediate layout diagram.

4. The method according to claim 2, characterized in that, The geometric features include at least one of the following: geometric shape, topological structure, scale, location, and feature boundary; the feature geometric rules corresponding to the types of each of the spatial layout features include: When the type of the spatial layout element is a building type, the geometric rule of the element is to reconstruct the geometric shape of the spatial layout element into the target geometric shape; When the type of the spatial layout element is road type, the geometric rule of the element is to perform skeletonization processing on the spatial layout element and repair the breaks, so that the topological structure of the spatial layout element meets the preset connectivity requirements. When the type of the spatial layout element is a plant type, the geometric rule of the element is to reconstruct the geometric shape of the spatial layout element into a planar shape or a point shape according to the scale of the spatial layout element. When the type of the spatial layout element is paving type or water body type, the element geometry rule is to smooth the element boundary of the spatial layout element.

5. The method according to claim 1, characterized in that, The evaluation metrics that update and display the association between the edited feature layers and the edited hierarchical layout map include: The layered layout diagram after editing the target object is compared with the original layered layout diagram to determine the edited element layers in the edited layered layout diagram; The evaluation metrics associated with the edited feature layers are recalculated to obtain updated evaluation metrics; The updated evaluation metrics are displayed on the display interface.

6. The method according to claim 1 or 5, characterized in that, The method further includes: The evaluation indicators or updated evaluation indicators are compared with the preset indicator specifications to obtain the comparison results. In response to the comparison result indicating that the evaluation index or the updated evaluation index does not meet the preset index specification, based on the comparison result, modification suggestions are generated for the target feature layer associated with the evaluation index or the updated evaluation index. The modification suggestions are used to guide the target object to adjust the target feature layer to meet the preset index specification. The target feature layer can be one or more. The proposed modifications are displayed on the interface.

7. The method according to claim 1, characterized in that, The step of performing layered decoupling processing on the modified layout diagram according to the type of each of the structured spatial layout elements to obtain a layered layout diagram including an element layer of each of the structured spatial layout elements includes: Based on the mapping relationship between the types of the structured spatial layout elements and the layer levels, each of the structured spatial layout elements in the modified layout diagram is assigned to the corresponding layer level to obtain a third layout diagram including at least one layer level. The structured spatial layout elements, excluding the bottom layer, of the third layout diagram are extracted along the element boundaries to obtain a layered layout diagram that includes the element layers.

8. The method according to claim 1, characterized in that, The method further includes: In response to receiving the layout rendering instruction for the target object, layout constraint information is determined based on the target layout diagram; Under the constraints of the layout constraint information, the target layout diagram is rendered into a real-world layout image.

9. The method according to claim 1, characterized in that, The layout quality of the modified layout map is evaluated based on the distribution characteristics of each of the structured spatial layout elements in the modified layout map, resulting in at least one evaluation index, including: Based on the distribution characteristics of each of the structured spatial layout elements in the modified layout map, at least one of the element proportion index, landscape pattern index, and spatial accessibility index is used as the evaluation index. Among them, the element ratio indicators include at least one of building coverage, paving and road coverage, grassland ratio, tree ratio, green space ratio, water body ratio and permeability, which are used to measure the spatial distribution of different types of structured spatial layout elements in the space to be planned. The landscape pattern indicators include at least one of edge density, patch density, Shannon diversity index, average patch shape index, aggregation index, and maximum patch index, which are used to measure the ecological spatial pattern of the modified layout map. The spatial accessibility indicators include at least one of the following: the number of road connectivity components, the percentage of the largest connectivity component, and the average shortest path length, which are used to measure road network connectivity.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Three-dimensional city scene construction method

    CN120355863A

  • Photon integrated chip layout design method and system based on artificial intelligence

    CN121659885A