Pedestrian flow simulation method and device, equipment and storage medium

By constructing walking paths and people flow distribution data in 3D scenes, and generating and controlling AI characters to travel along the walking paths, the problem of low accuracy of people flow simulation in the prior art is solved, and more efficient people flow data simulation is achieved.

CN119443455APending Publication Date: 2025-02-14BEIJING JINGUAN CULTURE MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411588005.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately simulate people flow, resulting in inefficient engineering design and passenger flow management.

Method used

By obtaining pre-constructed walking paths and traffic distribution data in the 3D scene, AI characters are generated and controllers and locators are configured for them to control AI characters to travel along the walking path, avoid loss and improve simulation accuracy.

Benefits of technology

It has achieved improved the accuracy of traffic simulation, avoided the loss of AI roles, and enhanced the reliability and efficiency of traffic data simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443455A_ABST
    Figure CN119443455A_ABST
Patent Text Reader

Abstract

The invention provides a human traffic simulation method and device, equipment and a storage medium. The method comprises the following steps: acquiring a pre-constructed walking path in a 3D scene; acquiring pedestrian flow distribution data of the walking path, and generating a set number of AI roles at the starting point of the walking path according to the pedestrian flow distribution data; a controller and a locator are configured for each AI role; and the controller of each AI role controls each AI role to advance along the walking path according to the locator of each AI role. According to the method, the independent locator is configured for each AI role, and the AI roles are guided to walk along the walking path through the independent locators, so that the AI roles are prevented from being lost, and the accuracy of people flow data simulation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of digital scene simulation, and in particular to a method, device, equipment and storage medium for simulating human flow. Background Art

[0002] Crowd flow simulation refers to the process of simulating and predicting the flow of people through computer technology. This technology is mainly used for passenger flow organization, planning, design and safety analysis in crowded places such as large-scale events, parks, subways, large transportation hubs, stadiums, shopping malls, etc. Accurate crowd flow simulation can effectively optimize engineering design and passenger flow management, thereby reducing the risk of large passenger flows and improving the safety and operating efficiency of crowded places. Therefore, how to accurately simulate crowd flow is a technical problem that needs to be solved by technicians in this field. Summary of the invention

[0003] In view of this, the present disclosure proposes a crowd flow simulation method, device, equipment and storage medium, which can improve the accuracy of crowd flow simulation.

[0004] According to a first aspect of the present disclosure, a method for simulating human flow is provided, comprising: Get the pre-built walking path in the 3D scene; Obtaining crowd flow distribution data of the walking path, and generating a set number of AI characters at the starting point of the walking path according to the crowd flow distribution data; Allocate a controller and a locator for each of the AI ​​characters; The controller of each AI character controls each AI character to move along the walking path according to the locator of each AI character.

[0005] In a possible implementation, when constructing the walking path, it is implemented based on a spline generation tool in a 3D real-time engine.

[0006] In a possible implementation, when obtaining the pedestrian flow distribution data of the walking path, it includes: Obtain the total number of people participating in the simulation, the area weight of the walking path, and the time weight of each set time period; Based on the total number of pedestrian flows, the weights of each area, and the weights of each time period, pedestrian flow distribution data of each walking path is generated.

[0007] In a possible implementation, the controller of the AI ​​character, when controlling the AI ​​character to move along the walking path according to the locator of the AI ​​character, includes: Acquire the position data of the locator on the walking path; Calculating an optimal route for the AI ​​character to reach the location of the locator based on the location data and a pre-built navigation grid; The AI ​​character is controlled to move along the optimal route.

[0008] In a possible implementation, when controlling the AI ​​character to move along the walking path, the method further includes: Detecting whether there is an intelligent object within a preset range of the AI ​​character; In the case where there is an intelligent correspondence, the AI ​​character is controlled to interact with the intelligent object based on a pre-built behavior tree.

[0009] According to a second aspect of the present disclosure, there is provided a human flow simulation device, comprising: A walking path acquisition module is used to obtain a pre-built walking path in a 3D scene; A character generation module, used to obtain the flow distribution data of the walking path, and generate a set number of AI characters at the starting point of the walking path according to the flow distribution data of the walking path; A configuration module, used to configure a controller and a locator for each of the AI ​​characters; The simulation module is used for the controller of each AI character to control each AI character to move along the walking path according to the locator of each AI character.

[0010] In a possible implementation, when controlling the AI ​​character to move along the walking path, the simulation module is specifically used to: Acquire the position data of the locator on the walking path; Calculating an optimal route for the AI ​​character to reach the location of the locator based on the location data and a pre-built navigation grid; The AI ​​character is controlled to move along the optimal route.

[0011] In a possible implementation, when controlling the AI ​​character to move along the walking path, the simulation module is further configured to: Detecting whether there is an intelligent object within a preset range of the AI ​​character; In the case where there is an intelligent correspondence, the AI ​​character is controlled to interact with the intelligent object based on a pre-built behavior tree.

[0012] According to a third aspect of the present disclosure, a human flow simulation device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to execute the method described in the first aspect of the present disclosure.

[0013] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method described in the first aspect of the present disclosure.

[0014] The present disclosure provides a method, device, equipment and storage medium for simulating human traffic flow, the method comprising: obtaining a pre-constructed walking path in a 3D scene; obtaining human traffic flow distribution data of the walking path, and generating a set number of AI characters at the starting point of the walking path according to the human traffic flow distribution data; configuring a controller and a locator for each AI character; the controller of each AI character controls each AI character to move along the walking path according to the locator of each AI character. In the present disclosure, an independent locator is configured for each AI character, and the AI ​​character is guided along the walking path by the independent locator, thereby avoiding the loss of the AI ​​character and improving the accuracy of human traffic data simulation.

[0015] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0017] Figure 1 A flow chart showing a method for simulating human flow according to an embodiment of the present disclosure is shown; Figure 2 A schematic block diagram showing a behavior tree according to an embodiment of the present disclosure; Figure 3 A flowchart showing an example of a method for simulating human flow according to an embodiment of the present disclosure; Figure 4 A 3D scene interface display diagram according to an embodiment of the present disclosure is shown; Figure 5 A display diagram of a crowd flow trend adjustment interface according to an embodiment of the present disclosure is shown; Figure 6 A schematic block diagram of a human flow simulation device according to an embodiment of the present disclosure is shown; Figure 7 A schematic block diagram of a human flow simulation device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0018] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0019] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0020] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0021] <Method Example> Figure 1 FIG. 2 is a flow chart showing a method for simulating human traffic according to an embodiment of the present disclosure. Figure 1 As shown, the method includes steps S1100-S1400.

[0022] S1100: Acquire a pre-built walking path in a 3D scene.

[0023] It should be noted that when simulating the flow of people in crowded places, it is necessary to first construct a 3D scene of the crowded place, and then plan the possible walking paths of the crowd in the constructed 3D scene. After the walking paths are constructed, the flow of people can be simulated for the planned walking paths. The constructed walking paths can be one, two, or more, which are not specifically limited here.

[0024] It should be noted here that when performing the crowd flow simulation in the present disclosure, the crowd flow simulation is actually performed synchronously on each walking path in the 3D scene, and the crowd flow simulation method on each walking path is the same. Therefore, the construction process and the crowd flow simulation process will be described in detail below using a walking path as an example.

[0025] In a possible implementation, when constructing a walking path, it is implemented based on a spline generation tool in a 3D real-time engine. When constructing a walking path based on a spline generation tool in a 3D real-time engine, the following steps may be included: multiple control points are arranged in a 3D scene by using a spline generation tool, the positions and tangents of the control points are adjusted by using a transformation tool, and a smooth and natural walking path is created based on the adjusted multiple control points. The created walking path may be a fixed walking path or a dynamically adjusted walking path to adapt to the needs of different scenes and environmental changes.

[0026] After the walking path is constructed, the walking path can be obtained, and step S1200 is executed to obtain the crowd flow distribution data of the walking path, and a set number of AI characters are generated at the starting point of the walking path according to the crowd flow distribution data.

[0027] In a possible implementation, when obtaining the pedestrian flow distribution data of the walking path, the following steps may be included: First, obtain the total number of people participating in the simulation, the regional weight of the walking path, and the time weight of each set time period. Among them, the total number of people participating in the simulation is the total number of people that can be accommodated in the entire 3D scene. The regional weight of the walking path is used to characterize the proportion of the number of people passing through the walking path during the entire simulation process to the total number of people. It should be noted here that the system has a preset total simulation time. For the total simulation time, it is divided into multiple set time periods of equal length using a preset division time. When performing a crowd flow simulation, it is necessary to configure a corresponding time weight for each set time period divided out. The time weight corresponding to each set time period is used to reflect the proportion of the number of people passing through the walking path in each set time period to the total number of people passing through the walking path during the entire simulation time.

[0028] The total number of people flow in the simulation, the area weight of each walking path, and the time weight of each set time period can be the default value pre-configured in the system, or the configuration value configured by the user through the interactive interface, which is not specifically limited here. In addition to using the default value of the system, the total simulation time and the division time can also be adjusted according to the specific needs of the user, which is not specifically limited here.

[0029] Second, based on the total number of people flow, the regional weight of each walking path, and the time weight of each set time period, the flow distribution data of the walking path is generated. Specifically, when generating the flow distribution data of the walking path, the following steps may be included: First, the regional weight of the walking path is obtained, the product of the regional weight of the walking path and the total number of people flow is calculated, and the calculated product is used as the total number of the first AI characters passing through the walking path during the entire simulation time. Secondly, the total number of the calculated first AI characters is multiplied by the time weight of each set time period respectively, and the total number of the second AI characters passing through the walking path in each set time period can be obtained. Then, for each set time period, a random algorithm is used to randomly calculate the random number of each time interval in each set time period, and the random number of each time interval is used as the total number of the third AI characters passing through the walking path in each time interval, wherein the time interval can be set according to the needs of the user, or it can be a default value (for example, 1 second), which is not specifically limited here. The sum of the total number of the third AI characters corresponding to all time intervals in a set time period is equal to the total number of the second AI characters. Finally, the total number of the third AI characters corresponding to each time interval is arranged in chronological order, and the sorted data obtained is the flow distribution data of the walking path.

[0030] In a possible implementation, a corresponding regional population array is provided for each walking path, and the crowd score data corresponding to each walking path is stored through the regional population array corresponding to each walking path.

[0031] In one possible implementation, after generating the pedestrian flow distribution data of the walking path, a line graph of the cumulative number of people appearing on the walking path at each time interval (referred to as the line graph) and a bar distribution graph of the number of people appearing on the walking path at each time interval (referred to as the bar distribution graph) can be generated based on the pedestrian flow distribution data. In this way, after obtaining the pedestrian flow distribution data of the walking path, the line graph and the bar distribution graph can also be obtained at the same time, so that the user can intuitively understand the distribution of the pedestrian flow data.

[0032] After obtaining the crowd flow distribution data of the walking path, an AI character with set data can be generated in the starting area of ​​the walking path according to the crowd flow distribution data, and corresponding crowd flow simulation can be performed based on the generated AI character. Among them, the set data is determined according to the crowd flow distribution data. For example, in the crowd flow distribution data, the total number of third AI characters corresponding to each time interval is 1 person, 3 people, 5 people..., and the time interval is the default value of 1 second. In the starting area of ​​the walking path, 1 person is generated in the first second, 3 people are generated in the second second, 5 people are generated in the third second, and so on.

[0033] For each AI character generated at the starting point of the walking path, step S1300 will be executed to configure a controller and a locator for each AI character, and then step S1400 will be executed, and the controller of each AI character will control each AI character to move along the walking path according to the locator of each AI character. That is, for each newly generated AI character on the walking path, a dedicated controller and locator will be configured for it, so that the character can be controlled to move along the walking path through the dedicated controller and locator.

[0034] It should be noted here that the control process for each AI character is the same. Therefore, the following AI character is taken as an example to explain the specific control process of the AI ​​character in detail.

[0035] Specifically, when the dedicated controller of the AI ​​character controls the AI ​​character to move along the walking path according to the dedicated locator, the following steps may be included: First, obtain the position data of the locator on the walking path. It should be noted here that after the exclusive locator is configured for the AI ​​character, the locator will be bound to the walking path where the AI ​​character is located and the exclusive controller of the AI ​​character. When the controller of the AI ​​character controls the AI ​​character to move along the walking path, it first controls the locator of the AI ​​character to move along the bound walking path at a preset speed. The locator will calculate its position data on the walking path in real time during the process of moving along the walking path, and send the calculated position data to the controller of the AI ​​character, so that the controller of the AI ​​character can obtain the position data of the locator. Among them, the position data of the locator includes at least one of position coordinates and direction information.

[0036] After the controller of the AI ​​character obtains the position data of the locator, it will perform the second step to calculate the optimal route for the AI ​​character to reach the position of the locator based on the position data of the locator and the pre-built navigation mesh. The navigation mesh is a mesh pre-built in the 3D scene that represents the area where the character can walk.

[0037] After calculating the optimal route for the AI ​​character to reach the locator position, the third step can be executed to control the AI ​​character to move along the optimal route.

[0038] In this embodiment, the locator is first controlled to move along the walking path, and then each time the position data uploaded by the locator is obtained, the AI ​​character is controlled to reach the position of the locator along the calculated optimal route, thereby achieving the goal of leading the AI ​​character along the walking path by the locator. Since the locator moves along the walking path, when the movement of the AI ​​character is controlled with the locator as the target, it can be avoided that the AI ​​character deviates from the walking path during walking, thereby improving the accuracy of the pedestrian flow model.

[0039] In one possible implementation, while the AI ​​character is moving with the locator position as the target, it will also detect dynamic objects and other characters in the environment surrounding the AI ​​character in real time. When dynamic objects and other characters are detected, its travel speed and / or optimal route will be dynamically adjusted to avoid collisions with dynamic objects and other characters.

[0040] In a possible implementation, in order to improve the accuracy of crowd flow simulation, when controlling the AI ​​character to move along the walking path, the following steps may be further included: detecting whether there is an intelligent object within the preset range of the AI ​​character. If there is an intelligent object, the AI ​​character is controlled to interact with the intelligent object based on a pre-built behavior tree.

[0041] It should be noted here that in order to realize the interaction between the AI ​​character and the smart object, it is necessary to first configure the smart object in the 3D scene, wherein the smart object here is an object that can interact with the AI ​​character, such as a chair or a viewing point in the 3D scene. For each smart object in the 3D scene, configure the interaction information such as the ID, position, behavior tag and trigger condition of the behavior tag of each smart object respectively, so that the interaction with the smart object can be realized based on the interaction information of each smart object in the future. Among them, the behavior tag is used to characterize the behavior that the smart object can interact with the AI ​​character. For example, if the smart object is a chair, the AI ​​character can sit on the chair when the chair is not occupied, then the behavior tag of sitting down can be set for the smart object of the chair. For another example, if the smart object is a viewing point, the AI ​​character can take a photo at the viewing point when the viewing point is not occupied, then the behavior tag of taking a photo can be set for the smart object of the viewing point. The trigger condition of the behavior tag is the interaction condition that the AI ​​character needs to meet for executing the behavior of the behavior tag.

[0042] After completing the configuration of the smart object, you need to further set the behavior tree of the AI ​​character to define the interaction process between the AI ​​character and the smart object through the behavior tree. In one possible implementation, the pre-configured behavior tree can be as follows Figure 2 As shown, it includes a ROOT node, a Selector node under the ROOT node, a Sequence node and a first waiting node under the Selector node, and a Find Smart Object node under the Sequence node (i.e. Figure 2 BTTask_FindSmartObject node in), using smart object nodes (i.e. Figure 2 BTTask_UseSmartObject node in ) and the second waiting node.

[0043] Among them, the Selector node is used to determine whether there is an interactive smart object within the preset range of the AI ​​character: if there is an interactive smart object, execute the Sequence node; if there is no interactive smart object, execute the first waiting node. When the Selector node determines whether there is an interactive smart object within the preset range of the AI ​​character, it can include the following steps: determine whether the current state of the AI ​​character meets the trigger condition of the behavior tag of the target smart object, and if the trigger condition of the behavior tag of the target smart object is met, continue to determine whether the target smart object is occupied, and if it is not occupied, determine that the target smart object is an intelligent object that can interact with the AI ​​character, otherwise, determine whether there is no interactive smart object within the preset range of the AI ​​character.

[0044] When executing the first waiting node, the first set time will be waited. After the first set time is completed, the Selector node will be re-executed to determine whether there is an interactive smart object within the preset range of the AI ​​character. If there is still no interactive smart object, the first set time will be continued to wait, and the operation of interacting with the smart object will be terminated, and the AI ​​character will continue to move along the walking path. The first set time can be set according to the specific scenario. Preferably, the first set time can be set to 1 second.

[0045] When the Sequence node is executed, the Find Smart Object node, Use Smart Object node and Second Wait node under the Sequence node are executed in sequence.

[0046] When searching for smart object nodes, first extract the ID of the interactive smart object and the behavior tag that meets the trigger condition, and record the behavior tag that meets the trigger condition as the target behavior tag. Then, extract the montage animation corresponding to the target behavior tag from the database according to the ID of the interactive smart object and the target behavior tag. It should be noted here that the system is pre-configured with the mapping relationship between the ID, behavior tag and corresponding montage animation of each smart object, so that after extracting the ID and target behavior tag of the interactive smart object, the montage animation corresponding to the target behavior tag can be extracted by querying the preset mapping relationship table. Among them, the montage animation corresponding to the target behavior tag refers to the montage animation used to realize the target tag behavior. For each target behavior tag, a montage animation with multiple different expression states can be set. In this way, after finding multiple montage animations with the target behavior tag, one can be randomly extracted from the multiple montage animations as the final montage animation corresponding to the target behavior tag. In this way, the randomness and richness of the interactive actions of the AI ​​character and the smart object can be achieved, so that the interaction between the AI ​​character and the smart object is more in line with the actual interactive behavior.

[0047] When executing the second waiting node, the second set time will be waited. After the second set time is completed, the Selector node will be re-executed to determine whether there is an interactive smart object within the preset range of the AI ​​character. If it still does not exist, the operation of interacting with the smart object will be terminated after the first set time is continued, and the walking path will continue to move forward. If it exists, the Sequence node will continue to be executed to achieve interaction with the new smart object. Among them, the second set time can be set according to the specific scene. Preferably, the value range of the second set time can be 3 seconds to 7 seconds.

[0048] It should be noted that a priority can also be set for each smart object. In this way, when there are multiple interactive smart objects within a preset range, a smart object with the highest priority will be selected from the multiple interactive smart objects as the final interactive smart object.

[0049] By setting the interaction process between AI characters and smart objects through behavior trees, the setting of the interaction process is more flexible and scalable. When the interaction process needs to be modified, you only need to add or modify the corresponding nodes of the behavior tree without modifying the entire traffic simulation program.

[0050] After completing the configuration of each smart object and the configuration of the behavior tree, the interaction between the AI ​​character and the smart object can be realized based on the configuration of each smart object and the behavior tree. Specifically, during the movement of the AI ​​character, it will be detected in real time whether there is a smart object within the preset range of the AI ​​character. In the case of storage, the smart object that appears within the preset range of the AI ​​character will be recorded as the target smart object. When the target smart object is identified, the pre-configured behavior tree will be obtained, and the AI ​​character will be controlled to interact with the smart object based on the configuration information of the behavior tree and the target smart object. For details of the specific interaction, please refer to the introduction of each node in the behavior tree, which will not be repeated here. Among them, the preset range can be set according to the specific scenario. Preferably, the preset range can be set to 5m*5m.

[0051] In a possible implementation, in order to achieve the continuity of the movement of the AI ​​character and the interaction with the smart object, when the Selector node determines that the target smart object is not occupied, the available slot of the target smart object will be allocated to the AI ​​character. After the available slot of the target smart object is allocated to the AI ​​character, the controller of the AI ​​character will control the locator of the AI ​​character to stop moving. At the same time, after executing the second waiting node under the Selector node, the available slot of the target smart object allocated to the AI ​​character is released. When the available slot of the target smart object allocated to the AI ​​character is released, the controller of the AI ​​character will control the locator of the AI ​​character to continue moving, thereby achieving the continuity of the movement of the AI ​​character and the interaction with the smart object.

[0052] In one possible implementation, the UI status indicator of each AI character will be displayed in real time. Specifically, UMG is created to display the status information of the AI ​​character, such as sitting down to rest, taking pictures, and watching. By adding a UI status indicator to the AI ​​character, the status information of the AI ​​character is intuitively visible, which is particularly helpful for the simulation and analysis of high-density traffic in the venue. Furthermore, a control component is added to the blueprint of the AI ​​character, and its rendering space attribute is set to the screen space to ensure that the UI status indicator is fixedly displayed on the screen without being blocked by other objects in the scene, while maintaining the consistency of the size of the UI status indicator. Furthermore, the state attributes of the AI ​​character are dynamically bound to the Widget control to realize real-time update of the AI ​​character status, ensuring that the state changes of the AI ​​character can be reflected in the UI status indicator with minimal delay.

[0053] In one possible implementation, during the crowd flow simulation process, the configured total crowd flow, the area weights of each walking path, and the time weights of each set time period can also be modified through the interactive interface. After obtaining the modified data configured by the user, the crowd flow distribution data will be regenerated with reference to the above method, and the crowd flow simulation will be performed based on the new crowd flow distribution data.

[0054] In one possible implementation, during the crowd flow simulation process, the remaining simulation time set by the user can also be obtained through the interactive interface. After obtaining the remaining simulation time, the crowd flow distribution data corresponding to the remaining simulation time will be determined based on the remaining simulation time and the crowd flow distribution data, and the crowd flow simulation will be performed according to the crowd flow distribution data corresponding to the remaining simulation time, thereby improving the flexibility of the crowd flow simulation.

[0055] By referring to the above method, the flow of people on multiple walking paths in a 3D scene can be simulated simultaneously.

[0056] In order to clearly illustrate the human flow simulation method in the present disclosure, Figure 3The human flow simulation process disclosed in the present invention is described again. Figure 3 As shown, the pedestrian flow simulation method in this embodiment is completed by a system consisting of a server and a 3D real-time image rendering engine client (hereinafter referred to as the client). In this embodiment, Flask is built as a Web server to achieve the generation, update and visualization of pedestrian flow distribution data of multiple walking paths, and provide access functions through API.

[0057] In adopting Figure 3 When the system shown implements the human flow simulation of the 3D scene, the following steps may be included: S1, load the 3D scene that needs to simulate the flow of people on the client, and construct multiple walking paths in the 3D scene through a spline generation tool, and construct a navigation mesh in the 3D scene. In a specific embodiment, after constructing the 3D scene with multiple walking paths and navigation meshes, Figure 4 shown.

[0058] S2, the client sends a GET request to the server.

[0059] S3, the server responds to the GET request sent by the client, and generates the flow distribution data of each walking path according to the default configuration value. Specifically, first load the pre-configured total flow, the regional weight of each walking path, and the default value of the time weight of each set time period through the data and parameter initialization module, and configure the regional population array for each walking path. Then, the algorithm processing module generates the flow distribution data of each walking path according to the total flow, the regional weight of each walking path, and the default value of the time weight of each set time period, and stores the flow distribution data of each walking path in the corresponding regional population data. Finally, the flow distribution data of each walking path is returned to the client in the format of JOSN.

[0060] S4, the client receives the data returned by the server through the communication module, and parses the returned data to obtain the pedestrian flow distribution data of each walking path.

[0061] S5, the client generates a corresponding number of AI characters at the starting point of each walking path according to the crowd distribution data of each walking path, and controls each AI character to move along the corresponding walking path and interact with the smart objects that meet the interaction conditions according to the above scheme.

[0062] In the process of controlling the AI ​​character, the AI ​​character will always look for the corresponding locator through the "AI Move To" function in the initial state, and guide the AI ​​character to move along the corresponding walking path through the locator. If an intelligent object is sensed during the movement, the behavior tree will be called to control the AI ​​character to interact with the intelligent object. After the interaction, the AI ​​character will continue to move along the planned walking path. The method disclosed in the present invention can flexibly introduce intelligent objects into the scene and easily revise the interaction logic between the AI ​​character and the intelligent object by modifying the behavior tree without large-scale changes to the system. In this way, not only the intelligence and interactivity of the AI ​​character are improved, but also the flexibility and functional richness of the system are greatly increased, so that it can better simulate the crowd behavior and interaction in the real world.

[0063] S6, provided by the client Figure 5 The crowd trend adjustment interface shown sets the total number of people flow, total simulation time, and updated values ​​of the time weights of each set time period, and sends a POST request to the server through the interface. The POST request includes the total number of people flow, total simulation time, and updated values ​​of the time weights of each set time period set by the user.

[0064] S7, the server responds to the POST request, regenerates the pedestrian flow distribution data of each walking path according to the configured update value, and returns the updated pedestrian flow distribution data to the client.

[0065] S8, the client receives the updated pedestrian flow distribution data through the communication module, parses it, and re-simulates the pedestrian flow based on the parsed new flow distribution data.

[0066] It should be noted here that the specific implementation details of this embodiment can be found in the corresponding steps above and will not be repeated here.

[0067] The present disclosure provides a method for simulating human traffic flow, including: obtaining a pre-constructed walking path in a 3D scene; obtaining human traffic flow distribution data of the walking path, and generating a set number of AI characters at the starting point of the walking path according to the human traffic flow distribution data; configuring a controller and a locator for each AI character; and the controller of each AI character controls each AI character to move along the walking path according to the locator of each AI character. In the present disclosure, an independent locator is configured for each AI character, and the AI ​​character is guided along the walking path by the independent locator, thereby avoiding the loss of the AI ​​character and improving the accuracy of human traffic data simulation.

[0068] <Device Example> Figure 6 FIG. 1 is a schematic block diagram of a human flow simulation device according to an embodiment of the present disclosure. Figure 6As shown, the device 100 includes: A walking path acquisition module 110 is used to acquire a pre-built walking path in a 3D scene; The character generation module 120 is used to obtain the flow distribution data of people on the walking path, and generate a set number of AI characters at the starting point of the walking path according to the flow distribution data of people; Configuration module 130, used to configure controllers and locators for each AI character; The simulation module 140 is used for the controller of each AI character to control each AI character to move along the walking path according to the locator of each AI character.

[0069] In one possible implementation, the simulation module is specifically used to control the AI ​​character to move along the walking path: Get the position data of the locator on the walking path; Calculate the optimal route for the AI ​​character to reach the locator's location based on the position data and the pre-built navigation mesh; Control AI characters to move along the optimal route.

[0070] In one possible implementation, the simulation module, when controlling the AI ​​character to move along the walking path, is also used to: Detect whether there is a smart object within the preset range of the AI ​​character; Control AI characters to interact with smart objects based on pre-built behavior trees, where smart counterparts exist.

[0071] <Equipment Embodiment> Figure 7 FIG. 1 is a schematic block diagram of a human flow simulation device according to an embodiment of the present disclosure. Figure 7 As shown, the human flow simulation device 200 includes: a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned human flow simulation methods when executing the executable instructions.

[0072] Here, it should be noted that the number of processors 210 may be one or more. Meanwhile, in the human flow simulation device 200 of the embodiment of the present disclosure, an input device 230 and an output device 240 may also be included. The processor 210, the memory 220, the input device 230 and the output device 240 may be connected via a bus or in other ways, which are not specifically limited here.

[0073] The memory 220 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the human flow simulation method of the embodiment of the present disclosure. The processor 210 executes various functional applications and data processing of the human flow simulation device 200 by running the software programs or modules stored in the memory 220.

[0074] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include display devices such as display screens.

[0075] <Storage Medium Embodiment> According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is also provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, any of the above-mentioned pedestrian flow simulation methods is implemented.

[0076] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for simulating human flow, characterized in that: include: Get the pre-built walking path in the 3D scene; Obtaining crowd flow distribution data of the walking path, and generating a set number of AI characters at the starting point of the walking path according to the crowd flow distribution data; Allocate a controller and a locator for each of the AI ​​characters; The controller of each AI character controls each AI character to move along the walking path according to the locator of each AI character.

2. The method according to claim 1, characterized in that When constructing the walking path, it is implemented based on a spline generation tool in a 3D real-time engine.

3. The method according to claim 1, characterized in that When obtaining the pedestrian flow distribution data of the walking path, it includes: Obtain the total number of people participating in the simulation, the area weight of the walking path, and the time weight of each set time period; Based on the total number of pedestrian flows, the weights of each area, and the weights of each time period, pedestrian flow distribution data of each walking path is generated.

4. The method according to claim 1, characterized in that: The controller of the AI ​​character, when controlling the AI ​​character to move along the walking path according to the locator of the AI ​​character, includes: Acquire the position data of the locator on the walking path; Calculating an optimal route for the AI ​​character to reach the location of the locator based on the location data and a pre-built navigation grid; The AI ​​character is controlled to move along the optimal route.

5. The method according to claim 1, characterized in that When controlling the AI ​​character to move along the walking path, it also includes: Detecting whether there is an intelligent object within a preset range of the AI ​​character; In the case where there is an intelligent correspondence, the AI ​​character is controlled to interact with the intelligent object based on a pre-built behavior tree.

6. A human flow simulation device, characterized in that: include: A walking path acquisition module is used to obtain a pre-built walking path in a 3D scene; A character generation module, used to obtain the flow distribution data of the walking path, and generate a set number of AI characters at the starting point of the walking path according to the flow distribution data of the walking path; A configuration module, used to configure a controller and a locator for each of the AI ​​characters; The simulation module is used for the controller of each AI character to control each AI character to move along the walking path according to the locator of each AI character.

7. The device according to claim 6, characterized in that When controlling the AI ​​character to move along the walking path, the simulation module is specifically used to: Acquire the position data of the locator on the walking path; Calculating an optimal route for the AI ​​character to reach the location of the locator based on the location data and a pre-built navigation grid; The AI ​​character is controlled to move along the optimal route.

8. The device according to claim 6, characterized in that When controlling the AI ​​character to move along the walking path, the simulation module is further used to: Detecting whether there is an intelligent object within a preset range of the AI ​​character; In the case where there is an intelligent correspondence, the AI ​​character is controlled to interact with the intelligent object based on a pre-built behavior tree.

9. A human flow simulation device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 5 when executing the executable instructions.

10. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.