Intelligent dynamic guidance method based on multi-agent system
By employing an intelligent dynamic guidance method based on a multi-agent system, a hierarchical decision-making architecture is constructed, and a counterfactual experience replay pool is introduced. This solves the problems of decision lag and strategy rigidity in traditional emergency evacuation methods in complex fire environments, and achieves efficient and accurate global collaborative evacuation and dynamic path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YUANJIE ELECTRONICS
- Filing Date
- 2025-11-25
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional emergency evacuation methods are difficult to achieve efficient and accurate global coordinated evacuation and dynamic route planning when facing complex and ever-changing fire environments. They also rely on fixed plans and have delayed responses, making them unable to adapt to the rapidly changing needs of fire situations.
An intelligent dynamic guidance method based on a multi-agent system is adopted. By constructing a hierarchical decision architecture, combining a variational recurrent neural network, introducing a global decision layer and a counterfactual experience replay pool, the method can achieve accurate perception and dynamic guidance of the fire scene, generate the optimal evacuation decision intention, and select evacuation guidance actions through an ε-greedy strategy.
It significantly improves the efficiency and safety of evacuation guidance, enabling proactive planning and dynamic adjustment of globally optimal evacuation routes in complex fire environments. It overcomes the limitations of traditional methods and enhances the model's decision-making foresight and learning efficiency.
Smart Images

Figure CN121543641B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-agent system technology, and in particular to an intelligent dynamic guidance method based on multi-agent systems. Background Technology
[0002] With the increasing size and multifunctionality of urban buildings, and the continuously rising potential risks of sudden public safety incidents such as fires, traditional emergency evacuation guidance systems are facing severe challenges. In modern intelligent fire protection and public safety management, accurate perception of the fire scene and dynamic intelligent guidance of evacuees are core elements for maximizing the protection of people's lives and property and minimizing disaster losses. However, current emergency evacuation methods mostly rely on fixed evacuation signs, pre-set broadcast plans, or manual command by on-site personnel, resulting in passive and rigid guidance strategies. While these traditional methods can provide basic guidance under normal circumstances, they lack the ability to perceive and intelligently analyze complex scenarios such as fire spread and crowd dynamics, making them unsuitable for the emergency evacuation needs of modern buildings with complex internal structures, dense populations, and rapidly changing environments.
[0003] The main limitations of traditional emergency evacuation methods lie in their delayed decision-making and poor coordination. Existing methods typically rely on threshold alarms from single sensors such as smoke and heat detectors, or on remote manual analysis of monitoring footage to trigger fixed broadcast or audible / visual alarm commands. This results in long response chains and difficulty in accurately capturing the rapid evolution of fire conditions and crowd behavior. When on-site data exhibits multi-source, heterogeneous, nonlinear, and strongly coupled characteristics such as fire spread, smoke diffusion, and panicked crowd movement, the generalization and adaptability of traditional methods are severely limited. In particular, when faced with multi-dimensional dynamic data such as fire location, smoke concentration, population density, and movement direction, traditional rule-based judgment logic struggles to efficiently and accurately predict congestion and danger zones, leading to delayed guidance instructions, missed optimal evacuation opportunities, and serious threats to life safety.
[0004] Furthermore, traditional methods often overlook the inherent connection between global evacuation strategies and local agent execution during the decision-making process, making it difficult to comprehensively utilize the deep relationship between global optimal intent and local agent collaboration. For example, in large venues with multiple exits and complex passageways, traditional zoning guidance models cannot effectively integrate fire threats and crowd flow trends between different areas, leading to guidance decisions that often overlook specific aspects or even guide crowds to secondary danger zones or cause new congestion. Even when some methods introduce simple multi-agent frameworks, they fail to fully explore the guiding role of global decision intent on individual behavior, making it difficult to achieve efficient, accurate, and adaptive global collaborative evacuation and dynamic path planning, and thus unable to optimize evacuation efficiency in complex and ever-changing fire environments.
[0005] Therefore, how to provide an intelligent dynamic guidance method based on a multi-agent system is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] This invention proposes an intelligent dynamic guidance method based on a multi-agent system. By constructing a hierarchical decision-making architecture, this invention fundamentally upgrades the traditional QMIX model. Combined with a variational recurrent neural network, it can more accurately predict and guide the dynamic evacuation of people in emergencies such as fires. By introducing a global decision layer, the model is no longer limited to a passive response to local observations, but can actively extract the optimal evacuation decision intention from the macro-fire situation, achieving a leap from "local optimum" to "global optimum." Furthermore, this decision intention is used to dynamically generate the hybrid network weights of the team aggregation layer, enabling the collaboration mode of the guiding agent team to vary according to the evacuation intention, achieving contextualized collaboration under different fire situations, and significantly improving the efficiency and safety of evacuation guidance. In addition, this invention creatively improves the traditional temporal difference learning mechanism by introducing a counterfactual experience replay pool and a VRNN model. The model can not only learn from historical evacuation trajectories, but also model and predict the counterfactual question of "what will happen if different guidance actions are taken" through offline simulation, thereby exploring and identifying high-value evacuation strategies without any dangerous real-world trial and error. This method overcomes the limitations of traditional emergency evacuation methods, such as reliance on fixed plans, single guidance strategies, and delayed response, and provides an efficient and precise solution for intelligent emergency evacuation and collaborative management of large and complex public places.
[0007] An intelligent dynamic guidance method based on a multi-agent system according to an embodiment of the present invention includes the following steps:
[0008] S1. Collect fire scene data, construct an environmental macro-state summary tensor, and input it into the improved QMIX model;
[0009] S2. Based on the environmental macro-state summary tensor, the optimal evacuation decision intent tensor is extracted through global decision layer processing of the improved QMIX model.
[0010] S3. By using local sensors mounted on each agent, collect information on local pedestrian flow, fire situation, and the status of neighboring agents, and construct a local observation state tensor.
[0011] S4. Based on the local observation state tensor of each agent, the individual Q-value tensor is extracted through the individual decision layer of the improved QMIX model.
[0012] S5. Based on the optimal evacuation decision intent tensor and the individual Q-value tensors of all agents, the global team Q-value is calculated through the team aggregation layer of the improved QMIX model.
[0013] S6. Based on historical trajectory data, generate counterfactual states through a VRNN model, calculate temporal difference loss, and jointly optimize the parameters of the entire QMIX model;
[0014] S7. Based on the individual Q-value tensor, each agent adopts an ε-greedy strategy to select evacuation guidance actions, including voice broadcast commands and dynamic lighting adjustment commands.
[0015] Optionally, the fire scene data includes fire location, smoke concentration, personnel density, and pressure difference data.
[0016] Optionally, the improved QMIX model includes:
[0017] Global decision-making level, individual decision-making level, and team aggregation level;
[0018] The global decision-making layer includes multiple independent evacuation decision generators and a global scoring layer; the evacuation decision generator is composed of a single multilayer sensing machine; the global scoring layer includes a fire status coding tower and an evacuation intention coding tower; the fire status coding tower and the evacuation intention coding tower each correspond to an independent multilayer sensing machine;
[0019] The individual decision-making layer includes a feature encoding layer and an individual scoring layer; the feature encoding layer consists of two multilayer sensing mechanisms, corresponding to a local state encoding tower and a candidate guided action encoding tower, respectively; the individual scoring layer consists of a single multilayer sensing mechanism.
[0020] The team aggregation layer includes a hypernetwork and a hybrid network.
[0021] Optionally, S2 specifically includes:
[0022] S21. Input the environmental macro-state summary tensor into each evacuation decision generator in the global decision layer, perform linear processing through the fully connected layer of each evacuation decision generator, and output the candidate evacuation decision intent tensor.
[0023] S22. Input the environmental macro-state summary tensor and all candidate evacuation decision intent tensors into the global scoring layer;
[0024] S23. Based on the environmental macro-state summary tensor, linear processing is performed through multiple fully connected layers of the fire state coding tower of the global scoring layer to output the fire state embedding tensor.
[0025] S24. Based on the candidate evacuation decision intent tensor, perform linear processing through multiple fully connected layers of the evacuation intent encoding tower of the global scoring layer, and output the evacuation intent embedding tensor.
[0026] S25. For each candidate evacuation decision intent tensor, the evacuation intent embedding tensor and the fire status embedding tensor are multiplied element-wise, and then processed through multiple fully connected layers to output the Q value corresponding to the candidate evacuation decision intent tensor.
[0027] S26. Based on the Q value corresponding to each candidate evacuation decision intent tensor, select the candidate evacuation decision intent tensor with the largest Q value as the optimal evacuation decision intent tensor.
[0028] Optionally, the local sensors include image-type fire detectors, smoke sensors, temperature sensors, and personnel detection sensors; the local pedestrian flow status includes pedestrian flow direction, density, speed, flow conflict degree, and spatial distribution characteristics; the fire status includes fire source location, smoke concentration, temperature distribution, and fire spread trend; and the neighboring agent status includes the relative position, relative distance, relative speed, agent type, current task, battery status, load status, and communication connection status of neighboring agents.
[0029] Optionally, S4 specifically includes:
[0030] S41. Define the individual evacuation guidance action space, including voice broadcast instructions and dynamic lighting adjustment instructions. Based on each action in the individual evacuation guidance action space, generate the one-hot encoded tensor corresponding to each action.
[0031] S42. Input the local observation state tensor of each agent and the one-hot encoded tensor corresponding to each action in the individual evacuation guidance action space into the individual decision layer.
[0032] S43. Based on the local observation state tensor of each agent, the local state embedding tensor is obtained by processing it through the local state encoding tower of the feature encoding layer.
[0033] S44. Based on the one-hot encoded tensor corresponding to each action, process them one by one through the candidate guided action encoding tower of the feature encoding layer to obtain multiple action embedding tensors;
[0034] S45. Multiply the local state embedding tensor and each action embedding tensor element by element to obtain the fusion interaction tensor corresponding to each action.
[0035] S46. Input each fusion interaction tensor into the individual rating layer, process it through multiple fully connected layers to obtain the Q value corresponding to each action, and concatenate them to obtain the Q value tensor.
[0036] Optionally, S5 specifically includes:
[0037] S51. Input the optimal evacuation decision intent tensor and the Q-value tensor of each agent into the team aggregation layer;
[0038] S52. Based on the optimal evacuation decision intent tensor, linear processing is performed through the fully connected layer of the hypernetwork, and activation processing is performed through the Softplus function to output the evacuation decision intent weight set.
[0039] S53. Integrate the weight set of evacuation decision intentions into the weight parameters of the hybrid network and load them into the hybrid network;
[0040] S54. Concatenate the individual Q-value tensors of all agents into a global team Q-value tensor, input the global team Q-value tensor into the hybrid network, perform forward propagation calculation, and output the global team Q-value.
[0041] Optionally, step S6 includes the following steps:
[0042] S61. Construct a counterfactual experience replay pool based on historical evacuation interaction trajectories;
[0043] S62. Sample a batch of data from the playback pool, and input the next state tensor from the batch of data into the VRNN encoder. Perform a linear transformation through a fully connected layer to output the state embedding tensor.
[0044] S63. Serialize the state embedding tensor along the time step dimension to obtain the state embedding sequence;
[0045] S64. Input the state embedding sequence into the recurrent neural network unit, process each element in sequence and update the internal hidden state, and output the context hidden state tensor.
[0046] S65. Perform a concatenation operation on the state embedding tensor and the context hidden state tensor, and input the concatenated tensor into the fully connected layer to map it into the mean and variance parameters of the posterior probability distribution of the hidden variables.
[0047] S66. Based on the mean and variance parameters of the posterior probability distribution of the latent variables, a batch of latent variables is reparameterized and sampled from the posterior probability distribution of the latent variables; the next state tensor, the batch of counterfactual joint evacuation action tensor, and the batch of latent variables are input into the VRNN decoder, and the counterfactual next state tensor is output.
[0048] S67. Feed the counterfactual next-state tensor into the target network of the QMIX model and calculate the target global team Q value;
[0049] S68. Define the time-series difference loss function, including calculating the difference between the current global team Q value and the target global team Q value, and outputting the time-series difference error; perform a square operation on the time-series difference error, and output the time-series difference loss value;
[0050] S69. Based on the temporal difference loss function, the parameters of all evacuation decision generators in the global decision layer, all feature encoding layers in the individual decision layer, and the hybrid network in the team aggregation layer are jointly optimized using the gradient backpropagation algorithm.
[0051] Optionally, step S7 includes the following steps:
[0052] S71. Generate a random number that is uniformly distributed in the interval [0,1] as an exploration probability pointer;
[0053] S72. Set an exploration probability threshold; if the exploration probability pointer exceeds the exploration probability threshold, randomly sample an action index from the individual evacuation guidance action space as the final action index.
[0054] S73. If the exploration probability pointer does not exceed the exploration probability threshold, then traverse all Q-value elements in the individual Q-value tensor, record the current maximum Q-value and its corresponding index; after the traversal, output the index corresponding to the final maximum Q-value as the final action index.
[0055] S74. Based on the final action index, the corresponding evacuation guidance action is input into the intelligent agent to execute voice broadcast instructions and dynamic lighting adjustment instructions, thereby realizing real-time dynamic evacuation guidance.
[0056] The beneficial effects of this invention are:
[0057] (1) This invention significantly improves the collaborative evacuation efficiency and strategic flexibility of multi-agent systems in emergency scenarios such as fires by introducing a hierarchical decision-making architecture and a contextualized hybrid mechanism through an improved QMIX model. Although the traditional QMIX model can achieve centralized training and decentralized execution, its team collaboration mode is relatively fixed and it is difficult to adapt to complex emergency scenarios where fire situations change rapidly and different evacuation strategies are required. To solve this problem, this invention innovatively introduces a global decision layer, which can actively extract the optimal evacuation decision intention from the macro fire situation, realizing a leap from mapping from "local observation-individual action" to "global situation-evacuation strategy" planning. At the same time, this decision intention is used to dynamically generate the hybrid network weights of the team aggregation layer, so that the collaboration mode of the guiding agent team can vary according to the evacuation intention, achieving the optimal collaborative effect under different fire threats, thereby significantly improving the safety, efficiency and adaptability of evacuation guidance.
[0058] (2) This invention effectively solves the technical problems of low sample efficiency and high strategy exploration cost in high-risk systems such as emergency evacuation by adopting a counterfactual inference mechanism based on VRNN. Traditional temporal difference learning methods mainly rely on historical evacuation trajectories for passive updates, making it difficult to evaluate the value of potential guidance strategies that have not been executed, resulting in slow model convergence and easy getting trapped in local optima. This invention constructs a counterfactual experience replay pool and uses a VRNN model to perform offline inference on historical evacuation decisions, enabling the modeling and prediction of the counterfactual question of "what would have happened if different guidance actions had been taken at that time". This method enables the model to efficiently explore and identify high-value guidance strategies from limited, even failed, evacuation cases, breaking through the traditional reinforcement learning paradigm that relies on a large amount of real interaction data for trial and error, greatly improving the model's decision-making foresight and learning efficiency, and providing core technical support for the active planning and dynamic adjustment of the globally optimal evacuation path. Attached Figure Description
[0059] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0060] Figure 1 This is an overall flowchart of an intelligent dynamic guidance method based on a multi-agent system proposed in this invention;
[0061] Figure 2 This is a flowchart illustrating the working principle of the global decision-making layer of an intelligent dynamic guidance method based on a multi-agent system proposed in this invention.
[0062] Figure 3 This is a flowchart illustrating the working principle of the individual decision-making layer in an intelligent dynamic guidance method based on a multi-agent system proposed in this invention.
[0063] Figure 4 This is a flowchart illustrating the working principle of the team aggregation layer in the intelligent dynamic guidance method based on a multi-agent system proposed in this invention. Detailed Implementation
[0064] The invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0065] refer to Figure 1-4 A method for intelligent dynamic guidance based on a multi-agent system includes the following steps:
[0066] S1. Collect fire scene data, construct an environmental macro-state summary tensor, and input it into the improved QMIX model;
[0067] S2. Based on the environmental macro-state summary tensor, the optimal evacuation decision intent tensor is extracted through global decision layer processing of the improved QMIX model.
[0068] S3. By using local sensors mounted on each agent, collect information on local pedestrian flow, fire situation, and the status of neighboring agents, and construct a local observation state tensor.
[0069] S4. Based on the local observation state tensor of each agent, the individual Q-value tensor is extracted through the individual decision layer of the improved QMIX model.
[0070] S5. Based on the optimal evacuation decision intent tensor and the individual Q-value tensors of all agents, the global team Q-value is calculated through the team aggregation layer of the improved QMIX model.
[0071] S6. Based on historical trajectory data, generate counterfactual states through a VRNN model, calculate temporal difference loss, and jointly optimize the parameters of the entire QMIX model;
[0072] S7. Based on the individual Q-value tensor, each agent adopts an ε-greedy strategy to select evacuation guidance actions, including voice broadcast commands and dynamic lighting adjustment commands.
[0073] In this embodiment, the fire scene data includes fire location, smoke concentration, personnel density, and pressure difference data.
[0074] This implementation method, through multi-dimensional data collection, provides a comprehensive and accurate environmental situational awareness foundation for subsequent intelligent decision-making. Fire scene data includes the location of the fire, providing a clear basis for hazard avoidance in evacuation route planning. Fire scene data includes smoke concentration, providing key parameters for assessing environmental visibility and breathing risks, and selecting safe passages. Fire scene data includes personnel density, providing quantitative indicators for identifying congestion risk points and dynamically allocating guidance resources. Fire scene data includes differential pressure data, providing important physical references for determining the direction of fire spread and airflow organization.
[0075] In this embodiment, the improved QMIX model includes:
[0076] Global decision-making level, individual decision-making level, and team aggregation level;
[0077] The global decision-making layer includes multiple independent evacuation decision generators and a global scoring layer; the evacuation decision generator is composed of a single multilayer sensing machine; the global scoring layer includes a fire status coding tower and an evacuation intention coding tower; the fire status coding tower and the evacuation intention coding tower each correspond to an independent multilayer sensing machine;
[0078] The individual decision-making layer includes a feature encoding layer and an individual scoring layer; the feature encoding layer consists of two multilayer sensing mechanisms, corresponding to a local state encoding tower and a candidate guided action encoding tower, respectively; the individual scoring layer consists of a single multilayer sensing mechanism.
[0079] The team aggregation layer includes a hypernetwork and a hybrid network.
[0080] This implementation constructs a hierarchical, functionally decoupled decision-making model architecture, achieving precise mapping and efficient collaboration from global strategic intent to individual tactical execution. The global decision-making layer, individual decision-making layer, and team aggregation layer together form a complete framework for centralized training and decentralized execution, ensuring the model can perform both macro-level planning and adapt to local details. The global decision-making layer includes multiple independent evacuation decision generators and a global scoring layer. By generating diverse candidate strategies and evaluating them, it ensures the comprehensiveness and optimality of global decisions. The evacuation decision generator consists of a single multilayer perceptron, capable of efficiently encoding macro-level environmental states into specific evacuation intention candidate schemes. The global scoring layer includes a fire status encoding tower and an evacuation intention encoding tower. By extracting deep features from the environmental situation and candidate intentions respectively, it achieves accurate evaluation of strategy value. The fire status encoding tower and the evacuation intention encoding tower each correspond to an independent multilayer perceptron, ensuring the model's independence and flexibility in processing different information sources. The individual decision-making layer includes a feature encoding layer and an individual scoring layer. By encoding and scoring local observations and action options, it provides personalized decision-making basis for each agent. The feature encoding layer consists of two multilayer perceptrons, corresponding to the local state encoding tower and the candidate guided action encoding tower, respectively, achieving efficient feature fusion of environmental perception and action options. The individual scoring layer consists of a single multilayer perceptron, capable of quickly calculating the expected reward of an individual performing each action in a specific state. The team aggregation layer includes a hypernetwork and a hybrid network, achieving a high degree of unity between individual decisions and team goals by transforming global intent into intrinsic constraints for team collaboration.
[0081] In this embodiment, S2 specifically includes:
[0082] S21. Input the environmental macro-state summary tensor into each evacuation decision generator in the global decision layer, perform linear processing through the fully connected layer of each evacuation decision generator, and output the candidate evacuation decision intent tensor.
[0083] S22. Input the environmental macro-state summary tensor and all candidate evacuation decision intent tensors into the global scoring layer;
[0084] S23. Based on the environmental macro-state summary tensor, linear processing is performed through multiple fully connected layers of the fire state coding tower of the global scoring layer to output the fire state embedding tensor.
[0085] S24. Based on the candidate evacuation decision intent tensor, perform linear processing through multiple fully connected layers of the evacuation intent encoding tower of the global scoring layer, and output the evacuation intent embedding tensor.
[0086] S25. For each candidate evacuation decision intent tensor, the evacuation intent embedding tensor and the fire status embedding tensor are multiplied element-wise, and then processed through multiple fully connected layers to output the Q value corresponding to the candidate evacuation decision intent tensor.
[0087] S26. Based on the Q value corresponding to each candidate evacuation decision intent tensor, select the candidate evacuation decision intent tensor with the largest Q value as the optimal evacuation decision intent tensor.
[0088] This implementation method ensures the optimality and rationality of global evacuation decisions through a two-stage mechanism combining generation and evaluation. The environmental macro-state summary tensor is input into each evacuation decision generator in the global decision layer. Linear processing is performed through the fully connected layers of each generator, outputting candidate evacuation decision intent tensors, providing diverse alternatives for subsequent evaluation. The environmental macro-state summary tensor and all candidate evacuation decision intent tensors are input into the global scoring layer, preparing the necessary data input for subsequent quantitative evaluation. Based on the environmental macro-state summary tensor, linear processing is performed through multiple fully connected layers of the fire status encoding tower in the global scoring layer, outputting a fire status embedding tensor, transforming the raw environmental data into a high-dimensional feature vector easily processed by the model. Based on the candidate evacuation decision intent tensors, linear processing is performed through multiple fully connected layers of the evacuation intent encoding tower in the global scoring layer, outputting an evacuation intent embedding tensor, transforming the abstract decision intent into a computable vector representation. For each candidate evacuation decision intent tensor, the evacuation intent embedding tensor and the fire status embedding tensor are multiplied element-wise. Then, through multiple fully connected layers, the Q-value corresponding to the candidate evacuation decision intent tensor is output, achieving precise quantification of the value of each candidate intent under specific fire conditions. Based on the Q-value of each candidate evacuation decision intent tensor, the candidate evacuation decision intent tensor with the largest Q-value is selected as the optimal evacuation decision intent tensor, ensuring that the final selected global decision intent is optimal under the current environment.
[0089] In this embodiment, the local sensors include image-type fire detectors, smoke sensors, temperature sensors, and personnel detection sensors; the local pedestrian flow status includes pedestrian flow direction, density, speed, flow conflict degree, and spatial distribution characteristics; the fire status includes fire source location, smoke concentration, temperature distribution, and fire spread trend; and the neighboring agent status includes the relative position, relative distance, relative speed, agent type, current task, battery status, load status, and communication connection status of neighboring agents.
[0090] This implementation provides each agent with accurate and rich local environmental information through multi-source heterogeneous local perception and comprehensive state deconstruction, forming the perceptual foundation for personalized and collaborative decision-making. The local sensors include image-based fire detectors, smoke sensors, temperature sensors, and personnel detection sensors. Multimodal data fusion ensures the comprehensiveness and reliability of the perception of fire and pedestrian flow. The local pedestrian flow status includes pedestrian direction, density, speed, flow conflict degree, and spatial distribution characteristics, providing quantitative basis for agents to accurately assess local congestion risks and guide timing. The fire status includes fire source location, smoke concentration, temperature distribution, and fire spread trend, providing crucial dynamic environmental information for agents to avoid dangerous areas and choose safe routes. The status of neighboring agents includes the relative position, relative distance, relative speed, agent type, current task, battery status, load status, and communication connection status of neighboring agents, providing necessary contextual awareness capabilities for collaborative avoidance, task allocation, and information exchange among agents.
[0091] In this embodiment, S4 specifically includes:
[0092] S41. Define the individual evacuation guidance action space, including voice broadcast instructions and dynamic lighting adjustment instructions. Based on each action in the individual evacuation guidance action space, generate the one-hot encoded tensor corresponding to each action.
[0093] S42. Input the local observation state tensor of each agent and the one-hot encoded tensor corresponding to each action in the individual evacuation guidance action space into the individual decision layer.
[0094] S43. Based on the local observation state tensor of each agent, the local state embedding tensor is obtained by processing it through the local state encoding tower of the feature encoding layer.
[0095] S44. Based on the one-hot encoded tensor corresponding to each action, process them one by one through the candidate guided action encoding tower of the feature encoding layer to obtain multiple action embedding tensors;
[0096] S45. Multiply the local state embedding tensor and each action embedding tensor element by element to obtain the fusion interaction tensor corresponding to each action.
[0097] S46. Input each fusion interaction tensor into the individual rating layer, process it through multiple fully connected layers to obtain the Q value corresponding to each action, and concatenate them to obtain the Q value tensor.
[0098] This implementation achieves accurate evaluation of the value of different guidance actions performed by each agent in specific situations through refined state-action interaction modeling. An individual evacuation guidance action space is defined, including voice broadcast commands and dynamic lighting adjustment commands. Based on each action in the individual evacuation guidance action space, a one-hot encoded tensor corresponding to each action is generated, providing a standardized numerical representation for the model to quantize discrete guidance actions. The local observation state tensor of each agent and the one-hot encoded tensor corresponding to each action in the individual evacuation guidance action space are input into the individual decision layer, providing necessary state and action information for subsequent individual value evaluation. Based on the local observation state tensor of each agent, a local state embedding tensor is obtained through local state encoding tower processing in the feature encoding layer, refining the high-dimensional original observation data into a low-dimensional and information-rich feature vector. Based on the one-hot encoded tensor corresponding to each action, multiple action embedding tensors are obtained through candidate guidance action encoding tower processing in the feature encoding layer, transforming discrete action encoding into a continuous vector representation with semantic information. By element-wise multiplying the local state embedding tensor and the embedding tensor of each action, a fused interaction tensor corresponding to each action is obtained. This achieves deep coupling between state and action at the feature level, laying the foundation for evaluating the applicability of a specific action in a specific state. Each fused interaction tensor is input into the individual scoring layer and processed through multiple fully connected layers to obtain the Q-value corresponding to each action. The Q-value tensor is then concatenated to obtain the Q-value tensor, ultimately quantifying the expected benefit of each selectable action and providing direct data support for the agent's action selection.
[0099] In this embodiment, S5 specifically includes:
[0100] S51. Input the optimal evacuation decision intent tensor and the Q-value tensor of each agent into the team aggregation layer;
[0101] S52. Based on the optimal evacuation decision intent tensor, linear processing is performed through the fully connected layer of the hypernetwork, and activation processing is performed through the Softplus function to output the evacuation decision intent weight set.
[0102] S53. Integrate the weight set of evacuation decision intentions into the weight parameters of the hybrid network and load them into the hybrid network;
[0103] S54. Concatenate the individual Q-value tensors of all agents into a global team Q-value tensor, input the global team Q-value tensor into the hybrid network, perform forward propagation calculation, and output the global team Q-value.
[0104] This implementation successfully integrates global strategic intent with individual decision-making value through an intent-driven dynamic aggregation mechanism, achieving context-aware team Q-value calculation. The optimal evacuation decision intent tensor and the Q-value tensor of each agent are input into the team aggregation layer, providing a global strategic basis and individual decision foundation for subsequent team value assessment. Based on the optimal evacuation decision intent tensor, linear processing is performed through the fully connected layer of the hypernetwork, followed by activation processing using the Softplus function, outputting a set of evacuation decision intent weights. This transforms the abstract decision intent into specific weight parameters that guide team collaboration patterns. The evacuation decision intent weight set is integrated into the weight parameters of the hybrid network and loaded into it, allowing the hybrid network's computational behavior to dynamically adjust according to the current global optimal intent. The individual Q-value tensors of all agents are concatenated into a global team Q-value tensor. This global team Q-value tensor is input into the hybrid network, and forward propagation calculation is performed to output the global team Q-value. Finally, under the guidance of the global intent, individual decisions are weighted and aggregated to obtain a collaborative value assessment that reflects the overall interests of the team.
[0105] In this embodiment, step S6 includes the following steps:
[0106] S61. Construct a counterfactual experience replay pool based on historical evacuation interaction trajectories;
[0107] S62. Sample a batch of data from the playback pool, and input the next state tensor from the batch of data into the VRNN encoder. Perform a linear transformation through a fully connected layer to output the state embedding tensor.
[0108] S63. Serialize the state embedding tensor along the time step dimension to obtain the state embedding sequence;
[0109] S64. Input the state embedding sequence into the recurrent neural network unit, process each element in sequence and update the internal hidden state, and output the context hidden state tensor.
[0110] S65. Perform a concatenation operation on the state embedding tensor and the context hidden state tensor, and input the concatenated tensor into the fully connected layer to map it into the mean and variance parameters of the posterior probability distribution of the hidden variables.
[0111] S66. Based on the mean and variance parameters of the posterior probability distribution of the latent variables, a batch of latent variables is reparameterized and sampled from the posterior probability distribution of the latent variables; the next state tensor, the batch of counterfactual joint evacuation action tensor, and the batch of latent variables are input into the VRNN decoder, and the counterfactual next state tensor is output.
[0112] S67. Feed the counterfactual next-state tensor into the target network of the QMIX model and calculate the target global team Q value;
[0113] S68. Define the time-series difference loss function, including calculating the difference between the current global team Q value and the target global team Q value, and outputting the time-series difference error; perform a square operation on the time-series difference error, and output the time-series difference loss value;
[0114] S69. Based on the temporal difference loss function, the parameters of all evacuation decision generators in the global decision layer, all feature encoding layers in the individual decision layer, and the hybrid network in the team aggregation layer are jointly optimized using the gradient backpropagation algorithm.
[0115] This implementation achieves efficient offline optimization of the model through a VRNN-based counterfactual inference mechanism, significantly improving the foresight and robustness of the decision-making strategy. A counterfactual experience replay pool is constructed based on historical evacuation interaction trajectories, providing the model with raw experience data for in-depth analysis. The next-state tensor from the batch data is input into the VRNN encoder for linear transformation, outputting a state embedding tensor, compressing high-dimensional state information into low-dimensional feature representations. The state embedding tensor is serialized along the time step dimension, preparing data for capturing the temporal evolution of environmental states. The state embedding sequence is input into a recurrent neural network unit for processing, outputting a contextual hidden state tensor, effectively extracting the temporal dependencies in the state evolution process. The state embedding tensor and the contextual hidden state tensor are concatenated and input into a fully connected layer, mapping to parameters of the posterior probability distribution of latent variables, establishing a probabilistic model foundation for generating counterfactual states. The latent variables are reparameterized based on the posterior probability distribution parameters and input together with the next state and counterfactual actions into the VRNN decoder, outputting a counterfactual next-state tensor, realizing the modeling and prediction of the key question, "How would the environment change if different actions were taken?" The counterfactual next-state tensor is fed into the QMIX target network to calculate the target global team Q-value, providing a stable benchmark for evaluating the long-term value of the counterfactual strategy. A temporal difference loss function is defined to calculate and square the difference between the current and target Q-values, constructing an optimization objective to guide model parameter updates. Based on the temporal difference loss function, the decision network parameters are jointly optimized using a gradient backpropagation algorithm, driving the entire network to iteratively evolve towards making better long-term decisions.
[0116] In this embodiment, step S7 includes the following steps:
[0117] S71. Generate a random number that is uniformly distributed in the interval [0,1] as an exploration probability pointer;
[0118] S72. Set an exploration probability threshold; if the exploration probability pointer exceeds the exploration probability threshold, randomly sample an action index from the individual evacuation guidance action space as the final action index.
[0119] S73. If the exploration probability pointer does not exceed the exploration probability threshold, then traverse all Q-value elements in the individual Q-value tensor, record the current maximum Q-value and its corresponding index; after the traversal, output the index corresponding to the final maximum Q-value as the final action index.
[0120] S74. Based on the final action index, the corresponding evacuation guidance action is input into the intelligent agent to execute voice broadcast instructions and dynamic lighting adjustment instructions, thereby realizing real-time dynamic evacuation guidance.
[0121] This implementation employs a balanced action selection strategy that balances exploration and utilization, ensuring that the agent maintains its ability to explore unknown strategies while executing optimal decisions, thus enabling continuous learning and optimization in a dynamic environment. A random number uniformly distributed in the [0,1] interval is generated as an exploration probability pointer, introducing randomness into subsequent action selection decisions and playing a crucial role in the exploration process. An exploration probability threshold is set; if the exploration probability pointer exceeds the threshold, an action index is randomly sampled from the individual evacuation-guided action space as the final action index. This random exploration helps the model escape local optima and discover potential better strategies. If the exploration probability pointer does not exceed the exploration probability threshold, all Q-value elements in the individual's Q-value tensor are traversed, recording the current maximum Q-value and its corresponding index. After the traversal, the index corresponding to the recorded final maximum Q-value is output as the final action index, ensuring that in most cases, the agent can choose the optimal action under the current model evaluation to maximize expected gains. Based on the final action index, the corresponding evacuation guidance action is input into the intelligent agent to execute voice broadcast instructions and dynamic lighting adjustment instructions, thereby realizing real-time dynamic evacuation guidance. The model's decision results are transformed into physical intervention in the real world, completing the closed loop from intelligent decision-making to actual execution.
[0122] Example 1:
[0123] To verify the effectiveness of this invention in emergency evacuation during fires in large public buildings, the method was applied to an intelligent emergency evacuation guidance system (hereinafter referred to as "System E") in a large commercial complex. Traditional building fire evacuation systems typically use fixed evacuation signs or pre-set broadcast plans. These methods not only provide rigid and singular guidance paths but also fail to dynamically adjust to real-time changes in fire spread, smoke diffusion, and pedestrian density, easily leading people to dangerous areas or causing congestion in evacuation routes, seriously threatening lives. To address these problems, System E adopted the dynamic evacuation guidance method based on multi-agent deep reinforcement learning proposed in this invention.
[0124] During implementation, System E first utilizes image-based fire detectors, smoke sensors, temperature sensors, and personnel detection sensors distributed throughout the building to collect real-time multi-dimensional environmental and personnel status data, including fire location, smoke concentration, temperature distribution, and pedestrian flow direction, density, and speed. After data cleaning, spatiotemporal alignment, and feature engineering, a high-quality structured on-site status data stream is generated. Simultaneously, System E constructs a detailed building spatial topology map based on the building's floor plan, safety exit locations, evacuation route structure, and fire compartments, accurately representing the spatial constraints and path relationships for personnel evacuation.
[0125] System E, through an improved QMIX model, constructs a hierarchical decision-making architecture comprising a global decision-making layer, an individual decision-making layer, and a team aggregation layer. The global decision-making layer extracts optimal decision intentions from macro-level fire conditions and pedestrian flow, such as "stay away from the fire source," "avoid dense smoke," or "balanced diversion," achieving a strategic upgrade from passive guidance to proactive planning. The individual decision-making layer enables each guiding agent (such as dynamic guide lights and intelligent voice broadcasting terminals) to evaluate the value of different guiding actions based on local observation information. The team aggregation layer dynamically aggregates the individual decisions of all agents based on the global decision intention, ensuring the consistency and coordination of the entire guiding team's actions and effectively solving the challenge of collaborative decision-making for large-scale guiding resources.
[0126] During training, this invention innovatively introduces a counterfactual inference mechanism based on VRNN. By constructing a counterfactual experience replay pool, the model can perform offline inferences on historical evacuation guidance decisions, simulating scenarios of "what would have happened if different guidance actions had been taken," thereby efficiently exploring high-value guidance strategies from limited experience. This method breaks through the traditional reinforcement learning paradigm that relies on a large amount of real disaster data for trial and error, significantly improving the model's decision-making foresight and learning efficiency, especially demonstrating excellent generalization ability when dealing with low-frequency but high-risk complex fire scenarios.
[0127] During implementation, the technical team of System E discovered that, compared to traditional fixed instructions and pre-planned broadcasting methods, the method of this invention significantly improves the efficiency and safety of emergency evacuation. Traditional methods cannot cope with the rapid spread of fire and panicked gatherings of people, while the method of this invention, through multi-agent collaborative decision-making and counterfactual inference, achieves accurate prediction and proactive guidance of personnel flow, effectively avoiding congestion and secondary injuries.
[0128] To further verify the actual performance of the method of the present invention, system E conducted a detailed comparative test between the method of the present invention and the traditional method. The specific performance data is shown in Table 1:
[0129] Table 1 Performance Comparison of Intelligent Emergency Evacuation Methods in System E Large Commercial Complex
[0130] index Traditional methods Method of the present invention Increase Average evacuation time (seconds) 360 210 -41.7% Maximum congestion coefficient of evacuation routes 2.8 1.2 -57.1% Optimal path selection rate (%) 45 88 +95.6% Number of people entering the danger zone 35 3 -91.4% Boot command update frequency (times / minute) 2 25 +1150.0% System decision response time (seconds) 60 8 -86.7% Simulated casualty rate (%) 5.2 0.8 -84.6% Average length of evacuation routes (meters) 180 150 -16.7% System availability (%) 97.5 99.8 +2.3%
[0131] As shown in Table 1, the performance of the emergency evacuation system in large commercial complexes was comprehensively improved after applying the method of this invention. The average evacuation time was reduced from 360 seconds using traditional methods to 210 seconds, and the maximum congestion coefficient of evacuation routes decreased from 2.8 to 1.2, significantly improving evacuation efficiency and order. The optimal route selection rate increased from 45% to 88%, and the number of people entering the danger zone decreased from 35 to 3, greatly improving the safety of the evacuation process. The frequency of guidance instruction updates increased from 2 times / minute to 25 times / minute, and the system decision response time decreased from 60 seconds to 8 seconds, ensuring the real-time performance and effectiveness of the guidance strategy. The simulated casualty rate decreased from 5.2% to 0.8%, and the system availability reached 99.8%, providing a solid technical guarantee for life safety.
[0132] Through the method of this invention, system E successfully realizes dynamic, intelligent, and collaborative guidance for emergency evacuation in building fires, effectively avoiding congestion, maximizing the protection of personnel safety, significantly improving the level of intelligence in emergency management, significantly reducing potential loss of life and property, enhancing the system's robustness in dealing with complex disasters, and providing strong technical support for the construction of smart fire protection in large public buildings.
[0133] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An intelligent dynamic guidance method based on a multi-agent system, characterized in that, Includes the following steps: S1. Collect fire scene data, construct an environmental macro-state summary tensor, and input it into the improved QMIX model; S2. Based on the environmental macro-state summary tensor, the optimal evacuation decision intent tensor is extracted through global decision layer processing of the improved QMIX model. S3. By using local sensors mounted on each agent, collect information on local pedestrian flow, fire situation, and the status of neighboring agents, and construct a local observation state tensor. S4. Based on the local observation state tensor of each agent, the individual Q-value tensor is extracted through the individual decision layer of the improved QMIX model. S5. Based on the optimal evacuation decision intent tensor and the individual Q-value tensors of all agents, the global team Q-value is calculated through the team aggregation layer of the improved QMIX model. S6. Based on historical trajectory data, generate counterfactual states through a VRNN model, calculate temporal difference loss, and jointly optimize the parameters of the entire QMIX model; S7. Based on the individual Q-value tensor, each agent adopts an ε-greedy strategy to select evacuation guidance actions, including voice broadcast commands and dynamic lighting adjustment commands.
2. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, The fire scene data includes the fire location, smoke concentration, personnel density, and pressure difference data.
3. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, The improved QMIX model includes: Global decision-making level, individual decision-making level, and team aggregation level; The global decision-making layer includes multiple independent evacuation decision generators and a global scoring layer; the evacuation decision generator is composed of a single multilayer sensing machine; the global scoring layer includes a fire status coding tower and an evacuation intention coding tower; the fire status coding tower and the evacuation intention coding tower each correspond to an independent multilayer sensing machine; The individual decision-making layer includes a feature encoding layer and an individual scoring layer; the feature encoding layer consists of two multilayer sensing mechanisms, corresponding to a local state encoding tower and a candidate guided action encoding tower, respectively; the individual scoring layer consists of a single multilayer sensing mechanism. The team aggregation layer includes a hypernetwork and a hybrid network.
4. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, S2 specifically includes: S21. Input the environmental macro-state summary tensor into each evacuation decision generator in the global decision layer, perform linear processing through the fully connected layer of each evacuation decision generator, and output the candidate evacuation decision intent tensor. S22. Input the environmental macro-state summary tensor and all candidate evacuation decision intent tensors into the global scoring layer; S23. Based on the environmental macro-state summary tensor, linear processing is performed through multiple fully connected layers of the fire state coding tower of the global scoring layer to output the fire state embedding tensor. S24. Based on the candidate evacuation decision intent tensor, perform linear processing through multiple fully connected layers of the evacuation intent encoding tower of the global scoring layer, and output the evacuation intent embedding tensor. S25. For each candidate evacuation decision intent tensor, the evacuation intent embedding tensor and the fire status embedding tensor are multiplied element-wise, and then processed through multiple fully connected layers to output the Q value corresponding to the candidate evacuation decision intent tensor. S26. Based on the Q value corresponding to each candidate evacuation decision intent tensor, select the candidate evacuation decision intent tensor with the largest Q value as the optimal evacuation decision intent tensor.
5. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, The local sensors include image-based fire detectors, smoke sensors, temperature sensors, and personnel detection sensors; the local pedestrian flow status includes pedestrian flow direction, density, speed, flow conflict degree, and spatial distribution characteristics; the fire status includes fire source location, smoke concentration, temperature distribution, and fire spread trend; the neighboring agent status includes the relative position, relative distance, relative speed, agent type, current task, battery status, load status, and communication connection status of neighboring agents.
6. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, S4 specifically includes: S41. Define the individual evacuation guidance action space, including voice broadcast instructions and dynamic lighting adjustment instructions. Based on each action in the individual evacuation guidance action space, generate the one-hot encoded tensor corresponding to each action. S42. Input the local observation state tensor of each agent and the one-hot encoded tensor corresponding to each action in the individual evacuation guidance action space into the individual decision layer. S43. Based on the local observation state tensor of each agent, the local state embedding tensor is obtained by processing it through the local state encoding tower of the feature encoding layer. S44. Based on the one-hot encoded tensor corresponding to each action, process them one by one through the candidate guided action encoding tower of the feature encoding layer to obtain multiple action embedding tensors; S45. Multiply the local state embedding tensor and each action embedding tensor element by element to obtain the fusion interaction tensor corresponding to each action. S46. Input each fusion interaction tensor into the individual rating layer, process it through multiple fully connected layers to obtain the Q value corresponding to each action, and concatenate them to obtain the Q value tensor.
7. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, S5 specifically includes: S51. Input the optimal evacuation decision intent tensor and the Q-value tensor of each agent into the team aggregation layer; S52. Based on the optimal evacuation decision intent tensor, linear processing is performed through the fully connected layer of the hypernetwork, and activation processing is performed through the Softplus function to output the evacuation decision intent weight set. S53. Integrate the weight set of evacuation decision intentions into the weight parameters of the hybrid network and load them into the hybrid network; S54. Concatenate the individual Q-value tensors of all agents into a global team Q-value tensor, input the global team Q-value tensor into the hybrid network, perform forward propagation calculation, and output the global team Q-value.
8. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, S6 includes the following steps: S61. Construct a counterfactual experience replay pool based on historical evacuation interaction trajectories; S62. Sample a batch of data from the playback pool, and input the next state tensor from the batch of data into the VRNN encoder. Perform a linear transformation through a fully connected layer to output the state embedding tensor. S63. Serialize the state embedding tensor along the time step dimension to obtain the state embedding sequence; S64. Input the state embedding sequence into the recurrent neural network unit, process each element in sequence and update the internal hidden state, and output the context hidden state tensor. S65. Perform a concatenation operation on the state embedding tensor and the context hidden state tensor, and input the concatenated tensor into the fully connected layer to map it into the mean and variance parameters of the posterior probability distribution of the hidden variables. S66. Based on the mean and variance parameters of the posterior probability distribution of the latent variables, reparameterize and sample a batch of latent variables from the posterior probability distribution of the latent variables. The next state tensor, a batch of counterfactual joint evacuation action tensors, and batch latent variables are input into the VRNN decoder to output the counterfactual next state tensor. S67. Feed the counterfactual next-state tensor into the target network of the QMIX model and calculate the target global team Q value. S68. Define the time-series difference loss function, including calculating the difference between the current global team Q value and the target global team Q value, and outputting the time-series difference error; Perform a square operation on the timing difference error and output the timing difference loss value; S69. Based on the temporal difference loss function, the parameters of all evacuation decision generators in the global decision layer, all feature encoding layers in the individual decision layer, and the hybrid network in the team aggregation layer are jointly optimized using the gradient backpropagation algorithm.
9. The intelligent dynamic guidance method based on a multi-agent system according to claim 1, characterized in that, S7 includes the following steps: S71. Generate a random number that is uniformly distributed in the interval [0,1] as an exploration probability pointer; S72. Set an exploration probability threshold; if the exploration probability pointer exceeds the exploration probability threshold, randomly sample an action index from the individual evacuation guidance action space as the final action index. S73. If the exploration probability pointer does not exceed the exploration probability threshold, then traverse all Q-value elements in the individual Q-value tensor, record the current maximum Q-value and its corresponding index; after the traversal, output the index corresponding to the final maximum Q-value as the final action index. S74. Based on the final action index, the corresponding evacuation guidance action is input into the intelligent agent to execute voice broadcast instructions and dynamic lighting adjustment instructions, thereby realizing real-time dynamic evacuation guidance.
Citation Information
Patent Citations
Collaborative multi-agent reinforcement learning method
CN112364984A
Multi-agent reinforcement learning rolling scheduling method and device, equipment and storage medium
CN115310775A