Fireproof partition generation method and device, equipment and storage medium

The generation of fire partitions through grid processing and K-Means clustering algorithms solves the problem of inefficient generation of fire partitions, and realizes reasonable division and efficient generation.

CN120257437APending Publication Date: 2025-07-04HEFEI LIANGZHEN CONSTR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510389032.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the generation efficiency of fire-proof partitions is low, and manual division can easily lead to problems such as unreasonable and irregular boundaries.

Method used

By obtaining the target site information for grid processing, the initial clustering point is determined, the K-Means clustering algorithm is used to generate the initial clustering cluster, and multiple cycle clustering and boundary grid adjustments are performed to generate a reasonable fire partitioning scheme.

Benefits of technology

The rational division of fire-proof partitions has been realized, the generation efficiency has been improved, and the unreasonable and boundary irregularities caused by manual division have been avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257437A_ABST
    Figure CN120257437A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of building design, and discloses a fireproof partition generation method, device and equipment and a storage medium, which are used for improving the generation efficiency of fireproof partitions. The fireproof partition generation method comprises the steps that target site information is obtained, gridding processing is conducted on a target site according to the target site information, firewall grids are obtained, and the edges of the firewall grids are all positions where firewalls can be arranged; determining initial clustering points to obtain a first candidate clustering point set; selecting points of a preset target fireproof partition number from the first candidate clustering point set as a clustering point scheme; based on a clustering point scheme and a K-Means clustering algorithm, an initial clustering cluster is generated according to the distance from each firewall grid to each clustering center point, multiple times of cyclic clustering are carried out on the initial clustering cluster, and a preliminary fire partition result is generated; and according to the preliminary fireproof zoning result, boundary grid adjustment is carried out, and a target fireproof zoning scheme is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of architectural design, and particularly to a method, device, equipment and storage medium for generating fire compartments. Background Art

[0002] Fire compartments in buildings can effectively isolate fire sources, limit the spread of fire, and win precious time for personnel evacuation and fire fighting and rescue, thus greatly reducing the losses and hazards caused by fires. Therefore, it is particularly important to divide fire compartments.

[0003] The prior art mainly relies on designers to divide fire compartments, including manually analyzing the site layout, functional zoning and fire prevention requirements, and manually calculating the area and boundary of each compartment according to the specifications. Manual division is prone to unreasonable partitions, irregular boundary arrangements, and time-consuming and laborious manual operations, resulting in low efficiency in generating fire compartments. Summary of the Invention

[0004] The present invention provides a method, device, equipment and storage medium for generating fire compartments to solve the problem of low efficiency in generating fire compartments due to relying on manual partitioning in the prior art.

[0005] In a first aspect of the present invention, a method for generating fire compartments is provided, including: obtaining target site information, performing grid processing on the target site according to the target site information to obtain firewall grids, where the sides of the firewall grids are all positions where firewalls can be arranged; determining initial clustering points to obtain a first candidate clustering point set; selecting points with a preset number of target fire compartments from the first candidate clustering point set as a clustering point scheme; based on the clustering point scheme and the K-Means clustering algorithm, generating initial clustering clusters according to the distance from each firewall grid to each clustering center point, performing multiple cyclic clusterings on the initial clustering clusters to generate a preliminary fire compartment result; adjusting boundary grids according to the preliminary fire compartment result and generating a target fire compartment scheme.

[0006] In a feasible implementation manner, before selecting points with a preset number of target fire compartments from the first candidate clustering point set as a clustering point scheme, it further includes: calculating the required number of target fire compartments according to the total area of the target site and a preset fire compartment area standard.

[0007] In a feasible implementation manner, the determining of the initial clustering points includes: determining initial clustering points according to the boundary of the target site according to a preset first distance condition without considering safety exits; screening out the center point of the safety exit and the 8 points around it, removing the points outside the boundary, and determining initial clustering points according to a preset second distance condition when considering safety exits.

[0008] In a feasible implementation manner, selecting points with a preset number of target fire prevention zones from the first candidate cluster point set as the cluster point scheme includes: selecting any point from the first candidate cluster point set as the initial cluster center; based on the distance constraint and the distribution optimization condition, sequentially selecting new cluster center points from the remaining first candidate cluster points, where each newly selected point needs to satisfy that the minimum distance from the selected cluster center point is greater than a preset threshold; iteratively selecting the cluster center points until the preset number of target fire prevention zones is reached, and outputting the final cluster point scheme that meets the conditions after connectivity verification.

[0009] In a feasible implementation manner, the sequentially selecting new cluster center points from the remaining candidate cluster points based on the distance constraint and the distribution optimization condition includes: calculating the minimum distance between each remaining first candidate cluster point and the selected cluster center; screening out the second candidate cluster point set with the minimum distance greater than the preset threshold; selecting the point with the smallest overall spatial distribution variance of the cluster center from the second candidate cluster point set as the new cluster center point.

[0010] In a feasible implementation manner, adjusting the boundary grid according to the preliminary fire prevention zone result and generating the target fire prevention zone scheme includes: adjusting the boundary grid according to the preliminary fire prevention zone result to generate multiple partition adjustment schemes; comparing the multiple partition adjustment schemes to select the optimal fire prevention zone scheme as the target fire prevention zone scheme.

[0011] In a feasible implementation manner, adjusting the boundary grid according to the preliminary fire prevention zone result to generate multiple partition adjustment schemes includes: checking the connectivity of the grids within each fire prevention zone; if the number of connected groups of grids within the fire prevention zone is greater than one, changing the overall attribution of the non - largest connected group to the adjacent partition; calculating and comparing the areas of each fire prevention zone, and appropriately adjusting the boundary grids of the zones with significantly different areas to achieve the equalization of the partition areas, so as to obtain multiple partition adjustment schemes.

[0012] In the second aspect of the present invention, a fire compartment generation device is provided, including: a gridification module, configured to obtain target site information, perform gridification processing on the target site according to the target site information to obtain firewall grids, and the edges of the firewall grids are all positions where firewalls can be arranged; a determination module, configured to determine initial clustering points to obtain a first candidate clustering point set; a selection module, configured to select points with a preset number of target fire compartments from the first candidate clustering point set as a clustering point scheme; a first generation module, configured to generate initial clustering clusters based on the clustering point scheme and the K-Means clustering algorithm according to the distances from each firewall grid to each clustering center point, and perform multiple rounds of cyclic clustering on the initial clustering clusters to generate a preliminary fire compartment result; a second generation module, configured to perform boundary grid adjustment according to the preliminary fire compartment result and generate a target fire compartment scheme.

[0013] In a feasible implementation manner, the fire compartment generation device further includes: a calculation module, configured to calculate the required number of target fire compartments according to the total area of the target site and a preset fire compartment area standard.

[0014] In a feasible implementation manner, the determination module is specifically configured to: determine initial clustering points according to the boundary of the target site and a preset first distance condition without considering safety exits; and screen out the center point of the safety exit and the 8 points around it, remove the points outside the boundary, and determine initial clustering points according to a preset second distance condition when considering safety exits.

[0015] In a feasible implementation manner, the selection module includes: a first selection unit, configured to select any point from the first candidate clustering point set as an initial clustering center; a second selection unit, configured to sequentially select new clustering center points from the remaining first candidate clustering points based on distance constraints and distribution optimization conditions, where the minimum distance between each newly selected point and the selected clustering center point needs to be greater than a preset threshold; and an output unit, configured to iteratively select clustering center points until the preset number of target fire compartments is reached, and output a final clustering point scheme that meets the conditions after connectivity verification.

[0016] In a feasible implementation manner, the second selection unit is specifically configured to: calculate the minimum distance between each remaining first candidate clustering point and the selected clustering center; screen out a second candidate clustering point set with the minimum distance greater than the preset threshold; and select a point with the smallest overall spatial distribution variance of the clustering centers from the second candidate clustering point set as a new clustering center point.

[0017] In a feasible implementation manner, the second generation module includes: a generation unit, configured to adjust boundary grids according to the preliminary fire compartmentalization result to generate a plurality of compartment adjustment schemes; and a third selection unit, configured to compare the plurality of compartment adjustment schemes to select an optimal fire compartmentalization scheme as the target fire compartmentalization scheme.

[0018] In a feasible implementation manner, the generation unit is specifically configured to: check the connectivity of the grids within each fire compartment; if the number of connected components of the grids within a fire compartment is greater than one, then change the overall attribution of the non-maximal connected component to an adjacent compartment; calculate and compare the areas of each fire compartment, and appropriately adjust the boundary grids of the compartments with significantly different areas to achieve the equalization of the compartment areas, thereby obtaining a plurality of compartment adjustment schemes.

[0019] A third aspect of the present invention provides a fire compartmentalization generation device, including: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the fire compartmentalization generation device to execute the above-mentioned fire compartmentalization generation method.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on a computer, the computer is enabled to execute the above-mentioned fire compartmentalization generation method.

[0021] In the technical solution provided by the present invention, target site information is obtained, the target site is meshed according to the target site information to obtain firewall grids, and the edges of the firewall grids are all positions where firewalls can be arranged; initial clustering points are determined to obtain a first candidate clustering point set; points with a preset number of target fire compartments are selected from the first candidate clustering point set as a clustering point scheme; based on the clustering point scheme and the K-Means clustering algorithm, initial clustering clusters are generated according to the distances from each firewall grid to each clustering center point, and the initial clustering clusters are clustered in multiple loops to generate a preliminary fire compartmentalization result; boundary grid adjustment is performed according to the preliminary fire compartmentalization result, and a target fire compartmentalization scheme is generated. In the embodiments of the present invention, by obtaining target site information and performing meshing to obtain firewall grids, and then generating a target fire compartmentalization scheme through steps such as determining initial clustering points, selecting a clustering point scheme, generating a preliminary fire compartmentalization result, and boundary grid adjustment, reasonable partitioning of the compartments is achieved, and at the same time, the generation efficiency of the fire compartments is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of an embodiment of the fire compartmentalization generation method in an embodiment of the present invention;

[0023] Figure 2Schematic diagram of another embodiment of the fire compartment generation method in the embodiments of the present invention;

[0024] Figure 3 Schematic diagram of the determination result of the initial clustering points without considering the safety exits in the embodiments of the present invention;

[0025] Figure 4 Schematic diagram of the determination result of the initial clustering points considering the safety exits in the embodiments of the present invention;

[0026] Figure 5 Schematic diagram of different clustering point schemes in the embodiments of the present invention;

[0027] Figure 6 Schematic diagram of multiple feasible partition schemes in the embodiments of the present invention;

[0028] Figure 7 Schematic diagram of multiple fire compartment adjustment schemes generated during the boundary adjustment process in the embodiments of the present invention;

[0029] Figure 8 Schematic diagram of the target fire compartment scheme of the boundary adjustment result in the embodiments of the present invention;

[0030] Figure 9 Schematic diagram of an embodiment of the fire compartment generation device in the embodiments of the present invention;

[0031] Figure 10 Schematic diagram of another embodiment of the fire compartment generation device in the embodiments of the present invention;

[0032] Figure 11 Schematic diagram of an embodiment of the fire compartment generation equipment in the embodiments of the present invention. Detailed implementation manners

[0033] The embodiments of the present invention provide a fire compartment generation method, device, equipment and storage medium, which realize the reasonable division and efficient generation of fire compartments through gridification, selection of clustering points, generation of initial clusters and boundary adjustment.

[0034] In the description, claims and the above drawings of the present invention, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that shown or described herein. In addition, the term "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0035] It can be understood that the execution subject of the present invention can be a fire compartment generation device, or a terminal or a server. Specifically, it is not limited here. In the embodiments of the present invention, the server is taken as an example of the execution subject for illustration.

[0036] For ease of understanding, the specific process of the embodiments of the present invention will be described below. Please refer to Figure 1 In an embodiment of the fire compartment generation method in the embodiments of the present invention, it includes:

[0037] 101. Obtain target site information, perform grid processing on the target site according to the target site information to obtain a firewall grid, and the edges of the firewall grid are all positions where firewalls can be arranged;

[0038] Obtain the spatial information of the target site through architectural drawings, BIM models or on-site surveys, including key data such as building outlines, obstacle positions, and fire protection code requirements. Use the regular grid division method to discretize the site and generate a uniform firewall grid. The regular grid division method can be a quadtree or a hexagonal grid. Each edge of the grid represents a potential arrangement position of the firewall. The grid resolution needs to be dynamically adjusted according to the fire compartment accuracy requirements, such as the upper limit of the partition area specified in the Code for Fire Protection Design of Buildings GB50016. When performing grid division, non-traversable areas such as load-bearing walls and equipment areas need to be excluded to ensure that the grid edges only contain legal paths where firewalls are allowed to be set.

[0039] 102. Determine the initial clustering points to obtain a first candidate clustering point set;

[0040] Identify evenly distributed and representative grid points in the target site through a spatial analysis algorithm to ensure that the candidate points cover all functional areas. The spatial analysis algorithm can be a Voronoi diagram or density peak detection. Functional areas include corridors, stairwells, equipment rooms, etc. At the same time, the limitations of fire prevention codes on the partition area and evacuation distance need to be considered. For example, the spacing between candidate points should meet the requirements of the maximum allowable area of fire compartments in the Code for Fire Protection Design of Buildings GB50016 to avoid over-dense or over-sparse distribution of the initial points. In addition, building information model data can be introduced to extract areas with high fire loads as priority candidate points to ensure independent zoning of high-risk areas. Areas with high fire loads include warehouses, electrical rooms, etc. The finally generated set of first candidate clustering points needs to meet spatial uniformity, functional adaptability, and code compliance.

[0041] 103. Select points with a preset number of target fire compartments from the set of first candidate clustering points as the clustering point scheme;

[0042] Use an improved K-means++ algorithm to select the initial clustering centers. This algorithm ensures uniform distribution of the initial center points by maximizing the minimum distance criterion. Specifically, when implementing, randomly select the first clustering center point, and then iteratively calculate the minimum distance between the remaining candidate points and the selected center points. Each time, select the candidate point with the maximum minimum distance as the new center point until the preset number of clustering center points is selected. Introduce a dynamic distance threshold constraint during each iteration. This threshold is calculated based on the maximum allowable area of the fire compartment to ensure that the minimum distance between the newly selected center point and the existing center points is not less than the threshold. At the same time, optimize in combination with the building space characteristics, and preferentially select candidate points in key areas such as evacuation stairwells and equipment rooms as clustering centers. In addition, for large open spaces, use the density peak detection algorithm to supplement candidate points to prevent uneven distribution of center points. All candidate points need to pass the connectivity verification, and use the breadth-first search algorithm to check whether the potential partition centered on it meets the spatial connectivity requirements. The finally output clustering point scheme needs to meet the requirements that the spatial distribution of each center point is uniform and matches the building function layout.

[0043] 104. Based on the clustering point scheme and the K-Means clustering algorithm, generate initial clustering clusters according to the distance from each firewall grid to each clustering center point, and perform multiple loop clusterings on the initial clustering clusters to generate preliminary fire compartment results;

[0044] According to the larger value of the absolute distances of the geometric centers of each firewall grid to the clustering center point on the X and Y axes, the grids are divided into corresponding clusters to form initial clustering clusters; in the iterative process, a dynamic weight mechanism is introduced. According to factors such as the number of grids in each cluster, the density of distribution, and the initial distance between the grid and the clustering center point, different weights are assigned to the calculation of the distance from each grid in the cluster to the clustering center point. For example, for clusters with a large number of grids and dense distribution, the distance weight is appropriately reduced to avoid over-concentration. For grids with a relatively far initial distance, the distance weight is increased to enhance the rationality of the assignment; after recalculating the weighted distance in each iteration, the grids are reassigned to the corresponding clusters, and the clustering center is updated in real time; when the change range of the clustering center is less than a preset minimum value, or the number of iterations reaches a set value, the iteration stops, and the obtained clustering clusters are the preliminary fire compartmentalization results.

[0045] 105. Adjust the boundary grids according to the preliminary fire compartmentalization results and generate the target fire compartmentalization plan.

[0046] The morphological closing operation algorithm is used to smooth the partition boundary, eliminate the jagged edges and fill the small holes to ensure the continuity of the firewall path; for the boundary grids between adjacent fire compartments, the minimum cut algorithm is introduced to optimize the division, and the disputed grids are preferentially assigned to the fire compartments with a lower fire risk level; at the same time, a partition area rebalancing mechanism is implemented, and the grid reallocation process is automatically triggered for partitions that exceed the specification limits. The edge grids are transferred to adjacent partitions by adjusting the distance weight coefficient; during the boundary optimization process, the integrity of non-traversable structures such as load-bearing walls and equipment areas is forcibly retained to ensure the physical feasibility of the fire compartments; for special functional areas such as evacuation channels and safety exits, protective buffer zones are set to prohibit boundary adjustments from affecting their effective widths; the Delaunay triangulation algorithm is used to generate an optimized firewall layout path, and the target fire compartmentalization plan including partition boundary coordinates, area statistics, and fire rating markings is output. The entire process ensures that each fire compartment meets the core indicators such as the upper limit of the area, evacuation distance, and boundary closure required by the specifications through multiple rounds of iteration, while maintaining a high degree of coordination with the building function layout.

[0047] In an embodiment of the present invention, by acquiring target site information, the target site is gridded according to the target site information to obtain a firewall grid, the edges of the firewall grid are all locations where firewalls can be arranged, and initial clustering points are determined to obtain a first candidate clustering point set. A preset number of points of the target fire partition are selected from the first candidate clustering point set as a clustering point scheme. Based on the clustering point scheme and the K-Means clustering algorithm, an initial clustering cluster is generated according to the distance from each firewall grid to each cluster center point. The initial clustering cluster is clustered multiple times in a cycle to generate a preliminary fire partition result. The boundary grid is adjusted according to the preliminary fire partition result, and a target fire partition scheme is generated, thereby achieving a reasonable division of partitions and greatly improving the efficiency of generating fire partitions.

[0048] See also Figure 2 Another embodiment of the method for generating fire protection zones in the embodiment of the present invention includes:

[0049] 201. Obtain target site information, and perform grid processing on the target site according to the target site information to obtain a firewall grid, wherein the edges of the firewall grid are all locations where firewalls can be arranged;

[0050] 202. Determine initial clustering points to obtain a first candidate clustering point set;

[0051] Without considering the safety exit, the initial clustering points are determined according to the boundary of the target site and the preset first distance condition. When considering the safety exit, the center point of the safety exit and the eight points around it are screened out, the points outside the boundary are removed, and the initial clustering points are determined according to the preset second distance condition.

[0052] The first distance condition is: 1) the distance between the initial cluster point and the boundary is: 30m±a, a is an adjustment parameter, which can be set according to the actual situation; 2) the distance between the initial cluster points is: 60m±b, b is an adjustment parameter, which can be set according to the actual situation. The second distance condition is that the distance between the initial cluster points is not less than 15m.

[0053] For the case where the emergency exit is not considered, the boundary sampling method is used: first, the inner contour line of the building's outer wall is extracted, and points are evenly selected as initial clustering points according to the first distance condition, such as Figure 3 As shown, Figure 3 Schematic diagram of the initial cluster point determination results without considering the safety exit.

[0054] For the case of considering the safety exit, locate the center coordinates of all safety exits, extract the point where it is located and the 8 points around it, then remove the invalid points outside the building boundary, and then take the safety exit group as the center and radiate outward according to the second distance condition to obtain the final initial clustering points, such as Figure 4As shown Figure 4 Schematic diagram of the determination result of the initial clustering points considering the safety exits

[0055] 203. Calculate the required number of target fire compartments according to the total area of the target site and the preset area standard of the fire compartment

[0056] Obtain the total area of the target site and the preset area standard of the fire compartment. Divide the total area of the target site by the area standard of the fire compartment. If it is divisible, the quotient obtained is the number of target fire compartments. If it is not divisible, round up the quotient obtained, and the resulting integer is the number of target fire compartments

[0057] Query the "Code for Fire Protection Design of Buildings" GB50016 according to the building use nature to determine the corresponding maximum allowable area standard of the fire compartment. For example, the maximum allowable area of a fire compartment for a first-class high-rise office building is 1,500 square meters, and for a commercial business hall is 2,000 square meters. In addition, in the case of an automatic sprinkler system, the area is controlled below 4,000 square meters. Divide the effective area of each floor by the upper limit of the applicable partition area of this floor, and round up the resulting quotient value to obtain the theoretical number of partitions. Special treatment is carried out for special spaces. When the atrium area exceeds 30% of the code limit value, 1 independent partition is automatically added, and the through-height area is calculated by accumulating the vertical projection area. At the same time, considering the factor of the building plane shape, when the aspect ratio of the building length to width exceeds 3:1, additional partition numbers are added on the basis of the calculation result to ensure compliance with the evacuation distance. The final output number of target fire compartments needs to meet the dual objectives of area control and evacuation path optimization, and generate a recommended value of the number of partitions for each floor separately

[0058] 204. Select any point from the first candidate clustering point set as the initial clustering center

[0059] 205. Based on the distance constraint and the distribution optimization condition, sequentially select new clustering center points from the remaining first candidate clustering points, where each newly selected point needs to satisfy that the minimum distance from the selected clustering center point is greater than the preset threshold

[0060] Calculate the minimum distance between each remaining first candidate clustering point and the selected clustering center; screen out the second candidate clustering point set with the minimum distance greater than the preset threshold; select the point with the smallest overall clustering center spatial distribution variance from the second candidate clustering point set as the new clustering center point

[0061] Establish the spatial distribution matrix of the selected cluster centers, calculate the Euclidean distances between each remaining candidate point and all the selected centers, and generate a set of minimum distance values; Dynamically set the distance threshold according to the fire compartment area standard, and the value of this threshold can be 1.2 times the square root of the maximum allowable area of the fire compartment, which is determined according to the actual situation specifically to ensure a reasonable distance between the new centers and the existing centers; Screen out all candidate points that meet the condition that the minimum distance is greater than the threshold through parallel computing to form a second candidate cluster point set; Implement spatial distribution optimization analysis for this set, calculate the overall center point distribution variance after each candidate point is added, and adopt the k-d tree spatial index structure to accelerate the nearest neighbor search process; Select the candidate point that can minimize the overall center point spatial distribution variance as the new added cluster center, and this selection process comprehensively considers the uniformity of the center point distribution and the characteristics of the building function partition. After each new center point is added, update the spatial distribution matrix in real time and recalculate the minimum distance values of the remaining candidate points; For special functional areas such as the front room of the fire elevator and the safety exit, set distance weight coefficients, and preferentially select candidate points close to these key positions on the premise of meeting the basic distance constraints. The entire selection process adopts an iterative optimization strategy, and through multiple rounds of calculation and verification, ensure that the finally determined cluster center point set simultaneously meets the three core requirements of spatial distribution uniformity, fire compartment area control, and building function adaptability.

[0062] 206. Iteratively select the cluster center points until the preset target number of fire compartments is reached, and after performing connectivity verification, output the final cluster point scheme that meets the conditions;

[0063] Check whether the current number of selected center points has reached the target number of fire compartments. If not, continue the iterative selection process; Recalculate the minimum distances between the remaining candidate points and the selected centers during each iteration, use spatial index optimization to accelerate distance queries, and screen out the candidate point set that meets the minimum distance constraint; By calculating the global spatial distribution uniformity index after the candidate points are added, select the newly added point that makes the center point spatial distribution the most balanced; After each new center point is added, immediately perform connectivity verification, and use the breadth-first search algorithm to check whether the potential partition with this point as the core meets the spatial connectivity requirements, and eliminate candidate points that will cause partition breaks; When the number of center points reaches the target number of fire compartments, perform the final overall connectivity check to ensure that each center point can form an effective fire compartment.

[0064] Different initial cluster center points can generate different cluster point schemes, as shown in Figure 5, Figure 5 are schematic diagrams of different cluster point schemes.

[0065] 207. Based on the cluster point scheme and the K-Means clustering algorithm, generate initial cluster clusters according to the distances from each firewall grid to each cluster center point, and perform multiple rounds of cyclic clustering on the initial cluster clusters to generate preliminary fire compartment results;

[0066] Based on the clustering point scheme and the K-Means clustering algorithm, calculate the X-axis distance and Y-axis distance from the center point of each grid to the center point of each cluster, and take the larger value of the two as the final distance value, so as to perform clustering processing.

[0067] Partitioning is achieved through the K-Means clustering algorithm. The specific process is as follows: Taking the center point of the cluster in the clustering point scheme as the benchmark, for each firewall grid, calculate the absolute distances between its geometric center and each cluster center point in the X-axis and Y-axis directions, and select the larger value of the two as the target distance from the grid to the cluster center point; Divide each grid into the cluster to which the nearest cluster center point belongs to complete the initial clustering cluster division; Subsequently, iterate and update: Recalculate the median or mean of the X / Y coordinates of all grid center points within each cluster as the new cluster center, and repeat the above distance calculation and grid assignment process until the cluster center no longer changes or reaches the iteration termination condition. The finally generated clustering cluster is the preliminary fire prevention partition result. The number of times of clustering in this clustering loop process is generally 30 - 50 times, depending on the actual situation.

[0068] In the process of generating the preliminary fire prevention partition result, due to different selection strategies for the cluster center point and the adjustment of the distance calculation method, the system will naturally generate multiple feasible partition schemes, such as Figure 6 shown Figure 6 which is a schematic diagram of multiple feasible partition schemes.

[0069] 208. Adjust the boundary grids according to the preliminary fire prevention partition result to generate multiple partition adjustment schemes;

[0070] Check the connectivity of the grids within each fire prevention partition; If the number of connected groups of grids within the fire prevention partition is greater than one, then change the overall attribution of the non-maximum connected group to the adjacent partition; Calculate and compare the areas of each fire prevention partition, and make appropriate adjustments to the boundary grids of the partitions with significant area differences to achieve the equalization of the partition areas, so as to obtain multiple partition adjustment schemes.

[0071] After the initial fire compartmentalization results are generated, first perform connectivity detection on each fire compartment. Use the breadth-first search algorithm to traverse all grids within the compartment and identify whether there are unconnected sub-regions. If multiple independent connected groups are found within the compartment, retain the connected group with the largest area, and incorporate the remaining sub-regions into the nearest adjacent compartment as a whole to ensure the spatial continuity of each fire compartment. Subsequently, perform area balance optimization. Calculate the average area D of all compartments and mark the compartments with areas exceeding the D±c threshold. For example, c is 20%, which can be adjusted according to the actual situation. For compartments with too small an area, search for adjacent grids that can be incorporated from their boundaries, and preferentially select grids that are closely connected to the current compartment and have a moderate area contribution for expansion. For compartments with too large an area, screen grids at their edges that can be adjusted to adjacent compartments to ensure that the areas of all compartments tend to be balanced after adjustment.

[0072] A dynamic priority mechanism can be introduced during the adjustment process: 1) The grids around the safety exits remain fixed to avoid affecting the evacuation path; 2) The grid ownership of key areas such as equipment rooms and driveways is preferentially maintained as originally allocated; 3) For boundary smoothing, use morphological closing operations to eliminate jagged edges and make the firewall path more regular.

[0073] 209. Compare multiple compartment adjustment plans to select the optimal fire compartment plan as the target fire compartment plan.

[0074] Score the compartment area, evacuation distance, number of evacuation exits, and number of occupied parking spaces for each compartment plan; calculate based on the preset weight coefficients and the scoring results of the compartment area, evacuation distance, and number of evacuation exits for each compartment plan to obtain the total score for each compartment plan; select the plan with the highest total score as the optimal fire compartment plan.

[0075] For example, for each fire compartment plan, use a linear scoring function for multi-dimensional quantitative evaluation. First, calculate the compartment area score (weight 40%): If the areas of all compartments in the plan are ≤4000㎡, get 100 points; if half of them exceed the limit, get 0 points; for other cases, score by linear interpolation according to the exceeding ratio. Secondly, evaluate the evacuation distance score (weight 30%): If the evacuation distance of all compartments is ≤60m, get 100 points; if half of them exceed the limit, get 0 points; calculate according to the linear ratio for the intermediate state. The evacuation exit number score (weight 20%) is based on the benchmark that each compartment has ≥2 evacuation exits as full marks. If half of them do not meet the standard, get 0 points, and the rest are converted according to the ratio. Finally, count the occupied parking space number score (weight 10%): If there are zero occupied spaces at the compartment boundary, get 100 points; if the occupied parking spaces reach 10% of the total, get 0 points, and the intermediate value is linearly mapped. After multiplying the scores of each dimension by the corresponding weights and accumulating them, select the plan with the highest total score as the optimal solution to ensure an overall optimal layout with reasonable area, efficient evacuation, and minimal functional impact while meeting the specifications.

[0076] During the boundary adjustment process, since different adjustment strategies are adopted for connectivity optimization and area equalization, the system will generate multiple fire compartment schemes that meet the specifications but have different layouts. For example, Figure 7 as shown Figure 7 in, are multiple fire compartment adjustment schemes generated during the boundary adjustment process; these schemes differ in terms of compartment shape, key area division, and boundary regularity, providing diverse options for scheme comparison. The schematic diagram of the target fire compartment scheme obtained after scoring and optimization is shown in Figure 8 as shown Figure 8 in, which is the schematic diagram of the target fire compartment scheme of the boundary adjustment result.

[0077] In the embodiments of the present invention, by obtaining the target site information and meshing it to obtain the firewall grid, calculating the number of target fire compartments based on the total area of the target site and the fire compartment area standard, and then generating the preliminary fire compartment result through conditional selection of the final clustering point scheme, generating multiple feasible compartment schemes, and then performing boundary grid adjustment to generate multiple compartment adjustment schemes and comparing and selecting the optimal scheme, not only avoids the problems of unreasonable compartment division and irregular boundaries caused by manual division, realizes reasonable compartment division, but also combines multiple scheme comparisons, effectively improving the efficiency and quality of fire compartment generation.

[0078] The method for generating a fire compartment in the embodiments of the present invention has been described above. Next, the device for generating a fire compartment in the embodiments of the present invention will be described. Please refer to Figure 9 In an embodiment of the device for generating a fire compartment in the embodiments of the present invention, it includes:

[0079] A meshing module 901, configured to obtain target site information, perform meshing processing on the target site according to the target site information to obtain a firewall grid, and the sides of the firewall grid are all positions where firewalls can be arranged;

[0080] A determination module 902, configured to determine initial clustering points to obtain a first candidate clustering point set;

[0081] A selection module 903, configured to select points with the preset number of target fire compartments from the first candidate clustering point set as the clustering point scheme;

[0082] A first generation module 904, configured to generate initial clustering clusters based on the clustering point scheme and the K-Means clustering algorithm, and perform multiple rounds of cyclic clustering on the initial clustering clusters to generate a preliminary fire compartment result;

[0083] A second generation module 905, configured to perform boundary grid adjustment according to the preliminary fire compartment result and generate a target fire compartment scheme.

[0084] In an embodiment of the present invention, by obtaining target site information, the target site is grid-processed according to the target site information to obtain a firewall grid. The sides of the firewall grid are all positions where firewalls can be arranged. Initial clustering points are determined to obtain a first candidate clustering point set. Points with a preset number of target fire prevention zones are selected from the first candidate clustering point set as a clustering point scheme. Based on the clustering point scheme and the K-Means clustering algorithm, initial clustering clusters are generated according to the distance from each firewall grid to each clustering center point. The initial clustering clusters are subjected to multiple rounds of clustering to generate a preliminary fire prevention zone result. The boundary grids are adjusted according to the preliminary fire prevention zone result, and a target fire prevention zone scheme is generated, realizing a reasonable division of the zones and greatly improving the generation efficiency of the fire prevention zones at the same time.

[0085] Please refer to Figure 10 , another embodiment of the fire prevention zone generation device in the embodiment of the present invention includes:

[0086] A grid generation module 901, configured to obtain target site information, and perform grid processing on the target site according to the target site information to obtain a firewall grid, where the sides of the firewall grid are all positions where firewalls can be arranged;

[0087] A determination module 902, configured to determine initial clustering points to obtain a first candidate clustering point set;

[0088] A selection module 903, configured to select points with a preset number of target fire prevention zones from the first candidate clustering point set as a clustering point scheme;

[0089] A first generation module 904, configured to generate initial clustering clusters based on the clustering point scheme and the K-Means clustering algorithm, and perform multiple rounds of clustering on the initial clustering clusters to generate a preliminary fire prevention zone result;

[0090] A second generation module 905, configured to adjust boundary grids according to the preliminary fire prevention zone result and generate a target fire prevention zone scheme.

[0091] Optionally, the fire prevention zone generation device further includes:

[0092] A calculation module 906, configured to calculate the required number of target fire prevention zones according to the total area of the target site and a preset fire prevention zone area standard.

[0093] Optionally, the determination module 902 may specifically be used for:

[0094] Without considering the safety exits, according to the boundary of the target site, determine the initial clustering points according to the preset first distance condition; when considering the safety exits, screen out the central points of the safety exits and the 8 points around them, remove the points outside the boundary, and determine the initial clustering points according to the preset second distance condition.

[0095] Optionally, the selection module 903 includes:

[0096] The first selection unit 9031 is used to select any point from the first candidate clustering point set as the initial clustering center;

[0097] The second selection unit 9032 is used to sequentially select new clustering center points from the remaining first candidate clustering points based on the distance constraint and the distribution optimization condition, where the minimum distance between each newly selected point and the selected clustering center point needs to be greater than the preset threshold;

[0098] The output unit 9033 is used to iteratively select the clustering center points until the preset number of target fire prevention zones is reached, and after performing connectivity verification, output the final clustering point solution that meets the conditions.

[0099] Optionally, the second selection unit 9032 can specifically be used for:

[0100] Calculate the minimum distance between each remaining first candidate clustering point and the selected clustering center; screen out the set of second candidate clustering points whose minimum distance is greater than the preset threshold; select the point with the smallest overall variance of the clustering center space distribution from the set of second candidate clustering points as the new clustering center point.

[0101] Optionally, the second generation module 905 includes:

[0102] The generation unit 9051 is used to adjust the boundary grid according to the preliminary fire prevention zone result to generate multiple partition adjustment schemes;

[0103] The third selection unit 9052 is used to compare multiple partition adjustment schemes to select the optimal fire prevention zone scheme as the target fire prevention zone scheme.

[0104] Optionally, the generation unit 9051 can specifically be used for:

[0105] Check the connectivity of the grids within each fire prevention zone; if the number of connected groups of grids within the fire prevention zone is greater than one, then change the overall attribution of the non - largest connected group to the adjacent partition; calculate and compare the areas of each fire prevention zone, and make appropriate adjustments to the boundary grids of the partitions with significantly different areas to achieve the equalization of the partition areas, so as to obtain multiple partition adjustment schemes.

[0106] In the embodiments of the present invention, by obtaining the target site information and gridifying it to obtain the firewall grid, calculating the number of target fire prevention zones according to the total area of the target site and the area standard of the fire prevention zone, and then generating a preliminary fire prevention zone result through conditional selection of the final clustering point scheme to generate multiple feasible zoning schemes. Then, the boundary grid is adjusted to generate multiple zoning adjustment schemes and the optimal scheme is selected. This not only avoids the problems of unreasonable zoning and non-standard boundaries caused by manual division, realizes reasonable zoning, but also effectively improves the efficiency and quality of fire prevention zone generation by comparing multiple schemes.

[0107] Above Figure 9 and Figure 10 The fire prevention zone generation device in the embodiments of the present invention is described in detail from the perspective of modular functional entities. Below, the fire prevention zone generation device in the embodiments of the present invention is described in detail from the perspective of hardware processing.

[0108] Refer to Figure 11 As shown, the fire prevention zone generation device includes a processor 1100 and a memory 1101. The memory 1101 stores machine-executable instructions that can be executed by the processor 1100, and the processor 1100 executes the machine-executable instructions to implement the above-mentioned fire prevention zone generation method.

[0109] Furthermore, Figure 11 The shown fire prevention zone generation device further includes a bus 1102 and a communication interface 1103. The processor 1100, the communication interface 1103, and the memory 1101 are connected through the bus 1102.

[0110] Among them, the memory 1101 may include a high-speed random access memory (Random Access Memory, RAM), and may also include a non-volatile memory, for example, at least one disk memory. Through at least one communication interface 1103 (which can be wired or wireless), a communication connection between the system network element and at least one other network element is realized, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 1102 can be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 11 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0111] The processor 1100 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 1100 or the instructions in the form of software. The above-mentioned processor 1100 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 1101, and the processor 1100 reads the information in the memory 1101 and combines its hardware to complete the method steps of the foregoing embodiments.

[0112] The present invention also provides a fire compartment generation device. The computer device includes a memory and a processor. When the computer-readable instructions stored in the memory are executed by the processor, the processor executes the steps of the fire compartment generation method in the above-mentioned various embodiments.

[0113] The present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or the computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer executes the steps of the fire compartment generation method.

[0114] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0115] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0116] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of the present invention.

Claims

1. A method for generating a fire compartment, characterized in that, The fire compartment generation method includes: Obtain target site information, perform grid processing on the target site according to the target site information to obtain a firewall grid, and the sides of the firewall grid are all positions where firewalls can be arranged; Determine the initial clustering points to obtain the first candidate clustering point set; Select points with a preset number of target fire compartments from the first candidate clustering point set as the clustering point scheme; Based on the clustering point scheme and the K-Means clustering algorithm, generate initial clustering clusters according to the distance from each firewall grid to each clustering center point, and perform multiple cyclic clusterings on the initial clustering clusters to generate a preliminary fire compartment result; Perform boundary grid adjustment according to the preliminary fire compartment result and generate a target fire compartment scheme.

2. The fire compartment generation method according to claim 1, characterized in that, Before selecting points with a preset number of target fire compartments from the first candidate clustering point set as the clustering point scheme, it further includes: Calculate the required number of target fire compartments according to the total area of the target site and the preset fire compartment area standard.

3. The fire compartment generation method according to claim 1, wherein The determination of the initial clustering points includes: Without considering the safety exits, determine the initial clustering points according to the boundary of the target site according to the preset first distance condition; When considering the safety exits, screen out the center points of the safety exits and the 8 points around them, remove the points outside the boundary, and determine the initial clustering points according to the preset second distance condition.

4. The fire compartment generation method according to claim 1, characterized in that, The selection of points with a preset number of target fire compartments from the first candidate clustering point set as the clustering point scheme includes: Select any point from the first candidate clustering point set as the initial clustering center; Based on the distance constraint and the distribution optimization condition, sequentially select new clustering center points from the remaining first candidate clustering points, where each newly selected point needs to satisfy that the minimum distance from the selected clustering center point is greater than the preset threshold; Iteratively select the clustering center points until the preset number of target fire compartments is reached, and after performing connectivity verification, output the final clustering point scheme that meets the conditions.

5. The fire compartment generation method according to claim 4, wherein, The sequential selection of new clustering center points from the remaining candidate clustering points based on the distance constraint and the distribution optimization condition includes: Calculate the minimum distance between each remaining first candidate clustering point and the selected clustering center; Screen out the second candidate clustering point set with the minimum distance greater than the preset threshold; Select the point with the smallest overall spatial distribution variance of the clustering centers from the second candidate clustering point set as the new clustering center point.

6. The method for generating a fire compartment according to claim 1, characterized in that The performing of boundary grid adjustment according to the preliminary fire compartment result and generating a target fire compartment scheme includes: Perform boundary grid adjustment according to the preliminary fire compartment result to generate multiple partition adjustment schemes; Compare the multiple partition adjustment schemes to select the optimal fire compartment scheme as the target fire compartment scheme.

7. The fire compartment generation method according to claim 6, wherein The performing of boundary grid adjustment according to the preliminary fire compartment result to generate multiple partition adjustment schemes includes: Check the connectivity of the grids within each fire compartment; If the number of connected groups of grids within a fire compartment is greater than one, then change the overall attribution of the non-maximum connected group to the adjacent partition; Calculate and compare the areas of each fire compartment, and appropriately adjust the boundary grid for the compartments with significantly different areas to achieve the equalization of the compartment areas, thereby obtaining multiple compartment adjustment schemes.

8. A fire compartment generation device, characterized in that, The fire compartment generation device includes: A gridification module, configured to obtain target site information, perform gridification processing on the target site according to the target site information to obtain a firewall grid, and the sides of the firewall grid are all positions where firewalls can be arranged; A determination module, configured to determine initial clustering points to obtain a first candidate clustering point set; A selection module, configured to select points with a preset number of target fire compartments from the first candidate clustering point set as a clustering point scheme; A first generation module, configured to generate initial clustering clusters based on the clustering point scheme and the K-Means clustering algorithm according to the distance from each firewall grid to each clustering center point, and perform multiple cyclic clusterings on the initial clustering clusters to generate a preliminary fire compartment result; A second generation module, configured to adjust the boundary grid according to the preliminary fire compartment result and generate a target fire compartment scheme.

9. A fire compartment generation device, characterized in that, The fire compartment generation device includes: a memory and at least one processor, and instructions are stored in the memory; The at least one processor invokes the instructions in the memory so that the fire compartment generation device executes the fire compartment generation method according to any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that, When the instructions are executed by the processor, the fire compartment generation method according to any one of claims 1-7 is implemented.