Historical and cultural block community service center design method based on generative design

By employing a generative design approach, and utilizing the Rhino/Grasshopper plugin and hash algorithms, a plan of functional combinations for community service centers is automatically generated. This solves the problem of low design efficiency in historical and cultural districts, provides multiple options, and improves design efficiency and practicality.

CN119026202APending Publication Date: 2024-11-26BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410938282.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-13
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing technologies lack generative design research on community service centers in historical and cultural districts, especially in complex public buildings. The design efficiency is low and there is a lack of objective evaluation methods, making it difficult to meet diverse needs.

Method used

The system uses the Rhino/Grasshopper plugin and hash algorithm, combined with the magnetizing algorithm, to automatically generate a database of functional layout schemes for community service centers. Image matching optimization technology is used to improve design efficiency and objectivity.

Benefits of technology

It achieves efficient design of community service centers in historical and cultural blocks, provides multiple options to meet the needs of different groups, and improves design efficiency and practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026202A_ABST
    Figure CN119026202A_ABST
Patent Text Reader

Abstract

The invention discloses a historical and cultural block community service center design method based on generative design, and belongs to the technical field of building generative design. On the basis of respecting the original building texture of the historical and cultural block, an rhino / grisshopper plug-in magnetizing algorithm is utilized to automatically generate a community service center plane function combination scheme database, and a Hash algorithm is utilized to perform matching optimization with a specific building plane, so that the design efficiency of the historical and cultural block community service center is improved. Compared with an existing historical and cultural block community service center design method, a computer automatic generation technology is introduced, manpower is saved, and design efficiency is improved. According to the historical and cultural block community service center generation type design method, organic combination of historical and cultural block building characteristics and an objective computer generation technology is achieved, the method can be applied to the scheme design stage, and the design efficiency of the historical and cultural block community service center design and the universality and practicability of the design method can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a design method for a community service center in a historical and cultural block based on generative design, and belongs to the technical field of architectural generative design. Background Art

[0002] Due to the high building density and high requirements for the control of architectural style in historical and cultural blocks, the construction of community service centers can only be based on the renovation of existing buildings, which increases the difficulty of building comprehensive community service centers. There is currently no relevant research on community service centers in historical and cultural blocks.

[0003] In recent years, with the development of technologies such as digitalization and artificial intelligence, concepts such as digital twins and human-machine collaboration have begun to enter people's horizons and gradually become one of the paths for the future development of the architectural design industry. Architectural generative design is an architectural design method that formally emerged with the development of computer technology and uses "computation" as the main means. With the help of the large-scale computing power of computers, it explores broad design possibilities according to a certain generation logic under the constraints and stimulation of various boundary conditions and related parameters. In addition, architectural generative design makes extensive use of the random and fuzzy variable functions of computer algorithms, which becomes the basis for simulating and approximating the thinking characteristics of architects in the process of architectural design. With the help of computers, the efficiency of architectural design has been greatly improved. Many scholars have conducted research on generative design. The generation objects of generative design of architectural planes mainly include small room plane layouts such as residential community planes, residential apartment planes, office building planes, hospital emergency department planes, classroom planes, and toilets. At present, there are more studies on residential apartment planes, and there is a lack of research on complex public buildings.

[0004] At present, most of the research on community service center design is qualitative research, mainly focusing on its complex design, post-use evaluation, etc., lacking quantitative research, and often based on self-perceived effects as the basis for evaluation, which can vary greatly due to personal likes and dislikes and cannot meet the requirements of objective evaluation. There is also a lack of research on community service centers in complex environments such as historical and cultural blocks.

[0005] Existing generative design studies are mostly focused on residential floor plans, but there is a lack of research on complex public buildings. Generative design for relatively complex public buildings such as community service centers in historical and cultural blocks still needs to be explored. Summary of the invention

[0006] The present invention mainly provides a design method for community service centers in historical and cultural blocks based on generative design. On the basis of respecting the original architectural texture of historical and cultural blocks, the rhino / grasshopper plug-in magnetizing algorithm is used to automatically generate a database of community service center plan function combination solutions, and a hash algorithm is used to match and optimize with specific architectural planes, so as to improve the design efficiency of community service centers in historical and cultural blocks. The specific implementation steps are as follows:

[0007] Step 1: Extract the architectural plane prototype of the historical and cultural block;

[0008] Step 2: Summarize the functions, area and functional topological relationships required for the community service center;

[0009] Step 3: Form a typical floor plan database of community service centers in historical and cultural blocks;

[0010] Step 4: Generate a matching scheme diagram;

[0011] Step 5: Generate the contour map to be matched;

[0012] Step 6: Determine whether the building outline conforms to the building plane prototype;

[0013] Step 7: Image matching optimization.

[0014] Furthermore, in the step 2, the functional topological relationship refers to the adjacency relationship between functions, which is expressed as two functions with an adjacency relationship being connected by a line segment.

[0015] Furthermore, in step three, the specific operation steps are as follows:

[0016] ① Draw the L-shaped outline in Rhino and run the magnetizing-FPG plug-in battery pack in Grasshopper;

[0017] ② Select the L-shaped outline in the Crv battery, select the entry point in the point battery, input the functional area of ​​the community service center into the HouseInstance battery, and connect each battery according to the connection relationship between the functions. Run the battery group to generate N functional combination solutions and output them to a folder named "L-shaped";

[0018] ③ Input E-type, T-type, straight-line type, and courtyard type (the inner courtyard and the outer contour are drawn in one stroke) in Rhino, and save them in the folders of "E-type", "T-type", "straight-line type", and "courtyard type" respectively;

[0019] Step 4 includes:

[0020] Write code in Python to convert the colored parts of the N schemes generated above except the gray background into black. The specific process is:

[0021] ① Define the HSV range of the color to be retained and the corresponding tolerance value;

[0022] ② Traverse all the files in the input folder, convert the image from RGB to HSV, and initialize a black image of the same size as the original image;

[0023] ③ Traverse each pixel and check whether the current color is in the list of colors to be retained, considering the tolerance value. If so, set the color of the original image at the corresponding position on the black image to obtain the matching scheme diagram and save it in a full English path folder, such as: L type is saved in D:\match\L.

[0024] Furthermore, step five includes: using PS or other drawing software, using a pen or lasso tool to extract the outer contour of the given building to be renovated (a single closed curve), and then filling the area outside the closed curve with gray and the area inside the closed curve with black to obtain the contour map to be matched, and save it in the folder of the scheme map to be matched.

[0025] Further, step six: determine whether the building outline conforms to the building plane prototype; determine whether the building outline to be renovated conforms to one of the building plane prototypes (L-type, E-type, T-type, straight-line type, courtyard type), if so, continue to step seven;

[0026] If not, return to step 3:

[0027] ① Input the outline of the building to be renovated into Rhino, and run the magnetizing-FPG plug-in battery pack in Grasshopper;

[0028] ② Select the outline of the building to be renovated in the Crv battery, select the entry point in the point battery, input the functional area of ​​the community service center into the HouseInstance battery, and connect each battery according to the connection relationship between each function. Run the battery group to generate N functional combination solutions and output them to any named folder; continue to execute steps 4, 5, and 7.

[0029] Step 7 includes using Python to write an image matching system based on the mean hash algorithm, difference hash algorithm, and equal pixel similarity algorithm. Mean hash algorithm process:

[0030] ① Reduce size: Reduce the image to be compared to 8x8 pixels.

[0031] ②Simplify colors: Convert the reduced image to a grayscale image.

[0032] ③Calculate the average value: Calculate the grayscale average value of all pixels after shrinking and converting to grayscale image.

[0033] ④ Generate hash value: traverse each pixel in the image and compare its grayscale value with the average value calculated in the previous step. If the grayscale value of the pixel is greater than or equal to the average value, the hash value at that position is set to 1; otherwise, it is set to 0. In this way, each image will be converted into a 64-bit binary hash value.

[0034] ⑤ Calculate the Hamming distance: Calculate the hash values ​​of the contour image to be matched and the scheme image to be matched respectively, and then calculate the Hamming distance between the two hash values. The Hamming distance refers to the number of different characters in the corresponding positions of the two hash values. The smaller the Hamming distance, the smaller the difference between the two hash values, which means the higher the similarity between the two images.

[0035] Difference hash algorithm process:

[0036] ① Reduce size: Resize the input image to 9x8 pixels.

[0037] ②Simplify colors: Convert color images into grayscale images to facilitate grayscale difference calculation.

[0038] ③ Calculate the difference value: traverse each pixel of the image and compare the gray value difference between adjacent pixels. If the pixel on the left is brighter than the pixel on the right (i.e. the gray value is larger), it is recorded as 1; otherwise it is recorded as 0.

[0039] ④ Generate hash value: Combine the 64 difference values ​​(0 or 1) obtained in the previous step in sequence into a 64-bit binary string. This string is the hash value of the image.

[0040] ⑤ Calculate the Hamming distance: Calculate the hash values ​​of the contour image to be matched and the scheme image to be matched respectively, and then calculate the Hamming distance between the two hash values. The Hamming distance refers to the number of different characters in the corresponding positions of the two hash values. The smaller the Hamming distance, the smaller the difference between the two hash values, which means the higher the similarity between the two images.

[0041] Equal pixel similarity algorithm process:

[0042] ① Flatten the contour map to be matched and the scheme map to be matched into a one-dimensional array respectively

[0043] ② Compare whether each corresponding element in two one-dimensional arrays is equal, and calculate the total number of all equal elements.

[0044] ③By calculating the ratio of the number of equal elements to the total number of elements, a similarity score is obtained. The higher the score, the higher the similarity.

[0045] In the image matching system, click to upload the image, select the contour image to be matched, click image matching, and wait for the program to calculate and output the result. The output result is the image with the highest similarity. The 1-3 plane function combination solutions generated by the result are the best combination solutions.

[0046] Compared with the existing design method of community service center in historical and cultural blocks, the present invention introduces computer automatic generation technology, saves manpower and improves design efficiency.

[0047] The present invention summarizes the architectural plane prototypes through the investigation of the architectural texture of 60 historical and cultural blocks in 31 provinces, autonomous regions and municipalities across the country, and forms a database of typical regional spatial adaptability of historical and cultural blocks, which increases the universality of the design method and has application value.

[0048] The present invention can be used to design community service centers in historical and cultural blocks, provide multiple options, meet the needs of different groups of people, and improve the practicability of design solutions.

[0049] The greatest advantage of the present invention is that it proposes a generative design method for community service centers in historical and cultural blocks, which achieves an organic combination of the architectural characteristics of historical and cultural blocks with objective computer generation technology. It can be applied in the scheme design stage, which helps to improve the design efficiency of community service centers in historical and cultural blocks and the universality and practicality of the design method. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a functional topology diagram.

[0051] Figure 2 This is a flat prototype.

[0052] Figure 3 Battery diagram for grasshopper.

[0053] Figure 4 A database diagram.

[0054] Figure 5 The present invention is a flowchart for implementing the method.

[0055] Figure 6 This is an example of a scheme diagram to be matched.

[0056] Figure 7 This is an example of the contour map to be matched.

[0057] Figure 8 It is the image matching system interface.

[0058] Specific implementation steps:

[0059] Step 1: Extract the architectural plan prototype of the historical and cultural block.

[0060] The architectural texture of historical and cultural blocks was obtained from Baidu Maps, and the architectural plane prototypes of historical and cultural blocks were summarized, which are E-type, L-type, T-type, straight-line type, and enclosed type.

[0061] Step 2: Summarize the required functions, area and functional topological relationships of the community service center.

[0062] The survey concluded that the functions and area ratios required for community service centers are as follows:

[0063] Table 1 Functions and area ratios of community service centers

[0064]

[0065] And draw a functional topology diagram, such as Figure 1 The functional topological relationship shown.

[0066] Step 3: Form a typical floor plan database of community service centers in historical and cultural blocks

[0067] The architectural plan prototypes are input into Rhino one by one, and the functional topological relationship and the functional area of ​​each function are input. The magnetic algorithm of the Grasshopper plug-in is used to automatically generate N kinds of plan function combination schemes for the community service center. The generated results are classified and sorted according to the plan prototypes to form a database.

[0068] Figure 2 This is a flat prototype.

[0069] Figure 3 Battery diagram for grasshopper.

[0070] Figure 4 A database diagram.

[0071] Step 4: Generate a matching scheme diagram.

[0072] Write code in Python to convert the colored parts except gray in the N scheme diagrams generated above into black, which is the scheme diagram to be matched, and save it in a folder with an all-English path, such as: type L is saved in D:\match\L. Figure 6 This is an example of a scheme diagram to be matched.

[0073] Step 5: Generate the contour map to be matched.

[0074] The outer contour of the given building to be renovated (a single closed curve) is extracted, and the outer contour image is processed into an image with gray outside the closed curve and black inside, which is the contour image to be matched and saved in the folder of the scheme image to be matched. Figure 7 This is an example of the contour map to be matched.

[0075] Step 6: Determine whether its outer contour conforms to the architectural plane prototype.

[0076] Determine whether its outer contour conforms to one of the building plane prototypes. If so, continue to step seven; if not, return to step three, input the building outer contour into Rhino, input the corresponding functional topological relationship and each functional area, and automatically generate N kinds of community service center plane function combination schemes through the Grasshopper plug-in magnetizing algorithm, and continue to execute steps four, five, and seven.

[0077] Step 7: Image matching optimization.

[0078] Use Python to write an image matching system based on the hash algorithm and COS similarity algorithm. In the image matching system, click to upload the image, select the contour image to be matched, click image matching, and wait for the program to calculate and output the results. The 1-3 plane function combination solutions generated by the result are the best combination solutions. Figure 8 It is the image matching system interface. Example

[0079] The project was built in the 1950s and is one of the earliest prison cells that has been preserved. The overall layout of the building is a courtyard, consisting of buildings surrounding three courtyards. The courtyard on the west side is the original prison area, and the eight preserved cells on the north side are equipped with functions such as a ventilation area, toilets, and rest rooms; the street-facing building on the south side is a bathing room in the prison area, and the east and west slope roof buildings in the courtyard are service rooms; the central and east courtyards were originally office rooms.

[0080] Basic construction situation

[0081] The old building site consists of three courtyards with a total of 11 buildings, including 4 city-level cultural relics protection buildings concentrated in the west courtyard; 5 historical buildings located in the middle courtyard and along the street; 1 general building located in the northeast and 1 later additional building located on the south side of the east courtyard. The current status of each building is as follows:

[0082] Building 1-1# is a single-story flat-roof building and a municipal-level cultural relic building;

[0083] 1-2# and 1-4# are single-story brick-wood double-sloped roof buildings, and are municipal-level cultural relics buildings;

[0084] 1-3# are single-story flat-roof buildings, municipal-level cultural relics buildings;

[0085] 2-1#, 2-2#, and 2-3# are single-story flat-roof buildings and are historical buildings;

[0086] 2-4# and 3-2# ​​are single-story brick-wood double-sloped roof buildings, historical buildings;

[0087] 3-1# is a two-story flat-roofed building, a general building;

[0088] 3-3# is a partial three-story flat-roof building, which was added later.

[0089] The courtyard has been unattended for a long time and lacks maintenance. The roofs of some buildings have collapsed, and plants have grown wildly, damaging the buildings and posing a safety hazard.

[0090] The module combination mechanism and spatial adaptability analysis technology of historical and cultural blocks are used. The magnetizing-FPG plug-in is used to input information such as site boundaries, planar functional topology, module unit area, and main entrance of the building. The rooms and traffic are arranged through the built-in custom algorithm of the plug-in. The genetic algorithm is used for iterative optimization to generate a variety of functional module combination diagrams, and output them to local files. After a simple homogenization of the module combination diagram, an image matching program based on the mean hash algorithm, the difference hash algorithm, and the COS similarity algorithm is written in python to match the module combination diagram with the site map, and obtain the functional module combination diagram with the highest matching degree with the site. The specific content of the technical application includes:

[0091] According to the geographical environment of the historical and cultural block, the spatial scene of the building is extracted as a quadrangle, and the prototype of the building plane is extracted as an enclosure. Three integrated transformation methods can be used for adaptive transformation: replacement, integration and addition. Municipal cultural relics and historical buildings are transformed in a replacement way without changing the original structure; general buildings are suitable for integrated transformation, and new buildings are added according to functional needs. Later added buildings are also suitable for integrated transformation.

[0092] Combined with the current status of the building, the east courtyard space includes general buildings and later added buildings. An integrated renewal method is adopted to achieve the safety upgrade of the entire space by demolishing the later added buildings with safety hazards and repairing some roof collapses. On this basis, an additional building is added to form a more complete courtyard structure to enhance the beauty and functionality of the overall building. The renewal strategy fully considers the historicity and structural safety of the building and injects new functions into it. Through differentiated treatment of different building types, the goal of integrated transformation can be better achieved, making the building a cultural place that better adapts to contemporary needs.

[0093] Module combination configuration selection

[0094] Different functional modules are placed according to the functions of the courtyard. A three-module combination is adopted: community service center - cultural activity station - commercial service station.

[0095] Functional module unit list

[0096]

[0097] Analysis and optimization of integrated module combination mechanism.

[0098] The original site layout of the building is complex, with many courtyards. There is no matching module combination mechanism in the existing spatial adaptability module database, so it is necessary to analyze and optimize the module combination mechanism according to the actual situation. Use the magnetizing-FPG plug-in in grasshopper to generate a variety of functional module combination diagrams and output them to local files. The specific operations are as follows:

[0099] 1) Preliminary sorting of site layout;

[0100] The original site layout consists of two courtyards plus a semi-enclosed courtyard. Building 3-3# is a later addition with low historical value and has destroyed the architectural layout of the entire site. It can be demolished and a new building of the same size as the original building can be built on the east side to complement the original shape, so that the semi-enclosed courtyard on the east side can be formed into an enclosed courtyard, thereby enhancing the integrity and coordination of the architectural layout.

[0101] Preliminary site sorting

[0102] 2) Import the site outline map into Rhino.

[0103] Since the magnetizing-FPG operator can only recognize a single closed curve, when inputting in Rhino, the contour uses a single closed curve. The site contour map is imported as follows:

[0104] Site outline

[0105] 3) Determine the functional topology diagram;

[0106] The functional topology follows the principle of reasonable functional zoning, connecting the functional modules with close functional relationships together. The supermarket is set at the main entrance, and the courtyard is represented by the courtyard module.

[0107] Functional topology diagram

[0108] 4) Build a grasshopper battery pack;

[0109] The magnetizingRooms-ES battery is the main operator. Right-click and select Two-sidescorridors. Change the contour offset to 2.5, set the number of iterations to 100, and adjust the maximum distance (MaxAdjDistance) according to the generated combination diagram effect. The more functional modules are placed in the contour, the better. In this case, it is set to 100. Use the HouseInstance battery to input the functional topology, the curve battery to select the site contour, and the point battery to select a point as the main entrance. After connecting all the batteries, you can generate a functional module combination diagram in Rhino.

[0110] grasshopper battery pack

[0111] 5) Output to a local folder;

[0112] Use ghPython to write a battery. The condition is that when all 15 functional modules are placed in the outline, the functional module combination diagram that appears in rhino at this time is intercepted and output to the local folder. Connect the trigger battery and set it to refresh once a minute. The program will automatically refresh and output the results that meet the conditions.

[0113] 6) Combine the results;

[0114] Fix the Rhino window view size and save the view so that each output image is the same size. 100 functional module combination solutions are obtained through program operation calculation.

[0115] Generate combined module diagram (partial)

[0116] 7) Optimization preparation stage;

[0117] ① Original image: The site outline is captured in Rhino, and the view size is the same as the output image size above. The closed area within the site outline is filled with black. Observing the results output by Grasshopper, it is found that the courtyard modules are all pink and purple squares. In order to make the location of the courtyard also a limiting condition for image matching, the original courtyard part is filled with pink and purple, and the color number is the same as the courtyard color in the above Grasshopper output result to obtain the original image.

[0118] Original Image

[0119] Image to be matched: Write a color conversion program to convert all the color blocks in the above 1000 images except the pink and purple courtyard parts into black to obtain the image to be matched.

[0120] Image to be matched

[0121] Based on the mean hash algorithm, difference hash algorithm and COS similarity algorithm, a matching program was written in Python to screen out the plane combination scheme with the highest matching degree with the site outline. The matching results are shown in the figure. Select one of the three combination module images with the highest matching degree for design (here, the image with the highest similarity using the COS similarity algorithm is selected).

[0122] The internal space layout of cultural relics buildings 1-1#, 1-2#, 1-3#, and 1-4# remains unchanged. 1-1# has a theme exhibition hall. 1-3# has other exhibition halls and warehouses. The spatial layout of historical buildings 2-1#, 2-2#, 2-3#, and 2-4# can be slightly changed. 2-1# has a coffee lounge. By expanding the south side space through volume addition, the usable area of ​​the coffee lounge is expanded. 2-2# has convenient catering. Through space integration, non-load-bearing walls are removed and two small spaces are merged into a large space that meets the functional use area requirements. Building 3-4# is newly built through volume addition to form an enclosed courtyard space with the original building, with a library reading room inside, and the space division is relatively flexible.

Claims

1. A design method for a community service center in a historical and cultural block based on generative design, characterized in that: On the basis of respecting the original architectural texture of the historical and cultural blocks, the Rhino / Grasshopper plug-in magnetizing algorithm is used to automatically generate a database of community service center plan function combination solutions, and the hash algorithm is used to match and optimize the specific building plane, so as to improve the design efficiency of the community service center in the historical and cultural blocks; the specific implementation steps are as follows: Step 1: Extract the architectural plane prototype of the historical and cultural block; Step 2: Summarize the functions, area and functional topological relationships required for the community service center; Step 3: Form a typical floor plan database of community service centers in historical and cultural blocks; Step 4: Generate a matching scheme diagram; Step 5: Generate the contour map to be matched; Step 6: Determine whether the building outline conforms to the building plane prototype; Step 7: Image matching optimization.

2. According to the method for designing a community service center in a historical and cultural block based on generative design in claim 1, it is characterized by: In the step 2, the functional topological relationship refers to the adjacency relationship between functions, which is expressed as two functions with an adjacency relationship being connected by a line segment.

3. According to the method for designing a community service center in a historical and cultural block based on generative design in claim 1, it is characterized by: In step three, the specific steps are as follows: ① Draw the L-shaped outline in Rhino and run the magnetizing-FPG plug-in battery pack in Grasshopper; ② Select the L-shaped outline in the Crv battery, select the entry point in the point battery, input the functional area of ​​the community service center into the HouseInstance battery, and connect each battery according to the connection relationship between each function; Run the battery pack to generate N functional combination solutions and output them to a folder named "L type"; ③In Rhino, enter E-type, T-type, straight-line type, and courtyard type respectively, and save them into the "E-type", "T-type", "straight-line", and "courtyard type" folders respectively.

4. According to the method for designing a community service center in a historical and cultural block based on generative design in claim 1, it is characterized by: Step 4 includes: Write code in Python to convert the colored parts of the N schemes generated above except the gray background into black. The specific process is: ① Define the HSV range of the color to be retained and the corresponding tolerance value; ② Traverse all the files in the input folder, convert the image from RGB to HSV, and initialize a black image of the same size as the original image; ③ Traverse each pixel and check whether the current color is in the list of colors to be retained, considering the tolerance value. If so, set the color of the original image at the corresponding position on the black image, obtain the scheme to be matched, and save it in the full English path folder.

5. According to the method for designing a community service center in a historical and cultural block based on generative design in claim 1, it is characterized by: Step five includes: using PS or other drawing software, using a pen or lasso tool to extract the outer contour of the given building to be renovated, and then filling the outside of the closed curve with gray and the inside of the closed curve with black to obtain the contour map to be matched, and save it in the folder of the scheme map to be matched.

6. The design method of a community service center in a historical and cultural block based on generative design according to claim 1 is characterized in that: Step 6: Determine whether the building outline conforms to the building plane prototype; determine whether the building outline to be renovated conforms to one of the building plane prototypes, L-type, E-type, T-type, straight-line type, and courtyard type. If so, proceed to step 7; If not, return to step 3: ① Input the outline of the building to be renovated into Rhino, and run the magnetizing-FPG plug-in battery pack in Grasshopper; ② The Crv battery selects the outer contour of the building to be renovated, the point battery selects the entry point, inputs the functional area of ​​the community service center into the HouseInstance battery, and connects each battery according to the connection relationship between each function; Run the battery pack to generate N functional combination solutions and output them to any named folder; Continue with steps 4, 5, and 7.

7. The design method of a community service center in a historical and cultural block based on generative design according to claim 1 is characterized in that: Step 7 includes using Python to write an image matching system based on the mean hash algorithm, difference hash algorithm, and equal pixel similarity algorithm; Mean hashing algorithm process: ① Reduce the size: reduce the image to be compared to 8x8 pixels; ②Simplify color: convert the reduced image into a grayscale image; ③ Calculate the average value: Calculate the grayscale average value of all pixels after shrinking and converting to grayscale image; ④ Generate hash value: traverse each pixel in the image and compare its grayscale value with the average value calculated in the previous step; if the grayscale value of the pixel is greater than or equal to the average value, the hash value at that position is set to 1; otherwise, it is set to 0; each image will be converted into a 64-bit binary hash value; ⑤ Calculate the Hamming distance: Calculate the hash values ​​of the contour image to be matched and the scheme image to be matched respectively, and then calculate the Hamming distance between the two hash values; the Hamming distance refers to the number of different characters in the corresponding positions of the two hash values; the smaller the Hamming distance, the smaller the difference between the two hash values, and the higher the similarity between the two images; Difference hash algorithm process: ① Reduce size: resize the input image to 9x8 pixels; ②Simplify color: Convert color images into grayscale images to facilitate grayscale difference calculation; ③ Calculate the difference value: traverse each pixel of the image and compare the gray value difference between adjacent pixels; if the pixel on the left is brighter than the pixel on the right, record it as 1; otherwise, record it as 0; ④ Generate hash value: Combine the 64 difference values ​​obtained in the previous step into a 64-bit binary string in sequence. This string is the hash value of the image. ⑤ Calculate the Hamming distance: Calculate the hash values ​​of the contour image to be matched and the scheme image to be matched respectively, and then calculate the Hamming distance between the two hash values; the Hamming distance refers to the number of different characters in the corresponding positions of the two hash values; the smaller the Hamming distance, the smaller the difference between the two hash values, which means the higher the similarity between the two images; Equal pixel similarity algorithm process: ① Flatten the contour map to be matched and the scheme map to be matched into one-dimensional arrays respectively; ② Compare whether each corresponding element in two one-dimensional arrays is equal, and calculate the total number of all equal elements; ③ By calculating the ratio of the number of equal elements to the total number of elements, a similarity score is obtained. The higher the score, the higher the similarity. In the image matching system, click to upload the image, select the contour image to be matched, click image matching, and wait for the program to output the result. The output result is the image with the highest similarity; generating 1-3 plane function combination schemes is the best combination scheme.