A semantic constraint floor plan solving method, system and computer readable medium for existing residential renovation

CN122839503APending Publication Date: 2026-09-29NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611024916.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

因此,生成结果可能出现穿越保留墙体、堵塞入口、忽略窗的位置、湿区远离管井、公共区不可达等问题

Benefits of technology

[0016]有益效果:本发明将既有住宅平面图的栅格语义底图中的固定墙体、窗、入口和管井转化为可计算约束,通过约束规划-可满足性模型求解主要功能房间布局,使输出结果具备可计算、可复核和可追踪的特点,从入口可达的剩余空间中派生公共区,能够识别房间占位是否封堵入口或割裂公共空间,并输出主要功能房间布局,从而为既有住宅更新提供可解释的布局求解工具,解决了现有平面生成方法难以继承既有结构条件的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122839503A_ABST
    Figure CN122839503A_ABST
Patent Text Reader

Abstract

This invention discloses a semantically constrained floor plan layout solution method, system, and computer-readable medium for existing residential building renovation. The method includes: (1) obtaining a raster semantic base map and renovation target of the existing residential building floor plan; (2) obtaining allocable indoor areas; (3) constructing a solution grid; (4) marking window contact grid cells, entrance contact grid cells, reserved grid cells for the entrance public area, and utility shaft service grid cells on the solution grid; (5) obtaining a set of room instances based on the renovation target and determining the candidate grid cells corresponding to each room instance; (6) constructing a constrained programming-satisfaction model; and (7) obtaining and solving the optimization objective of the constrained programming-satisfaction model to obtain the layout of the main functional rooms. This invention can provide an interpretable layout solution tool for existing residential building renovation, solving the problem that existing floor plan generation methods are difficult to inherit existing structural conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of architectural planning technology, and in particular to a method, system, and computer-readable medium for solving semantically constrained floor plan layouts for the renewal of existing residential buildings. Background Technology

[0002] As urban development gradually shifts from incremental expansion to stock renewal, converting existing residential buildings into affordable rental housing, talent apartments, long-term rental apartments, and senior living apartments has become a common design task. In such tasks, the exterior walls, preserved walls, windows, entrances, utility shafts, and existing spatial boundaries of the buildings often cannot be arbitrarily altered, and wet areas such as kitchens and bathrooms also need to rely on existing utility shafts or service facilities for their layout. Compared to generating floor plans for new residential buildings, the core issue of renovating existing residential buildings is not freely generating a floor plan within blank boundaries, but rather determining whether new functional requirements can be embedded within the existing spatial shell and fixed semantic conditions, forming an early functional layout that can be further refined by the architect.

[0003] Existing methods for automatically generating residential floor plans typically include image translation-based methods, generative adversarial network-based methods, diffusion model-based methods, graph structure constraint-based methods, and language model-based interactive methods. These methods can generate visually complete floor plans given boundaries, room relationships, or textual descriptions, or generate room layouts that conform to certain statistical patterns. However, these methods often treat elements such as walls, windows, entrances, and manholes as generation conditions or visual cues, rather than as hard constraints in the solution process. Therefore, the generated results may exhibit problems such as passing through retained walls, blocking entrances, ignoring window locations, wet areas being far from manholes, and public areas being inaccessible.

[0004] In summary, existing residential floor plan generation technologies generally suffer from problems such as insufficient inheritance of existing structural constraints, unverifiable wet area service relationships, and insufficient screening of differences among multiple schemes, making it difficult to meet the needs of early functional layout deduction and feasibility assessment in existing residential renovation scenarios. Summary of the Invention

[0005] Purpose of the invention: To address the above-mentioned shortcomings, this invention proposes a semantically constrained plan layout solution method, system, and computer-readable medium for existing residential building renovation. It transforms fixed walls, windows, entrances, and manholes in the raster semantic base map of existing residential building floor plans into computable constraints. The layout of main functional rooms is solved using a constraint programming-satisfactionability model, making the output results computable, verifiable, and traceable. This provides an interpretable layout solution tool for existing residential building renovation, solving the problem that existing plan generation methods struggle to inherit existing structural conditions.

[0006] Technical solution: This invention provides a method for solving semantically constrained planar layouts for existing residential redevelopment, including: (1) Obtain the raster semantic base map and update target of the existing residential floor plan; The raster semantic base map contains semantic elements including fixed walls, windows, entrances and pipe shafts, and update targets include room type, number of rooms, area parameters and room attributes. (2) Extract the fixed walls, windows, entrances and pipe shafts of the existing residential buildings based on the raster semantic base map, thereby identifying indoor and outdoor areas and obtaining the allocatable indoor areas; (3) Discretize the allocatable indoor area into several grid cells, and obtain the adjacency relationship between adjacent grid cells based on the fixed walls, thereby constructing the solution grid; (4) Combining steps (2) and (3), mark the window contact grid cells, entrance contact grid cells, entrance public area reserved grid cells adjacent to the entrance contact grid cells, and well service grid cells on the indoor side of the fixed wall to which the well is attached on the solution grid. (5) Based on the update target, set the lighting requirements, wet area service requirements, area occupancy range and connectivity requirements for each room to obtain a set of room instances, and then determine the candidate grid cells corresponding to each room instance; (6) Based on steps (3)-(5), construct a constrained programming-satisfactionability model, whose constraints include at least one of the following constraints: Unique grid cell allocation constraint: Each grid cell can be assigned to at most one room instance; Candidate domain constraint: Room instances can only occupy grid cells in their candidate grid cells; Area constraint: The number of grid cells occupied by a room instance is within its occupied area range, which is obtained by scaling the actual room area requirement in the update target obtained in step (1) according to a preset occupied scaling factor; Lighting constraint: Room instances requiring lighting must occupy at least one window-contact grid cell; Wetland service constraints: A room instance with wetland service requirements is bound to a manhole and occupies at least one manhole service grid cell on the manhole service band corresponding to that manhole. The number of room instances with wetland service requirements in the same manhole service does not exceed the preset capacity. Entrance reservation constraints: Instances of main functional rooms must not occupy reserved grid cells in the entrance public area; Connectivity constraint: The grid cells occupied by the same room instance form a connected region in terms of adjacency; (7) Obtain the optimization objective of the constraint planning-satisfaction model constructed in step (6) and solve it to obtain the main functional room layout representing the set of grid cells occupied by each room instance.

[0007] Specifically, in step (2), the masks of fixed walls, windows, entrances and manholes of the existing residential building are extracted according to the raster semantic base map. The fixed wall mask, window mask and entrance mask are combined into a closed mask. The area of ​​the non-closed mask is flooded from the outer boundary of the raster semantic base map of the existing residential building floor plan to obtain the externally accessible area. The area that is not externally accessible and does not belong to the corresponding semantic element is identified as the indoor area to obtain the corresponding indoor area mask. The manhole area is removed from the indoor area mask to obtain the allocatable indoor area.

[0008] Specifically, in step (4), the window contact grid unit and the entrance contact grid unit are determined in the following way: Based on the attachment relationship between the window or entrance and the fixed wall, the window or entrance attached to the fixed wall is mapped to the corresponding grid cell, thereby obtaining the window contact grid cell and the entrance contact grid cell; The reserved grid cells in the entrance public area can be obtained by expanding the adjacency relationship of the entrance contact cells; The well service grid unit generates a well service zone of a preset depth along the indoor side of the well attached to the fixed wall based on the attachment relationship between the well (i.e., the wet area service anchor point) and the fixed wall, and maps it to the corresponding grid unit to determine the well service grid unit.

[0009] Specifically, in step (6), the constrained planning-satisfaction model constructed is the CP-SAT model; the connectivity constraint is implemented through single-source flow constraint. An independent virtual flow network is set up for each room instance, and virtual flow is sent from the root grid cell of the room instance to other grid cells occupied by the room instance. Whether the virtual flow can reach other grid cells is used to determine whether other grid cells are connected to the root grid cell.

[0010] Specifically, the optimization objective of the constrained programming-satisfactionability model is either a minimum occupancy objective or a minimum area deviation objective. The minimum occupancy objective is to minimize the total number of grid cells occupied by the main functional rooms, and the minimum area deviation objective is to minimize the deviation between the occupancy area of ​​all room instances and the target area.

[0011] Specifically, before solving the constrained programming-satisfaction model in step (7), a feasibility pre-check can be performed, which includes: Area pre-check: Whether the total area occupied by the minimum area of ​​all room instances exceeds the area of ​​the allocable indoor area; Window contact pre-inspection: When there are room instances with lighting requirements, check whether there are window contact resources; Wet zone service pre-inspection: Does the number of room instances with wet zone service requirements exceed the preset capacity of all manholes? Pre-inspection of entrance reserved grid units: Whether the reserved grid units in the entrance contact grid unit and the entrance public area exist; If any of the aforementioned conditions are not met, output the layout failure result directly and return to step (5).

[0012] Specifically, it also includes the following steps: The grid cells not occupied by the main functional rooms are taken as the set of remaining grid cells. The intersection of the grid cells that the entrance contacts and the set of remaining grid cells is taken as the set of search source points. The search source point set is traversed, and any grid cell is taken as the source point. A flood search is performed in the set of remaining grid cells along the adjacency relationship to obtain the public area that the entrance can reach. The remaining grid cells that are not searched are marked as unreachable residual grid cells. Diagnose the layout of the main functional rooms and public areas, obtain the diagnostic results, and output a functional color block layout diagram containing the layout of the main functional rooms, public areas, and diagnostic results. The diagnostic results include one or more of the following: the set of search source points, the set of public area grid cells, the number of connected components in the public area, the number of unreachable residual grid cells, the number of reserved intrusions in the entrance public area, the proportion of narrow grid cells in the public area, and the contact status between the kitchen or bathroom and the public area; in: The number of connected components in the common area is obtained by performing a breadth-first search or depth-first search on the subgraph formed by the grid cells occupied by the common area; The number of reserved intrusions in the entrance public area is calculated by the intersection of the set of grid cells occupied by the main functional room instances and the set of reserved grid cells in the entrance public area; The proportion of narrow grid cells in the common area is obtained by calculating the number of narrow grid cells with a single grid cell thickness in the common area; The contact status includes effective contact and invalid release, and whether there is at least one four-sided edge that is not blocked by a wall between the grid cell occupied by the kitchen or bathroom and the grid cell occupied by the public area.

[0013] More specifically, in step (7), multiple candidate layouts are generated by cyclically shifting or sorting room instances and determining the priority of candidate grid cells by sorting by Manhattan distance; The optimal layout is obtained by removing duplicates based on the differences among multiple candidate layouts and sorting them according to the quality score of each candidate layout. The difference in the candidate layout is calculated by weighted summation of the overlap rate of the grid cells occupied by the same room instance in the candidate layout and the geometric center offset distance; The quality score of the candidate layout is calculated based on whether it passes diagnostic verification, the area of ​​the public area, the number of unreachable residual grid cells, the number of reserved intrusions in the entrance public area, the connectivity of the public area, and the personalized preference score. The current layout is considered to have passed diagnostic verification only if all of the following conditions are met: (1) The set of grid cells in the common area is not empty; (2) The public area has only one connected component; (3) The number of unreachable residual mesh cells is 0; (4) The number of intrusions reserved in the public area at the entrance is 0; (5) The proportion of narrow public areas shall not exceed the set ratio; (6) The kitchen and toilet have effective contact with the public area.

[0014] This invention also provides a semantically constrained planar layout solution system for existing residential redevelopment, which applies the aforementioned semantically constrained planar layout solution method for existing residential redevelopment, comprising: The data acquisition module is used to acquire the raster semantic base map and update target of the existing residential floor plan; The allocatable area acquisition module is used to extract the fixed walls, windows, entrances and pipe shafts of existing residential buildings based on the raster semantic base map, thereby identifying indoor and outdoor areas and then acquiring allocatable indoor areas; The mesh construction module is used to discretize the allocatable indoor area into several mesh cells, and obtain the adjacency relationship between adjacent mesh cells based on the extracted fixed walls, thereby constructing the solution mesh; The semantic annotation module is used to annotate window contact grid cells, entrance contact grid cells, entrance public area reserved grid cells, and manhole service grid cells in the allocable indoor area on the solution grid; The demand standardization module is used to set the lighting requirements, wet area service requirements, area occupancy range and connectivity requirements for each room according to the update target, to obtain a set of room instances, and then determine the candidate grid cells corresponding to each room instance. The model building module is used to build constrained programming-satisfactionability models, whose constraints include at least one of the following: Unique grid cell allocation constraint: Each grid cell can be assigned to at most one room instance; Candidate domain constraint: Room instances can only occupy grid cells in their candidate grid cells; Area constraint: The number of grid cells occupied by a room instance is within its occupied area; Lighting constraint: Room instances requiring lighting must occupy at least one window-contact grid cell; Wetland service constraints: A room instance with wetland service requirements is bound to a manhole and occupies at least one manhole service grid cell on the manhole service band corresponding to that manhole. The number of room instances with wetland service requirements in the same manhole service does not exceed the preset capacity. Entrance reservation constraints: Instances of main functional rooms must not occupy reserved grid cells in the entrance public area; Connectivity constraint: The grid cells occupied by the same room instance form a connected region in terms of adjacency; The model solving module is used to obtain and solve the optimization objective of the constructed constraint planning-satisfaction model, and obtain the main functional room layout representing the set of grid cells occupied by each room instance.

[0015] The present invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for solving semantically constrained planar layouts for existing residential buildings.

[0016] Beneficial effects: This invention transforms fixed walls, windows, entrances, and manholes in the grid semantic base map of existing residential floor plans into computable constraints. It solves the layout of main functional rooms through a constraint programming-satisfactionability model, making the output results computable, verifiable, and traceable. It derives public areas from the remaining space accessible from the entrance, can identify whether room occupancy blocks the entrance or divides the public space, and outputs the layout of main functional rooms. This provides an interpretable layout solution tool for the renovation of existing residential buildings and solves the problem that existing floor plan generation methods cannot inherit existing structural conditions. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating the semantic constraint plan layout solution method for existing residential building renovation provided in this embodiment of the invention; Figure 2 A schematic diagram of the grid semantic base map and semantic elements of an existing residential floor plan provided in an embodiment of the present invention; Figure 3 A schematic diagram illustrating the solution mesh and contact mesh element annotations provided in an embodiment of the present invention; Figure 4A schematic diagram illustrating the construction of a constraint planning-satisfactionability model provided in an embodiment of the present invention; Figure 5 A schematic diagram illustrating the derivation and diagnosis of the public area provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the multi-candidate functional color block layout output provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions and advantages of the present invention clearer, the present application will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0020] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of the present invention should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0021] The flowchart of the semantically constrained planar layout solution method for existing residential renovation of the present invention is as follows: Figure 1 As shown, it includes: (1) Obtain the raster semantic base map and update target of the existing residential floor plan; The raster semantic base map contains semantic elements including fixed walls, windows, entrances and pipe shafts, and update targets include room type, number of rooms, area parameters and room attributes. (2) Extract the fixed walls, windows, entrances and pipe shafts of the existing residential buildings based on the raster semantic base map obtained in step (1), thereby identifying indoor and outdoor areas and then obtaining the allocatable indoor areas; (3) Discretize the allocatable indoor area obtained in step (2) into several grid cells, and obtain the adjacency relationship between adjacent grid cells based on the fixed wall extracted in step (2), thereby constructing the solution grid; (4) Combining steps (2) and (3), mark the window contact grid cells, entrance contact grid cells, entrance public area reserved grid cells adjacent to the entrance contact grid cells, and well service grid cells on the indoor side of the fixed wall to which the well is attached on the solution grid. (5) Based on the update target obtained in step (1), set the lighting requirements, wet area service requirements, area occupancy range and connectivity requirements for each room to obtain a set of room instances, and then determine the candidate grid cells corresponding to each room instance. (6) Based on steps (3)-(5), construct a constrained programming-satisfactionability model, whose constraints include at least one of the following constraints: Unique grid cell allocation constraint: Each grid cell can be assigned to at most one room instance; Candidate domain constraint: Room instances can only occupy grid cells in their candidate grid cells; Area constraint: The number of grid cells occupied by a room instance is within its occupied area range. Specifically, the occupied area range can be obtained by scaling the actual area requirement of the room according to the preset occupied scaling factor. The preset occupied scaling factor can be set according to the update task, drawing expression requirements or design stage, and is greater than 0 and less than or equal to 1. Lighting constraint: Room instances requiring lighting must occupy at least one window-contact grid cell; Wetland service constraints: A room instance with wetland service requirements is bound to a manhole and occupies at least one manhole service grid cell on the manhole service band corresponding to that manhole. The number of room instances with wetland service requirements in the same manhole service does not exceed the preset capacity. Entrance reservation constraint: Main functional room instances must not occupy reserved grid cells in the entrance public area to avoid blocking the public space on the entrance side; among them, main functional room instances are room instances generated according to the update objective, which are independent solution objects in the constrained programming-satisfactionability model and directly occupy the set of grid cells, such as bedrooms, kitchens and bathrooms, etc. The public area does not belong to the main functional room instances, but is derived from the remaining grid cells reachable from the entrance after the main functional room instances have completed their occupancy; Connectivity constraint: The grid cells occupied by the same room instance form a connected region in terms of adjacency; (7) Obtain the optimization objective of the constraint planning-satisfaction model constructed in step (6) and solve it to obtain the main functional room layout representing the set of grid cells occupied by each room instance.

[0022] In this invention, in step (1), the raster semantic base map of the existing residential floor plan can be a two-dimensional color raster image or a two-dimensional multi-channel semantic map. Specifically, fixed walls, windows, entrances and manholes in the existing residential floor plan can be identified by color or semantic channels, thereby forming the raster semantic base map of the existing residential floor plan.

[0023] In this invention, fixed walls are used to represent insurmountable boundaries, windows are used to represent lighting anchor points, entrances are used to represent accessible source points in public areas, and manholes are used to represent wet area service anchor points in kitchens and bathrooms that have wet area service needs.

[0024] In this embodiment, refer to Figure 2 In the left image, using a two-dimensional color raster image as an example, a fixed wall can be represented by black pixels, a window by blue pixels, an entrance by yellow pixels, and a manhole by red pixels. Of course, the above color identifiers are only one embodiment; in other embodiments, they can also be represented by other color identifiers, semantic category numbers, or multi-channel masks.

[0025] In this invention, reference is made to Figure 2 As shown in the right figure, after obtaining the raster semantic base map I of the existing residential floor plan, masks M for fixed walls can be generated based on color or semantic channels respectively. wall Window mask M window Entrance Mask M entry and well mask M shaft Furthermore, connected component analysis is performed on various masks to obtain corresponding semantic elements, namely, fixed walls, windows, entrances, and manholes.

[0026] In this invention, in step (2), the fixed wall mask M can be... wall Window mask M window and entrance mask M entry Synthesized into a closed mask M closure The area of ​​the non-closed mask is flooded with water from the outer boundary of the raster semantic base map of the existing residential floor plan obtained in step (1), thereby obtaining the externally accessible area, which is identified as the outdoor area, and the corresponding outdoor area mask M is obtained. outdoor Regions that are not reached from the outside and do not belong to the corresponding semantic elements are identified as indoor regions, and the corresponding indoor region mask M is obtained. indoor ,like Figure 2 As shown in the right figure, the corresponding mask can be represented by the corresponding color in the raster semantic base map I. Figure 2 In the two images below the right-hand side, the gray areas represent the corresponding indoor / outdoor area masks. Therefore, we can determine the indoor area mask M from the... indoor The area around the manhole is removed to obtain the allocatable indoor area.

[0027] In this invention, reference can be made to Figure 3 In the left figure, in step (3), the allocatable indoor area is discretized into several grid cells, such as... Figure 3 In the light blue area of ​​the left figure, each grid cell records its center coordinates, actual area, fixed wall coverage, manhole coverage, window coverage, entrance coverage, and adjacent grid cells. Among them, the four-adjacent relationship can be used to determine whether two grid cells are adjacent, and the connection relationship on the common boundary of adjacent grid cells can be blocked based on the fixed walls in the allocable indoor area, i.e., the boundaries that cannot be crossed.

[0028] Specifically, for any two adjacent grid cells; If there is no fixed wall blocking the way between the two, then an adjacent edge is established between them; If there is a fixed wall obstructing the way, such as Figure 3 As shown by the red cross in the left figure, no adjacent edges are established, thus transforming the fixed wall into an insurmountable topological obstacle in the solution mesh; From this, the adjacency relationship between any two adjacent mesh elements can be obtained, leading to the adjacency graph in the discrete mesh element set C, and thus the solution mesh G=(C,E), as follows. Figure 3 As shown.

[0029] In this invention, in step (3), the allocatable indoor area obtained in step (2) is discretized into several grid units as follows: Based on the scale of the raster semantic base map obtained in step (1), the preset physical grid side length is converted into pixel size. Accordingly, the allocatable indoor area is divided into several square grids along the horizontal and vertical coordinate axes of the existing residential floor plan. Then, the indoor grid units that can participate in the solution can be determined according to the position of the center point of each grid unit and the coverage ratio of the allocatable indoor area. The physical grid side length can be set according to the solution accuracy and computational load. In this embodiment, 0.25 m is used.

[0030] In this invention, in step (4), refer to Figure 3 Window contact grid cells and entrance contact grid cells can be determined as follows: Based on the attachment relationship between the window or entrance and the fixed wall, the window (lighting anchor point) or entrance (public area reachable search source point) attached to the fixed wall is mapped to the corresponding grid cell, thereby obtaining the window contact grid cells and entrance contact grid cells, and obtaining the window contact grid cell set W (e.g., ...). Figure 3 The blue area in the right figure) and the inlet contact mesh cell set Eentry (such as Figure 3 (The yellow area in the right image).

[0031] In this invention, reference continues to be made to Figure 3 The reserved grid cells for the entrance public area can be obtained by expanding the entrance contact cell set Eentry on the adjacency relationship E, such as... Figure 3 The orange area in the right image is as follows: E reserve ={c i ∈C|d G (c i E reserve )≤k}; Among them, E reserve d represents the set of reserved grid cells in the entrance public area, which consists of reserved grid cells. G (c i E reserve ) represents a certain grid cell c iThe shortest path distance to any entrance contact grid cell in the set of entrance contact grid cells, Eentry, on the adjacency graph; k represents the number of reserved expansion layers at the entrance, which is the maximum number of steps for the entrance contact grid cell to expand breadth-first along the adjacency relationship of the solved grid towards the interior side. Here, the number of steps represents the number of grid cells expanded through adjacency relationships. For example, if the graph distance of the entrance contact grid cell itself is 0, the grid cells that are adjacent to it four times and are not blocked by the wall are the first layer, the grid cells that continue to be adjacent outward are the second layer, and so on.

[0032] In this invention, reference continues to be made to Figure 3 The acquisition of well service grid cells can be based on the attachment relationship between the well (i.e., the wetland service anchor point) and the fixed wall. A well service zone of a preset depth is generated along the indoor side of the well attached to the fixed wall. When the well service zone is empty, it is locally widened according to a preset tolerance or expansion depth and mapped to the corresponding grid cell, thereby determining the well service grid cell and obtaining the wetland service grid cell set B. shaft It should be noted that each well generates a service zone corresponding to more than one well service grid cell, thus each well can correspond to a set B of well service grid cells. s Then the set B of all well service grid cells corresponding to all wells s The wetland service grid cell set B shaft ,like Figure 3 The pink area in the right image.

[0033] In this invention, in step (5), the type of each room is determined according to the update target obtained in step (1), and its lighting requirements, wet area service requirements, area range, and connectivity requirements are set, thereby determining its corresponding candidate grid unit. In this embodiment, the bedroom has lighting requirements, and the kitchen and bathroom have wet area service requirements; the area range of the room instance can be obtained by scaling the actual room area requirements in the update target obtained in step (1) according to the preset area scaling factor, specifically [a min (r),a max (r)], where a min (r), a max (r) represents the minimum and maximum area occupied by room instance r, respectively; connectivity requirement means that all grid cells occupied by the same room instance must be interconnected through vertical and horizontal adjacency relationships that are not blocked by fixed walls, forming a single connected area. A room is not allowed to be divided into two or more unconnected areas. In this embodiment, connectivity requirements are set for all main functional room instances. Of course, the above settings can be adjusted according to design tasks, local specifications, or user needs.

[0034] In this invention, such as Figure 4As shown, the constrained programming-satisfaction model constructed in step (6) is the CP-SAT model.

[0035] In this invention, reference continues to be made to Figure 4 In step (6), the length s of the mesh cell in actual space is obtained. x and width s y Then the actual area a of the grid cell c =s x ×s y ; Therefore, the area constraint can be obtained as follows: ; Among them, S r This indicates the number of grid cells occupied by room instance r. x(c,r) represents a Boolean variable. When x(c,r)=1, it means that grid cell c is assigned to room instance r. When x(c,r)=0, it means that grid cell c is not assigned to room instance r. , indicating the lower limit of the number of grid cells; , indicating the maximum number of grid cells.

[0036] In this invention, in step (6), a well service constraint is applied, binding at least one well to a room instance with wet area service requirements, as follows: ; Among them, y r,s ∈{0,1} indicates whether the room instance r is bound to the pipe well s, with a value of 1 indicating binding and a value of 0 indicating no binding; S shaft R represents a collection of wells. wet This represents a collection of room instances that require wet area services. Therefore, the service constraints of the wetland area are as follows: ; Among them, B s This represents the set of well service grid cells corresponding to well s.

[0037] In this invention, a capacity constraint can also be set for the maximum number of room instances with wet area service requirements that each manhole can serve, as follows: .

[0038] In this invention, in step (6), connectivity constraints can be implemented through single-source flow constraints. Specifically, an independent virtual flow network is set up for each room instance, and virtual flow is sent from the root grid cell of the room instance to other grid cells occupied by the room instance. Whether the virtual flow can reach other grid cells is used to determine whether other grid cells are connected to the root grid cell.

[0039] More specifically, the adjacency relationship between two adjacent grid cells in the solution grid is transformed into two directed adjacency edges with opposite directions, resulting in a set E of directed adjacency edges. For each room instance r, a grid cell is pre-selected from its grid cells as the root grid cell i, thus obtaining the following constraint: ; Among them, f r,i,j This represents the virtual traffic on the directed adjacent edge from room instance r to its root grid cell i to its grid cell j. When grid cell i or j is not occupied by room instance r, the traffic on the corresponding directed adjacent edge is zero, that is, virtual traffic can only be transmitted between adjacent grid cells both occupied by room instance r; |C| is the number of grid cells in the grid cell set C, representing the maximum number of virtual traffic that needs to be sent from root grid cell i to other grid cells, and root grid cell i provides one unit of virtual traffic for each non-root grid cell occupied by room instance r; The difference between the inflow and outflow of virtual flow in grid cell j is one, indicating that the grid cell receives a net one unit of virtual flow, as shown below: ; Among them, f r,j,i This represents the virtual flow on the directed adjacent edge from grid cell j to its root grid cell i in room instance r; When x(j,r)=0 in the aforementioned formula, the grid cell j neither receives nor transmits the flow of room instance r, that is, it is not connected to the root grid cell i. If a certain grid cell j occupied by room instance r is not connected to the root grid cell i, then the grid cell j cannot obtain a unit flow from the root grid cell i through the directed adjacent edge, and therefore cannot satisfy the above single source flow constraint, thus ensuring that all grid cells occupied by the same room instance form a connected region in solving the adjacency relationship of the grid.

[0040] In this invention, reference is made to Figure 5 In step (7), the optimization objective of the constraint programming-satisfactionability model can be set according to different design stages; in the early layout guidance stage, the minimum occupancy objective is preferred, that is, minimizing the total number of grid cells occupied by the main functional rooms, so that the output layout L of the main functional rooms is optimized. r This represents the anchor points for room location distribution, rather than the final actual boundaries of the rooms. When a design phase requires a closer approximation of the actual area, a goal of minimizing area deviation can also be adopted.

[0041] Specifically, in one embodiment, the optimization objective of the constraint programming-satisfactionability model is the minimum occupancy objective F. area Specifically: .

[0042] In another embodiment, the constrained programming-satisfactionability model can employ a minimization of area deviation objective, that is, minimizing the deviation between the occupied area of ​​all room instances and the target area, as follows: ; Where, d r This represents the number of grid cells corresponding to the occupied area of ​​room instance r and the target number of grid cells A. r,tar The absolute deviation between a tar (r) represents the target area of ​​room instance r; That is, d r Must meet: ; ; .

[0043] Furthermore, in this invention, when it is necessary to consider both the minimum footprint target and the minimum area deviation target, the comprehensive objective function can be expressed as: ; Where α and β are non-negative weighting coefficients. In the functional color block layout stage, α can be taken as a larger value to prioritize compressing the area occupied by the main functional rooms; in the near-final plan refinement stage, β can be taken as a larger value to prioritize approaching the target area.

[0044] In this invention, before solving the constrained programming-satisfactionability model in step (7), a feasibility pre-check can be performed, which includes: Area pre-check: Whether the total area occupied by the minimum area of ​​all room instances exceeds the area of ​​the allocable indoor area; Window contact pre-inspection: When there are room instances with lighting requirements, check whether there are window contact resources; Wet zone service pre-inspection: Does the number of room instances with wet zone service requirements exceed the preset capacity of all manholes? Pre-inspection of entrance reserved grid units: Whether the reserved grid units in the entrance contact grid unit and the entrance public area exist; If any of the aforementioned conditions are not met, the layout failure result can be output directly, and the process can return to step (5).

[0045] In this invention, reference continues to be made to Figure 5The grid cells not occupied by the main functional rooms can be used as the set of remaining grid cells. The intersection of the grid cells that the entrance contacts and the set of remaining grid cells is used as the set of search source points. The search source point set is traversed, and any grid cell is used as the source point. A flood search is performed in the set of remaining grid cells along the adjacency relationship to obtain the public area Z that the entrance can reach. The remaining grid cells that are not searched are marked as unreachable residual grid cells.

[0046] Furthermore, continue to refer to Figure 5 It can diagnose the layout of main functional rooms and public areas, obtain diagnostic results, and output a functional color block layout diagram containing the layout of main functional rooms, public areas, and diagnostic results.

[0047] In this invention, the layout of the main functional rooms and the public area are diagnosed. The diagnosis result D includes one or more of the following: the set of search source points, the set of grid cells in the public area, the number of connected components in the public area, the number of unreachable residual grid cells, the number of reserved intrusions in the entrance public area, the proportion of narrow grid cells in the public area, and the contact status between the kitchen or bathroom and the public area. Specifically: If the search source point set is empty, it means that the main functional room may have blocked the entrance contact grid cell; The number of connected components in a common region can be obtained by performing a breadth-first search or depth-first search on the subgraph formed by the grid cells occupied by the common region. Each traversal starts from a grid cell of a common region that has not yet been visited, and a connected component is obtained. The connectivity of the common region can be determined from this. Specifically, a number of connected components in a common region of 1 indicates that the common region is completely connected, a number greater than 1 indicates that the common region is divided, and a number of 0 indicates that the common region is empty. If the set of public area grid cells is empty, it means that there is no public space accessible from the entrance; if the number of connected components in the public area is greater than 1, it means that the public area is fragmented. If the number of unreachable residual grid cells is at least 1, it indicates that there is residual indoor space that cannot be reached by the entrance; The number of reserved intrusions in the entrance public area is calculated by the intersection of the set of grid cells occupied by the main functional room instances and the set of reserved grid cells in the entrance public area; a value of 0 indicates no intrusion, and a value greater than 0 indicates that the entrance public space has been intruded. The proportion of narrow grid cells in the public area is obtained by calculating the number of narrow grid cells with a single grid cell thickness in the public area. The larger the proportion, the narrower the public space or the easier it is to form slender connections. It should not exceed a set ratio. In this embodiment, the set ratio is 35%. The contact status includes effective contact and invalid release, which can be determined by whether there is at least one four-sided edge that is not blocked by a wall between the grid cell occupied by the kitchen or bathroom and the grid cell occupied by the public area. If the kitchen or bathroom does not have effective contact with the public area, it means that although the wet area service constraint is met, it may not be possible to normally access the room instance with wet area service requirements from the public area.

[0048] Specifically, in the aforementioned diagnostic result D, the current layout can be considered to have passed verification only if the following conditions are met simultaneously: ① The set of grid cells in the public area is not empty; ②The common area has only one connected component; ③ The number of unreachable residual mesh cells is 0; ④ The number of intrusions allowed in the public area at the entrance is 0; ⑤ The proportion of narrow public areas should not exceed the set ratio; ⑥ The kitchen and bathroom have effective contact with the public areas.

[0049] In this invention, the output functional color block layout diagram retains the fixed walls, windows, entrances, and utility shafts in the existing residential floor plan's raster semantic base map, and uses different colors to represent bedrooms, kitchens, bathrooms, and public areas. The exported functional color block layout diagram can be a raster image, structured JSON diagnostic data, or a combination thereof.

[0050] In this invention, reference is made to Figure 6 Furthermore, multiple candidate solutions can be performed. Specifically, by cyclically shifting or sorting room instances and determining the priority of candidate grid cells using Manhattan distance, multiple candidate layouts can be generated. After multiple candidate layouts are generated, duplicates can be removed based on the degree of difference between them, and they can be sorted according to the quality score of each candidate layout to obtain the optimal layout.

[0051] In this invention, the difference in candidate layouts can be calculated by weighted summation of the overlap rate of grid cells occupied by instances of the same room in the candidate layouts and the geometric center offset distance, as follows:

[0052] For candidate layout L a and L b Let C r (L a ) indicates candidate layout L a The set of grid cells occupied by the room instance r, center(r,L) a ), center(r,L b ) indicates that room instance r is in candidate layout L a L b The geometric center of the two candidate layouts L is then determined. a and L b Div(L) a ,L b This can be represented as: ; Where |R| represents the total number of room instances, λ1 and λ2 are non-negative weight coefficients, and d1(center(r,L)) a ), center(r,L b )) indicates that room instance r is in candidate layout L a L b The geometric center offset distance in the middle.

[0053] In this invention, the quality score of the candidate layout can be calculated by whether it passes the diagnostic verification, the area of ​​the public area, the number of unreachable residual grid cells, the number of reserved intrusions in the entrance public area, the connectivity of the public area, and the personalized preference score. The quality score Q(L) of candidate layout L can then be expressed as: Q(L) = η1Valid(L) + η2A pub -η3|C unreach |-η4N enin -η5N cop -η6F area +η7Pref(L); Where Valid(L) indicates whether candidate layout L passes the diagnostic validation; it is 1 if it passes and 0 if it fails. pub The area of ​​the common area in candidate layout L can be obtained by adding the areas of all grid cells in the common area; |C unreach | represents the set of unreachable residual mesh cells C in candidate layout L. unreach The number of unreachable residual mesh cells; N enin N represents the number of reserved intrusions in the entrance public area of ​​candidate layout L, obtained by the intersection of the main functional rooms and the set of reserved grid cells in the entrance public area; cop The penalty term for the presence of connected components in the common area of ​​candidate layout L is calculated using N(cop-1), where cop represents the number of connected components in the common area and N represents the penalty coefficient. Pref(L) represents the personalized preference score of candidate layout L, which can be based on the normalized Manhattan distance between room instances in the candidate layout. For proximity and proximity to wet areas, the smaller the Manhattan distance between corresponding room instances, the higher the score. For distance, distance from the kitchen, and dispersed bedroom relationships, the larger the Manhattan distance between corresponding room instances, the higher the score. η1 to η7 are weighting coefficients. In this application, η1 can be set to the highest, and η3 to η6 can be higher than η2 and η7.

[0054] Specifically, one or more of the proximity, distance, and dispersed arrangement relationships among room instances in candidate layout L can be used as its personalized preference score Pref(L). This score can be calculated by taking the normalized Manhattan distance between room instances in candidate layout L, calculating the score for each relationship, and then summing them by weight. For proximity relationships, the smaller the Manhattan distance between the corresponding room instances, the higher the score. For distance and dispersed arrangement relationships, the larger the Manhattan distance between the corresponding room instances, the higher the score.

[0055] More specifically, a distance threshold can be obtained based on the update target. If the Manhattan distance is greater than the distance threshold, the corresponding room instance is considered to have a distance relationship, otherwise it is considered to have a proximity relationship. The distributed arrangement relationship means that the larger the sum of the Manhattan distances or the minimum Manhattan distance between each pair of room instances in the specified room group, the better. The specified room group is generally a bedroom.

[0056] In this invention, candidate layouts can be ranked according to their quality score Q(L), and then ranked according to the difference between each pair of candidate layouts Div(L). a ,L b Remove overly similar candidate layouts.

[0057] Furthermore, before ranking each candidate layout according to its quality score Q(L), the candidate layout that satisfies the individual preference can be selected first by minimizing the individual preference score of the candidate layout L.

[0058] In one embodiment, for the same existing residential floor plan with a raster semantic base map and an update target of "three bedrooms, one kitchen, and one bathroom," the present invention can output multiple functional color block layout candidate schemes. This result demonstrates that, using compact area occupancy parameters, the present invention can provide multiple functional layout schemes with similar areas but different spatial locations for the same update target.

[0059] In another embodiment, for the update target of "three bedrooms, one kitchen, and two bathrooms," the present invention outputs multiple functional color block layout candidate schemes. This result demonstrates that the present invention can continue to output multiple candidate layouts under more complex conditions involving a greater number of wet areas, while retaining the diagnostic capabilities for manhole service relationships and public area accessibility.

[0060] This invention also provides a semantically constrained planar layout solution system for existing residential renovation, comprising: The data acquisition module is used to acquire the raster semantic base map and update target of the existing residential floor plan; The allocatable area acquisition module is used to extract the fixed walls, windows, entrances and pipe shafts of existing residential buildings based on the raster semantic base map, thereby identifying indoor and outdoor areas and then acquiring allocatable indoor areas; The mesh construction module is used to discretize the allocatable indoor area into several mesh cells, and obtain the adjacency relationship between adjacent mesh cells based on the extracted fixed walls, thereby constructing the solution mesh; The semantic annotation module is used to annotate window contact grid cells, entrance contact grid cells, entrance public area reserved grid cells, and manhole service grid cells in the allocable indoor area on the solution grid; The demand standardization module is used to set the lighting requirements, wet area service requirements, area occupancy range and connectivity requirements for each room according to the update target, to obtain a set of room instances, and then determine the candidate grid cells corresponding to each room instance. The model building module is used to build constrained programming-satisfactionability models, whose constraints include at least one of the following: Unique grid cell allocation constraint: Each grid cell can be assigned to at most one room instance; Candidate domain constraint: Room instances can only occupy grid cells in their candidate grid cells; Area constraint: The number of grid cells occupied by a room instance is within its occupied area range. Specifically, the occupied area range can be obtained by scaling the actual area requirement of the room according to the preset occupied scaling factor. The preset occupied scaling factor can be set according to the update task, drawing expression requirements or design stage, and is greater than 0 and less than or equal to 1. Lighting constraint: Room instances requiring lighting must occupy at least one window-contact grid cell; Wetland service constraints: A room instance with wetland service requirements is bound to a manhole and occupies at least one manhole service grid cell on the manhole service band corresponding to that manhole. The number of room instances with wetland service requirements in the same manhole service does not exceed the preset capacity. Entrance reservation constraints: Instances of main functional rooms must not occupy reserved grid units in the entrance public area to avoid blocking the public space on the entrance side; Connectivity constraint: The grid cells occupied by the same room instance form a connected region in terms of adjacency; The model solving module is used to obtain and solve the optimization objective of the constructed constraint planning-satisfaction model, and obtain the main functional room layout representing the set of grid cells occupied by each room instance.

[0061] The present invention also includes a public area derivation module, which is used to take the grid cells not occupied by the main functional rooms as the set of remaining grid cells, and take the intersection of the grid cells that the entrance contacts and the set of remaining grid cells as the set of search source points. The search source point set is traversed, and any grid cell is taken as the source point. A flood search is performed in the set of remaining grid cells along the adjacency relationship to obtain the public area that the entrance can reach. The remaining grid cells that are not searched are marked as unreachable residual grid cells.

[0062] The present invention also includes a diagnostic output module for diagnosing the layout of the main functional rooms and the public area, obtaining diagnostic results, and outputting a functional color block layout diagram containing the layout of the main functional rooms, the public area, and the diagnostic results.

[0063] This invention also includes a feasibility pre-check module, which performs a feasibility pre-check on the constrained programming-satisfiability model before the model solving module obtains and solves the optimization objective of the constructed model. The feasibility pre-check includes: Area pre-check: Whether the total area occupied by the minimum area of ​​all room instances exceeds the area of ​​the allocable indoor area; Window contact pre-inspection: When there are room instances with lighting requirements, check whether there are window contact resources; Wet zone service pre-inspection: Does the number of room instances with wet zone service requirements exceed the preset capacity of all manholes? Pre-inspection of entrance reserved grid units: Whether the reserved grid units in the entrance contact grid unit and the entrance public area exist; If the pre-check finds that any of the aforementioned conditions are not met, the layout failure result can be output directly and the process can be returned to step (5).

[0064] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, implements the aforementioned method for solving semantically constrained planar layouts for existing residential buildings.

[0065] The present invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for solving semantically constrained planar layouts for existing residential buildings.

[0066] This invention, through a modular system, electronic equipment, and computer-readable medium, transforms fixed walls, windows, entrances, and manholes in the grid semantic base map of existing residential floor plans into computable constraints. It solves the layout of main functional rooms through a constraint programming-satisfactionability model, derives public areas from the remaining space accessible from the entrance, and outputs functional color block layout diagrams and diagnostic results. This provides an interpretable and multi-scheme comparison tool for the renovation of existing residential buildings, reducing the complexity of early scheme derivation for existing residential renovation and improving the efficiency of scheme comparison.

[0067] This invention solves the problem that ordinary image generation methods have difficulty inheriting existing spatial conditions by explicitly transforming existing structural semantics into hard constraints and diagnostic objects; it avoids prematurely fixing the final room boundaries by outputting compact functional anchor points through minimum occupancy targets; it enables users to clearly identify problems such as entrance blockage, public area fragmentation, unreachable remnants, and insufficient wet area access through public area derivation and failure diagnosis; and it enables multiple comparable early functional layout results for the same update target through multi-candidate output and differentiated filtering.

[0068] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.

[0069] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this invention should be included within the protection scope of this invention.

Claims

1. A method for solving semantically constrained planar layouts for existing residential redevelopment, characterized in that, include: (1) Obtain the raster semantic base map and update target of the existing residential floor plan; The raster semantic base map contains semantic elements including fixed walls, windows, entrances and pipe shafts, and update targets include room type, number of rooms, area parameters and room attributes. (2) Extract the fixed walls, windows, entrances and pipe shafts of the existing residential buildings based on the raster semantic base map, thereby identifying indoor and outdoor areas and obtaining the allocatable indoor areas; (3) Discretize the allocatable indoor area into several grid cells, and obtain the adjacency relationship between adjacent grid cells based on the fixed walls, thereby constructing the solution grid; (4) Combining steps (2) and (3), mark the window contact grid cells, entrance contact grid cells, entrance public area reserved grid cells adjacent to the entrance contact grid cells, and well service grid cells on the indoor side of the fixed wall to which the well is attached on the solution grid. (5) Based on the update target, set the lighting requirements, wet area service requirements, area occupancy range and connectivity requirements for each room to obtain a set of room instances, and then determine the candidate grid cells corresponding to each room instance; (6) Based on steps (3)-(5), construct a constrained programming-satisfactionability model, whose constraints include at least one of the following constraints: Unique grid cell allocation constraint: Each grid cell can be assigned to at most one room instance; Candidate domain constraint: Room instances can only occupy grid cells in their candidate grid cells; Area constraint: The number of grid cells occupied by a room instance is within its occupied area range, which is obtained by scaling the actual room area requirement in the update target obtained in step (1) according to a preset occupied scaling factor; Lighting constraint: Room instances requiring lighting must occupy at least one window-contact grid cell; Wetland service constraints: A room instance with wetland service requirements is bound to a manhole and occupies at least one manhole service grid cell on the manhole service band corresponding to that manhole. The number of room instances with wetland service requirements in the same manhole service does not exceed the preset capacity. Entrance reservation constraints: Instances of main functional rooms must not occupy reserved grid cells in the entrance public area; Connectivity constraint: The grid cells occupied by the same room instance form a connected region in terms of adjacency; (7) Obtain the optimization objective of the constraint planning-satisfaction model constructed in step (6) and solve it to obtain the main functional room layout representing the set of grid cells occupied by each room instance.

2. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 1, characterized in that, In step (2), the masks of fixed walls, windows, entrances and manholes of the existing residential building are extracted according to the raster semantic base map. The fixed wall mask, window mask and entrance mask are combined into a closed mask. The area of ​​the non-closed mask is flooded from the outer boundary of the raster semantic base map of the existing residential building floor plan to obtain the externally accessible area. The area that is not externally accessible and does not belong to the corresponding semantic element is identified as the indoor area to obtain the corresponding indoor area mask. The manhole area is removed from the indoor area mask to obtain the allocatable indoor area.

3. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 1, characterized in that, In step (4), the window contact grid unit and the entrance contact grid unit are determined in the following way: Based on the attachment relationship between the window or entrance and the fixed wall, the window or entrance attached to the fixed wall is mapped to the corresponding grid cell, thereby obtaining the window contact grid cell and the entrance contact grid cell; The reserved grid cells in the entrance public area can be obtained by expanding the adjacency relationship of the entrance contact cells; The well service grid unit generates a well service zone of a preset depth along the indoor side of the well attached to the fixed wall based on the attachment relationship between the well (i.e., the wet area service anchor point) and the fixed wall, and maps it to the corresponding grid unit to determine the well service grid unit.

4. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 1, characterized in that, In step (6), the constrained programming-satisfaction model is the CP-SAT model; the connectivity constraint is implemented through single-source flow constraint. An independent virtual flow network is set up for each room instance, and virtual flow is sent from the root grid cell of the room instance to other grid cells occupied by the room instance. Whether the virtual flow can reach other grid cells is used to determine whether other grid cells are connected to the root grid cell.

5. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 1, characterized in that, The optimization objective of the constrained programming-satisfaction model is either a minimum occupancy objective or a minimum area deviation objective. The minimum occupancy objective is to minimize the total number of grid cells occupied by the main functional rooms, and the minimum area deviation objective is to minimize the deviation between the occupancy area of ​​all room instances and the target area.

6. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 1, characterized in that, Before solving the constrained programming-satisfaction model in step (7), a feasibility pre-check can be performed, which includes: Area pre-check: Whether the total area occupied by the minimum area of ​​all room instances exceeds the area of ​​the allocable indoor area; Window contact pre-inspection: When there are room instances with lighting requirements, check whether there are window contact resources; Wet zone service pre-inspection: Does the number of room instances with wet zone service requirements exceed the preset capacity of all manholes? Pre-inspection of entrance: Whether the entrance contact grid unit and the entrance public area reserved grid unit exist; If any of the aforementioned conditions are not met, output the layout failure result directly and return to step (5).

7. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 1, characterized in that, It also includes the following steps: The grid cells not occupied by the main functional rooms are taken as the set of remaining grid cells. The intersection of the grid cells that the entrance contacts and the set of remaining grid cells is taken as the set of search source points. The search source point set is traversed, and any grid cell is taken as the source point. A flood search is performed in the set of remaining grid cells along the adjacency relationship to obtain the public area that the entrance can reach. The remaining grid cells that are not searched are marked as unreachable residual grid cells. Diagnose the layout of the main functional rooms and public areas, obtain the diagnostic results, and output a functional color block layout diagram containing the layout of the main functional rooms, public areas, and diagnostic results. The diagnostic results include one or more of the following: the set of search source points, the set of public area grid cells, the number of connected components in the public area, the number of unreachable residual grid cells, the number of reserved intrusions in the entrance public area, the proportion of narrow grid cells in the public area, and the contact status between the kitchen or bathroom and the public area; in: The number of connected components in the common area is obtained by performing a breadth-first search or depth-first search on the subgraph formed by the grid cells occupied by the common area; The number of reserved intrusions in the entrance public area is calculated by the intersection of the set of grid cells occupied by the main functional room instances and the set of reserved grid cells in the entrance public area; The proportion of narrow grid cells in the common area is obtained by calculating the number of narrow grid cells with a single grid cell thickness in the common area; The contact status includes effective contact and invalid release, and whether there is at least one four-sided edge that is not blocked by a wall between the grid cell occupied by the kitchen or bathroom and the grid cell occupied by the public area.

8. The semantically constrained planar layout solution method for existing residential redevelopment according to claim 7, characterized in that, In step (7), the priority of candidate grid cells is determined by cyclically shifting or sorting room instances and sorting by Manhattan distance, thereby generating multiple candidate layouts. The optimal layout is obtained by removing duplicates based on the differences among multiple candidate layouts and sorting them according to the quality score of each candidate layout. The difference in the candidate layout is calculated by weighted summation of the overlap rate of the grid cells occupied by the same room instance in the candidate layout and the geometric center offset distance; The quality score of the candidate layout is calculated based on whether it passes diagnostic verification, the area of ​​the public area, the number of unreachable residual grid cells, the number of reserved intrusions in the entrance public area, the connectivity of the public area, and the personalized preference score. The current layout is considered to have passed diagnostic verification only if all of the following conditions are met: (1) The set of grid cells in the common area is not empty; (2) The public area has only one connected component; (3) The number of unreachable residual mesh cells is 0; (4) The number of intrusions reserved in the public area at the entrance is 0; (5) The proportion of narrow public areas shall not exceed the set ratio; (6) The kitchen and toilet have effective contact with the public area.

9. A semantically constrained planar layout solution system for existing residential redevelopment, applying the semantically constrained planar layout solution method for existing residential redevelopment as described in any one of claims 1-8, characterized in that, include: The data acquisition module is used to acquire the raster semantic base map and update target of the existing residential floor plan; The allocatable area acquisition module is used to extract the fixed walls, windows, entrances and pipe shafts of existing residential buildings based on the raster semantic base map, thereby identifying indoor and outdoor areas and then acquiring allocatable indoor areas; The mesh construction module is used to discretize the allocatable indoor area into several mesh cells, and obtain the adjacency relationship between adjacent mesh cells based on the extracted fixed walls, thereby constructing the solution mesh; The semantic annotation module is used to annotate window contact grid cells, entrance contact grid cells, entrance public area reserved grid cells, and manhole service grid cells in the allocable indoor area on the solution grid; The demand standardization module is used to set the lighting requirements, wet area service requirements, area occupancy range and connectivity requirements for each room according to the update target, to obtain a set of room instances, and then determine the candidate grid cells corresponding to each room instance. The model building module is used to build constrained programming-satisfactionability models, whose constraints include at least one of the following: Unique grid cell allocation constraint: Each grid cell can be assigned to at most one room instance; Candidate domain constraint: Room instances can only occupy grid cells in their candidate grid cells; Area constraint: The number of grid cells occupied by a room instance is within its occupied area; Lighting constraint: Room instances requiring lighting must occupy at least one window-contact grid cell; Wetland service constraints: A room instance with wetland service requirements is bound to a manhole and occupies at least one manhole service grid cell on the manhole service band corresponding to that manhole. The number of room instances with wetland service requirements in the same manhole service does not exceed the preset capacity. Entrance reservation constraints: Instances of main functional rooms must not occupy reserved grid cells in the entrance public area; Connectivity constraint: The grid cells occupied by the same room instance form a connected region in terms of adjacency; The model solving module is used to obtain and solve the optimization objective of the constructed constraint planning-satisfaction model, and obtain the main functional room layout representing the set of grid cells occupied by each room instance.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the semantic constraint planar layout solution method for existing residential renewal as described in any one of claims 1-8.