House type plan generation and retrieval method
By receiving user-inputted house type parameters, and using a pre-built house type library for retrieval and scoring, a house type floor plan report is generated. This solves the problem that rural self-built house users have difficulty obtaining architectural design schemes that meet their needs, and improves design efficiency and the professionalism of the schemes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUN YAT SEN UNIV
- Filing Date
- 2026-02-02
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies are insufficient to provide rural self-built housing users with low-cost, high-efficiency, and personalized architectural design solutions. Traditional manual design is costly and inefficient, fixed drawing sets are rigid, and parametric or pure algorithm generation lacks professionalism and practicality, making it difficult to apply directly to construction.
By receiving user-inputted floor plan parameters, the system searches a pre-built floor plan library to generate a floor plan report. This includes image processing, optical character recognition, architectural rule filling, and quantitative evaluation model scoring to ensure the professionalism and rationality of the design.
It enables the rapid generation of floor plans that meet users' personalized needs, improves design efficiency, and provides design solutions that conform to architectural principles and can be directly applied to construction.
Smart Images

Figure CN121615232B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of housing decoration technology, and in particular to a method for generating and retrieving floor plans. Background Technology
[0002] With the continuous improvement of social and economic levels, people's requirements for the quality of living environment are increasing. In rural areas, self-built houses have become the main way for residents to improve their living conditions. However, professional architectural design services are generally expensive and have long design cycles, which are difficult for ordinary rural self-built house users to afford. This has led to the emergence of a variety of architectural design solutions that meet the needs of ordinary users. These solutions mainly include: traditional manual design, which is to hire architectural engineers or designers to provide one-on-one customized design services; fixed drawing sets, which are collections of various standardized house plan drawings circulating in the market; and parametric or pure algorithm-generated design, which is a technical solution that automatically generates house plan drawings from scratch using algorithms such as GAN and graph neural networks.
[0003] The existing solutions mentioned above all have obvious shortcomings and are difficult to meet the actual needs of ordinary rural self-built house users. Specifically, traditional manual design schemes are not only costly and inefficient, but the quality of the design schemes also depends heavily on the personal experience of the designer, making it difficult to guarantee stability. In addition, the schemes based on fixed drawing sets are rigid and cannot be flexibly adjusted according to the user's plot size (length and width), building area requirements, and the personalized requirements of family members for the number of functional spaces such as bedrooms and studies. Although parametric or purely algorithm-generated design schemes can quickly produce a large number of floor plans, they generally lack the professionalism, practicality, and aesthetic value required for architectural design. They are prone to unreasonable layouts such as spatial misalignment and chaotic circulation, making them difficult to apply directly to actual construction and unable to provide reliable design support for users.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a method for generating and retrieving floor plans, which aims to solve the technical problem that self-built house users have difficulty obtaining architectural design schemes that meet their needs.
[0006] To achieve the above objectives, this application proposes a method for generating and retrieving floor plans, the method comprising:
[0007] Receive floor plan parameters input by the user;
[0008] The pre-built floor plan library is searched using the floor plan parameters to obtain a suitable floor plan solution;
[0009] Based on the adapted apartment layout scheme, the apartment layout library is modeled and data is extracted to obtain an apartment layout report.
[0010] In one embodiment, before the step of retrieving a pre-built floor plan library using the floor plan parameters to obtain a suitable floor plan solution, the method further includes:
[0011] Image processing and optical character recognition are performed on the pre-acquired set of apartment templates to obtain structured vector data;
[0012] By exhaustively transforming the structured vector data using the target building dimensions, multi-story apartment layouts can be obtained.
[0013] By filling the multi-story apartment layout with architectural elements according to architectural rules, a set of apartment layout examples is obtained.
[0014] The final set of floor plan examples is scored using a building quantitative evaluation model to obtain the scoring results;
[0015] Based on the scoring results and the final set of floor plan examples, a floor plan library is constructed to obtain the floor plan library.
[0016] In one embodiment, the step of performing image processing and optical character recognition on a pre-acquired set of apartment layout templates to obtain structured vector data includes:
[0017] After preprocessing the apartment template set, the apartment template set is detected by an image corner detection algorithm to obtain global vertex coordinates, and the global vertex coordinates are identified by an image contour detection algorithm to obtain the room contour.
[0018] Optical character recognition is performed on the room outline to obtain room function text, and outline matching is performed based on the room function text to obtain matching results;
[0019] Based on the global vertex coordinates, room outlines, room function text, and matching results, structured vector data is obtained.
[0020] In one embodiment, the step of performing an exhaustive transformation on the structured vector data using the target building dimensions to obtain the multi-story apartment layout includes:
[0021] The matching reference dimensions are determined based on the target building dimensions and the structured vector data;
[0022] The structured vector data is matched according to the matching reference size to obtain a list of vectorized templates;
[0023] Perform a single-layer apartment type transformation on the vectorized template list to obtain a single-layer vectorized dataset;
[0024] Multi-level apartment layouts are obtained by performing multi-level apartment type transformation based on the single-level vectorized dataset.
[0025] In one embodiment, the step of performing multi-level apartment layout transformation based on the single-level vectorized dataset to obtain a multi-story apartment layout includes:
[0026] Based on the single-layer vector dataset, traffic spaces in apartment layouts are identified;
[0027] The rooms and walls in the single-layer vectorized dataset are aligned at the boundaries to obtain the first alignment result;
[0028] The rooms in the single-layer vectorized dataset are aligned with each other using the first alignment result to obtain the second alignment result.
[0029] Based on the traffic space, the first alignment result, and the second alignment result, layout regularization is performed to obtain the actual shape of a single-story room.
[0030] By adjusting the shape of the single-story actual room, a multi-story room layout can be obtained.
[0031] In one embodiment, the step of filling the multi-story apartment layout with architectural elements according to architectural rules to obtain a set of apartment floor plan instances includes:
[0032] The door and window positions of the multi-story apartment layout are obtained by setting the doors and windows according to architectural rules.
[0033] Based on the location of doors and windows in the apartment layout, the dimensions and openings of doors and windows in the rooms of the multi-story apartment layout are analyzed to obtain door and window deployment parameters;
[0034] The multi-story apartment layout is filled with parameters by the door and window deployment parameters to obtain a set of apartment layout examples.
[0035] In one embodiment, the step of analyzing the door and window dimensions and openings of rooms in the multi-story apartment layout based on the location of the doors and windows to obtain door and window deployment parameters includes:
[0036] Based on the location of the doors and windows of the apartment, the rooms in the multi-story apartment layout are sorted by orientation priority to obtain the sorting result;
[0037] Based on the sorting results, the dimensions of the walls in the multi-story apartment layout are analyzed to obtain the dimensions of doors and windows.
[0038] The opening degree is obtained by analyzing the dimensions of the doors and windows.
[0039] Based on the dimensions and openings of the doors and windows, the parameters are organized to obtain the door and window deployment parameters.
[0040] In one embodiment, the step of scoring the final set of floor plan instances using a building quantitative evaluation model to obtain a scoring result includes:
[0041] The spatial comfort score of the rooms in the final floor plan instance set is obtained by using the building quantitative evaluation model to obtain the first score result.
[0042] The lighting and ventilation scores of the rooms in the final floor plan instance set are obtained by using the building quantitative evaluation model to obtain a second score result.
[0043] The sunlight score is calculated for the rooms in the final floor plan instance set using the building quantitative evaluation model to obtain a third score result.
[0044] The final set of floor plan instances is scored by dividing them into zones using the building quantitative evaluation model to obtain a fourth scoring result.
[0045] The final score is obtained by weighted summation of the first, second, third, and fourth score results.
[0046] In one embodiment, the step of retrieving a suitable apartment layout from a pre-built apartment layout library using the apartment layout parameters includes:
[0047] An index key is constructed based on the aforementioned apartment type parameters;
[0048] A matching list is obtained by performing a hash lookup on the floor plan library using the index key;
[0049] The matching list is filtered to obtain the matching apartment type solutions.
[0050] In one embodiment, the step of extracting modeling data from the floor plan library based on the adapted floor plan scheme to obtain a floor plan report includes:
[0051] Based on the adapted apartment layout scheme, the apartment layout library is modeled and data is extracted to obtain apartment floor plans, apartment renderings, and multi-dimensional apartment ratings.
[0052] The data hierarchy is determined based on the floor plan, renderings, and multi-dimensional ratings of the apartment layout.
[0053] Based on the data hierarchy, a floor plan report is generated using the floor plan, floor plan renderings, and multi-dimensional floor plan ratings.
[0054] One or more technical solutions proposed in this application have at least the following technical effects:
[0055] This application proposes a method for generating and retrieving floor plans. The method involves receiving floor plan parameters input by the user; searching a pre-built floor plan library using these parameters to obtain a suitable floor plan solution; and extracting modeling data from the floor plan library based on the suitable floor plan solution to generate a floor plan report. This method first accurately captures the user's personalized needs, such as plot size and functional space configuration, by receiving the user's input floor plan parameters. Then, it searches a pre-built professional floor plan library based on these parameters to quickly match a suitable floor plan solution that meets the core requirements. Finally, it extracts modeling data from the library to generate a floor plan report. This solves the problem of self-built house users finding it difficult to obtain architectural design solutions that meet their needs, thus improving the efficiency of floor plan generation and retrieval. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 This is a flowchart illustrating an embodiment of the method for generating and retrieving floor plans in this application.
[0059] Figure 2 This is a flowchart illustrating Embodiment 2 of the method for generating and retrieving floor plans in this application.
[0060] Figure 3 This is a schematic diagram of the floor plan template set involved in the floor plan production and retrieval method of this application;
[0061] Figure 4 This is a schematic diagram illustrating the corner detection results involved in the method for producing and retrieving floor plans in this application;
[0062] Figure 5 This is a schematic diagram illustrating the corner optimization results involved in the floor plan generation and retrieval method of this application;
[0063] Figure 6 This is a schematic diagram illustrating the room outline recognition results involved in the floor plan production and retrieval method of this application;
[0064] Figure 7 This is a schematic diagram illustrating the OCR recognition results involved in the floor plan production and retrieval method of this application;
[0065] Figure 8 This is a schematic diagram illustrating the results of aligning room outline points and corner points in the floor plan production and retrieval method of this application.
[0066] Figure 9 This is a schematic diagram of the floor plan generated and retrieved using the method for this application, which involves a floor plan transformed from a 10×10 first-floor template.
[0067] Figure 10 The method for producing and retrieving floor plans in this application is illustrated in the following diagram: a floor plan is produced by vertically aligning a 10×10 second-floor template with a first-floor template.
[0068] Figure 11 This is a schematic diagram of a first-floor sketch floor plan related to the method for producing and retrieving floor plans in this application;
[0069] Figure 12 This is a schematic diagram of a two-story sketch floor plan involved in the method for producing and retrieving floor plans in this application;
[0070] Figure 13 This is a schematic diagram of a first-floor colored floor plan related to the method for producing and retrieving floor plans in this application;
[0071] Figure 14 This is a schematic diagram of the two-story colored floor plan involved in the method for producing and retrieving floor plans in this application;
[0072] Figure 15 This is a schematic diagram illustrating direct ventilation on the opposite side of the unit type involved in the method for producing and retrieving floor plans in this application.
[0073] Figure 16 This is a schematic diagram illustrating that the opposite side of the apartment layout is not directly ventilated, which is part of the apartment layout production and retrieval method in this application.
[0074] Figure 17 This is a schematic diagram illustrating the ventilation of adjacent units in the floor plan production and retrieval method of this application;
[0075] Figure 18 This is a schematic diagram illustrating the unidirectional ventilation of the apartment layout involved in the apartment layout production and retrieval method of this application;
[0076] Figure 19 This is a schematic diagram illustrating the separation of active and quiet zones in the floor plan production and retrieval method of this application.
[0077] Figure 20 This is a schematic diagram illustrating the separation of static and dynamic areas in the floor plan production and retrieval method described in this application.
[0078] Figure 21 This is a schematic diagram illustrating the mixed dynamic and static layout of the floor plan production and retrieval method used in this application.
[0079] Figure 22 This is a simplified flowchart illustrating the method for generating and retrieving floor plans provided in Embodiment 2 of this application.
[0080] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0081] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0082] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0083] The main solution of this application embodiment is: to perform image processing and optical character recognition on the pre-acquired house type template set to obtain structured vector data;
[0084] By exhaustively transforming the structured vector data using the target building dimensions, multi-story apartment layouts can be obtained.
[0085] By filling the multi-story apartment layout with architectural elements according to architectural rules, a set of apartment layout examples is obtained.
[0086] The final set of floor plan examples is scored using a building quantitative evaluation model to obtain the scoring results;
[0087] Based on the scoring results and the final set of floor plan examples, a floor plan library is constructed. After preprocessing the floor plan template set, an image corner detection algorithm is used to detect the template set and obtain global vertex coordinates. An image contour detection algorithm is then used to identify these global vertex coordinates to obtain room contours. Optical character recognition (OCR) is performed on the room contours to obtain room function text, and contour matching is performed based on this text to obtain matching results. Data integration is performed based on the global vertex coordinates, room contours, room function text, and matching results to obtain structured vector data. A matching reference size is determined based on the target building dimensions and the structured vector data. The structured vector data is then matched according to the matching reference size to obtain a vectorized template list. A single-floor floor plan transformation is performed on the vectorized template list to obtain a single-floor vectorized dataset. A multi-floor floor plan transformation is then performed based on the single-floor vectorized dataset to obtain multi-story floor plan layouts. Based on the single-layer vectorized dataset, traffic spaces in the apartment layout are identified; the rooms and walls in the single-layer vectorized dataset are aligned to obtain a first alignment result; the rooms in the single-layer vectorized dataset are aligned to their neighbors using the first alignment result to obtain a second alignment result; layout regularization is performed based on the traffic spaces, the first alignment result, and the second alignment result to obtain the actual shape of the single-layer rooms; the actual shape of the single-layer rooms is then used to adjust the layout for multiple floors to obtain a multi-story apartment layout. Door and window settings are applied to the multi-story apartment layout using architectural rules to obtain the door and window positions; based on the door and window positions, the door and window sizes and openings of the rooms in the multi-story apartment layout are analyzed to obtain door and window deployment parameters; the multi-story apartment layout is then filled with parameters using the door and window deployment parameters to obtain a set of apartment layout instance diagrams. Based on the location of doors and windows in the apartment layout, the rooms in the multi-story apartment layout are prioritized by orientation to obtain a ranking result. The walls in the multi-story apartment layout are then analyzed to obtain door and window dimensions based on the ranking result. The opening angle of the doors and windows is then analyzed using these dimensions to obtain the door and window opening angle. Based on the door and window dimensions and opening angles, parameters are organized to obtain door and window deployment parameters. The rooms in the final apartment layout instance set are scored for spatial comfort using the building quantitative evaluation model to obtain a first score result. The rooms in the final apartment layout instance set are scored for lighting and ventilation using the building quantitative evaluation model to obtain a second score result. The rooms in the final apartment layout instance set are scored for sunlight using the building quantitative evaluation model to obtain a third score result. The final apartment layout instance set is then scored by partitioning using the building quantitative evaluation model to obtain a fourth score result. The first, second, third, and fourth score results are weighted and summed to obtain the final score.An index key is constructed based on the apartment type parameters; a hash lookup is performed on the apartment type library using the index key to obtain a matching list; the matching list is then filtered to obtain suitable apartment type solutions. Based on the suitable apartment type solutions, modeling data is extracted from the apartment type library to obtain floor plans, renderings, and multi-dimensional ratings; data levels are determined based on the floor plans, renderings, and multi-dimensional ratings; and a floor plan report is generated based on the data levels, using the floor plans, renderings, and multi-dimensional ratings. This solves the problem of self-built house users finding it difficult to obtain architectural design solutions that meet their needs, realizes the generation and retrieval of floor plans, and improves the efficiency of floor plan generation and retrieval. Based on the present invention, addressing the problem of inefficiency in combining the professional knowledge of architectural engineers with the efficient computing power of computers to provide users with readily available floor plan solutions that conform to architectural principles and meet personalized needs, the present invention designs a method for generating and retrieving floor plans. The effectiveness of the method is verified during the generation and retrieval of floor plans, and the efficiency of floor plan generation and retrieval is significantly improved by the present invention.
[0088] In this embodiment, for ease of description, the following description will focus on the floor plan generation and retrieval device.
[0089] Due to the limitations of existing rural self-built house architectural design schemes, it is difficult to balance cost-effectiveness, personalized needs, and professionalism. One issue is the traditional manual design method, which is not only costly and inefficient, but also highly dependent on the designer's personal experience, making stability difficult to guarantee. Another issue is the fixed drawing set, which results in rigid schemes that cannot be flexibly adjusted according to the user's plot size, area requirements, and the number of functional spaces. Furthermore, there is the problem of parametric or purely algorithm-generated design. While these methods can quickly produce a large number of floor plans, they generally lack the professionalism, practicality, and aesthetic value required for architectural design, easily leading to unreasonable layouts such as spatial misalignment and chaotic circulation, making them difficult to directly apply to actual construction. Therefore, current rural self-built house design services also encounter difficulties in adapting to the needs of ordinary users. Rural self-built house users require low-cost, high-efficiency design services, schemes that fit their own plot and family functional needs, and are feasible for construction. Existing design schemes cannot simultaneously meet these multiple demands and cannot effectively solve the design pain points of ordinary rural self-built house users.
[0090] This application provides a solution that first receives user-inputted floor plan parameters to accurately capture the user's personalized needs, such as plot size and functional space configuration. Then, based on these parameters, it searches a pre-built professional floor plan library to quickly match a suitable floor plan that meets the core requirements. Finally, it extracts modeling data from the library to generate a floor plan report. This solves the problem that self-built house users have difficulty obtaining architectural design schemes that meet their needs, improves the efficiency of floor plan generation and retrieval, and provides users with a higher quality service.
[0091] Based on this, embodiments of this application provide a method for generating and retrieving floor plans, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the method for generating and retrieving floor plans in this application.
[0092] In this embodiment, the method for generating and retrieving floor plans includes steps S01 to S03:
[0093] Step S01: Receive the apartment layout parameters input by the user;
[0094] Before the implementation of this embodiment, it should be clear that socio-economic development has driven people to demand higher quality of life. Self-built houses in rural areas have become the main way to improve living conditions. However, professional architectural design services are expensive and time-consuming, making them unaffordable for ordinary users. This has led to the development of three types of solutions: traditional manual design, fixed drawing sets, and parametric or algorithm-generated solutions. However, all of these solutions have shortcomings. First, traditional manual design is costly and inefficient, and its quality depends on the designer's experience. Second, fixed drawing sets are rigid and cannot adapt to the personalized needs of users regarding land plots, area, and functional spaces. Parametric or algorithm-generated solutions lack professionalism and practicality, and their layouts are prone to being unreasonable and difficult to construct directly.
[0095] Therefore, to solve the above problems, this embodiment first receives the apartment type parameters input by the user. The apartment type parameters include at least the plot size parameters, functional space configuration parameters, building orientation parameters, and area requirement parameters. The plot size parameters are used to define the boundary of the self-built house's land area, such as the specific values of length and width and shape description (such as rectangle, trapezoid, etc.). The functional space configuration parameters cover the user's requirements for the number, area ratio, and spatial correlation of different functional areas such as bedrooms, living rooms, kitchens, bathrooms, and balconies. The building orientation parameters specify the direction of the main building's lighting surface. The area requirement parameters include key indicators such as total building area and single-floor area, providing a quantitative benchmark for matching subsequent apartment type schemes. By collecting these multi-dimensional parameters, the system can comprehensively and accurately capture the user's personalized needs, laying a data foundation for retrieving suitable schemes from a professional apartment type library.
[0096] Step S02: Search the pre-built floor plan library using the floor plan parameters to obtain a suitable floor plan solution;
[0097] After obtaining the apartment type parameters input by the user, the system can perform corresponding searches through a pre-built apartment type library to obtain suitable apartment type solutions. The apartment type library is the core resource library of the system. Its construction process integrates architectural expertise and big data analysis technology. The apartment type solutions in the library are all designed by professional architects and have been verified through construction to ensure the professionalism, rationality and feasibility of the solutions. Each apartment type solution in the library is associated with standardized feature tags.
[0098] Step S03: Based on the adapted apartment layout scheme, modeling data is extracted from the apartment layout library to obtain an apartment layout report.
[0099] Finally, based on the adapted apartment layout scheme obtained above, modeling data is extracted from the apartment layout library to obtain the final apartment floor plan report. The modeling data extraction process comprehensively integrates various key information from the adapted apartment layout scheme, including but not limited to wall thickness, door and window positions and dimensions, precise layout and area data of each functional area, and distribution of structural components such as beams and columns. This data will be standardized according to architectural drawing specifications to ensure the accuracy and completeness of the extracted information. The apartment floor plan report is a visual presentation and detailed explanation of the extracted data. The report not only includes a floor plan that meets professional standards, but also includes detailed area of each room, furniture arrangement suggestions, lighting and ventilation analysis, and a description of the matching degree with the user's original apartment layout parameters. This allows users to intuitively and clearly understand the specific information of the apartment layout scheme, providing a comprehensive and practical reference for subsequent scheme adjustments or construction preparation.
[0100] Specifically, step S02 above, which involves searching the pre-built floor plan library using the floor plan parameters to obtain a suitable floor plan solution, includes:
[0101] Step S021: Construct an index key based on the apartment type parameters;
[0102] Step S022: Perform a hash lookup on the floor plan library using the index key to obtain the matching list;
[0103] Step S023: Filter the adaptation list to obtain the adaptation apartment type scheme.
[0104] First, based on the house type parameters such as the length and width of the self-built house and the number of functional rooms on each floor entered by the user on the front-end interface, the house is standardized and assembled according to preset rules to form an index key (file name) that is completely consistent with the format of the offline storage stage, ensuring that the index key can accurately map the user's core needs.
[0105] Then, the constructed index key is used as the basis for searching, and a hash search operation is performed in the file system or database. This search method has the high efficiency of O(1) complexity, which can quickly locate all candidate solutions that meet the user's basic functional requirements and size conditions, and thus form an adaptation list.
[0106] Finally, the matching list obtained from the hash lookup is further filtered. Based on the matching criteria such as the rationality of the apartment layout and the accuracy of the functional space matching, candidate solutions that do not meet the potential needs of users are eliminated, and finally, the matching apartment layout solutions that are highly consistent with the user's input parameters are selected.
[0107] More specifically, step S03 above, which involves extracting modeling data from the floor plan library based on the adapted floor plan scheme to obtain a floor plan report, includes:
[0108] Step S031: Based on the adapted apartment layout scheme, modeling data is extracted from the apartment layout library to obtain apartment floor plans, apartment renderings, and multi-dimensional apartment layout scores.
[0109] Step S032: Determine the data level based on the floor plan, the rendering, and the multi-dimensional score of the apartment.
[0110] Step S033: Based on the data hierarchy, generate a floor plan report using the floor plan, floor plan rendering, and multi-dimensional floor plan rating.
[0111] First, according to the user input parameters, an index key (filename) consistent with the offline storage stage is assembled according to the rules. The index key is used to perform a hash lookup with O(1) complexity in the file system or database to quickly locate the candidate scheme that meets the basic functional and size requirements. Then, based on the selected suitable apartment type scheme, the corresponding apartment floor plan, apartment rendering, and multi-dimensional apartment type score covering layout rationality, functional adaptability, etc. are extracted from the apartment type library. All matching schemes are sorted from high to low according to the total score.
[0112] Then, based on the top-ranked candidate schemes after sorting, and combining the core layout information of the floor plan, the visual presentation of the floor plan renderings, and the various indicator data of the multi-dimensional scoring of the floor plan, the data priority level is determined, and the presentation order of the core scheme information and auxiliary scoring details is clarified.
[0113] Finally, according to the determined data hierarchy, the top-ranked floor plans, renderings, and corresponding multi-dimensional scores are structurally integrated to form a floor plan report that includes core solution presentations and detailed scoring explanations, thus completing the immediate delivery from user needs to high-quality solutions.
[0114] This embodiment, through the above-described scheme, specifically receives user-inputted floor plan parameters; searches a pre-built floor plan library using these parameters to obtain a suitable floor plan solution; and extracts modeling data from the floor plan library based on the suitable floor plan solution to generate a floor plan report. Thus, by first receiving user-inputted floor plan parameters, the system accurately captures the user's personalized needs, such as plot size and functional space configuration; then, based on these parameters, it searches a pre-built professional floor plan library to quickly match a suitable floor plan solution that meets the core requirements; and finally, it extracts modeling data from the library to generate a floor plan report. This solves the problem of self-built house users finding it difficult to obtain architectural design solutions that meet their needs, and improves the efficiency of floor plan generation and retrieval.
[0115] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Before step S02, which involves retrieving a pre-built floor plan library using the floor plan parameters to obtain a suitable floor plan solution, the floor plan generation and retrieval method further includes steps S0201 to S0205:
[0116] Step S0201: Perform image processing and optical character recognition on the pre-acquired apartment template set to obtain structured vector data;
[0117] Step S0202: Perform an exhaustive transformation on the structured vector data using the target building dimensions to obtain the multi-story apartment layout;
[0118] Step S0203: Fill the multi-story apartment layout with architectural elements according to architectural rules to obtain a set of apartment layout instances;
[0119] Step S0204: The final set of floor plan instances is scored using a building quantitative evaluation model to obtain the scoring results;
[0120] Step S0205: Based on the scoring results and the final set of floor plan instances, construct the floor plan library to obtain the floor plan library.
[0121] First, obtain such Figure 3 The house type template set shown is subjected to image processing and optical character recognition operations in sequence. The image processing process, such as image preprocessing, corner detection, and contour extraction, is used to optimize the presentation effect of the house type template. Combined with optical character recognition, relevant text information of the house type is extracted, and finally, structured vector data is obtained.
[0122] Subsequently, based on the target building dimensions, the acquired structured vector data is subjected to exhaustive transformation. By adjusting the length-to-width ratio of the unit type and adapting the spatial layout, a multi-story unit layout covering different size specifications and meeting the needs of multi-story living is generated.
[0123] Next, based on the core rules of architecture, the multi-story apartment layouts are filled with architectural elements, and necessary architectural components such as walls, doors and windows, stairs, kitchen and bathroom facilities are added in sequence to clarify the boundaries and uses of each functional space, forming a complete set of apartment floor plan examples.
[0124] Then, the pre-trained building quantitative evaluation model is invoked to score the final set of floor plan instances in multiple dimensions, quantitatively evaluating aspects such as layout rationality, functional adaptability, ventilation and lighting effects, and structural safety, and outputting the corresponding score results.
[0125] Finally, based on the scoring results and the set of floor plan instances, a floor plan library is constructed. For each floor plan that has been scored, a unique descriptive string is generated as an index key based on its key features such as target length and width, floors, and number of various types of rooms. The floor plan data containing complete vector information and all scoring items is saved in JSON format, and the file name is the generated index key. At the same time, the system renders the sketch line drawing and color rendering of the plan and saves them synchronously according to similar naming rules. Finally, all data is integrated to form a complete floor plan library.
[0126] Specifically, step S0201 above, which involves image processing and optical character recognition of the pre-acquired apartment template set to obtain structured vector data, includes:
[0127] Step S02011: After preprocessing the apartment template set, the apartment template set is detected by an image corner detection algorithm to obtain global vertex coordinates, and the global vertex coordinates are identified by an image contour discovery algorithm to obtain the room contour.
[0128] Step S02012: Perform optical character recognition on the room outline to obtain room function text, and perform outline matching based on the room function text to obtain matching results;
[0129] Step S02013: Based on the global vertex coordinates, room outline, room function text, and matching results, data integration is performed to obtain structured vector data.
[0130] This embodiment loads as follows: Figure 3The floor plan template image shown follows these rules: walls are represented by white lines, each room is labeled with a white letter indicating its function, the entrance door is marked with a yellow line, and the background is black. For a first-floor floor plan, color recognition technology is first used to accurately locate the entrance door, and its coordinates are recorded. Then, the entrance door area is removed from the image to avoid interfering with subsequent wall contour recognition. After preprocessing, the cv2.cornerHarris image corner detection algorithm from the OpenCV library is applied to process the grayscale image of the template, initially identifying the corner points at all wall intersections, resulting in the following... Figure 4 The test results are shown.
[0131] To eliminate errors caused by noise and duplicate detection, the detected corner points also need to be optimized. First, by calculating the Euclidean distance, corner points that are too close together are merged into a single vertex. Then, the coordinates of all vertices are aligned horizontally and vertically, so that vertices on the same horizontal or vertical line have exactly the same coordinate values, ultimately obtaining a set of... Figure 5 The system obtains precise and well-ordered global vertex coordinates. Then, it uses the `cv2.findContours` image contour discovery algorithm from the OpenCV library to find all closed polygonal contours on the binarized image. Each contour initially represents an independent room or space, thus yielding results such as... Figure 6 The contour recognition results are shown.
[0132] Furthermore, this embodiment integrates the PaddleOCR optical character recognition engine to recognize the room function text marked in the template. The recognition range includes "LR" (representing living room), "BR" (representing bedroom), "K" (representing kitchen), "D" (representing dining room), "B" (representing public bathroom), "PB" (representing private bathroom), "ST" (representing stairwell), etc., and simultaneously obtains the bounding box information of these texts in the image, resulting in, for example... Figure 7 The optical character recognition results shown indicate that after text recognition is completed, the function matching stage begins. Each recognized room outline is traversed, and with the help of the Shapely geometry calculation library, it is determined which OCR-recognized text box can fall completely inside the outline polygon. Through this precise spatial position determination method, a unique association is established between the room's function type and the corresponding geometric outline, resulting in the matching result between the outline and the function.
[0133] Then, the room outline is refined by matching each vertex of the initially identified room outline with the globally aligned vertices one by one, "snap" the outline points to the nearest global vertex, forming the final precise and gapless room boundary, as shown below. Figure 8The corrected effect is shown. Then, based on the acquired global vertex coordinates, optimized room outlines, identified room function texts, and the matching results between outlines and functions, a comprehensive data integration is carried out to construct a structured data dictionary containing all vector information of the floor plan. Its key fields include: vertex coordinates of the overall outer outline of the floor plan, vertex coordinates and orientation of the entrance door, function type of each room, vertex coordinates of the outer outline of each room, vertex coordinates of the circumscribed rectangle of each room, and positional relationship between rooms, etc.
[0134] If the system is dealing with multi-story building templates (e.g., a first-floor template and its corresponding multiple second-floor templates), after completing the independent vectorization of each floor template, the system will perform a multi-story template alignment relationship pre-calculation step. It will load the vector data of the first-floor template and the corresponding second-floor template, traverse every room in the second floor except for the living room and corridor, and compare it with all rooms in the first floor except for the living room and corridor. By calculating the ratio of the overlapping area of the polygonal outlines of the two rooms to the larger area of the two, the spatial alignment degree will be determined. If the ratio exceeds a preset high threshold (e.g., 0.9) and the number of outline points of the two rooms is the same, it will be determined that the two rooms are vertically corresponding in design (e.g., stairwell, bathroom, etc.), and an "alignment index" field will be added to the vectorized data of the second-floor template. This index is in the form of an array, and each element indicates that the corresponding room in the second floor should be aligned to a specific room in the first floor. This alignment index is saved together with the vector data of the second-floor template.
[0135] Finally, all vectorized data is normalized from the original pixel coordinate system to a unified template coordinate space of 256x256 and saved as a .mat file, resulting in structured vector data for use in subsequent generation stages.
[0136] More specifically, step S0202 above, which involves exhaustively transforming the structured vector data using the target building dimensions to obtain the multi-story apartment layout, includes:
[0137] Step S02021: Determine the matching reference size based on the target building size and the structured vector data;
[0138] Step S02022: Match the structured vector data according to the matching reference size to obtain a list of vectorized templates;
[0139] Step S02023: Perform a single-layer apartment type transformation on the vectorized template list to obtain a single-layer vectorized dataset;
[0140] Step S02024: Perform multi-level apartment transformation based on the single-level vectorized dataset to obtain multi-level apartment layouts.
[0141] First, a double loop is performed within the preset building size range (length and width from 5 meters to 15 meters, with a step size of 0.1 meters) to obtain the specific target building size. Then, the directory of all available templates in the configuration file (such as a CSV file) is loaded. This directory contains metadata such as the unique ID of each template, the original design dimensions (width and height), the total area, and the area range to which it belongs. The target area (target length × target width) is calculated based on the target building size. Candidate templates whose original design area is closest to the target area are initially selected from the template directory. Then, the original aspect ratio of the candidate templates is calculated and compared with the aspect ratio of the target building size. The template with the smallest aspect ratio difference is selected, and its original design size is determined as the matching reference size to ensure that subsequent geometric transformations can maintain the proportional coordination of the original design to the greatest extent.
[0142] Based on the determined matching reference size, the template catalog is queried again to filter out all templates whose original design size is completely consistent with the matching reference size (for example, when the reference size is 10 meters × 8 meters, templates such as 10-8_a1_1f.mat and 10-8_a2_1f.mat with different internal layouts but the same external size are filtered out). These filtered specific vectorized templates are integrated to form a vectorized template list.
[0143] For single-story apartment templates in the vectorized template list, a precise affine transformation (scaling operation) is performed on their vector data to ensure that the template's outer contour dimensions strictly match the target building dimensions. Simultaneously, the apartment layouts can be horizontally flipped according to preset probabilities to increase the diversity of layout options. The transformed single-story apartment layout looks like this: Figure 9 The floor plan shown is transformed using a 10×10 template, resulting in a single-layer vectorized dataset.
[0144] Finally, the first-floor template in the vectorized template list is processed. Through affine transformations and flipping, a first-floor vectorized dataset conforming to the target building dimensions is generated. This dataset contains precise geometric information for all rooms on the first floor, serving as the benchmark for subsequent second-floor alignment. Next, the second-floor template corresponding to this first-floor template is loaded. First, the second-floor template is scaled as a whole to match its outer contour with the contour of the first-floor vectorized dataset. Then, the pre-calculated "alignment index" from the previous steps is read. For rooms marked in the index that require vertical alignment (such as stairwells and bathrooms), the geometric data of the corresponding rooms in the second-floor template is overwritten with the room data from the corresponding index in the first-floor vectorized dataset, achieving forced vertical alignment. The final multi-floor layout is obtained, and the aligned effect is as follows: Figure 10 The floor plan shown is a multi-story layout after the 10×10 two-story template is vertically aligned with the first-floor stairwell and public restroom.
[0145] Further, step S02021 above, which involves performing multi-level apartment layout transformation based on the single-level vectorized dataset to obtain a multi-story apartment layout, includes:
[0146] Step S020211: Identify traffic spaces in the apartment layout based on the single-layer vectorized dataset;
[0147] Step S020212: Align the boundaries of the rooms and walls in the single-layer vectorized dataset to obtain the first alignment result;
[0148] Step S020213: Align the rooms in the single-layer vectorized dataset with neighbors using the first alignment result to obtain the second alignment result;
[0149] Step S020214: Perform layout regularization based on the traffic space, the first alignment result, and the second alignment result to obtain the actual shape of a single-story room;
[0150] Step S020215: Adjust the shape of the single-story actual room to obtain a multi-story room layout.
[0151] First, based on a single-layer vectorized dataset, the main circulation spaces (such as living rooms and corridors) in the apartment are identified. The adjacency relationship of these large and flexible spaces is temporarily ignored. A layout strategy of "secondary rooms first, circulation spaces later" is adopted. Secondary rooms with strong functions, such as bedrooms, are planned as a compact whole first, and the remaining areas are naturally filled by circulation spaces such as living rooms.
[0152] Then, it iterates through all non-fixed rooms in the single-layer vectorized dataset, detects the distance between the boundary of each room and the boundary of the overall exterior wall of the apartment. If the distance is less than a preset threshold (e.g., pixel distance less than 18), the room is automatically "snap" onto the exterior wall to ensure that the rooms along the exterior wall (such as south-facing bedrooms) are accurately aligned with the edge of the apartment. Fixed rooms (such as stairwells) are not affected by this step, and the first alignment result is finally obtained.
[0153] Following the first alignment result, strictly adhering to the room position relationships defined in the original template, the neighbor alignment stage begins. All adjacent room pairs (e.g., "master bedroom" and "secondary bedroom" are adjacent) are traversed, and the current positions of the adjacent rooms are checked. If a gap exists between them and the gap size is less than a set alignment threshold, one or both rooms are moved until their common boundary is completely aligned. This process is iterated to ensure that all adjacent rooms are tightly connected to form a complete internal structure, without moving any fixed rooms, thus obtaining the second alignment result.
[0154] Then, combining the identified traffic spaces, the first alignment result, and the second alignment result, a layout regularization operation is performed. Using the fixed rooms as anchor points, the boundaries of other rooms are slightly stretched or translated to eliminate small and irregular gaps generated during the previous alignment process. This ensures that the layout forms a dense structure where all spaces are completely filled and the walls are tightly fitted. Subsequently, the final rectangle of each room is traversed, and a polygon Boolean operation (usually a "difference" operation) is performed between this rectangle and the final rectangles of all adjacent rooms to accurately define the common boundaries of the rooms, forming complex room shapes that conform to architectural logic. For rooms that correspond to those downstairs, the boundaries of the downstairs rooms are fine-tuned to improve vertical consistency, ultimately obtaining the actual room shape of a single floor.
[0155] Finally, based on the actual room shape on a single floor, adjustments were made to the layout of multiple floors. For non-aligned rooms on the second floor (such as bedrooms), they were reasonably arranged in the remaining space formed by fixed rooms (such as stairwells and bathrooms) and the outline of the exterior walls. Combining the logic of prior alignment and regularization, the layout of rooms on each floor was integrated to ensure that the space between floors is coordinated and unified, and finally a multi-floor apartment layout was obtained.
[0156] Furthermore, step S0203 above, which involves filling the multi-story apartment layout with architectural elements according to architectural rules to obtain a set of apartment floor plan instances, includes:
[0157] Step S02031: Set the doors and windows of the multi-story apartment layout according to architectural rules to obtain the positions of the doors and windows;
[0158] Step S02032: Based on the location of the doors and windows in the apartment layout, analyze the size and opening of the doors and windows in the rooms of the multi-story apartment layout to obtain the door and window deployment parameters;
[0159] Step S02033: Fill the multi-story apartment layout with parameters through the door and window deployment parameters to obtain a set of apartment layout instances.
[0160] First, following architectural conventions and pre-defined rules, an automated interior door layout is implemented, defining room connection priorities (e.g., kitchen doors open towards the dining room first, and if there is no dining room, they open towards the living room; bedroom and public bathroom doors open towards the living room or corridor first). Boolean operations are used to merge the geometry of the living room and dining room to form a unified "living and dining room" public activity area. Then, all rooms except the "living and dining room" are traversed, and door opening decisions are iteratively made according to function type (kitchen doors prioritize finding a common wall segment with the dining room, and if there is none, they look for the living room; public bathroom doors prioritize finding a common wall segment with the living room, and if there is none, they look for the dining room; bedrooms and stairwells prioritize finding a common wall segment with the "living and dining room"; if there is none in the stairwell, the door is opened on the shortest interior wall; balconies / terraces sequentially find common wall segments with the living room, corridor, kitchen, dining room, and bedroom, with the living room being the priority).
[0161] Then, the type and size of the door are determined based on the length of the common wall section (e.g., a sliding door is used for the wall section where the balcony door is located if it is >2.4 meters long, a single door is used if it is 1.2-2.4 meters long, and a door is not suitable if it is <1.2 meters long). The door position is then accurately located using a reference point optimization algorithm. A corner that conforms to the rules is selected as the starting reference point (the corner farthest from the center of the apartment is selected for bedroom doors and public bathroom doors, and the corner farthest from the bedroom door is selected for private bathroom doors). The door frame is offset by a preset door jamb distance (e.g., 0.1 meters) from this corner to the inside of the wall as one end of the door frame. The other end is obtained by extending the standard door opening width (e.g., 0.9 meters) along the wall. The opening direction is determined based on the position of the center point of the door and the geometric center point of the room. After verifying that there is no collision in the door opening trajectory, the position of the inner door is finally determined.
[0162] Next, an automated window layout is implemented, traversing each room and identifying exterior wall segments that overlap with the overall building outline as potential window locations. For balconies and terraces, all exterior wall segments are treated as transparent railings or low walls by default (equivalent to fully open windows). For bathrooms without exterior walls, if they are adjacent to balconies or terraces, the common wall segments are regarded as "windowable walls" and high windows are opened to "borrow light," ultimately obtaining the location of doors and windows in the apartment layout.
[0163] Then, based on the location of doors and windows in the apartment layout, the dimensions and openings of interior doors are analyzed first: according to the actual length of the common wall segments in each room, the determined door types (sliding doors, single doors, etc.) and corresponding dimensions are confirmed, and the opening direction and opening range of the doors are clarified. Next, the dimensions and openings of windows are analyzed. The exterior walls with operable windows in each room are sorted by orientation, with north-south facing walls having higher priority than east-west facing walls. North-south facing walls are selected for window openings first. The wall segments are traversed according to priority to determine whether they meet the minimum window length requirement (wall length ≥ minimum window width + 2 × minimum window jamb width on both sides + wall thickness). Only wall segments that meet the conditions are selected. On the first wall segment that meets the conditions, the smaller value between the wall segment length and the preset "normal window width" is taken as the final window width. If an entrance door is already installed on the target exterior wall of the living room or dining room, the width occupied by the entrance door is deducted, and the window position is planned in the remaining longest area. Finally, the door and window deployment parameters are obtained.
[0164] Finally, by using door and window deployment parameters, architectural elements and parameters are filled into the multi-story apartment layout to generate a set of apartment floor plan examples. First, a sketch line drawing is created, including black lines for all interior and exterior walls, doors (including opening direction), and windows. Functional names (such as "living room" and "bedroom") and areas are labeled at appropriate locations within each room. Dimension lines are automatically generated outside the floor plan to clearly define the length and width dimensions of each room and the overall building (e.g., a first-floor sketch floor plan). Figure 11 As shown, the second-floor sketch floor plan is as follows: Figure 12(As shown), then draw a colored rendering, fill the blank canvas with preset textures according to the room's function type (wood flooring texture for living room and bedroom, tile texture for kitchen and bathroom), overlay the lines of walls, doors, and windows, and use an algorithm to add shadows to the walls to generate a 2.5D stereoscopic visual rendering (one layer of the colored floor plan is shown below). Figure 13 As shown, the second-floor colored floor plan is as follows: Figure 14 As shown, the sketches and color renderings are integrated to form a complete set of floor plan examples.
[0165] Furthermore, step S02032 above, which involves analyzing the door and window dimensions and openings of rooms in the multi-story apartment layout based on the location of the doors and windows in the apartment type to obtain door and window deployment parameters, includes:
[0166] Step S020321: Sort the rooms in the multi-story apartment layout by orientation priority based on the location of the doors and windows of the apartment, and obtain the sorting result;
[0167] Step S020322: Based on the sorting results, perform a traversal dimension analysis on the walls in the multi-story apartment layout to obtain the door and window dimensions;
[0168] Step S020323: Analyze the opening degree using the dimensions of the doors and windows to obtain the door and window opening degree;
[0169] Step S020324: Based on the door and window dimensions and opening degree, the parameters are organized to obtain the door and window deployment parameters.
[0170] First, the orientation priority of all exterior walls with operable windows in ordinary rooms (such as living rooms, bedrooms, kitchens, etc.) and special rooms (such as stairwells) in multi-story apartment layouts is ranked. North-south facing walls have higher priority than east-west facing walls. For stairwells, the exterior wall on the side of the stair landing is identified and listed as the wall segment with priority for opening windows in that room. Finally, the wall ranking results for each room are obtained.
[0171] Then, according to the sorting results, the wall segments of each room are traversed sequentially. The feasibility of opening a window is judged for each wall segment. The judgment criteria are: wall length ≥ minimum window width + 2 × minimum window pier width on both sides + wall thickness (e.g., when a 1.2-meter wide window is paired with 0.3-meter window piers on both sides and a wall thickness of 0.24 meters, the wall length must be at least 1.2 + 2 × 0.3 + 0.24 = 2.04 meters). Only wall segments that meet this requirement are retained. For ordinary rooms, on the first wall segment that meets the conditions, the window size is dynamically calculated based on the wall segment length and the preset "normal window width". The smaller value between the "normal window width" and the "maximum width of the wall segment that can be opened" is taken. If an entrance door is already set on the target exterior wall of the living room or dining room, the width occupied by the entrance door is deducted first, and the window width is calculated on the wall segment corresponding to the longest part of the remaining area. For stairwells, on the exterior wall of the identified platform side, a smaller standard window width is determined according to architectural habits. Finally, the door and window sizes of each room are obtained.
[0172] Subsequently, based on the determined door and window dimensions, and in conjunction with the wall segment location and room function, an opening analysis was conducted. For ordinary rooms, window geometric segments were generated at the exact center of the wall segment that met the conditions, clarifying the effective opening range of the windows. For stairwells, based on the window dimensions corresponding to the center position of the platform side wall, a fixed opening range was determined to ensure compliance with building usage habits. At the same time, it was verified that the window opening position did not conflict with the surrounding building elements such as the entrance door, and finally the door and window openings were obtained.
[0173] Finally, the dimensions and openings of doors and windows in each room are integrated, and the coordinates, room identification, orientation, and wall segment information of each window are added. All data is standardized and organized to ensure the completeness and consistency of the parameters, and the final door and window deployment parameters are obtained.
[0174] Furthermore, step S0204 above, which involves scoring the final set of floor plan instances using a building quantitative evaluation model to obtain the scoring results, includes:
[0175] Step S02041: The spatial comfort of the rooms in the final floor plan instance set is scored using the building quantitative evaluation model to obtain the first score result;
[0176] Step S02042: The lighting and ventilation scores of the rooms in the final floor plan instance set are evaluated using the building quantitative evaluation model to obtain a second score result;
[0177] Step S02043: The rooms in the final floor plan instance set are scored for sunlight using the building quantitative evaluation model to obtain a third score result;
[0178] Step S02044: The final set of floor plan instances is scored by region using the building quantitative evaluation model to obtain the fourth scoring result;
[0179] Step S02045: The first scoring result, the second scoring result, the third scoring result, and the fourth scoring result are weighted and summed to obtain the final scoring result.
[0180] First, based on the scoring indicators and standards set by experts, a spatial comfort score (out of 100, accounting for 30% of the total score) is conducted using a quantitative architectural assessment model. For each independent space in the final floor plan example set, its area and aspect ratio are calculated to measure basic physical comfort. The average value is taken for rooms of the same type. A special assessment is conducted for circulation spaces such as corridors (e.g., a corridor with a minimum net width ≥ 1.2 meters receives 100 points, 0.9–1.2 meters receives 85 points, and < 1.0 meter receives 75 points). Weights are assigned according to floor and room importance (e.g., living room 0.3, bedroom 0.25, kitchen 0.15, dining room 0.15, bathroom 0.15). The weighted average of all room scores is calculated as the spatial comfort score. Figure 11 For example, the living room scored 85 points, while the dining room, kitchen, bathroom, and bedroom all scored 100 points. After weighted calculation, the space comfort score was 96 points (rounded off), resulting in the first score.
[0181] Subsequently, a building quantitative assessment model was used to score daylighting and ventilation (maximum score 100, accounting for 40% of the total score). This score was obtained by weighted averaging of three sub-items: daylighting, ventilation, and sunlight (daylighting weight 0.4, ventilation weight 0.3, sunlight weight 0.3). The daylighting score was based on the "window-to-floor ratio" (the ratio of the total window area to the room floor area, with a default window height of 1.5 meters). Different standards were set for different rooms (e.g., for living rooms, a window-to-floor ratio ≥0.11 earns 100 points, 0.09-0.11 earns 85 points, and <0.09 earns 75 points; for bedrooms, a window-to-floor ratio ≥0.18 earns 100 points, 0.15-0.18 earns 85 points, and <0.15 earns 75 points). For the same room type, the average score was taken. The overall daylighting score in Figure 11 was 87 points. The ventilation score assessed the air convection effect. "Transparency" (100 points) was defined as having windows on all facing exterior walls with no load-bearing walls completely blocking the path. Figure 15 As shown), ventilation on the opposite side but not directly is considered good (85 points, such as...). Figure 16 As shown), adjacent or unidirectional ventilation is considered normal (75 points, adjacent ventilation is as follows). Figure 17 As shown, one-way ventilation is as follows Figure 18 (as shown) Figure 11 Ventilation received 100 points, resulting in the second score.
[0182] Then, a building quantitative assessment model is used to score sunlight exposure, mainly evaluating the orientation of living spaces such as living rooms and bedrooms. Rooms with south-facing windows receive 100 points, those with east-facing windows receive 85 points, and those with only north or west-facing windows receive 75 points. For multiple bedrooms, the highest score among all bedrooms is taken. The overall sunlight exposure score is calculated using a weighted average with the living room having a weight of 0.6 and the bedrooms a weight of 0.4. Figure 11 For example, both the living room and the bedroom have south-facing windows, each receiving 100 points. After weighting, the sunshine score is 100 points, resulting in the third scoring result.
[0183] Next, a building quantitative assessment model is used to score the layout by zone (out of 100, accounting for 30% of the total score), specifically the active and quiet zones. The living room, dining room, kitchen, and public bathroom are defined as "active zones," while all bedrooms and their attached independent bathrooms are defined as "quiet zones." Image processing algorithms (such as filling the two types of areas with different colors and then using cv2.findContours to calculate the connectivity) are used to analyze the layout relationships. If the quiet and active zones each form a single connected area with clear boundaries, it is considered "active-quiet separation" (100 points). Figure 19 As shown), the quiet zone is divided by the necessary service space but is not directly crossed by the passive zone, thus forming a "basic separation" (85 points, as shown). Figure 20 As shown), access to the bedroom requires passing through either a dynamic or static area, which is fragmented into a "mixed dynamic and static" area (75 points, such as...). Figure 21 (as shown) Figure 11 The middle bedroom was divided into two parts by the public restroom, which was judged as "basically separated", scoring 85 points and receiving the fourth rating result.
[0184] Finally, the final score is calculated according to the preset weighting formula: Final Total Score = Spatial Comfort Score × 0.4 + Lighting and Ventilation Score × 0.3 + Active and Quiet Zoning Score × 0.3. Substitute the scores from the first to the fourth score into the formula... Figure 11 For example, the final total score = 96×0.4+95×0.3+85×0.3=92.4, which is rounded to 92. This final total score, along with the scores of each sub-item, is stored in the database as an important basis for users' retrieval and decision-making.
[0185] This embodiment, through the above-described scheme, specifically involves processing a pre-acquired set of apartment templates using image processing and optical character recognition to obtain structured vector data; performing an exhaustive transformation on the structured vector data using the target building dimensions to obtain multi-story apartment layouts; filling the multi-story apartment layouts with architectural elements using architectural rules to obtain a set of apartment floor plan instances; scoring the final set of apartment floor plan instances using a building quantitative evaluation model to obtain a scoring result; and constructing a floor plan library based on the scoring result and the final set of apartment floor plan instances to obtain a floor plan library. Thus, by first receiving apartment parameters input by the user, the system accurately captures the user's personalized needs such as plot size and functional space configuration; then, based on these parameters, it searches a pre-constructed professional floor plan library to quickly match suitable apartment plans that meet the core requirements; and finally, it extracts modeling data from the floor plan library to generate an apartment floor plan report. This solves the problem of self-built house users finding it difficult to obtain architectural design schemes that meet their needs, and improves the efficiency of floor plan generation and retrieval.
[0186] For example, to help understand the implementation process of the floor plan generation and retrieval method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 22 , Figure 22 A simplified flowchart illustrating a method for generating and retrieving floor plans is provided, specifically:
[0187] The first step is to conduct an offline preprocessing phase, including:
[0188] The first step is to perform vectorization analysis of the house floor plan template, load the input farmhouse image, and after preprocessing, corner detection and optimization, room outline recognition, OCR function recognition, outline correction and pre-calculation of multi-layer template alignment relationship, structured vector data is generated and stored in a standardized manner.
[0189] The second step involves performing an exhaustive transformation to generate a massive number of floor plans. Within a size range of 5-15 meters with a step size of 0.1 meters, the target dimensions are traversed. The baseline dimensions are determined through template matching. Single-layer affine transformations and multi-layer forced alignment transformations are performed on the vectorized templates. Combined with operations such as boundary alignment, neighbor alignment, and layout regularization, the spatial layout is optimized. Then, doors and windows are automatically configured according to architectural rules, and sketch line drawings and color renderings are drawn to form a set of floor plan instances.
[0190] The third step is to implement intelligent scoring of the floor plan, which quantifies the scores from three dimensions: spatial comfort, lighting and ventilation, and separation of active and quiet areas, and calculates the overall score.
[0191] The fourth step is to complete the storage and indexing. Based on key features such as the target length and width of the apartment and the number of functional rooms, an index key is constructed. The apartment vector data, rating results, and renderings are stored in JSON format and according to the corresponding naming rules according to the index key, and a hash index library is established.
[0192] Then, the online retrieval and generation stage begins. Users input parameters such as the length, width, and number of functional rooms on each floor of their self-built house on the front-end interface. After receiving the request, the system backend assembles an index key consistent with the offline storage according to the rules. Using this index key, an O(1) complexity hash lookup is performed in the index library to quickly locate candidate schemes and sort them by total score. The top-ranked suitable house type schemes are then selected, and the corresponding house type floor plan, renderings, and multi-dimensional scores are extracted. After determining the data level, a standardized house type floor plan report is generated, completing the instant delivery from user needs to high-quality solutions.
[0193] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method for generating and retrieving floor plans in this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0194] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for generating and retrieving floor plans, characterized in that, The method for generating and retrieving floor plans includes: Receive floor plan parameters input by the user; The pre-built floor plan library is searched using the floor plan parameters to obtain a suitable floor plan solution; Based on the adapted apartment layout scheme, the apartment layout library is modeled and data is extracted to obtain an apartment floor plan report; Prior to the step of retrieving a suitable floor plan from a pre-built floor plan library using the floor plan parameters, the method further includes: Image processing and optical character recognition are performed on the pre-acquired set of apartment templates to obtain structured vector data, including: if the template is a multi-story building template, after completing the independent vectorization of each floor template, the first floor template and the corresponding second floor template vector data are loaded; every room in the second floor except the living room and corridor is traversed and compared with all rooms in the first floor except the living room and corridor; the ratio of the overlapping area of the polygonal outlines of the two rooms to the larger area of the two rooms is calculated. If the ratio exceeds a preset threshold and the number of outline points of the two rooms is the same, it is determined that the two rooms are vertically corresponding in design, and an alignment index field is added to the second floor template vector data. By exhaustively transforming the structured vector data using the target building dimensions, multi-story apartment layouts can be obtained. By filling the multi-story apartment layout with architectural elements according to architectural rules, a final set of apartment floor plan instances is obtained. The final set of floor plan examples is scored using a building quantitative evaluation model to obtain the scoring results; Based on the scoring results and the final set of floor plan instances, a floor plan library is constructed to obtain the floor plan library. The step of performing an exhaustive transformation on the structured vector data using the target building dimensions to obtain the multi-story apartment layout includes: The matching reference dimensions are determined based on the target building dimensions and the structured vector data; The structured vector data is matched according to the matching reference size to obtain a list of vectorized templates; Perform a single-layer apartment type transformation on the vectorized template list to obtain a single-layer vectorized dataset; Multi-level apartment layout transformation is performed based on the single-layer vectorized dataset to obtain a multi-story apartment layout, including: reading the alignment index, and according to the rooms that need to be vertically aligned marked in the alignment index, the geometric data of the corresponding rooms in the second-layer template are forcibly vertically aligned with the room data of the corresponding index in the first-layer vectorized dataset.
2. The method for generating and retrieving floor plans as described in claim 1, characterized in that, The steps of performing image processing and optical character recognition on the pre-acquired set of apartment type templates to obtain structured vector data include: After preprocessing the apartment template set, the apartment template set is detected by an image corner detection algorithm to obtain global vertex coordinates, and the global vertex coordinates are identified by an image contour detection algorithm to obtain the room contour. Optical character recognition is performed on the room outline to obtain room function text, and outline matching is performed based on the room function text to obtain matching results; Based on the global vertex coordinates, room outlines, room function text, and matching results, structured vector data is obtained.
3. The method for generating and retrieving floor plans as described in claim 1, characterized in that, The step of filling the multi-story apartment layout with architectural elements according to architectural rules to obtain the final set of apartment floor plan instances includes: The door and window positions of the multi-story apartment layout are obtained by setting the doors and windows according to architectural rules. Based on the location of doors and windows in the apartment layout, the dimensions and openings of doors and windows in the rooms of the multi-story apartment layout are analyzed to obtain door and window deployment parameters; The multi-story apartment layout is filled with parameters by the door and window deployment parameters to obtain the final apartment layout instance set.
4. The method for generating and retrieving floor plans as described in claim 3, characterized in that, The step of analyzing the door and window dimensions and openings of rooms in the multi-story apartment layout based on the location of the doors and windows in the apartment type to obtain door and window deployment parameters includes: Based on the location of the doors and windows of the apartment, the rooms in the multi-story apartment layout are sorted by orientation priority to obtain the sorting result; Based on the sorting results, the dimensions of the walls in the multi-story apartment layout are analyzed to obtain the dimensions of doors and windows. The opening degree is obtained by analyzing the dimensions of the doors and windows. Based on the dimensions and openings of the doors and windows, the parameters are organized to obtain the door and window deployment parameters.
5. The method for generating and retrieving floor plans as described in claim 1, characterized in that, The step of scoring the final set of floor plan instances using a building quantitative evaluation model to obtain the scoring results includes: The spatial comfort score of the rooms in the final floor plan instance set is obtained by using the building quantitative evaluation model to obtain the first score result. The lighting and ventilation scores of the rooms in the final floor plan instance set are obtained by using the building quantitative evaluation model to obtain a second score result. The sunlight score is calculated for the rooms in the final floor plan instance set using the building quantitative evaluation model to obtain a third score result. The final set of floor plan instances is scored by dividing them into zones using the building quantitative evaluation model to obtain a fourth scoring result. The final score is obtained by weighted summation of the first, second, third, and fourth score results.
6. The method for generating and retrieving floor plans as described in claim 1, characterized in that, The step of retrieving a suitable apartment layout from a pre-built apartment layout library using the apartment layout parameters includes: An index key is constructed based on the aforementioned apartment type parameters; A matching list is obtained by performing a hash lookup on the floor plan library using the index key; The matching list is filtered to obtain the matching apartment type solutions.
7. The method for generating and retrieving floor plans as described in claim 1, characterized in that, The step of extracting modeling data from the floor plan library based on the adapted floor plan scheme to obtain a floor plan report includes: Based on the adapted apartment layout scheme, the apartment layout library is modeled and data is extracted to obtain apartment floor plans, apartment renderings, and multi-dimensional apartment ratings. The data hierarchy is determined based on the floor plan, renderings, and multi-dimensional ratings of the apartment layout. Based on the data hierarchy, a floor plan report is generated using the floor plan, floor plan renderings, and multi-dimensional floor plan ratings.
Citation Information
Patent Citations
House superiority and disadvantage evaluation method, device and equipment and computer readable storage medium
CN109886775A
House type characteristic index automatic extraction method and system based on computer vision
CN112232131A
Method for automatically generating architectural planar graph
CN116341085A
Building body computational generation method based on plane type
CN120105519A