A method, device and equipment for early warning of human flow and a storage medium

By constructing regional distribution maps and using ant colony algorithms to generate optimal diversion path sets, the problem of single paths in pedestrian flow management is solved, achieving efficient and safe diversion path planning and risk warning, and improving the real-time monitoring and control capabilities of pedestrian flow management.

CN116884199BActive Publication Date: 2026-03-17HEFEI LINGUZI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies rely on a single method for managing pedestrian flow, lacking multi-path diversion solutions, resulting in low management efficiency, insufficient safety and effectiveness, and an inability to effectively warn and manage pedestrian flow risks.

Method used

By acquiring map data and real-time pedestrian flow data, a regional distribution map is constructed, static and dynamic alarm thresholds are determined, and an optimal diversion path set is generated using the ant colony algorithm. The paths are dynamically adjusted to cope with pedestrian flow risks, and the optimal diversion path set is generated by combining the ant algorithm.

Benefits of technology

It improves the real-time monitoring and control capabilities of crowd management, reduces safety risks, lowers operating costs, enables rapid evacuation of crowds, avoids accidents, and improves management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116884199B_ABST
    Figure CN116884199B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of people flow early warning, in particular to a people flow early warning method, device, equipment and storage medium, and the specific implementation scheme is: acquiring map data and real-time people flow data of a to-be-tested area; constructing a regional distribution map according to the map data and real-time people flow data of the to-be-tested area, the regional distribution map being composed of grids; determining alarm thresholds of each grid of the regional distribution map; determining alarm grids, the alarm grids being obtained by comparing and analyzing real-time people flow data of the grids with the alarm thresholds, if the real-time people flow data of the grid is greater than the alarm threshold, the grid is recorded as an alarm grid; determining an optimal shunting path set by using an ant colony algorithm according to the regional distribution map and the alarm grids; and generating a shunting path of people flow in the to-be-tested area according to the optimal shunting path set. The early warning method can enable the management layer of the to-be-tested area to better manage the people flow in the to-be-tested area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of crowd flow early warning technology, specifically to a crowd flow early warning method, device, equipment, and storage medium. Background Technology

[0002] With continuous social progress and a rapidly increasing population, the resulting surge in crowds has led to greater safety hazards in public activities. Currently, in areas with high pedestrian traffic, local management primarily relies on on-site security personnel to maintain order, resulting in a relatively simplistic approach to crowd control. On-site security personnel lack practical management and guidance capabilities when diverting crowds, employing only one diversion route and failing to utilize multiple methods or respond quickly to crowd issues. People enter and exit various public places daily. Local management's approach to crowd control—using real-time pedestrian monitoring data, regional data, and activity data to determine alert status and issue warnings, implement slow-moving evacuations, or dispatch public transportation emergency response—is rather limited. Furthermore, the orderliness, safety, and efficiency of local management's crowd control methods are low, and their effectiveness in reducing the likelihood and severity of emergencies is minimal. Moreover, local management lacks a comprehensive inspection method and process for patrolling target points and diversion routes.

[0003] Therefore, regional management personnel need to focus on the issue of pedestrian flow diversion. Traditional methods of pedestrian flow diversion involve the management deploying a large number of personnel to divert pedestrian flow, and the diversion path is singular, lacking accuracy and failing to provide an optimal multi-path diversion solution. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, and storage medium for early warning of crowd flow.

[0005] According to a first aspect of this disclosure, a method for early warning of pedestrian flow is provided, comprising:

[0006] Construct a regional distribution map by acquiring map data and real-time pedestrian flow data of the area to be tested;

[0007] Determine the alarm threshold for each grid in the regional distribution map. The alarm threshold includes a static alarm threshold and a dynamic alarm threshold. The static alarm threshold is determined by the maximum capacity of the grid. The dynamic alarm threshold is the difference between the static alarm threshold and the real-time pedestrian flow data.

[0008] An alarm grid is defined by comparing and analyzing the real-time pedestrian flow data of the grid with an alarm threshold. If the real-time pedestrian flow data of the grid is greater than the alarm threshold, it is recorded as an alarm grid.

[0009] Based on the regional distribution map and the alarm grid, the ant colony algorithm is used to determine the optimal set of diversion paths;

[0010] Generate the flow paths of people in the area to be tested based on the optimal flow path set;

[0011] The diversion path is fed back to the monitoring system of the management layer of the area under test, enabling the management layer of the area under test to better manage the flow of people in the area under test.

[0012] According to a second aspect of this disclosure, a pedestrian flow early warning generation device is provided, comprising:

[0013] The first acquisition module is used to acquire map data and real-time pedestrian flow data of the area to be tested to construct a regional distribution map;

[0014] The first module determines the alarm grid;

[0015] The second acquisition module is used to acquire the optimal traffic distribution path based on the alarm grid, wherein the optimal traffic distribution path includes the optimal traffic distribution path generated by the alarm grid.

[0016] The second determining module is used to determine the total path distance of the routing path of the alarm grid, and to determine the optimal routing path set based on the optimal routing path of all the alarm grids.

[0017] The generation module generates the flow paths for people in the area to be tested based on the optimal flow path set.

[0018] A third aspect of this disclosure provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method as described in the first aspect of this disclosure.

[0019] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect of this disclosure.

[0020] A fifth aspect of this disclosure provides a computer program product that, when executed by an instruction processor, performs the method proposed in a first aspect of this disclosure.

[0021] The crowd flow early warning method, device, and equipment provided in this disclosure have at least the following beneficial effects:

[0022] In this embodiment, firstly, map data and real-time pedestrian flow data of the area to be tested are acquired. Then, a regional distribution map is constructed based on the map data and real-time pedestrian flow data. The regional distribution map is composed of grids. Next, an alarm threshold for each grid in the regional distribution map is determined. This alarm threshold includes a static alarm threshold and a dynamic alarm threshold. The static alarm threshold is determined by the maximum capacity of the grid, and the dynamic alarm threshold is the difference between the static alarm threshold and the real-time pedestrian flow data. Then, alarm grids are determined by comparing the real-time pedestrian flow data of each grid with the alarm threshold. If the real-time pedestrian flow data of a grid is greater than the alarm threshold, it is designated as an alarm grid. Finally, an ant colony algorithm is used to determine the optimal diversion path set based on the regional distribution map and the alarm grids. Finally, the pedestrian diversion paths for the area to be tested are generated based on the optimal diversion path set. Therefore, by dividing the regional distribution map into grids and determining alarm thresholds based on map data and real-time pedestrian flow data within the grids, alarm grids are determined based on these thresholds, and alarm information is sent. Then, the alarm grids are combined with an ant colony algorithm to generate an optimal diversion path set. This allows management in the tested area to reduce personnel and energy consumption based on the optimal diversion path set after an alarm is issued by the alarm grid. Dynamically adjusting paths can make operations more efficient, personnel safer, and operating costs lower. Setting dynamic and static alarm thresholds allows for the detection of potential risks during crowd movement based on preset or adaptive scenarios, automatically taking alarm measures. This improves managers' real-time monitoring and control of pedestrian flow, and enhances their ability to warn and handle risks. The optimal diversion path set and alarm threshold settings help management in the tested area better manage pedestrian flow, preventing stampedes. Furthermore, in the event of overcrowding, management can quickly evacuate crowds and create patrol plans for inspection.

[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0024] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0025] Figure 1 A flowchart illustrating a method for early warning of pedestrian flow provided in this disclosure;

[0026] Figure 2 This disclosure provides an interface diagram for setting alarm thresholds;

[0027] Figure 3 A flowchart illustrating an inspection method provided in this disclosure;

[0028] Figure 4 A flowchart illustrating an event reporting process provided in this disclosure;

[0029] Figure 5 This is a schematic diagram of a rectification process for a problem that needs to be rectified, as provided in this disclosure;

[0030] Figure 6 This disclosure provides a map area and a data area map;

[0031] Figure 7 This is a structural block diagram of a crowd flow early warning generation device provided in this disclosure;

[0032] Figure 8 This is a block diagram of an electronic device used to generate a crowd flow early warning method according to embodiments of the present disclosure. Detailed Implementation

[0033] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0034] The crowd flow early warning method provided in this disclosure can be executed by the crowd flow early warning generation device provided in this disclosure or by the electronic device provided in this disclosure. The electronic device may include, but is not limited to, terminal devices such as desktop computers and tablet computers. The following describes the crowd flow early warning method provided in this disclosure being executed by the crowd flow early warning generation device provided in this disclosure, but this is not intended to limit this disclosure.

[0035] The following is a detailed description of a method for early warning of pedestrian flow provided in this disclosure, with reference to the accompanying drawings.

[0036] Figure 1 This is a flowchart illustrating a method for early warning of pedestrian flow, provided as an embodiment of the present disclosure.

[0037] like Figure 1 As shown, the early warning method for this flow of people may include the following steps:

[0038] Step S1: Obtain map data and real-time pedestrian flow data of the area to be tested to construct a regional distribution map.

[0039] The areas to be tested can be cities, industrial parks, parks, museums, zoos, schools, etc., without any restrictions.

[0040] The map data includes road route information, the specific locations of video surveillance equipment, and the number of video surveillance equipment. The road route information may include the start and end points of the road route, route instructions, road type, road conditions, surrounding environment, road width, and road area, and also includes the start and end points of the road route and the distance value.

[0041] For example, if the area to be tested is a school, the map data includes the school's roads, the location of teaching buildings, the location of public places such as playgrounds and canteens, and places where people are more crowded after class. Real-time pedestrian flow data needs to be obtained mainly from the monitoring equipment in the canteen and teaching buildings.

[0042] like Figure 6 As shown, road path information can be obtained from the map area of ​​the area to be tested, and the number of video surveillance devices at specific locations can be obtained from the data area.

[0043] The real-time pedestrian flow data can be obtained through cameras, sensors, or positioning systems; no specific method is specified here.

[0044] It should be noted that real-time pedestrian traffic data is collected using cameras. Specifically, cameras are set up in areas with high pedestrian traffic, and computer vision technology (such as facial recognition and object tracking) is used to detect and count real-time pedestrian traffic data.

[0045] It should be noted that real-time pedestrian flow data is collected using sensors, such as infrared sensors, photoelectric sensors, and thermal imaging sensors. These sensors can be placed at key locations such as entrances or exits to obtain real-time pedestrian flow data by detecting human body heat, body shape, or movement.

[0046] It should be noted that real-time pedestrian flow data is collected using a location system. This system can be an indoor system (such as Wi-Fi or Bluetooth indoor positioning), which can detect pedestrian flow in real time using user signals. The app can either report its own location information or retrieve it. An outdoor system (such as GPS) can periodically collect location data to obtain real-time pedestrian flow data.

[0047] The pedestrian flow model obtains real-time pedestrian flow data by inputting real-time monitoring video into a reinforcement learning model. This reinforcement learning-based model can process and statistically analyze large amounts of data in a short time, enabling real-time pedestrian flow monitoring and allowing for real-time understanding of the actual situation at a location. The model is adaptable to various complex situations, including differences in crowd density, clothing, walking speed, time of day, weather, and activity type. It exhibits high generalization and robustness, providing excellent decision support for management in the tested area.

[0048] Step S2: Construct a regional distribution map based on the map data and real-time pedestrian flow data of the area to be tested. The regional distribution map is composed of a grid.

[0049] The regional distribution map refers to a grid-based method used to visually represent the distribution of road path information and real-time pedestrian traffic data within the area to be measured. Matrix grids are used for most areas, while triangles or other geometric shapes are used for irregular areas. In practical applications, many areas and scenarios are irregular, making it difficult to fully cover them with traditional rectangular grids. Using triangular or other shaped grids allows for greater flexibility in adapting to various irregularities, enabling detailed statistical analysis of pedestrian traffic in each grid cell. Map processing often involves complex geometric information, such as polygon intersection, union, and difference operations, which are easier to handle with triangular or other shaped grids.

[0050] Step S3: Determine the alarm threshold for each grid in the regional distribution map.

[0051] It should be noted that the alarm thresholds include static alarm thresholds and dynamic alarm thresholds. The static alarm threshold is the maximum capacity of the alarm grid, and the dynamic alarm threshold is the difference between the static alarm threshold and the real-time pedestrian flow data. Dynamic alarm thresholds can be flexibly adjusted according to the actual situation to adapt to different circumstances and scenarios. Static alarm thresholds, on the other hand, are usually fixed values ​​set based on historical data or experience; setting only a static alarm threshold may not accurately reflect the current situation. The combined use of dynamic and static alarm thresholds allows for automatic adjustment based on actual conditions, resulting in better adaptability and avoiding the problem of a single threshold being unable to handle different situations. For example, if a supermarket's static alarm threshold is 100 and the current pedestrian flow is 90, the administrator can use the dynamic alarm threshold to determine how many more people can enter. Without a dynamic alarm threshold, safety hazards and accidents may occur.

[0052] Setting dynamic and static alarm thresholds can help management in the tested area better manage visitor flow. For example, during the May Day holiday, the number of visitors to the Confucius Temple in Nanjing surges. Management can set dynamic and static alarm thresholds to better manage this flow. Based on historical data and experience, the maximum capacity of the Confucius Temple is 3,000 people. Therefore, the static alarm threshold can be set to 3,000. When the number of people in the Confucius Temple reaches 3,000, management can prohibit entry and quickly evacuate the crowd to prevent stampedes. When the number of people reaches 2,000, the dynamic alarm threshold can be set to 1,000 to remind management that 1,000 more people can enter the Confucius Temple.

[0053] Step S4: Determine the alarm grid.

[0054] The alarm grid is defined as a grid whose real-time pedestrian flow data is compared with the alarm threshold. If the real-time pedestrian flow data of the grid is greater than the alarm threshold, it is designated as an alarm grid.

[0055] The dynamic alarm threshold is used to compare with the pedestrian flow data at the entrance of the grid. If the pedestrian flow data at the entrance exceeds the dynamic alarm threshold, the grid is marked as an alarm grid, and a message is sent to the management level of the area under test. If the real-time pedestrian flow data within the grid exceeds the static alarm threshold, the grid is also marked as an alarm grid. Setting up alarm grids allows the management level of the area under test to quickly grasp real-time pedestrian flow data and take effective emergency measures, thereby better managing and controlling the security situation of the area under test and reducing potential security risks.

[0056] Step S5: Determine the optimal distribution path set using the ant colony algorithm based on the regional distribution map and the alarm grid.

[0057] The optimal diversion path includes alarm ants generated by the alarm grid. The optimal diversion path for pedestrian diversion in the alarm grid is generated based on the alarm ants. The alarm ants patrol the area distribution map and determine and record the diversion path distance, which includes the road path for pedestrian diversion in the alarm grid.

[0058] It should be noted that the alarm ant is a virtual object that moves within the search space according to certain rules and can discover and spread information during the search process. In the algorithm, each alarm ant has its own location information, path information, and search strategy, and can also perceive information from other alarm ants and the surrounding environment.

[0059] In this process, the alarm ants patrol the area distribution map and filter out candidate grids. After arriving at a candidate grid on the area distribution map, the alarm ants generate diversion probe ants to discover the road path information and real-time traffic data of each grid around the candidate grid.

[0060] Specifically, after the diversion detection ants have mastered the real-time pedestrian flow data, road path information, and the current warning threshold of the grid at the next selectable grid position, the alarm ants will filter out candidate grids and heuristically construct the pedestrian diversion path of the alarm grid.

[0061] It should be noted that when an alarm ant reaches the endpoint of a diversion path (the endpoint being the candidate grid corresponding to the alarm grid), if the alarm ant's journey to the endpoint of the diversion path exceeds the maximum path time, it will not submit the recorded diversion path route. If the maximum path time is not exceeded, the alarm ant will submit the recorded diversion path route. This diversion path route constitutes the total diversion path route for this iteration. The weight of the diversion path route in the total diversion path route is calculated, and then the updated pheromone is calculated. The alarm ant then returns along the original path to release the updated pheromone. After several iterations, all diversion paths of the alarm grid gradually converge to a pre-set number of diversion paths to generate the optimal diversion path that satisfies the flow of people in the alarm grid. The optimal diversion path set is generated from the optimal diversion paths of all alarm grids.

[0062] The formula for calculating the maximum path time is:

[0063]

[0064] Where T represents the maximum path time, S represents the distance traveled from the alarm grid to the corresponding candidate grid, and V... 人 This represents the normal walking speed for a person. For example, if S = 1.5 kilometers and T = 0.3 hours, then the maximum travel time is 0.3 hours.

[0065] Specifically, the weight of the diversion path distance in the total diversion path distance is calculated. The diversion path distance is represented as the distance value of the alarm ant from the alarm grid to the end point of the diversion path in the alarm grid. The total diversion path distance refers to the sum of all diversion path distances in the alarm grid.

[0066] The following formula is given for calculating the weight of the branch path distance in the total branch path distance:

[0067]

[0068] Where P represents the weight of the diversion path distance in the total diversion path distance, R1 represents the diversion path distance, and R 总 This represents the total distance of the branching paths. For example, if R1 = 1.6 kilometers, R... 总 =20 km, then P = 1.6 / 20 = 0.08. The weight value P is used to select the maximum weight of the diversion path distance in the total diversion path distance.

[0069] In this invention, pheromones are virtual substances that simulate the interaction between glandular secretions and the environment when real ants take action. Each alarm ant releases a corresponding amount of pheromone after traversing a path, based on the path's length and real-time pedestrian traffic. The pheromones are discretely distributed along the path, influencing the selection of the next alarm ant. Higher pheromone concentrations along a path attract more alarm ants, increasing the pheromone concentration, while pheromone evaporation gradually reduces the overall concentration.

[0070] It should be noted that the evaporation rate of pheromones controls the update rate of pheromones. Based on the diversion path route recorded by the alarm ants, and after n iterations, the total diversion path route after n iterations is composed of all the diversion path routes.

[0071] The formula for calculating pheromones is:

[0072]

[0073] S (i,j,y) (t+1)=S (i,j,y) (t)(1-ρ)+Δ y (t);

[0074] Among them, S (i,j,y) (t+1) represents the amount of pheromone along the branch path (i,j) with y as the branch path after the t-th iteration, where the alarm ant has passed through. ρ represents the amount of pheromone volatilized. Δ y (t) represents the amount of additional pheromones that need to be released, R 总 Let C represent the total distance of the diversion path; and let C be the maximum weight of the diversion path distance in the total distance of the diversion path, expressed as a constant.

[0075] The following formula is given for calculating the number of routing paths that satisfy the routing path requirement:

[0076]

[0077]

[0078] M = n × α;

[0079] Where M represents the pre-defined number of routing paths, L represents the weight of the number of routing paths in the routing path and the total number of routing path routes in all alarm grids, and R... 总 R represents the total distance of the diversion path, n represents the total number of all the alarm grids, and R represents the total distance of the diversion path. max R represents the maximum value of the routing path distance of the alarm grid. min R represents the minimum path length of the routing path in the alarm grid. average This represents the average path length of the branching paths in the alarm grid. Adding 0.001 to the denominator at the end prevents the formula for the number of branching paths from being meaningless. For example, let R... max =6,R min =1.5, R 总 =40, n=10, then R average =40 / 10=4, Then M = 10 × 0.5 = 5 is the number of pre-set diversion paths.

[0080] Specifically, the ant colony optimization (ACO) algorithm can adapt to different situations and environments, generating optimal diversion paths based on different scenarios and needs. It can be particularly advantageous in places with high pedestrian density and complex path topology, such as schools. Compared to the particle swarm optimization (PSO) algorithm, the ant colony optimization uses a global search approach, traversing all possible paths during the search process, thus effectively reducing the probability of falling into local optima.

[0081] Step S6: Generate the flow paths of people in the area to be tested based on the optimal flow path set.

[0082] In this embodiment, firstly, map data and real-time pedestrian flow data of the area to be tested are acquired. Then, a regional distribution map is constructed based on the map data and real-time pedestrian flow data. The regional distribution map is composed of grids. Next, an alarm threshold for each grid in the regional distribution map is determined. This alarm threshold includes a static alarm threshold and a dynamic alarm threshold. The static alarm threshold is determined by the maximum capacity of the grid, and the dynamic alarm threshold is the difference between the static alarm threshold and the real-time pedestrian flow data. Then, alarm grids are determined by comparing the real-time pedestrian flow data of each grid with the alarm threshold. If the real-time pedestrian flow data of a grid is greater than the alarm threshold, it is designated as an alarm grid. Finally, an ant colony algorithm is used to determine the optimal diversion path set based on the regional distribution map and the alarm grids. Finally, the pedestrian diversion paths for the area to be tested are generated based on the optimal diversion path set. This application obtains real-time pedestrian flow data by inputting real-time monitoring video into a pre-trained pedestrian flow model in step S1. The pre-trained model can be trained on a large amount of historical data, thereby improving its prediction accuracy and precision, making it a high-precision pedestrian flow monitoring method. This method can process and statistically analyze a large amount of monitoring data in a short time, achieving real-time pedestrian flow monitoring and facilitating timely understanding of the current pedestrian flow situation in the area by regional management. Step S2 divides the regional distribution map into grids. This grid division allows management to monitor changes in pedestrian flow data in each grid in real time. Matrix grids are used for most areas, while triangles or other shapes are used for irregular areas. In practical applications, many areas and scenarios are irregular, making it difficult to completely cover them with traditional rectangular grids. Using triangular or other shaped grids allows for more flexible adaptation to various irregularities, enabling detailed statistical analysis of real-time pedestrian flow in each grid. Step S3 determines the dynamic and static alarm thresholds. Setting these thresholds allows for automatic alarm activation when potential risks are detected during crowd movement, improving management's real-time monitoring and control of crowd flow, and enhancing risk warning and handling capabilities. Step S4 defines the alarm grid. By setting alarm thresholds in each grid, automatic alarm activation is possible when potential risks are detected during crowd movement, and the system automatically sends alarm messages to management, enabling timely action. Step S5 uses the ant colony algorithm to calculate the optimal diversion path. The ant colony algorithm adapts to different situations and environments, generating optimal diversion paths based on various scenarios and needs. It is particularly advantageous in situations with high crowd density and complex path topologies, such as schools. Compared to the particle swarm optimization algorithm, the ant colony algorithm uses a global search approach, traversing all possible paths during the search, effectively reducing the probability of falling into local optima.The pedestrian flow diversion path map generated in step S6 can help the management of the area under test to quickly evacuate pedestrians after the alarm grid issues an alarm message, avoid stampede accidents, and better manage the pedestrian flow in the area under test.

[0083] Figure 2 The setup method shown includes:

[0084] Alarm thresholds, static / dynamic types, and entry / exit types are set for each surveillance video device. The alarm thresholds are compared with real-time pedestrian flow data to determine whether an alarm should be generated. If the real-time pedestrian flow data exceeds the set threshold, an alarm will be generated, and an alarm SMS will be sent to the management of the area under test.

[0085] Figure 3 This is a flowchart illustrating an inspection method provided in one embodiment of the present disclosure.

[0086] like Figure 3 As shown, this inspection method includes the following specific steps:

[0087] Specifically, the management of the area under test dispatches inspection teams to conduct inspections based on alarm SMS messages and alarm grids. Inspection team members generate an inspection plan based on the alarm grids and the optimal routing path set. The inspection plan includes filling in the inspection topic and selecting the alarm grids to be inspected. Each alarm grid planned for inspection automatically generates an inspection task to be executed. The inspection team members execute the inspection tasks according to the inspection plan, the alarm grids, and the optimal routing paths. When executing the inspection tasks, the inspection team members fill out an inspection form in collaborative mode. After filling out the task form, the inspection team members complete the inspection task. It is determined whether the inspection task has any issues requiring rectification. If not, the inspection task is archived. If there are issues requiring rectification, rectification feedback materials are uploaded. The inspection team members confirm the rectification status based on the rectification feedback materials and determine whether to confirm the rectification. If not, they return to upload the rectification feedback materials; if confirmed, the inspection task is archived.

[0088] It should be noted that the inspection includes three aspects: creating an inspection plan, task execution, and rectification of safety hazards.

[0089] When the management of the area to be tested creates an inspection plan, it will select one or more alarm grids that need to be inspected. After the inspection plan is created, a data of the inspection plan will be generated, and at the same time, data of inspection tasks to be executed will be generated for each alarm grid selected in the inspection plan.

[0090] Among them, when the management of the area under test executes the task, they can see the task data to be executed for each alarm grid when the inspection plan is created, and they can execute the task. When executing the task, they can fill in the problems that need to be rectified, fill in the problem description and pictures, and then save it.

[0091] Among them, the safety hazard rectification will generate corresponding data on issues that need to be rectified when the questions are filled in during the task execution. In this module, the problematic inspection items can be rectified. After the rectification is completed, the reviewers will archive it, thus completing the closed loop of the rectification and inspection process.

[0092] Figure 4 The process shown illustrates how the management of the area under test reports the event after the flow of people in the alarm grid has been diverted.

[0093] It should be noted when necessary, Figure 4 This example illustrates how the management of the area under test reports the event after the pedestrian flow diversion of the alarm grid has ended. It should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0094] like Figure 4 As shown, the inspection team members in the area to be tested need to create a new event report and submit the event. The management of the area to be tested then confirms the report and provides feedback to the inspection team members. The inspection team members then make rectifications based on the feedback and submit materials. Finally, the management of the area to be tested confirms the rectifications and archives them.

[0095] Figure 5 This demonstrates the rectification process for issues identified by the management of the region under test during task execution.

[0096] It should be noted when necessary, Figure 5 This illustration shows an example of a rectification process where the management of the region under test discovers issues requiring rectification during task execution, and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0097] like Figure 5 As shown, when the management of the tested area discovers issues requiring rectification during task execution, they provide feedback based on the events reported by the inspection team members. The inspection team members then implement the necessary rectifications based on the feedback. After rectification, the management of the tested area confirms whether to reject the rectification feedback. If not rejected, the inspection team members confirm the rectification is complete and archive it. If the rectification feedback is rejected, the inspection team members must rectify the issues again.

[0098] It should be noted that, Figures 3 to 5The series of measures taken by the management of the area under test based on the alarm grid are a supplement to this embodiment and should not impose any limitations on the functionality and scope of use of this embodiment.

[0099] Figure 6 This disclosure provides a map area and a data area map.

[0100] like Figure 6 As shown, this map helps management in the area under test to obtain map data and the number and specific locations of video surveillance equipment more quickly.

[0101] Figure 7 This is a structural block diagram of an apparatus for a method of early warning of pedestrian flow provided according to an embodiment of the present disclosure.

[0102] like Figure 7 As shown, the device 200 for the pedestrian flow-based early warning method may include:

[0103] The first acquisition module 210 is used to acquire map data and real-time pedestrian flow data of the area to be tested, and to construct a regional distribution map.

[0104] The first module 220 determines the alarm grid.

[0105] The second acquisition module 230 is used to acquire the optimal routing path based on the alarm grid.

[0106] The second determining module 240 is used to determine the total path of the diversion path of the alarm grid and obtain the optimal diversion path set based on the optimal diversion path of all the alarm grids.

[0107] The generation module 250 uses the optimal diversion path set to generate an early warning method for the flow of people in the area to be tested.

[0108] Optionally, the first acquisition module 210 specifically includes:

[0109] Obtain map data of the area to be tested. The map data of the area to be tested includes road path information, video surveillance equipment, and video surveillance equipment. The road path information of the area to be tested includes the starting and ending points of the road path, route instructions, road type, road conditions, and surrounding environment.

[0110] The system acquires real-time monitoring videos from video surveillance devices in the grid, inputs these videos into a pre-trained pedestrian flow prediction model, obtains real-time pedestrian flow data from the grid, and classifies the pedestrian flow data into dynamic pedestrian flow data and static pedestrian flow data.

[0111] Optionally, the first determining module 220 specifically includes:

[0112] The dynamic pedestrian flow data of the grid is compared and analyzed with the dynamic alarm threshold of the grid, and the static pedestrian flow data of the grid is compared and analyzed with the static alarm threshold of the grid.

[0113] If the dynamic pedestrian flow data of the grid is greater than the dynamic alarm threshold of the grid, or the static pedestrian flow of the grid is greater than the static alarm threshold of the grid, then the grid is recorded as an alarm grid.

[0114] Optionally, the second acquisition module 230 specifically includes:

[0115] Alarm ants are generated based on the alarm grid, and the alarm ants are used to patrol the regional distribution map and filter out candidate grids;

[0116] The system generates traffic-diverting ants to detect road path information and real-time pedestrian flow data in each grid surrounding the candidate grid.

[0117] After the diversion detection ants have mastered the real-time pedestrian flow data, road path information and current warning threshold of the next selectable grid position of the path, the alarm ants filter out candidate grids and heuristically construct the pedestrian diversion path of the alarm grid.

[0118] When the alarm ant reaches the end of the diversion path, the end point refers to the candidate grid corresponding to the alarm grid. If the time it takes for the alarm ant to reach the end of the diversion path exceeds the maximum path time to reach the end of the diversion path, the recorded diversion path route will not be submitted. If the maximum path time is not exceeded, the alarm ant will submit the recorded diversion path route. The diversion path route constitutes the total diversion path route of this iteration.

[0119] Calculate the weight of the route of the diversion path in the total route of the diversion path;

[0120] Calculate the updated pheromone, and have the alarming ant return along the original path to release the updated pheromone;

[0121] After several iterations, all the diversion paths of the alarm grid gradually converge to the pre-set number of diversion paths to generate the optimal diversion path that satisfies the flow of people in the alarm grid. The optimal diversion path set is generated from the optimal diversion paths of the flow of people in all alarm grids.

[0122] The formula for calculating the maximum path time is as follows:

[0123]

[0124] Where T represents the maximum path time, S represents the distance from the alarm grid to the corresponding candidate grid, and V 人 This indicates the normal walking speed of a person.

[0125] Optionally, the second determining module 240 specifically includes:

[0126] The total path distance of the alarm grid is determined based on all the path distances of the alarm grid.

[0127] The optimal routing path set is determined based on the optimal routing paths of all the alarm meshes.

[0128] Optionally, module 250 is generated, including:

[0129] Generate the pedestrian diversion path for the area to be tested based on the optimal diversion path set.

[0130] In this embodiment, firstly, map data and real-time pedestrian flow data of the area to be tested are acquired. Then, a regional distribution map is constructed based on the map data and real-time pedestrian flow data. The regional distribution map is composed of grids. Next, an alarm threshold for each grid in the regional distribution map is determined. This alarm threshold includes a static alarm threshold and a dynamic alarm threshold. The static alarm threshold is determined by the maximum capacity of the grid, and the dynamic alarm threshold is the difference between the static alarm threshold and the real-time pedestrian flow data. Then, alarm grids are determined by comparing the real-time pedestrian flow data of each grid with the alarm threshold. If the real-time pedestrian flow data of a grid is greater than the alarm threshold, it is designated as an alarm grid. Finally, an ant colony algorithm is used to determine the optimal diversion path set based on the regional distribution map and the alarm grids. Finally, the pedestrian diversion paths for the area to be tested are generated based on the optimal diversion path set. This application obtains real-time pedestrian flow data by inputting real-time monitoring video into a pre-trained pedestrian flow model in step S1. The pre-trained model can be trained on a large amount of historical data, thereby improving its prediction accuracy and precision, making it a high-precision pedestrian flow monitoring method. This method can process and statistically analyze a large amount of monitoring data in a short time, achieving real-time pedestrian flow monitoring and facilitating timely understanding of the current pedestrian flow situation in the area by regional management. Step S2 divides the regional distribution map into grids. This grid division allows management to monitor changes in pedestrian flow data in each grid in real time. Matrix grids are used for most areas, while triangles or other shapes are used for irregular areas. In practical applications, many areas and scenarios are irregular, making it difficult to completely cover them with traditional rectangular grids. Using triangular or other shaped grids allows for more flexible adaptation to various irregularities, enabling detailed statistical analysis of real-time pedestrian flow in each grid. Step S3 determines the dynamic and static alarm thresholds. Setting these thresholds allows for automatic alarm activation when potential risks are detected during crowd movement, improving management's real-time monitoring and control of crowd flow, and enhancing risk warning and handling capabilities. Step S4 defines the alarm grid. By setting alarm thresholds in each grid, automatic alarm activation is possible when potential risks are detected during crowd movement, and the system automatically sends alarm messages to management, enabling timely action. Step S5 uses the ant colony algorithm to calculate the optimal diversion path. The ant colony algorithm adapts to different situations and environments, generating optimal diversion paths based on various scenarios and needs. It is particularly advantageous in situations with high crowd density and complex path topologies, such as schools. Compared to the particle swarm optimization algorithm, the ant colony algorithm uses a global search approach, traversing all possible paths during the search, effectively reducing the probability of falling into local optima.The pedestrian flow diversion path map generated in step S6 can help the management of the area under test to quickly evacuate pedestrians after the alarm grid issues an alarm message, avoid stampede accidents, and better manage the pedestrian flow in the area under test.

[0131] Figure 8 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Figure 3 The computer device 12 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0132] like Figure 8 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0133] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0134] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0135] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 3 Not shown; usually referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0136] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0137] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with computer device 12, and / or with any device that enables computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0138] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.

[0139] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0140] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0141] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0142] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0143] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0144] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method of warning of a miscarriage, characterized by, The application relates to a method for generating an optimal shunting path set of a region, comprising the following steps: S1, acquiring map data and real-time crowd flow data of a region to be measured; S2, constructing a region distribution map according to the map data and the real-time crowd flow data of the region to be measured, wherein the region distribution map is composed of grids; S3, determining an alarm threshold of each grid of the region distribution map, wherein the alarm threshold comprises a static alarm threshold and a dynamic alarm threshold, the static alarm threshold is the maximum capacity of the grid, and the dynamic alarm threshold is the difference between the static alarm threshold and the real-time crowd flow data; S4, determining an alarm grid, wherein the alarm grid is obtained by comparing and analyzing the real-time crowd flow data of the grid with the alarm threshold, and the alarm grid is recorded if the real-time crowd flow data of the grid is greater than the alarm threshold; S5, determining an optimal shunting path set according to the region distribution map and the alarm grid by using an ant colony algorithm; and S6, generating a shunting path of the crowd flow of the region to be measured according to the optimal shunting path set. The step S5 specifically comprises the following steps: S51, generating an alarm ant according to the alarm grid, wherein the alarm ant is used for patrolling the region distribution map and screening a candidate grid; S52, generating a shunting detection ant to detect road path information and real-time crowd flow data of each grid around the candidate grid; S53, after the shunting detection ant masters the real-time crowd flow data, the road path information and the current alarm threshold of the next jumpable grid position on the path, the alarm ant screens the candidate grid, and a shunting path of the crowd flow shunting of the alarm grid is constructed in a heuristic manner; S54, the alarm ant reaches the terminal point of the shunting path, wherein the terminal point refers to the candidate grid corresponding to the alarm grid, if the time when the alarm ant reaches the terminal point of the shunting path exceeds the maximum path time of reaching the terminal point of the shunting path, the recorded shunting path distance is not submitted, if the maximum path time is not exceeded, the alarm ant submits the recorded shunting path distance, and the shunting path distance constitutes the total shunting path distance of this iteration; S55, calculating the weight of the shunting path distance in the total shunting path distance; S56, calculating updated pheromones, and letting the alarm ant return along the original path to release the updated pheromones; and S57, after several iterations, all shunting paths of the alarm grid are gradually concentrated on the shunting paths of the preset shunting path quantity to generate the optimal shunting path of the crowd flow shunting of the alarm grid, and the optimal shunting path set is generated from the optimal shunting paths of the crowd flow shunting of all alarm grids. The step S1 comprises the following steps: the map data of the region to be measured comprises road path information and monitoring point information of the region to be measured; real-time monitoring videos of video monitoring equipment are acquired, and the real-time crowd flow data is obtained by inputting the real-time monitoring videos into a pre-trained crowd flow prediction model. The step S55 comprises the following steps: ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ Step S58: wherein the formula for calculating the maximum path time is: ; wherein, represents the maximum path time, represents the distance value of the alarm grid to the corresponding candidate grid, represents the normal speed of a person walking.

2. The method of claim 1, wherein, ​ ​ ​ 3. The method of claim 1, wherein, ​ The shunt path distance is represented as a distance value of the alarm ant from the alarm grid to the end point of the alarm grid shunt path, and the total shunt path distance refers to the sum of all shunt path distances of the alarm grid; The weight formula of the computing shunt path distance in the total shunt path distance is: ; wherein, represents the weight of the shunt path distance in the total shunt path distance, represents the shunt path distance, represents the total shunt path distance.

4. The method of claim 1, wherein, The step S56 comprises: The higher the pheromone content of the alarm grid shunt path, the greater the selection probability of the alarm ant on the path; According to the shunt path recorded by the alarm ant, and if after n iterations, the total path distance of the shunt path after n iterations is composed of all the shunt paths, the formula for calculating the pheromone is: ; ; wherein, represents the number of iterations completed alert ants that have passed through the shunt path after the completion of the the amount of pheromone for the shunt path, represents the amount of evaporation of pheromone, represents the amount of pheromone that needs to be released for an increase, represents the total distance of the shunt path; and is the maximum value of the weight of the shunt path distance in the total distance of the shunt path.

5. The method of claim 1, wherein, The step S57 comprises: The number of all the shunt path distances of the alarm grid is summed up as The formula for calculating the number of shunt paths that meet the shunt path is: ; ; ; wherein, represents a preset number of shunt paths, represents a weight of the number of shunt paths of the shunt path and the number of shunt path distances of all the alarm grids, represents a total shunt path distance, represents a total sum of the number of all the alarm grids, represents a maximum value of the shunt path distance of the alarm grid, represents a minimum value of the shunt path distance of the alarm grid.

6. A method of patrolling, characterized by, The method for early warning of crowd flow comprises the following steps: The patrol team member generates a patrol plan according to the alarm grid and the optimal shunt path set, and the patrol plan comprises filling in the patrol theme and selecting the alarm grid for patrol; Each alarm grid scheduled for patrol is automatically generated with a patrol task to be executed; The patrol team member executes the patrol task according to the patrol plan, the alarm grid and the optimal shunt path; When the patrol team member executes the patrol task, the patrol team member fills in the patrol sheet in a cooperative mode, and the patrol team member completes the patrol task after filling in the task sheet; It is judged whether there is a problem to be rectified in the patrol task, if not, the patrol task is archived, if there is the problem to be rectified, the rectification feedback material is uploaded; The patrol team member confirms the rectification according to the rectification feedback material, judges whether the rectification is confirmed, if not, the rectification feedback material is returned, if yes, the patrol task is archived.

7. The person flow early warning generation device corresponding to the person flow early warning method according to claim 1, characterized in that, Comprise: The first acquisition module is used for acquiring map data and real-time crowd flow data of a to-be-tested area; The first determination module is used for determining an alarm grid; The second acquisition module is used for acquiring an optimal shunt path according to the alarm grid; The second determination module is used for determining a total shunt path distance of the alarm grid, and determining an optimal shunt path set according to all optimal shunt paths of the alarm grid; The generation module is used for generating a shunt path of crowd flow of the to-be-tested area according to the optimal shunt path set.

8. An early warning device for a miscarriage, comprising a memory and a processor, wherein the memory has stored thereon a computer program capable of running on the processor, characterized in that, The processor executes the computer program to realize the steps of the method in any one of claims 1 to 5.

9. An early warning storage medium of induced abortion, having stored thereon a computer program, characterized by The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Early warning and diversion method and system for intelligent anti-crowding stamping

    CN109087478A

  • Crowd evacuation auxiliary decision-making system based on ant colony algorithm and improved social force model

    CN112862192A