Large-scale biological cluster simulation method in live-action three-dimensional model based on oblique photography
Through real-life three-dimensional model based on tilt photography and gridless fluid simulation, combined with Marching Cube algorithm and variable angle path search algorithm, large-scale cluster biosimulation is realized, solving the problem that the crowd evacuation model in the existing technology is difficult to achieve real-time three-dimensional simulation, and improving emergency response efficiency and model reliability.
Patent Information
- Application Number
- CN202510605134.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-05-12
AI Technical Summary
The existing technology is difficult to implement real-time three-dimensional simulation population evacuation models, especially in natural disasters such as floods, and there is a lack of reliable and practical simulation methods to improve emergency response efficiency and reduce potential risks.
The real-life three-dimensional model based on tilt photography is adopted, and the fluid simulation is performed through the gridless method, the movable model and population are regarded as fluids, the fluid volume is discrete as particles carrying physical properties, and the fluid surface is reconstructed by combining the Marching Cube algorithm, and the travel path is generated by a variable angle path search algorithm to realize large-scale cluster biosimulation.
It realizes efficient data acquisition and real-life three-dimensional model construction, reduces computing overhead, provides a more reliable and practical crowd evacuation simulation model, improves emergency response efficiency and reduces potential risks.
Smart Images

Figure CN120145936A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer simulation processing, and in particular to a large-scale biological cluster simulation method in a real-scene three-dimensional model based on oblique photography. Background Art
[0002] Although humans are not completely dependent on group life like insects or bacteria, large gatherings often occur and can lead to crowding and trampling if not managed effectively. Therefore, by learning from species that are good at group behavior, people can learn lessons from their collective wisdom. By studying the behavioral patterns of these species, it can help humans better understand and manage crowd behavior and avoid similar tragedies from happening again.
[0003] Related studies have also shown that crowd evacuation models in fluids can effectively analyze the risks in flood emergency situations. At present, hydrodynamic models are used to simulate crowd evacuation in static scenarios, but these models are mainly used for statistical calculations and do not perform real-time three-dimensional simulations. In order to better respond to natural disasters such as floods, it is necessary to promote further research and develop more reliable and practical crowd evacuation simulation models to improve emergency response efficiency and reduce potential risks. Summary of the invention
[0004] In view of the above situation, the main purpose of the present invention is to propose a large-scale biological cluster simulation method in a real-life three-dimensional model based on oblique photography to solve the above technical problems.
[0005] The present invention proposes a method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography, the method comprising the following steps: Step 1: Use oblique photography data to construct a real 3D scene, separate the ground objects from the real 3D scene, obtain a ground model and an object model, and divide the object model into a movable model and a stationary model; Step 2: Given a fluid and a group on the ground model, the group includes a number of individuals, and the individuals are modeled as physical entities with mass; Step 3: Use the meshless method to perform fluid simulation, treat the movable model and the group as fluid, and discretize the fluid volume into particles with physical properties; Step 4: Consider the fluid as an interacting particle system, and perform continuous dynamics calculations to give the fluid different motion flexibility according to the change of particle density during fluid motion to achieve fluid simulation, obtain fluid force field information, and reconstruct the fluid surface using the Marching Cube algorithm; Step 5: assign different motion postures to the immobile model and the individual according to the particle force field information corresponding to the immobile model in the fluid force field information and the group; Step 6: Preprocess the ground model, then perform convex polygon partitioning to obtain a navigation mesh; Based on the current position and target position of an individual in the ground model, generate a global path for several individuals according to the navigation mesh and scene constraints, and use a variable turning angle path finding algorithm to generate a travel path for each individual in the global path; Step 7: Select different local driving strategies according to the state of the current group and the interaction between the physical entities of the individuals in the fluid force field information and other particles to perform real-time dynamic microscopic correction on the travel direction of the individuals on the travel path, so as to realize large-scale swarm biological simulation.
[0006] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. In terms of data acquisition and real-scene three-dimensional model construction, the method of drone oblique photography is adopted to obtain data such as the elevation, texture, and grid of ground features, and a lightweight three-dimensional reconstruction method is adopted to reduce the computational overhead.
[0007] 2. In terms of global path planning, referring to two classic algorithms in the academic field, a minimum turning angle path planning algorithm (convex polygon path finding problem) is proposed, and a variable turning angle path planning algorithm is derived.
[0008] 3. In terms of the ground feature separation method, a van projection separation method is proposed, and plane separation and curved surface separation algorithms are realized.
[0009] 4. In terms of the solid model solution, an algorithm for replacing solid objects with particles is proposed.
[0010] 5. In terms of large-scale biological swarm (crowd) simulation, combined with observations in real life, swarm behavior driving algorithms such as the centroid following method, group center method, neighborhood extreme value method, and space squeezing method are proposed.
[0011] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flowchart of a large-scale biological swarm simulation method based on oblique photography real-scene three-dimensional model proposed by the present invention; Figure 2 is the three-dimensional space partitioning and storage structure; Figure 3 is the individual motion posture state diagram of the finite state machine; Figure 4 is the individual motion posture sequence; Figure 5 is the improved schematic diagram of the variable turning angle method; Figure 6 This is the overall structure diagram of the present invention; Figure 7 This is the calculation process of the solution framework of the present invention. Specific embodiments
[0013] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0014] Referring to the following description and drawings, these and other aspects of the embodiments of the present invention will be clear. In these descriptions and drawings, some specific embodiments of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0015] Please refer to Figure 1 , this embodiment provides a large-scale biological cluster simulation method in a real-scene three-dimensional model based on oblique photography. The method includes the following steps: Step 1: Use oblique photography data to construct a real-scene three-dimensional scene, separate ground objects from the real-scene three-dimensional scene to obtain a ground model and an object model, and divide the object model into movable models and immovable models; In this embodiment, taking a certain area as an example for oblique photography data collection, the aircraft model used for field operations is Huace (CTI) P330Pro, the ground resolution is 2 cm, the ground control point interval is 1 km, the flight altitude is 178 m, the flight line spacing is 48 m, and the sampling interval is 21 m. The processing software used for indoor operations is Smart3D 2022.
[0016] (1) Field layout Field operations mainly include stages such as aerial photography task planning, flight line setting, ground control point layout, and execution of aerial photography tasks. First, plan the area for UAV aerial photography, reasonably set the flight line, and set the height and speed of the aircraft. To ensure the data accuracy in the indoor three-dimensional reconstruction process, the lateral overlap rate and the forward overlap rate of the aircraft images need to be greater than 65% (generally between 60% and 80%).
[0017] (2) Indoor data processing After completing the field aerial photography operation, what is collected is a target aerial photography image with one vertical and four oblique perspectives, plus POS (Position and Orientation System Data) data, refined data, camera parameter files, etc.
[0018] The specific steps for data collection are as follows: ① Preparation of refined data, elevation data, and POS data The refined data is mainly used to correct the error between the elevation of the aircraft and the geodetic height, and the relevant data is generated by a third-party software.
[0019] ② Preparation of image data This process is to prepare the data of five cameras for aerial triangulation calculation.
[0020] ③ Import of camera parameters This step is to import the parameters of the cameras at each position according to the flight situation.
[0021] ④ Preparation of refined POS parameters It is necessary to accurately match the corresponding POS parameters for each flight.
[0022] ⑤ Creation of an aerial triangulation task The aerial triangulation task, that is, aerial triangulation, is the basis for high-precision 3D modeling. The main work of the aerial triangulation task is: by adjusting the position and attitude (external parameters) of the camera during imaging and the internal parameters of the camera, during the process of extracting image feature points, minimizing the error in the three-dimensional space.
[0023] ⑥ Addition of control points Carry out control point adjustment through the control point data.
[0024] After completing the above steps, the modeling work can be officially started, and the required models can be produced according to needs.
[0025] After the original data is collected, in this embodiment, Smart 3D software is used to produce a 3D scene. The specific steps are as follows: The original experimental data is a tile data block with a size of 50m * 50m. After selecting the target area, the number of data point clouds exceeds one million, and the number of vertices is nearly ten million. The experiment needs to perform preliminary processing on it.
[0026] First, crop, stitch, reduce, and denoise the tile data. The original experimental data is in TIN (Triangulated Irregular Network) format, which is an irregular triangular mesh. During the process of mesh reduction, three methods are adopted in the experiment: one is finite element mesh division, the second is triangular surface downsampling, and the third is mesh resampling.
[0027] The finite element mesh generation method is to regenerate the mesh by using the finite element mesh generation method on the basis of the original mesh vertices. The triangular face downsampling method is to remove the threshold faces on the basis of the original mesh faces, thereby reducing the total number of triangular faces. Mesh resampling is to re-determine the sampling points based on the original mesh data and then regenerate the mesh. The purpose of this process is to retain the necessary details while removing redundant data, better adapt to the geometric characteristics of the surface, make the mesh more stable and uniform geometrically, thereby improving the overall quality of the mesh, reducing errors and unstable factors in the calculation process, and thus enhancing the overall calculation performance. High-quality meshes are crucial for improving calculation accuracy and stability.
[0028] It can be seen that after the preprocessing, the data volume in the scene has decreased by about 10 times (see Table 1 and Table 2).
[0029] Table 1 Comparison of mesh reduction algorithms (0.5m segmentation scale)
[0030] Table 2 Comparison of scene mesh data (taking the triangular face downsampling method as an example)
[0031] After the experiment completes the scene import, data cleaning and optimization, what is obtained is a high-quality overall mesh. However, having only the mesh is far from enough. The mesh can serve as the basis for the terrain, but it cannot achieve the dynamic calculation of the above-ground buildings. To simulate the earthquake effect, it is necessary to extract the buildings in the mesh and separate the ground objects. Regarding the separation of ground objects, the experiment proposes three separation methods: one is the plane segmentation method, the second is the surface segmentation method, and the third is the van segmentation method.
[0032] ① Plane separation method and surface separation method The plane separation method is to use the specified plane as the cutting plane and divide the mesh into several sub-meshes through Boolean operations. For the surface segmentation method, the cutting plane is transformed into a surface.
[0033] ② Van projection separation method This method is to construct a cutting van and perform Boolean operations on the original mesh and the cutting van to achieve the purpose of separation. In current research, there are many methods for ground object classification, including those based on supervised learning, unsupervised learning, remote sensing images, radar images, etc. All kinds of methods will finally obtain a segmented ground object classification data. On the basis of the ground object classification data, through the projection method, the cutting van can be accurately constructed to achieve the purpose of separating the specified ground object. The specific steps are as follows: Use the ground object classification method to classify the ground objects in the real scene three-dimensional scene to obtain the ground object classification data; Based on the ground object classification data, a clipping box corresponding to different objects is constructed by projection; Boolean operations are performed on the 3D grid ground objects and the clipping box in the real scene 3D scene, so as to achieve the purpose of separating the target, and a ground model and an object model are obtained.
[0034] After the scene model is completed with reduction, cleaning, separation, noise reduction and separation, the data volume of the model is still very large, with hundreds of thousands of points and faces. If directly used for calculation, the time cost will be unacceptable. In order to meet the calculation requirements, the experiment needs to construct a low-precision model based on the current data for simulation calculation.
[0035] Step 2: Given fluids and groups on the ground model, the group contains several individuals, and the individuals are modeled as physical entities with mass; As Figure 2 shown, Figure 2 a in Figure 2 is a schematic diagram of the spatial cube division, b in Figure 2 is the rough structure of the spatial cube. In the form of an adjacency list, Pk in the figure represents the kth human particle, Wl represents the lth water flow particle, V0 to V6 represent the storage nodes of spatial cubes 0 to 6, and ∧ represents the end of the linked list. In this embodiment, is used to represent any cube in space ( a in ), and where, represents the cube set, represents the intersecting plane of the cube, represents the plane set, represents the intersection line of the plane, represents the spatial cube c ), represents the volume division limit of the cube, represents the volume of a single cube or the area of a plane, represents the area division limit of the plane, represents the plane f ), represents the plane d cost.
[0036] All the information of the biological groups and fluid particles is stored in the corresponding cells according to their positions. In each three-dimensional cell, the positions of the biological groups and fluid particles are stored in the adjacent table according to their adjacent relationships ( Figure 2 b in
[0037] When constructing an indoor scene, indoor small objects such as tables and chairs are numerous and homogeneous. In the experiment, these homogeneous solids are processed in the way of solid-state fluid (that is, by discretizing the fluid volume into sampling particles carrying physical properties, and keeping specific properties unchanged during the calculation process, such as the velocity property), and they are also regarded as particles and crowd particle flows for joint calculation to achieve the effect of the fusion of biological fluid (that is, by discretizing the fluid volume into sampling particles carrying physical properties, and according to the calculation results, replacing the biological posture based on the properties of individual particles) and solid-state fluid. The same calculation of the fusion of multiple types of particle flows is also used among crowds, vehicles and sand and gravel. Through this work, various types of fluids and multiple individuals are fundamentally fused, so that each individual can still maintain specific autonomy while being affected by multiple types of groups, and can more accurately simulate the crowd behavior in various complex scenarios.
[0038] After completing the calculation of the fluid force field at the macroscopic level, it is also necessary to control the motion postures of individuals. In this embodiment, each individual (such as a person, a fish, and a truck) is driven by the fluid force field and also by the rigid body force (the convention of a rigid body: when an object is subjected to a force, during the motion process, the appearance characteristics of the object do not change, and its internal structure remains relatively unchanged).
[0039] At the macroscopic level, a fluid dynamics force field is used to drive individuals, and the individuals switch their motion postures according to a finite state machine (as shown in Figure 3 ), and control the action sequence according to factors such as the position and speed where they are located (as shown in Figure 4 ), and the skinning animation method is adopted. The so-called skinning animation is to drive the deformation of the mesh on the skin surface by defining bones. The bones are responsible for the actual motion solution, and the skin is responsible for deforming according to the corresponding bones.
[0040] At the microscopic level, local collision detection needs to be used to determine the force conditions of individuals and perform dynamic calculations. To implement collision detection, it is necessary to define the collision parts of individuals and the internal motion angle constraints, etc. for the collision calculation of individuals with dynamic rigid bodies during local motion.
[0041] Step 3: Use the meshless method for fluid simulation, regard the movable model and the group as fluids, and discretize the fluid volume into particles carrying physical properties; Fluid phenomena widely exist in nature, and the simulation of fluids has always been an important research content in computer animation and graphics. At present, the fluid simulation based on physical laws is mainly divided into two categories according to different ways of spatial discretization: the mesh method and the meshless method. This embodiment adopts the meshless method: Meshless method: The fluid volume is discretized into sampling particles, each particle having corresponding physical properties, and the particles move in space under the action of the governing equations. The meshless method has characteristics such as no boundary region and mass conservation, and is more convenient for simulating more complex physical phenomena (such as fluids, water droplets, breaking waves, and solid-liquid mixtures, etc.). Among them, the Smoothed Particle Hydrodynamics (SPH) method has become a widely concerned method due to its simple and efficient calculation and realistic simulation effect. This embodiment also adopts this method.
[0042] SPH (Smoothed Particle Hydrodynamics) method: The main idea is to represent the continuous fluid field through a series of discretized particles. Each particle has physical properties such as density, pressure, and velocity, and these physical quantities are expressed by the method of approximation using a smoothing kernel function. The motion of the fluid is determined by the interaction of these particles.
[0043] Among them, in the preferred embodiment provided by the present invention, the meshless method is used for fluid simulation, the movable model and the population are regarded as fluids, and the fluid volume is discretized into particles carrying physical properties; the specific steps are as follows: According to the density characteristics between particles, the entity with strong intermolecular force is defined as a solid fluid, and the entity with weak intermolecular force is defined as a liquid fluid; Both the solid fluid and the liquid fluid follow Newton's second law of motion, and the following relational expressions exist in the corresponding process: ; Among them, represents the force, represents the density, represents the acceleration; The object model is regarded as a solid fluid, and the population is regarded as a liquid fluid; According to the volume sizes of the object model and the population, the object model and the population are discretized into corresponding numbers of particles; Each particle is assigned an initial position, an initial mass, and an initial velocity.
[0044] Step 4: The fluid is regarded as a particle system with interactions, and continuous dynamic calculation is performed by assigning different motion flexibilities to the fluid according to the change of particle density during the fluid motion process to achieve fluid simulation, obtaining the fluid force field information, and reconstructing the fluid surface using the Marching Cube algorithm; When simulating the motion of fluid particles, the present invention not only needs to use equations to calculate the motion trajectory of the particles, but also needs to reconstruct the surface of the fluid. Among the surface reconstruction algorithms, the Marching Cube algorithm is a relatively simple and practical algorithm. This algorithm is one of the classic algorithms for voxel rendering and is mainly used for the visualization of three-dimensional spatial data. The core idea is to extract isosurfaces from three-dimensional data sets and use triangular patches to approximate these isosurfaces.
[0045] The core principle of continuous dynamics is to model the motion as a system of interacting particles that influence each other to form complex fluid motion. Based on the change in density, the present invention divides these fluids into: Solid Fluid: A densely packed entity that exhibits strong intermolecular forces.
[0046] Liquid Fluid: A solid with weaker intermolecular forces, allowing greater flexibility of movement.
[0047] There is a concept involved in continuous dynamics: smooth core. The smooth core can be understood as each particle is affected by other particles within a certain range around it, and the final properties of the particle are determined by the weighted properties of all the surrounding particles. Within the smooth core radius, the closer the distance, the greater the impact.
[0048] Based on this concept, the particle property calculation formula is obtained:
[0049] in, Indicates a property to be calculated (such as density, pressure, viscosity), represents the mass and density of the surrounding particles, is the position of the particle, h is the radius of the smoothing kernel, W is the smooth kernel function.
[0050] Among them, in the preferred embodiment provided by the present invention, the fluid is regarded as an interacting particle system, and different movement flexibility is given to the fluid according to the change of particle density during the fluid movement process to perform continuous dynamics solution to realize the fluid simulation. The specific steps are as follows: Define the relationship between external force, density, and gravitational acceleration. The corresponding process has the following relationship: ; in, represents the acceleration due to gravity; Define the relationship between the force generated by the pressure difference, pressure and gradient. The corresponding process has the following relationship: ; Among them, represents the gradient, and represents the pressure; Define the relationship between the force caused by the velocity difference between particles and the density and velocity difference. The corresponding process has the following relationship: ; Among them, represents the velocity difference between particles; According to the position, mass, and smoothing kernel radius of the particles, the density is calculated using the smoothing kernel function. The corresponding process has the following relationship: ; Among them, represents the density of the i th particle, represents the mass, represents the smoothing kernel radius, represents the position of the i th particle, represents the position of the j th particle; The kernel function used for density calculation is: ; Among them, represents the smoothing kernel function used for density calculation, represents the i th particle and the j th particle, the length of the distance between them, represents the i th particle and the j th particle, the distance vector between them; According to the position, density, mass, and pressure of the particles, the pressure is calculated using the smoothing kernel function. The corresponding process has the following relationship: ; Among them, represents the pressure of the i th particle, represents the pressure at the position , represents the pressure of the i th particle, represents the pressure of the j th particle, represents the density of the i th particle, represents the density of the j th particle, represents the j th particle's mass; The pressure of a single particle p, it can be calculated using the ideal gas equation: ; Among them, is the static density of the fluid, is a constant related to the fluid properties, usually related to temperature.
[0051] The kernel function used for pressure calculation is: ; Among them, represents the smoothing kernel function used for calculating pressure; According to the particle smoothing kernel radius, the distance between particles, and the velocity difference, the viscosity is calculated using the smoothing kernel function. The corresponding process has the following relationship: ; Among them, represents the shear force caused by the velocity difference, represents the viscosity coefficient, represents the velocity of the i th particle, represents the velocity of the j th particle; The kernel function used for viscosity calculation is: ; Among them, represents the smoothing kernel function used for calculating the shear force; The total force of the particle is calculated based on the external force, the pressure inside the body, and the force caused by the velocity difference. The corresponding process has the following relationship: ; Among them, represents the external force, represents the force generated by the pressure difference inside the fluid, represents the force caused by the velocity difference between particles; Update the particle motion state according to the total force, the current velocity, and the time step.
[0052] Step 5: Assign different motion postures to the static model and individuals according to the static model in the fluid force field information and the particle force field information corresponding to the group; Step 6: Preprocess the ground model, and then perform convex polygon division to obtain the navigation grid; Based on the current position and the target position of the individual on the ground model, several individuals generate a global path according to the navigation grid and the scene constraints, and use the variable turning angle path search algorithm to generate a travel path for each individual in the global path; A navigation mesh is a polygon mesh data structure used for pathfinding in three-dimensional space, also known as a traversable surface. Usually, it carries more functions, such as attaching weight information like slope and density at that location. A navigation mesh is composed of multiple convex polygons. In terms of global path calculation, using the plane partitioning method, the traversable area in the space is divided into multiple three-dimensional planes, and the set of convex polygons that an individual's optimal path needs to pass through is determined based on the multiple three-dimensional planes to determine the global path. Suppose represents a plane in space, then the plane set is stored in an array in sequence.
[0053] Among them, in the preferred embodiment provided by the present invention, the ground model is preprocessed, and then convex polygon partitioning is performed to obtain a navigation mesh; based on the current position and target position of an individual on the ground model, a global path is generated for several individuals according to the navigation mesh and scene constraints, and a variable turning angle path search algorithm is used in the global path to generate a travel path for each individual, which specifically includes the following steps: Obtain the three-dimensional space information of the ground model, and use the plane partitioning method to divide the traversable area in the three-dimensional space into multiple three-dimensional planes according to the three-dimensional space information to obtain the plane set of the three-dimensional space; Calculate the intersection of each plane in the plane set of the three-dimensional space with the traversable space to obtain a set of convex polygons located on different planes; Analyze the spatial relative positions between the convex polygons, and determine whether there are connection channels between the convex polygons to obtain an adjacency graph describing the polygon units and their adjacency relationships; Determine the convex polygon units corresponding to the current position and target position according to the current position and target position of the individual on the ground model; According to the cost of passing through each convex polygon unit, find the set of convex polygons that need to be passed through and have the lowest cost from the current position convex polygon unit to the target position convex polygon unit in the adjacency graph to obtain the global path.
[0054] Among them, there is the following relational expression in the cost calculation process of the convex polygon unit: ; Among them, represents the cost of the current convex polygon unit, represents the pedestrian flow density weight, represents the water flow velocity weight, represents the convex polygon unit, represents the l th water flow particle, represents the passing plane, Indicates the k personal character particle.
[0055] The convex polygon pathfinding algorithm is to find a path that meets the constraint conditions for an individual between a given position A and position B based on a known map. Such problems often occur in industrial applications such as individuals and car navigation. The reason for choosing a convex polygon is: a characteristic of a convex polygon, that is, when walking from a point on the side of a convex polygon to another point, no matter which direction is taken, it will not go out of this convex polygon. While a concave polygon does not have this characteristic, and a concave polygon may go outside.
[0056] In a previous patent invention (CN202310294890.0), a minimum turning angle method was proposed for global path calculation. Its goal is to ensure that pedestrians move towards the destination with the minimum rotation angle. The minimum turning angle method proposed in the patent invention (CN202310294890.0), although having the minimum amount of rotation and being faster in calculation speed than the midpoint method and the inflection point method, has obvious advantages, but lacks flexibility. Considering adding changes to the original minimum turning angle method to adapt to external variable situations such as crowd density, terrain height, and passage switch in path planning and improve the adaptability of the algorithm, the present invention proposes a variable turning angle path finding algorithm.
[0057] Please refer to Figure 5 , wherein, in the preferred embodiment provided by the present invention, adopting the variable turning angle path finding algorithm in the global path to generate a travel path for each individual specifically includes the following steps: S1. Obtain the current position and target position of the individual and the set of internal edges of the convex polygon in the global path; S2. Establish an empty tracking queue for storing the key points selected during the path planning process; S3. Connect the current position and target position of the individual to form a straight line as the target line; S4. Traverse all internal edges to determine whether there is an intersection between the internal edge and the current target line; S5. If there is an intersection, then use the first internal edge intersecting with the target line as the intersecting edge, calculate the weights of the left endpoint, intersection point, and right endpoint of the intersecting edge, compare the weights of the left endpoint, intersection point, and right endpoint, obtain the point with the minimum weight, and use the point with the minimum weight as the key point; S6. If there is no intersection, obtain the internal edge closest to the target line; S7. Calculate the two angles formed between the target line and the two endpoints of the nearest internal edge, compare the weights corresponding to the current two angles, select the point with the minimum weight, and use the point with the minimum weight as the key point; S8. Add the key point to the end of the tracking queue, update the queue content, and obtain the updated tracking queue; S9. Repeat the above S1 to S8 with the first key point in the tracking queue as the starting point for the next iteration until the tracking queue is empty, and obtain the travel path.
[0058] Among them, the following relational expressions exist in the calculation process of the minimum weight point: ; Among them, represents the tracking point weight selection, represents the linear interpolation function, represents the rotation angle weight, represents the rotation angle, represents the distance weight, represents the distance magnitude.
[0059] In Figure 5 Path 1 and Path 3 are obtained by the variable turning angle method of the present invention, while Path 2 is obtained by the minimum turning angle method. It can be seen from the figure that Path 2 has the smallest amount of rotation, while Path 1 and Path 3 obtained by the variable turning angle method proposed by the present invention have higher flexibility. Through the iterative weight evaluation mechanism, when extending the path each time, multiple objective parameters such as the turning angle, path length, and subsequent scalability are comprehensively considered, which can effectively avoid the problem that the minimum turning angle method only aims at minimizing the local turning angle and is prone to short-sighted decisions, resulting in redundant global paths, and can have better avoidance strategies when encountering obstacle boundaries.
[0060] Step 7. According to the state of the current group and the interaction situation between the physical entities of the individuals in the fluid force field information and other particles, select different local driving strategies to perform real-time dynamic microscopic correction on the travel direction of the individuals on the travel path, so as to achieve large-scale swarm biological simulation.
[0061] During the local routing of the crowd, many changes may occur, especially in sudden situations such as earthquakes and landslides. In the local space where the crowd is located, obvious environmental changes will occur, and there will be many situations where the internal particle forces cannot drive, such as falling objects from high altitudes, oncoming vehicles from the side, and reverse pedestrians. This requires the local strategies of individuals to respond. The local driving strategies adopted by the present invention include the three-dimensional space minimum turning angle method, the centroid following method, the target-oriented method, the group center method, and the neighborhood extreme value method. The specific strategies are as follows: (1) Three-dimensional space minimum turning angle method (1 VS 1) When the oncoming object (based on relative velocity) in three-dimensional space is a single object, calculate the line connecting the centroid of the individual and the centroid of the oncoming object, which is called the centroid line, and calculate the line connecting the centroid of the individual and the vertex of the bounding box of the oncoming object, which is called the boundary line. Calculate the angles between the boundary lines in 8 aspects and the centroid line respectively, and select the boundary line with the minimum escape angle as one of the main directions for the next movement.
[0062] (2) Minimum turning angle method in three-dimensional space (1 VS n) When the oncoming objects (based on relative velocity) in three-dimensional space are multiple objects, generate a bounding grid for the multiple objects and treat the bounding grid as a single object. Calculate the line connecting the centroid of the individual and the centroid of the bounding grid, which is called the centroid line, and calculate the line connecting the centroid of the individual and the vertex of the bounding box of the bounding grid, which is called the boundary line. Calculate the angles between the boundary lines in 8 aspects and the centroid line respectively, and select the boundary line with the minimum escape angle as one of the main directions for the next movement direction.
[0063] (3) Centroid accompaniment method (n VS 0) When the cluster in three-dimensional space is in a roaming or migrating state, each individual in the cluster calculates the direction between itself and the target point (such as: the closest point on the path), denoted as , and refers to the direction between itself and the cluster center, denoted as , and combines the distance between itself and the cluster center, denoted as . Then perform a linear random movement along the sum of the two directions ( + ) with the distance ( ) as the weight.
[0064] (4) Target-oriented method (n VS 1) When the group in three-dimensional space is in a foraging or hunting state, each individual in the group calculates the direction between itself and the target point , and then moves along this direction.
[0065] (5) Group center method (n VS m) When the groups A and B in three-dimensional space are in an offensive and defensive state, the individual a in group A (reaching the distance threshold) calculates the direction between itself and the centroid of group A, denoted as , and calculates the direction between itself and the closest point of group B, denoted as , and then makes a random movement (i.e., adding noise) along the difference direction of the two directions ( - ), and vice versa.
[0066] (6) Neighborhood extreme value method (ndomain VS m) When groups A and B in three-dimensional space are in an offensive and defensive state, and individual a in group A (reaching the defined distance threshold of possible threat) calculates the intersection C of its own neighborhood and group A, and calculates the direction of the center of the direction neighborhood, hereinafter referred to as , the direction of the nearest point in the neighborhood, hereinafter referred to as or the direction of the farthest point in the neighborhood, hereinafter referred to as , and calculates the direction between itself and the nearest point of group B , and then makes a random movement (i.e., adds noise) along the difference direction of the two directions ( -[[]] ), ( -[[]] ) or ( -[[]] ), and vice versa. In scenarios such as landslides and earthquakes, the calculation objects in the neighborhood are the roads or shelters (i.e., reachable safe areas) that can be selected around the individual.
[0067] (7) Space squeezing method The so-called space squeezing method means that when the group is in a confined space with only limited exits, the space squeezing method is used to apply pressure to the group to achieve the driving purpose. In actual natural scenarios (such as earthquakes), the situation of space collapse is also likely to occur.
[0068] In this embodiment, the relevant algorithms in the text are implemented using C# and Python languages on the Unity 3D and Houdini platforms. The simulation system runs stably at a speed of more than 24 FPS on a PC equipped with an Intel(R) Core(TM) i9-14900KF 3.20 GHz CPU, an NVIDIA GeForceRTX 4090 GPU, and 64G RAM. For the specific overall structure diagram, see Figure 6 , and for the calculation process of the solution framework, see Figure 7 . In this embodiment, scenarios of human-water interaction, dangerous waters, earthquake evacuation, and mine landslides are simulated.
[0069] (1) Human-water interaction (multi-type particle fusion calculation) In this experiment, the influence of different flow rates of water on different scales of crowds is simulated. The simulated crowd numbers are 1, 10, and 100 respectively.
[0070] Experiments prove that the relevant fluid motion calculation and fluid surface reconstruction methods adopted by the present invention are practical and feasible. At the same time, driving the macroscopic movement of the crowd by fluid dynamics methods and driving the microscopic movement of the crowd by rigid body mechanics methods have good effects.
[0071] (2) Dangerous waters The crowd is evacuated from the whirlpool. In this experiment, a crowd carried to a dangerous area by a flood is simulated. Due to different terrain distributions, dynamic water currents are likely to form dangerous areas such as whirlpools. According to the model of the present invention, the crowd will follow the direction of the water current and leave the center of the spiral.
[0072] (3) Earthquake evacuation Indoor earthquake evacuation. When an earthquake occurs, the situation of the crowd evacuating in a building is simulated. This scenario involves the impact of high-altitude falling objects on the path, the fusion calculation of biological fluids and solid fluids, verifying the solid particle substitution method proposed in the invention, and demonstrating the effects of the space squeezing method and the variable turning angle method in such scenarios.
[0073] (4) Underwater fishing Simulate the situation of a crowd chasing fish underwater. This scenario involves the fusion calculation of two biological fluids and verifies the three-dimensional space local routing strategies: the group center method and the domain extreme value method. The simulation scale is the total sum of 100, 500, and 1000 particles. The experiment shows that both the group center method and the domain extreme value method of the three-dimensional space local routing strategy can simulate effects close to reality, and the calculation cost of the domain extreme value method is relatively small. However, the nearest neighbor method and the farthest neighbor method in the domain extreme value method are likely to cause a small number of groups to become separated from the crowd.
[0074] (5) Mine landslide Simulate the situation of a landslide occurring during the production of a certain mine. This scenario involves the fusion calculation of two biological fluids and one solid fluid. The simulation scale is the total sum of 100, 500, and 1000 particles, and verifies the neighborhood extreme value method proposed in the article. In such scenarios, the calculation objects within the neighborhood are the roads or shelters (i.e., reachable safe areas) that can be selected around an individual, etc.
[0075] The experimental results show that: the integration of two biological fluids and one solid fluid is feasible, with good integration effects and high efficiency. The nearest neighbor method and the farthest neighbor method in the domain extreme value method of the three-dimensional space local routing strategy are most suitable for such situations.
[0076] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the indications of the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless there is a clear indication in this embodiment, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same moment, but can be executed at different moments. The execution order of these sub-steps or stages does not necessarily have to be sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0077] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0078] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0079] The above-described embodiments merely represent several implementation manners of the present invention, and their descriptions are relatively specific and detailed, but should not be construed as limiting the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.
Claims
1. A method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography, characterized in that: The method comprises the following steps: Step 1: Use oblique photography data to construct a real 3D scene, separate the ground objects from the real 3D scene, obtain a ground model and an object model, and divide the object model into a movable model and a stationary model; Step 2: Given a fluid and a group on the ground model, the group includes a number of individuals, and the individuals are modeled as physical entities with mass; Step 3: Use the meshless method to perform fluid simulation, treat the movable model and the group as fluid, and discretize the fluid volume into particles with physical properties; Step 4: Consider the fluid as an interacting particle system, and perform continuous dynamics calculations to give the fluid different motion flexibility according to the change of particle density during fluid motion to achieve fluid simulation, obtain fluid force field information, and reconstruct the fluid surface using the Marching Cube algorithm; Step 5: According to the particle force field information corresponding to the immovable model and the group in the fluid force field information, different motion postures are assigned to the immovable model and the individual; Step 6: Preprocess the ground model and then divide it into convex polygons to obtain a navigation mesh; Based on the current position and target position of the individual on the ground model, several individuals are combined to generate a global path according to the navigation grid and scene constraints, and a variable angle path finding algorithm is used in the global path to generate a travel path for each individual; Step 7: According to the current state of the group and the interaction between the individual's physical entity and other particles in the fluid force field information, different local driving strategies are selected to perform real-time dynamic microscopic corrections on the individual's direction of travel on the path to achieve large-scale cluster biological simulation.
2. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 1, characterized in that: In step 1, separating the ground objects from the real 3D scene to obtain the ground model and the object model specifically includes the following steps: Using the object classification method to classify the objects in the real three-dimensional scene, and obtaining object classification data; According to the classification data of ground objects, the clipping boxes corresponding to different objects are constructed by projection; The three-dimensional grid objects and clipping boxes of the real three-dimensional scene are used for Boolean operations to achieve the purpose of separation and obtain the ground model and object model.
3. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 2, characterized in that: In step 3, a meshless method is used to perform fluid simulation, the movable model and the group are regarded as fluid, and the fluid volume is discretized into particles with physical properties, which specifically includes the following steps: According to the density characteristics between particles, entities with strong intermolecular forces are defined as solid fluids, and entities with weak intermolecular forces are defined as liquid fluids; Both solid fluids and liquid fluids follow Newton's second law of motion, and the corresponding processes have the following relationship: ; in, Indicates force, represents density, Indicates acceleration; The object model is regarded as a solid fluid and the group is regarded as a liquid fluid; According to the volume of the object model and the group, the object model and the group are discretized into a corresponding number of particles; Assign each particle an initial position, initial mass, and initial velocity.
4. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 3, characterized in that: In step 4, the fluid is regarded as an interacting particle system, and different movement flexibility is given to the fluid according to the change of particle density during the fluid movement process to perform continuous dynamics solution to achieve fluid simulation, specifically, the following steps: Define the relationship between external force, density, and gravitational acceleration. The corresponding process has the following relationship: ; in, represents the acceleration due to gravity; Define the relationship between the force generated by the pressure difference, pressure and gradient. The corresponding process has the following relationship: ; in, represents the gradient, Indicates stress; Define the relationship between the force caused by the speed difference between particles, density and speed difference. The corresponding process has the following relationship: ; in, represents the speed difference between particles; According to the particle position, mass and smooth kernel radius, the density is calculated using the smooth kernel function. The corresponding process has the following relationship: ; in, Indicates location The density of Indicates quality, represents the smoothing kernel radius, Indicates i The position of a particle, Indicates j The position of a particle; According to the position, density, mass and pressure of the particle, the pressure is calculated using a smooth kernel function. The corresponding process has the following relationship: ; in, Indicates i The pressure of a particle, Indicates location The pressure, Indicates i The pressure of a particle, Indicates j The pressure of a particle, Indicates i The density of particles, Indicates j The density of particles, Indicates j The mass of a particle; According to the particle smooth kernel radius, the distance between particles and the speed difference, the viscosity is calculated using the smooth kernel function. The corresponding process has the following relationship: ; in, represents the shear force caused by the speed difference, represents the viscosity coefficient, Indicates i The speed of a particle, Indicates j The speed of a particle; The total force on the particle is calculated based on the force caused by the external force, the pressure inside the body, and the speed difference. The corresponding process has the following relationship: ; in, represents the external force, represents the force generated by the pressure difference inside the fluid, Represents the force caused by the speed difference between particles; Update the particle motion state based on the total force, current velocity, and time step.
5. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 4, characterized in that: The kernel function used for density calculation is: ; in, represents the smooth kernel function used to calculate the density, Indicates i Particles and j The distance between particles is Indicates i Particles and j The distance vector between particles; The kernel function used for pressure calculation is: ; in, Represents the smooth kernel function used to calculate pressure; The kernel function used for viscosity calculation is: ; in, Represents the smooth kernel function used to calculate the shear force.
6. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 5, characterized in that: In step 6, the ground model is preprocessed and then divided into convex polygons to obtain a navigation mesh; Based on the current position and target position of the individual on the ground model, a global path is generated for several individuals according to the navigation grid and scene constraints. A variable angle path finding algorithm is used in the global path to generate a travel path for each individual. The specific steps include: Acquire the three-dimensional space information of the ground model, and use the plane partitioning method to divide the traversable area in the three-dimensional space into multiple three-dimensional planes according to the three-dimensional space information to obtain a plane set in the three-dimensional space; Calculate the intersection of each plane in the plane set of three-dimensional space and the traversable space to obtain multiple convex polygon sets located on different planes; Analyze the relative spatial positions between the convex polygons, determine whether there are connecting channels between the convex polygons, and obtain an adjacency graph that describes the polygon units and their adjacency relationships; According to the current position and the target position of the individual on the ground model, determine the convex polygonal unit corresponding to the current position and the target position; According to the cost of passing through each convex polygon unit, the set of convex polygons that need to be passed from the convex polygon unit at the current position to the convex polygon unit at the target position and have the lowest cost are found in the adjacency graph to obtain the global path.
7. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 6, characterized in that: In the global path, a variable corner path finding algorithm is used to generate a travel path for each individual, which specifically includes the following steps: S1. Obtain the current position and target position of the individual and the internal edge set of the convex polygon in the global path; S2. Establish an empty tracking queue to store the key points selected during the path planning process; S3, connecting the current position of the individual and the target position to form a straight line as the target line; S4, traverse all internal edges and determine whether the internal edges intersect with the current target line; S5. If there is an intersection, the first internal edge that intersects the target line is used as the intersection edge, and the weights of the left endpoint, the intersection point, and the right endpoint of the intersection edge are calculated. The weights of the left endpoint, the intersection point, and the right endpoint are compared to obtain the point with the smallest weight, and the point with the smallest weight is used as the key point. S6. If there is no intersection point, obtain the inner edge closest to the target line; S7, calculating two angles formed between the target line and the two endpoints of the nearest internal edge, comparing the weights corresponding to the two current angles, selecting the point with the smallest weight, and taking the point with the smallest weight as the key point; S8, adding the key point to the end of the tracking queue, updating the queue content, and obtaining an updated tracking queue; S9, taking the first key point in the tracking queue as the starting point of the next iteration, repeat the above S1 to S8 until the tracking queue is empty, and obtain the travel path.
8. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 7, characterized in that: The calculation process of the minimum weight point has the following relationship: ; in, represents the tracking point weight selection, represents the linear interpolation function, represents the rotation angle weight, represents the rotation angle, represents the distance weight, Indicates the distance.
9. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 8, characterized in that: The cost calculation process of convex polygonal elements has the following relationship: ; in, represents the cost of the current convex polygon unit, represents the crowd density weight, represents the water velocity weight, represents a convex polygonal unit, Indicates l Water particles, represents the passing plane, Indicates k Character particles.
10. The method for simulating large-scale biological clusters in a real-life three-dimensional model based on oblique photography according to claim 9, characterized in that: In step 7, different local driving strategies include a three-dimensional space minimum turning angle method, a centroid adjoint method, a target-oriented method, a group center method, and a neighborhood extreme value method.
Citation Information
Patent Citations
Simulation Methods and Systems for Risk Assessment of High-Density Populations in Natural Disasters
CN116011361B
Fluid-solid interaction simulation method based on video reconstruction and SPH model
CN106446425A
Risk-avoiding assessment simulation method and system for high-density crowds in natural disasters
CN116011361A
Real fluid reconstruction evolution method and system based on three-dimensional Gaussian
CN119762640A
3-dimensional fluid simulation system for simulating rainwater stream flowed into road and river during flood and simulation method using thereof
KR101718755B1