A data-driven multi-granularity crowd behavior control simulation method and device

By combining energy optimization models with data-driven techniques, a dataset of real pedestrian movement features was constructed, which solved the problems of insufficient diversity and realism in existing crowd behavior simulations and achieved high-fidelity, multi-granular crowd behavior control.

CN116882235BActive Publication Date: 2026-07-24ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2023-06-30
Publication Date
2026-07-24

Smart Images

  • Figure CN116882235B_ABST
    Figure CN116882235B_ABST
Patent Text Reader

Abstract

The application discloses a data-driven multi-granularity crowd behavior control simulation method and device. The method comprises the following steps: (1) constructing a real pedestrian solution space according to existing pedestrian trajectory data; (2) initializing a simulation scene: including grid-based initialization of environment information, initialization of a pedestrian motion state and initialization of a macroscopic velocity field; (3) real-time simulation driven by data: updating the macroscopic velocity field based on environment information and all pedestrian motion states; in the real pedestrian solution space obtained in step (1), a data-driven multi-granularity energy optimization model is solved in real time in the form of energy minimization to generate high-fidelity crowd behavior in the simulation scene set in step (2). The application uses a multi-granularity energy optimization model to ensure the diversity, controllability and scalability of the result, uses an acceleration-aware data-driven model to ensure the authenticity of the simulation result, and can simulate diversified crowd behavior with high fidelity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of group animation technology, specifically to a data-driven, multi-granularity crowd behavior control simulation method and apparatus. Background Technology

[0002] Crowds are common in the real world and exhibit cluster behavior. High-fidelity crowd animation simulations are widely used in games, animation, and autonomous driving.

[0003] In the field of computer graphics, crowd control simulation methods can be divided into two categories: model-based methods and data-driven methods. Model-based methods abstract observed crowd behavior into explicit mathematical models and deterministic systems, which can simulate various crowd behaviors at different granular levels. Examples include the macroscopic crowd flow simulation proposed by Treuille (Treuille, Adrien, et al. "Continuum crowds." ACM Transactions on Graphics (TOG) 25.3 (2006): 1160-1168.) or Narain (Narain, Rahul, et al. "Aggregate dynamics for dense crowd simulation." ACM SIGGRAPH Asia 2009 papers. 2009. 1-8.) and others, as well as the macroscopic crowd flow simulation proposed by Helbing (Helbing, Dirk, et al. "Social force model for pedestrian dynamics." Physical review E 51.5 (1995): 4282.) or Karamouzas (Karamouzas, Ioannis, et al. "Universal power law governing pedestrian interactions." Physical review letters). The model proposed by 113.23(2014):238701.) simulates local pedestrian interactions at a microscopic level. However, because pedestrian interactions are complex and subtle, model-based methods often produce crowd movements with limited realism and diversity. This is because these models are usually based on simplified and idealized assumptions and have a deterministic nature.

[0004] On the other hand, data-driven crowd simulation methods often rely on real-world data, attempting to build a learning-capable model that can adapt to complex crowd data in a black-box manner. Most data-driven methods are based on simple strategies, such as Lerner (Lerner, Alon, et al. "Crowds by example." Computer Graphics Forum. 26.3 (2007): 655–664.) and Charalambous (Charalambous, Panayiotis, et al. "The pag crowd: A graph-based approach for efficient data-driven crowd simulation." Computer Graphics Forum. 33.8 (2014): 95–108.) and others, which generate simulated trajectories by splicing real pedestrian trajectory segments according to rules. These methods can produce realistic results, but the diversity of the simulation is poorly affected by the input data. Furthermore, most data-driven methods only consider simplified local interactions, such as local collision avoidance, and ignore macroscopic information. More recent deep learning techniques have been used to learn more abstract behavioral models. Although deep learning methods have better data fitting capabilities, their universality is still limited by the training data, and the model itself is not interpretable.

[0005] Recently, Ren (Ren, Jiaping, et al. "Heter-Sim: Heterogeneous multi-agent systems simulation by interactive data-driven optimization." IEEE transactions on visualization and computer graphics 27.3(2019):1953-1966.) et al. proposed a hybrid data-driven and model-based approach, attempting to solve an optimization-based model using real-world velocities as the solution space. This method updates the pedestrian's motion state by selecting a velocity from real-world speeds that is close to the pedestrian's current velocity. However, because this method ignores acceleration—a crucial factor for realistic motion selection—the output motion is not realistic enough. Secondly, this method only considers microscopic pedestrian control while neglecting macroscopic control, resulting in a limited range of scenarios that can be simulated. Summary of the Invention

[0006] This invention provides a data-driven, multi-granularity crowd behavior control simulation method that combines a physics-based energy optimization model with data-driven technology. The physics-based energy optimization model models the micro and macroscopic behaviors of pedestrians, ensuring the diversity of simulation results. Simultaneously, combined with data-driven technology, an acceleration-sensing data-driven model is proposed. This model uses a real pedestrian motion feature dataset as the solution space of the energy optimization model to generate natural motion changes and simulated trajectories similar to real trajectories, ensuring the authenticity of the results.

[0007] A data-driven, multi-granularity crowd behavior control simulation method includes the following steps:

[0008] (1) Construct a real pedestrian solution space based on existing pedestrian trajectory data;

[0009] (2) Initialize the simulation scene: including the mesh initialization of environmental information, the initialization of pedestrian motion state, and the initialization of macroscopic velocity field;

[0010] (3) Data-driven real-time simulation: The macroscopic velocity field is updated based on environmental information and the motion state of all pedestrians; in the real pedestrian solution space obtained in step (1), the data-driven multi-granularity energy optimization model is solved in real time in the form of energy minimization, so as to generate high-fidelity crowd behavior in the simulation scenario set in step (2).

[0011] In step (1), the real pedestrian solution space is the pedestrian motion feature dataset D = {d} constructed based on existing pedestrian trajectory data. v}, where pedestrian movement characteristics d v =(v arr v) contains the continuous pedestrian motion velocity calculated using forward finite difference, where v is the velocity calculated from an existing pedestrian trajectory, used to update the pedestrian motion state during simulation. arr v is the velocity of the previous time step in the existing pedestrian trajectory, used to control the similarity between the generated trajectory segment and the existing pedestrian trajectory during simulation.

[0012] The environmental information initialized in step (2) includes the shape, size, position, and velocity of obstacles and targets in the simulation scene; the simulation scene is discretized using a meshing method, and environmental obstacles are discretized into mesh cells to ensure that the model can handle environmental obstacles of arbitrary shapes; the pedestrian's initial motion state includes its position coordinates and velocity; the macroscopic velocity field V is initialized using an improved continuum model. gFor the initialization algorithm, please refer to the reference (Treuille, Adrien, et al. "Continuum crowds." ACM Transactions on Graphics (TOG) 25.3 (2006): 1160-1168.).

[0013] During the simulation, the position of the pedestrian in the macroscopic velocity field V g Interpolation allows for macroscopic speed control, guiding pedestrian behavior.

[0014] In steps (2) and (3), the macroscopic velocity field V is initialized and updated using an improved continuum model. g To guide pedestrians' macro-level behavior;

[0015] The improved continuum model uses a continuous environmental repulsion field to ensure the smoothness of the velocity field around environmental obstacles. For any grid cell m in the environmental information grid, its position coordinates are the coordinates of the grid cell center point p. m Assuming the set of grid cells k occupied by environmental obstacles is K, the environmental obstacle repulsion field R(p) of any grid cell m in the simulation scenario is... m The value of ) and d min Related, d min This represents the minimum distance between grid cell m and the grid cells occupied by the boundary of an environmental obstacle. Its calculation formula is:

[0016] d=min{||p m -p k ||2},k∈K,

[0017]

[0018] Where p k This represents the coordinates of the center point of the grid cell k occupied by the boundary of an environmental obstacle;

[0019] R(p m The formula for calculating ) is:

[0020]

[0021] Where, d crep >0 represents the preset distance threshold.

[0022] In step (3), the macroscopic velocity field is updated based on environmental information and the motion state of all pedestrians. The update algorithm can be found in the aforementioned reference (Treuille, Adrien, et al. Continuum crowds. ACM Transactions on Graphics (TOG) 25.3 (2006): 1160-1168.).

[0023] The data-driven multi-granularity energy optimization model described in step (3) adopts an implicit Euler stepping scheme. For any pedestrian i at time t, the data-driven multi-granularity energy optimization model updates the motion state of pedestrian i at time t+1 after one time step Δt:

[0024]

[0025]

[0026] Among them, ENV t This indicates the initial environment information. Let N be the set of motion states of all pedestrians in the simulation scenario at time t, where N represents the number of pedestrians. Let i be the position coordinates of pedestrian i at time t. Let be the velocity of pedestrian i at time t; and the velocity at time t+1. By minimizing the multi-granularity energy optimization model E(i,d) v ,S t ,ENV t V g This invention obtains E(i,d) v ,S t ,ENV t V g When minimized, v is used as ); Δt is a time step between time t and time t+1; V represents the new position of pedestrian i at time t+1 after one time step; g This represents the macroscopic velocity field.

[0027] The calculation formula for the multi-granularity energy optimization model is as follows:

[0028] E(i,d v ,S t ,ENV t V g ) = E df +E intf +E mc ,

[0029] Among them, E df and E intfControlling pedestrian behavior at the micro level: E df Implement basic micro-movement control, E intf Implement micro-interactive control; E mc Control pedestrian behavior at the macro level.

[0030] E df The basic motion control energy optimization model, representing the micro-level, includes two types of behavioral control terms: an acceleration-sensing state change realism control term E. ss and trajectory smoothness control term E dc E df =E ss +E dc ;

[0031] Specifically, E ss Used to simulate the dynamics of motion in the real world (continuous velocity changes) to ensure the model's ability to generate reliable trajectories similar to real data, given the pedestrian motion characteristics d in the real pedestrian solution space. v =(v arr Given that v)∈D, E ss By optimizing v arr The velocity of pedestrian i at time t Similarity to ensure with v arr Correspondingly, used to calculate the velocity of pedestrian i at time t+1. velocity v∈d v The reasonableness of ∈D is calculated using the following formula:

[0032] E ss =w dir E dir +w mag E mag ,

[0033]

[0034]

[0035] Among them, w dir ≥0 and w mag ≥0 represents E dir and E mag The weights; and v arr v arr The direction vector and magnitude; and They are respectively The direction vector and magnitude;

[0036] Trajectory smoothness control term E dcIt is used to control the continuity of pedestrian velocity direction in order to generate a smooth trajectory, and it calculates the direction vector of velocity v. relative to the direction of the pedestrian's velocity at time t The difference is calculated using the following formula:

[0037]

[0038] Wherein, coefficient w dc ≥0.

[0039] E intf E represents the interactive control item at the micro level. intf =E aa +E ae E aa E is an interactive control item between pedestrians to achieve collision avoidance between pedestrians. ae This is an interactive control item between pedestrians and the environment, enabling collision avoidance between pedestrians and environmental obstacles;

[0040] Specifically, pedestrian-to-pedestrian interaction control item E aa =E insCA +E antiCA E insCA E is a distance-based instantaneous continuous collision avoidance term. antiCA This is a time-based anticipatory collision avoidance term; it is assumed that at each instant, pedestrian i's collision neighbor j maintains its current velocity. Marching, E insCA The calculation formula is:

[0041]

[0042] Wherein, coefficient w insCA ≥0; InsN is the set of potential instantaneous collision neighbors, specifically within a range R of pedestrian i. Ins =2v max Other pedestrians within Δt, v max The maximum velocity in the solution space for a real pedestrian; d c It is a constant representing the comfortable distance between pedestrians; Let t′ be the predicted shortest distance between pedestrian i and its collision neighbor j within a time step Δt, where t′ = t + α′Δt, α′ ∈ (0, 1]. Let j be the position coordinates of the colliding neighbor j at time t. Let r be the velocity of the collision neighbor j at time t; the pedestrian is modeled as a disk shape. i and r j Let be the radii of pedestrian i and the collision neighbor j, respectively. The formula for calculating α′ is:

[0043]

[0044] Where α is obtained by solving the equation get;

[0045] In pedestrian-pedestrian interaction control, using the previously calculated α, the pedestrian-pedestrian anticipated collision avoidance term E antiCA The calculation formula is:

[0046]

[0047] Wherein, coefficient w antiCA ≥0; AntiN is the expected collision neighbor set, specifically the distance range R from the pedestrian. Anti =2v max α c Other pedestrians within Δt; To cut off time, in order to control pedestrians from ignoring potential collisions in the more distant future;

[0048] Pedestrian-Environmental Obstacle Instantaneous Collision Avoidance Item E ae The calculation formula is:

[0049]

[0050] Wherein, coefficient w insE ≥0; InsEnv is the set of potential instantaneous collision obstacle neighbors, specifically containing all obstacles at a distance R from pedestrian i. Ins Environmental obstacle grid cells within the range; For the predicted new location of the obstacle's neighbors; d e It is a constant representing the comfortable distance between pedestrians and obstacles; Let l be the predicted closest distance between pedestrian i and obstacle neighbor k within a time step Δt, where l is the side length of the grid cell; t″=t+β′Δt,β′∈(0,1], Let k be the position coordinates of the obstacle neighbor at time t. Let β′ be the velocity of the obstacle neighbor k at time t. The formula for calculating β′ is:

[0051]

[0052] Where β is obtained by solving the equation get.

[0053] The macro-behavioral control item E mc Controlling the pedestrian's macroscopic velocity field V calculated above g Guided by the direction, it moves towards the target, and its calculation formula is:

[0054] E mc =w mdir E mdir +w mmag E mmag ,

[0055]

[0056]

[0057] Among them, w mdir ≥0 and w mmag ≥0 represents E mdir and E mmag The weight, and Based on the current position of pedestrian i at time t In the macroscopic velocity field V g Macro control speed obtained by interpolation The direction vector and magnitude, v and d represent pedestrian motion features, respectively. v =(v arr The direction vector and magnitude of v in (v).

[0058] In another embodiment, the data-driven multi-granularity crowd behavior control simulation method uses a historical velocity direction alignment method during the simulation process to analyze the pedestrian motion features d in the real pedestrian solution space. v =(v arr Real-time data augmentation is performed (v) to obtain aligned pedestrian motion features d′. v =(v′) arr ,v′) and based on this, calculate the multi-granularity energy optimization model E; specifically, let Let i be the velocity of any pedestrian at time t. The direction vector is then used to obtain the standard rotation matrix in Euclidean space by solving the following linear equation in two variables.

[0059]

[0060]

[0061] For v arr The direction vector;

[0062] Then use For the selected pedestrian motion features d v The velocity v∈d in v ∈D direction After rotation, the augmented optional new velocity v′ is obtained, calculated using the following formula:

[0063]

[0064]

[0065] v represents the selected pedestrian motion characteristic d v The magnitude of the velocity v in the middle.

[0066] The present invention also provides a data-driven multi-granularity crowd behavior control simulation device, including a memory and a processor. The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory. When the computer program is run, it causes the processor to execute the data-driven multi-granularity crowd behavior control simulation method.

[0067] This invention utilizes a multi-granularity energy optimization model to model the micro and macroscopic behaviors of pedestrians. It also combines data-driven technology, using an acceleration-sensing data-driven model, to use a real pedestrian motion feature dataset as the solution space of the energy optimization model.

[0068] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0069] This invention can simulate multi-granularity crowd behavior, ensuring the diversity of results generated by the method. The data-driven approach enables the method to generate high-fidelity simulation results, and the energy-optimized model makes the method highly controllable and scalable. Attached Figure Description

[0070] Figure 1 This is a schematic diagram of the simulation process of the data-driven multi-granularity crowd behavior control simulation method proposed in this invention.

[0071] Figure 2 The graph shows the simulation performance of the proposed simulation method for different sizes of people in scenarios with different numbers of groups. N is the number of pedestrians in the scenario, and the legend represents the number of groups of pedestrians in the scenario. Detailed Implementation

[0072] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0073] The simulation flow of the data-driven multi-granularity crowd behavior control simulation method of this invention is as follows: Figure 1As shown, the steps include: (1) constructing a real pedestrian solution space based on existing pedestrian trajectory data; (2) initializing the simulation scene, including gridded initialization of environmental information, initialization of pedestrian motion state and initialization of macroscopic velocity field; (3) data-driven real-time simulation, updating the macroscopic velocity field based on environmental information and all pedestrian motion state, solving the data-driven multi-granularity energy optimization model in real time in the form of energy minimization in the real pedestrian solution space obtained in step (1), so as to generate high-fidelity crowd behavior in real time in the simulation scene set in step (2).

[0074] Specifically:

[0075] In step (1), the real pedestrian solution space is the pedestrian motion feature dataset D = {d} constructed based on existing pedestrian trajectory data. v}, where pedestrian movement characteristics d v =(v arr v) contains the continuous pedestrian motion velocity calculated using forward finite difference, where v is the velocity calculated from an existing pedestrian trajectory, used to update the pedestrian motion state during simulation. arr v is the velocity of the previous time step in the existing pedestrian trajectory, used to control the similarity between the generated trajectory segment and the existing pedestrian trajectory during simulation.

[0076] In steps (2) and (3), the macroscopic velocity field V is initialized and updated using an improved continuum model. g To guide pedestrians' macro-level behavior;

[0077] The improved continuum model uses a continuous environmental repulsion field to ensure the smoothness of the velocity field around environmental obstacles. For any grid cell m in the environmental information grid, its position coordinates are the coordinates of the grid cell center point p. m Assuming the set of grid cells k occupied by environmental obstacles is K, the environmental obstacle repulsion field R(p) of any grid cell m in the simulation scenario is... m The value of ) and d min Related, d min This represents the minimum distance between grid cell m and the grid cells occupied by the boundary of an environmental obstacle. Its calculation formula is:

[0078] d=min{||p m -p k ||2},k∈K,

[0079]

[0080] Where p k This represents the coordinates of the center point of the grid cell k occupied by the boundary of an environmental obstacle;

[0081] R(pm The formula for calculating ) is:

[0082]

[0083] Where, d crep >0 represents the preset distance threshold.

[0084] The data-driven multi-granularity energy optimization model described in step (3) adopts an implicit Euler stepping scheme. For any pedestrian i at time t, the data-driven multi-granularity energy optimization model updates the motion state of pedestrian i at time t+1 after one time step Δt:

[0085]

[0086]

[0087] Among them, ENV t This indicates the initial environment information. Let N be the set of motion states of all pedestrians in the simulation scenario at time t, where N represents the number of pedestrians. Let i be the position coordinates of pedestrian i at time t. Let be the velocity of pedestrian i at time t; and the velocity at time t+1. By minimizing the multi-granularity energy optimization model E(i,d) v ,S t ,ENV t V g We obtain Δt, which is a time step between time t and time t+1. V represents the new position of pedestrian i at time t+1 after one time step; g This represents the macroscopic velocity field.

[0088] The calculation formula for the multi-granularity energy optimization model is as follows:

[0089] E(i,d v ,S t ,ENV t V g ) = E df +E intf +E mc ,

[0090] Among them, E df and E intf Controlling pedestrian behavior at the micro level: E df Implement basic micro-movement control, E intf Implement micro-interactive control; E mc Control pedestrian behavior at the macro level.

[0091] Edf The basic motion control energy optimization model, representing the micro-level, includes two types of behavioral control terms: an acceleration-sensing state change realism control term E. ss and trajectory smoothness control term E dc E df =E ss +E dc ;

[0092] Specifically, given the pedestrian motion features d in the real pedestrian solution space v =(v arr Given that v)∈D, E ss By optimizing v arr The velocity of pedestrian i at time t Similarity to ensure with v arr Correspondingly, used to calculate the velocity of pedestrian i at time t+1. velocity v∈d v The reasonableness of ∈D is calculated using the following formula:

[0093] E ss =w dir E dir +w mag E mag ,

[0094]

[0095]

[0096] Among them, w dir ≥0 and w mag ≥0 represents E dir and E mag The weights; and v arr v arr The direction vector and magnitude; and They are respectively The direction vector and magnitude;

[0097] E dc The formula used to control the continuity of pedestrian speed and direction is as follows:

[0098]

[0099] Wherein, coefficient w dc ≥0.

[0100] E intf E represents the interactive control item at the micro level. intf =E aa +E ae Eaa E is an interactive control item between pedestrians to achieve collision avoidance between pedestrians. ae This is an interactive control item between pedestrians and the environment, enabling collision avoidance between pedestrians and environmental obstacles;

[0101] Specifically, pedestrian-to-pedestrian interaction control item E aa =E insCA +E antiCA , of which E insCA E is a distance-based instantaneous continuous collision avoidance term. antiCA This is a time-based anticipatory collision avoidance term; it is assumed that at each instant, pedestrian i's collision neighbor j maintains its current velocity. Marching, E insCA The calculation formula is:

[0102]

[0103] Wherein, coefficient w insCA ≥0; InsN is the set of potential instantaneous collision neighbors, specifically within a range R of pedestrian i. Ins =2v max Other pedestrians within Δt, v max The maximum velocity in the solution space for a real pedestrian; d c It is a constant representing the comfortable distance between pedestrians; Let t′ be the predicted shortest distance between pedestrian i and its collision neighbor j within a time step Δt, where t′ = t + α′Δt, α′ ∈ (0, 1]. Let j be the position coordinates of the colliding neighbor j at time t. Let r be the velocity of the collision neighbor j at time t; the pedestrian is modeled as a disk shape. i and r j Let be the radii of pedestrian i and the collision neighbor j, respectively. The formula for calculating α′ is:

[0104]

[0105] Where α is obtained by solving the equation get;

[0106] In pedestrian-pedestrian interaction control, using the previously calculated α, the pedestrian-pedestrian anticipated collision avoidance term E antiCA The calculation formula is:

[0107]

[0108] Wherein, coefficient w antiCA≥0; AntiN is the expected collision neighbor set, specifically the distance range R from the pedestrian. Anti =2v max α c Other pedestrians within Δt; To cut off time, in order to control pedestrians from ignoring potential collisions in the more distant future;

[0109] Pedestrian-Environmental Obstacle Instantaneous Collision Avoidance Item E ae The calculation formula is:

[0110]

[0111] Wherein, coefficient w insE ≥0; InsEnv is the set of potential instantaneous collision obstacle neighbors, specifically containing all obstacles at a distance R from pedestrian i. Ins Environmental obstacle grid cells within the range; For the predicted new location of the obstacle's neighbors; d e It is a constant representing the comfortable distance between pedestrians and obstacles; Let l be the predicted closest distance between pedestrian i and obstacle neighbor k within a time step Δt, where l is the side length of the grid cell; t″=t+β′Δt,β′∈(0,1], Let k be the position coordinates of the obstacle neighbor at time t. Let β′ be the velocity of the obstacle neighbor k at time t. The formula for calculating β′ is:

[0112]

[0113] Where β is obtained by solving the equation get.

[0114] The macro-behavioral control item E mc The calculation formula is:

[0115] E mc =w mdir E mdir +w mmag E mmag ,

[0116]

[0117]

[0118] Among them, w mdir ≥0 and w mmag ≥0 represents E mdir and E mmag The weight, and Based on the current position of pedestrian i at time t In the macroscopic velocity field V g Macro control speed obtained by interpolation The direction vector and magnitude, v and d represent pedestrian motion features, respectively. v =(v arr The direction vector and magnitude of v in (v).

[0119] Example 1

[0120] Example 1 uses the above simulation method to simulate the bidirectional crowd clustering behavior in a crowded corridor, in order to achieve a scenario similar to the real data scenario.

[0121] (1) Constructing a real pedestrian solution space:

[0122] The real data obtained came from the bidirectional corridor pedestrian trajectory dataset provided by Zhang et al. (Zhang, Jun, et al. "Ordering in bidirectional pedestrian flows and its influence on the fundamental diagram." Journal of Statistical Mechanics: Theory and Experiment 2012.02(2012): P02002.). This dataset contains the positional information of different pedestrians at different time points in a narrow corridor without environmental obstacles. The forward finite difference method was used to process each trajectory to obtain the continuous velocity information of pedestrians at different time points, so as to form each data item in the pedestrian solution space and generate the real pedestrian solution space.

[0123] (2) Initialize the simulation scene:

[0124] Similar to real-world scenarios, the simulation environment is free of obstacles. The initial number of pedestrians is 100, and they are evenly divided into two groups. Each group is initially positioned at one end of a corridor, and during the simulation, the target for any group is the opposite end of the corresponding corridor. For each group of pedestrians, their position at the corresponding initial corridor exit is randomly initialized, and a speed is randomly selected from the real pedestrian solution space as their initial speed.

[0125] (3) Real-time crowd control simulation:

[0126] The velocity of any pedestrian i at the next time t+1 The velocity is the data term that minimizes the data-driven multi-granularity energy optimization model E in the real pedestrian solution space; Δt = 0.0625s, similar to the real data. During the simulation, the two groups of pedestrians, controlled by macroscopic and microscopic factors, can naturally be divided into two flowing groups in the narrow corridor, and the pedestrians can quickly cross the corridor without collision or obstruction.

[0127] The weights or coefficients of different energy terms during the calculation process are shown in Table 1, and the computational performance of this embodiment is shown in Table 2.

[0128] Example 2

[0129] Example 2 also employs the simulation method described in the above specific embodiments, but during the simulation process, a historical velocity direction alignment method is used to align the pedestrian motion characteristics d in the real pedestrian solution space. v =(v arr Real-time data augmentation is performed (v) to obtain aligned pedestrian motion features d′. v =(v′) arr ,v′) and based on this, calculate the multi-granularity energy optimization model E; specifically, let Let i be the velocity of any pedestrian at time t. The direction vector is then used to obtain the standard rotation matrix in Euclidean space by solving the following linear equation in two variables.

[0130]

[0131]

[0132] For v arr The direction vector;

[0133] Then use For the selected pedestrian motion features d v The velocity v∈d in v ∈D direction After rotation, the augmented optional new velocity v′ is obtained, calculated using the following formula:

[0134]

[0135]

[0136] v represents the selected pedestrian motion characteristic d v The magnitude of the velocity v in the middle.

[0137] Example 2 simulates bidirectional crowd clustering behavior in a congested corridor with environmental obstacles to realize a scenario different from the real data scenario, proving that the method provided by the present invention has universality and can simulate real-world clustering behavior that is different from the real data scenario.

[0138] (1) Constructing a real pedestrian solution space:

[0139] The same as step (1) in Example 1.

[0140] (2) Initialize the simulation scene:

[0141] A static, disc-shaped obstacle is initialized at the center of the corridor; the method for initializing pedestrian movement is the same as in Example 1.

[0142] (3) Real-time crowd control simulation:

[0143] The velocity of any pedestrian i at the next time t+1 Let Δt be the velocity of the data item that minimizes the data-driven multi-granularity energy optimization model E in the real pedestrian solution space. This velocity is a selectable new velocity obtained by real-time data augmentation of the real pedestrian solution space using the aforementioned historical velocity direction alignment method; Δt = 0.0625s, similar to the real data. During the simulation, the two groups of pedestrians, controlled macroscopically and microscopically, can naturally separate into two flowing groups in the narrow corridor, quickly crossing the corridor without collision or obstruction while avoiding environmental obstacles.

[0144] The weights or coefficients of different energy terms during the calculation process are shown in Table 1, and the computational performance of this embodiment is shown in Table 2.

[0145] Example 3

[0146] Example 3 also employs the simulation method described in Example 2, and similarly uses the historical velocity direction alignment method during the simulation process. Example 3 simulates the behavior of crowds of different sizes in scenarios divided into different numbers of groups, in order to test the computational performance of the simulation method. Example 3 includes multiple simulation experiments, with different numbers of pedestrians or groups in each experiment. The simulation process is as follows:

[0147] (1) Constructing a real pedestrian solution space:

[0148] The same as step (1) in Example 2.

[0149] (2) Initialize the simulation scene:

[0150] The simulation scenario is a square area with a side length of 200 meters, with no obstacles in the scene; the crowd is evenly divided into a specified number of groups, and the target positions of pedestrians in different groups are randomly initialized; for each group of pedestrians, their position in the scene is randomly initialized, and a speed is randomly selected from the real pedestrian solution space as the pedestrian's initial speed.

[0151] (3) Real-time crowd control simulation:

[0152] The velocity of any pedestrian i at the next time t+1 The velocity is the data item in the real pedestrian solution space that minimizes the data-driven multi-granularity energy optimization model E. This velocity is a selectable new velocity obtained by real-time data augmentation of the real pedestrian solution space using the aforementioned historical velocity direction alignment method; Δt = 0.0625s, similar to the real data. Based on computational performance statistics, the simulation method proposed in this invention can simulate large-scale crowds in real time.

[0153] The weights or coefficients of different energy terms in the calculation process are shown in Table 1. The computational performance of this embodiment is as follows: Figure 2 As shown.

[0154] Table 1

[0155] Example 1 1 1 0.25 0.5 1 0 0.75 0.75 Example 2 1 1 0.25 1 1 1 0.75 0.75 Example 3 1 1 0.25 0.5 1 0 0.75 0.75

[0156] Table 2

[0157] Example 1 100 0.0035 Example 2 80 0.0026

[0158] As can be seen, the crowd behavior control simulation method provided by this invention uses a multi-granularity energy optimization model to ensure the diversity, controllability and scalability of the results, while using an acceleration-sensing data-driven model to ensure the authenticity of the simulation results, and can simulate diverse crowd behaviors with high fidelity.

[0159] Furthermore, it should be understood that after reading the above description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims.

Claims

1. A data-driven, multi-granularity crowd behavior control simulation method, characterized in that, Including the following steps: (1) Construct a real pedestrian solution space based on existing pedestrian trajectory data; (2) Initialize the simulation scene: including the mesh initialization of environmental information, the initialization of pedestrian motion state, and the initialization of macroscopic velocity field; (3) Data-driven real-time simulation: The macroscopic velocity field is updated based on environmental information and the motion state of all pedestrians; in the real pedestrian solution space obtained in step (1), the data-driven multi-granularity energy optimization model is solved in real time in the form of energy minimization, so as to generate high-fidelity crowd behavior in the simulation scenario set in step (2) in real time. In step (1), the real pedestrian solution space is the pedestrian motion feature dataset constructed based on existing pedestrian trajectory data. Among them, pedestrian movement characteristics Includes the continuous pedestrian motion velocity calculated using forward finite difference. The velocity, calculated from an existing pedestrian trajectory, is used to update the pedestrian's motion state during simulation. for The velocity at the previous time step in the existing pedestrian trajectory is used to control the similarity between the generated trajectory segment and the existing pedestrian trajectory during simulation. In steps (2) and (3), the macroscopic velocity field is initialized and updated using an improved continuum model. To guide pedestrians' macro-level behavior; The improved continuum model uses a continuous environmental repulsion field to ensure the smoothness of the velocity field around environmental obstacles, for any grid cell in the environmental information grid. Its position coordinates are the coordinates of the center point of the grid cell. Assuming the grid cells occupied by the boundary of environmental obstacles The set is Arbitrary mesh element in the simulation scenario Environmental barrier repulsion field The value and Related, Represents grid cells The minimum distance to the grid cells occupied by the boundary of environmental obstacles is calculated using the following formula: in The grid cells representing the boundaries of environmental obstacles The coordinates of the center point; The calculation formula is: in, This is a preset distance threshold; The data-driven multi-granularity energy optimization model described in step (3) adopts an implicit Euler step scheme. Any pedestrian at any time Data-driven multi-granularity energy optimization model updates pedestrian data. At a time step After Motion state at any given moment: in, This indicates the initial environment information. For all pedestrians in the simulation scenario in the current The set of motion states at any given moment Represents the number of pedestrians. For pedestrians current Position coordinates at that moment For pedestrians current The speed of time; Speed ​​of time By minimizing the multi-granularity energy optimization model get; for Time and A time step between moments; For pedestrians After one time step The new position of the moment; Represents the macroscopic velocity field; The calculation formula for the multi-granularity energy optimization model is as follows: in, and Controlling pedestrian behavior at the micro level: Implement basic micro-level movement control. Implement micro-interactive control; Control pedestrian behavior at the macro level.

2. The data-driven multi-granularity crowd behavior control simulation method according to claim 1, characterized in that, The basic motion control energy optimization model, representing the micro-level, includes two types of behavioral control terms: an acceleration-sensing state change realism control term. Trajectory smoothness control item ,Right now ; Specifically, pedestrian motion characteristics in a given real pedestrian solution space Under the premise, Through optimization with pedestrians current Speed ​​of time Similarity to ensure Corresponding, used for calculating pedestrians exist Speed ​​of time speed The rationality is calculated using the following formula: in, and They are respectively and The weights; and They are respectively The direction vector and magnitude; and They are respectively The direction vector and magnitude; The formula used to control the continuity of pedestrian speed and direction is as follows: Among them, coefficient .

3. The data-driven multi-granularity crowd behavior control simulation method according to claim 1, characterized in that, Represents interactive control items at the micro level. , This is a pedestrian-to-pedestrian interaction control mechanism to prevent pedestrian collisions. This is an interactive control item between pedestrians and the environment, enabling collision avoidance between pedestrians and environmental obstacles; Specifically, pedestrian-to-pedestrian interaction control items ,in, This is a distance-based instantaneous continuous collision avoidance term; This is a time-based anticipatory collision avoidance term; assuming the pedestrian... Every instantaneous collision neighbor Maintain its current speed Marching, The calculation formula is: Among them, coefficient ; It is a set of potential instantaneous collision neighbors, specifically those at the distance of pedestrians. scope Other pedestrians inside, The maximum speed in the solution space for a real pedestrian; It is a constant representing the comfortable distance between pedestrians; For predicted pedestrians Collision Neighbors Traveling for one time step The closest distance within, , , , To collide with neighbors current Position coordinates at that moment To collide with neighbors current The speed of time; pedestrians are modeled as disk shapes. and pedestrians Collision Neighbors radius, The calculation formula is: in, By solving equations get; In pedestrian-pedestrian interaction control, the aforementioned calculations are utilized. Pedestrian-pedestrian anticipated collision avoidance items The calculation formula is: Among them, coefficient ; The expected collision neighbor set, specifically the distance range from pedestrians. Other pedestrians within; To cut off time, in order to control pedestrians from ignoring potential collisions in the more distant future; Pedestrian-Environmental Obstacle Instantaneous Collision Avoidance The calculation formula is: Among them, coefficient ; The set of neighbors of potential instantaneous collision obstacles, specifically including all obstacles that collide with pedestrians. distance Environmental obstacle grid cells within the range; The new location of the predicted obstacle neighbors; It is a constant representing the comfortable distance between pedestrians and obstacles; For predicted pedestrians Neighbors of obstacles At a time step The closest distance within, The side length of the grid cell; , , , Neighbors of obstacles current Position coordinates at that moment Neighbors of obstacles current The speed of time, The calculation formula is: in, By solving equations get.

4. The data-driven multi-granularity crowd behavior control simulation method according to claim 1, characterized in that, The macro-behavioral control items The calculation formula is: in, and They are respectively and The weight, and According to pedestrians current Time and location In the macroscopic velocity field Macro control speed obtained by interpolation The direction vector and magnitude, and Pedestrian movement characteristics middle The direction vector and magnitude.

5. The data-driven multi-granularity crowd behavior control simulation method according to claim 1, characterized in that, During the simulation, the historical velocity direction alignment method was used to analyze the pedestrian motion characteristics in the real pedestrian solution space. Real-time data augmentation is performed to obtain aligned pedestrian motion features. Based on this, a multi-granularity energy optimization model was calculated. Specifically, let , for Pedestrians at any time speed The direction vector is then used to obtain the standard rotation matrix in Euclidean space by solving the following linear equation in two variables. : for The direction vector; Then use Selected pedestrian motion characteristics medium speed direction Rotate to obtain an augmented, selectable new velocity. The calculation formula is: Selected pedestrian motion characteristics medium speed Size.

6. A data-driven, multi-granularity crowd behavior control simulation device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program stored in the memory, characterized in that, When the computer program is executed, the processor performs the data-driven multi-granularity crowd behavior control simulation method according to any one of claims 1-5.