Simplified method for realizing microscopic result acquisition by utilizing macroscopic evacuation simulation
Through the combination of improved A* algorithm and architectural semantic segmentation, efficient micro evacuation simulation results are generated, which solves the problem of insufficient accuracy of macro evacuation simulation in single-body buildings, and achieves fast and accurate micro evacuation simulation.
Patent Information
- Application Number
- CN202510582124.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-19
AI Technical Summary
In the prior art, macroscopic evacuation simulation has limitations in single building evacuation simulation, and it is impossible to quickly obtain high-precision microscopic evacuation simulation results, especially when microscopic factors such as obstacle avoidance are considered.
The improved A* algorithm is used to extract the routes between the main nodes as the parent route on the architectural semantic segmentation results, and a series of feasible sub-routes are generated. The obstacle avoidance, collision and waiting behavior are considered in combination with the macro simulation results, and the evacuation simulation video is generated through perspective transformation.
Quickly obtain high-precision micro evacuation simulation results in a short period of time, improving the accuracy and efficiency of evacuation evaluation, and achieving microscopic simulation with less computing resource consumption, breaking through the limitations of macroscopic simulation.
Smart Images

Figure CN120509567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crowd evacuation simulation in buildings, and in particular to a simplified method for obtaining microscopic results by utilizing macroscopic evacuation simulation. Background Art
[0002] Existing mainstream evacuation simulation methods are mainly divided into two categories: macroscopic and microscopic. Macroscopic methods abstract evacuation scenarios into directed graphs consisting of nodes and edges based on network flow theory, and calculate evacuation times according to the principles of flow conservation and capacity constraints. They are suitable for large-scale scenarios and have high computational efficiency. Microscopic methods use social force models, cellular automata, and other methods to perform detailed path planning and simulate individual behavior details. They are highly accurate but computationally complex. Because both macroscopic and microscopic simulations rely on prior evacuation modeling, their total time consumption is relatively high. Therefore, existing patents focus on the computational efficiency of macroscopic simulation methods themselves and the degree of refinement of personnel evacuation simulation by microscopic simulation methods.
[0003] Thanks to the recent development of deep learning technology, research on extracting building evacuation information from building floor plans using techniques such as semantic segmentation has become increasingly sophisticated. Furthermore, researchers can use this extracted evacuation information to automatically create a macroscopic evacuation network model, thereby saving the significant modeling time required for macroscopic simulations. However, macroscopic evacuation simulation methods still have significant limitations when simulating the evacuation of individual buildings. Macroscopic evacuation simulation methods based on network flow theory calculate the time-location data of people on the network, and the final result is the evacuation time corresponding to the person departing from each node. This method has very limited accuracy, poor evacuation simulation results, and does not consider more influential microscopic factors such as obstacle avoidance.
[0004] At present, there is no method at home and abroad to quickly obtain micro-evacuation simulation results based on the semantic segmentation results of building floor plans. To this end, the present invention designs a simplified method for obtaining micro-results using macro-evacuation simulation. It can combine macro-evacuation simulation with obstacle avoidance strategy to quickly obtain micro-evacuation simulation results of personnel in a short time, thereby improving the accuracy and effect of rapid macro-evacuation assessment, and has practical significance and good application prospects. Summary of the Invention
[0005] The present invention aims to solve the problems in the prior art and proposes a simplified method for obtaining microscopic results using macroscopic evacuation simulation. The method can quickly obtain microscopic evacuation simulation results by using macroscopic simulation results and taking into account behaviors such as obstacle avoidance, collision, and waiting.
[0006] The present invention is achieved through the following technical solution. The present invention proposes a simplified method for obtaining microscopic results by using macroscopic evacuation simulation, and the method comprises the following steps:
[0007] Step 1: Use the improved A* algorithm to extract the routes between the main nodes from the building semantic segmentation results as the "parent route", and then generate a series of feasible "child routes" from the "parent route". The "child routes" are calculated as actual micro routes to obtain the microscopic simulation results of obstacle avoidance;
[0008] Step 2: Using the macroscopic simulation results as the base time, based on the actual microscopic route length, taking into account collisions and waiting behaviors, adjust the location labels of people at each moment to obtain the microscopic simulation results of collisions and waiting behaviors;
[0009] Step 3: Generate the required scene map through perspective transformation, generate the personnel distribution map that changes with time based on the micro-simulation results, and finally synthesize it into an evacuation simulation video.
[0010] Furthermore, the step 1 is specifically as follows:
[0011] Calculate the coordinates of the room's geometric center as the starting point of the parent route;
[0012] Execute the improved A* algorithm to generate parent routes;
[0013] Start translating from the starting point in any direction with a spacing of δ, and take the routes that do not collide with obstacles as the sub-route set;
[0014] Establish the initial position coordinate set of personnel and determine the initial movement direction for each person;
[0015] A buffer area is set at the end of the path. When the evacuees enter the buffer area, the gradient descent algorithm is started to fine-tune the path to ensure that they reach the exit node accurately.
[0016] Furthermore, the obstacle cost o(N) is introduced into the cost function of the A* algorithm; an obstacle cost map is introduced into the calculation; the obstacle cost map is constructed based on the traversable area map, where obstacle pixels are assigned a value of 0 and traversable area pixels are assigned a value of 1; all pixels with a value of 1 are recalculated, and the distance between them and the nearest obstacle is increased by 1 until all pixels with a value of 1 are updated. The resulting matrix is used as the cost matrix; finally, the maximum value in the obstacle cost map is subtracted from the cost matrix to generate a grayscale image, resulting in the final obstacle cost map.
[0017] Furthermore, the improved A* algorithm only allows nodes to move in four directions: up, down, left, and right, and uses Manhattan distance to calculate distance in the heuristic estimation function.
[0018] Furthermore, in step 1, based on the actual distribution of people in the room, it is assumed that the people first move in a straight line to the nearest point on this series of "sub-routes" and then continue to move along the corresponding sub-route. At the end of the route, the route is extended to the exit according to the coordinates of the exit node, thus completing the generation of the actual micro-route.
[0019] Furthermore, in step 2, the location label of each person in the personnel cluster is different, and each person has a collision volume; assuming that the personnel collision radius is 0.5 meters, for the actual microscopic route obtained using the improved A* algorithm, the location label corresponding to each person is compared at time t and time (t+n), where n is the number of different location labels. When the location labels of any two people at the two moments are less than 0.5 meters apart, it is considered that the two people will collide, resulting in a reduction in speed, and therefore the speed of the person at the back of the route is adjusted.
[0020] Furthermore, the speed of a person at the back of the route is adjusted, that is, the number of person location tags between time t and time (t+n) is adjusted by linear interpolation. When adjusting the speed of the person, the number of consecutive identical location tags caused by the person waiting at the congested node should be reduced accordingly, until there are no location coordinates corresponding to the congested node in the location tags of the original route.
[0021] Furthermore, in step three, based on the building floor plan, a three-dimensional evacuation map of the building is spliced through perspective transformation. The obtained microscopic simulation results are recalculated through the perspective transformation matrix to obtain the values in the new coordinate system, and the pictures corresponding to each frame are generated and synthesized into a complete evacuation simulation video.
[0022] The present invention also proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the simplified method for obtaining microscopic results by using macroscopic evacuation simulation.
[0023] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the simplified method for obtaining microscopic results by using macroscopic evacuation simulation.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] The present invention proposes a simplified method for obtaining microscopic results using macroscopic evacuation simulation, that is, a simplified method for obtaining microscopic evacuation simulation results using macroscopic simulation. This method can calculate new microscopic simulation results based on fast macroscopic simulation with less computing power consumption, taking into account human behaviors such as obstacle avoidance, collision, and waiting, and realize visual onlooker simulation through building floor plans. The simplified method for obtaining microscopic evacuation simulation results proposed by the present invention can quickly calculate and convert macroscopic simulation results into microscopic simulation results. Combined with the macroscopic network model automatic generation method, the process from floor plans to microscopic personnel evacuation simulation can be quickly completed in a short time. The method proposed by the present invention can take into account microscopic factors while consuming less additional computer computing power and slightly increasing the computing time, making the original macroscopic simulation results more reasonable and more accurate. The entire process of obtaining microscopic simulation results only takes about 8 minutes (for a three-story building in a specific implementation case), which is much less than the modeling and simulation time required for microscopic evacuation simulation (about several hours), greatly improving the efficiency of obtaining microscopic evacuation simulation results. In general, the method proposed in this invention inherits the computational efficiency of macroscopic simulation and integrates the advantages of microscopic simulation, thus breaking through the limitations of macroscopic simulation itself. It can quickly realize microscopic evacuation simulation under different layout conditions of a single building, providing a multi-dimensional evaluation basis for building safety design. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0027] Figure 1 This is a schematic diagram of the obstacle cost map creation process.
[0028] Figure 2 This is a schematic diagram of the total cost calculation process of the improved A* algorithm.
[0029] Figure 3 This is a schematic diagram of the path finding principle of the A* algorithm before and after the improvement. (a) does not consider the obstacle cost, and (b) considers the obstacle cost.
[0030] Figure 4 is the generated sub-route schematic diagram.
[0031] Figure 5 This is a diagram comparing the path finding performance of the A* algorithm before and after improvements in a real case. (a) Before the improvement, (b) After the improvement.
[0032] Figure 6This is a schematic diagram of the building route set generated for a three-story building, where (a) is the first floor and (b) is the second floor.
[0033] Figure 7 The following are two different layout diagrams of a three-story building. (a) is the normal case, and (b) is the special case.
[0034] Figure 8 Figure 2 is a schematic diagram of the evacuation simulation results under two different layouts.
[0035] Figure 9 It is a schematic diagram of some screenshots of the generated microscopic evacuation simulation video (5s, 10s, 15s, 20s). DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0037] The present invention proposes a simplified method for obtaining microscopic results using macroscopic evacuation simulation. The method combines the results of semantic segmentation of the plan view to consider factors such as obstacle avoidance, collision, and waiting. Based on the macroscopic simulation results, new results are adjusted and calculated, and the evacuation simulation results are visualized in combination with the plan view.
[0038] Specifically, combined Figures 1-9 The present invention proposes a simplified method for obtaining microscopic results by using macroscopic evacuation simulation, the method comprising the following steps:
[0039] Step 1: Use the improved A* algorithm to extract the routes between the main nodes from the building semantic segmentation results as the "parent route", and then generate a series of feasible "child routes" from the "parent route". The "child routes" are calculated as actual micro routes to obtain the microscopic simulation results of obstacle avoidance;
[0040] The step 1 is specifically as follows:
[0041] Calculate the coordinates of the room's geometric center as the starting point of the parent route;
[0042] Execute the improved A* algorithm to generate parent routes;
[0043] Start translating from the starting point in any direction with a spacing of δ, and take the routes that do not collide with obstacles as the sub-route set;
[0044] Establish the initial position coordinate set of personnel and determine the initial movement direction for each person;
[0045] A buffer area is set at the end of the path. When the evacuees enter the buffer area, the gradient descent algorithm is started to fine-tune the path to ensure that they reach the exit node accurately.
[0046] The A* algorithm is a graph-based heuristic search algorithm widely used in path planning. Its core concept is to design a cost function that comprehensively considers the heuristic function h(N) and the actual path cost g(N) to find the path with the lowest total cost, which is the optimal path. Here, h(N) represents the estimated cost from the current node to the destination, and g(N) represents the current cost of the actual path from the current node to the starting point. Specifically, the A* algorithm first initializes the starting node and adds it to the open list. The algorithm then iteratively selects the current optimal node from the open list and adds its adjacent nodes to the open list. By continuously updating the cost and heuristic function estimate of each node, the A* algorithm can dynamically adjust the search priority, thereby efficiently finding the optimal path. To obtain the main route between key nodes and generate a series of feasible subroutes from them, the present invention aims to minimize obstacles while minimizing the change in path length, ensuring that the route is located as close to the road center as possible. The present invention improves the A* algorithm by introducing the obstacle cost o(N) into the A* cost function, enabling the algorithm to fully consider the impact of obstacles. In order to improve the calculation efficiency and avoid repeated calculations, the obstacle cost map is introduced into the calculation; the calculation process is as follows Figure 1 As shown in the figure, the brown area represents the wall, the blue area represents the starting point, and the green area represents the end point. The obstacle cost map is constructed based on the traversable area map, where obstacle pixels are assigned a value of 0 and traversable area pixels are assigned a value of 1. All pixels with a value of 1 are recalculated by adding 1 to the distance to the nearest obstacle until all pixels with a value of 1 have been updated. The resulting matrix is used as the cost matrix. Finally, the cost matrix is subtracted from the maximum value in the obstacle cost map to generate a grayscale image, resulting in the final obstacle cost map. The cost matrix can be magnified n times, allowing precise control over the impact of obstacles on the pathfinding process. Using this method, the obstacle cost map only needs to be loaded once during use, eliminating the need for repeated cost calculations.
[0047] Typically, the A* algorithm allows for node movement in three directions: four directions, eight directions, and any direction. Accordingly, the distance calculations in the heuristic function are also divided into three categories: Manhattan distance, diagonal distance, and Euclidean distance. The present invention aims to maximize computational efficiency while ensuring the identification of the shortest optimal evacuation path. Therefore, the improved A* algorithm described in the present invention only allows nodes to move in the four directions of up, down, left, and right, and uses Manhattan distance in the heuristic estimation function to calculate distance.
[0048] Figure 2Four cost maps generated using the improved A* algorithm proposed in this paper are shown: actual cost, estimated cost, obstacle cost, and total cost. In the actual cost map, any point can be traced back to the starting point along the arrow, and the number on the arrow represents the actual cost of moving from the starting stage to that point. In the final total cost map, the shortest path can be determined by tracing back from the target node along the path with the lowest cost. Figure 3 As shown in Figure 2, the comparison of the paths found with and without considering the obstacle cost shows that the improved method significantly reduces the number of path points adjacent to obstacles while keeping the total path length unchanged (12 units). In addition, in the specific implementation case, the longest path obtained using the improved method is 2937 pixels, while the longest path obtained without considering the obstacle cost is 2919 pixels. Figure 5 As shown in FIG, the difference is only 0.6%. These results confirm that the proposed improved A* algorithm effectively achieves the goal required by the present invention.
[0049] The present invention obtains microscopic results based on macroscopic simulation, and the ultimate research object is each person in the room. In macroscopic simulation, the people in a room are simplified into a group of people, and the behavior of this group remains consistent. Therefore, in the macroscopic simulation results, due to the inherent defects of macroscopic simulation, only the evacuation time of a unique route with the geometric center of a room as the starting point can be obtained. To this end, this method uses the route found by the proposed improved A* algorithm as the "parent route" to generate a series of child routes. Specifically, if Figure 4 As shown in the figure, the series of routes are derived from the translation of the "parent route." Due to the characteristics of the improved A* algorithm, such a series of obstacle-free routes can always be found. Then, based on the actual distribution of people in the room, it is assumed that people first move in a straight line to the nearest point on this series of "sub-routes" and then continue along the corresponding sub-route. At the end of the route, the coordinates of the exit node are used to guide the route to the exit, thus completing the generation of the actual micro-route.
[0050] Step 2: Using the macroscopic simulation results as the base time, based on the actual microscopic route length, taking into account collisions and waiting behaviors, adjust the location labels of people at each moment to obtain the microscopic simulation results of collisions and waiting behaviors;
[0051] Macro-simulation methods are efficient techniques for analyzing group movement patterns using mathematical graphical models. These methods abstract architectural spaces into a network topology, using nodes to represent key areas (such as rooms and exits), edges to represent channels or paths, and quantify spatial attributes through weight parameters (such as capacity, distance, and congestion coefficient). The system simulates the evacuation path selection and overall movement trends of large groups of people in emergencies by dynamically calculating the shortest path, network flow balancing, or bottleneck identification algorithms. It can quickly assess the feasibility of evacuation plans, optimize exit allocation strategies, predict congestion risk points, and support evacuation efficiency comparisons in multiple scenarios, providing a decision-making basis for public safety planning that balances computational efficiency and macro-precision. It is particularly suitable for the design of emergency plans for large public venues such as airports and stadiums.
[0052] The present invention adopts a macroscopic simulation method to achieve microscopic simulation results. This method takes into account the congested nodes in the building plane, subdivides the route, and adds intermediate nodes that may cause congestion, which can consider the impact of crowd congestion to a certain extent.
[0053] For the macro simulation results obtained by the macro simulation method, only the evacuation time between nodes can be obtained in the results. The present invention takes into account obstacle avoidance, collision, and waiting for recalculation and adjustment to obtain micro results. Among them, obstacle avoidance has obtained a route generation method that takes obstacles into consideration based on the improved A* algorithm. When a crowd passes through a narrow corridor or a place where the passable width changes, due to congestion, the crowd's passage speed is reduced and even the crowd has to queue up. This is reflected in the macro simulation method adopted by the present invention as a cluster of people waiting at the current location label until the previous cluster of people has all passed the congested node, and the cluster of people represented by each node is assumed to pass through the congested node in the middle of the route at the same time. In the actual microscopic results, the location labels of each person in the personnel cluster are different, and each person has a collision volume; assuming that the personnel collision radius is 0.5 meters, for the actual microscopic route obtained by using the improved A* algorithm, the location label corresponding to each person is compared at time t and time (t+n), and n is the number of location labels that differ (in the present invention, 3 is taken, the larger n is, the smaller the accuracy and the less computing power consumption is; the smaller n is, the greater the accuracy and the greater the computing power consumption is). When the location labels of any two people at two moments are less than 0.5 meters apart, it is believed that the two people will collide, resulting in a decrease in speed, so the speed of the person at the back of the route is adjusted. Adjusting the speed of the person at the back of the route is to adjust the number of personnel location labels between time t and time (t+n) by linear interpolation. Because the macro-simulation method used in this invention already accounts for the time lost in passing through congested nodes to a certain extent, which is reflected in the location tags as people waiting at the center of the congested node, when adjusting people's speed using the above method, the number of consecutive identical location tags caused by people waiting at congested nodes should be reduced accordingly, until the location tags of the original route no longer contain the corresponding location coordinates of the congested node. This is how the invention considers micro-behaviors such as collisions and waiting.
[0054] Step 3: Generate the required scene map through perspective transformation, generate the personnel distribution map that changes with time based on the micro-simulation results, and finally synthesize it into an evacuation simulation video.
[0055] In step three, based on the building floor plan, a three-dimensional evacuation map of the building is spliced through perspective transformation. The obtained microscopic simulation results are recalculated through the perspective transformation matrix to obtain the values in the new coordinate system, and the pictures corresponding to each frame are generated and synthesized into a complete evacuation simulation video.
[0056] The simplified method for obtaining microscopic evacuation simulation results proposed in this paper is based on the results of floor plan semantic segmentation and an improved A* algorithm. This method takes into account human behaviors such as obstacle avoidance, collisions, and waiting, and adjusts and calculates evacuation simulation results. Based on fast macroscopic simulation, this method uses less computing power, taking into account human behaviors such as obstacle avoidance, collisions, and waiting, calculates new microscopic simulation results, and implements a visual crowd simulation using building floor plans.
[0057] Example
[0058] The following describes a specific embodiment of the simplified micro-evacuation simulation results acquisition method proposed in the present invention. This example is a three-story hospital in City H, which includes a vertical evacuation process. The implementation process of the simplified micro-evacuation simulation results acquisition method proposed in the present invention on this three-story building is as follows:
[0059] Step 1: Use the improved A* algorithm to extract the routes between the main nodes from the building semantic segmentation results as the "parent route", and then generate a series of feasible "child routes" from the "parent route". The "child routes" are calculated as actual micro routes to obtain the microscopic simulation results of obstacle avoidance;
[0060] The building plan is abstracted into a graph network represented by nodes. Starting from the room node, the "parent route" is calculated using the improved A* algorithm according to the above method. The "child routes" are generated according to the above method and calculated as the actual micro routes. The specific process is as follows:
[0061] Calculate the coordinates of the room's geometric center as the starting point of the parent route;
[0062] Execute the improved A* algorithm to generate parent routes;
[0063] Start translating from the starting point in any direction with a spacing of δ, and take the routes that do not collide with obstacles such as walls as the sub-route set;
[0064] Establish the initial position coordinate set of personnel and determine the initial movement direction for each person;
[0065] A buffer area is set at the end of the path. When the evacuees enter the buffer area, the gradient descent algorithm is started to fine-tune the path to ensure that they reach the exit node accurately.
[0066] In the case of this three-story building, the first and second floor route sets are obtained as follows Figure 6 shown.
[0067] Step 2: Using the macroscopic simulation results as the base time, based on the actual microscopic route length, taking into account collisions and waiting behaviors, adjust the location labels of people at each moment to obtain the microscopic simulation results of collisions and waiting behaviors;
[0068] The microscopic simulation results are recalculated according to the method proposed in the present invention. Figure 7 The evacuation simulation was carried out under the two layouts shown in the figure, and the evacuation results were as follows: Figure 8 As shown in the figure, the specific layout change involves adding two obstacles to the right of the second and third floors, and the two staircases on the left are unable to be opened due to an unexpected incident. Calculations show that the global evacuation time is 169.8 seconds under normal circumstances and 213.8 seconds under the special layout.
[0069] Step 3: Generate the required scene map through perspective transformation, generate the personnel distribution map that changes with time based on the micro-simulation results, and finally synthesize it into an evacuation simulation video.
[0070] Based on the building plan, the perspective transformation is used to splice it into a three-story building 3D evacuation map. The microscopic simulation results are recalculated through the perspective transformation matrix to obtain the values in the new coordinate system. The corresponding picture of each frame is generated and synthesized into a complete evacuation simulation video. Some screenshots of the video are shown below. Figure 9 shown.
[0071] The present invention also proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the simplified method for obtaining microscopic results by using macroscopic evacuation simulation.
[0072] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the simplified method for obtaining microscopic results by using macroscopic evacuation simulation.
[0073] The memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). It should be noted that the memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0074] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).
[0075] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0076] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0077] The above is a detailed introduction to the simplified method proposed in the present invention for obtaining microscopic results by using macroscopic evacuation simulation. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A simplified method for obtaining microscopic results using macroscopic evacuation simulation, characterized in that: The method comprises the following steps: Step 1: Use the improved A* algorithm to extract the routes between the main nodes from the building semantic segmentation results as "parent routes". Then, generate a series of feasible "child routes" from the "parent routes". The "child routes" are calculated as actual micro routes to obtain the microscopic simulation results of obstacle avoidance. Step 2: Using the macroscopic simulation results as the base time, based on the actual microscopic route length, taking into account collisions and waiting behaviors, adjust the location labels of people at each moment to obtain the microscopic simulation results of collisions and waiting behaviors; Step 3: Generate the required scene map through perspective transformation, generate the personnel distribution map that changes with time based on the micro-simulation results, and finally synthesize it into an evacuation simulation video.
2. The method according to claim 1, characterized in that The step 1 is specifically as follows: Calculate the coordinates of the room's geometric center as the starting point of the parent route; Execute the improved A* algorithm to generate parent routes; Start translating from the starting point in any direction with a spacing of δ, and take the routes that do not collide with obstacles as the sub-route set; Establish the initial position coordinate set of personnel and determine the initial movement direction for each person; A buffer area is set at the end of the path. When the evacuees enter the buffer area, the gradient descent algorithm is started to fine-tune the path to ensure that they reach the exit node accurately.
3. The method according to claim 2, characterized in that The obstacle cost o(N) is introduced into the cost function of the A* algorithm; an obstacle cost map is introduced into the calculation; the obstacle cost map is constructed based on the traversable area map, where obstacle pixels are assigned a value of 0 and traversable area pixels are assigned a value of 1; all pixels with a value of 1 are recalculated, and the distance between them and the nearest obstacle is increased by 1 until all pixels with a value of 1 are updated. The resulting matrix is used as the cost matrix; finally, the maximum value in the obstacle cost map is subtracted from the cost matrix to generate a grayscale image, resulting in the final obstacle cost map.
4. The method according to claim 3, characterized in that The improved A* algorithm only allows nodes to move in four directions: up, down, left, and right, and uses Manhattan distance to calculate distance in the heuristic estimation function.
5. The method according to claim 1, wherein In step 1, based on the actual distribution of people in the room, it is assumed that the people first move in a straight line to the nearest point on this series of "sub-routes" and then continue along the corresponding sub-route. At the end of the route, the route is extended to the exit according to the coordinates of the exit node, thus completing the generation of the actual micro-route.
6. The method according to claim 1, characterized in that In step 2, the location label of each person in the cluster is different, and each person has a collision volume; assuming that the collision radius of a person is 0.5 meters, for the actual microscopic route obtained using the improved A* algorithm, the location label corresponding to each person is compared at time t and time (t+n), where n is the number of location labels that differ. When the location labels of any two people at two moments are less than 0.5 meters apart, it is considered that the two people will collide, resulting in a reduction in speed, so the speed of the person at the back of the route is adjusted.
7. The method according to claim 6, characterized in that Adjusting the speed of a person at the end of the route means adjusting the number of person location tags between time t and time (t+n) by linear interpolation. When adjusting the speed of a person, the number of consecutive identical location tags caused by the person waiting at the congested node should be reduced accordingly until there are no location coordinates corresponding to the congested node in the location tags of the original route.
8. The method according to claim 1, characterized in that In step three, based on the building floor plan, a three-dimensional evacuation map of the building is spliced through perspective transformation. The obtained microscopic simulation results are recalculated through the perspective transformation matrix to obtain the values in the new coordinate system, and the pictures corresponding to each frame are generated and synthesized into a complete evacuation simulation video.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium for storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.