Study on Safe Evacuation Routes Based on Crowd Density Map of Shopping Mall

When there are too many people in large shopping malls, crowd congestion accidents are likely to occur. To ensure the rapid and safe evacuation of indoor crowds, this paper uses crowd density maps to determine the location of crowded areas and uses an improved ant colony algorithm to optimize the evacuation route from this location to the exit. First, a crowd density map is generated from the collected image data by the improved multiscale convolutional neural network algorithm, and the location of the high-density crowd is determined as the initial location. Then, the pheromone volatility coefficient $\rho $ is measured through adaptive adjustment by using the exponential decline method and the introduction of elite ants to optimize and update the ant colony pheromone to improve the ant colony algorithm, and the optimal evacuation route from the location of the crowded area to the exit is obtained. The research in this paper uses Beijing Xidan Joy City as an example. The results show that the method in this paper can optimize evacuation routes and reduce the turning points of the evacuation route by 25% and reduce the route length by 10%. Therefore, it can be seen that the proposed method can achieve the optimal evacuation path with the shortest distance and the least turning points, which has feasibility and practicability.


I. INTRODUCTION
In recent years, with the acceleration of the urbanization process, the population of cities has grown rapidly, and various activities in public places have increased. These places have the characteristics of high mobility and a high concentration of people. If there are uncertain emergencies in public places during an event, such as people falling down and fires, it easily causes crowds congestion in the rapid evacuation process. The design of optimal evacuation route in public places includes two problems. The first is to determine the location of high-density crowds. The other is to design safe evacuation routes for high-density crowds.
The distribution of the crowds in a certain area can be shown in the crowd density map. For the study of crowd density distribution map, Wang et al. [1]and Fu et al. [2] proposed an end-to-end deep CNN regression model using the AlexNet network to count images in high-density crowds. Shang et al. [3] proposed an end-to-end estimation method using CNN by simultaneously learning local and global The associate editor coordinating the review of this manuscript and approving it for publication was Sotirios Goudos . counts on the all input images. Zhang et al. [4] learned a network by alternately training two objective functions of people number and density estimation, proposed a mapping relationship of the objective function adapted for cross scene counting. Onoro-Rubio and López-Sastre [5] proposed a counting model based on Hydra CNN, which accurately estimated the number of vehicles in traffic congestion or counted people in very crowded scenes. Zhang et al. [6] proposed a multiscale architecture to extract features of different scales to solve the problem that fixed convolution scale only was suitable for the single scale. The current research basically focuses on using a crowd density map to count the number of people but ignores the application research on the crowd distribution information in crowd density maps. Therefore, methods for locating high-density crowd are worth further study..
For the optimal evacuation route, Wong et al. [7] proposed the least turning points method considering crowd information and obstacle locations. KC et al. [8] proposed a mapping function method; that is, for each vertex v, the function finds the route from a fixed single source vertex to v and finds the shortest distance of the route to find the optimal mapping relationship. Additionally, Ghosh et al. [9] designed VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ two naturally inspired intelligent optimal controllers using the flower pollination algorithm (FPA) and the bat algorithm (BA). The algorithm improves the route length, running time and convergence speed. Based on the above analysis, the optimal evacuation route can be defined as the moving route of the crowd from the initial position to the exit position considering the conditions of the inflection point and the moving distance. Others, Hu et al. [10] proposed a comprehensive evacuation model based on the ripple diffusion algorithm to solve the evacuation route planning of shelter service area. Elham et al. [11] proposed an uncertain evacuation plan based on fuzzy credibility theory and genetic algorithms to solve the problem of evacuation routes using public vehicles in urban areas. Li et al. [12] established an emergency evacuation model based on the maximum flow model (MFM). The expected evacuation route and effective traffic control measures were obtained by the proposed model in the center of Beijing and other large cities. In the event of natural disaster or terrorist attack, aiming at the problems in evacuation planning, such as starting time, evacuation route and destination selection, Lu et al. [13] proposed the heuristic algorithm to optimize the evacuation route, which improves the efficiency of crowd evacuation. Lin [14] built an evacuation framework integrated with optimization, evaluation, and adjustment to optimize evacuation organization planning. Desmet and Gelenbe [15] proposed a flow-based method and used dynamic exit signs to guide crowd evacuation. This method is suitable for low crowd evacuation. The above studies are based on point-line search analysis algorithms for outdoor evacuation methods and lack research on indoor plane evacuation.
Additionally, there is a large difference between indoor plane evacuation and outdoor evacuation. Emergency events such as fires and earthquakes cause an instantaneous change in the indoor environment, making indoor evacuation highly time-effective and having a short reaction time. Indoor environmental evacuation is more complicated. Gino et al. [16] and Hadzic et al. [17] conducted research on avoiding dangers when an indoor emergency occurred, but the evacuation route did not consider the conditions of the optimal evacuation route. Therefore, it is of great significance to study the optimal indoor evacuation route while considering the necessary conditions of the optimal evacuation route and avoiding dangers.
In order to design the indoor safe evacuation route, this paper introduces the method of determination high-density crowds location and the optional evacuation route considering obstacle points. First, an improved multiscale convolutional neural network is used to obtain the crowd density map, and the distribution characteristics of crowd density in the map are used to determine the high-density crowds location. Then, the pheromone volatility coefficient ρ is measured through adaptive adjustment by using the exponential decline method, and the introduction of elite ants to optimize and update the ant colony pheromone to improve the ant colony algorithm and improve the determination effect of the optimal evacuation route. Finally, the effect of fire, earthquake and other emergencies on the optimal evacuation route is simulated by setting up obstacle points, and the effectiveness of this method can be analyzed. The technical procedure of this paper is shown in figure 1.

A. CROWD DENSITY MAP GENERATION METHOD BASED ON AN IMPROVED MULTISCALE CONVOLUTIONAL NEURAL NETWORK
In this paper, the improved multiscale convolutional neural network (MCNN) is used to generate the crowd density map. First, the crowd image are processed by the head tag method. The processed data are processed by an improved multiscale convolutional neural network algorithm, which replaces the whole network layer with a full convolutional layer, so the crowd density map of the area is obtained.

1) CROWD IMAGE DATA PROCESSING METHOD BASED ON THE HEAD TAG METHOD
If there is a head at pixel x i , then its function is expressed as δ (x − x i ). Therefore, the formula of the image marked with N heads can be expressed as: Then, it is converted into a continuous density function. For each head in a given image, its distance from k nearest neighbors is expressed as d i 1 , d i 2 , . . . , d i m , and then the average distance d i is obtained. Therefore, the pixels associated with x i correspond to an area in the scene that is approximately the radius from the ground. To estimate the crowd density around the pixels in the picture, we convolve δ (x − x i ) with the Gaussian kernel G σ i and ensure that the Gaussian kernel standard deviation σ i and d i are proportional. The formula for the density F is: for the parameter β, the label H is convolved with a density kernel adapted to the local geometry of each data point, which is called the geometric adaptive kernel, and usually takes a value of 0.3.

2) IMPROVED MCNN WITH A FULL CONVOLUTION LAYER INSTEAD OF A FULLY CONNECTED LAYER
Due to the angle problem of the surveillance video, the crowd in the photo has problems with the distance. Therefore, using multiscale convolution kernels to adapt to the head size of different scales can improve the accuracy of feature extraction. In this paper, three different sizes of convolution kernels are used to extract human heads in different local positions in pictures, and then the accurate features of local pictures can be extracted. However, due to the different scales of the three types of convolution kernels, if global merging is performed using a full connection for the last time, the classification of the features in the picture will be biased, which will also reduce the efficiency. Therefore, in this paper, a new method using a full convolution layer instead of a full connection layer is proposed.
Fully convolutional networks (FCN) [18] have two major features: they do not need to limit the size of the input image and provide convenience for feature extraction, and they are more efficient in forward propagation. Therefore, performing full convolution processing on the local images of three sizes can convolve the local feature images with different sizes unified into the same size images. When FCN transforms the image, the weight matrix represents it, which is uniformly expressed as (30,1,1) in this paper. Then, the mainstream method is merged by using global averages to obtain the crowd density map.
Using a convolution layer instead of a fully connected layer can optimize the model and improve the efficiency. The specific improved structure is shown in Figure 2, in which the red box is the improved part. The figure contains three parallel CNNs, and the filters have local sensing fields of different sizes. The three scales of the convolutional neural network are represented as L scale (using a large-scale convolution kernel: 9 * 9, 7 * 7, and 7 * 7); M scale (using an intermediate scale convolution kernel: 7 * 7, 5 * 5, 5 * 5, and 5 * 5); and s-scale (using a small scale convolution kernel: 5 * 5, 3 * 3, 3 * 3, and 3 * 3), which aims to use the convolution kernel of multiple scales to adapt to the size of heads of different scales. Finally, the L, M, S three-scale convolutional neural network is combined by using a full convolution layer instead of a fully connected layer to obtain the density map generated by the network, and then the distribution information in the density map can be observed.

B. METHOD FOR DETERMINING HIGH-DENSITY CROWD LOCATIONS BASED ON CROWD DENSITY MAPS
Before designing a safe evacuation route, the location of the evacuation must be known. This paper uses a crowd density map to confirm the location of high-density people. First, the plan design of the entire area is converted into raster data and used as the base map for the experiment. Then, the obtained crowd density map is converted into raster data. Finally, the crowd density map is in the same coordinate system as the base map. Geographical registration is performed next to make it fit, and then the position of the actual high-density area is obtained.
The geographic registration of raster data of crowd density maps and mall floor plans is as follows: (1) Add raster dataset; (2) Create control points and connect the grid to known locations in the map; (3) View control points and errors; (4) Save the results of geographic registration.

C. METHOD FOR DETERMINING THE OPTIMAL EVACUATION ROUTE USING AN IMPROVED ANT COLONY ALGORITHM
The ant colony algorithm has defects [19]: (1) The ant colony algorithm is a large space search algorithm, especially the ''blind search'' in the initial stage, which makes ant individuals inevitably generate a large number of local cross routes during the search process. The performance is worse as the environment becomes larger. (2) Due to the limitation of the tabu table, a large number of ant individuals are ''lost'' in the search for the optimal route, resulting in a large number of incomplete routes. The above two defects cause the conventional ant colony algorithm to easily converge early, the search route efficiency is low, and the convergence speed is slow. To optimize the defects of the ant colony algorithm, this paper proposes an improved evacuation route determination method based on an improved ant colony algorithm. This method uses the grid method to model the environment, uses the volatility factor ρ by adaptively adjusting to improve the convergence speed of the ant colony algorithm, and uses VOLUME 8, 2020 the pheromone update optimization method to improve the convergence efficiency of the ant colony algorithm.

1) ENVIRONMENTAL MODELING METHOD BASED ON THE GRID METHOD
Grid method modeling was proposed by W.E. Howden in 1968 and has been widely used in path planning. Using this algorithm for modeling divides the moving environment into a series of uniform rectangular grids, encodes each rectangular grid, classifies the grids according to the corresponding environmental information, and assigns different values to the grid to indicate whether the grid is an obstacle or free area. Assuming that the target is walking in a two-dimensional space, then the environmental space can be equivalent to a two-dimensional array, and the trajectory can be represented by two-dimensional coordinates. The array consists of 0,1. A 0 indicates that there are no obstacles in the raster map, the grid is blank, 1 indicates there are obstacles in the raster map; and if the grid is black, it indicates that the complexity of computation is avoided when dealing with obstacle boundaries.
The environmental information is represented by binary information. The environmental information (x i , y i ) at node i is defined and stored in block [x] and block [y]. In the established grid map, the correspondence between the grid number c and its coordinate position (x i , y i ) is: where m, c ∈ N + , mod is a mod operation, int is an integer operation, and m is the number of grid columns. The advantage of the combination of the two is that in the route search process, the ordinal number method can save memory space, be easy to index, and speed up the search. When the optimal route is obtained, it is converted to rectangular coordinates, which can better represent the relative position between grids and calculate the route length.

2) CONVERGENCE OPTIMIZATION METHOD OF THE ANT COLONY ALGORITHM BASED ON AN ADAPTIVE ADJUSTMENT
Searching for the optimal solution in the ant colony algorithm, the update rule of pheromone concentration plays an extremely important role. The volatility factor in the update formula of pheromone concentration directly affects the performance of the ant colony algorithm. When the value of the pheromone volatility factor is too small, the difference in pheromone concentration of each route is small, which reduces the ant colony's guidance to each ant, thus reducing the algorithm search speed. When the pheromone volatility factor is too large, the ant colony's guiding effect on the ants is too strong, which makes the possibility of ants searching for more routes smaller, so it more easily falls into a locally optimal solution. Therefore, this paper proposes to adaptively adjust the pheromone volatility coefficient ρ to overcome the above defects. The change in ρ is a dynamic process from large to small. By adaptively adjusting the pheromone volatility coefficient, the globality of the solution can be improved while ensuring the convergence speed.
As the amount of information on the route is continuously updated during the iteration process, to significantly affect the information on the better route, a larger ρ is set, which is the amplification factor to improve the convergence of the algorithm. Additionally, to prevent the algorithm from premature (overconvergence), its value gradually weakens during iteration. In this paper, the exponential decline method is used to process the set initial amplification factor so that the dynamic change process from large to small is achieved and finally becomes smooth. Therefore, the change formula for the pheromone volatility coefficient ρ is: where ω = e − Nc Nmax , where N max is the maximum number of iterations, N c is the current number of iterations, ρ max is the initial attenuation coefficient, and ρ 0 is a constant of (0,1). According to the formula, ω is an inverse exponential decline function. With the increase in the number of iterations, ω gradually decreases and eventually tends to e −1 .

3) OPTIMIZATION METHOD OF CONVERGENCE EFFICIENCY OF THE ANT COLONY ALGORITHM BASED ON PHEROMONE UPDATE OPTIMIZATION
When all ants complete a round of route search from the beginning to the endpoint, it is necessary to calculate the route length passed by each ant, save the minimum route length, and then update the pheromone concentration of each route. The updating rule of pheromone concentration is the volatile part and increase part, as shown in equations (5) and (6). where, where τ ij (t + 1) is the updated node i to node j route pheromone concentration, τ ij (t) is the current pheromone concentration on the route, during the search of the environment, and τ ij (t) is the sum of the pheromone concentrations emitted by all ants in the search route.
The calculation formula for the information concentration left by each ant after the route is equation (7).
where L k is the total route length that ant k walks after completing the route search, and Q is the pheromone concentration factor carried by an ant. Pheromone concentration is the main reference for ants in the optimization process. Therefore, the pheromone concentration update method directly affects the accuracy and efficiency of the ant colony algorithm. In the traditional algorithm, the pheromone update only depends on the global pheromone update, which causes the algorithm to easily fall into the locally optimal trap [20]. When the global pheromone is updated, each ant iteration is completed, and the route of the ant is obtained [21]. Comparing these routes, arrange them according to the length of the route, strengthen the pheromones on the shorter route, and reduce the pheromones on the longer route. Because the traditional ant colony algorithm leads to the loss of information of the most suitable individuals, the characteristics of real-time update and global update are combined while adding an elite strategy, retaining the most suitable individuals in a generation, and giving the optimal solution after each cycle with additional pheromone. According to the above formulas (5), (6), and (7), the improved pheromone update formula is (8).
where τ * is the route (i, j) caused by the ants on the increase in pheromones, σ is the number of elite ants, and L k finds the optimal solution by the route length. Through real-time and global pheromone updates, ants can avoid falling into a local optimum, prevent premature search convergence, and improve the efficiency of optimization.

A. EXPERIMENTAL DATA AND PROCESSING
In this paper, Beijing Xidan Joy City is selected as the research area, and the video surveillance data of the remaining days are selected as the new dataset for mall crowd, which is divided into 700 image frames. The dataset consists of two parts: the training set and the test set. The training set is taken from crowd pictures of the mall from different angles, most of which have a large number of people to ensure the accuracy of the trained model. The test set was taken from crowd images of specific areas in the mall. Some crowd pictures are shown in Figure 3. The dataset needs to manually mark the position of the heads in the picture to generate the map file required for training. This file stores two key pieces of information: the coordinates of each person's head, and the total number of people. Then, the head tag method is used to generate ground truth density maps. The human head mark map and the corresponding ground truth density map are shown in Figure 4. The algorithm of the improved multiscale convolutional neural network is trained on the TensorFlow network framework [22]. Before training, relevant network parameters are set, among which the momentum parameter is 0.9, the interval of iteration is 50, and the number of training steps is 2,000. Due to the large dataset in this paper, the training accuracy can be guaranteed by using the learning rate lr = 0.00001.
According to the parameters set in the experiment, the best model for this experiment is mcnn_mall_302.h5. This model is in.h5 format, it uses MCNN algorithm to recognize the crowd information in the picture, and then recognizes and extracts the features of the test group, to accurately obtain the shape of the human head and other features in the picture. After that, applying the model to the test set, the crowd density map of the two sample maps in Figure 5 is obtained. In this paper, we use the mean absolute error (MAE) and mean square error (MSE) as the evaluation criteria of the improved MCNN algorithm [23], [24]. Generally, MAE is used to indicate the accuracy of the estimation, and MSE is used to indicate the robustness of the estimation. That is, VOLUME 8, 2020 MAE can better reflect the actual situation of the predicted error. It can avoid the problem of offset deviations. Other, MSE refers to the expected value of the square of the difference between the parameter estimate and the parameter truth value.It can evaluate the variation degree of data. The smaller the value is, the more accurate the prediction model can be in describing the experimental data.
Therefore, at the end of the experimental training, the smaller the values of these two indicators, the better the effect of the model obtained.
To evaluate the performance of the improved MCNN algorithm through MAE and MSE, the mall dataset and two public datasets (ShanghaiTech dataset and UCF CC 50 dataset) are selected to obtain the absolute error and mean square error values by the original MCNN algorithm and the improved MCNN algorithm, respectively. The comparison results are shown in Table 1.

TABLE 1. Multiple data comparison result table
As seen in Table 1, in the collected dataset, the improved MCNN algorithm reduces the index values of MAE and MSE by 10% and 7%, respectively. The comparison results show that in the multiscale convolutional neural network algorithm, the method of using a full convolution layer instead of a fully connected layer can overcome the perspective effect of the picture to a certain extent, making the obtained crowd density map more accurate and the crowd distribution in the crowd density map clearer, which provides a guarantee for determining the location information of high-density people.

2) LOCATION DETERMINATION OF HIGH-DENSITY CROWDS BASED ON A DENSITY MAP
According to the crowd density map obtained, the crowd density map can provide the crowd distribution information in the image. Use the crowd density map to find the area of the high-density crowd and obtain its corresponding position coordinates.
First, obtaining the indoor floor plan of the mall, which conducts the geographic registration in ArcGIS, configures the spatial parameters and vectorizes them and generates the floor plan, as shown in Figure 6.  Finally, according to the location of the fixed stores shown in the figure, the crowd density map is subjected to geographical registration in ArcGIS to place it in the same coordinate system as the indoor floor plan of the mall, and the effect diagram of the density map superimposed on the indoor floor plan is obtained as shown in Figure 8  High densityon the indoor floor plan, which shows the people's position, is shown in Figure 8(b). The Figure shows the position of the crowded area, so it can obtain the safety route initial position and has practical application value. Through the three areas' positions as an example, the optimal evacuation route from this area to the exit is studied.

3) USE THE IMPROVED ANT COLONY ALGORITHM TO DETERMINE THE OPTIMAL EVACUATION ROUTE
(1) Environmental model of shopping malls In this paper, the rectangular coordinate method and ordinal number method are comprehensively used to establish a grid map model. The grid environment model of the market plan in Figure 9 is shown. The black grid represents the obstacle grid, and the white grid represents the free grid. (2) Parameter setting in the ant colony algorithm The key parameters in the ant colony algorithm include the number of ant colonies M and heuristic factors α and β. These parameters have an important impact on the results of global path planning and have important significance for the performance evaluation of the algorithm, but there is no strict theoretical basis. Only through a large number of simulation experiments can the optimal parameter combination be found for a specific problem. This paper analyzes the influence of the above parameters on the entire problem through simulation experiments to find the best combination of parameter values. The setting of these parameters can directly affect the convergence of the algorithm and the efficiency of the algorithm. The grid environment of the mall is used to analyze the selected values of the parameters. The comparison of two relatively different environments is given in Figure 10: the relatively simple environment from the research area to the east gate is shown in the red box; the relatively complex environment from the research area to the south gate is shown in the blue box, which has a concave environment area and many obstacles. By comparing the influence of the setting of each parameter on the relationship between the optimal route length and the number of iterations in the two environments, the optimal parameter combination in the mall environment is obtained.
x The influence of heuristic factors (α, β) on the algorithm The pheromone heuristic factor (α) is an indicator of the relative importance of pheromones in the ant route search process. The larger α, the greater the proportion of pheromones, so that makes it more likely that the next ant will choose the route that the previous ant has already taken. Although the randomness of the search is reduced, the new route is abandoned to a certain extent. When α is too small, the globally optimal solution cannot be found. In this paper, α = 1, 2, 3, 4, . . . , 10 is set for simulation. The influence curves of pheromone heuristics on the path planning algorithm are shown in Figure 11. Figure 11 (a) shows that in the two routes, as α increases, although the optimal route length decreases to some extent, the overall route shows an increasing trend and tends to diverge. Figure 11 (b) shows that as the pheromone heuristic factor (α) increases, the curve of the number of iterations of the route to the east gate and the route to the south gate shows a downward trend as a whole. The curve at the initial moment drops sharply because the increase in the pheromone heuristic factor sharply reduces the transition probability (Pkij) at this time, the probability of the ant colony searching for a new route is reduced, and the ant colony with fewer waves can be found as the optimal route; continuing to increase α, the transition probability (Pkij) continues to decrease, but the decreasing range becomes lower so that the curve of the number of iterations is maintained at a stable decline level. By a comprehensive analysis of Figure 11 (a) and (b), it can be seen that when the pheromone heuristic factor gradually increases, it becomes difficult for the ant colony to find the globally optimal route. Therefore, the optimal value range of α should be [1], [2].
It is expected that the heuristic factor (β) reflects the relative importance of visibility (η ij ) in the route search process of the ant, and its size reflects the strength of the role of the heuristic information in the route search process. The larger β is, the greater the possibility that the ant chooses the shortest local route on a certain node. At this time, although the convergence of the algorithm is accelerated, the randomness of the route search is weakened. In the simulation experiment, β = 1, 2, 3, 4, . . . , 10 are used for the simulation experiment. The influence curves of the expected heuristic factor on the path planning algorithm are shown in Figure 12. Figure 12 (a) shows that in the two routes, as β increases, the length of the globally optimal route gradually decreases. When β = 3, the optimal route lengths to the east gate and the south gate converge to their respective optimal values. Continuing to increase the value of β, the globally optimal route length does not change. Figure 12 (b) shows that with the increase in the β value, the iteration curves of the two route searches both show a downward trend. The iteration curve of the east gate falls faster than the iteration curve of the south gate. Due to the difference in the complexity of the surrounding environment of each route, the layout of the barrier grids near the route to the east gate is scattered, and the shape is relatively single, while the barrier grids near the route to the south gate are very dense and concentrated. It can be seen in Figure 12 that when the β value is in the interval [7], [8], both routes reach their minimum number of iterations, and if the β value is too large, the ant chooses the shortest route on a local node. From this comprehensive analysis, we know that the optimal range of β is [7], [8].
y The effect of the number of ant colonies (M) on the algorithm Theoretically, the larger the number of ants, the better the ability to search the global route, and the more accurate the optimal solution. Searching through a large number of ants will reduce the blindness of the initial search, but it will also produce redundant solutions. As the number of ant colonies continues to increase, the continuous loop can only be closer to the optimal solution, reducing the positive feedback effect of the information, causing a large number of repeated calculations, consuming resources, and increasing time complexity. In this paper, we set the number of ants M = 10, 15, 20, 30, 40,. . . , 190, 200 for simulation. The effect of the number of ants on the route planning algorithm is shown in Figure 13. Figure 13 (a) shows that in the two routes, when the number of ants increases to 20, the optimal route length is obtained. Although the number of ant colonies increases, the route length remains at 20 and 22 and remains unchanged. Figure 13 (b) shows that as the number of ants increases, the entire iteration curve shows a downward trend. At the initial moment, the curve declines rapidly. This is because the number of ants is small, and the wavenumber of ants can only increase by increasing the number of iterations. When the number of ants exceeds the optimal solution time, all the points in the raster map have been traversed, all possible routes have been searched, and the curve begins to smooth. When the iterations of the two routes reach 15 and 22, respectively, should be the best iterations to reach the east gate route and the south gate route. The corresponding number of ants is 50 and 60, which exceed the number of ants when the optimal route length is obtained, as shown in Figure 13(a). (3) Results and analysis of the optimal evacuation route To verify the effectiveness and superiority of the improved ant colony algorithm in path planning, the algorithm is simulated and tested by MATLAB 2017a software. The 35 * 35 environmental grid model is selected for Beijing Xidan Joy City: a relatively complex environment from high-density area 3 to the south gate and a relatively simple environment from high-density area 3 to the east gate. According to the optimization settings of the parameters in the ant colony algorithm in this paper, the relative influence of pheromone α = 2 and the relative influence of heuristic information β = 7 are uniformly selected as the experimental parameter setting values. For the number of ants, the initial ant colony number of ants is set to 60, and the maximum number of iterations is 200 in a more complex environment in the experiment, while the initial ant colony number of ants is set to 50 and the maximum number of iterations is 150 in a simple environment.
In the relatively simple environment near the east gate, the improved path planning and convergence speed of the improved ant colony algorithm and traditional algorithm are shown in Figures 14, 15, and 16.
As seen in Figures 14 and 15, in a relatively simple environment, both algorithms can effectively plan the optimal route, but comparing the convergence speed of the two algorithms, it can be seen that the traditional algorithm finally converges after 20 iterations, and the improved algorithm enters a   convergence state after 15 iterations, so the search speed of the improved algorithm is significantly improved.
The simulation results of the path planning under the relatively complicated environment near the south gate are shown in Figures 17, 18, and 19.   By comparing Figures 17 and 18, it can be seen that in a relatively complicated environment, the path planned by the improved algorithm is shorter, with fewer turning points, and the path planning effect is better. Figure 18 shows the comparison of the optimal route length and convergence speed of the two algorithms. The upper curve is the convergence curve of the traditional algorithm, and the lower curve is the convergence curve of the improved algorithm. The traditional algorithm reaches the minimum route after 59 iterations, and the minimum route length is 24, while the improved algorithm converges to the minimum route after only 20 iterations, and the minimum route length is 22.5, so the search accuracy and speed of the improved algorithm are greatly improved.
In general, the comparison of the experimental results of the two sets of simulations shows that the improved ant colony algorithm has a significant improvement in the number of iterations and the optimal route length compared to the traditional ant colony algorithm, which can reduce the breakpoints of the evacuation route by 25% and the route length by 10%. Additionally, the convergence speed and efficiency of the algorithm improve. Therefore, using the improved ant colony algorithm in this paper, the safe evacuation route can reach the optimal value.

4) SIMULATION OF THE OPTIMAL EVACUATION ROUTE FOR EMERGENCIES
The above research only obtains the best evacuation route in the case of crowded people, but there are still unexpected situations in real life. For example, the ignition point is on the designed optimal route. Can the algorithm bypass the ignition point and find another optimal evacuation route? Figure 20 shows the route map from high-density area 3 to the east gate and south gate in the presence of obstacles.
It can be seen from Figure 20 that the algorithm can still guarantee finding the optimal evacuation route in the presence of an unexpected situation.

IV. DISCUSSION
In this paper, the method is a one-to-one route evacuation, and the final results should be obtained by analyzing the three exits in turn. One-to-many route evacuation cannot be achieved at the same time, which is lacking in time efficiency. In previous studies, Lu et al. [25] proposed a heuristic algorithm, namely, the capacity-constrained path planning algorithm. The model uses a capacity-constrained routing method combined with routing capacity constraints, so this algorithm can give a suboptimal solution to the evacuation planning problem. Zhong et al. [26] proposed an agent-based crowd simulation using an ion model to find heuristic rules for evaluating the exit score of each subregion. The evolutionary algorithm opens the region subdivided into several groups of subareas. Desmet and Gelenbe et al. [15] provided an evacuation support system, and the exit route in the building was designed to minimize evacuation time when the building was fully loaded. According to the appeal study, most of the current research is one-to-one evacuation. Whether it is the planning of an evacuation route or evacuation time, the designated starting point and exit location are determined. In practical applications, in this paper, the method needs to be further improved for the one-to-many optimal evacuation route problem.
Additionally, this paper also has the problem of emergencies at the exit, which cannot be dynamically avoided. In previous research, Gino et al. [16] and Hadzic et al. [17] developed a diversion plan in the event of an accident to ensure that the determined route will not lead people to the accident area. The study of Chou et al. [27] similar to the study in this paper, provides the location of the trapped person to update the best route in a dynamic environment in real time. However, these methods are in the case of good exit settings. The midway route is modified, and the exit of the endpoint cannot be dynamically selected. Although Stepanov and Smith [28] studied the problem of multitarget evacuation routes, they proposed an optimal routing strategy method that repeats the planning for designing emergency evacuation by establishing an integer programming model, it also neglects the problem that the exit cannot be reached. According to the above studies, most of the current studies cannot respond to emergency incidents at the exit. In practical applications, in the event of an emergency at an exit, the exit is avoided in a timely and dynamic manner, and the research of selecting other optimal routes needs to be resolved.

V. CONCLUSION
With the continuous development of the economy and society and the acceleration of the urbanization process, the activities in various public places are increasing, and the consequences of crowding accidents of various groups have caused major casualties and adverse social impacts. Therefore, this paper uses this as a starting point to study how to solve the problem of safe evacuation routes for crowds in shopping malls. For the problem of obtaining high-density locations in shopping malls, image datasets are obtained through video surveillance, the improved multiscale convolutional neural network algorithm is used to improve the model effect, and the crowd density map of the mall is obtained. By using the distribution characteristics of the crowd in the map, the crowded location of high-density crowds is determined. For the optimal evacuation route problem, after modeling the shopping mall environment and optimizing the parameter settings in the algorithm, this paper improves the convergence of the ant colony algorithm through adaptive adjustment, and the pheromone update optimization method is used to improve the convergence speed of the ant colony algorithm. The optimal evacuation route with few inflection points and short moving routes is obtained. In addition, this paper simulates the evacuation route prediction method in the event of emergencies by using the obstacle point setting method, which can also obtain the optimal evacuation route.
The conclusions of this article include the following two points: (1) This paper compares the improved multiscale convolutional neural network algorithm with the traditional algorithm with the ShanghaiTech dataset and the UCF CC 50 dataset and shows that the improved MCNN algorithm can reduce the index values of MAE and MSE by 10% and 7%, respectively. The result shows that the improved method of merging three scales of convolutional neural networks by using a full convolution layer instead of a fully connected layer improves the model obtained by experimental training and can obtain a more accurate crowd density map. Additionally, the distribution characteristics of the crowd density map are used to determine the location of the high-density crowd in the map, and this is used as the initial position of the optimal evacuation route. (2) In the shopping mall environment model, a comparative analysis with the traditional ant colony algorithm shows that the improved algorithm not only improves the convergence speed of the algorithm but also improves the convergence efficiency of the algorithm, which can reduce the inflection point of the evacuation route by 25% and the route length is reduced by 10%, making the route optimal. Additionally, in a sudden situation, that is, when the original optimal route is hindered, in this paper, the method can still find another route to the exit and ensure that the route is the optimal route from the high-density crowd area to the exit. The study of the evacuation route determines the optimal route; it is for one-to-one evacuation, and it is impossible to evacuate multiple exits in the area. Additionally, when there is an emergency at the exit, the exit cannot be dynamically avoided. This problem will be solved in subsequent research.