Personnel evacuation path planning method and system based on gridding people flow density prediction, and storage medium
Through grid flow density prediction and LPA* algorithm dynamically adjusting the evacuation path, the problem of insufficient evacuation strategies in dynamic environments in the existing technology is solved, and rapid and effective evacuation path planning is achieved, which improves evacuation efficiency and safety.
Patent Information
- Application Number
- CN202510528054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-15
AI Technical Summary
The existing path planning algorithms are difficult to deal with changes in densely populated areas in real time in dynamic environments, resulting in insufficient flexibility in evacuation strategies, increasing accident risk, and difficult to meet the safety needs in complex scenarios.
Through grid-based flow density prediction combined with LPA* algorithm, the cost of transfer between grids is dynamically adjusted, the optimal evacuation path is generated, and the path planning is optimized using real-time flow density data.
It realizes rapid and effective evacuation path planning in a dynamic environment, reduces manual intervention, and improves evacuation efficiency and safety.
Smart Images

Figure CN120494228A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path planning, and in particular to a personnel evacuation path planning method, system and storage medium based on grid-based crowd density prediction. Background Art
[0002] With the acceleration of urbanization and the significant increase in population mobility, the safety management of crowded places is gaining increasing public attention. These places, including shopping malls, subway stations, night markets, stadiums, exhibition centers, and concert venues, are indispensable components of modern urban operations. With the increasing scale and frequency of human mobility, these areas not only face the heavy workload of daily operations but also bear the crucial responsibility of ensuring safety during unexpected events or emergencies. Whether managing congestion during peak hours or evacuating people quickly during emergencies, precise and efficient strategies are required to ensure public safety and maintain order. In particular, in scenarios involving human risk, such as sudden stampedes, the orderly evacuation of crowds is crucial to the safety of life and property. Rapid and effective evacuation measures not only minimize casualties but also reduce the risk of secondary accidents caused by the chaos. However, crowded areas are often highly dynamic, and the rapid spread of any localized risk can pose significant challenges to the evacuation process.
[0003] Currently, path planning technologies are mainly divided into two categories. One category is based on the Dijkstra, A*, and other algorithms described in the article by Li Xiang et al., and a series of improved methods. Wang Zhite et al. dynamically assigned weights to the actual cost function and the estimated cost function, and combined Manhattan distance and diagonal distance to design a non-traditional heuristic function to improve the A* path planning algorithm, achieving the shortest global path and reducing pathfinding time and the number of turns. Liu Biyou et al. introduced an evaluation function into A*, added rule judgment, and finally optimized the path smoothness to achieve path planning. Yang Dazhi and Tian Yuhan proposed an improved Dijkstra path planning algorithm by comprehensively considering distance cost and time cost. Feng Li et al. proposed a bidirectional Dijkstra algorithm, performed secondary optimization to achieve node sorting, and combined it with the obstacle avoidance function of the A* algorithm to achieve path planning. The other type is algorithms based on artificial intelligence technology, such as the large-scale crowd path planning technology based on multi-objective differential evolution algorithm proposed by Li Dongrui; Chen Song and Shen Subin used the relationship between the Q learning algorithm and the environmental interaction to construct a structural causal model to remove the confusion effect for path planning; Huo Feizhou and others improved the ant colony algorithm by improving the heuristic function and introducing the pheromone attenuation coefficient to improve the pheromone update method, which can quickly and efficiently plan a smoother optimal evacuation path.
[0004] These algorithms are widely used for path finding and shortest path calculation in static environments, providing effective static path solutions in fields such as urban transportation and navigation systems. However, as environmental complexity increases, these algorithms struggle to cope with real-time changes. Furthermore, these algorithms overly focus on distance, a static factor, in path planning, failing to comprehensively consider other dynamic variables. Without optimization, these algorithms struggle to provide effective, real-time evacuation routes for people. This not only increases management complexity but also the risk of accidents, resulting in inflexible and inefficient evacuation strategies that struggle to meet the complex demands of real-world applications. Summary of the Invention
[0005] In order to overcome the problems in the prior art, the purpose of the present invention is to provide a personnel evacuation path planning method, system and storage medium based on grid-based crowd density prediction. By combining grid management and dynamic path planning technology, the prediction of crowd density and path optimization are realized, providing a fast and effective solution for evacuation, ensuring personnel safety and order stability.
[0006] To achieve the above object, the present invention provides a method for planning a personnel evacuation path based on grid-based crowd density prediction, comprising the following steps:
[0007] S1: Obtain the grid model of the target area and query the historical spatiotemporal crowd density data table of the target area;
[0008] S2: Perform sliding window time series prediction based on the historical spatiotemporal crowd density data table to generate a crowd density set for future grids. Based on the crowd density set for future grids, select the grid with the smallest crowd density as the end point of the evacuation path.
[0009] S3: Obtain the current location, use the current location as the starting point, and generate the optimal evacuation path based on the grid environment status in the target area;
[0010] S4: At regular intervals, re-acquire the historical spatiotemporal crowd density data table and perform sliding window time series prediction to generate a new crowd density set for future time grids; determine whether there is a sudden change grid in the evacuation path; if so, proceed to step S5; if not, keep the current evacuation path unchanged;
[0011] S5: Get the current position and determine whether the current position is already at the end point. If so, end the path planning. If not, further determine whether all the mutation grids are paths that have been traveled. If so, keep the current evacuation path unchanged. If not, return to step S2 to replan the evacuation path.
[0012] Furthermore, in step S1, the grid model of the target area is divided as follows:
[0013] S11: Get the center point o of the target area The latitude and longitude of the center point are converted into three-dimensional coordinate points (x, y, z) on the earth's surface through the S2_LatLng object algorithm. The formula is expressed as follows:
[0014]
[0015] in, is the dimension of the center point, τ o is the longitude of the center point;
[0016] S12: Based on the coordinates (x, y, z) of the center point and the radius r of the target area, calculate the coverage angle θ. The formula is expressed as:
[0017]
[0018] Where R is the average radius of the earth and r is the radius of the target area;
[0019] S13: Determine the grid level range according to the angle θ [L min , L max ], set the maximum number of grids N max , use the getCoverCellsCircle function to generate the grid set C covering the target area;
[0020] Among them, the minimum level L min The chord angle of the largest diagonal of the grid must be ≤θ;
[0021] The maximum level L max The chord angle that satisfies the minimum grid width is ≥θ;
[0022] Grid set C = {Cn|n = 1, 2, ..., N};
[0023] Where Cn represents the grid ID;
[0024] S14: According to the spherical coordinates (x n,v ,y n,v ,Z n,v ), calculate the latitude and longitude coordinates of the four vertices of each grid The formula is:
[0025]
[0026] τ n,v =arctan2(y n,v ,x n,v )
[0027] Among them, n is the nth grid, and v=1, 2, 3, 4 are the four vertices of the grid.
[0028] Furthermore, in step S1, the method for establishing the historical spatiotemporal crowd density data table of the target area is:
[0029] At regular intervals, the crowd density data of the grid Cn in the target area is obtained once to form a historical crowd density data table for the grid Cn. The formula is:
[0030]
[0031] Among them, r nm Represents the grid Cn at t m Traffic flow data at a given time point, m∈{1,2,...,M};
[0032] For the entire target area, the historical spatiotemporal crowd density data table is expressed as:
[0033]
[0034] Furthermore, step S2 includes the following steps:
[0035] S21: Calculate each grid Cn at the future time point t m+1 The predicted value of crowd density at time , the formula is:
[0036]
[0037] Where W is the window size; r n,(m+1)-p is the grid Cn at time t (m+1)-p The historical flow data of people; p∈{0, W-1} is the time offset;
[0038] S22: Integrate all grids in the target area at the future time point t m+1 The predicted value of the pedestrian flow density at time t is used to form the prediction result set Foreacast; the formula is expressed as:
[0039] Foreacast={MA(C1,t m+1 ), MA(C2,t m+1 ),…,MA(C N ,t m+1 )};
[0040] S23: Combine each grid ID and its corresponding crowd density prediction value to generate a grid crowd density set Result at the future moment:
[0041] Result={(C1,MA(C1,t m+1 )),(C2,MA(C2,tm+1 )),…,(C N ,MA(C N ,t m+1 ))}
[0042] S24: Select the grid with the smallest passenger flow from the grid passenger flow density set at the future moment as the destination goal.
[0043] Furthermore, in step S3, the method of using the current location as a starting point and generating an optimal evacuation path according to the grid environment state in the target area includes the following steps:
[0044] S31: Define all grids in the target area as grid nodes, and initialize the g and rhs values of all grid nodes to infinity ∞. The formula is expressed as:
[0045] g(Cn)=∞,rhs(Cn)=∞
[0046] Among them, g(n) is the current shortest path cost from the starting node to the node to be calculated n;
[0047] rhs(n) is the estimated optimal path cost from the starting node to the node n to be calculated;
[0048] S32: Add the starting node to the priority queue openlist, set the rhs value of the starting node to 0, and add the end node goal to the priority queue;
[0049] S33: Calculate the priority key (n) of each node in the priority queue. The calculation formula is:
[0050] key(n)=(min(g(n),rhs(n))+h(n,goal),min(g(n),rhs(n))),
[0051] Where g(n) is the current known shortest path cost from the starting point to the node n to be calculated;
[0052] rhs(n) is the estimated optimal path cost from the starting point to the node n to be calculated;
[0053] h(n, goal) is the estimated distance from the node n to be calculated to the end node goal;
[0054] S34: Select the node n with the lowest priority in the priority queue, remove it from the priority queue, and determine the data size relationship between g(n) and rhs(n) of node n. If g(n)>rhs(n), set g(n)=rhs(n), add the neighbor node k of node n to the priority queue, update the rhs(k) value of the neighbor node k, and set node n as the parent node of the neighbor node k; if g(n)=rhs(n), do not perform other operations; if g(n)<rhs(n), set g(n)=∞, and add node n back to the priority queue, and continue to execute step S34.
[0055] S35: Determine whether the If yes, then the loop ends and goes to step S36, if no, it returns to step S33;
[0056] Step S36: Starting from the end node goal, tracing back to the parent node to the start node, and generating the optimal evacuation path Path.
[0057] Furthermore, in step S34, the calculation method for updating the rhs(k) value of the neighbor node k includes the following steps:
[0058] Step S341: Calculate the impact parameter of the path from node n to its neighbor node k. The formula is expressed as:
[0059]
[0060] Among them: ImpactLevel(n,k) represents the impact parameter of the path node n to its neighbor node k,
[0061] Foottraffic(n,k) represents the pedestrian flow density from node n to neighbor node k;
[0062] eventfactor(n,k) represents the impact value of a specific event;
[0063] and is the weight;
[0064] Step S342: Calculate the transfer cost cost(n,k) from node n to neighbor node k. The formula is:
[0065] cost(n,k)=basecost(n,k)*(1+ImpactLevel(n,k)),
[0066] Among them, basecost(n,k) is the basic cost from node n to neighbor node k;
[0067] Step S343: Calculate the rhs(k) value of neighbor node k, which is expressed as:
[0068]
[0069] Among them, n∈Neighbors(k) means that node n is a neighbor unit of node k.
[0070] Further, the step S4 includes the following steps:
[0071] S41: At regular intervals, the historical spatiotemporal crowd density data table is retrieved and a sliding window time series forecast is performed to generate the latest predicted crowd density set Result_new for the future grid.
[0072] S42: Obtain the crowd density set Result of the grid at the future time predicted in step S2;
[0073] S43: A threshold value of crowd density change is set to α. The crowd density of all grids in the target area at the latest predicted future moment is calculated as a difference with the crowd density of the grids at the future moment predicted in step S2. If there is a grid that satisfies Result_new-Result>α, the grid is marked as a sudden change grid.
[0074] S44: Obtain the evacuation path Path obtained in step S3, and determine whether there is a mutation grid in the evacuation path Path. If so, execute step S5; if not, maintain the current evacuation path Path.
[0075] The present invention also provides a personnel evacuation path planning system based on grid-based crowd density prediction, comprising:
[0076] The grid division module is used to divide the target area into multiple grids, extract the longitude and latitude coordinates of the vertices of each unit, and establish a spatial topological structure;
[0077] The data acquisition and prediction module connects the database and real-time sensors to obtain historical crowd density data of the grid and generate future crowd density prediction values;
[0078] The evacuation path planning module is used to dynamically adjust the inter-grid transfer cost according to the crowd density and emergencies, and generate an evacuation path with the optimal real-time crowd density;
[0079] Storage module: used to store historical spatiotemporal crowd density data tables and evacuation routes.
[0080] The present invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of any of the above methods.
[0081] This invention, based on grid-based crowd density prediction, evacuation route planning allows for flexible adjustment of parameters such as the moving average window size and grid division size to accommodate different environmental characteristics and planning requirements. By integrating grid-based crowd density predictions, dynamically adjusting inter-grid transfer costs, and rapidly optimizing evacuation routes based on the LPA* algorithm, this method effectively avoids congestion, reduces manual intervention, and improves evacuation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 A flowchart of a method for planning a personnel evacuation path based on grid-based crowd density prediction provided in Example 1 of the present invention; DETAILED DESCRIPTION
[0083] The present invention provides a method for planning a personnel evacuation path based on grid-based crowd density prediction, such as Figure 1 As shown, the following steps are included:
[0084] S1: Obtain the grid model of the target area and query the historical spatiotemporal crowd density data table of the target area.
[0085] Furthermore, in step S1, the grid model of the target area is divided as follows:
[0086] S11: Get the center point o of the target area The latitude and longitude of the center point are converted into three-dimensional coordinate points (x, y, z) on the earth's surface through the S2_LatLng object algorithm. The formula is expressed as follows:
[0087]
[0088] in, is the dimension of the center point, τ o is the longitude of the center point.
[0089] S12: Based on the coordinates (x, y, z) of the center point and the radius r of the target area, calculate the coverage angle θ. The formula is expressed as:
[0090]
[0091] Where R is the average radius of the Earth and r is the radius of the target area.
[0092] S13: Determine the grid level range [Lmin, Lmax] according to the angle θ and set the maximum number of grids N max , use the getCoverCellsCircle function to generate the grid set C covering the target area;
[0093] Among them, the minimum level L minThe chord angle of the largest diagonal of the grid must be ≤θ;
[0094] The maximum level L max The chord angle that satisfies the minimum grid width is ≥θ;
[0095] Grid set C = {Cn|n = 1, 2, ..., N};
[0096] Wherein, Cn represents the grid ID.
[0097] S14: According to the spherical coordinates (x n,v ,y n,v ,Z n,v ), calculate the latitude and longitude coordinates of the four vertices of each grid The formula is:
[0098]
[0099] τ n,v =arctan2(y n,v ,x n,v )
[0100] Among them, n is the nth grid, and v=1, 2, 3, 4 are the four vertices of the grid.
[0101] Furthermore, in step S1, the method for establishing the historical spatiotemporal crowd density data table of the target area is:
[0102] At every interval T, the crowd density data of the grid Cn in the target area is obtained to form a historical crowd density data table of the grid Cn. The formula is expressed as follows:
[0103]
[0104] Among them, r nm Represents the grid Cn at t m Traffic flow data at a certain time point, m∈{1,2,...,M}.
[0105] For the entire target area, the historical spatiotemporal crowd density data table is expressed as:
[0106]
[0107] S2: Perform sliding window time series prediction based on the historical spatiotemporal crowd density data table to generate a crowd density set for future grids. Based on the crowd density set for future grids, select the grid with the smallest crowd density as the end point of the evacuation path.
[0108] Specifically, step S2 includes the following steps:
[0109] S21: Calculate the predicted value of the crowd density of each grid Cn at the future time point tm+1. The formula is:
[0110]
[0111] Where W is the window size; r n,(m+1)-p is the grid Cn at time t (m+1)-p The historical flow data of people; p∈{0, W-1} is the time offset.
[0112] S22: Integrate all grids in the target area at the future time point t m+1 The predicted value of the pedestrian flow density at time t is used to form the prediction result set Foreacast; the formula is expressed as:
[0113] Foreacast={MA(C1,t m+1 ), MA(C2,t m+1 ), ..., MA(C N ,t m+1 )}.
[0114] S23: Combine each grid ID and its corresponding crowd density prediction value to generate a grid crowd density set Result at the future moment:
[0115] Result={(C1,MA(C1,t m+1 )),(C2,MA(C2,t m+1 )),…,(C N ,MA(C N ,t m+1 ))}
[0116] S24: Select the grid with the smallest passenger flow from the grid passenger flow density set at the future moment as the destination goal.
[0117] S3: Obtain the current location, use the current location as the starting point, and generate the optimal evacuation path based on the grid environment status in the target area.
[0118] Specifically, in step S3, the LPA* algorithm is used to implement the method of using the current location as the starting point and generating the optimal evacuation path according to the grid environment state in the target area, including the following steps:
[0119] S31: Define all grids in the target area as grid nodes, and initialize the g and rhs values of all grid nodes to infinity ∞. The formula is expressed as:
[0120] g(Cn)=∞,rhs(Cn)=∞
[0121] Where g(N) is the current shortest path cost from the starting node to the node to be calculated n;
[0122] rhs(n) is the estimated optimal path cost from the starting node to the node n to be calculated.
[0123] S32: Add the starting point node to the priority queue openlist, set the rhs value of the starting point node to 0, and add the end point node goal to the priority queue.
[0124] S33: Calculate the priority key (n) of each node in the priority queue. The calculation formula is:
[0125] key(n)=(min(g(n),rhs(n))+h(n,goal),min(g(n),rhs(n))),
[0126] Where g(n) is the current known shortest path cost from the starting point to the node n to be calculated;
[0127] rhs(n) is the estimated optimal path cost from the starting point to the node n to be calculated;
[0128] h(n, goal) is the estimated distance from the node to be calculated n to the end node goal.
[0129] S34: Select the node n with the lowest priority in the priority queue, remove it from the priority queue, and determine the data size relationship between g(n) and rhs(n) of node n. If g(n)>rhs(n), set g(n)=rhs(n), add the neighbor node k of node n to the priority queue, update the rhs(k) value of the neighbor node k, and set node n as the parent node of the neighbor node k; if g(n)=rhs(n), do not perform other operations; if g(n)<rhs(n), set g(n)=∞, and add node n back to the priority queue, and continue to execute step S34.
[0130] Furthermore, in step S34, the calculation method for updating the rhs(k) value of the neighbor node k includes the following steps:
[0131] Step S341: Calculate the impact parameter of the path from node n to its neighbor node k. The formula is expressed as:
[0132]
[0133] Among them: ImpactLevel(n,k) represents the impact parameter of the path node n to its neighbor node k,
[0134] Foottraffic(n,k) represents the pedestrian flow density from node n to neighbor node k;
[0135] eventfactor(n,k) represents the impact value of a specific event, such as sudden fires, stampedes, and other events.
[0136] and is the weight, which is set according to the density of people flow and the degree of specific events.
[0137] Step S342: Calculate the transfer cost cost(n,k) from node n to neighbor node k. The formula is:
[0138] cost(n,k)=basecost(n,k)*(1+ImpactLevel(n,k))
[0139] Among them, basecost(n,k) is the basic cost from node n to neighbor node k.
[0140] Step S343: Calculate the rhs(k) value of neighbor node k, which is expressed as:
[0141]
[0142] Among them, n∈Neighbors(k) means that node n is a neighbor unit of node k.
[0143] S35: Determine whether the If yes, the loop ends and proceeds to step S36; if no, it returns to step S33.
[0144] Step S36: Starting from the end node goal, trace back to the parent node g(n-1)+cost(n,n-1) to the starting node to generate the optimal evacuation path Path.
[0145] S4: At regular intervals, the historical spatiotemporal crowd density data table is retrieved and a sliding window time series forecast is performed to generate a new crowd density set for future time grids. A determination is made as to whether there is a sudden change in the evacuation path. If so, proceed to step S5; if not, the current evacuation path remains unchanged.
[0146] Further, the step S4 includes the following steps:
[0147] S41: Every ten minutes, the historical spatiotemporal crowd density data table is retrieved, and a sliding window time series forecast is performed to generate the latest predicted crowd density set Result_new for the future grid.
[0148] S42: Obtain the crowd density set Result of the grid at the future time predicted in step S2.
[0149] S43: The threshold of change in crowd density is preset as α. The crowd density of all grids in the target area at the latest predicted future moment is calculated as a difference with the crowd density of the grids at the future moment predicted in step S2. If there is a grid that satisfies Result_new-Result>α, the grid is marked as a mutation grid.
[0150] S44: Obtain the evacuation path Path obtained in step S3, and determine whether there is a mutation grid in the evacuation path Path. If so, execute step S5; if not, maintain the current evacuation path Path.
[0151] S5: Get the current position and determine whether the current position is already at the end point. If so, end the path planning. If not, further determine whether all the mutation grids are paths that have been traveled. If so, keep the current evacuation path unchanged. If not, return to step S2 to replan the evacuation path.
[0152] Example 2:
[0153] The present invention further provides a personnel evacuation path planning system based on grid-based crowd density prediction, which is used to implement the personnel evacuation path planning method based on grid-based crowd density prediction as described in the above embodiment 1, including:
[0154] The grid division module is used to divide the target area into multiple grids, extract the longitude and latitude coordinates of the vertices of each unit, and establish a spatial topological structure;
[0155] The data acquisition and prediction module connects the database and real-time sensors to obtain historical crowd density data of the grid and generate future crowd density prediction values;
[0156] The evacuation path planning module is used to dynamically adjust the inter-grid transfer cost according to the crowd density and emergencies, and generate an evacuation path with the optimal real-time crowd density;
[0157] Storage module: used to store historical spatiotemporal crowd density data tables and evacuation routes.
[0158] Example 3:
[0159] The present application also discloses a computer-readable storage medium, which includes a stored computer program. When the computer program is executed, the device containing the computer-readable storage medium is controlled to execute the method for planning a personnel evacuation path based on grid-based crowd density prediction according to the first embodiment. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a ROM, an erasable programmable read-only memory, a hard disk, a CD-ROM, a magnetic storage device, or any suitable combination of the foregoing, or any other form of computer-readable storage medium known in the art.
[0160] The three embodiments described above are only preferred specific implementation methods of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with this technical field, within the technical scope disclosed by the present invention, can make equivalent replacements or changes based on the technical solutions and inventive concepts of the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for evacuation path planning based on grid-based crowd density prediction, characterized in that: The following steps are involved: S1: Obtain the grid model of the target area and query the historical spatiotemporal crowd density data table of the target area; S2: Perform sliding window time series prediction based on the historical spatiotemporal crowd density data table to generate a crowd density set for future grids. Based on the crowd density set for future grids, select the grid with the smallest crowd density as the end point of the evacuation path. S3: Obtain the current location, use the current location as the starting point, and generate the optimal evacuation path based on the grid environment status in the target area; S4: At every set time interval, re-acquire the historical spatiotemporal crowd density data table and perform sliding window time series prediction to generate a new crowd density set for future time grids; determine whether there is a sudden change grid in the evacuation path; if so, proceed to step S5; if not, keep the current evacuation path unchanged; S5: Get the current position and determine whether the current position is already at the end point. If so, end the path planning. If not, further determine whether all the mutation grids are paths that have been traveled. If so, keep the current evacuation path unchanged. If not, return to step S2 to replan the evacuation path.
2. The method for planning evacuation routes based on grid-based crowd density prediction according to claim 1, characterized in that: In step S1, the grid model of the target area is divided as follows: S11: Get the center point o of the target area The latitude and longitude of the center point are converted into three-dimensional coordinate points (x, y, z) on the earth's surface through the S2_LatLng object algorithm. The formula is expressed as follows: in, is the latitude of the center point, τo is the longitude of the center point; S12: Based on the coordinates (x, y, z) of the center point and the radius r of the target area, calculate the coverage angle θ. The formula is expressed as: Where R is the average radius of the earth and r is the radius of the target area; S13: Determine the grid level range according to the angle θ [L min , L max ], set the maximum number of grids N max , use the getCoverCellsCircle function to generate the grid set C covering the target area; Among them, the minimum level L min The chord angle of the largest diagonal of the grid must be ≤θ; The maximum level L max The chord angle that satisfies the minimum grid width is ≥θ; Grid set C = {Cn|n = 1, 2, ..., N}; Where Cn represents the grid ID; S14: According to the spherical coordinates (x n,v ,y n,v ,Z n,v ), calculate the latitude and longitude coordinates of the four vertices of each grid The formula is: t n,v =arctan2(y n,v ,x n,v ) Among them, n is the nth grid, and v=1, 2, 3, 4 are the four vertices of the grid.
3. The method for planning evacuation routes based on grid-based crowd density prediction according to claim 1, characterized in that: In step S1, the method for establishing the historical spatiotemporal crowd density data table of the target area is: At regular intervals, the crowd density data of the grid Cn in the target area is obtained once to form a historical crowd density data table for the grid Cn. The formula is: Historical Renliu(rnm) ={r n1 ,r n2 ,...,r nM }, Among them, r nm Represents the grid Cn at t m Traffic flow data at a given time point, m∈{1,2,...,M}; For the entire target area, the historical spatiotemporal crowd density data table is expressed as:
4. The method for planning evacuation routes based on grid-based crowd density prediction according to claim 1, characterized in that: The step S2 comprises the following steps: S21: Calculate each grid Cn at the future time point t m+1 The predicted value of crowd density at time , the formula is: Where W is the window size; r n ,(m+1)-p is the historical flow data of grid Cn at time t(m+1)-p; p∈{0, W-1} is the time offset; S22: Integrate all grids in the target area at the future time point t m+1 The predicted value of the pedestrian flow density at time t is used to form the prediction result set Foreacast; the formula is expressed as: Foreacast={MA(C1,t m+1 ),MA(C2,t m+1 ),…,MA(C N ,t m+1 )}; S23: Combine each grid ID and its corresponding crowd density prediction value to generate a grid crowd density set Result at the future moment: Result={(C1,MA(C1,t m+1 )),(C2,MA(C2,t m+1 )),…,(C N ,MA(C N ,t m+1 ))}; S24: Select the grid with the smallest passenger flow from the grid passenger flow density set at the future moment as the destination goal.
5. The method for planning evacuation routes based on grid-based crowd density prediction according to claim 1, characterized in that: In step S3, the method of using the current location as a starting point and generating an optimal evacuation path according to the grid environment state in the target area includes the following steps: S31: Define all grids in the target area as grid nodes, and initialize the g and rhs values of all grid nodes to infinity ∞. The formula is expressed as: g(Cn)=∞,rhs(Cn)=∞ Where g(n) is the current known shortest path cost from the starting node to the node to be calculated n; rhs(n) is the estimated optimal path cost from the starting node to the node n to be calculated; S32: Add the starting point node to the priority queue openlist, set the rhs value of the starting point node to 0, and add the end point node goal to the priority queue; S33: Calculate the priority key (n) of each node in the priority queue. The calculation formula is: key(n)=(min(g(n),rhs(n))+h(n,goal),min(g(n),rhs(n))), Where g(n) is the current known shortest path cost from the starting point to the node n to be calculated; rhs(n) is the estimated optimal path cost from the starting point to the node n to be calculated; h(n, goal) is the estimated distance from the node n to be calculated to the end node goal; S34: Select the node n with the lowest priority in the priority queue, remove it from the priority queue, and determine the size relationship between the g(n) and rhs(n) data of node n. If g(n)>rhs(n), set g(n)=rhs(n), add the neighbor node k of node n to the priority queue, update the rhs(k) value of the neighbor node k, and set node n as the parent node of the neighbor node k; if g(n)=rhs(n), do not perform other operations; if g(n)<rhs(n), set g(n)=∞, re-add node n to the priority queue, and continue to execute step S34; S35: Determine whether If yes, then the loop ends and goes to step S36; if no, then returns to step S33; Step S36: Starting from the end node goal, tracing back to the parent node to the start node, and generating the optimal evacuation path Path.
6. The method for planning evacuation routes based on grid-based crowd density prediction according to claim 5, characterized in that: In step S34, the calculation method for updating the rhs(k) value of the neighbor node k includes the following steps: Step S341: Calculate the impact parameter of the path from node n to its neighbor node k. The formula is expressed as: Among them: ImpactLevel(n,k) represents the impact parameter of the path node n to its neighbor node k; Foottraffic(n,k) represents the pedestrian flow density from node n to neighbor node k; eventfactor(n,k) represents the impact value of a specific event; and is the weight; Step S342: Calculate the transfer cost cost(n,k) from node n to neighbor node k. The formula is: cost(n,k)=basecost(n,k)*(1+ImpactLevel(n,k)) Among them, basecost(n,k) is the basic cost from node n to neighbor node k; Step S343: Calculate the rhs(k) value of neighbor node k, which is expressed as: Among them, n∈Neighbors(k) means that node n is a neighbor unit of node k.
7. The method for planning evacuation routes based on grid-based crowd density prediction according to claim 5, characterized in that: The step S4 comprises the following steps: S41: At every set time interval, re-acquire the historical spatiotemporal crowd density data table, perform sliding window time series prediction, and generate the latest predicted crowd density set Result_new for the future grid; S42: Obtain the crowd density set Result of the grid at the future time predicted in step S2; S43: A threshold value of crowd density change is set to α. The crowd density of all grids in the target area at the latest predicted future moment is calculated as a difference with the crowd density of the grids at the future moment predicted in step S2. If there is a grid that satisfies Result_new-Result>α, the grid is marked as a sudden change grid. S44: Obtain the evacuation path Path obtained in step S3, and determine whether there is a mutation grid in the evacuation path Path. If so, execute step S5; if not, maintain the current evacuation path Path.
8. A personnel evacuation path planning system based on grid-based crowd density prediction, used to implement a personnel evacuation path planning method based on grid-based crowd density prediction as described in any one of claims 1 to 7, characterized in that: include: The grid division module is used to divide the target area into multiple grids, extract the longitude and latitude coordinates of the vertices of each unit, and establish a spatial topological structure; The data acquisition and prediction module connects the database and real-time sensors to obtain historical crowd density data of the grid and generate future crowd density prediction values; The evacuation path planning module is used to dynamically adjust the inter-grid transfer cost according to the crowd density and emergencies, and generate an evacuation path with the optimal real-time crowd density; Storage module: used to store historical spatiotemporal crowd density data tables and evacuation routes.
9. A computer-readable storage medium, characterized in that Used to store a computer program, when the program is executed by a processor, to implement the steps of a personnel evacuation path planning method based on grid-based crowd density prediction as described in any one of claims 1-7.