An AI-based passenger flow statistics method and system based on routers, gateways, and cameras.
By running a lightweight model at the camera end for human target recognition and tracking, and combining data fusion and kernel density estimation algorithms from the edge gateway to generate dynamic heat maps, the problems of data dispersion and poor real-time performance in existing systems are solved, enabling efficient and accurate multi-dimensional crowd flow analysis and real-time alarms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN NEWLAND COMM SCI TECH
- Filing Date
- 2026-01-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing crowd monitoring systems suffer from problems such as scattered data, poor real-time performance, insufficient accuracy, idle computing power, and limited analytical dimensions, making it difficult to provide effective support for operational optimization.
Human targets are identified and tracked by running a lightweight target detection model on the camera. Combined with pedestrian re-identification technology and non-visual sensor data, individual trajectory data is generated. Time synchronization and spatial mapping are performed through routers or edge gateways. Dynamic heat maps are generated using kernel density estimation algorithms to achieve multi-dimensional analysis and real-time alarms.
It improves the real-time performance, accuracy, and multi-dimensional analysis capabilities of passenger flow statistics, makes full use of edge computing resources, reduces network latency and bandwidth consumption, provides a global view and intelligent visualization, and supports operational decision-making.
Smart Images

Figure CN122176616A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent monitoring and Internet of Things (IoT) technology, and in particular to an AI-based passenger flow statistics method and system based on routers, gateways, and cameras. Background Technology
[0002] With the deepening of smart city construction and the increasing demand for digital management in business operations, public places (such as shopping malls, scenic spots, and transportation hubs) are facing an increasingly urgent need for crowd monitoring, behavior analysis, and space utilization optimization. Traditional crowd management methods mainly rely on manual counting, infrared sensors, or playback analysis based on simple video surveillance. These methods have inherent drawbacks such as low efficiency, insufficient accuracy, poor real-time performance, and inability to provide in-depth behavioral insights. In recent years, with the development of artificial intelligence technology, some high-end venues have begun to introduce preliminary crowd recognition and quantity estimation systems based on AI cameras, which have improved the automation level of statistics to some extent. However, existing technologies still have many limitations.
[0003] First, at the data acquisition level, existing systems typically operate with each camera running independently, lacking a unified data aggregation and collaborative analysis mechanism. This results in fragmented and isolated data, making it difficult to form a comprehensive crowd flow model. Second, regarding data processing, most solutions rely on uploading raw video streams to the cloud for centralized analysis. This not only introduces high network transmission latency, affecting real-time response capabilities, but also causes a significant waste of bandwidth and storage resources. Furthermore, existing AI cameras often only support basic people counting functions, unable to accurately track individual movement trajectories, identify dwell areas and dwell time, resulting in limited analytical dimensions and difficulty in providing effective support for operational optimization. Meanwhile, although many smart cameras are equipped with dedicated AI chips (such as NPUs), these computing resources are mostly used for simple facial recognition tasks, leading to idle edge computing power. Finally, at the visualization level, existing systems lack intuitive visualization tools such as heatmaps, making it difficult for managers to quickly identify congested areas, less popular booths, or peak-hour distribution, limiting decision-making efficiency.
[0004] Therefore, how to provide an AI-based passenger flow statistics method and system based on routers, gateways, and cameras to improve the real-time performance, accuracy, multi-dimensional analysis capabilities, and edge computing resource utilization of passenger flow statistics has become an urgent technical problem to be solved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an AI passenger flow statistics method and system based on routers, gateways and cameras, so as to improve the real-time performance, accuracy, multi-dimensional analysis capabilities and edge computing resource utilization of passenger flow statistics.
[0006] In a first aspect, the present invention provides an AI-based passenger flow statistics method based on a router, gateway, and camera, comprising the following steps: Step S1: Acquire live video streams using at least one camera and input them into a lightweight target detection model running locally on the camera for detection to identify human targets; Step S2: Based on the tracking algorithm, the identified human target is tracked across frames to generate individual trajectory data containing target ID, location coordinates, and timestamp information. Pedestrian re-identification technology is used to ensure the consistency of the target ID of the individual when crossing the field of view of different cameras. Step S3: Receive individual trajectory data from multiple cameras via a router or edge gateway, synchronize the received individual trajectory data in time, and map the individual trajectory data from different perspectives to the coordinate system of a unified planar map based on a preset spatial mapping relationship to form global trajectory data. Step S4: Based on the global trajectory data, a dynamic heat map reflecting the spatial distribution density of pedestrian flow is generated using a kernel density estimation algorithm, and the dynamic heat map is overlaid and displayed on a planar map. Step S5: When the pedestrian density in the preset monitoring area of the dynamic heat map exceeds the preset density threshold, an alarm message is automatically generated and pushed, and an operation analysis report is generated based on the historical global trajectory data and the dynamic heat map.
[0007] Furthermore, in step S1, the lightweight target detection model uses PP-YOLOE-tiny to perform deduplication, image stabilization, and occlusion compensation preprocessing on each frame of the live video stream, and to identify human targets frame by frame.
[0008] Furthermore, step S2 also includes: Each of the cameras is equipped with at least one custom analysis area. Based on the individual trajectory data, the number of individuals entering and leaving the custom analysis area and the average stay time are counted to obtain passenger flow statistics. Non-visual sensor data from Wi-Fi probes or Bluetooth beacons are fused with the individual trajectory data to correct or supplement the passenger flow statistics.
[0009] Furthermore, in step S3, the individual trajectory data is uploaded to a router or edge gateway via the MQTT protocol or the HTTP protocol.
[0010] Furthermore, in step S4, the dynamic heatmap supports updating at preset time intervals and supports historical data playback and display via a timeline.
[0011] Secondly, the present invention provides an AI-based passenger flow statistics system based on a router, gateway, and camera, comprising the following modules: The human target recognition module is used to acquire live video streams through at least one camera and input them into a lightweight target detection model running locally on the camera for detection to identify human targets. The individual trajectory data generation module is used to perform cross-frame tracking of the identified human target based on the tracking algorithm, generate individual trajectory data containing target ID, location coordinates, and timestamp information, and use pedestrian re-identification technology to ensure the consistency of the target ID of the individual when crossing the field of view of different cameras; The global trajectory data generation module is used to receive individual trajectory data from multiple cameras through a router or edge gateway, synchronize the received individual trajectory data in time, and map the individual trajectory data from different perspectives to the coordinate system of a unified planar map based on a preset spatial mapping relationship to form global trajectory data. The dynamic heat map generation module is used to generate a dynamic heat map reflecting the spatial distribution density of people flow based on the global trajectory data using a kernel density estimation algorithm, and to overlay the dynamic heat map on a planar map. The passenger flow monitoring module is used to automatically generate and push alarm information when the passenger flow density in the preset monitoring area of the dynamic heat map exceeds the preset density threshold, and to generate an operation analysis report based on the historical global trajectory data and the dynamic heat map.
[0012] Furthermore, in the human target recognition module, the lightweight target detection model adopts PP-YOLOE-tiny, which is used to perform deduplication, anti-shake, and occlusion compensation preprocessing on each frame of the live video stream in sequence, and to identify human targets frame by frame.
[0013] Furthermore, the individual trajectory data generation module is also used for: Each of the cameras is equipped with at least one custom analysis area. Based on the individual trajectory data, the number of individuals entering and leaving the custom analysis area and the average stay time are counted to obtain passenger flow statistics. Non-visual sensor data from Wi-Fi probes or Bluetooth beacons are fused with the individual trajectory data to correct or supplement the passenger flow statistics.
[0014] Furthermore, in the global trajectory data generation module, the individual trajectory data is uploaded to a router or edge gateway via the MQTT protocol or the HTTP protocol.
[0015] Furthermore, in the dynamic heatmap generation module, the dynamic heatmap supports updating at preset time intervals and supports historical data playback and display via a timeline.
[0016] The advantages of this invention are: 1. The system collects live video streams from cameras and inputs them into a locally running lightweight target detection model to identify human targets. Then, based on a tracking algorithm, it performs cross-frame tracking of human targets, generating individual trajectory data containing target ID, location coordinates, and timestamp information. Pedestrian re-identification technology is used to ensure the consistency of target IDs across different camera views. Next, it receives individual trajectory data from multiple cameras via a router or edge gateway, synchronizes the trajectory data across all cameras, and maps the individual trajectory data from different perspectives to a unified coordinate system on a planar map based on a preset spatial mapping relationship, forming global trajectory data. Then, based on the global trajectory data, a kernel density estimation algorithm is used to generate a dynamic heatmap reflecting the spatial distribution density of pedestrian flow, which is then overlaid on the planar map. When the pedestrian density in a preset monitoring area in the dynamic heatmap exceeds a preset density threshold, an alarm is automatically generated and pushed. An operational analysis report is generated based on historical global trajectory data and the dynamic heatmap. In short, by constructing an "edge-end" collaborative intelligent architecture, computational tasks are rationally allocated, thereby systematically improving various indicators of passenger flow statistics. The system utilizes a lightweight target detection model running on the camera end to directly process the live video stream, generating structured individual trajectory data. This significantly reduces the amount of data that needs to be transmitted and allows for efficient uploading to routers or edge gateways using specific protocols. This greatly improves real-time performance and reduces bandwidth consumption. On the edge side, routers or edge gateways perform time synchronization and spatial mapping fusion of multiple individual trajectory data streams to form global trajectory data. By using pedestrian re-identification technology and cross-validating with non-visual sensor data, the system effectively ensures consistency in cross-camera tracking and target IDs, significantly improving statistical accuracy. Based on the global trajectory data, dynamic heatmaps are generated through kernel density estimation, supporting regional behavior analysis. This enables in-depth insights from simple counting to spatial distribution, flow trends, and dwell time. Ultimately, by allowing edge devices to perform their respective functions—cameras focusing on target detection and tracking, and routers or edge gateways handling data fusion and complex analysis—edge computing resources are fully explored and utilized efficiently, avoiding idle computing power and cloud dependence. This significantly improves the real-time performance, accuracy, multi-dimensional analysis capabilities, and edge computing resource utilization of passenger flow statistics.
[0017] 2. By running a lightweight target detection model (such as PP-YOLOE-tiny) locally on the camera, preprocessing and target detection of the live video stream are performed, reducing the bandwidth requirements for data upload to the cloud and lowering network latency. This edge computing approach enables near real-time processing of passenger flow statistics, which is particularly suitable for high-concurrency scenarios such as shopping malls or stations, thereby improving the system's response speed and overall efficiency and avoiding the latency issues that may be caused by traditional cloud processing.
[0018] 3. By utilizing tracking algorithms and pedestrian re-identification technology, human targets across the camera's field of view are continuously tracked to ensure the consistency of individual IDs and reduce the risk of duplicate counting or missed detection. In addition, by integrating non-visual sensor data such as Wi-Fi probes or Bluetooth beacons, visual statistical results can be corrected or supplemented, improving the accuracy and robustness of passenger flow data, especially in complex environments such as occlusion or changes in lighting.
[0019] 4. By receiving individual trajectory data from multiple cameras through routers or edge gateways and performing time synchronization and spatial mapping to a unified planar map coordinate system, the data fragmentation problem caused by multiple perspectives is eliminated. This method provides a comprehensive global view, enabling operators to intuitively grasp the dynamic flow of people in large areas, avoiding the blind spot limitations of traditional single-camera systems, and improving the coverage and collaborative capabilities of monitoring.
[0020] 5. A dynamic heat map is generated using a kernel density estimation algorithm, and it supports updates at preset time intervals and historical playback via a time axis, making passenger flow data visualization more intuitive and interactive. This not only facilitates real-time monitoring but also supports post-event analysis, such as identifying peak periods or passenger flow trends, providing data support for operational decisions and enhancing the system's practicality and user experience.
[0021] 6. When the pedestrian density in the preset monitoring area exceeds the threshold, an alarm message is automatically generated and pushed. At the same time, an operation analysis report is generated based on historical data. This automation function reduces the need for manual inspection and improves operational efficiency and safety level. For example, in emergency evacuation or capacity management scenarios, it can trigger response measures in a timely manner and reduce risks.
[0022] 7. Supports customizable analysis areas and allows fusion with non-visual sensor data, enabling it to flexibly adapt to different application scenarios, such as retail, transportation, or security. It uses standard protocols such as MQTT or HTTP for data transmission, ensuring system compatibility and scalability, facilitating the integration of new devices or functions in the future, and reducing deployment and maintenance costs.
[0023] 8. By combining edge computing, multi-source data fusion, and intelligent algorithms, efficient and accurate passenger flow statistics are achieved. Its advantages include: improving processing efficiency and real-time performance by running lightweight models locally on cameras, reducing bandwidth requirements; enhancing data accuracy and reliability by utilizing tracking algorithms and sensor data fusion; achieving comprehensive monitoring through unified global trajectory data mapping; supporting intelligent visualization and analysis with the help of dynamic heatmaps and historical playback functions; optimizing operational decisions through automated alarm and report generation; and the solution is flexible and scalable, easily adaptable to different scenarios, improving the overall system's practicality and market competitiveness. Attached Figure Description
[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0025] Figure 1 This is a flowchart of an AI-based passenger flow statistics method based on a router, gateway, and camera, according to the present invention.
[0026] Figure 2 This is a schematic diagram of the structure of an AI passenger flow statistics system based on a router, gateway, and camera according to the present invention. Detailed Implementation
[0027] The overall approach of the technical solution in this application is as follows: A lightweight target detection model is run at the camera end to directly process the live video stream, generating structured individual trajectory data, significantly reducing the amount of data to be transmitted, and efficiently uploading it to the router or edge gateway using a specific protocol, greatly improving real-time performance and reducing bandwidth consumption; At the edge, the router or edge gateway performs time synchronization and spatial mapping fusion on multiple individual trajectory data to form global trajectory data, and uses pedestrian re-identification technology and non-visual sensor data for cross-validation to effectively ensure the consistency of cross-camera tracking and target ID, significantly improving statistical accuracy; Based on the global trajectory data, a dynamic heat map is further generated through kernel density estimation and supports regional behavior analysis, realizing in-depth insights from simple counting to spatial distribution, flow trends, dwell time, and other dimensions; Finally, by allowing edge devices to perform their respective functions, edge computing resources are fully explored and utilized efficiently, avoiding idle computing power and cloud dependence.
[0028] Please refer to Figures 1 to 2 As shown, a preferred embodiment of the AI-based passenger flow statistics method based on a router, gateway, and camera of the present invention includes the following steps: Step S1: Acquire live video streams via RTSP protocol using at least one camera (such as an IP camera, PTZ camera, wide-angle camera, etc., supporting 1080P and above resolution input) and input them into a lightweight target detection model running locally on the camera for detection to identify human targets; In specific implementation, adaptive background modeling technology is introduced to effectively cope with interference factors such as changes in lighting and rain / snow weather; This step involves capturing live video streams via cameras (such as IP cameras) and performing real-time detection using a locally running lightweight object detection model (such as PP-YOLOE-tiny). The choice of a lightweight model is based on the computational resource limitations of edge devices. PP-YOLOE-tiny, as an optimized version of the YOLO series, reduces the number of parameters while maintaining high accuracy, making it suitable for deployment at the camera end and avoiding latency associated with cloud transmission. Preprocessing operations (such as deduplication, image stabilization, and occlusion compensation) improve detection stability. For example, deduplication eliminates duplicate targets in adjacent frames, image stabilization reduces jitter interference through image stabilization techniques, and occlusion compensation uses interpolation algorithms to handle brief occlusions. The core advantage of this step is that it offloads computational tasks to the edge, reducing bandwidth consumption and improving real-time performance.
[0029] Step S2: Based on the tracking algorithm (SORT / DeepSORT algorithm), the identified human target is tracked across frames to generate individual trajectory data (JSON format) containing target ID, location coordinates, and timestamp information. Pedestrian re-identification technology (ReID technology) is used to ensure the consistency of the target ID of the individual across the field of view of different cameras. The individual trajectory data is transmitted by outputting it, avoiding the transmission of the original live video stream and effectively improving the transmission speed. Based on tracking algorithms (such as SORT / DeepSORT), identified human targets are tracked across frames to generate individual trajectory data containing target ID, location coordinates, and timestamps. Person re-identification (ReID) technology is crucial in this step. Through feature extraction and matching, it ensures the consistency of target IDs across different camera fields of view, avoiding duplicate counting or missed detections. For example, ReID might use deep metric learning to compare pedestrian appearance features from different cameras. Furthermore, this step supports setting custom analysis areas (such as store entrances) to count the number of people entering and exiting and average dwell time, providing multi-dimensional customer flow analysis. The fusion of non-visual sensor data (such as Wi-Fi probes or Bluetooth beacons) further enhances accuracy; for example, MAC address matching supplements visual data, correcting statistical results in low-light or occluded scenarios.
[0030] Step S3: Receive individual trajectory data from multiple cameras via a router or edge gateway, synchronize the received individual trajectory data in time, and map the individual trajectory data from different perspectives to a unified coordinate system of a planar map (such as a shopping mall floor plan) based on a preset spatial mapping relationship to form global trajectory data. After receiving individual trajectory data from multiple cameras, the router or edge gateway first performs time synchronization (e.g., aligning timestamps using the NTP protocol). Then, based on a preset spatial mapping relationship (such as perspective transformation or a homography matrix), it maps the trajectory data from different perspectives to a unified planar map coordinate system. This step solves the problem of multi-camera data fragmentation, forming a global perspective. Data upload uses MQTT or HTTP protocols to ensure efficient transmission; in the event of network interruption, a local caching mechanism prevents data loss. This implementation highlights the synergy of edge computing and avoids the bottleneck of centralized processing in the cloud.
[0031] Step S4: Based on the global trajectory data, a dynamic heat map reflecting the spatial distribution density of people is generated using the kernel density estimation algorithm (KDE) (the color intensity indicates the density of people per unit area), and the dynamic heat map is overlaid and displayed on a planar map. Based on global trajectory data, a dynamic heatmap is generated using the kernel density estimation (KDE) algorithm to reflect the spatial distribution density of pedestrian traffic. KDE calculates the density value of each area using a smoothing function (such as a Gaussian kernel), and the color intensity visually represents the degree of pedestrian density. The heatmap supports updates at preset time intervals (such as every 5 minutes) and allows for historical playback via a timeline, facilitating the analysis of peak periods or trends. For example, in shopping mall applications, the heatmap can be overlaid with sales data to correlate pedestrian traffic with promotional effectiveness, enhancing the depth of operational decision-making.
[0032] Step S5: When the pedestrian density in the preset monitoring area of the dynamic heat map exceeds the preset density threshold, an alarm message is automatically generated and pushed, and an operation analysis report is generated based on the historical global trajectory data and the dynamic heat map.
[0033] This step automates monitoring. When the pedestrian density in a preset area (such as a safety passage) exceeds a threshold, the system automatically generates alarm information (such as SMS or email notifications) and produces an operational analysis report (such as "B-passage congestion analysis") based on historical data. The report may include traffic trends, hotspot rankings, etc., and supports PDF or visual dashboard output. This step demonstrates the intelligence of the invention, reduces manual intervention, and improves public safety and management efficiency.
[0034] In practice, a visual dashboard is provided to display key indicators such as total foot traffic, peak hours, and ranking of hot spots in real time; the dynamic heat map supports zooming, dragging, and timeline playback; and the operation analysis report includes, for example, "The average daily stay in exhibition area A is only 30 seconds, and it is recommended to adjust the display location" or "Aisle B has been congested for three consecutive days, and additional directional signs are needed."
[0035] In step S1, the lightweight target detection model uses PP-YOLOE-tiny to perform deduplication, anti-shake, and occlusion compensation preprocessing on each frame of the live video stream to improve detection stability and identify human targets frame by frame.
[0036] Step S2 further includes: Each of the cameras is equipped with at least one custom analysis area (such as store entrance, in front of the booth, or rest area). Based on the individual trajectory data, the number of individuals entering and leaving the custom analysis area and the average stay time are counted to obtain customer flow statistics. In specific implementation, the customer flow statistics also include the frequency of entry and exit. Non-visual sensor data from Wi-Fi probes or Bluetooth beacons are fused with the individual trajectory data to correct or supplement the passenger flow statistics.
[0037] In step S3, the individual trajectory data is uploaded to a router or edge gateway via the MQTT or HTTP protocol. When the network is interrupted, the data is cached locally and automatically synchronized after the network is restored.
[0038] In step S4, the dynamic heatmap supports updates at preset time intervals and supports historical data playback and display via a timeline. In specific implementations, it supports overlaying sales data and promotional activity tags for correlation analysis.
[0039] A preferred embodiment of the AI passenger flow statistics system based on a router, gateway, and camera of the present invention includes the following modules: The human target recognition module is used to acquire live video streams via the RTSP protocol through at least one camera (such as an IP camera, PTZ camera, wide-angle camera, etc., supporting 1080P and above resolution input) and input them into a lightweight target detection model running locally on the camera for detection to identify human targets; in specific implementation, adaptive background modeling technology is introduced to effectively cope with interference factors such as changes in lighting and rain and snow. This step involves capturing live video streams via cameras (such as IP cameras) and performing real-time detection using a locally running lightweight object detection model (such as PP-YOLOE-tiny). The choice of a lightweight model is based on the computational resource limitations of edge devices. PP-YOLOE-tiny, as an optimized version of the YOLO series, reduces the number of parameters while maintaining high accuracy, making it suitable for deployment at the camera end and avoiding latency associated with cloud transmission. Preprocessing operations (such as deduplication, image stabilization, and occlusion compensation) improve detection stability. For example, deduplication eliminates duplicate targets in adjacent frames, image stabilization reduces jitter interference through image stabilization techniques, and occlusion compensation uses interpolation algorithms to handle brief occlusions. The core advantage of this step is that it offloads computational tasks to the edge, reducing bandwidth consumption and improving real-time performance.
[0040] The individual trajectory data generation module is used to perform cross-frame tracking of the identified human target based on the tracking algorithm (SORT / DeepSORT algorithm), generate individual trajectory data (JSON format) containing target ID, location coordinates, and timestamp information, and use pedestrian re-identification technology (ReID technology) to ensure the consistency of the target ID of the individual across the field of view of different cameras; by outputting individual trajectory data for transmission, the original live video stream is avoided, effectively improving the transmission speed; Based on tracking algorithms (such as SORT / DeepSORT), identified human targets are tracked across frames to generate individual trajectory data containing target ID, location coordinates, and timestamps. Person re-identification (ReID) technology is crucial in this step. Through feature extraction and matching, it ensures the consistency of target IDs across different camera fields of view, avoiding duplicate counting or missed detections. For example, ReID might use deep metric learning to compare pedestrian appearance features from different cameras. Furthermore, this step supports setting custom analysis areas (such as store entrances) to count the number of people entering and exiting and average dwell time, providing multi-dimensional customer flow analysis. The fusion of non-visual sensor data (such as Wi-Fi probes or Bluetooth beacons) further enhances accuracy; for example, MAC address matching supplements visual data, correcting statistical results in low-light or occluded scenarios.
[0041] The global trajectory data generation module is used to receive individual trajectory data from multiple cameras through a router or edge gateway, synchronize the received individual trajectory data in time, and map the individual trajectory data from different perspectives to the coordinate system of a unified planar map (such as a shopping mall floor plan) based on a preset spatial mapping relationship to form global trajectory data. After receiving individual trajectory data from multiple cameras, the router or edge gateway first performs time synchronization (e.g., aligning timestamps using the NTP protocol). Then, based on a preset spatial mapping relationship (such as perspective transformation or a homography matrix), it maps the trajectory data from different perspectives to a unified planar map coordinate system. This step solves the problem of multi-camera data fragmentation, forming a global perspective. Data upload uses MQTT or HTTP protocols to ensure efficient transmission; in the event of network interruption, a local caching mechanism prevents data loss. This implementation highlights the synergy of edge computing and avoids the bottleneck of centralized processing in the cloud.
[0042] The dynamic heat map generation module is used to generate a dynamic heat map reflecting the spatial distribution density of people based on the global trajectory data using the kernel density estimation algorithm (KDE) (the color intensity indicates the density of people per unit area), and to overlay the dynamic heat map on a planar map. Based on global trajectory data, a dynamic heatmap is generated using the kernel density estimation (KDE) algorithm to reflect the spatial distribution density of pedestrian traffic. KDE calculates the density value of each area using a smoothing function (such as a Gaussian kernel), and the color intensity visually represents the degree of pedestrian density. The heatmap supports updates at preset time intervals (such as every 5 minutes) and allows for historical playback via a timeline, facilitating the analysis of peak periods or trends. For example, in shopping mall applications, the heatmap can be overlaid with sales data to correlate pedestrian traffic with promotional effectiveness, enhancing the depth of operational decision-making.
[0043] The passenger flow monitoring module is used to automatically generate and push alarm information when the passenger flow density in the preset monitoring area of the dynamic heat map exceeds the preset density threshold, and to generate an operation analysis report based on the historical global trajectory data and the dynamic heat map.
[0044] This step automates monitoring. When the pedestrian density in a preset area (such as a safety passage) exceeds a threshold, the system automatically generates alarm information (such as SMS or email notifications) and produces an operational analysis report (such as "B-passage congestion analysis") based on historical data. The report may include traffic trends, hotspot rankings, etc., and supports PDF or visual dashboard output. This step demonstrates the intelligence of the invention, reduces manual intervention, and improves public safety and management efficiency.
[0045] In practice, a visual dashboard is provided to display key indicators such as total foot traffic, peak hours, and ranking of hot spots in real time; the dynamic heat map supports zooming, dragging, and timeline playback; and the operation analysis report includes, for example, "The average daily stay in exhibition area A is only 30 seconds, and it is recommended to adjust the display location" or "Aisle B has been congested for three consecutive days, and additional directional signs are needed."
[0046] In the human target recognition module, the lightweight target detection model adopts PP-YOLOE-tiny, which is used to perform deduplication, anti-shake, and occlusion compensation preprocessing on each frame of the live video stream in sequence to improve detection stability and identify human targets frame by frame.
[0047] The individual trajectory data generation module is also used for: Each of the cameras is equipped with at least one custom analysis area (such as store entrance, in front of the booth, or rest area). Based on the individual trajectory data, the number of individuals entering and leaving the custom analysis area and the average stay time are counted to obtain customer flow statistics. In specific implementation, the customer flow statistics also include the frequency of entry and exit. Non-visual sensor data from Wi-Fi probes or Bluetooth beacons are fused with the individual trajectory data to correct or supplement the passenger flow statistics.
[0048] In the global trajectory data generation module, the individual trajectory data is uploaded to the router or edge gateway via the MQTT or HTTP protocol. When the network is interrupted, the data is cached locally and automatically synchronized after the network is restored.
[0049] The dynamic heatmap generation module supports updating the heatmap at preset time intervals and allows for historical data playback and display via a timeline. In practice, it supports overlaying sales data and promotional activity tags for correlation analysis.
[0050] In summary, the advantages of this invention are: 1. The system collects live video streams from cameras and inputs them into a locally running lightweight target detection model to identify human targets. Then, based on a tracking algorithm, it performs cross-frame tracking of human targets, generating individual trajectory data containing target ID, location coordinates, and timestamp information. Pedestrian re-identification technology is used to ensure the consistency of target IDs across different camera views. Next, it receives individual trajectory data from multiple cameras via a router or edge gateway, synchronizes the trajectory data across all cameras, and maps the individual trajectory data from different perspectives to a unified coordinate system on a planar map based on a preset spatial mapping relationship, forming global trajectory data. Then, based on the global trajectory data, a kernel density estimation algorithm is used to generate a dynamic heatmap reflecting the spatial distribution density of pedestrian flow, which is then overlaid on the planar map. When the pedestrian density in a preset monitoring area in the dynamic heatmap exceeds a preset density threshold, an alarm is automatically generated and pushed. An operational analysis report is generated based on historical global trajectory data and the dynamic heatmap. In short, by constructing an "edge-end" collaborative intelligent architecture, computational tasks are rationally allocated, thereby systematically improving various indicators of passenger flow statistics. The system utilizes a lightweight target detection model running on the camera end to directly process the live video stream, generating structured individual trajectory data. This significantly reduces the amount of data that needs to be transmitted and allows for efficient uploading to routers or edge gateways using specific protocols. This greatly improves real-time performance and reduces bandwidth consumption. On the edge side, routers or edge gateways perform time synchronization and spatial mapping fusion of multiple individual trajectory data streams to form global trajectory data. By using pedestrian re-identification technology and cross-validating with non-visual sensor data, the system effectively ensures consistency in cross-camera tracking and target IDs, significantly improving statistical accuracy. Based on the global trajectory data, dynamic heatmaps are generated through kernel density estimation, supporting regional behavior analysis. This enables in-depth insights from simple counting to spatial distribution, flow trends, and dwell time. Ultimately, by allowing edge devices to perform their respective functions—cameras focusing on target detection and tracking, and routers or edge gateways handling data fusion and complex analysis—edge computing resources are fully explored and utilized efficiently, avoiding idle computing power and cloud dependence. This significantly improves the real-time performance, accuracy, multi-dimensional analysis capabilities, and edge computing resource utilization of passenger flow statistics.
[0051] 2. By running a lightweight target detection model (such as PP-YOLOE-tiny) locally on the camera, preprocessing and target detection of the live video stream are performed, reducing the bandwidth requirements for data upload to the cloud and lowering network latency. This edge computing approach enables near real-time processing of passenger flow statistics, which is particularly suitable for high-concurrency scenarios such as shopping malls or stations, thereby improving the system's response speed and overall efficiency and avoiding the latency issues that may be caused by traditional cloud processing.
[0052] 3. By utilizing tracking algorithms and pedestrian re-identification technology, human targets across the camera's field of view are continuously tracked to ensure the consistency of individual IDs and reduce the risk of duplicate counting or missed detection. In addition, by integrating non-visual sensor data such as Wi-Fi probes or Bluetooth beacons, visual statistical results can be corrected or supplemented, improving the accuracy and robustness of passenger flow data, especially in complex environments such as occlusion or changes in lighting.
[0053] 4. By receiving individual trajectory data from multiple cameras through routers or edge gateways and performing time synchronization and spatial mapping to a unified planar map coordinate system, the data fragmentation problem caused by multiple perspectives is eliminated. This method provides a comprehensive global view, enabling operators to intuitively grasp the dynamic flow of people in large areas, avoiding the blind spot limitations of traditional single-camera systems, and improving the coverage and collaborative capabilities of monitoring.
[0054] 5. A dynamic heat map is generated using a kernel density estimation algorithm, and it supports updates at preset time intervals and historical playback via a time axis, making passenger flow data visualization more intuitive and interactive. This not only facilitates real-time monitoring but also supports post-event analysis, such as identifying peak periods or passenger flow trends, providing data support for operational decisions and enhancing the system's practicality and user experience.
[0055] 6. When the pedestrian density in the preset monitoring area exceeds the threshold, an alarm message is automatically generated and pushed. At the same time, an operation analysis report is generated based on historical data. This automation function reduces the need for manual inspection and improves operational efficiency and safety level. For example, in emergency evacuation or capacity management scenarios, it can trigger response measures in a timely manner and reduce risks.
[0056] 7. Supports customizable analysis areas and allows fusion with non-visual sensor data, enabling it to flexibly adapt to different application scenarios, such as retail, transportation, or security. It uses standard protocols such as MQTT or HTTP for data transmission, ensuring system compatibility and scalability, facilitating the integration of new devices or functions in the future, and reducing deployment and maintenance costs.
[0057] 8. By combining edge computing, multi-source data fusion, and intelligent algorithms, efficient and accurate passenger flow statistics are achieved. Its advantages include: improving processing efficiency and real-time performance by running lightweight models locally on cameras, reducing bandwidth requirements; enhancing data accuracy and reliability by utilizing tracking algorithms and sensor data fusion; achieving comprehensive monitoring through unified global trajectory data mapping; supporting intelligent visualization and analysis with the help of dynamic heatmaps and historical playback functions; optimizing operational decisions through automated alarm and report generation; and the solution is flexible and scalable, easily adaptable to different scenarios, improving the overall system's practicality and market competitiveness.
[0058] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An AI-based passenger flow statistics method based on routers, gateways, and cameras, characterized in that: Includes the following steps: Step S1: Acquire live video streams using at least one camera and input them into a lightweight target detection model running locally on the camera for detection to identify human targets; Step S2: Based on the tracking algorithm, the identified human target is tracked across frames to generate individual trajectory data containing target ID, location coordinates, and timestamp information. Pedestrian re-identification technology is used to ensure the consistency of the target ID of the individual when crossing the field of view of different cameras. Step S3: Receive individual trajectory data from multiple cameras via a router or edge gateway, synchronize the received individual trajectory data in time, and map the individual trajectory data from different perspectives to the coordinate system of a unified planar map based on a preset spatial mapping relationship to form global trajectory data. Step S4: Based on the global trajectory data, a dynamic heat map reflecting the spatial distribution density of pedestrian flow is generated using a kernel density estimation algorithm, and the dynamic heat map is overlaid and displayed on a planar map. Step S5: When the pedestrian density in the preset monitoring area of the dynamic heat map exceeds the preset density threshold, an alarm message is automatically generated and pushed, and an operation analysis report is generated based on the historical global trajectory data and the dynamic heat map.
2. The AI-based passenger flow statistics method based on routers, gateways, and cameras as described in claim 1, characterized in that: In step S1, the lightweight target detection model uses PP-YOLOE-tiny to perform deduplication, anti-shake, and occlusion compensation preprocessing on each frame of the live video stream, and to identify human targets frame by frame.
3. The AI-based passenger flow statistics method based on routers, gateways, and cameras as described in claim 1, characterized in that: Step S2 further includes: Each of the cameras is equipped with at least one custom analysis area. Based on the individual trajectory data, the number of individuals entering and leaving the custom analysis area and the average stay time are counted to obtain passenger flow statistics. Non-visual sensor data from Wi-Fi probes or Bluetooth beacons are fused with the individual trajectory data to correct or supplement the passenger flow statistics.
4. The AI-based passenger flow statistics method based on routers, gateways, and cameras as described in claim 1, characterized in that: In step S3, the individual trajectory data is uploaded to a router or edge gateway via the MQTT or HTTP protocol.
5. The AI-based passenger flow statistics method based on routers, gateways, and cameras as described in claim 1, characterized in that: In step S4, the dynamic heat map supports updating at preset time intervals and supports historical data playback and display via a time axis.
6. An AI-based passenger flow statistics system based on routers, gateways, and cameras, characterized in that: Includes the following modules: The human target recognition module is used to acquire live video streams through at least one camera and input them into a lightweight target detection model running locally on the camera for detection to identify human targets. The individual trajectory data generation module is used to perform cross-frame tracking of the identified human target based on the tracking algorithm, generate individual trajectory data containing target ID, location coordinates, and timestamp information, and use pedestrian re-identification technology to ensure the consistency of the target ID of the individual when crossing the field of view of different cameras; The global trajectory data generation module is used to receive individual trajectory data from multiple cameras through a router or edge gateway, synchronize the received individual trajectory data in time, and map the individual trajectory data from different perspectives to the coordinate system of a unified planar map based on a preset spatial mapping relationship to form global trajectory data. The dynamic heat map generation module is used to generate a dynamic heat map reflecting the spatial distribution density of people flow based on the global trajectory data using a kernel density estimation algorithm, and to overlay the dynamic heat map on a planar map. The passenger flow monitoring module is used to automatically generate and push alarm information when the passenger flow density in the preset monitoring area of the dynamic heat map exceeds the preset density threshold, and to generate an operation analysis report based on the historical global trajectory data and the dynamic heat map.
7. The AI passenger flow statistics system based on a router, gateway, and camera as described in claim 6, characterized in that: In the human target recognition module, the lightweight target detection model adopts PP-YOLOE-tiny, which is used to perform deduplication, anti-shake, and occlusion compensation preprocessing on each frame of the live video stream in sequence, and to identify human targets frame by frame.
8. The AI passenger flow statistics system based on a router, gateway, and camera as described in claim 6, characterized in that: The individual trajectory data generation module is also used for: Each of the cameras is equipped with at least one custom analysis area. Based on the individual trajectory data, the number of individuals entering and leaving the custom analysis area and the average stay time are counted to obtain passenger flow statistics. Non-visual sensor data from Wi-Fi probes or Bluetooth beacons are fused with the individual trajectory data to correct or supplement the passenger flow statistics.
9. The AI passenger flow statistics system based on a router, gateway, and camera as described in claim 6, characterized in that: In the global trajectory data generation module, the individual trajectory data is uploaded to the router or edge gateway via the MQTT protocol or the HTTP protocol.
10. The AI passenger flow statistics system based on a router, gateway, and camera as described in claim 6, characterized in that: In the dynamic heatmap generation module, the dynamic heatmap supports updating at preset time intervals and supports historical data playback and display via a time axis.