Park congestion prediction method based on population density heatmap and trajectory backtracking

By generating time-series heatmaps of personnel density and trajectory backtracking, and combining personnel density, speed, trajectory direction conflicts, and inflow and outflow volumes, the problem of false alarms and missed alarms in park congestion monitoring in existing technologies has been solved, and accurate differentiation and prediction of different activity states have been achieved.

CN123117475APending Publication Date: 2026-11-17HEBEI LANGTU DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611480125.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-08-28
Filing Date
2026-09-22
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies for monitoring congestion in industrial parks rely solely on the number or density thresholds of people, which can easily confuse high-density orderly passage and normal static gatherings with real congestion, leading to false alarms or missed alarms. Furthermore, they fail to effectively reflect the evolution of people's activity status.

Method used

By generating time-series heatmaps of population density and trajectory backtracking, and combining population density, speed, trajectory direction conflicts, and inflow and outflow volumes, different activity states are distinguished, and regional-specific judgment thresholds are set based on historical data to predict future congestion risks.

Benefits of technology

It effectively distinguishes between normal traffic and congestion, reduces misjudgments, identifies potential directional conflict risks, and improves the accuracy and adaptability of congestion prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117475A_ABST
    Figure CN123117475A_ABST
Patent Text Reader

Abstract

This invention discloses a method for predicting park congestion based on population density heatmaps and trajectory backtracking, relating to the field of smart parks. The method acquires spatial structure data of the park and personnel location data with the time of collection, dividing the park into spatial units and generating a time-series population density heatmap. Within a preset backtracking time window, it correlates personnel location data to form trajectory segments, extracting average movement speed, personnel dwell time, trajectory direction distribution, personnel inflow, and personnel outflow, and calculating the degree of trajectory direction conflict. Combining population density changes, speed decay, personnel dwell time, direction conflict, and personnel backlog, it identifies personnel activity states, constructs a state sequence, predicts future congestion risks, and outputs the predicted congestion area, occurrence time, congestion type, and congestion level. This invention can distinguish between high-density orderly passage, static gathering, and actual congestion, improving the accuracy and timeliness of park congestion early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart parks, and in particular to a method for predicting park congestion based on population density heat maps and trajectory backtracking. Background Technology

[0002] With the development of smart park construction, personnel flow monitoring within parks is increasingly being applied to scenarios such as access management, security early warning, and emergency evacuation. Existing methods for monitoring personnel congestion typically acquire information on the number and location of people through cameras, access control devices, or positioning devices, and then calculate personnel density according to preset areas. When the personnel density exceeds a set threshold, it is determined that there is a risk of congestion in the corresponding area.

[0003] However, high population density does not necessarily indicate congestion. For example, at park entrances and exits, activity areas, rest areas, or during peak traffic periods, there may be situations where population density is high but movement is uniform, traffic speed is normal, and people can continuously leave. Conversely, in areas with intersections or narrow passages, even if population density has not reached a preset threshold, congestion may still occur due to people moving in opposite directions, intersecting trajectories, or a sustained inflow exceeding outflow. Judging solely based on population number or density thresholds can easily confuse high-density orderly traffic and normal static gatherings with genuine congestion, leading to false alarms or missed alarms.

[0004] While some existing technologies incorporate personnel trajectories or movement speeds to aid in judgment, they typically only statistically analyze the trajectory status at the current moment. They fail to combine changes in personnel density, personnel dwell time, trajectory direction conflicts, and personnel inflow and outflow relationships over continuous time periods to distinguish different personnel activity states. Furthermore, they are difficult to reflect the evolution process from normal traffic flow to queuing, directional conflicts, or bottleneck congestion.

[0005] To address this, a method for predicting park congestion based on population density heatmaps and trajectory backtracking is proposed. Summary of the Invention

[0006] The main objective of this invention is to provide a method for predicting park congestion based on population density heatmaps and trajectory backtracking, which can effectively solve the problems in the background technology.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] The park congestion prediction method based on population density heatmaps and trajectory backtracking includes the following steps:

[0009] S1. Obtain spatial structure data of the target park and personnel location data with the collection time, divide the target park into multiple spatial units, and configure effective passage area, area type and passage capacity for each spatial unit;

[0010] S2. Map the personnel location data collected continuously to the corresponding spatial units, count the number of personnel and personnel density changes in each spatial unit, and generate a time-series personnel density heat map.

[0011] S3. For the personnel location data in each spatial unit, perform trajectory backtracking within a preset backtracking time window to obtain trajectory segments of personnel in each spatial unit and between adjacent spatial units. Extract average moving speed, personnel dwell time, trajectory direction distribution, personnel inflow and outflow based on the trajectory segments, and calculate the degree of trajectory direction conflict based on the trajectory direction distribution.

[0012] S4. Based on the personnel density, density change, average movement speed, personnel dwell time, trajectory direction conflict degree, and the difference between personnel inflow and outflow in each spatial unit, determine the personnel activity status corresponding to each spatial unit; wherein, the personnel activity status includes normal passage status, high-density orderly passage status, static gathering status, queue backlog status, directional conflict status, and bottleneck congestion status.

[0013] S5. Construct a sequence of personnel activity status based on the personnel activity status and corresponding feature changes of each spatial unit at continuous acquisition time, predict the probability and feature prediction value of the candidate personnel activity status of each spatial unit in the future time window, and determine the congestion risk based on the probability and feature prediction value of the candidate personnel activity status.

[0014] S6. Output the expected congestion area, expected occurrence time, congestion type, and congestion level based on the congestion risk.

[0015] Furthermore, in step S1, a park access topology map is established based on the accessibility relationships between spatial units:

[0016]

[0017] in, Represents a set of spatial unit nodes. This represents the set of passable connecting edges between spatial units; the area types include passage areas, intersection areas, entrance / exit areas, queuing service areas, and personnel gathering areas.

[0018] Furthermore, in step S2, the spatial unit At the time of collection The density state characteristics are as follows:

[0019]

[0020] in, Representing spatial units At the time of collection population density Representing spatial units The number of people inside, Representing spatial units The effective passage area, Indicates the rate of change in population density. This indicates the time interval between adjacent data collection moments.

[0021] Furthermore, in step S3, the personnel location data are associated according to the anonymous trajectory identifier and the collection time, and the spatial units that the same person passes through continuously within the preset retrospective time window and the duration of stay in each spatial unit are combined into trajectory segments.

[0022] Based on the trajectory segments, determine the personnel's movement speed vector, the number of trajectories entering the space unit, the number of trajectories leaving the space unit, and the proportion of personnel whose stay time exceeds the benchmark stay time of the corresponding space unit;

[0023] The degree of speed decay is determined based on the ratio of the current average moving speed of the space unit to the corresponding baseline average moving speed, the degree of personnel dwell time is determined based on the personnel ratio, and the degree of personnel backlog is determined based on the degree to which the inflow of personnel exceeds the outflow of personnel.

[0024] Furthermore, in step S3, the spatial unit At the time of collection The degree of conflict in trajectory direction is:

[0025]

[0026] in, Representing spatial units The number of trajectories with valid directions of movement. and They represent the first The trajectory and the first The unit movement direction vector of the trajectory. Indicates the angle threshold for directional conflict. Indicates the characteristic function; when At that time, determine the degree of conflict in the trajectory direction. It is zero.

[0027] Furthermore, in step S4:

[0028] When the personnel density is lower than the first density threshold, the speed attenuation is lower than the first speed attenuation threshold, the trajectory direction conflict is lower than the first conflict threshold, and the personnel backlog is lower than the first backlog threshold, the space unit is determined to be in a normal passage state.

[0029] When the personnel density reaches the first density threshold, the speed attenuation is lower than the first speed attenuation threshold, the trajectory direction conflict is lower than the first conflict threshold, and the personnel backlog is lower than the first backlog threshold, the spatial unit is determined to be in a high-density orderly passage state.

[0030] When the population density reaches the first density threshold, the population dwell time reaches the dwell time threshold, and the area type of the spatial unit is a population gathering area, the spatial unit is determined to be in a static gathering state.

[0031] When the degree of trajectory direction conflict is lower than the first conflict threshold, the degree of speed attenuation reaches the second speed attenuation threshold, and the degree of personnel backlog reaches the second backlog threshold within a preset continuous time period, the spatial unit is determined to be in a queuing backlog state.

[0032] When the degree of trajectory direction conflict reaches the second conflict threshold and the degree of velocity attenuation reaches the second velocity attenuation threshold, the spatial unit is determined to be in a direction conflict state.

[0033] When the personnel density reaches the second density threshold, the speed decay reaches the second speed decay threshold, and the personnel backlog reaches the second backlog threshold within the preset continuous time period, the space unit is determined to be in a bottleneck congestion state.

[0034] Wherein, the second density threshold is not less than the first density threshold, the second velocity attenuation threshold is greater than the first velocity attenuation threshold, the second conflict threshold is greater than the first conflict threshold, and the second backlog threshold is greater than the first backlog threshold; each threshold is determined based on the region type of the corresponding spatial unit and historical normal passage data.

[0035] Furthermore, in step S5, the activity status of personnel in the same spatial unit is sorted according to the collection time, the historical state transition frequency between different activity statuses is counted, and the historical state transition frequency is normalized into a state transition probability.

[0036] Based on the current personnel activity status of the spatial unit, the state transition probability, and the temporal changes in personnel density, average movement speed, personnel dwell time, trajectory direction conflict degree, and personnel backlog degree, the probability of candidate personnel activity status and the characteristic prediction value corresponding to each future prediction time are determined.

[0037] Furthermore, spatial units Future prediction time The congestion risk is:

[0038]

[0039] in, This represents a monotonic normalization function that maps input values ​​to a preset risk range. This indicates the predicted population density relative to the passage capacity of a spatial unit. Indicates the degree of predicted speed decay. Indicates the degree of conflict in the predicted trajectory direction. Indicates the predicted degree of visitor stay. This indicates the predicted level of personnel backlog. This represents the predicted probability of a high-density, orderly passage state. This represents the predicted probability of a static clustered state. , , , , , and These represent the corresponding non-negative weights;

[0040] The predicted time when the congestion risk first reaches the risk threshold is determined as the expected occurrence time. The congestion type is determined based on the predicted probabilities of the queue backlog state, directional conflict state, and bottleneck congestion state corresponding to the predicted time. The congestion level is determined based on the preset risk range in which the congestion risk is located.

[0041] A park congestion prediction system based on population density heatmaps and trajectory backtracking includes:

[0042] The data acquisition and spatial modeling module is used to acquire spatial structure data of the target park and personnel location data with the time of collection, divide the target park into multiple spatial units, and configure the effective passage area, area type and passage capacity of each spatial unit.

[0043] The heat map generation module is used to map the location data of people at continuously collected times to the corresponding spatial units, count the number of people and changes in personnel density in each spatial unit, and generate a time-series personnel density heat map.

[0044] The trajectory backtracking module is used to associate personnel location data within a preset backtracking time window to obtain personnel trajectory segments, and extract average moving speed, personnel dwell time, trajectory direction distribution, personnel inflow and outflow based on the personnel trajectory segments, as well as calculate the degree of trajectory direction conflict.

[0045] The status recognition module is used to determine the activity status of personnel in each spatial unit based on the personnel density heat map and trajectory backtracking results;

[0046] The congestion prediction module is used to predict the probability and feature prediction values ​​of candidate personnel activity status for each spatial unit within a future time window based on the personnel activity status and corresponding feature changes during continuous data collection, and to determine the congestion risk, expected occurrence time, congestion type, and congestion level.

[0047] The results output module is used to output the park congestion prediction results.

[0048] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] 1. This invention maps continuously collected personnel location data to park spatial units to generate a time-series personnel density heat map, and traces personnel trajectories within a preset time window. It can simultaneously obtain the spatial aggregation status and dynamic passage status of personnel, avoiding the judgment of congestion based solely on the number or density of personnel at a single moment.

[0051] 2. Based on personnel density, density change, average movement speed, personnel dwell time, degree of trajectory direction conflict, and the difference between personnel inflow and outflow, this invention distinguishes personnel activity states such as normal passage, high-density orderly passage, static gathering, queue backlog, directional conflict, and bottleneck congestion. It can reduce misjudgment of normal high-density passage and normal personnel gathering, and identify the risk of directional conflict that has not yet reached the high-density threshold.

[0052] 3. The present invention determines the corresponding judgment threshold based on the area type of the spatial unit and historical normal passage data, so that different areas can adopt the state judgment standard that is compatible with their passage function, reducing the judgment deviation caused by functional differences between park passages, intersection areas, entrances and exits, queuing service areas and personnel gathering areas.

[0053] 4. The present invention determines the corresponding judgment threshold based on the area type of the spatial unit and historical normal passage data, so that different areas can adopt the status judgment standard that is compatible with their passage function, reducing the judgment deviation caused by functional differences between park passages, intersection areas, entrances and exits, queuing service areas and personnel gathering areas. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0055] Figure 2 This is a schematic diagram of the system modules of the present invention. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0057] Example 1

[0058] like Figure 1-2 As shown, the campus congestion prediction method based on personnel density heatmap and trajectory backtracking is applied to target campuses including office buildings, production areas, campus roads, entrances and exits, canteens, rest areas and parking areas.

[0059] The target park is equipped with at least one of the following: video surveillance equipment, access control equipment, and personnel positioning equipment, used to obtain personnel location data with the time of collection. To reduce reliance on personal identification information, personnel identities can be converted into anonymous trajectory identifiers before the personnel location data enters the congestion prediction system, so that the same anonymous trajectory identifier can only be used to associate location records within a preset time range.

[0060] The method includes the following steps.

[0061] S1. Acquire park data and divide spatial units

[0062] Acquire spatial structure data of the target park and personnel location data with the time of collection.

[0063] The spatial structure data includes park boundaries, building locations, road locations, entrance and exit locations, passage widths, obstacle locations, and the passability relationships between different areas.

[0064] Based on the park's road boundaries, building functions, and pedestrian traffic characteristics, the target park is divided into multiple spatial units. These spatial units can be divided using a fixed grid or by varying areas according to the park's actual functions.

[0065] In this embodiment, the narrow corridor is divided into a passage area, the intersection of roads is divided into an intersection area, the turnstiles and building entrances are divided into entrance and exit areas, the windows, elevator entrances and access control waiting areas are divided into queuing service areas, and the square, rest area and activity area are divided into people gathering areas.

[0066] Configure each spatial unit as follows:

[0067] Spatial unit identifier; effective passage area; area type; baseline average moving speed; baseline dwell time; passage capacity; adjacent passable spatial units.

[0068] The effective passage area is the area available for people to pass through or stay in after deducting fixed facilities, greenery, walls, and impassable areas.

[0069] Establish a park access topology map based on the accessibility relationships between spatial units:

[0070]

[0071] in, Represents a set of spatial unit nodes. This represents the set of accessible connecting edges between spatial units.

[0072] When personnel can be transported by spatial units Directly enter the space unit When needed, connecting edges are established between corresponding nodes. The connecting edges can also be configured with the direction of travel, channel width, and historical average travel time.

[0073] S2. Generate a time-series personnel density heatmap

[0074] Personnel location data is acquired according to a preset collection cycle, and each personnel location is mapped to the corresponding spatial unit.

[0075] In this embodiment, the acquisition period The time interval can be set from 1 second to 30 seconds. For entrances / exits or intersections where people change rapidly, a shorter data collection period can be used; for rest areas where people change slowly, a longer data collection period can be used.

[0076] Statistical spatial unit At the time of collection Number of personnel And calculate the population density based on the effective passage area:

[0077]

[0078] in, Representing spatial units At the time of collection population density Representing spatial units The effective passage area.

[0079] Further calculation of the rate of change in population density:

[0080]

[0081] This yields the spatial unit. Density state characteristics:

[0082]

[0083] A time-series population density heatmap is generated based on the population density of each spatial unit. Different display levels in the heatmap are used to represent different population density ranges. The display level itself is not directly used as a congestion determination result, but rather as one of the inputs for subsequent identification of population activity status.

[0084] In another embodiment, to suppress density changes caused by short-term personnel position fluctuations, a moving average can be applied to the personnel density or the rate of change of personnel density. For example:

[0085]

[0086] in, This indicates the number of data collection points involved in the smoothing calculation. The smoothed personnel density can replace the original personnel density in subsequent calculations.

[0087] S3. Perform personnel trajectory backtracking and extract dynamic features.

[0088] A preset backtracking time window is set for each spatial unit. The preset backtracking time window can be set according to the area type. For example, the backtracking time window is set to the most recent 30 seconds to 2 minutes for the passage area and the backtracking time window is set to the most recent 2 minutes to 10 minutes for the queuing service area.

[0089] The location data of personnel are associated with anonymous trajectory identifiers and collection times. The location records of the same person within the retrospective time window are arranged in chronological order and mapped to the corresponding spatial units to form trajectory segments.

[0090] The trajectory segment can be represented as:

[0091]

[0092] in, Anonymous personnel trajectory fragments, Indicates the first Each location records the corresponding spatial unit. Indicates the time of data collection. Indicates the coordinates of the personnel's location. This indicates the number of location records in the trajectory segment.

[0093] For spatial units The following dynamic features are extracted from the trajectory segments.

[0094] Average movement speed

[0095] The movement speed of personnel is calculated based on the distance and time interval between adjacent location records, and the average movement speed of all valid trajectories within the spatial unit is statistically analyzed.

[0096]

[0097] in, Representing spatial units The number of trajectories containing valid movement information. Indicates the first The speed at which the trajectory moves.

[0098] The degree of speed decay is determined based on the percentage decrease in the current average moving speed relative to the baseline average moving speed:

[0099]

[0100] in, Representing spatial units The baseline average speed under normal historical traffic conditions.

[0101] Degree of stay of personnel

[0102] The duration of continuous stay for each anonymous individual within a spatial unit was recorded, and the number of individuals whose stay exceeded the baseline stay duration for the corresponding spatial unit was counted as follows: The degree of personnel stay can be expressed as:

[0103]

[0104] For areas where people congregate, the baseline dwell time can be set relatively long; for passageways, the baseline dwell time can be set relatively short.

[0105] Personnel inflow and personnel outflow

[0106] When a trajectory enters a space unit from an adjacent space unit When a trajectory is formed by a spatial unit, it is recorded as an inflow; when a trajectory is formed by a spatial unit, it is recorded as an inflow. When entering an adjacent spatial unit, it is recorded as one outflow.

[0107] Statistical analysis of the number of people entering the country within the pre-set statistical period. and outflow of people Calculate the net backlog:

[0108]

[0109] To eliminate the impact of differences in the capacity of different space units, the net backlog can be normalized to the degree of personnel backlog:

[0110]

[0111] in, Representing spatial units The baseline traffic flow during the corresponding statistical period.

[0112] Degree of conflict in trajectory direction

[0113] Based on the positions of personnel entering, passing through, and leaving spatial units in the trajectory segments, determine the unit movement direction vector for each trajectory.

[0114] Spatial Unit At the time of collection The degree of conflict in trajectory direction is:

[0115]

[0116] in, and They represent the first The trajectory and the first The unit movement direction vector of the trajectory. Indicates the angle threshold for directional conflict. Represents the characteristic function.

[0117] When the angle between two unit movement direction vectors reaches the direction conflict angle threshold, the corresponding trajectory pair is recorded as a conflict trajectory pair. At that time, the degree of conflict in the trajectory direction is determined to be zero.

[0118] The directional conflict angle threshold can be set according to the area type. For example, for narrow passages, it can be set to greater than 120 degrees to identify oncoming traffic; for intersecting areas, it can be set to greater than 60 degrees to identify intersecting traffic.

[0119] In another implementation, the degree of trajectory direction conflict can also be calculated based on the information entropy of the trajectory direction distribution. The movement direction is divided into multiple directional intervals, and the proportion of trajectories in each directional interval is statistically analyzed. The directional entropy is:

[0120]

[0121] in, This indicates the number of directional intervals. A higher directional entropy indicates a more dispersed movement of people in different directions. The directional entropy can serve as a substitute or supplementary feature for the degree of trajectory direction conflict.

[0122] S4. Determine the status of personnel activities.

[0123] The threshold values ​​for each state are determined based on the regional type of the spatial unit and historical normal passage data.

[0124] Historical normal traffic data can be collected over multiple historical periods without congestion or abnormal events. Historical mean, standard deviation, or preset quantiles are calculated for factors such as crowd density, speed reduction, trajectory direction conflict, crowd dwell time, and crowd backlog.

[0125] For example, the first density threshold can be taken as the 80th percentile of the historical normal population density in the corresponding area, and the second density threshold can be taken as the 95th percentile; the first velocity decay threshold can be taken as 0.15, and the second velocity decay threshold can be taken as 0.35. The specific values ​​can be adjusted according to the park structure and actual operation data.

[0126] in:

[0127]

[0128]

[0129]

[0130]

[0131] These respectively represent the second density threshold being no less than the first density threshold, the second velocity decay threshold being greater than the first velocity decay threshold, the second conflict threshold being greater than the first conflict threshold, and the second backlog threshold being greater than the first backlog threshold.

[0132] The activity status of personnel in a space unit shall be determined according to the following rules.

[0133] Normal passage status

[0134] When the personnel density is lower than the first density threshold, the speed attenuation is lower than the first speed attenuation threshold, the trajectory direction conflict is lower than the first conflict threshold, and the personnel backlog is lower than the first backlog threshold, the space unit is determined to be in a normal passage state.

[0135] High-density orderly traffic status

[0136] When the personnel density reaches the first density threshold, but the degree of speed attenuation, the degree of trajectory direction conflict, and the degree of personnel backlog are all at a low level, it is determined to be a high-density orderly passage state of the spatial unit.

[0137] This state indicates that there are a large number of people in the space unit, but they can still pass through in a basically consistent direction, and it is not considered a true congestion state.

[0138] Static aggregation state

[0139] When the population density reaches the first density threshold, the population dwell time reaches the dwell time threshold, and the area type is a population gathering area, it is determined to be a static gathering state of the spatial unit.

[0140] For example, when people gather in the park's activity plaza to watch events, although the population density is high and the movement speed is low, the area itself allows people to stay for a long time, so it is not directly judged as traffic congestion.

[0141] Queue backlog

[0142] When the degree of conflict in the trajectory direction is lower than the first conflict threshold, the degree of velocity decay reaches the second velocity decay threshold, and the degree of personnel backlog reaches the second backlog threshold within a preset continuous time period, it is determined to be a queuing backlog state of the spatial unit.

[0143] This situation typically manifests as people heading in roughly the same direction, but insufficient service capacity at the front lines, resulting in the number of people flowing in consistently exceeding the number of people flowing out.

[0144] Directional conflict state

[0145] When the degree of trajectory direction conflict reaches the second conflict threshold and the degree of velocity attenuation reaches the second velocity attenuation threshold, it is determined to be a direction conflict state of the spatial unit.

[0146] This state can occur in passageways, intersections, or entrance / exit areas, and can be identified even when the population density has not yet reached the second density threshold.

[0147] Bottleneck congestion status

[0148] When the population density reaches the second density threshold, the speed decay reaches the second speed decay threshold, and the population backlog reaches the second backlog threshold within a preset continuous time period, the space unit is determined to be in a bottleneck congestion state.

[0149] When multiple state determination conditions are met simultaneously, the primary state can be determined according to the priority order of bottleneck congestion state, directional conflict state, queue backlog state, static aggregation state, high-density orderly passage state, and normal passage state. Alternatively, multiple candidate states and their corresponding matching degrees can be retained.

[0150] S5. Construct state sequences and predict congestion risk.

[0151] The activity status of personnel in the same spatial unit is sorted according to the time of data collection to construct a sequence of personnel activity status:

[0152]

[0153] in, Representing spatial units At the time of collection The status of personnel activities.

[0154] Statistically analyze the frequency of transitions between different personnel activity states in historical data. Personnel Activity States Transfer to personnel activity status The state transition probability is:

[0155]

[0156] in, Representing spatial units Based on the status of personnel activities Transfer to personnel activity status The number of times in history.

[0157] Based on the current state of personnel activity, state transition probability, and temporal changes in personnel density, average movement speed, personnel dwell time, degree of trajectory direction conflict, and degree of personnel backlog, the probability of candidate personnel activity states at each predicted time in the future is determined.

[0158] In one implementation, state transition probabilities and characteristic trends can be used for joint prediction. For future prediction moments... First, the prior state probability is obtained based on the historical state transition probability, and then the prior state probability is corrected based on the predicted values ​​of each feature.

[0159] The predicted values ​​of each feature can be obtained using linear trend extrapolation, moving average, exponential smoothing, or time series forecasting models.

[0160] For example, using linear trend extrapolation to predict population density:

[0161]

[0162] in, This represents the average density change rate over the most recent data collection times.

[0163] In another implementation, Markov models, Hidden Markov models, Long Short-Term Memory networks, Temporal Convolutional Networks, or Transformer models can be used to predict the probability of candidate activity states and the predicted feature values. The input to the prediction model includes at least the current activity state of the person, historical state transition information, and the temporal changes of the dynamic features.

[0164] S6. Calculate congestion risk and output the results.

[0165] Spatial Unit Future prediction time The risk of congestion can be calculated using the following formula:

[0166]

[0167] in, The load factor representing the predicted population density relative to the passage capacity of a spatial unit can be expressed as:

[0168]

[0169] in, Indicates the predicted number of people. This indicates the number of people corresponding to the passage capacity of a spatial unit.

[0170] Indicates the degree of predicted speed decay. Indicates the degree of conflict in the predicted trajectory direction. Indicates the predicted degree of visitor stay. This indicates the extent of the predicted backlog of personnel.

[0171] This represents the predicted probability of a high-density, orderly passage state. This represents the predicted probability of a static gathering state. The above two terms serve as negative correlation correction terms, used to reduce congestion risk when population density is high but still within an orderly flow or normal gathering state.

[0172] , , and These represent the non-negative weights of the corresponding risk characteristics. and These represent the corrected weights for the high-density ordered passage state and the static clustering state, respectively.

[0173] This represents a monotonic normalization function that maps input values ​​to a preset risk range. In this embodiment, a logical function can be used:

[0174]

[0175] This keeps the congestion risk between 0 and 1.

[0176] In another embodiment, the monotonic normalization function may also be a piecewise linear function, a hyperbolic tangent function, or a regression model trained based on historical labeled data.

[0177] The predicted time when the congestion risk first reaches the risk threshold is determined as the expected occurrence time. For example, the earliest predicted time when the congestion risk is greater than or equal to 0.6 is determined as the expected occurrence time.

[0178] Congestion levels can be classified based on congestion risk, for example:

[0179] when At that time, it was identified as a Level 1 congestion risk;

[0180] when At that time, it was determined to be a level 2 congestion risk;

[0181] when At that time, it was determined to be a level three congestion risk.

[0182] The congestion type is determined based on the predicted probabilities of queue backlog, directional conflict, and bottleneck congestion corresponding to the expected occurrence time. The state with the highest predicted probability can be identified as the primary congestion type.

[0183] The final output will be at least one of the following results:

[0184] Expected congested spatial units and their locations on the park map; expected time of occurrence; type of congestion; congestion level; main direction of pedestrian flow; adjacent affected spatial units; suggested diversion direction.

[0185] Specific application examples

[0186] Taking the entrance area of ​​the park's canteen as an example, this area is divided into a queuing service area, and the adjacent space units include the office building corridor, the canteen hall and the outdoor road.

[0187] At 11:55, the system detected that the population density in the area had reached the first density threshold, but the average moving speed was still close to the baseline average moving speed. The inflow and outflow of people were basically balanced, and the degree of conflict in trajectory direction was low. Therefore, it was determined to be a high-density orderly passage state, and no congestion warning was issued.

[0188] At 12:00, the inflow of people continued to increase, the average movement speed decreased significantly, and the backlog of people reached the second backlog threshold in several consecutive collection cycles, while the degree of trajectory direction conflict was still low. The system judged it to be a queuing backlog state.

[0189] Based on historical state transition probabilities and current population density growth trends, the system predicts that the congestion risk in this area will reach 0.78 at 12:03, and determines 12:03 as the expected occurrence time, classifies the congestion type as queue backlog, and classifies the congestion level as Level 2.

[0190] For example, in an area where roads intersect within a park, the population density may not yet reach the second density threshold, but two sets of opposing and intersecting trajectories may appear. The degree of conflict in the trajectory directions reaches the second conflict threshold, and the average movement speed of people decreases rapidly. In this case, the system can classify the area as a directional conflict state and output the congestion risk before the population density reaches a high value, thereby reducing false negatives caused by relying solely on density thresholds.

[0191] Park congestion prediction system

[0192] This embodiment also provides a park congestion prediction system based on population density heat map and trajectory backtracking, including a data acquisition and spatial modeling module, a heat map generation module, a trajectory backtracking module, a status recognition module, a congestion prediction module, and a result output module.

[0193] The data acquisition and spatial modeling module is used to acquire spatial structure data of the target park and personnel location data with the time of collection, divide the target park into multiple spatial units, and configure the effective passage area, area type and passage capacity of each spatial unit.

[0194] The heat map generation module is used to map the location data of people at continuously collected times to the corresponding spatial units, count the number of people and changes in personnel density in each spatial unit, and generate a time-series personnel density heat map.

[0195] The trajectory backtracking module is used to associate personnel location data within a preset backtracking time window, obtain personnel trajectory segments, and extract average moving speed, personnel dwell time, trajectory direction distribution, personnel inflow and outflow, as well as calculate the degree of trajectory direction conflict.

[0196] The status recognition module is used to determine the activity status of personnel in each spatial unit based on the personnel density heat map and trajectory backtracking results.

[0197] The congestion prediction module is used to predict the probability and characteristic prediction values ​​of candidate personnel activity status in each spatial unit within a future time window based on the continuous collection of personnel activity status and corresponding characteristic changes, and to determine the congestion risk, expected occurrence time, congestion type and congestion level.

[0198] The results output module is used to display congestion prediction results on the park's electronic map, management terminal, or mobile terminal.

[0199] The above modules can be implemented by one or more processors executing computer programs in memory, or they can be implemented collaboratively by servers, edge computing devices, and campus management terminals.

[0200] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A method for predicting park congestion based on population density heatmaps and trajectory backtracking, characterized in that, Includes the following steps: S1. Obtain spatial structure data of the target park and personnel location data with the collection time, divide the target park into multiple spatial units, and configure effective passage area, area type and passage capacity for each spatial unit; S2. Map the personnel location data collected continuously to the corresponding spatial units, count the number of personnel and personnel density changes in each spatial unit, and generate a time-series personnel density heat map. S3. For the personnel location data in each spatial unit, perform trajectory backtracking within a preset backtracking time window to obtain trajectory segments of personnel in each spatial unit and between adjacent spatial units. Extract average moving speed, personnel dwell time, trajectory direction distribution, personnel inflow and outflow based on the trajectory segments, and calculate the degree of trajectory direction conflict based on the trajectory direction distribution. S4. Based on the personnel density, density change, average movement speed, personnel dwell time, trajectory direction conflict degree, and the difference between personnel inflow and outflow in each spatial unit, determine the personnel activity status corresponding to each spatial unit; wherein, the personnel activity status includes normal passage status, high-density orderly passage status, static gathering status, queue backlog status, directional conflict status, and bottleneck congestion status. S5. Construct a sequence of personnel activity status based on the personnel activity status and corresponding feature changes of each spatial unit at continuous acquisition time, predict the probability and feature prediction value of the candidate personnel activity status of each spatial unit in the future time window, and determine the congestion risk based on the probability and feature prediction value of the candidate personnel activity status. S6. Output the expected congestion area, expected occurrence time, congestion type, and congestion level based on the congestion risk.

2. The park congestion prediction method based on population density heatmap and trajectory backtracking according to claim 1, characterized in that, In step S1, a park access topology map is established based on the accessibility relationships between spatial units: in, Represents a set of spatial unit nodes. This represents the set of passable connecting edges between spatial units; the area types include passage areas, intersection areas, entrance / exit areas, queuing service areas, and personnel gathering areas.

3. The method for predicting park congestion based on population density heatmaps and trajectory backtracking as described in claim 1, characterized in that, In step S2, spatial unit At the time of collection The density state characteristics are as follows: in, Representing spatial units At the time of collection population density Representing spatial units The number of people inside, Representing spatial units The effective passage area, Indicates the rate of change in population density. This indicates the time interval between adjacent data collection moments.

4. The park congestion prediction method based on population density heatmap and trajectory backtracking according to claim 1, characterized in that, In step S3, the personnel location data are associated with the anonymous trajectory identifier and the collection time, and the spatial units that the same person passes through continuously within the preset retrospective time window and the duration of stay in each spatial unit are combined to form a trajectory segment. Based on the trajectory segments, determine the personnel's movement speed vector, the number of trajectories entering the space unit, the number of trajectories leaving the space unit, and the proportion of personnel whose stay time exceeds the benchmark stay time of the corresponding space unit; The degree of speed decay is determined based on the ratio of the current average moving speed of the space unit to the corresponding baseline average moving speed, the degree of personnel dwell time is determined based on the personnel ratio, and the degree of personnel backlog is determined based on the degree to which the inflow of personnel exceeds the outflow of personnel.

5. The park congestion prediction method based on population density heatmap and trajectory backtracking according to claim 4, characterized in that, In step S3, spatial unit At the time of collection The degree of conflict in trajectory direction is: in, Representing spatial units The number of trajectories with valid directions of movement. and They represent the first The trajectory and the first The unit movement direction vector of the trajectory. Indicates the angle threshold for directional conflict. Indicates the characteristic function; when At that time, determine the degree of conflict in the trajectory direction. It is zero.

6. The park congestion prediction method based on population density heatmap and trajectory backtracking according to claim 4, characterized in that, In step S4: When the personnel density is lower than the first density threshold, the speed attenuation is lower than the first speed attenuation threshold, the trajectory direction conflict is lower than the first conflict threshold, and the personnel backlog is lower than the first backlog threshold, the space unit is determined to be in a normal passage state. When the personnel density reaches the first density threshold, the speed attenuation is lower than the first speed attenuation threshold, the trajectory direction conflict is lower than the first conflict threshold, and the personnel backlog is lower than the first backlog threshold, the spatial unit is determined to be in a high-density orderly passage state. When the population density reaches the first density threshold, the population dwell time reaches the dwell time threshold, and the area type of the spatial unit is a population gathering area, the spatial unit is determined to be in a static gathering state. When the degree of trajectory direction conflict is lower than the first conflict threshold, the degree of speed attenuation reaches the second speed attenuation threshold, and the degree of personnel backlog reaches the second backlog threshold within a preset continuous time period, the spatial unit is determined to be in a queuing backlog state. When the degree of trajectory direction conflict reaches the second conflict threshold and the degree of velocity attenuation reaches the second velocity attenuation threshold, the spatial unit is determined to be in a direction conflict state. When the personnel density reaches the second density threshold, the speed decay reaches the second speed decay threshold, and the personnel backlog reaches the second backlog threshold within the preset continuous time period, the space unit is determined to be in a bottleneck congestion state. Wherein, the second density threshold is not less than the first density threshold, the second velocity attenuation threshold is greater than the first velocity attenuation threshold, the second conflict threshold is greater than the first conflict threshold, and the second backlog threshold is greater than the first backlog threshold; Each threshold is determined based on the region type of the corresponding spatial unit and historical normal passage data.

7. The method for predicting park congestion based on population density heatmap and trajectory backtracking as described in claim 6, characterized in that, In step S5, the activity status of personnel in the same spatial unit is sorted according to the collection time, the historical state transition frequency between different activity statuses is counted, and the historical state transition frequency is normalized into a state transition probability. Based on the current personnel activity status of the spatial unit, the state transition probability, and the temporal changes in personnel density, average movement speed, personnel dwell time, trajectory direction conflict degree, and personnel backlog degree, the probability of candidate personnel activity status and the characteristic prediction value corresponding to each future prediction time are determined.

8. The park congestion prediction method based on population density heatmap and trajectory backtracking according to claim 7, characterized in that, Spatial Unit Future prediction time The congestion risk is: in, This represents a monotonic normalization function that maps input values ​​to a preset risk range. This indicates the predicted population density relative to the passage capacity of a spatial unit. Indicates the degree of predicted speed decay. Indicates the degree of conflict in the predicted trajectory direction. Indicates the predicted degree of visitor stay. This indicates the predicted level of personnel backlog. This represents the predicted probability of a high-density, orderly passage state. This represents the predicted probability of a static clustered state. , , , , , and These represent the corresponding non-negative weights; The predicted time when the congestion risk first reaches the risk threshold is determined as the expected occurrence time. The congestion type is determined based on the predicted probabilities of the queue backlog state, directional conflict state, and bottleneck congestion state corresponding to the predicted time. The congestion level is determined based on the preset risk range in which the congestion risk is located.

9. A park congestion prediction system based on population density heatmaps and trajectory backtracking, characterized in that, include: The data acquisition and spatial modeling module is used to acquire spatial structure data of the target park and personnel location data with the time of collection, divide the target park into multiple spatial units, and configure the effective passage area, area type and passage capacity of each spatial unit. The heat map generation module is used to map the location data of people at continuously collected times to the corresponding spatial units, count the number of people and changes in personnel density in each spatial unit, and generate a time-series personnel density heat map. The trajectory backtracking module is used to associate personnel location data within a preset backtracking time window to obtain personnel trajectory segments, and extract average moving speed, personnel dwell time, trajectory direction distribution, personnel inflow and outflow based on the personnel trajectory segments, as well as calculate the degree of trajectory direction conflict. The status recognition module is used to determine the activity status of personnel in each spatial unit based on the personnel density heat map and trajectory backtracking results; The congestion prediction module is used to predict the probability and feature prediction values ​​of candidate personnel activity status for each spatial unit within a future time window based on the personnel activity status and corresponding feature changes during continuous data collection, and to determine the congestion risk, expected occurrence time, congestion type, and congestion level. The results output module is used to output the park congestion prediction results.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 8.