Four-legged robot active crowd dispersing method based on local crowd density and flow direction perception

By constructing a local dynamic probabilistic grid map using a quadruped robot, crowd density and flow rate are calculated, risk levels are assessed, and crowd control strategies are generated. This solves the problem of insufficient local perception in existing technologies, enabling timely identification and proactive intervention of local crowd gatherings, and improving the safety and crowd control efficiency in public scenarios.

CN122469909APending Publication Date: 2026-07-28ZHEJIANG PROVINCIAL PUBLIC SECURITY SCIENCE & TECHNOLOGY RESEARCH INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG PROVINCIAL PUBLIC SECURITY SCIENCE & TECHNOLOGY RESEARCH INSTITUTE
Filing Date
2026-07-02
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing technologies are insufficient for timely perception and proactive intervention in areas of high density gathering during large-scale public events and high-density public transportation scenarios, making it difficult to control the risks of congestion and stampedes.

Method used

The quadruped robot-based active crowd control method, which is based on local crowd density and flow direction perception, acquires local perception data by carrying sensors, constructs a dynamic probabilistic grid map, calculates crowd density and flow velocity, assesses risk level, and generates the optimal crowd control strategy to achieve autonomous intervention.

Benefits of technology

It enables real-time identification and proactive intervention of the risk of localized crowd gatherings, reduces the risk of congestion spreading, improves the timeliness and safety of traffic management, supports multi-robot collaborative expansion, and has strong system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122469909A_ABST
    Figure CN122469909A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on local crowd density and flow direction perception four-legged robot active crowd control method, belong to public security and intelligent robot technical field.Four-legged robot is based on the personnel position information in effective perception field of view obtained based on self sensor;Based on continuous multiple frame information, local dynamic probability grid map is constructed with robot as center, and crowd density of each grid unit is estimated;Personnel target is tracked across frame, and local crowd mainstream direction and average flow velocity are calculated;Risk level is calculated by fusing density, flow velocity and flow direction conflict factor, and future density trend is predicted;When meeting active intervention condition, optimal crowd control strategy is selected from preset candidate strategy set based on current local situation information and executed by robot.The application overcomes the limitation of prior art depending on global view, so that four-legged robot can realize prospective risk assessment and active crowd control only by relying on its own local perception, effectively improve the safety and crowd control efficiency of key node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of public safety and intelligent robot technology, and in particular relates to a quadruped robot active crowd control method based on the perception of local crowd density and flow direction. Background Technology

[0002] In large-scale public events and high-density public passage scenarios, the dense crowds and complex flow directions can easily lead to the formation of localized high-density gathering areas. When the flow of people clashes or intersects, or when the passage capacity of a local area is insufficient, it can easily cause public safety accidents such as congestion, delays, or even stampedes, threatening people's lives and the order of the scene.

[0003] Current crowd control methods mainly include three categories: manual guidance, fixed directional facilities, and robot-assisted crowd control based on monitoring systems. Traditional manual guidance relies primarily on security personnel to maintain order on-site. While offering some flexibility, it suffers from limited coverage, low response efficiency, and poor continuous operation capability. Fixed directional facilities (such as broadcasts, signs, and warning lights) provide continuous alerts, but lack the ability to perceive the dynamic state of the crowd in real time, making it difficult to adaptively adjust to changes in local congestion, thus limiting their crowd control effectiveness.

[0004] Existing robot-based crowd control systems mostly rely on fixed cameras and centralized monitoring platforms. They deploy multiple cameras in key areas to transmit video data to a monitoring center, where a backend data processing module analyzes crowd density and then sends the results back to the robots to execute crowd control tasks. This type of solution typically relies on a global monitoring perspective and complete scene perception and centralized decision-making, and it has the following main shortcomings:

[0005] (1) The system adopts a centralized decision-making model, which is highly dependent on the global monitoring infrastructure, monitoring center and back-end data processing module. The overall link is long, and there is a large information transmission and decision-making delay, making it difficult to respond to local emergencies in a timely manner. However, in temporary activity venues or emergency sites, the risk of crowd gathering often occurs first in local key node areas, such as stairwells, in front of turnstiles, passage intersections and near entrances and exits. For example, at the stairwell of a subway station, when the upward flow of people continues to flow in, the stairwell area often forms a high-density crowd first. If local diversion is not carried out in time, it is very easy to spread to the surrounding areas and cause a larger-scale congestion. At this time, it is not necessary to obtain the global crowd status of the entire venue. It is only necessary to continuously sense the area near the stairwell and guide some people to divert to relatively smooth areas in a timely manner, which can significantly reduce local risks.

[0006] (2) Existing technologies typically intervene only after high-density gatherings have already occurred, lacking the ability to continuously perceive the evolution of local risks and proactively intervene, making it difficult to promptly stop the spread of risks. In fact, the risk of gatherings often has a clear local evolution process. If risks can be identified in the early stages, such as when density continues to rise and flow conflicts intensify, and if the population density, flow direction, and risk changes in the surrounding local areas can be continuously perceived, and proactive intervention and dynamic diversion can be carried out at high-risk nodes, then the probability of congestion spread and stampede accidents can be effectively reduced before congestion occurs, achieving more flexible, efficient, and intelligent personnel evacuation and safety management.

[0007] Therefore, there is an urgent need for a quadruped robot-based method for managing pedestrian traffic that does not rely on a global monitoring system and can proactively identify risks under locally perceptible conditions, in order to improve the safety, timeliness, and emergency response capabilities of key passage nodes in complex public scenarios. Summary of the Invention

[0008] To address the aforementioned issues, this invention proposes a quadruped robot-based active crowd control method based on local crowd density and flow direction perception. This method enables quadruped robots to autonomously assess, predict, and proactively intervene in crowd gathering risks based solely on their limited local perception, without relying on a global monitoring system.

[0009] The technical solution adopted in this invention is as follows:

[0010] In a first aspect, this invention proposes a quadruped robot-based active crowd control method based on local crowd density and flow direction perception, comprising the following steps:

[0011] S1. The quadruped robot uses its onboard sensors to acquire and process perception data within its effective field of view, thereby obtaining personnel location information centered on itself.

[0012] S2. Based on the personnel location information of multiple consecutive frames, construct and maintain a local dynamic probabilistic grid map centered on the robot, and use a probability update method to dynamically estimate the crowd density of each grid cell in the grid map.

[0013] S3. Based on the personnel location information of multiple consecutive frames, cross-frame tracking of personnel targets is performed to calculate the local mainstream direction and average flow velocity of the crowd within the effective perception field of view.

[0014] S4. By integrating the population density of each grid unit, the average flow velocity of the local population, and the flow conflict factor reflecting the degree of conflict between the mainstream direction of the local population and the preset safety direction, the risk level of the surrounding area is calculated; and the population density trend at future times is predicted based on the temporal changes in population density.

[0015] S5. When the density prediction result meets the preset active intervention triggering conditions, the optimal diversion strategy is selected from the preset candidate strategy set based on the current local situation information and executed by the quadruped robot; the current local situation information includes the population density distribution of each grid unit and its predicted value at future time, the local population mainstream direction and average flow velocity, and risk level information.

[0016] Furthermore, in S2, the probability update method is specifically as follows:

[0017] For each frame of personnel location information, the occupancy probability of the grid cell where the personnel is located and its neighboring grid cells is increased and updated, while the occupancy probability of the grid cells on the line of sight from the robot to the personnel location is decreased and updated.

[0018] Logarithmic odds are used to represent the occupancy probability, and multi-frame fusion is performed by accumulating update amounts.

[0019] When a grid cell leaves the effective field of view, the confidence level corresponding to its occupancy probability decays over time, and after exceeding a preset time threshold, it is reset to the initial unknown state.

[0020] Furthermore, in S2, the method for calculating the crowd density of each grid cell is as follows:

[0021] For the perception data of the current frame, the number of people in the grid cell is counted based on visual detection and laser point cloud clustering respectively; the number of people counted based on the two methods is weighted and fused to obtain the estimated number of people in the grid cell, and then divided by the grid area to obtain the density;

[0022] The calculation of the crowd density in each grid cell and the update cycle of the local dynamic probability grid map are adaptively adjusted according to the movement speed of the quadruped robot.

[0023] Furthermore, the risk level is determined based on the magnitude of the risk index, which is calculated using the following formula:

[0024] ;

[0025] in, It is the risk index of the i-th grid cell. The higher the risk index, the higher the risk level. It is the population density of the i-th grid cell. This is a preset density threshold, where S is the average flow velocity of the local population. It is the preset reference flow rate, and C is the flow direction conflict factor. It is the weighting coefficient.

[0026] Furthermore, the active intervention trigger condition is that the population density growth rate in the surrounding area exceeds a preset density growth rate threshold; or, the population density of the target grid cell at the predicted future time exceeds a preset safe density threshold.

[0027] Furthermore, the method for calculating the mainstream direction and average flow velocity of the local population is as follows:

[0028] The velocity vectors of all successfully tracked individuals within a preset time period prior to the current moment are weighted and averaged to obtain the local population mainstream direction vector; the magnitude of the local population mainstream direction vector is the local population average flow velocity.

[0029] Furthermore, the preset candidate strategy set consists of a combination of four parameters: the location of the diversion action, the type of diversion action, the speed level of diversion, and the duration of diversion.

[0030] Further, the step of selecting the optimal diversion strategy from the preset candidate strategy set includes:

[0031] The system takes the population density distribution of each grid cell in the current local situation information and its predicted value at future time, the local mainstream direction and average flow velocity of the population in the effective perception field of view, and the risk level information as input, queries the strategy scoring rule table, and outputs the matching score of the candidate strategy's guidance effect location, guidance action type, guidance speed level, and guidance duration.

[0032] The comprehensive score of each candidate strategy is calculated based on the scores and preset weights, and the strategy with the highest comprehensive score is selected as the optimal diversion strategy.

[0033] Furthermore, it also includes a step involving the coordinated dredging by multiple quadruped robots, specifically:

[0034] Each robot operates independently during the evacuation process;

[0035] Each robot shares a local dynamic probability grid map and risk index information through a wireless communication network;

[0036] Each robot will stitch and fuse its own generated local dynamic probability grid map and risk index information with the corresponding information shared with other robots to form a fused situation map covering a wider area.

[0037] Based on the fused situation map, each robot adjusts its guidance strategy to achieve coordinated guidance.

[0038] Secondly, the present invention discloses a computer program product, including a computer program / instruction, which, when executed by a processor, can realize the above-mentioned quadruped robot active crowd control method based on local crowd density and flow direction perception.

[0039] Thirdly, the present invention discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned quadruped robot active crowd control method based on local crowd density and flow direction perception.

[0040] Fourthly, the present invention discloses a computer electronic device, including a memory and a processor;

[0041] The memory is used to store computer programs;

[0042] The processor is used to implement the above-mentioned quadruped robot active crowd control method based on local crowd density and flow direction perception when executing the computer program.

[0043] The beneficial effects of this invention are:

[0044] (1) By constructing and maintaining a local dynamic probabilistic grid map centered on the robot and performing cross-frame tracking of personnel targets, the present invention calculates the main direction and average flow velocity of the local crowd. This enables a single quadruped robot to make robust and continuous estimations of the crowd density and movement trend within its effective field of vision using only its own sensors, overcoming the dependence of traditional schemes on fixed global monitoring facilities.

[0045] (2) This invention establishes a quantitative risk assessment and early warning mechanism by integrating the population density of each grid unit, the average flow velocity of the local population, and the flow direction conflict factor to calculate the risk level and predict the population density trend at future times. On this basis, when the density prediction result meets the preset active intervention triggering conditions, the robot can actively select the optimal diversion strategy from the preset candidate strategy set and execute it, thereby transforming the diversion action from a response after congestion occurs to active diversion before risk formation.

[0046] (3) This invention supports the expansion of multi-robot systems. Multiple robots can operate independently in parallel and share their local dynamic probability grid maps, risk levels and other current local situation information. Without relying on central control, they can work together to achieve evacuation and coverage of a wider area. The system has strong scalability. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating a quadruped robot-based active crowd control method that is based on the perception of local crowd density and flow direction.

[0048] Figure 2 This is a flowchart illustrating the acquisition and processing of local human perception data based on a quadruped robot mobile platform;

[0049] Figure 3This is a flowchart illustrating the process of constructing a local dynamic probabilistic grid map and estimating crowd density centered on a robot.

[0050] Figure 4 This is a flowchart illustrating the calculation of the mainstream direction and average flow velocity of a local population.

[0051] Figure 5 This is a flowchart illustrating the process of assessing the risk of localized crowd gatherings and predicting population density trends.

[0052] Figure 6 This is a flowchart illustrating the process of generating a localized diversion strategy;

[0053] Figure 7 This is a schematic diagram of a quadruped robot active crowd control system based on the perception of local crowd density and flow direction.

[0054] Figure 8 This is a schematic diagram of a computer electronic device. Detailed Implementation

[0055] The present invention will be further described and illustrated below with reference to specific embodiments. The embodiments described are merely examples of the content of this disclosure and do not limit the scope of the invention. The technical features of each embodiment in the present invention can be combined accordingly, provided that there is no mutual conflict.

[0056] The accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0057] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0058] This invention proposes a quadruped robot-based active crowd control and diversion method based on local crowd density and flow direction perception. This method aims to solve the problem of crowd situation assessment and active crowd control decision-making by quadruped robots under limited local perception conditions. By using the quadruped robot to perceive and model the surrounding crowd status in real time, the risk of crowd gathering can be predicted, and a crowd control strategy matching the robot's capabilities can be generated. Finally, the robot body will execute the strategy, thereby realizing the active identification and intervention of public safety risks.

[0059] like Figure 1 As shown, the main steps include:

[0060] S1. Acquisition and processing of local human perception data based on a quadruped robot mobile platform

[0061] This step utilizes the quadruped robot's onboard sensors to acquire and process sensory data within its effective field of view, thereby obtaining personnel location information centered on itself.

[0062] In a preferred embodiment, the core objective of step S1 is to obtain precise location information of local personnel centered on the robot through multi-source sensor fusion.

[0063] like Figure 2 As shown, the specific implementation process is as follows:

[0064] (1.1) Synchronous acquisition of data from multiple sensor sources

[0065] As the quadruped robot moves autonomously along its preset inspection path, its sensor suite simultaneously collects raw data within its effective field of view, including:

[0066] Visual sensor: Used to acquire two-dimensional images and appearance features of people within the field of view, with a frame rate set to 10-30fps, outputting raw visual data. ,in j represents the index of the j-th person target within the robot's field of view at the current moment, and M is the total number of person targets detected in the current frame. Let j be the three-dimensional spatial position of the j-th person target in the visual sensor coordinate system.

[0067] LiDAR: Used to acquire three-dimensional point cloud information of the environment and personnel within the human's field of view. The scanning frequency is set to 10 Hz, and the output is raw laser data containing three-dimensional spatial coordinates. ,in , Let j be the three-dimensional spatial position of the j-th personnel target in the lidar coordinate system.

[0068] Attitude sensor (IMU): Used to provide the robot's real-time pose, with an update frequency of at least 200 Hz, and the output includes a position vector. and attitude angle vector pose data including ,in This is the robot's position vector in the global coordinate system; Here are the robot's attitude angle vectors, representing the roll angles respectively. Pitch angle and yaw angle .

[0069] (1.2) Pose-based coordinate system and data fusion

[0070] First, the extrinsic parameter matrix is ​​calibrated using sensors. and The raw visual and laser observation data are transformed into the robot's body coordinate system. Then, an attitude transformation matrix is ​​constructed based on the real-time pose information provided by the IMU. , The rotation matrix is ​​calculated from the attitude angle; data from different sensors are uniformly converted to a local environment coordinate system with the robot's current position as the origin.

[0071] Visual data conversion: ;

[0072] Laser data conversion: ;

[0073] in, It is the extrinsic parameter matrix from the camera to the robot's body coordinate system. It is the extrinsic parameter matrix of the laser radar reaching the robot's body coordinate system. It is raw visual data. This is the raw laser data.

[0074] After transformation, the three-dimensional spatial coordinate components are extracted to obtain the positions of each person in their respective coordinate systems, denoted as: , .

[0075] (1.3) Target-level data association and location information generation

[0076] For visual and laser observation results unified to the same coordinate system, a target association algorithm is used for target-level matching to determine whether they belong to the same person, and a unified three-dimensional position representation is obtained according to the fusion strategy. During fusion, if only visual detection detects the target, then If only the laser detects the target, then If both vision and laser detect the same target simultaneously, , For weight fusion.

[0077] Through the above fusion process, a set of precise location information for a series of personnel targets centered on the robot at the current moment is obtained, providing input for subsequent steps. In this embodiment, the target association algorithm can be implemented using existing technologies in the field, including but not limited to nearest neighbor matching methods based on spatial location consistency or association methods based on state estimation. One implementation method is to use a multi-target tracking algorithm to associate personnel targets detected in consecutive frames, assigning a unique local identity to each person entering the robot's field of view. When a target temporarily disappears due to occlusion and then reappears, it is re-identified using appearance features (such as visual feature vectors) to maintain the continuity of tracking. In this invention, no specific association algorithm is limited; it is only necessary to ensure that observation data from different sensors can complete target-level matching within the same time window for subsequent personnel position estimation and fusion processing.

[0078] S2. Robot-centric Local Dynamic Probabilistic Grid Map Construction and Crowd Density Estimation

[0079] This step is based on the sparse, local human location information obtained in step S1 for multiple consecutive frames, and transforms it into a continuous, probabilistic estimate of the crowd density in the area surrounding the robot. It constructs and maintains a local dynamic probabilistic grid map centered on the robot, rather than assuming that it can perceive the global area. The probability update method is used to dynamically estimate the crowd density in each grid cell of the grid map.

[0080] like Figure 3 As shown, the specific implementation process is as follows:

[0081] (2.1) Definition and initialization of local dynamic probabilistic raster map

[0082] Centered on the robot's current position, define a square sensing area with a side length of L (e.g., 20 meters), and divide it into sections with a side length of L. A grid map is formed using regular grid cells (e.g., 0.5 meters). This grid map translates as the robot moves, always centered on the robot. Each grid cell maintains a state variable, namely the posterior probability of being occupied. , used to characterize the The probability of an individual person existing within a unit. Initially, all units have a probability of 0.5, representing an initial unknown state.

[0083] (2.2) Probability update based on multi-frame observations

[0084] Using the continuous multi-frame personnel location information provided in step S1 This involves performing probability updates on the raster map to reduce single-frame errors and address occlusion issues.

[0085] Let the set of personnel locations detected by the sensor at time t be... , where M is the total number of people detected in the current frame. For each detection location Perform the following two types of update operations:

[0086] Occupy update: for Applying a positive probability increment to the grid cell and its neighboring cells (such as a 3×3 neighborhood) indicates an increased likelihood of the presence of people in that area.

[0087] Clear update: Determine from robot sensor center to All grid cells traversed by the straight path between them. Since no other personnel were detected when the sensor's line of sight passed through these areas, it indicates that these areas are currently empty. Therefore, a negative occupancy probability increment is applied to them, indicating that these areas are unoccupied.

[0088] For ease of calculation, each grid cell i maintains a log-probability representation of its occupancy probability. Its definition is:

[0089]

[0090] It is additive, and the update formula is:

[0091]

[0092] in, For detection location The probability update value for grid i is determined by the following rule: if grid i is located in... Within the occupied area, then (Positive value, e.g., 0.8); if grid i is located in the robot's path... On the path of sight, (Negative values, such as -0.4); the update amount for other grids is 0. and The value can be set according to the characteristics of the sensor.

[0093] After the update, the occupancy probability of grid i at time t It can be obtained by inverse calculation from logarithmic probability:

[0094]

[0095] Through the aforementioned incremental update mechanism, the system can effectively address various practical challenges and achieve robust and continuous estimation of local crowd distribution: First, to address potential missed or false detections in single-frame perception, the mechanism performs probabilistic fusion of observations from multiple consecutive frames, making the occupancy probability estimate of each grid cell stable and reliable over time; Second, when people are temporarily occluded (e.g., by obstacles or other pedestrians), the grid cells corresponding to the occluded area will maintain their last valid observation probability value, thus avoiding misjudgments caused by missing instantaneous observations; Finally, the mechanism has dynamic adaptability. When people leave a certain area, the clearing update triggered by the line-of-sight path from the robot to the original person's position will gradually decrease the occupancy probability of the grid cells in that area, thereby reflecting the dynamic changes in the actual distribution of the crowd in a timely and accurate manner.

[0096] The constructed local probabilistic grid map is continuously recorded. When robot movement causes parts of the area to fall outside the current perceptual field of view, the crowd state estimates for these areas will retain a confidence decay period based on the data from the last observation time. Specifically, for the first... Each grid cell, whose occupancy probability corresponds to a log-odds value, is updated over time with decay:

[0097]

[0098] in, This is the last time that the grid cell was observed. For the duration that was not observed, This is the attenuation coefficient, used to adjust the rate at which the confidence level decreases.

[0099] When the unobserved duration Exceeding the preset time threshold When this happens, the grid state is considered unreliable, and its occupancy probability is reset to the initial unknown state. Until it is sensed again. The time threshold. It can be adaptively set according to the robot's movement speed and the dynamics of the environment.

[0100] (2.3) Calculation of population density in grid cells

[0101] Based on the occupancy probability of each grid cell, and combined with the real-time detection results of the current frame, the density of each grid cell is calculated. Specifically, for the current frame, the number of people falling into each grid cell i is independently counted using both visual target detection and laser point cloud clustering methods, denoted as . and .

[0102] in, This is a count of people based on existing visual object detection algorithms. One implementation method is to project the center point of the detection boxes output by the visual object detection algorithm in the current frame onto the ground plane, and then count the number of detection boxes whose positions fall into grid i.

[0103] The number of people is calculated based on existing laser point cloud clustering algorithms. One implementation method is to use Euclidean clustering to obtain candidate clusters of people. If the centroid of a cluster falls into grid i, it is counted as 1 person.

[0104] The number of people in the grid is estimated using a weighted fusion method:

[0105]

[0106] in, For dynamic weighting coefficients, The preferred range is [0.4, 0.7]. The value is heuristically adjusted based on the overall occlusion and lighting conditions in the robot's current field of view: when the laser point cloud density attenuates drastically in front of the robot (indicating severe occlusion), the value is reduced. To increase the weight of laser detection; conversely, when lighting and texture conditions are good, to increase the weight of laser detection. To fully leverage the advantages of visual inspection in personnel identification.

[0107] Furthermore, the occupancy probability calculated in step (2.2) This information will be used as confidence aids for people detection. When a grid cell has a high occupancy probability but no people are detected in the current frame, it is determined to be a missed detection due to occlusion. In this case, we can choose to use the historical density estimate or reduce the decay rate of the grid cell density.

[0108] Let the area of ​​the i-th grid cell be... The population density of this unit is then defined as:

[0109]

[0110] (2.4) Dynamic update mechanism of map and density model

[0111] The update period T of the crowd density model was set to 0.5–2.0 s, and was adjusted according to the quadruped robot's movement speed. Adaptive adjustments are made. The faster the speed, the shorter the update cycle, ensuring the timeliness of environmental information when the robot moves quickly; the slower the speed, the longer the update cycle, saving computing resources.

[0112] In one implementation, the upper and lower thresholds for the robot's movement speed are set as follows: and (and The update cycle is linearly related to the robot's moving speed, as shown in the formula:

[0113]

[0114] when A maximum update cycle of 2.0 s is used; when Enable a minimum update cycle of 0.5 seconds; when Take the middle value.

[0115] S3, Calculation of local population mainstream direction and average flow velocity

[0116] This step performs cross-frame tracking of personnel targets based on the personnel location information of multiple consecutive frames, and calculates the local mainstream direction and average flow velocity of the crowd within the effective perception field of view.

[0117] like Figure 4 As shown, the specific implementation process is as follows:

[0118] (3.1) Calculate individual velocity vectors based on cross-frame tracking

[0119] For adjacent time windows and Within, time interval For the j-th person target that is successfully tracked and associated in two consecutive frames, its velocity vector is defined as:

[0120]

[0121] in, Representing the j-th person at time... The three-dimensional spatial position vector.

[0122] (3.2) Calculate the local population mainstream vector

[0123] To obtain a smooth estimate of the flow direction in the area surrounding the robot, a sliding window region centered on the robot's current position is defined. Within this region, the individual velocity vectors of all successfully tracked individuals within a pre-defined time window preceding the current moment are weighted and averaged to obtain a local mainstream flow vector representing the overall movement direction of the crowd in that region. :

[0124]

[0125] Where N is the number of people tracked within the window.

[0126] The main direction vector The direction represents the overall movement direction of the local population and will serve as the basis for determining flow conflict in subsequent risk assessments. If the mainstream direction is different from the pre-set safe evacuation direction... Conversely, there may be flow conflicts.

[0127] (3.3) Calculate the average flow velocity of the local population

[0128] The local average flow velocity S of the crowd is defined as the magnitude of the mainstream vector, quantifying the speed of the overall movement of the crowd within the sliding window region, and is expressed as:

[0129]

[0130] This flow rate value will be compared with a preset reference flow rate threshold to assess whether the traffic conditions are abnormal. For example, if the flow is too slow, there may be congestion.

[0131] S4. Risk assessment of localized crowd gatherings and prediction of population density trends

[0132] This step integrates the population density of each grid cell, the average flow velocity of the local population, and the flow conflict factor that reflects the degree of conflict between the mainstream direction of the local population and the preset safety direction to calculate the risk level of the surrounding area; and predicts the population density trend in the future based on the temporal changes of population density to achieve forward-looking risk warning.

[0133] like Figure 5 As shown, the specific implementation process is as follows:

[0134] (4.1) Risk assessment of localized gatherings of people

[0135] Periodically assess the risk of the surrounding grid centered on the robot, and calculate a quantified risk index for each grid cell. It is a weighted sum of the local maximum density, the local average velocity, and the flow direction conflict factor, expressed as:

[0136]

[0137] in, This represents the real-time crowd density of the grid cells; The preset density threshold is preferably set to 2-4 people / m². 2 ; This represents the average flow velocity of a localized population. The reference flow velocity threshold under normal traffic conditions is preferably 1.2-1.5 m / s; The velocity anomaly is the deviation of the current velocity from the reference velocity. The larger the deviation, the greater the risk of congestion. The flow conflict factor is used to quantify the degree of inconsistency between the mainstream flow direction of the local population and the preset safe evacuation direction. The value range is [0,1]. The more inconsistent the flow direction of the current sliding window area is with the preset safe evacuation direction, the higher the risk. These are weighting coefficients, satisfying... .

[0138] In one implementation, the flow is directed towards the conflict factor. Mainstream vector of local population With respect to the preset safe evacuation direction vector The angle between The included angle is determined by the following formula:

[0139]

[0140] Based on the size of the included angle, The preferred values ​​are as follows:

[0141]

[0142] Based on the calculated risk index, each grid cell is divided into low-risk, medium-risk, and high-risk levels. Among them, when... When it is low risk; when At that time, it was considered a medium-risk period; when It is a high-risk situation. and To preset risk classification thresholds, this invention calculates a risk index for each grid cell within a local dynamic sliding window region centered on the robot. And confirm the risk level.

[0143] (4.2) Population density trend prediction

[0144] To achieve proactive and forward-looking intervention, the local density change trends in medium- and high-risk grid cell regions are predicted. First, the density change rate is calculated:

[0145]

[0146] in, The current region density, The density at the previous moment, The time interval for calculating the regional density is preferably 0.5-1.0 s.

[0147] Based on this rate of change, a first-order linear extrapolation method is used to predict the future. Density of time:

[0148]

[0149] in, For the region density at the predicted time; The prediction time window is defined as follows. Since local population density typically exhibits continuous variation within a short time window, a first-order linear extrapolation method is preferred for short-term prediction.

[0150] When any of the following triggering conditions are met, the area is determined to have a potential clustering risk, and the diversion strategy generation process is initiated:

[0151] Triggering condition 1: Density growth rate exceeds limit:

[0152]

[0153] in, The preferred threshold value for the density growth rate is 0.3-0.5 people / (m²). 2 ·s).

[0154] Triggering condition 2: Predicted density exceeds the safety threshold:

[0155]

[0156] in, The preferred time window for prediction is 5-10 seconds. The preset safe density threshold is preferably 2-4 people / m². 2 .

[0157] S5, Generation of Local Diversion Strategy

[0158] When proactive intervention is triggered, the strategy generation phase begins, with the goal of selecting the optimal strategy best suited to the current specific scenario from a predefined, finite set of strategies.

[0159] like Figure 6 As shown, the specific implementation process is as follows:

[0160] (5.1) Structuring input information

[0161] First, the local situational information currently perceived by the robot is organized into structured data, which serves as input for policy decisions. This information includes:

[0162] Local population density distribution in each grid, both current and predicted. , ;

[0163] Local population mainstream vector Average flow velocity and flow conflict factors ;

[0164] The current risk level of the grid (low, medium, high risk).

[0165] (5.2) Construction of candidate strategy set

[0166] Construct a parameter space for the diversion strategy and generate a set of strategies. The diversion strategy is represented in a structured form as follows:

[0167]

[0168] Where L is the location of the diversion action, A is the type of diversion action, Q is the diversion speed level, and T is the diversion duration.

[0169] Define the optional sets for each parameter:

[0170]

[0171] The optional set of these parameters can be determined based on the robot's characteristics and the actual traffic management scenario. In one implementation, the preferred values ​​are as follows:

[0172] The preset values ​​are L1 (left side area), L2 (middle area), L3 (right side area), L4 (entrance), and L5 (exit).

[0173] The selectable values ​​are A1 (gesture guidance), A2 (voice prompt), A3 (light indicator), A4 (detour indication), and A5 (stop indication).

[0174] The selectable values ​​are Q1 (low-speed guidance), Q2 (medium-speed guidance), and Q3 (stationary parking guidance).

[0175] The possible values ​​are T1 (0-5s), T2 (5-10s), and T3 (10-20s).

[0176] By combining the above parameters, a preset set of candidate strategies containing all possible actions is generated. .

[0177] (5.3) Construction of the strategy scoring table

[0178] To achieve rapid screening and stable decision-making of candidate strategies, this invention pre-establishes a mapping relationship between strategy parameters and applicable scenarios based on historical scenario guidance strategy records, forming a strategy scoring rule table for automatic scoring of subsequent candidate strategies.

[0179] The strategy scoring rule table uses the structured data constructed in step (5.1) as input, and evaluates the matching of four types of parameters: location of diversion action, type of diversion action, speed level of diversion, and duration of diversion, to obtain each candidate strategy. Matching scores on each parameter ,in:

[0180] The location scoring system is used to evaluate whether the selected location is conducive to guiding people to low-risk areas. The preferred scoring rule is: a higher score is assigned when the candidate location is located on the boundary of a high-risk area and its guidance direction points to a low-density, passable area; a lower score is assigned when the candidate location is located in the center of the main passageway, which is prone to causing congestion, or when its guidance direction points to a high-density area or an area with obstacles. The passable area and the area with obstacles are obtained from preset map information.

[0181] The scoring of traffic management actions is used to evaluate the degree to which the selected actions match the current risk level. The preferred scoring rules are: when the risk level is low, low-interference actions such as voice prompts and light indicators should be given priority; when the risk level is high or there are obvious opposing or intersecting flows, strong intervention actions such as stop signals and detour signals should be given priority; when the space is narrow or the population is dense, large-scale hand gestures should be avoided.

[0182] The speed level rating is used to evaluate the degree of match between the selected speed level and the local congestion level. The preferred rating rule is: when the area density is high and the passage space is narrow, low-speed guidance or stationary guidance should be given priority; when the area risk is low and the passage conditions are good, medium-speed movement guidance can be used.

[0183] The duration of intervention is scored to evaluate the degree of match between the selected intervention duration and the persistence of risk. The preferred scoring rules are: when the local risk is short-term fluctuation, short-term alerts are preferred; when there is persistent high-density accumulation or obvious hedging flow, medium- to long-term intervention is preferred; when the risk has been significantly mitigated, strategies that continue long-term intervention are assigned lower scores.

[0184] It should be noted that the strategy scoring rule table is preset based on prior analysis of typical traffic management scenarios. Those skilled in the art can determine the score values ​​for traffic management location, action type, speed level, and duration under each specific situation based on the scoring logic explicitly disclosed in the specification, combined with the traffic management needs of the specific application scenario, the robot's interaction capabilities, and safety regulations.

[0185] (5.4) Strategy Scoring

[0186] After generating the initial strategy set, each candidate strategy is comprehensively scored according to a preset scoring rule, and the strategy with the highest score is selected as the target guidance strategy.

[0187]

[0188] in, For the weighting coefficients, satisfying .

[0189] Finally, the strategy with the highest score from the candidate strategy set is selected as the target channeling strategy. :

[0190]

[0191] (5.5) Strategy Execution

[0192] The quadruped robot receives and parses structured strategies. It performs corresponding traffic control actions through its motion control system, lighting and voice interaction system.

[0193] In one implementation, quadruped robots can be deployed individually or in multiple units in high-traffic areas of public places such as airports, train stations, shopping malls, and stadiums, including key nodes prone to congestion such as stairwells, safety exits, and passageway intersections. Each robot, as an autonomous intelligent agent, independently and continuously runs the aforementioned proactive crowd control method, achieving dynamic and proactive management of the risk of crowd gathering in local areas. When multiple robots work collaboratively, they can share their respective generated local dynamic probability grid maps, risk level, and density prediction information in real time through a self-organizing wireless communication network. Through spatiotemporal alignment and information fusion, the local and fragmented situational awareness is pieced together and enhanced to form a broader and more continuous global collaborative situational awareness map. Based on this shared global awareness, each robot can coordinate its crowd control strategies, such as being responsible for guiding traffic in different directions, providing segmented relay guidance for the same crowd flow, or collaboratively closing off a high-risk area. This achieves distributed, adaptive, and collaborative crowd control in large-scale complex scenarios without relying on any central control server or global monitoring facilities, significantly improving overall crowd control efficiency and system robustness.

[0194] This invention fully utilizes the terrain adaptability and mobility of quadruped robots, overcomes the limitations of existing solutions that rely on a global field of view, and realizes proactive and intelligent crowd control based on local perception, effectively reducing the risk of public safety accidents such as congestion and stampedes at key passage nodes.

[0195] It should also be noted that the quadruped robot active crowd control method based on local crowd density and flow direction perception in the above embodiments can essentially be executed by a computer program or module. Therefore, similarly, based on the same inventive concept, another preferred embodiment of the present invention also provides a quadruped robot active crowd control system based on local crowd density and flow direction perception, corresponding to the quadruped robot active crowd control method based on local crowd density and flow direction perception provided in the above embodiments, such as... Figure 7 As shown, it includes:

[0196] The perception and data processing module is used to acquire and process perception data within the effective perception field of view based on the sensors mounted on the quadruped robot itself, and obtain personnel position information centered on itself.

[0197] The local map and density estimation module is used to construct and maintain a local dynamic probabilistic grid map centered on the robot based on the personnel location information of multiple consecutive frames, and to dynamically estimate the crowd density of each grid cell in the grid map using a probability update method.

[0198] The motion feature calculation module is used to perform cross-frame tracking of personnel targets based on personnel position information in multiple consecutive frames, and calculate the main flow direction and average flow velocity of the local crowd within the effective perception field of view.

[0199] The risk assessment and prediction module integrates the population density of each grid cell, the average flow velocity of the local population, and the flow conflict factor that reflects the degree of conflict between the mainstream direction of the local population and the preset safe direction to calculate the risk level of the surrounding area; and predicts the population density trend in the future based on the temporal changes in population density.

[0200] The decision-making and execution control module is used to select the optimal diversion strategy from a preset candidate strategy set and execute it by the quadruped robot based on the current local situation information when the density prediction result meets the preset active intervention triggering conditions. The current local situation information includes the population density distribution of each grid cell and its predicted value at future time, the main direction and average flow velocity of the local population, and risk level information.

[0201] It should also be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the embodiments provided in this application, the division of steps or modules in the system and method is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules or steps may be combined or integrated together, and a module or step may also be split.

[0202] It is understood that the quadruped robot active crowd control method based on local crowd density and flow direction perception in the above embodiments can essentially be implemented by a computer program. Therefore, based on the same inventive concept, another preferred embodiment of the present invention also provides a computer program product corresponding to the quadruped robot active crowd control method based on local crowd density and flow direction perception provided in the above embodiments. This product includes a computer program / instruction, which, when executed by a processor, can implement the quadruped robot active crowd control method based on local crowd density and flow direction perception as described in the above embodiments.

[0203] Similarly, based on the same inventive concept, another preferred embodiment of the present invention also provides a computer electronic device corresponding to the quadruped robot active crowd control method based on local crowd density and flow direction perception provided in the above embodiments, such as... Figure 8 As shown, it includes a memory and a processor;

[0204] The memory is used to store computer programs;

[0205] The processor is used to implement the quadruped robot active crowd control method based on local crowd density and flow direction perception in the above embodiments when executing the computer program.

[0206] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0207] Therefore, based on the same inventive concept, another preferred embodiment of the present invention also provides a computer-readable storage medium corresponding to the quadruped robot active crowd control method based on local crowd density and flow direction perception provided in the above embodiments. The storage medium stores a computer program, which, when executed by a processor, can realize the quadruped robot active crowd control method based on local crowd density and flow direction perception in the above embodiments.

[0208] It is understood that the computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0209] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. A method for active crowd control using a quadruped robot based on local crowd density and flow direction perception, characterized in that, Includes the following steps: S1. The quadruped robot uses its onboard sensors to acquire and process perception data within its effective field of view, thereby obtaining personnel location information centered on itself. S2. Based on the personnel location information of multiple consecutive frames, construct and maintain a local dynamic probabilistic grid map centered on the robot, and use a probability update method to dynamically estimate the crowd density of each grid cell in the grid map. S3. Based on the personnel location information of multiple consecutive frames, cross-frame tracking of personnel targets is performed to calculate the local mainstream direction and average flow velocity of the crowd within the effective perception field of view. S4. By integrating the population density of each grid unit, the average flow velocity of the local population, and the flow conflict factor reflecting the degree of conflict between the mainstream direction of the local population and the preset safety direction, the risk level of the surrounding area is calculated; and the population density trend at future times is predicted based on the temporal changes in population density. S5. When the density prediction result meets the preset active intervention triggering conditions, the optimal diversion strategy is selected from the preset candidate strategy set based on the current local situation information and executed by the quadruped robot; the current local situation information includes the population density distribution of each grid unit and its predicted value at future time, the local population mainstream direction and average flow velocity, and risk level information.

2. The quadruped robot active crowd control method based on local crowd density and flow direction perception according to claim 1, characterized in that, In S2, the probability update method is specifically as follows: For each frame of personnel location information, the occupancy probability of the grid cell where the personnel is located and its neighboring grid cells is increased and updated, while the occupancy probability of the grid cells on the line of sight from the robot to the personnel location is decreased and updated. Logarithmic odds are used to represent the occupancy probability, and multi-frame fusion is performed by accumulating update amounts. When a grid cell leaves the effective field of view, the confidence level corresponding to its occupancy probability decays over time, and after exceeding a preset time threshold, it is reset to the initial unknown state.

3. The quadruped robot active crowd control method based on local crowd density and flow direction perception according to claim 1, characterized in that, In S2, the method for calculating the population density of each grid cell is as follows: For the perception data of the current frame, the number of people in the grid cell is counted based on visual detection and laser point cloud clustering respectively; the number of people counted based on the two methods is weighted and fused to obtain the estimated number of people in the grid cell, and then divided by the grid area to obtain the density; The calculation of the crowd density in each grid cell and the update cycle of the local dynamic probability grid map are adaptively adjusted according to the movement speed of the quadruped robot.

4. The quadruped robot active crowd control method based on local crowd density and flow direction perception according to claim 1, characterized in that, Risk levels are determined based on the magnitude of the risk index, which is calculated using the following formula: ; in, It is the risk index of the i-th grid cell. The higher the risk index, the higher the risk level. It is the population density of the i-th grid cell. This is a preset density threshold, where S is the average flow velocity of the local population. It is the preset reference flow rate, and C is the flow direction conflict factor. It is the weighting coefficient.

5. The quadruped robot active crowd control method based on local crowd density and flow direction perception according to claim 1, characterized in that, The active intervention trigger condition is that the population density growth rate in the surrounding area exceeds a preset density growth rate threshold; or, the population density of the target grid cell at the predicted future time exceeds a preset safe density threshold.

6. The quadruped robot active crowd control method based on local crowd density and flow direction perception according to claim 1, characterized in that, The step of selecting the optimal diversion strategy from a preset set of candidate strategies includes: The system takes the population density distribution of each grid cell in the current local situation information and its predicted value at future time, the local mainstream direction and average flow velocity of the population in the effective perception field of view, and the risk level information as input, queries the strategy scoring rule table, and outputs the matching score of the candidate strategy's guidance effect location, guidance action type, guidance speed level, and guidance duration. The comprehensive score of each candidate strategy is calculated based on the scores and preset weights, and the strategy with the highest comprehensive score is selected as the optimal diversion strategy.

7. The quadruped robot active crowd control method based on local crowd density and flow direction perception according to claim 1, characterized in that, It also includes a step involving the coordinated dredging by multiple quadruped robots, specifically: Each robot operates independently during the evacuation process; Each robot shares a local dynamic probability grid map and risk index information through a wireless communication network; Each robot will stitch and fuse its own generated local dynamic probability grid map and risk index information with the corresponding information shared with other robots to form a fused situation map covering a wider area. Based on the fused situation map, each robot adjusts its guidance strategy to achieve coordinated guidance.

8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it can realize the quadruped robot active crowd control method based on local crowd density and flow direction perception as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the quadruped robot active crowd control method based on local crowd density and flow direction perception as described in any one of claims 1 to 7.

10. A computer electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the quadruped robot active crowd control method based on local crowd density and flow direction perception as described in any one of claims 1 to 7.