Behavior emergence simulation method for virtual crowd

By introducing anisotropic field and probability distribution mechanisms in virtual population simulation, the problems of convergence of virtual population behavior patterns and inefficient production efficiency are solved, and the diversity and efficient simulation of virtual population behavior are achieved.

CN120197340APending Publication Date: 2025-06-24BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510172510.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the prior art, virtual crowd simulation has problems such as convergence of group behavior patterns and inefficient production efficiency of complex behaviors.

Method used

By determining the anisotropic field of the navigable region, the anisotropic field contains multiple grids, each corresponding to a probability distribution. Based on the simulation clock cycle, the agent is randomly operated according to the probability distribution in the anisotropic field, obtain the motion trend, and update the agent's position.

Benefits of technology

The diversity and flexibility of virtual crowd behavior is realized, the productivity of complex behavior is improved, and real-time virtual crowd behavior simulation is achieved in large-scale agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197340A_ABST
    Figure CN120197340A_ABST
Patent Text Reader

Abstract

The invention provides a virtual crowd behavior emergence simulation method, and belongs to the technical field of data processing, the method comprises the following steps: determining an anisotropic field of a navigable area, the anisotropic field comprising a plurality of grids, and each grid corresponding to a probability distribution; on the basis of a simulation clock period, according to probability distribution in the anisotropic field, all agents in the navigable area are subjected to randomization, a motion trend is obtained, and the motion trend reflects the acceleration of the agents; and respectively updating the position of each agent based on the motion trend and the current instantaneous speed of each agent. According to the behavior emergence simulation method for the virtual crowd, crowd simulation is guided by introducing probabilistic behavior distribution, various behavior modes are introduced for the simulated crowd, the crowd simulation mode with flexible and diversified behaviors is achieved, the implementation mode is simple, calculation consumption is low, and the method is suitable for popularization and application. Real-time virtual crowd behavior simulation can be realized in a large-scale agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly to a method for simulating the emergent behavior of a virtual crowd. Background Art

[0002] Simulating a crowd through computer algorithms has a wide range of applications in fields such as social science, virtual reality, film special effects, and game entertainment. To achieve crowd simulation, a simulation scenario needs to be built, and a computer graphics engine is used to visualize the 2D or 3D simulation scenario. Before the simulation starts, a certain number of agents are placed in the simulation scenario to form a virtual crowd, and computer algorithms are written to drive the various behaviors of each agent in the virtual scenario, thereby realizing the simulation and deduction of the entire virtual crowd.

[0003] Currently, the simulation of crowd behavior patterns mainly drives the crowd to perform corresponding actions by artificially designing scenarios. Specifically, the simulation results are mainly achieved through a two-layer model of global path planning + local obstacle avoidance navigation. Among them, the global path planning aims at the static terrain and obstacles in the scenario, and realizes the coarse-grained global route planning through low-frequency global path search; the local obstacle avoidance navigation aims at the dynamic obstacles (such as other agents) around the agent, and realizes the fine-grained local motion planning through high-frequency local obstacle avoidance strategies. However, the crowd simulation in this traditional working mode has the following problems: the virtual crowd in the simulation can only execute single and simple behavior patterns, and to achieve complex behaviors, fine-grained manual grouping is required, which is a process with low production efficiency and unnatural results; the deterministic operation mechanism in the algorithm will also cause the behavior patterns of the group to converge seriously in similar environments, and it is difficult to present the complexity and emergence characteristics of real crowds.

[0004] Therefore, there is an urgent need for a virtual crowd simulation method to solve the problems of convergent group behavior patterns and low production efficiency of complex behaviors in the existing technology. Summary of the Invention

[0005] The present invention provides a method for simulating the emergent behavior of a virtual crowd to solve the defects of convergent group behavior patterns and low production efficiency of complex behaviors in the existing technology.

[0006] The present invention provides a method for simulating the emergent behavior of a virtual crowd, including the following steps: Determine the anisotropic field of the navigable area, where the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; Based on the simulation clock cycle, according to the probability distribution in the anisotropic field, randomly select all agents in the navigable area to obtain a motion trend, where the motion trend reflects the acceleration of the agent; Update the positions of the agents respectively based on the motion trends and the current instantaneous velocities of the agents.

[0007] According to a method for simulating the emergence of behaviors of a virtual crowd provided by the present invention, based on the simulation clock cycle, and according to the probability distribution in the anisotropic field, randomly generate for all the agents in the navigable area respectively to obtain motion trends, where the motion trends reflect the accelerations of the agents, including: In any simulation clock cycle, for each agent in the navigable area, randomly generate the acceleration of the agent respectively based on the probability distribution of the grid where the agent is located to obtain the motion tendency vector of the agent.

[0008] According to a method for simulating the emergence of behaviors of a virtual crowd provided by the present invention, the step of updating the positions of the agents respectively based on the motion trends and the current instantaneous velocities of the agents includes: For any agent, determine the instantaneous velocity of the agent based on the motion tendency vector of the agent; Update the position of the agent based on the instantaneous velocity and the simulation clock cycle.

[0009] According to a method for simulating the emergence of behaviors of a virtual crowd provided by the present invention, the step of randomly generating the acceleration of the agent based on the probability distribution of the grid where the agent is located to obtain the motion tendency vector of the agent includes: Update the probability distribution of the grid where the agent is located in the anisotropic field based on the current motion direction of the agent; Randomly generate the acceleration of the agent based on the updated probability distribution to obtain the motion tendency vector of the agent.

[0010] According to a method for simulating the emergence of behaviors of a virtual crowd provided by the present invention, update the probability distribution of the grid based on the following formula: ; Wherein, is the probability density of the anisotropic field at the current position of the agent in the direction , is the probability density after update, is the current motion direction of the agent is the scalar angle of, is a constant coefficient used to control the influence of the behavioral inertia of the agent, The larger, the stronger the influence.

[0011] According to a method for simulating the emergence of behaviors of a virtual crowd provided by the present invention, the step of determining the anisotropic field of the navigable area includes: Receive one or more curves input by a user; For any one curve, divide the curve into a plurality of sub - line segments; For any one sub - line segment, update the probability distribution within the influence range based on the influence of the sub - line segment within the influence range; After the influence of all curves is accumulated, obtain the anisotropic field of the navigable area.

[0012] The present invention also provides a virtual crowd behavior emergence simulation device, including the following modules: An editing module, configured to: determine the anisotropic field of the navigable area, the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; A simulation module, configured to: based on the simulation clock cycle, perform randomization on all agents in the navigable area according to the probability distribution in the anisotropic field, and obtain a motion trend, where the motion trend reflects the acceleration of the agent; An update module, configured to: update the positions of all agents respectively based on the motion trend and the current instantaneous velocity of each agent.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the virtual crowd behavior emergence simulation method as described in any one of the above is implemented.

[0014] The present invention also provides a non - transitory computer - readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the virtual crowd behavior emergence simulation method as described in any one of the above is implemented.

[0015] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the virtual crowd behavior emergence simulation method as described in any one of the above is implemented.

[0016] The virtual crowd behavior emergence simulation method provided by the present invention determines the anisotropic field of the navigable area, the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; based on the simulation clock cycle, perform randomization on all agents in the navigable area according to the probability distribution in the anisotropic field, and obtain a motion trend, where the motion trend reflects the acceleration of the agent; update the positions of all agents respectively based on the motion trend and the current instantaneous velocity of each agent. By introducing a probabilistic behavior distribution to guide crowd simulation, the present invention introduces diverse behavior patterns for the simulated crowd, realizes a crowd simulation mode with flexible and diverse behaviors, and has a simple implementation method and low computational consumption, and can achieve real - time virtual crowd behavior simulation among a large number of agents. Brief Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 is a schematic flowchart of the method for simulating the behavioral emergence of a virtual crowd provided by the present invention; Figure 2 is an exemplary schematic diagram of the anisotropic field provided by the present invention; Figure 3 is a schematic diagram of behavioral inertia provided by the present invention; Figure 4 is a schematic structural diagram of the device for simulating the behavioral emergence of a virtual crowd provided by the present invention; Figure 5 is a schematic structural diagram of the electronic device provided by the present invention. Detailed Description of the Embodiments

[0019] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention fall within the scope of protection of the present invention.

[0020] It should be noted that in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or elements inherent to such a process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element. The orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation of the present invention. Unless otherwise clearly specified and defined, the terms "mounted", "connected", "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, and can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0021] The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" means at least one of the connected objects, and the character " / ", generally means that the associated objects before and after are in an "or" relationship.

[0022] The following combines Figures 1 - 5 to describe the behavior emergence simulation method of the virtual crowd provided by the embodiments of the present invention.

[0023] Figure 1 is a schematic flowchart of the behavior emergence simulation method of the virtual crowd provided by the present invention. As Figure 1 shown, the method includes the following: S110, determining the anisotropic field of the navigable area, the anisotropic field includes a plurality of grids, and each of the grids corresponds to a probability distribution; S120, based on the simulation clock cycle, randomly selecting all the agents in the navigable area according to the probability distribution in the anisotropic field to obtain a motion trend, and the motion trend reflects the acceleration of the agent; S130. Update the positions of the agents respectively based on the motion trend and the current instantaneous velocities of the agents.

[0024] It should be noted that the execution subject of the virtual crowd behavior emergence simulation method provided in the embodiments of the present application can be a server or a computer device, such as a mobile phone, a tablet computer, a notebook computer, a handheld computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc.

[0025] In the embodiments of the present invention, the navigable area is the area where the virtual crowd can pass in the simulation scenario. The anisotropic field is bound to the navigable area in the simulation scenario and covers any reachable area in the simulation scenario.

[0026] In the embodiments of the present invention, the area in the simulation scenario is divided by means of grids, so as to simplify the calculation. Specifically, for the navigable area Ω, it is divided into n grids, that is , where is the th grid, and n is the total number of grids. A probability distribution is set in any grid of the anisotropic field.

[0027] In the specific implementation process, the probability distribution of each grid can be set in advance, or the probability distributions of the grids can be set in batches. The specific initialization method of the anisotropic field is not limited here.

[0028] Figure 2 is an exemplary schematic diagram of the anisotropic field provided by the present invention. As Figure 2 shown, Figure 2 (a) The navigable area is divided into 4×4 grids, and each grid corresponds to a probability distribution. Among them, Figure 2 the probability distribution of the upper left grid in (a) obeys a uniform distribution.

[0029] Optionally, by default, the probability distribution of the grid obeys a uniform distribution, that is to say, the probability distribution of the grid initialization obeys a uniform distribution.

[0030] In the embodiments of the present invention, the anisotropic field describes the potential motion tendency of the agent in the grid where it is distributed, and its distribution domain is , corresponding to the motion trend direction of the agent in the two-dimensional scenario.

[0031] As Figure 2 shown, Figure 2The probability distribution of the fourth grid in the first row of (a) is as follows Figure 2 as shown in (b), Figure 2 where (b) shows the manifestation of the probability distribution of this grid in two different description methods, where I, II, III, and IV respectively represent four directions. Figure 2 The peak value in the I-II region of the lower figure in (b) corresponds to Figure 2 the vertex in the I-II region of the upper figure in (b), Figure 2 The peak value in the II-III region of the lower figure in (b) corresponds to Figure 2 the vertex in the II-III region of the upper figure in (b), and these two points are the points with the highest probability. Figure 2 where (c) shows the proportional relationship of the probability accumulation in each region within this grid.

[0032] It can be understood that although Figure 2 the grids in the anisotropic field shown are squares of a fixed size, in the specific implementation process, the shape and size of the grids can be determined according to actual usage requirements, and the shape of the navigable area is not restricted either, and it is usually an irregular polygon.

[0033] The method for simulating the behavioral emergence of a virtual crowd provided by the embodiment of the present invention determines the anisotropic field of the navigable area, where the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; based on the simulation clock cycle, according to the probability distribution in the anisotropic field, randomization is respectively performed on all agents in the navigable area to obtain a motion trend, and the motion trend reflects the acceleration of the agent; based on the motion trend and the current instantaneous velocity of each agent, the positions of each agent are respectively updated. The present invention guides the crowd simulation by introducing a probabilistic behavior distribution, introduces diverse behavior patterns for the simulated crowd, realizes a crowd simulation mode with flexible and diverse behaviors, and the implementation method is simple and the calculation consumption is low, and it can realize real-time virtual crowd behavior simulation among a large number of agents.

[0034] In an optional embodiment, the step of performing randomization on all agents in the navigable area respectively according to the probability distribution in the anisotropic field based on the simulation clock cycle to obtain a motion trend, where the motion trend reflects the acceleration of the agent, includes: In any simulation clock cycle, for each agent in the navigable area, the acceleration of the agent is randomized respectively based on the probability distribution of the grid where the agent is located to obtain the motion tendency vector of the agent.

[0035] In the embodiment of the present invention, in any simulation clock cycle of the anisotropic crowd system, all agents in the simulation scenario will be based on the grid where they are located Perform a random selection on the probability distribution corresponding to the anisotropic field. The result of the random selection is the motion tendency vector of the agent within the simulation clock cycle, and the motion tendency vector characterizes the motion tendency of the agent within the simulation clock cycle.

[0036] For example, for Figure 2 all the agents located in the first grid of the first row in (a), perform a random selection respectively based on the uniform probability distribution within the current simulation clock cycle. The result of the random selection is the motion tendency vector of each agent within the current simulation clock cycle; for Figure 2 all the agents located in the fourth grid of the first row in (a), perform a random selection respectively based on the probability distribution of the grid within the current simulation clock cycle to obtain the motion tendency vector of each agent within the grid within the current simulation clock cycle.

[0037] In the behavior emergence simulation method of the virtual crowd provided by the embodiments of the present invention, for each agent in each grid, perform a random selection respectively based on the probability distribution of the grid where it is located to obtain its motion tendency vector within the current simulation clock cycle, so as to guide the update of the subsequent position of the agent.

[0038] In an alternative embodiment, updating the positions of the agents respectively based on the motion trend and the current instantaneous velocity of each agent includes: For any agent, determine the instantaneous velocity of the agent based on the motion tendency vector of the agent; Update the position of the agent based on the instantaneous velocity and the simulation clock cycle.

[0039] In the embodiments of the present invention, for any agent, determine the instantaneous velocity of the agent according to the motion tendency vector characterizing the influence of the anisotropic field on it, and then update the position coordinates of the agent according to the instantaneous velocity.

[0040] Optionally, the motion influence of the anisotropic field on the agent can act together with other models based on the classical Euler integration model: ; ; where is the position coordinate of the agent in the simulation scenario, is the instantaneous velocity of the agent, is the simulation clock cycle, is the motion tendency vector of the agent generated based on the anisotropic field, is the vector of the influence of other factors on the agent, and are both proportionality coefficients.

[0041] Here, other factors may include, but are not limited to, the movement direction of the agent itself, the influence of obstacles on the agent, etc.

[0042] The method for simulating the emergence of behaviors of a virtual crowd provided by the embodiments of the present invention determines the instantaneous velocity of an agent according to the movement tendency vector, and then updates the position of the agent, so as to realize the real-time update of the agent position according to the influence of the anisotropic field.

[0043] It can be understood that when the anisotropic field acts on an agent, due to introducing randomness through probability to generate results, the generated movement tendency vectors are extremely rich in possibilities. However, at the same time, since the simulation system needs to update the movement state of the agent in each simulation clock cycle to achieve deduction, frequent fluctuations in crowd behaviors may occur.

[0044] To solve the above problems, behavioral inertia is added on the basis of the anisotropic field to correct this problem and make the behaviors of the agents tend to converge.

[0045] In an optional embodiment, randomly generating the acceleration of the agent based on the probability distribution of the grid where the agent is located to obtain the movement tendency vector of the agent includes: Updating the probability distribution of the grid where the agent is located in the anisotropic field based on the current movement direction of the agent; Randomly generating the acceleration of the agent based on the updated probability distribution to obtain the movement tendency vector of the agent.

[0046] Figure 3 is a schematic diagram of the behavioral inertia provided by the present invention. As Figure 3 shown, in the embodiments of the present invention, when an agent calculates its movement tendency vector based on the anisotropic field, it will temporarily adjust the original probability distribution of the grid where it is located based on its current movement direction, and generate a movement tendency vector based on the adjusted probability distribution.

[0047] It should be noted that the adjustment of the probability distribution in the grid is temporary and does not affect the probability distribution of the grid in the anisotropic field. That is to say, for any agent, after obtaining the probability distribution of the grid where it is located, it temporarily adjusts the obtained probability distribution according to its current movement direction. The adjusted probability distribution is only used for generating the movement tendency vector of the agent in the current simulation clock cycle. The probability distributions obtained by other agents in the same grid are still the original probability distributions of the grid. Different agents in the same grid will respectively temporarily adjust the obtained probability distribution of the grid according to their current movement directions. The adjusted probability distributions of agents with the same movement direction are the same, and the adjusted probability distributions of agents with different movement directions are different. Each agent generates a movement tendency vector based on its respective adjusted probability distribution.

[0048] In the method for simulating the emergent behavior of a virtual crowd provided by an embodiment of the present invention, when calculating the motion tendency vector of an agent based on an anisotropic field, the original probability distribution of the grid is temporarily adjusted based on the current motion direction of the agent, so that the behavior of the agent tends to converge and the frequent fluctuations of the behavior of the simulated crowd are avoided.

[0049] In an alternative embodiment, the probability distribution of the grid is updated based on the following formula: ; wherein, is the probability density of the anisotropic field at the current position of the agent in the direction , is the probability density after update, is the current motion direction of the agent scalar angle of, is a constant coefficient used to control the influence of the behavioral inertia of the agent, The larger it is, the stronger the influence.

[0050] In the method for simulating the emergent behavior of a virtual crowd provided by an embodiment of the present invention, the probability density is adjusted according to the current motion direction of the agent, so that the behavior of the agent tends to converge, and the influence of the behavioral inertia of the agent on the probability distribution is controlled by a constant coefficient, so as to realize adjusting the influence of the motion behavior of the agent on the motion tendency according to actual usage requirements.

[0051] In an alternative embodiment, determining the anisotropic field of the navigable area includes: Receiving one or more curves input by a user; For any one curve, dividing the curve into a plurality of sub-segments; For any one sub-segment, updating the probability distribution within the influence range based on the influence of the sub-segment within the influence range; After the influence of all curves is accumulated, the anisotropic field of the navigable area is obtained.

[0052] In an embodiment of the present invention, the creation of the anisotropic field can be realized by the user using a virtual paintbrush. For any curve c drawn by the user, it includes its corresponding influence weight , influence range . In one drawing, the user will create a series of curves to identify the probability distribution of each position of the target anisotropic field expected by the user. For any curve , it can be further divided into a plurality of sub-segments . Since each sub-segment is extremely short in distance, it can be approximately regarded as a vector differential located at the starting point of the segment during calculation For any the influence factor at any position p in the anisotropic field within its influence range can be calculated (influence): ; Among them, is the influence weight of the curve c where it is located, is the Euclidean distance between and is a constant, determining the influence ratio of on

[0053] Optionally, the value range of

[0054] is (1, 2).

[0055] In the specific implementation process, the curve drawn by the user is used as the heuristic quantity for generating the anisotropic field; the sub-segment components of each curve are extracted; for each component, the influence factor on the anisotropic field at each position within its influence range is calculated respectively and accumulated into the probability distribution at that position; after the influence of all curves on all positions is accumulated, the distribution at each position is normalized to obtain the anisotropic field of the navigable area.

[0055] The virtual crowd behavior emergence simulation method provided by the embodiments of the present invention generates an anisotropic field based on the curve drawn by the user, improving the flexibility and convenience of generating the anisotropic field.

[0056] Next, the virtual crowd behavior emergence simulation device provided by the embodiments of the present application will be described. The virtual crowd behavior emergence simulation device described below can be correspondingly referred to the virtual crowd behavior emergence simulation method described above.

[0057] Figure 4 is the structural schematic diagram of the virtual crowd behavior emergence simulation device provided by the present invention. As Figure 4 shown, the virtual crowd behavior emergence simulation device may include but is not limited to; Determination module 410, configured to: determine the anisotropic field of the navigable area, where the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; Simulation module 420, configured to: based on the simulation clock cycle, perform randomization on all agents in the navigable area according to the probability distribution in the anisotropic field to obtain a motion trend, where the motion trend reflects the acceleration of the agent; Update module 430, configured to: update the positions of all agents respectively based on the motion trend and the current instantaneous velocity of each agent.

[0058] It should be noted that the virtual crowd behavior emergence simulation device provided in the embodiments of the present invention can execute the virtual crowd behavior emergence simulation method described in any of the above embodiments during specific operation, and this embodiment will not be elaborated herein.

[0059] Figure 5 An example of the physical structure diagram of an electronic device is shown as Figure 5 shown. The electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the virtual crowd behavior emergence simulation method, and the method includes: determining the anisotropic field of the navigable area, the anisotropic field includes a plurality of grids, and each of the grids corresponds to a probability distribution; Based on the simulation clock cycle, according to the probability distribution in the anisotropic field, randomization is performed on all agents in the navigable area respectively to obtain a motion trend, and the motion trend reflects the acceleration of the agent; Based on the motion trend and the current instantaneous velocity of each agent, the positions of each agent are updated respectively.

[0060] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0061] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the virtual crowd behavior emergence simulation method provided by the above-mentioned various methods. The method includes: determining the anisotropic field of the navigable area, where the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; Based on the simulation clock cycle, according to the probability distribution in the anisotropic field, randomize all agents in the navigable area respectively to obtain a motion trend, where the motion trend reflects the acceleration of the agent; Based on the motion trend and the current instantaneous velocity of each agent, update the positions of each agent respectively.

[0062] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the virtual crowd behavior emergence simulation method provided by the above-mentioned various methods. The method includes: determining the anisotropic field of the navigable area, where the anisotropic field includes a plurality of grids, and each grid corresponds to a probability distribution; Based on the simulation clock cycle, according to the probability distribution in the anisotropic field, randomize all agents in the navigable area respectively to obtain a motion trend, where the motion trend reflects the acceleration of the agent; Based on the motion trend and the current instantaneous velocity of each agent, update the positions of each agent respectively.

[0063] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.

[0064] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A behavior emergence simulation method for a virtual crowd, characterized in that: include: Determining an anisotropic field of the navigable area, the anisotropic field comprising a plurality of grids, each of the grids corresponding to a probability distribution; Based on a simulation clock cycle, all agents in the navigable area are randomly selected according to the probability distribution in the anisotropic field to obtain a motion trend, where the motion trend reflects the acceleration of the agent; Based on the movement trend and the current instantaneous speed of each agent, the position of each agent is updated respectively.

2. The behavior emergence simulation method of virtual crowd according to claim 1, characterized in that: The method of performing random operations on all agents in the navigable area based on the simulation clock cycle and the probability distribution in the anisotropic field to obtain a motion trend includes: In any simulation clock cycle, for each agent in the navigable area, the acceleration of the agent is randomized based on the probability distribution of the grid where the agent is located to obtain the motion tendency vector of the agent.

3. The behavior emergence simulation method of virtual crowd according to claim 2, characterized in that: The updating of the position of each agent based on the movement trend and the current instantaneous speed of each agent comprises: For any agent, determining the instantaneous speed of the agent based on the motion tendency vector of the agent; The position of the agent is updated based on the instantaneous velocity and the simulation clock period.

4. The behavior emergence simulation method of virtual crowd according to claim 2, characterized in that: The step of randomly performing an acceleration operation on the agent based on the probability distribution of the grid where the agent is located to obtain a motion tendency vector of the agent includes: Based on the current movement direction of the agent, updating the probability distribution of the grid where the agent is located in the anisotropic field; Based on the updated probability distribution, the acceleration of the agent is randomized to obtain the motion tendency vector of the agent.

5. The method for simulating the emergence of virtual crowd behavior according to claim 4, characterized in that: Update the probability distribution of the grid based on the following formula: ; in, is the anisotropy field of the agent's current position in the direction The probability density of is the probability density after the update, The current direction of movement of the agent The scalar angle of is a constant coefficient used to control the influence of the agent's behavioral inertia, The bigger it is, the stronger the impact.

6. The behavior emergence simulation method of virtual crowd according to claim 1, characterized in that: The determining of the anisotropic field of the navigable area comprises: receiving one or more curves input by a user; For any curve, dividing the curve into a plurality of sub-segments; For any sub-segment, based on the influence of the sub-segment on the affected area, update the probability distribution within the affected area; After the influences of all curves are accumulated, the anisotropic field of the navigable area is obtained.

7. A virtual crowd behavior emergence simulation device, characterized in that: include: An editing module, used to: determine an anisotropic field of a navigable area, wherein the anisotropic field comprises a plurality of grids, each of the grids corresponds to a probability distribution; A simulation module, used to: based on a simulation clock cycle and according to the probability distribution in the anisotropic field, perform randomization on all agents in the navigable area to obtain a motion trend, wherein the motion trend reflects the acceleration of the agent; The updating module is used to update the position of each agent based on the movement trend and the current instantaneous speed of each agent.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the behavior emergence simulation method of the virtual crowd as claimed in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the behavior emergence simulation method of a virtual crowd as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the behavior emergence simulation method of a virtual crowd as claimed in any one of claims 1 to 6 is implemented.