Building fire extinguisher configuration calculation method
Through graph convolutional neural networks and reinforcement learning technology, the optimal layout plan for building fire extinguishers is generated, which solves the problem of scientific rationality of fire extinguisher configuration in large buildings and realizes efficient and intelligent fire extinguisher deployment.
Patent Information
- Application Number
- CN202510835808.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies make it difficult to scientifically and rationally configure fire extinguishers in complex and diverse large buildings. They are unable to effectively strike a balance between coverage, response time and configuration costs, and lack dynamic optimization capabilities.
Graph convolutional neural networks are used to extract the topological features of building spaces. Combined with the ST-DQN temporal decision-making mechanism and the A3C multi-threaded strategy optimization structure, the optimal fire extinguisher deployment plan is generated through graph structure modeling, graph convolution feature extraction, temporal strategy generation and asynchronous reinforcement learning optimization.
It significantly improves the spatial rationality and configuration efficiency of fire extinguisher layout, enhances the scientificity and intelligence level of building fire control, and ensures complete coverage and compliance with fire regulations.
Smart Images

Figure CN120706263A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building fire protection engineering, in particular to a method for calculating the configuration of building fire extinguishers. Background Art
[0002] In the field of building fire safety, fire extinguishers are key equipment for early-stage fire fighting. Their scientific and reasonable configuration plays a vital role in protecting people's lives, controlling the spread of fire, and reducing property losses. Currently, the configuration of fire extinguishers mainly relies on manual static distribution planning based on relevant specifications and standards. The process is usually based on a preliminary assessment of factors such as building area, functional use, evacuation distance, and risk level. Designers then arrange the locations of various types of fire extinguishers based on experience or reference drawings. This method has certain applicability in conventional buildings with a high degree of standardization. However, in large-scale building scenarios with complex structures, diverse functions, poor spatial connectivity, or frequent personnel flow, traditional methods often find it difficult to strike a balance between coverage, response time, and configuration costs, resulting in unsatisfactory actual application results.
[0003] In existing technologies, the placement of fire extinguishers is often done manually by annotating two-dimensional floor plans, lacking three-dimensional modeling and dynamic interactive analysis of building spatial structures. Especially in multi-story buildings, mixed-function buildings, and large transportation hubs, the traffic paths between different spatial nodes are complex, evacuation passages intersect, and floor connections are diverse. This makes it impossible to effectively reflect the actual risk distribution and emergency response paths by uniformly configuring them based solely on area or functional type. Some studies have attempted to introduce building information modeling (BIM) technology or geographic information systems (GIS) to achieve configuration visualization, but their focus is mostly on display effects, lacking deep integration with layout strategy optimization algorithms. They are unable to output optimal decisions based on environmental characteristics and are still highly dependent on the subjective judgment and accumulated experience of designers.
[0004] In the area of AI-assisted fire protection design, some existing methods employ supervised learning or heuristic search algorithms to assist in the generation of fire extinguisher placement plans. However, these methods are often limited to single-objective optimization within a fixed building model, failing to fully consider the dynamic topological structure of the building space and the coordinated adjustment of multiple strategies. They are also slow to respond to environmental changes and lack online adjustment and policy feedback mechanisms. Furthermore, existing methods fail to effectively integrate multi-dimensional information such as historical building fire alarm data and occupant activity density, resulting in insufficient adaptability of placement plans for high-risk areas and key protected areas, and an inability to dynamically optimize the matching of fire extinguisher types and placement locations.
[0005] In the field of reinforcement learning, although research has been applied to spatial decision-making problems such as path planning and logistics scheduling, the application of deep reinforcement learning mechanisms to building fire protection deployment decisions is still in its infancy. Traditional DQN-type methods have difficulty processing high-dimensional state inputs, suffer from slow training convergence and weak policy transfer, and have not designed a specific structure for optimizing strategies for time-dependent action sequences in building spaces. In addition, multi-threaded asynchronous optimization structures have not yet been deeply integrated with graph structure spatial representation, position encoding features, and action timing dependencies, making it difficult to meet the requirements of actual building deployment problems for high-dimensional, dynamic, and sequential strategy generation. Existing reinforcement learning frameworks lack the ability to integrate modeling of spatial topology, path accessibility, and personnel behavior patterns, resulting in poor strategy generalization and adaptability, making it difficult to promote and use in a variety of building types.
[0006] Therefore, how to provide a calculation method for building fire extinguisher configuration is a problem that technical personnel in this field urgently need to solve. Summary of the Invention
[0007] One purpose of the present invention is to propose a method for calculating the configuration of fire extinguishers in buildings. This method fully utilizes the ability of graph convolutional neural networks to represent the topological structure of building spaces, integrates the ST-DQN temporal decision-making mechanism and the A3C multi-threaded strategy optimization structure, and describes in detail the computational process for realizing intelligent layout optimization of fire extinguishers in complex building spaces. It has the advantages of comprehensive coverage, rapid response, stable strategy convergence, and strong interpretability of configuration schemes.
[0008] The method for calculating the configuration of fire extinguishers in a building according to an embodiment of the present invention includes the following steps:
[0009] S1. Collect the configuration data of building fire extinguishers and perform preprocessing;
[0010] S2. Divide the building space nodes according to the preprocessed configuration data, and construct directed weighted edges according to the passage paths between the nodes to form a graph structure that reflects the spatial connection relationship;
[0011] S3. Input the graph structure into a graph convolutional neural network to extract the topological features of the building space, and combine it with the position encoding to generate a node embedding representation as the state input of the reinforcement learning environment;
[0012] S4. Construct a temporal decision network integrating the ST-DQN structure, map the node embedding representation into a temporal action sequence with a fixed time step, and use the convolutional layer to capture the dependency between actions to generate a candidate configuration action set;
[0013] S5. Use the A3C algorithm to build a multi-threaded parallel policy network and value network, perform policy scoring and value estimation on the candidate configuration action set, and synchronously optimize the parameters of the policy network and value network through an asynchronous gradient update mechanism;
[0014] S6. Based on the strategy scoring and value estimation results, high-value actions are selected to form an optimized configuration sequence, and the strategy is updated through the experience replay mechanism to achieve the optimal selection of configuration actions;
[0015] S7. Draw the layout plan of the building fire extinguishers according to the optimized configuration sequence, mark the specific layout location coordinates and fire extinguisher types, and ensure that the coverage area is complete and complies with the fire protection layout specifications.
[0016] Optionally, the configuration data includes building layout diagram, historical fire alarm records, fire extinguisher type identification, access path, floor structure information and personnel activity density.
[0017] Optionally, the preprocessing includes denoising, normalization, missing value filling, structured coding and timestamp alignment.
[0018] Optionally, the S2 specifically includes:
[0019] S21. Extract the building layout diagram based on the pre-processed configuration data and divide the building space into multiple non-overlapping spatial node sets N = {n1, n2, ..., n K}, where n k ∈N represents the kth spatial node, K represents the total number of spatial nodes, and all spatial nodes physically constitute a complete building structure unit;
[0020] S22, based on the traffic relationship between spatial nodes, construct a directed edge set E = {e ij ∣n i →n j}, where e ij Represents the node n from space i To spatial node n j the passage path;
[0021] S23. Calculate the edge weight matrix W based on the traffic path information and personnel activity density information in the configuration data. The edge weight is defined by the following formula:
[0022] w ij =α·d ij +β·p ij ;
[0023] Among them, w ij Represents the node n from space i To spatial node n j The edge weight of the pass, α represents the distance weight coefficient, β represents the density weight coefficient, d ij Represents the node n from space i To spatial node n j The shortest travel distance, pij It represents the average activity density of people per unit area on the passage;
[0024] S24. Based on the spatial node set N, the directed edge set E and the edge weight matrix W, a graph structure is constructed.
[0025] Optionally, the S3 specifically includes:
[0026] S31, input the spatial node set N, directed edge set E, and edge weight matrix W in the graph structure into the graph convolutional neural network, and construct the adjacency matrix A = [a ij ], where when there is an edge e ij When a ij =1, otherwise a ij =0;
[0027] S32, for each spatial node n k Construct position encoding vector l k , denoted as l k =[f k ,x k ,y k ,z k ], where f k Represents node n k Floor number, x k 、y k 、z k Represents node n k The three-dimensional coordinate position in the building's local coordinate system;
[0028] S33. Based on the graph convolutional neural network structure, the topological features of the building space are extracted and the node embedding representation matrix H is calculated. The calculation formula is as follows:
[0029]
[0030] Among them, h k Represents node n k The embedded feature vector, σ represents the activation function, a kj represents the element in the kth row and jth column of the adjacency matrix, w kj represents the element in row k and column j of the edge weight matrix, l j Represents node n j The position encoding vector of , U represents the trainable weight matrix for feature transformation, and K represents the total number of spatial nodes;
[0031] S34. The node embedding representation matrix H is used as the state input of the reinforcement learning environment to construct a temporal policy network for fire extinguisher configuration actions.
[0032] Optionally, step S4 specifically includes:
[0033] S41. Input the node embedding representation matrix H into the one-dimensional convolutional layer, perform time step expansion on the embedded feature vector of each node, and construct the time series state matrix S = [s1, s2, ..., s t ,...,s T ], where T represents the fixed time step of the timing state, s t =φ(h k ,t),h k Represents node n k The embedded feature vector of , t represents the time step, φ represents the position-aware mapping function, and the temporal state of the node at each moment is constructed;
[0034] S42. Construct a temporal convolution unit consisting of a one-dimensional convolution layer and a residual connection, perform local dependency extraction on the temporal state matrix S, and obtain an intermediate feature matrix F = [f1, f2, ..., f T ], where f t The intermediate feature vector at time step t is used to represent the sequence association information between actions;
[0035] S43, build a temporal decision network integrating ST-DQN structure, receive the intermediate feature matrix F and output the candidate configuration action set A = [a1, a2, ..., a T ], the candidate configuration action is calculated using the following formula:
[0036]
[0037] Among them, ψ represents the activation function, ω t,k represents the position-dependent attention coefficient, which is used to measure the feature weight of time step t to time step k, f k represents the intermediate feature vector of time step k, V represents the feature mapping matrix, b represents the bias vector, a t Represents the candidate configuration action vector at time step t and constitutes the candidate configuration action set A.
[0038] Optionally, the S5 specifically includes:
[0039] S51, use the A3C algorithm to build a multi-threaded parallel strategy network and value network, perform strategy scoring and value estimation on the candidate configuration action set A respectively, and set the strategy scoring result as the probability vector P = [p1, p2, ..., p T ], the value estimation result is a scalar sequence V = [v1,v2,…,v T ], where p t ∈P represents action a t The probability of being selected, v t ∈V represents action a tThe corresponding state value under the current strategy;
[0040] S52. Build an asynchronous gradient update mechanism to calculate the local loss function in each thread and accumulate the global network parameter gradient. Use the following asynchronous update formula:
[0041]
[0042] Among them, Δθ represents the update gradient of network parameters, r t Indicates execution of action a t The immediate reward obtained after , λ represents the value discount coefficient, represents the gradient operation on the parameter θ, and γ represents the regularization weight of the value network;
[0043] S53. Synchronize the updated gradients Δθ calculated by all threads, uniformly update the weight parameters in the strategy network and the value network, and achieve a joint improvement in the performance of the multi-threaded strategy.
[0044] Optionally, the strategy scoring is based on a scoring network that integrates attention weighting and residual compression structure, and performs temporal correlation reinforcement calculation on the candidate configuration action set. The strategy scoring result is a normalized action selection probability vector; the value estimation adopts a dual-channel value network, combining historical state characteristics and current action feedback to perform value inversion estimation, and the value estimation result is a sequence of state benefit prediction values corresponding to each action.
[0045] Optionally, the S6 specifically includes:
[0046] S61. Jointly sort the candidate configuration action sets according to the strategy probability vector and the state value sequence, and select the top-ranked actions to form an optimized configuration sequence;
[0047] S62. Write the optimized configuration sequence into the experience replay cache in time step order, where each record contains the current time step state, action vector, immediate reward, next time step state, and action probability;
[0048] S63. Extract a fixed number of configuration sequence samples from the experience replay cache, perform reverse update of the parameters of the policy network and the value network, and complete the policy optimization of the configuration action.
[0049] Optionally, the S7 specifically includes:
[0050] S71. Extract the position code and fire extinguisher type code in the action vector corresponding to each time step in the optimized configuration sequence, and generate a corresponding layout coordinate set and equipment type set;
[0051] S72. Align the layout coordinate set with the building space node set, mark the specific fire extinguisher layout position in each space node, and generate a node-level layout information map;
[0052] S73. Based on the equipment type set and node-level layout information diagram, a complete building fire extinguisher layout plan is constructed, and structured information including the number, type, and layout coordinates of fire extinguishers in all spatial nodes is output, and the fire extinguisher configuration annotation of the building space is completed.
[0053] The beneficial effects of the present invention are:
[0054] First, by introducing a graph convolutional neural network to perform node division and edge weight modeling on the building space structure, the present invention can accurately extract the topological connection relationship of the space, and generate an embedded representation in combination with the position coding information, which significantly improves the modeling accuracy of the traffic relationship between multi-story, multi-channel, and multi-functional areas of the building, making the subsequent fire extinguisher layout design calculation have stronger spatial perception capabilities, and solving the problem that traditional methods cannot effectively express spatial accessibility and position dependence.
[0055] Secondly, this method integrates the ST-DQN structure's sequential policy network and the A3C parallel optimization mechanism, generating time-series action decisions based on spatial state inputs and capturing the dynamic dependencies between actions during fire extinguisher deployment. Furthermore, a multi-threaded asynchronous update mechanism improves the training efficiency and stability of the policy and value networks, enabling the configuration strategy to converge quickly and maintain good generalization capabilities even in large-scale building environments, addressing the instability and slow convergence of existing policy training methods.
[0056] Finally, the present invention screens high-value configuration actions by combining strategy scoring and value estimation results, and realizes continuous optimization of the strategy with the experience replay mechanism. It also draws specific layout coordinates and fire extinguisher types in a structured output manner, generating a fire extinguisher configuration plan with complete coverage, reasonable layout, and compliance with regulations, thereby effectively improving the scientificity and practicality of configuration decisions, and overcoming the limitations of traditional design that relies on manual experience and lacks dynamic response capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0058] Figure 1 This is a flow chart of the building fire extinguisher configuration calculation method proposed by the present invention;
[0059] Figure 2 This is a configuration action flow chart of the ST-DQN structure fusion of the building fire extinguisher configuration calculation method proposed in this invention;
[0060] Figure 3 Schematic diagram of the A3C algorithm strategy learning process for the building fire extinguisher configuration calculation method proposed in this invention. DETAILED DESCRIPTION
[0061] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0062] refer to Figure 1-3 ,The calculation method of building fire extinguisher configuration includes the following steps:
[0063] S1. Collect the configuration data of building fire extinguishers and perform preprocessing;
[0064] S2. Divide the building space nodes according to the preprocessed configuration data, and construct directed weighted edges according to the passage paths between the nodes to form a graph structure that reflects the spatial connection relationship;
[0065] S3. Input the graph structure into a graph convolutional neural network to extract the topological features of the building space, and combine it with the position encoding to generate a node embedding representation as the state input of the reinforcement learning environment;
[0066] S4. Construct a temporal decision network integrating the ST-DQN structure, map the node embedding representation into a temporal action sequence with a fixed time step, and use the convolutional layer to capture the dependency between actions to generate a candidate configuration action set;
[0067] S5. Use the A3C algorithm to build a multi-threaded parallel policy network and value network, perform policy scoring and value estimation on the candidate configuration action set, and synchronously optimize the parameters of the policy network and value network through an asynchronous gradient update mechanism;
[0068] S6. Based on the strategy scoring and value estimation results, high-value actions are selected to form an optimized configuration sequence, and the strategy is updated through the experience replay mechanism to achieve the optimal selection of configuration actions;
[0069] S7. Draw the layout plan of the building fire extinguishers according to the optimized configuration sequence, mark the specific layout location coordinates and fire extinguisher types, and ensure that the coverage area is complete and complies with the fire protection layout specifications.
[0070] By integrating graph structure modeling, graph convolution feature extraction, temporal strategy generation and asynchronous reinforcement learning optimization, this paper forms a complete set of intelligent layout design and calculation processes for building fire extinguishers. It can effectively improve the spatial rationality and configuration efficiency of fire extinguisher layout plans, and significantly enhance the scientificity and intelligence level of building fire control.
[0071] In this embodiment, the configuration data includes building layout, historical fire alarm records, fire extinguisher type identification, access path, floor structure information and personnel activity density.
[0072] This invention introduces multi-source heterogeneous data including building layout diagrams, historical fire records, and occupant density as input, providing a richer and more realistic contextual information foundation for subsequent graph structure construction and strategy optimization.
[0073] In this embodiment, the preprocessing includes denoising, normalization, missing value filling, structured coding and timestamp alignment.
[0074] The present invention ensures the integrity and consistency of the input data by performing preprocessing operations such as denoising, normalization, missing value filling and time alignment on the original data, providing an accurate and stable data foundation for graph structure construction and embedded expression calculation, and improving the computational stability of the overall model.
[0075] In this embodiment, S2 specifically includes:
[0076] S21. Extract the building layout diagram based on the pre-processed configuration data and divide the building space into multiple non-overlapping spatial node sets N = {n1, n2, ..., n K}, where n k ∈N represents the kth spatial node, K represents the total number of spatial nodes, and all spatial nodes physically constitute a complete building structure unit;
[0077] S22, based on the traffic relationship between spatial nodes, construct a directed edge set E = {e ij ∣n i →n j}, where e ij Represents the node n from space i To spatial node n j the passage path;
[0078] S23. Calculate the edge weight matrix W based on the traffic path information and personnel activity density information in the configuration data. The edge weight is defined by the following formula:
[0079] w ij =α·d ij +β·p ij ;
[0080] Among them, w ij Represents the node n from space i To spatial node n j The edge weight of the pass, α represents the distance weight coefficient, β represents the density weight coefficient, d ij Represents the node n from space i To spatial node nj The shortest travel distance, p ij It represents the average activity density of people per unit area on the passage;
[0081] S24. Based on the spatial node set N, the directed edge set E and the edge weight matrix W, a graph structure is constructed.
[0082] The present invention divides the building space into non-overlapping nodes and constructs directed weighted edges to form a spatial connection graph. It combines the traffic paths and personnel density to calculate the weight matrix, which truly expresses the physical accessibility and pedestrian flow characteristics of the building space structure, and solves the problem that the traditional two-dimensional layout method lacks spatial semantic expression.
[0083] In this embodiment, S3 specifically includes:
[0084] S31, input the spatial node set N, directed edge set E, and edge weight matrix W in the graph structure into the graph convolutional neural network, and construct the adjacency matrix A = [a ij ], where when there is an edge e ij When a ij =1, otherwise a ij =0;
[0085] S32, for each spatial node n k Construct position encoding vector l k , denoted as l k =[f k ,x k ,y k ,z k ], where f k Represents node n k Floor number, x k 、y k 、z k Represents node n k The three-dimensional coordinate position in the building's local coordinate system;
[0086] S33. Based on the graph convolutional neural network structure, the topological features of the building space are extracted and the node embedding representation matrix H is calculated. The calculation formula is as follows:
[0087]
[0088] Among them, h k Represents node n k The embedded feature vector, σ represents the activation function, a kj represents the element in the kth row and jth column of the adjacency matrix, w kj represents the element in row k and column j of the edge weight matrix, l j Represents node n jThe position encoding vector of , U represents the trainable weight matrix for feature transformation, and K represents the total number of spatial nodes;
[0089] S34. The node embedding representation matrix H is used as the state input of the reinforcement learning environment to construct a temporal policy network for fire extinguisher configuration actions.
[0090] This paper uses graph convolutional neural networks to extract the topological relationship between nodes and introduces position encoding to construct embedded expressions, effectively capturing the structural characteristics of the architectural space in a multi-dimensional coordinate system, providing semantically rich and structure-sensitive state input for the policy network, and improving the spatial accuracy of policy learning.
[0091] In this embodiment, step S4 specifically includes:
[0092] S41. Input the node embedding representation matrix H into the one-dimensional convolutional layer, perform time step expansion on the embedded feature vector of each node, and construct the time series state matrix S = [s1, s2, ..., s t ,...,s T ], where T represents the fixed time step of the timing state, s t =φ(h k ,t),h k Represents node n k The embedded feature vector of , t represents the time step, φ represents the position-aware mapping function, and the temporal state of the node at each moment is constructed;
[0093] S42. Construct a temporal convolution unit consisting of a one-dimensional convolution layer and a residual connection, perform local dependency extraction on the temporal state matrix S, and obtain an intermediate feature matrix F = [f1, f2, ..., f T ], where f t The intermediate feature vector at time step t is used to represent the sequence association information between actions;
[0094] S43, build a temporal decision network integrating ST-DQN structure, receive the intermediate feature matrix F and output the candidate configuration action set A = [a1, a2, ..., a T ], the candidate configuration action is calculated using the following formula:
[0095]
[0096] Among them, ψ represents the activation function, ω t,k represents the position-dependent attention coefficient, which is used to measure the feature weight of time step t to time step k, f k represents the intermediate feature vector of time step k, V represents the feature mapping matrix, b represents the bias vector, a t Represents the candidate configuration action vector at time step t and constitutes the candidate configuration action set A.
[0097] The present invention adopts the ST-DQN structure to design a temporal decision network, integrates the time series action dependency and the attention mechanism, and generates a candidate configuration action sequence with temporal continuity and structural specificity, which significantly improves the strategic expression ability of the fire extinguisher deployment in dynamic spatial layout.
[0098] In this embodiment, the S5 specifically includes:
[0099] S51, use the A3C algorithm to build a multi-threaded parallel strategy network and value network, perform strategy scoring and value estimation on the candidate configuration action set A respectively, and set the strategy scoring result as the probability vector P = [p1, p2, ..., p T ], the value estimation result is a scalar sequence V = [v1,v2,…,v T ], where p t ∈P represents action a t The probability of being selected, v t ∈V represents action a t The corresponding state value under the current strategy;
[0100] S52. Build an asynchronous gradient update mechanism to calculate the local loss function in each thread and accumulate the global network parameter gradient. Use the following asynchronous update formula:
[0101]
[0102] Among them, Δθ represents the update gradient of network parameters, r t Indicates execution of action a t The immediate reward obtained after , λ represents the value discount coefficient, represents the gradient operation on the parameter θ, and γ represents the regularization weight of the value network;
[0103] S53. Synchronize the updated gradients Δθ calculated by all threads, uniformly update the weight parameters in the strategy network and the value network, and achieve a joint improvement in the performance of the multi-threaded strategy.
[0104] The present invention constructs a multi-threaded parallel strategy network and value network based on the A3C algorithm, and realizes efficient strategy training and stable convergence through an asynchronous gradient update mechanism, effectively solving the problems of high action space dimension and slow training convergence in complex building environments.
[0105] In this embodiment, the strategy scoring is based on a scoring network that integrates attention weighting and residual compression structure, and performs time-series correlation reinforcement calculation on the candidate configuration action set. The strategy scoring result is a normalized action selection probability vector; the value estimation adopts a dual-channel value network, combining historical state characteristics and current action feedback to perform value inversion estimation, and the value estimation result is a sequence of state benefit prediction values corresponding to each action.
[0106] The strategy scoring of the present invention introduces an attention weighting mechanism to strengthen the action correlation calculation, and the value estimation combines the current state and historical feedback to perform dual-channel prediction, which enhances the sensitivity of the strategy network to local changes in complex spatial structures and improves the decision-making accuracy of the deployment strategy.
[0107] In this embodiment, S6 specifically includes:
[0108] S61. Jointly sort the candidate configuration action sets according to the strategy probability vector and the state value sequence, and select the top-ranked actions to form an optimized configuration sequence;
[0109] S62. Write the optimized configuration sequence into the experience replay cache in time step order, where each record contains the current time step state, action vector, immediate reward, next time step state, and action probability;
[0110] S63. Extract a fixed number of configuration sequence samples from the experience replay cache, perform reverse update of the parameters of the policy network and the value network, and complete the policy optimization of the configuration action.
[0111] The present invention forms a configuration sequence by jointly sorting and screening high-value actions, and combines the experience replay mechanism to perform strategy updates, thereby achieving controllable iterative optimization of the configuration strategy and effectively improving the stability and continuous learning ability of the deployment plan.
[0112] In this embodiment, the S7 specifically includes:
[0113] S71. Extract the position code and fire extinguisher type code in the action vector corresponding to each time step in the optimized configuration sequence, and generate a corresponding layout coordinate set and equipment type set;
[0114] S72. Align the layout coordinate set with the building space node set, mark the specific fire extinguisher layout position in each space node, and generate a node-level layout information map;
[0115] S73. Based on the equipment type set and node-level layout information diagram, a complete building fire extinguisher layout plan is constructed, and structured information including the number, type, and layout coordinates of fire extinguishers in all spatial nodes is output, and the fire extinguisher configuration annotation of the building space is completed.
[0116] The present invention extracts coordinate information and equipment types from actions, combines node-level layout alignment with structured information output, and realizes the visualization, traceability, and verifiability of building fire extinguisher layout results, thereby improving the practicality and standard adaptability of the final configuration plan.
[0117] Example 1:
[0118] To verify the feasibility of the present invention in practice, the present invention was applied to the intelligent deployment of fire extinguishers in a multifunctional public building. The building is a comprehensive building with five floors above ground and one floor underground. It contains functional spaces such as office areas, dining areas, conference centers, power equipment rooms, underground garages, and multifunctional exhibition halls. The building has a complex structure and dense personnel flow. There are significant functional differences and traffic complexity between spaces. Traditional fire extinguisher deployment methods mainly make rough deployments based on area and function, failing to take into account evacuation routes, personnel density, accessibility, and fire coverage efficiency. This can easily lead to insufficient number of fire extinguishers in certain high-risk areas and redundant deployment in some low-risk areas, resulting in both resource waste and safety hazards.
[0119] In this example, the system first inputs the building's CAD architectural drawings, historical fire alarm records, floor function divisions, power distribution, crowd activity heat maps, and existing fire extinguisher layout data. Subsequently, a total of 328 non-overlapping spatial nodes are identified based on the building structure and traffic paths, and a spatial connectivity graph containing 1,416 directed edges is constructed. Edge weights are calculated by weighting spatial geometric distances and the average occupancy density per unit area. Based on this, an adjacency matrix and edge weight matrix are constructed. These are then fed into a graph convolutional neural network to extract topological features. Position encodings are generated by combining the node's floor number and local coordinates, ultimately forming a 328×64 node embedding matrix as the state input.
[0120] During the policy generation phase, the node embedding matrix is expanded into a fixed-time state sequence. An intermediate feature representation is constructed using a one-dimensional convolutional structure, and then combined with the ST-DQN architecture to generate an action sequence. Each action consists of a three-dimensional coordinate, a target node ID, and an encoding of the recommended fire extinguisher type. The policy network and value network are trained in parallel using the A3C algorithm, achieving convergence after 500,000 training epochs. The final policy output is stable and covers the complete set of configuration actions. The optimized action sequence is then generated by jointly filtering the policy score and value estimate.
[0121] The resulting configuration was compared with current standards, and a structured layout output file was automatically generated. The proposed layout plan recommended adding six ABC dry powder fire extinguishers in the underground garage, optimizing their placement near the corner between the main driveway exit and the elevator shaft; adding two carbon dioxide fire extinguishers in the corridor connecting the power distribution room and the conference area; and reallocating the distance between overlapping fire extinguishers in the original layout on the third floor of the office area to ensure that the distance from any point to the nearest fire extinguisher was no more than 12 meters. Furthermore, the system identified four blind spots in the original layout and compared the response efficiency of the optimized plan using simulated evacuation routes.
[0122] Experimental results show that after adopting the configuration method described in this invention, the average accessibility of fire extinguishers per spatial node in the building increased by 18.3%, the spatial coverage overlap decreased by 23.5%, and the average response path in densely populated areas was shortened by 6.8 meters. The total number of fire extinguishers deployed was reduced by 4.1% compared to the original plan, but the coverage rate increased to 99.2%. The response time to simulated sudden fires was shortened by 14.6%, and the average emergency response time for multiple fires was controlled within 95 seconds, which is lower than the 120-second threshold recommended by fire protection design. This significantly improves the efficiency and actual effectiveness of building fire extinguisher configuration.
[0123] Table 1 Comparative data before and after optimization of building fire extinguisher layout (partial excerpt)
[0124]
[0125] This embodiment verifies that the present invention can optimize the efficiency and deployment of fire extinguishers while ensuring compliance with fire regulations, significantly improve fire safety response capabilities, and meet the actual needs of intelligent deployment in complex building scenarios.
[0126] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for calculating the configuration of fire extinguishers in a building, characterized in that: The steps include: S1. Collect the configuration data of building fire extinguishers and perform preprocessing; S2. Divide the building space nodes according to the preprocessed configuration data, and construct directed weighted edges according to the passage paths between the nodes to form a graph structure that reflects the spatial connection relationship; S3. Input the graph structure into a graph convolutional neural network to extract the topological features of the building space, and combine it with the position encoding to generate a node embedding representation as the state input of the reinforcement learning environment; S4. Construct a temporal decision network integrating the ST-DQN structure, map the node embedding representation into a temporal action sequence with a fixed time step, and use the convolutional layer to capture the dependency between actions to generate a candidate configuration action set; S5. Use the A3C algorithm to build a multi-threaded parallel policy network and value network, perform policy scoring and value estimation on the candidate configuration action set, and synchronously optimize the parameters of the policy network and value network through an asynchronous gradient update mechanism; S6. Based on the strategy scoring and value estimation results, high-value actions are selected to form an optimized configuration sequence, and the strategy is updated through the experience replay mechanism to achieve the optimal selection of configuration actions; S7. Draw the layout plan of the building fire extinguishers according to the optimized configuration sequence, mark the specific layout location coordinates and fire extinguisher types, and ensure that the coverage area is complete and complies with the fire protection layout specifications.
2. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The configuration data includes building layout, historical fire alarm records, fire extinguisher type identification, access paths, floor structure information and personnel activity density.
3. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The preprocessing includes denoising, normalization, missing value filling, structured coding and timestamp alignment.
4. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The S2 specifically includes: S21. Extract the building layout diagram based on the pre-processed configuration data and divide the building space into multiple non-overlapping spatial node sets N = {n1, n2, ..., n K }, where n k ∈N represents the kth spatial node, K represents the total number of spatial nodes, and all spatial nodes physically constitute a complete building structure unit; S22, based on the traffic relationship between spatial nodes, construct a directed edge set E = {e ij ∣n i →n j }, where e ij Represents the node n from space i To spatial node n j the passage path; S23. Calculate the edge weight matrix W based on the traffic path information and personnel activity density information in the configuration data. The edge weight is defined by the following formula: w ij =α·d ij +β·p ij ; Among them, w ij Represents the node n from space i To spatial node n j The edge weight of the pass, α represents the distance weight coefficient, β represents the density weight coefficient, d ij Represents the node n from space i To spatial node n j The shortest travel distance, p ij It represents the average activity density of people per unit area on the passage; S24. Based on the spatial node set N, the directed edge set E and the edge weight matrix W, a graph structure is constructed.
5. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The S3 specifically includes: S31, input the spatial node set N, directed edge set E, and edge weight matrix W in the graph structure into the graph convolutional neural network, and construct the adjacency matrix A = [a ij ], where when there is an edge e ij When a ij =1, otherwise a ij =0; S32, for each spatial node n k Construct position encoding vector l k , denoted as l k =[f k ,x k ,y k ,z k ], where f k Represents node n k Floor number, x k 、y k 、z k Represents node n k The three-dimensional coordinate position in the building's local coordinate system; S33. Based on the graph convolutional neural network structure, the topological features of the building space are extracted and the node embedding representation matrix H is calculated. The calculation formula is as follows: Among them, h k Represents node n k The embedded feature vector, σ represents the activation function, a kj represents the element in the kth row and jth column of the adjacency matrix, w kj represents the element in row k and column j of the edge weight matrix, l j Represents node n j The position encoding vector of , U represents the trainable weight matrix for feature transformation, and K represents the total number of spatial nodes; S34. The node embedding representation matrix H is used as the state input of the reinforcement learning environment to construct a temporal policy network for fire extinguisher configuration actions.
6. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The step S4 specifically includes: S41. Input the node embedding representation matrix H into the one-dimensional convolutional layer, perform time step expansion on the embedded feature vector of each node, and construct the time series state matrix S = [s1, s2, ..., s t ,...,s T ], where T represents the fixed time step of the timing state, s t =φ(h k ,t),h k Represents node n k The embedded feature vector of , t represents the time step, φ represents the position-aware mapping function, and the temporal state of the node at each moment is constructed; S42. Construct a temporal convolution unit consisting of a one-dimensional convolution layer and a residual connection, perform local dependency extraction on the temporal state matrix S, and obtain an intermediate feature matrix F = [f1, f2, ..., f T ], where f t The intermediate feature vector at time step t is used to represent the sequence association information between actions; S43, build a temporal decision network integrating ST-DQN structure, receive the intermediate feature matrix F and output the candidate configuration action set A = [a1, a2, ..., a T ], the candidate configuration action is calculated using the following formula: Among them, ψ represents the activation function, ω t,k represents the position-dependent attention coefficient, which is used to measure the feature weight of time step t to time step k, f k represents the intermediate feature vector of time step k, V represents the feature mapping matrix, b represents the bias vector, a t Represents the candidate configuration action vector at time step t and constitutes the candidate configuration action set A.
7. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The S5 specifically includes: S51, use the A3C algorithm to build a multi-threaded parallel strategy network and value network, perform strategy scoring and value estimation on the candidate configuration action set A respectively, and set the strategy scoring result as the probability vector P = [p1, p2, ..., p T ], the value estimation result is a scalar sequence V = [v1,v2,…,v T ], where p t ∈P represents action a t The probability of being selected, v t ∈V represents action a t The corresponding state value under the current strategy; S52. Build an asynchronous gradient update mechanism to calculate the local loss function in each thread and accumulate the global network parameter gradient. Use the following asynchronous update formula: Among them, Δθ represents the update gradient of network parameters, r t Indicates execution of action a t The immediate reward obtained after , λ represents the value discount coefficient, represents the gradient operation on the parameter θ, and γ represents the regularization weight of the value network; S53. Synchronize the updated gradients Δθ calculated by all threads, uniformly update the weight parameters in the strategy network and the value network, and achieve a joint improvement in the performance of the multi-threaded strategy.
8. The building fire extinguisher configuration calculation method according to claim 7, characterized in that: The strategy scoring is based on a scoring network that integrates attention weighting and residual compression structure, and performs time-series correlation reinforcement calculation on the candidate configuration action set. The strategy scoring result is a normalized action selection probability vector; the value estimation adopts a dual-channel value network, combining historical state characteristics and current action feedback to perform value inversion estimation. The value estimation result is a sequence of state benefit prediction values corresponding to each action.
9. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The S6 specifically includes: S61. Jointly sort the candidate configuration action sets according to the strategy probability vector and the state value sequence, and select the top-ranked actions to form an optimized configuration sequence; S62. Write the optimized configuration sequence into the experience replay cache in time step order, where each record contains the current time step state, action vector, immediate reward, next time step state, and action probability; S63. Extract a fixed number of configuration sequence samples from the experience replay cache, perform reverse update of the parameters of the policy network and the value network, and complete the policy optimization of the configuration action.
10. The building fire extinguisher configuration calculation method according to claim 1, characterized in that: The S7 specifically includes: S71. Extract the position code and fire extinguisher type code in the action vector corresponding to each time step in the optimized configuration sequence, and generate a corresponding layout coordinate set and equipment type set; S72. Align the layout coordinate set with the building space node set, mark the specific fire extinguisher layout position in each space node, and generate a node-level layout information map; S73. Based on the equipment type set and node-level layout information diagram, a complete building fire extinguisher layout plan is constructed, and structured information including the number, type, and layout coordinates of fire extinguishers in all spatial nodes is output, and the fire extinguisher configuration annotation of the building space is completed.