Pedestrian trajectory simulation method and system based on social force model
By introducing pedestrian stopping and random exploration behaviors into the social force model and utilizing GPU-accelerated matrix operations, more realistic pedestrian trajectories are generated, solving the problems of low trajectory realism and efficiency of the social force model in large-scale scenarios, and achieving efficient pedestrian trajectory simulation.
Patent Information
- Application Number
- CN202110704145.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-24
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2041-06-24
AI Technical Summary
Existing social force models suffer from poor trajectory realism and low computational efficiency when simulating pedestrian trajectories, especially in large-scale scenarios where computational efficiency deteriorates significantly.
By acquiring the boundaries of the target area and sub-region boundaries, global population distribution information, and individual pedestrian parameters, a sequence including multiple dwell times is generated. The coordinates of the dwell points are determined based on the local population distribution information. The pedestrian trajectory is calculated by combining the social force model, introducing dwell and random exploration behaviors, and using GPU to accelerate matrix operations to improve efficiency.
It significantly improves the realism and computational efficiency of pedestrian trajectory simulation, supports the simulation of various intervention policies, and is adaptable to large-scale scenarios.
Smart Images

Figure CN115526018B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pedestrian trajectory generation technology, and more specifically, to a pedestrian trajectory simulation method and system based on a social force model. Background Technology
[0002] Pedestrian trajectory simulation is a key technology for a range of applications, including business profit estimation, congestion risk estimation, and epidemic risk estimation. For example, simulated trajectories in indoor scenarios can help estimate the risk of epidemics or overcrowding, risks closely related to the distance between pedestrians in a crowd. Furthermore, pedestrian trajectories can help estimate the load on public infrastructure or provide a better advertising plan. Therefore, generating a trajectory based on a specific scenario is a task of significant importance.
[0003] The Social Force model is one of the most popular pedestrian motion simulation models. It defines three forces to simulate three types of interactions: pedestrian-target interaction, pedestrian-environment interaction, and pedestrian-pedestrian interaction. First, the pedestrian is attracted to their target; second, the pedestrian is blocked by obstacles, resulting in a repulsive force from the obstacles; third, the pedestrian has their own safe zone, which prevents them from getting too close to others, thus creating a repulsive force between pedestrians. These force definitions are generalized; therefore, the Social Force model is a highly generalized and scalable model for trajectory generation.
[0004] As a highly scalable model, social force models have been improved by researchers in various scenarios. For example, one existing technique proposes a head-based social force model that considers the pedestrian's desired direction and models the pedestrian's movement, thereby improving the plausibility of the generated trajectory. Another existing technique improves pedestrian group interaction by including several group forces and enhances the realism of the generated trajectory by describing the self-organizing process of pedestrian movement. Yet another existing technique supports emergency evacuation simulations by introducing collision avoidance strategies and information loss mechanisms.
[0005] The aforementioned social force models, when applied to indoor trajectory generation, typically suffer from issues regarding trajectory realism and efficiency. When simulating pedestrian trajectories, these models fail to consider large-scale characteristics of pedestrians, such as their population distribution. In real-world indoor scenarios, much group data (i.e., crowd distribution) is readily available, which can be used to standardize simulations and improve the plausibility of trajectory generation. Furthermore, the application of social force models in large-scale scenarios is limited by computational efficiency. Computational efficiency deteriorates significantly with the increase in the number of pedestrians. Therefore, a trajectory generation scheme is urgently needed to improve the realism and efficiency of simulation results from social force models. Summary of the Invention
[0006] The technical problem to be solved by the embodiments of the present invention is to provide a method and system for simulating pedestrian trajectories based on a social force model, which can improve the realism of the trajectory generation results of the social force model.
[0007] To address the aforementioned technical problems, this invention provides a pedestrian trajectory simulation method based on a social force model, comprising:
[0008] The system acquires the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; and acquires the individual parameters of each pedestrian, wherein the individual parameters include at least: the entry point and entry time of entering the target area, the sub-areas expected to be traversed, and the exit point and exit time expected to leave the target area.
[0009] For each pedestrian, a sequence containing multiple dwell times is generated, and each dwell time in the sequence is sequentially assigned to the sub-regions that the pedestrian is expected to pass through. The sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area.
[0010] Based on the global population distribution information, determine the local population distribution information of the sub-region to which each stop time belongs during that stop time, and determine the coordinates of the stop point corresponding to that stop time based on the local population information; insert the stop point corresponding to each stop time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stop point list;
[0011] Using a social force model, the trajectory of the pedestrian as they go to each stop point in the list is calculated, thus generating the pedestrian's movement trajectory.
[0012] According to another aspect of the present invention, at least one embodiment provides a pedestrian trajectory simulation system based on a social force model, comprising:
[0013] The information acquisition module is used to acquire the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; and to acquire the individual parameters of each pedestrian, wherein the individual parameters include at least: the entry point and entry time of entering the target area, the sub-areas expected to be passed through, and the exit point and exit time expected to leave the target area.
[0014] The dwell time generation module is used to generate a sequence of multiple dwell times for each pedestrian, and to allocate each dwell time in the sequence to the sub-areas that the pedestrian is expected to pass through. The sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area.
[0015] The stopping point generation module is used to determine the local population distribution information of the sub-region to which each stopping time belongs during the stopping time based on the global population distribution information, and to determine the coordinates of the stopping point corresponding to the stopping time based on the local population information; and to insert the stopping point corresponding to each stopping time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stopping point list.
[0016] The simulation calculation module is used to calculate the trajectory of the pedestrian as they go to each stop point in the list of stops in turn using the social force model, and generate the pedestrian's movement trajectory.
[0017] According to another aspect of the present invention, at least one embodiment provides a pedestrian trajectory simulation system based on a social force model, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method described above.
[0018] According to another aspect of the present invention, at least one embodiment provides a computer-readable storage medium on which a program is stored, which, when executed by a processor, implements the steps of the method described above.
[0019] Compared with existing technologies, this invention generates pedestrian routes based on indoor auxiliary scene information and introduces pedestrian stopping and random exploration behaviors to generate stopping points for pedestrians in various sub-regions. Through refined pedestrian feature modeling and pedestrian-environment interaction modeling, the realism of indoor pedestrian movement trajectory simulation is significantly improved. Furthermore, this invention improves trajectory generation efficiency through caching mechanisms and GPU computing. Moreover, this invention can support the simulation of the intervention effects of various types of intervention policies. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A schematic diagram of forces in a social force model;
[0022] Figure 2 This is an example diagram of an embodiment of the present invention applied to an airport scenario;
[0023] Figure 3 This is an example diagram illustrating the sub-region division of an airport scene according to an embodiment of the present invention.
[0024] Figure 4 An example diagram showing the insertion of a parking point in an embodiment of the present invention;
[0025] Figure 5 This is a flowchart illustrating a pedestrian trajectory simulation method according to an embodiment of the present invention;
[0026] Figure 6 This is a schematic diagram of a pedestrian trajectory simulation system according to an embodiment of the present invention;
[0027] Figure 7 This is another structural schematic diagram of the pedestrian trajectory simulation system according to an embodiment of the present invention. Detailed Implementation
[0028] To make the technical problems, technical solutions, and advantages of this invention clearer, a detailed description will be provided below in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as particular configurations and components are provided merely to aid in a comprehensive understanding of the embodiments of this invention. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this invention. Furthermore, for clarity and brevity, descriptions of known functions and structures have been omitted.
[0029] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0030] In various embodiments of the present invention, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0031] As described in the background section, the pedestrian trajectories simulated by existing social force models differ significantly from the actual pedestrian trajectories. Furthermore, existing social force models suffer from low computational efficiency, making them unsuitable for large-scale pedestrian trajectory simulations. To address one or more of these problems, this invention provides a pedestrian trajectory simulation method based on a social force model, improving the realism of pedestrian trajectory simulation. Here, realism refers to the degree to which the pedestrian trajectory matches the actual distribution of the population.
[0032] Figure 1 A schematic diagram is given showing the influence of three forces on pedestrians in the social force model. Figure 1This includes pedestrian 101, individual 111, obstacle 121, pedestrian 101's target 102, and pedestrian 111's target 112. Pedestrian 101 experiences three forces: target attraction 103, pedestrian-obstacle repulsion 104, and pedestrian-pedestrian repulsion 105. Pedestrian 111 experiences three forces: target attraction 113, pedestrian-obstacle repulsion 114, and pedestrian-pedestrian repulsion 115. In this text, the pedestrian is sometimes referred to as an individual.
[0033] First, the pedestrian is attracted to his goal; in the social force model, goal attraction is represented as:
[0034]
[0035]
[0036] in, Let represent the direction vector of pedestrian α at time t, where Indicates the direction toward the target. This indicates the direction of pedestrian α at time t. This represents the target attraction experienced by pedestrian α. This represents the maximum speed of pedestrian α. Let τ represent the current velocity of pedestrian α at time t. α The relaxation time is used to adjust the strength of the target's attractiveness. Social force models utilize target attractiveness to guide pedestrians toward the target.
[0037] Secondly, pedestrians will avoid obstacles on their path. In the social force model, this effect manifests as a repulsive force exerted by obstacles on pedestrians.
[0038] Third, pedestrians tend to maintain their personal space while moving to avoid collisions, which is modeled as a repulsive force between pedestrians. This force generates a pair of repulsive forces between each pair of pedestrians, causing them to move away from each other. The strength of this force is controlled by the characteristic distance.
[0039] These forces will accelerate the pedestrian to the predetermined maximum speed.
[0040] By setting all these social forces, the social force model can simulate pedestrians through intent. However, for a complex indoor scene, the original social force model needs to be adapted. In the implementation of this invention, the pedestrian's trajectory is driven by a series of waypoints (also called path points) determined by the indoor scene. After reaching the current waypoint, the pedestrian stays within the waypoint's range for a certain period of time, representing the pedestrian's possible dwell or wandering time at this location, and then the pedestrian moves to the next waypoint. After completing all waypoints, the pedestrian is removed from the list of active pedestrians, meaning that the pedestrian's trajectory is no longer simulated.
[0041] Typically, based on a pedestrian's entry and expected exit points (e.g., exiting from the boarding gate corresponding to the flight in an airport setting) and the layout of the indoor space (the distribution of various sub-areas), the sub-areas that the pedestrian's trajectory will sequentially pass through can be predetermined. In embodiments of the present invention, the target area can be divided into multiple non-overlapping sub-areas based on the distribution of various functional areas within the target area. These functional areas refer to areas where pedestrians handle predetermined tasks, such as security checkpoints and check-in halls in airports, or registration windows, waiting rooms, and various medical examination points in hospitals.
[0042] Figure 2 Taking an airport as an example, this invention provides an application scenario. The elements in the airport's indoor scene include: an entrance, check-in hall, security checkpoint, and boarding gate (which is also the exit for pedestrians). Two broken lines, 201 and 202, represent two typical pedestrian trajectories in an airport. Typically, pedestrians enter from the airport entrance, check in at the check-in hall, pass through the security checkpoint to enter the waiting halls on either side of the airport, and then leave through the boarding gate. This invention can utilize pre-obtained population distribution information of a target area over a period of time to assist in generating pedestrian stopping points.
[0043] To apply the social force model to complex indoor scenarios, this embodiment of the invention will now be illustrated using an airport as an example. Pedestrians in this indoor scenario exhibit relatively predictable movement patterns. Applying social forces to an indoor scenario is an underdetermined problem. This embodiment of the invention fully utilizes prior knowledge of the indoor scenario, such as the distribution of various functional areas and population distribution over a given period. Taking an airport as an example:
[0044] First, all pedestrians are associated with their entry time, departure time, and gate (exit). Each pedestrian's entry time and expected departure time (which can be determined based on the flight's boarding time) are collected when entering or exiting the airport. Each flight has a corresponding gate (exit).
[0045] Secondly, the movement patterns of each pedestrian are highly predictable. Specifically, pedestrian movement can be described by entry, check-in, security check, and exit. Embodiments of this invention will... Figure 2 The following is a visualization of all the ribbon elements and a list of their effects on waypoint generation:
[0046] Check-in Hall: According to airline regulations, checking in is the first action most passengers take after entering the airport. In this embodiment of the invention, pedestrians will be randomly assigned a location point in the check-in hall as their first stopping point. These waypoints require pedestrians to remain within the range of these waypoints for a fixed period of time, which is a hyperparameter of the model. For example, a smaller fixed time value can simulate the effect of automated check-in by machine, while a larger value can simulate manual check-in.
[0047] Security checkpoints: To aid flight safety and reduce the risk of infectious disease transmission, pedestrians undergo checks when passing through security checkpoints. These checkpoints are typically modeled using several gates of finite width. The number of gates and the duration of time spent within the security checkpoint area are two hyperparameters.
[0048] Boarding Gate: In an airport scenario, boarding an aircraft is typically the intention of all pedestrians. Once a pedestrian reaches the corresponding boarding gate, the social force model removes that pedestrian from the simulation.
[0049] Furthermore, it's unrealistic to assume that pedestrians in the real world always have definite target coordinates to drive their movement. Most pedestrians will spend time finding their next waypoint and taking a seat in a waiting area. For example, in an airport scenario, some pedestrians might choose to sit in the airport lounge or wait elsewhere. Moreover, pedestrians are unlikely to choose a very distant location as their next waypoint and linger or stay there. Considering the relevant prior knowledge, stopping points can be generated according to the following rules from both a temporal and coordinate perspective:
[0050] From a temporal perspective: This embodiment of the invention generates a sequence of dwell times for each pedestrian. The elements in this sequence are dwell times, following an exponential distribution with preset fixed parameters. The total time of all elements in the sequence is closest to the pedestrian's total stay time at the airport (entry-departure time interval). In practical implementation, a preset time can be set based on the distribution of functional areas in the target area (e.g., an airport) and the pedestrian's total stay time. For example, based on statistical data, the number of dwelling points where pedestrians frequently linger or stay in the target area is determined in advance. Then, the pedestrian's total stay time is divided by this number, and the average value is used as the preset time. This generates an exponential distribution function with an expected value of the preset time. This function is sampled, and the result of each sample is used as an element in the sequence until the sum of the dwell times of all elements is closest to the pedestrian's total stay time. Thus, the sequence includes a certain number of dwell times. It can be seen that the preset time is positively correlated with the pedestrian's total stay time.
[0051] In addition, to improve simulation efficiency, a time proportional to the pedestrian's actual entry-exit time interval can usually be used as the pedestrian's total dwell time.
[0052] Coordinate angle: such as Figure 3 As shown, embodiments of the present invention can generate rest stops based on the probability of population distribution. Figure 3 Areas with a higher population density are more likely to be selected as stopping points. Furthermore, pedestrians are less likely to choose to stop or wander in distant locations far from their target location. Based on these rules, embodiments of the present invention can pre-divide the target area into multiple sub-areas. For example, Figure 3 In this design, the airport area is manually divided into 13 sub-areas, as shown by the dashed boxes, including a central area 31, corridors 32, and waiting areas 33, allowing for the selection of resting points within these sub-areas. During implementation, the pedestrian's route is determined based on a pre-determined passage order through the various sub-areas of the target area. This route includes the sub-areas the pedestrian passes through sequentially, where the first and last sub-areas are the pedestrian's entry and exit points, respectively. For example, as... Figure 4 As shown, in an airport scenario, pedestrians typically follow a four-stage passage sequence: entering the airport → check-in (31), check-in → security check (31), security check → entering the waiting room (32), and entering the waiting hall → leaving (33), generating routes that pass through each sub-area in sequence. Through the above method, this embodiment of the invention introduces indoor auxiliary scene information, such as the boundary coordinates of each sub-area (e.g., functional areas), and generates pedestrian routes based on this indoor auxiliary scene information.
[0053] To describe complex human behavior in indoor public spaces, embodiments of this invention introduce pedestrian dwelling and random exploration behaviors in the target area. For example, in an airport, when waiting times are long, passengers may not go directly to the departure lounge; nearby shops or cafes are popular choices. Therefore, embodiments of this invention introduce dwelling behavior (dwelling points) during trajectory generation, allowing pedestrians to generate temporary destinations within the scene, especially in areas with specific functions (such as shops, cafes, bookstores, etc.). Furthermore, the generation of dwelling behavior also considers population distribution; locations with higher population density are more likely to be temporary destinations. As one implementation, population density can be calculated based on airport Wi-Fi records. The duration of dwelling behavior is positively correlated with the total dwell time (i.e., the difference between flight departure time and passenger arrival time). By introducing pedestrian dwelling and random exploration behaviors, embodiments of this invention can support various types of intervention measures.
[0054] This invention, through embodiments thereof, introduces pedestrian stopping and random exploration behavior by generating stopping points in various sub-regions traversed by pedestrian routes. Specifically, when generating stopping points in each sub-region, the local population distribution of that sub-region is normalized, and the coordinates of one or more stopping points in that region are generated based on the normalized population distribution. Each stopping point corresponds to a stopping time in the aforementioned sequence. The proportion of stopping times (stopping points) in each sub-region can be predetermined based on factors such as the size of the sub-region and the number of points of interest in the sub-region, thereby distributing all stopping times of the pedestrian in the aforementioned stopping time sequence to various sub-regions. For example, sub-regions with larger areas and more points of interest have a higher allocation ratio. Here, points of interest can be shops, restaurants, rest areas, etc.
[0055] By combining generation rules based on time and coordinate angles, embodiments of the present invention can generate parking points based on prior knowledge of each user's entry / exit intervals, boarding gates, and airport population distribution. Each parking point corresponds to a parking time in the aforementioned sequence. Then, as... Figure 4 As shown, the generated stopping points are inserted into the various sub-regions of the pedestrian's route to form a complete list of stopping points.
[0056] After generating the list of stopping points, this embodiment of the invention can use a social force model to simulate the pedestrian's trajectory. The calculation process of the social force model is as follows:
[0057] Input: List of pedestrians, including their list of stopping points (generated by the rules above) and entry time.
[0058] The outline of the interior scene of the target area.
[0059] Initialization: For any pedestrian, their initial coordinates will be assigned to the location of their first stopping point, for example, randomly generated at the airport entrance.
[0060] Caching: To improve simulation efficiency, this embodiment of the invention pre-calculates and caches values closely related to social force calculation for each pedestrian, including: the pedestrian's direction and distance relative to the next stopping point, the vector between the pedestrian and the next stopping point (target), the pedestrian's coordinates and the coordinates of other pedestrians, and the pedestrian's velocity and the velocities of other pedestrians. By pre-calculating and caching these frequently used values, this embodiment of the invention avoids redundant calculations and improves simulation efficiency.
[0061] Simulation: Using cached values, the target attraction force, pedestrian repulsion force, and obstacle repulsion force are calculated for each pedestrian. Then, the sum of these forces is used to calculate the acceleration and velocity of each pedestrian. It should be noted that the pedestrian's velocity is clamped by a predetermined maximum velocity, meaning it does not exceed this maximum velocity. Finally, based on the pedestrian's velocity and current position coordinates, the new coordinates of each pedestrian after one time unit are obtained, and these new coordinates are recorded in the generated trajectory, thus obtaining the pedestrian's trajectory. The duration of the time unit can be set as needed, for example, to 1 second or 5 seconds.
[0062] Update: After updating the coordinates of each pedestrian, the social force model checks the distance between their new coordinates and the next stopping point (assuming the next stopping point is stopping point i in the stopping point list, which includes n stopping points in total: 1, 2, ..., n). If the distance is closer to a predetermined threshold distance, the pedestrian is considered to have reached the next stopping point (i.e., stopping point i). At this time, the pedestrian's next stopping point is updated to stopping point i+1, and a timer starts. When the pedestrian's time spent at stopping point i reaches the corresponding stopping time for stopping point i, the pedestrian will continue to the next stopping point i+1. If the pedestrian has no remaining stopping points, the pedestrian becomes an inactive pedestrian and is removed from the simulation.
[0063] Output: Output a list of trajectories, including the pedestrian coordinates, entry time, and exit time for each time unit.
[0064] Furthermore, to improve simulation efficiency, the above simulation calculations are implemented based on GPU-accelerated matrix operations. After the aforementioned optimizations, the simulation calculations are accelerated by approximately 5 times. Table 1 compares the simulation details of the original social force model and the social force model of this embodiment, including their respective time consumption and iteration frequency. As can be seen from Table 1, the iteration frequency of the original social force model decreases significantly when the number of active pedestrians increases. In pedestrian-pedestrian repulsion, social forces are needed to calculate the interaction between each pair of pedestrians. Therefore, the complexity of the social force model is O(n^2). 2By implementing the technology on a GPU and caching importance values, the efficiency of the social force model in this embodiment of the invention is significantly improved. Comparing the time consumption over one hour, this embodiment consumes only 5% of the time required by the original social force model.
[0065]
[0066] Table 1
[0067] Please refer to Figure 5 The pedestrian trajectory simulation method based on the social force model provided in this embodiment of the invention can be summarized as follows:
[0068] Step 51: Obtain the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; and obtain the individual parameters of each pedestrian, wherein the individual parameters include at least: the entry point and entry time of entering the target area, the sub-areas expected to be passed through, and the exit point and exit time expected to leave the target area.
[0069] Here, the global population distribution information of the target area can be generated by training a neural network model using historical population distribution data of the target area, which will not be elaborated further in this embodiment of the invention. The global population distribution information reflects the changes in the population distribution of the target area over time; for example, it can include heatmaps of the global population distribution for different time periods. In actual simulation, the global population distribution information for the entire day can be obtained in advance, depending on the simulation duration. For example, when simulating pedestrian trajectories for a whole day, the global population distribution information for the entire day can be obtained in advance. Specifically, it can be divided into multiple time periods, such as dividing a 24-hour day into 10-minute intervals, with each time period corresponding to a set of global population distribution information, and so on.
[0070] Step 52: For each pedestrian, generate a sequence containing multiple dwell times, and sequentially allocate each dwell time in the sequence to the sub-regions that the pedestrian is expected to pass through, wherein the sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area.
[0071] Here, when generating the sequence of dwell times, an exponential distribution function with an expected value of a preset time can be sampled. Then, it is determined whether the sum of the currently sampled dwell time and all dwell times in the sequence exceeds the total dwell time. If so, the current sequence is output; otherwise, the currently sampled dwell time is added to the sequence, and the process of sampling an exponential distribution function with an expected value of a preset waiting time is returned to continue sampling the next dwell time. The preset time can be determined in the manner described above.
[0072] The dwell time in the sequence is allocated to each sub-region. Specifically, this can be done by: determining the amount of dwell time allocated to each sub-region based on the area of each sub-region that the pedestrian expects to pass through and the number of points of interest in each sub-region; then, determining the allocation order of each sub-region according to the order in which the pedestrian passes through each sub-region; determining the currently allocated sub-region and the amount of dwell time in that sub-region according to the allocation order, and then sequentially allocating the corresponding amount of dwell time in the sequence to that sub-region, until finally all dwell time in the sequence is allocated to the sub-regions.
[0073] Step 53: Based on the global population distribution information, determine the local population distribution information of the sub-region to which each stop time belongs during the stop time, and determine the coordinates of the stop point corresponding to the stop time based on the local population information; insert the stop point corresponding to each stop time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stop point list.
[0074] Here, global population distribution information of a target area can be obtained in advance for a certain period of time. Then, for each dwell time, the time range corresponding to the dwell time is determined based on the pedestrian's entry time and the sum of all dwell times before the dwell time in the sequence. Based on the time range corresponding to the dwell time, the local population distribution information of the sub-region to which the dwell time belongs in the time range is determined from the global population distribution information.
[0075] For example, regarding the dwell time corresponding to dwell point i, assuming the pedestrian's entry time is t0, the sum of the dwell times from dwell point 1 to dwell point i-1 is T, and the dwell time at dwell point i is T. i If the subregion to which the dwell point i belongs is subregion i, then the dwell time T is... i The corresponding time range is from t0+T to t0+T+T. i For a given period of time, the local population distribution information of sub-region i within that time range can be found from the global population distribution information.
[0076] After obtaining local population distribution information, the population distribution heatmap corresponding to the local population information can be normalized to obtain the population probability distribution of the sub-region to which the dwell time belongs; then, the population probability distribution of the sub-region to which the dwell time belongs is sampled, and each sampled result is used as the coordinate of the dwell point corresponding to each dwell time in the sub-region.
[0077] In addition, the pedestrian's route is determined according to the predetermined order of pedestrian passage in each sub-area of the target area. The route includes each sub-area that the pedestrian passes through in sequence, wherein the first sub-area and the last sub-area in the route are the sub-area where the pedestrian's entry point and exit point are located, respectively.
[0078] Step 54: Using the social force model, calculate the trajectory of the pedestrian as they go to each stop point in the list of stops in sequence, and generate the pedestrian's movement trajectory.
[0079] Here, starting from the pedestrian's entry point, the coordinates of the updated position are calculated and recorded sequentially as the pedestrian moves to the next stopping point in the list, thus generating the pedestrian's trajectory. Additionally, this embodiment of the invention can pre-calculate and cache cached values related to the social force model. These cached values include: the direction between the pedestrian and the next stopping point, the distance between the pedestrian and the next stopping point, and the vector between the pedestrian and the next stopping point. GPU-accelerated matrix operations are used to calculate the trajectories of multiple pedestrians to improve simulation efficiency. The above simulation process specifically includes:
[0080] Determine whether the pedestrian has reached the last stopping point in the list of stopping points:
[0081] If so, output the generated motion trajectory;
[0082] Otherwise, the next stopping point in the pedestrian's stopping point list is taken as the target. The pedestrian's acceleration and velocity are calculated using the attraction between the pedestrian and the target, the repulsion between the pedestrian and the obstacle, and the repulsion between pedestrians. The pedestrian's position coordinates are updated based on the pedestrian's velocity and current position coordinates. When the distance between the updated position coordinates and the next stopping point is within a preset distance threshold, it is determined that the pedestrian has reached the next stopping point. The next stopping point is taken as the current stopping point and a timer is started. When the timer reaches the dwell time corresponding to the current stopping point, the position coordinates of the current stopping point are taken as the pedestrian's current position coordinates, and the process returns to the step of determining whether the pedestrian has reached the last stopping point in the stopping point list.
[0083] Through the above steps, this embodiment of the invention generates pedestrian trajectories using indoor auxiliary scene information and population distribution information, and introduces stopping and random exploration behaviors into the pedestrian routes, thereby improving the realism of the trajectory simulation results of the social force model. Furthermore, this embodiment of the invention also significantly improves computational efficiency by caching important cached values and utilizing GPU-accelerated matrix operations through parallel computing capabilities.
[0084] Based on the above pedestrian trajectory simulation method, embodiments of the present invention can also use a series of individual features that may affect the trajectory to model pedestrians, so as to realize pedestrian trajectory simulation under different features, specifically including:
[0085] 1) Introduce different movement control measures:
[0086] In indoor settings, the complexity of crowd movement often presents potential risks. This invention introduces a series of risk management measures to assess individual movement trajectories under different risk management approaches, including enhancing social distancing, increasing the number of security checkpoints, adding staircases, and reducing crowd exploration behavior.
[0087] 2) Incorporating various individual information about pedestrians:
[0088] This invention incorporates individual pedestrian characteristics into the social force model and simulates the impact of these characteristics on pedestrian movement behavior. First, it models pedestrian entry time and boarding time, and their impact on pedestrian behavior. Specifically, pedestrians with longer boarding times are more likely to linger or enter commercial areas. Second, it models the impact of pedestrian age on movement. Older people may move significantly slower than younger people. Under pandemic control measures, public places could consider establishing green channels for the elderly to reduce the risks faced by vulnerable seniors during the pandemic.
[0089] The various methods of the embodiments of the present invention have been described above. Apparatus for implementing the above methods will now be provided.
[0090] Please refer to Figure 6 This invention provides a pedestrian trajectory simulation system based on a social force model, comprising:
[0091] The information acquisition module 61 is used to acquire the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; and to acquire the individual parameters of each pedestrian, wherein the individual parameters include at least: the entry point and entry time of entering the target area, the sub-areas expected to be passed through, and the exit point and exit time expected to leave the target area.
[0092] The dwell time generation module 62 is used to generate a sequence of multiple dwell times for each pedestrian, and to allocate each dwell time in the sequence to the sub-areas that the pedestrian is expected to pass through in sequence, wherein the sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area.
[0093] The stopping point generation module 63 is used to determine the local population distribution information of the sub-region to which each stopping time belongs during the stopping time based on the global population distribution information, and to determine the coordinates of the stopping point corresponding to the stopping time based on the local population information; and to insert the stopping point corresponding to each stopping time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stopping point list.
[0094] The simulation calculation module 64 is used to calculate the trajectory of the pedestrian as they go to each stop point in the stop point list in sequence using the social force model, and generate the pedestrian's movement trajectory.
[0095] Through the above system, the embodiments of the present invention can improve the realism and computational efficiency of the trajectory simulation results of the social force model.
[0096] Optionally, the residence time generation module includes:
[0097] The sequence generation unit is used to sample an exponential distribution function with a desired value at a preset time.
[0098] Determine whether the sum of the currently sampled dwell time and all dwell times in the sequence exceeds the total dwell time. If yes, output the current sequence; otherwise, add the currently sampled dwell time to the sequence and return to the step of sampling an exponential distribution with a preset waiting time as the expected value.
[0099] Optionally, the residence time generation module includes:
[0100] The time allocation unit is used to determine the amount of dwell time allocated to each sub-region based on the area of each sub-region that the pedestrian is expected to pass through and the number of points of interest in each sub-region; to determine the allocation order of each sub-region according to the order in which the pedestrian passes through each sub-region; to determine the currently allocated sub-region and the amount of dwell time in that sub-region according to the allocation order, and to allocate the corresponding amount of dwell time in the sequence to that sub-region in sequence.
[0101] Optionally, the parking point generation module includes:
[0102] The population distribution determination module is used to determine the time range corresponding to each dwell time based on the pedestrian's entry time and the sum of all dwell times preceding the dwell time in the sequence; and based on the time range corresponding to the dwell time, to determine the local population distribution information of the sub-region to which the dwell time belongs in the time range from the global population distribution information.
[0103] Optionally, the parking point generation module includes:
[0104] The dwell point index determination module is used to normalize the population distribution heatmap corresponding to the local population information to obtain the population probability distribution of the sub-region to which the dwell time belongs; to sample the population probability distribution of the sub-region to which the dwell time belongs, and to use the sampled results as the coordinates of the dwell points corresponding to each dwell time in the sub-region.
[0105] Optionally, the simulation calculation module is specifically used for: taking the pedestrian's entry point as the starting point of the stopping point, determining whether the pedestrian has reached the last stopping point in the stopping point list; if so, outputting the generated motion trajectory; otherwise, taking the next stopping point in the stopping point list as the target, calculating the pedestrian's acceleration and velocity using the attraction between the pedestrian and the target, the repulsion between the pedestrian and the obstacle, and the repulsion between pedestrians; updating the pedestrian's position coordinates according to the pedestrian's velocity and the pedestrian's current position coordinates, and determining that the pedestrian has reached the next stopping point when the distance between the updated position coordinates and the next stopping point is within a preset distance threshold, taking the next stopping point as the current stopping point and starting timing; when the timing value reaches the dwell time corresponding to the current stopping point, taking the position coordinates of the current stopping point as the pedestrian's current position coordinates, and returning to the step of determining whether the pedestrian has reached the last stopping point in the stopping point list.
[0106] Optionally, the system further includes:
[0107] A caching module is used to pre-calculate and cache cached values related to the social force model, the cached values including: the direction between the pedestrian and the next stopping point, the distance between the pedestrian and the next stopping point, and the vector between the pedestrian and the next stopping point;
[0108] The simulation calculation module uses GPU-accelerated matrix operations to calculate the movement trajectories of multiple pedestrians.
[0109] Please refer to Figure 7 This invention provides a schematic diagram of a population distribution completion system 700 based on deep learning, including: a processor 701, a transceiver 702, a memory 703, and a bus interface, wherein:
[0110] In this embodiment of the invention, the first device 700 further includes: a program stored in a memory 703 and executable on a processor 701, wherein the program, when executed by the processor 701, performs the following steps:
[0111] The system acquires the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; and acquires the individual parameters of each pedestrian, wherein the individual parameters include at least: the entry point and entry time of entering the target area, the sub-areas expected to be traversed, and the exit point and exit time expected to leave the target area.
[0112] For each pedestrian, a sequence containing multiple dwell times is generated, and each dwell time in the sequence is sequentially assigned to the sub-regions that the pedestrian is expected to pass through. The sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area.
[0113] Based on the global population distribution information, determine the local population distribution information of the sub-region to which each stop time belongs during that stop time, and determine the coordinates of the stop point corresponding to that stop time based on the local population information; insert the stop point corresponding to each stop time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stop point list;
[0114] Using a social force model, the trajectory of the pedestrian as they go to each stop point in the list is calculated, thus generating the pedestrian's movement trajectory.
[0115] Understandably, in this embodiment of the invention, the computer program executed by the processor 701 can achieve the above-mentioned functions. Figure 5 The various processes of the pedestrian trajectory simulation method based on the social force model shown in the example can achieve the same technical effect, and will not be described again here to avoid repetition.
[0116] exist Figure 7 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 701) and memory (memory 703). The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 702 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium.
[0117] The processor 701 is responsible for managing the bus architecture and general processing, while the memory 703 can store the data used by the processor 701 when performing operations.
[0118] It should be noted that the terminal in this embodiment is the same as the one described above. Figure 2The device corresponding to the method shown above, and the implementation methods in each embodiment, are all applicable to the embodiments of this terminal, and can achieve the same technical effect. In this device, the transceiver 702 and the memory 703, as well as the transceiver 702 and the processor 701, can be connected for communication via a bus interface. The function of the processor 701 can also be implemented by the transceiver 702, and the function of the transceiver 702 can also be implemented by the processor 701. It should be noted that the device provided by the embodiments of the present invention can implement all the method steps implemented in the above method embodiments and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail.
[0119] In some embodiments of the present invention, a computer-readable storage medium is also provided, on which a program is stored, which, when executed by a processor, performs the following steps:
[0120] The system acquires the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; and acquires the individual parameters of each pedestrian, wherein the individual parameters include at least: the entry point and entry time of entering the target area, the sub-areas expected to be traversed, and the exit point and exit time expected to leave the target area.
[0121] For each pedestrian, a sequence containing multiple dwell times is generated, and each dwell time in the sequence is sequentially assigned to the sub-regions that the pedestrian is expected to pass through. The sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area.
[0122] Based on the global population distribution information, determine the local population distribution information of the sub-region to which each stop time belongs during that stop time, and determine the coordinates of the stop point corresponding to that stop time based on the local population information; insert the stop point corresponding to each stop time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stop point list;
[0123] Using a social force model, the trajectory of the pedestrian as they go to each stop point in the list is calculated, thus generating the pedestrian's movement trajectory.
[0124] When this program is executed by the processor, it can implement all the above methods and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0126] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0127] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0129] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0130] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0131] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for simulating pedestrian trajectories based on a social force model, characterized in that, include: Obtain the boundary coordinates of the target area, the boundary coordinates of each sub-region included in the target area, and the global population distribution information of the target area; In addition, individual parameters for each pedestrian are obtained, including at least: the entry point and entry time into the target area, the expected sub-areas to be traversed, and the expected exit point and exit time from the target area. For each pedestrian, a sequence containing multiple dwell times is generated, and each dwell time in the sequence is sequentially assigned to the sub-regions that the pedestrian is expected to pass through. The sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area. Based on the global population distribution information, determine the local population distribution information of the sub-region to which each stop time belongs during that stop time, and determine the coordinates of the stop point corresponding to that stop time based on the local population distribution information; insert the stop point corresponding to each stop time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stop point list; Using a social force model, the trajectory of the pedestrian as they proceed to each stopping point in the list is calculated, thus generating the pedestrian's movement trajectory. The step of determining the local population distribution information of the sub-region to which each stop time belongs during the stop time, based on the global population distribution information, includes: For each dwell time, the time range corresponding to that dwell time is determined based on the pedestrian's entry time and the sum of all dwell times preceding that dwell time in the sequence. Based on the time range corresponding to that dwell time, the local population distribution information of the sub-region to which that dwell time belongs is determined from the global population distribution information within that time range. Determining the coordinates of the stop point corresponding to the stop time based on the local population distribution information includes: The population distribution heatmap corresponding to the local population distribution information is normalized to obtain the population probability distribution of the sub-region to which the dwell time belongs; The population probability distribution of the sub-region to which the dwell time belongs is sampled, and the results obtained from the sampling are used as the coordinates of the dwell point corresponding to each dwell time in the sub-region.
2. The method as described in claim 1, characterized in that, The generation of a sequence including multiple dwell times specifically includes: Sample an exponential distribution function with an expected value at a preset time. Determine whether the sum of the currently sampled dwell time and all dwell times in the sequence exceeds the total dwell time. If yes, output the current sequence; otherwise, add the currently sampled dwell time to the sequence and return to the step of sampling an exponential distribution with a preset waiting time as the expected value.
3. The method as described in claim 1, characterized in that, The step of sequentially allocating each dwell time in the sequence to the various sub-regions that the pedestrian is expected to traverse specifically includes: The amount of dwell time allocated to each sub-region is determined based on the area of each sub-region that the pedestrian expects to pass through and the number of points of interest in each sub-region. The allocation order of each sub-region is determined according to the order in which the pedestrian passes through each sub-region; according to the allocation order, the currently allocated sub-region and the number of dwell times in that sub-region are determined, and the corresponding number of dwell times in the sequence are allocated to that sub-region in sequence.
4. The method as described in claim 1, characterized in that, The process of using a social force model to calculate the pedestrian's trajectory as they sequentially travel to each stopping point in the list of stopping points, thereby generating the pedestrian's movement trajectory, specifically includes: Starting from the pedestrian's entry point, determine whether the pedestrian has reached the last stopping point in the list of stopping points: If so, output the generated motion trajectory; Otherwise, the next stopping point in the pedestrian's stopping point list is taken as the target. The pedestrian's acceleration and velocity are calculated using the attraction between the pedestrian and the target, the repulsion between the pedestrian and the obstacle, and the repulsion between pedestrians. The pedestrian's position coordinates are updated based on the pedestrian's velocity and current position coordinates. When the distance between the updated position coordinates and the next stopping point is within a preset distance threshold, it is determined that the pedestrian has reached the next stopping point. The next stopping point is taken as the current stopping point and a timer is started. When the timer reaches the dwell time corresponding to the current stopping point, the position coordinates of the current stopping point are taken as the pedestrian's current position coordinates, and the process returns to the step of determining whether the pedestrian has reached the last stopping point in the stopping point list.
5. The method as described in claim 1, characterized in that, Pre-computed and cached cached values related to the social force model, the cached values including: the direction between the pedestrian and the next stopping point, the distance between the pedestrian and the next stopping point, and the vector between the pedestrian and the next stopping point; GPU-accelerated matrix operations are used to calculate the movement trajectories of multiple pedestrians.
6. A pedestrian trajectory simulation system based on a social force model, characterized in that, include: The information acquisition module is used to acquire the boundary coordinates of the target area, the boundary coordinates of each sub-area included in the target area, and the global population distribution information of the target area; In addition, individual parameters for each pedestrian are obtained, including at least: the entry point and entry time into the target area, the expected sub-areas to be traversed, and the expected exit point and exit time from the target area. The dwell time generation module is used to generate a sequence of multiple dwell times for each pedestrian, and to allocate each dwell time in the sequence to the sub-areas that the pedestrian is expected to pass through. The sum of all dwell times in the sequence does not exceed the total dwell time of the pedestrian in the target area. The stopping point generation module is used to determine the local population distribution information of the sub-region to which each stopping time belongs during the stopping time based on the global population distribution information, and to determine the coordinates of the stopping point corresponding to the stopping time based on the local population distribution information; and to insert the stopping point corresponding to each stopping time in the sequence into the pedestrian's travel route in sequence to generate the pedestrian's stopping point list. The simulation module uses a social force model to calculate the pedestrian's trajectory as they move sequentially to each stopping point in the list, thus generating the pedestrian's movement trajectory. The parking point generation module includes: The population distribution determination module is used to determine the time range corresponding to each dwell time based on the pedestrian's entry time and the sum of all dwell times preceding that dwell time in the sequence; and based on the time range corresponding to that dwell time, to determine the local population distribution information of the sub-region to which the dwell time belongs within that time range from the global population distribution information. The parking point generation module includes: The dwell point index determination module is used to normalize the population distribution heatmap corresponding to the local population distribution information to obtain the population probability distribution of the sub-region to which the dwell time belongs; to sample the population probability distribution of the sub-region to which the dwell time belongs, and to use the sampled results as the coordinates of the dwell points corresponding to each dwell time in the sub-region.
7. The system as described in claim 6, characterized in that, The dwell time generation module includes: The sequence generation unit is used to sample an exponential distribution function with a desired value at a preset time. Determine whether the sum of the currently sampled dwell time and all dwell times in the sequence exceeds the total dwell time. If yes, output the current sequence; otherwise, add the currently sampled dwell time to the sequence and return to the step of sampling an exponential distribution with a preset waiting time as the expected value.
8. The system as described in claim 6, characterized in that, The dwell time generation module includes: The time allocation unit is used to determine the amount of dwell time allocated to each sub-region based on the area of each sub-region that the pedestrian is expected to pass through and the number of points of interest in each sub-region; to determine the allocation order of each sub-region according to the order in which the pedestrian passes through each sub-region; to determine the currently allocated sub-region and the amount of dwell time in that sub-region according to the allocation order, and to allocate the corresponding amount of dwell time in the sequence to that sub-region in sequence.
9. The system as described in claim 6, characterized in that, The simulation calculation module is specifically used to: take the pedestrian's entry point as the starting point of the stopping point, determine whether the pedestrian has reached the last stopping point in the stopping point list; if so, output the generated motion trajectory; otherwise, take the next stopping point of the pedestrian in the stopping point list as the target, and use the attraction between the pedestrian and the target, the repulsion between the pedestrian and the obstacle, and the repulsion between pedestrians to calculate the pedestrian's acceleration and velocity. Based on the pedestrian's speed and current position coordinates, update the pedestrian's position coordinates. When the distance between the updated position coordinates and the next stopping point is within a preset distance threshold, determine that the pedestrian has reached the next stopping point. Use the next stopping point as the current stopping point and start timing. When the timing value reaches the dwell time corresponding to the current stopping point, use the position coordinates of the current stopping point as the pedestrian's current position coordinates, and return to the step of determining whether the pedestrian has reached the last stopping point in the stopping point list.
10. The system as described in claim 6, characterized in that, Also includes: A caching module is used to pre-calculate and cache cached values related to the social force model, the cached values including: the direction between the pedestrian and the next stopping point, the distance between the pedestrian and the next stopping point, and the vector between the pedestrian and the next stopping point; The simulation calculation module uses GPU-accelerated matrix operations to calculate the movement trajectories of multiple pedestrians.
Citation Information
Patent Citations
People flow video detection and analysis system
CN105574501A
Vehicle control device
JP2020175864A
