Method and system for estimating number of people in multi-connected space in real time
By constructing a directional connection relationship diagram in a multi-connected space, identifying and tracking personnel trajectories, the problem of the inability to monitor the flow of people in the multi-connected space in real time in the prior art is solved, and efficient and accurate personnel flow management is achieved.
Patent Information
- Application Number
- CN202510536425.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-15
AI Technical Summary
The prior art cannot conduct real-time monitoring and estimation of the movement of people between multiple connected spaces, especially in emergency rescue, public safety management and industrial scenarios, where monitoring equipment blind spots exist.
By constructing a mathematical model, the target area is divided into space and channels, a directed connection relationship diagram is established, the target personnel and their trajectory are identified, the spatial number is updated in real time using the target detection and multi-object tracking algorithm, and the number of people is counted in combination with the graph theory algorithm and event-driven method.
Real-time monitoring and accurate estimation of the flow of people in multiple connected spaces is realized, monitoring accuracy and efficiency in complex scenarios is improved, and is suitable for emergency rescue, public safety management and industrial safety control.
Smart Images

Figure CN120495977A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent monitoring technology, and in particular to a method and system for real-time number estimation in multi-connected spaces. Background Art
[0002] In emergency rescue scenarios, public safety management, and industrial scenarios where there is a risk of equipment startup, it is usually necessary to accurately control the number of people in each connected space within the scene to accurately grasp the dynamics of personnel.
[0003] Traditional headcount estimation methods and systems only offer single-space counting capabilities. These systems rely on monitoring devices deployed within a single space to monitor and estimate the number of people within it. This limitation limits the monitoring of a single space and prevents accurate identification of people in blind spots. Therefore, this approach is not suitable for real-time monitoring and estimation of human movement across multiple connected spaces.
[0004] In view of this, it is an urgent problem to provide a real-time number estimation method and system for multiple connected spaces to ensure the real-time monitoring and estimation of the flow of people between multiple connected spaces in complex scenarios. Summary of the Invention
[0005] Based on the above analysis, the main purpose of the present invention is to provide a method and system for real-time population estimation in multiple connected spaces, so as to solve the problem that the existing technology cannot monitor and estimate the flow of people between multiple connected spaces in real time.
[0006] To this end, the present invention provides a real-time number estimation method for multiple connected spaces, comprising the following steps: a. constructing a mathematical model based on a target area; b. dividing at least two spaces in the mathematical model, and dividing the area connecting the two spaces into channels, setting the direction attributes of the channels, and constructing a directed connectivity relationship graph using the spaces and the channels; c. identifying target personnel passing through all channels and their travel trajectories, and counting the real-time number of people in each space according to the directed connectivity relationship graph.
[0007] Preferably, step b includes: obtaining all units in the target area, and dividing the units into the space or the channel according to the division conditions; the division conditions include: if the unit to be divided has the unit directly connected to it and has independent physical isolation, the unit to be divided is divided into the space; if the unit to be divided has at least three units directly connected to it and has no independent physical isolation, the unit to be divided is divided into the space; if the unit to be divided is directly connected to only the other two units and has no independent physical isolation, the unit to be divided is divided into the channel.
[0008] Preferably, the target personnel and their travel trajectories corresponding to the channel are judged at the intersection with the virtual counting line based on the trained cross-line judgment algorithm to obtain a timestamp and an intersection judgment result; the number of people in each space in the directed connectivity diagram is updated in real time based on the intersection judgment results of all target personnel and the corresponding timestamps.
[0009] Preferably, the process of real-time identification of the target person passing through the corresponding channel and his / her moving trajectory includes: based on the target detection algorithm, obtaining the target features associated with the identity of the target person in real time, and determining the initial position of the target person; based on the multi-target tracking algorithm, continuously obtaining the continuous moving position of the target person according to the identity of the target person and the initial position, and generating the moving trajectory corresponding to the target person.
[0010] As a further preferred embodiment, the execution process of the line crossing judgment algorithm includes: Passing through the channel at the moment Target personnel , identify its trajectory , and based on the crossing line condition, the travel trajectory With the channel Corresponding virtual counting line Perform intersection determination; if the cross-line conditions are met, obtain the intersection determination result : ;in, Indicates the target person The unit step length changes when the target person from Enter +1 when leaving, −1 when leaving; and Respectively represent the channels Two spaces directly connected; based on The intersection determination result is obtained at the moment The corresponding timestamp.
[0011] As a further preferred embodiment, the step c further includes: based on event-driven, establishing an event for the single intersection determination behavior, associating All events under the event record event information; wherein, the event information includes: the space, the channel, the target person and the intersection judgment result corresponding to the event; based on the graph theory algorithm, according to the event information statistics The number of people flowing out of the space and the number of people flowing into the corresponding space are calculated, and the number of people in each space in the directed connectivity graph is updated.
[0012] Preferably, the process of updating the number of people in each space in the directed connectivity graph includes: setting For space exist The total number of people at the time is: ;in, Indicates that from the space Adjacent space Flowing into the space Number of people, Indicates that from the space Flow out to adjacent space number of people.
[0013] As a further preferred embodiment, it also includes step d: establishing a timeline for the intersection judgment result based on the timestamp, and continuously detecting the directed connectivity graph, and recording the abnormality detection result at the current moment; the abnormality detection result triggers a timeline backtracking, and adjusts the number of people in each space in the directed connectivity graph based on the intersection judgment result closest to the current moment on the timeline; if the number of people corresponding to the target space is a negative number or the increment of the number of people corresponding to the space at the same moment exceeds the preset number, then the target space is abnormal at the current moment.
[0014] The multi-connected space real-time number estimation system provided by the present invention includes: a data processing unit, used to construct a mathematical model based on a target area, divide the mathematical model into at least two spaces, and divide the area connecting the two spaces into channels, and construct a directed connectivity relationship graph using the spaces and the channels; a counting device, used to identify target personnel passing through the corresponding channel in real time, determine their travel trajectory based on the target personnel, and count the real-time number of people in each space according to the directed connectivity relationship graph.
[0015] Preferably, it also includes: a display terminal for displaying and detecting the directed connectivity graph in real time, and issuing an alarm based on the abnormality detection result of the directed connectivity graph; working equipment, deployed in part of the space, for performing work corresponding to the space; a safety control device for performing abnormality detection on the directed connectivity graph in real time, and confirming whether the number of people in the corresponding space is cleared before the working equipment is started. If not, the working equipment is prevented from starting and a warning is issued.
[0016] The method and system for real-time number estimation in multi-connected spaces of the present invention have the following beneficial effects: First, unlike traditional solutions that rely on counting the number of people in a single spatial area, the present invention divides spaces and channels, sets directional attributes for the channels, and establishes a directed connectivity graph based on the connectivity between spaces and channels to describe the number of people in the space and the flow direction of target personnel; it identifies people passing through all channels in real time, and associates the changes in the number of people in the spaces corresponding to the channels through the directed connectivity graph, thereby realizing real-time monitoring of the flow of people between various spaces in complex scenarios, and achieving accurate estimation of the number of people in each space.
[0017] Secondly, unlike traditional solutions that cannot accurately identify people in blind spots of monitoring equipment, the present invention identifies target personnel in all channels and obtains the movement trajectory of target personnel, thereby achieving accurate identification of each target person passing through the channel and their movement direction, thereby obtaining the number of people flowing between spaces in real time.
[0018] In addition, the present invention constructs a mathematical model based on the target area and establishes a directed connectivity graph within the mathematical model, abstracting the three-dimensional space into a mathematical concept to achieve quantitative statistics of the number of people in the space. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flow chart of a method for real-time number estimation in multi-connected spaces according to an embodiment of the present invention; Figure 2 is a schematic diagram of constructing a directed connectivity graph according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the personnel flow process in each space of a directed connectivity graph according to an embodiment of the present invention; Figure 4 Schematic diagram of personnel flow in a single channel according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be described in more detail below with reference to the accompanying drawings. It should be noted that the following description of the present invention with reference to the accompanying drawings is only illustrative and not restrictive.
[0021] Where possible, the various embodiments described below may be recombined with each other to form other embodiments not shown in the following description; the various technical features described below may also be recombined with each other to form other embodiments not shown in the following description.
[0022] Example 1: Please refer to the attached Figure 1 ~Attachment Figure 4 .
[0023] To address the problem that existing technical solutions are unable to monitor and estimate the flow of people between multiple connected spaces in real time, this embodiment provides a method for estimating the number of people in multiple connected spaces in real time. The method mainly includes the following steps: a. constructing a mathematical model based on the target area; b. dividing at least two spaces in the mathematical model, and dividing the area connecting the two spaces into channels, setting the direction attributes of the channels, and constructing a directed connectivity relationship graph using the spaces and channels; c. identifying the target people and their travel trajectories passing through all channels, and counting the real-time number of people in each space according to the directed connectivity relationship graph.
[0024] In this embodiment: by constructing a directed connectivity relationship graph, real-time monitoring of personnel flow and estimation of the number of people in multiple connected spaces are achieved, wherein the key lies in the accurate spatial and channel division of the target area and setting the directional attributes of the channel. This clarifies the relationship between each space and its connecting channel, and provides a basis for accurately identifying the flow of target personnel between spaces. In addition, this embodiment monitors the flow results of target personnel between spaces in real time based on their movement trajectories in the channel, and achieves statistics on the number of people in each space by updating the directed connectivity relationship graph in real time, solving the problem of the difficulty in effectively monitoring multiple connected areas at the same time in traditional solutions. Overall, this embodiment provides an efficient, low-cost and easy-to-deploy solution that is suitable for multiple fields such as emergency rescue, public safety management and industrial safety control.
[0025] It should be noted that the construction of a directed connectivity graph treats each space as a node and the channels connecting them as directed edges, thereby establishing connectivity between spaces. This directed connectivity graph not only depicts the number of target individuals within each space but also depicts the flow of people between different spaces. When a change of personnel is detected in a channel, the number of people in adjacent rooms is automatically updated based on the connectivity relationship, ensuring data consistency and accuracy. This process involves determining the movement trajectory of the target person within the channel to accurately calculate the number of people entering and leaving each room. The number of people in each room is adjusted in real time based on the connectivity relationships between rooms, thus achieving global occupancy monitoring in complex building structures.
[0026] In addition, when identifying target persons, target detection algorithms such as YOLO and Faster R-CNN can be used to identify features such as the human body and head and shoulders to confirm the presence of the person. In combination with multi-target tracking algorithms such as DeepSORT, continuous tracking of individual identities can be achieved based on feature matching and target motion trajectory association to prevent double counting or omissions.
[0027] In a preferred embodiment, the target area may be a building, a rooftop location, or any location that can be divided into areas and further divided into spaces.
[0028] In a preferred embodiment, some of the channels also connect to the outside of the target area, which is used to calculate the number of people entering the building from outside. In this embodiment, the number of people inside the target area is initially zero. A target person enters the target area from outside, and the number of people inside the target area is estimated using the aforementioned method.
[0029] In a preferred embodiment, step b includes: obtaining all units in the target area, and dividing the units into spaces or channels according to the division conditions; the division conditions include: if the unit to be divided has a unit directly connected to it and has independent physical isolation, the unit to be divided is divided into space; if the unit to be divided has at least three units directly connected to it and has no independent physical isolation, the unit to be divided is divided into space; if the unit to be divided is only directly connected to two other units and has no independent physical isolation, the unit to be divided is divided into a channel.
[0030] In this embodiment, all units within a building are rationally divided into spaces or channels using clear judgment criteria. This not only improves the accuracy of real-time occupancy estimation in multi-connected spaces, but also enhances the system's adaptability and flexibility. This division ensures that each space accurately reflects the actual distribution of occupants; the definition of channels ensures clear and coherent occupancy paths, providing a foundation for accurate headcount. Furthermore, this division facilitates the rapid location and identification of key units within complex building structures, improving efficiency and safety in application scenarios such as emergency rescue, public safety management, and industrial safety control.
[0031] It's important to note that, for example, in a scenario where the target area is a building with rooms, corridors, elevators, or staircases, rooms, offices, and conference rooms within a building typically have direct connections to other units and possess independent physical barriers, such as doors and walls. Therefore, these units should be classified as "spaces." Specifically, a standard office, separated from other areas by four walls and a door, meets the criteria for a space. Corridors, stairwells, and elevators connecting multiple rooms are typically transitional areas between two or more spaces. Therefore, when they connect three or more spaces, they should be classified as spaces, not passages. Doors and passages directly connecting only two spaces lack independent physical barriers and, because they only directly connect to two other units or directly connect one unit to the outside of the building, should be classified as "passages." This approach effectively avoids ambiguity in the classification process and ensures the accurate construction of a real-time spatial occupancy model.
[0032] In a further preferred embodiment, considering the situation where there is external space in the building, if the unit to be divided is only directly connected to another unit and the outside of the building and has no independent physical isolation, the unit to be divided is also divided into channels.
[0033] In another preferred embodiment, step a includes: obtaining all units within the building and dividing the units into spaces or passages according to the division conditions; the judgment conditions include: if the unit to be divided has a unit directly connected to it and has independent functions, the unit to be divided is divided into a space; if the unit to be divided has at least three units directly connected to it and has no independent functions, the unit to be divided is divided into a space; if the unit to be divided is directly connected to only two other units, or is directly connected to only one other unit and the outside of the building and has no independent functions, the unit to be divided is judged to be a passage. It should be noted that in this embodiment, the space and passage are determined based on the functions of the units within the building, making this embodiment applicable to more application scenarios.
[0034] In a preferred embodiment, step c specifically includes: defining virtual counting lines within the channels; identifying target individuals and their trajectories passing through the corresponding channels in real time; determining the intersection of the target individuals' trajectories with the virtual counting lines based on a trained cross-line detection algorithm, obtaining a timestamp and intersection determination result; and updating the number of people in each space in the directed connectivity graph in real time based on the intersection determination results and corresponding timestamps for all target individuals. This embodiment uses virtual counting lines and a cross-line detection algorithm to accurately capture the intersection of the target individuals' trajectories with the channels, and combines this with timestamps to dynamically update the number of people. This method significantly improves the real-time and accuracy of personnel flow monitoring within multi-connected spaces, providing reliable technical support for efficient space management and personnel flow scheduling.
[0035] In another preferred embodiment, the process of real-time identification of target persons passing through the corresponding channel and their movement trajectories includes: obtaining target features associated with the identity of the target person in real time based on the target detection algorithm, and determining the initial position of the target person; based on the multi-target tracking algorithm, continuously obtaining the continuous moving position of the target person according to the identity and initial position of the target person, and generating the corresponding movement trajectory of the target person.
[0036] In this embodiment: In actual application scenarios, it is necessary to consider the perspective of identifying the target person, and the target person and his / her movement trajectory passing through the corresponding channel can be identified through a vertical perspective or other perspectives. The vertical perspective deployment equipment provides wide coverage, reduces blind spots and personnel occlusion, ensures high detection accuracy and reduces privacy risks. The target detection algorithm identifies all target persons in the video frame in real time, and the multi-target tracking algorithm uniquely identifies and continuously tracks each target, maintaining high accuracy even in complex or crowded environments. The combination of the two improves the real-time and accuracy of monitoring, effectively responds to the needs of personnel flow monitoring in multi-connected spaces, is suitable for emergency rescue, public safety management and industrial scenarios, and enhances the ability to grasp the flow of personnel.
[0037] The core task of the object detection algorithm is to find objects in the input image and give their location and category. The mathematical principle can usually be described by the following core steps: Perform feature extraction: Input image After deep neural networks such as CNN and Transformer, feature maps FFF are extracted, namely:
[0038] in, It's a neural network, are the parameters of the network. The feature map contains high-level information of the input image, such as texture, shape, etc.
[0039] Perform Bounding Box Regression: Predict possible target locations on the feature map using different methods (such as Ancjor-based or Ancjor-free):
[0040] in, is the u-th candidate box, indicating the location of the target (center point, width and height).
[0041] Classification: Predict the object category within the candidate box, usually using Softmax or Sigmoid:
[0042] in, is the probability that each target belongs to different categories.
[0043] Loss Function Optimization: The target detector is optimized through regression loss (such as L1 / L2 loss to calculate position error) and classification loss (such as cross entropy loss to calculate category error):
[0044] Among them, λ is a hyperparameter that balances the two.
[0045] Common detectors include Faster R-CNN two-stage, YOLO, SSD single-stage, etc. Their core mathematical principles are to use deep neural networks for feature extraction, target positioning and classification optimization.
[0046] Multi-target tracking algorithms, combined with SORT and DeepSORT, associate individual identities based on feature matching and the association of target motion trajectories, preventing duplicate or missed counts. Multi-target tracking (MOT) is used to continuously identify and number multiple targets in a video. Its core concept is to match the detected target in the current frame with the target in the previous frame while maintaining ID consistency. Its core steps include: IoU (Intersection over Union) matching: Definition: Intersection over Union (IoU) is used to measure whether two oriented bounding boxes (target locations) are similar: in, and They are the target box of the previous frame and the detection box of the current frame respectively.
[0047] Matching method: If the IoU value is higher than the threshold (such as 0.3~0.5), it is considered to be the same target and inherits the original ID; if the IoU is low, it may be a new target or the target has disappeared.
[0048] Appearance feature matching: Target appearance information (such as color, texture, and depth features) can be extracted using deep learning. Assume that the feature vectors of target u and target v are and , then calculate the similarity:
[0049] If the distance If the value is less than the threshold, they are considered to be the same target.
[0050] Matching Strategy: Initially, IoU is used for preliminary matching to identify targets with minimal spatial position change. For remaining unmatched targets, appearance features are used for matching, targeting targets that may be occluded or have significant position changes. If no match is found, new targets are assigned new IDs. Lost targets are treated as "lost tracking" for a period of time to prevent accidental deletion.
[0051] In a preferred embodiment, the execution process of the line crossing judgment algorithm includes: Passing through the channel at the moment Target personnel , identify its trajectory , and adjust the trajectory based on the crossing line condition With channel Corresponding virtual counting line Perform intersection determination; if the cross-line conditions are met, obtain the intersection determination result : ;in, Indicates target person The unit step length changes when the target personnel from Enter +1 when leaving, −1 when leaving; and Represents and channels respectively Two spaces directly connected; based on Get the intersection determination result at any time The corresponding timestamp.
[0052] In this embodiment, the intersection of the target person's trajectory and the virtual counting line is accurately determined by the cross-line judgment algorithm, which can capture the flow direction and number changes of people in the channel in real time. The personnel change representation method of unit step length is used to clearly distinguish the direction of entry and exit of people, ensuring the accuracy of the headcount. Combined with the timestamp recording of the intersection judgment results, the spatial real-time headcount model can be dynamically updated to achieve real-time monitoring of the distribution of people in multi-connected spaces. This method avoids the problem of missed detection caused by occlusion or blind spots in traditional monitoring, while improving the efficiency and reliability of personnel flow monitoring in complex scenarios, providing accurate data support for scenarios such as emergency rescue and public safety management.
[0053] In a further preferred embodiment, step c further includes: based on event-driven, establishing an event for the behavior of single intersection determination, and associating All events under the event record event information; the event information includes: the space, channel, target personnel and intersection judgment result corresponding to the event; based on the graph theory algorithm, according to the event information statistics The number of people flowing out of the space and the number of people flowing into the corresponding space, and the number of people in each space in the directed connectivity graph are updated.
[0054] In this example, if an event indicates that someone moved from space A to space B at time t, the number of people in space A will be reduced accordingly and the number of people in space B will be increased. This approach allows the system to dynamically and accurately update the number of people in each space, ensuring data consistency and timeliness.
[0055] Moreover, in this embodiment, the use of this event-driven method to update the real-time spatial population model in real time has brought significant beneficial effects. First, this method greatly improves the response speed and real-time performance of the system, because it can immediately update the relevant data every time the movement of people is detected, without having to wait for periodic batch processing. Secondly, by recording the information of each event in detail, it is possible to accurately track the flow of people, providing a solid foundation for subsequent data analysis. In addition, the use of graph theory algorithms to calculate the flow of people between spaces not only ensures the accuracy of the calculation, but also enhances the system's ability to handle complex building structures, enabling it to adapt to changing spatial layouts and flow conditions. This provides efficient and reliable solutions for fields such as emergency rescue, public safety management, and industrial safety control, and helps to improve overall safety levels and management efficiency.
[0056] In a further preferred embodiment, the process of updating the number of people in each space in the directed connectivity graph includes: setting For space exist The total number of people at the time is: ;in, Indicates from space Adjacent space Flow into space Number of people, Indicates from space Flow out to adjacent space number of people.
[0057] It should be noted that this embodiment accurately describes the dynamic changes in the flow of people through mathematical modeling. In the formula, the update of the number of people in a space is based on the difference between the number of people flowing in and out, which ensures the real-time and accuracy of the number of people counted in each space. This method avoids the limitations of static or single-point statistics in traditional monitoring, and can fully reflect the flow of people between multi-connected spaces. Its beneficial effects are: first, it improves the accuracy and efficiency of population estimation in complex scenarios; second, it supports the precise tracking of the direction of personnel flow, providing reliable data support for scenarios such as emergency rescue and public safety management; third, by dynamically updating the model, the adaptability and practicality of the system are enhanced to meet real-time monitoring needs. In summary, this method achieves efficient and precise management of the flow of people in multi-connected spaces with concise mathematical expressions.
[0058] In a preferred embodiment, step d is also included: establishing a timeline for the intersection judgment result based on the timestamp, and continuously detecting all directed connectivity graphs, and recording the abnormality detection results at the current moment; the abnormality detection result triggers a timeline backtracking, and adjusts the number of people in each space in the directed connectivity graph based on the intersection judgment result closest to the current moment on the timeline; if the number of people corresponding to the target space is a negative number or the increment of the number of people corresponding to the space at the same moment exceeds the preset number, then the target space is abnormal at the current moment.
[0059] In this embodiment, the robustness and accuracy of the spatial real-time crowd model are significantly improved through timeline backtracking and anomaly detection mechanisms. When an anomaly detection result is triggered, the system gradually backtracks based on historical judgment results on the timeline to quickly locate and correct erroneous data, avoiding model deviations caused by misjudgment or noise.
[0060] In this embodiment, if the spatial real-time population model still shows abnormal detection results after a single timeline backtracking, reasonable corrections are made in combination with historical trend data, further enhancing the system's fault tolerance and ensuring that reliable personnel flow estimates can still be provided in complex scenarios. This method not only improves the accuracy of real-time monitoring, but also reduces the need for manual intervention, providing more efficient and stable technical support for scenarios such as emergency rescue and public safety management, while optimizing the response speed and decision-making basis for emergencies. It should be noted that when encountering immeasurable errors, manual troubleshooting can still be used to maximize the safety of operation.
[0061] In a further preferred embodiment, the following methods can be used to retrospectively resolve anomalies: first, a redundant data verification mechanism is introduced, and data from adjacent spaces or channels is used for cross-validation to correct erroneous data from a single source. Second, a machine learning algorithm is applied to analyze historical data patterns, predict normal trends in the number of people, and adjust the data during abnormal periods accordingly. Furthermore, a dynamic threshold can be set to automatically adjust the Q value according to the actual flow of people, reducing false alarms caused by fixed thresholds. Finally, for logically contradictory trajectories, the most reasonable correction solution is found by replaying and simulating the possible paths of the target person. The combination of these methods can not only effectively improve the accuracy of anomaly detection and correction, but also further enhance the system's adaptability and stability, ensuring that the spatial real-time population model remains reliable in complex and changing scenarios.
[0062] In a further preferred embodiment, the abnormal detection results may also include: the movement trajectory of the same target person has logical contradictions between channels and / or spaces, and the similarity between the spatial real-time population model corrected after timeline backtracking and the historical trend data is lower than a set threshold.
[0063] It should be noted that in actual application scenarios, the expansion of anomaly detection results enables the system to respond more intelligently and flexibly to complex and changing environments. In the event of logical contradictions in the trajectory of the same target person, the system can use multi-view camera data or sensor information for secondary verification to correct the erroneous trajectory information. In addition, when the similarity between the corrected spatial real-time population model after timeline backtracking and the historical trend data is lower than the set threshold, the system will not only trigger a warning, but will also automatically introduce an expert system or artificial intelligence algorithm for in-depth analysis, and adjust the model parameters based on contextual information to ensure model accuracy. In this way, not only can the accuracy of personnel flow monitoring be improved, but the system's self-repair ability and adaptability can also be enhanced, providing more reliable support for scenarios such as public safety management and emergency rescue.
[0064] Another preferred embodiment further includes step e: A work device is provided in a corresponding space. Before the work device is activated, the number of people in the corresponding space must be cleared and a clearing check is performed. If the number of people has not yet been cleared, the work device is immediately blocked from activation and a warning is issued. If the number of people has been cleared, the device can be activated. This configuration ensures that no one is present in the space before the work device is activated, preventing safety hazards. The clearing check mechanism improves operational safety and prevents accidents.
[0065] Example 2: Based on the real-time number estimation method for multiple connected spaces of Example 1, this embodiment provides a real-time number estimation system for multiple connected spaces, which mainly includes: a data processing unit, used to construct a mathematical model based on the target area, divide the mathematical model into at least two spaces, and divide the area connecting the two spaces into channels, and construct a directed connectivity relationship graph using spaces and channels; a counting device, used to identify target personnel passing through the corresponding channel in real time, determine their travel trajectory based on the target personnel, and count the real-time number of people in each space according to the directed connectivity relationship graph.
[0066] The counting device mentioned in this embodiment includes a smart camera, but may also include other devices with video capture capabilities. A variety of other technologies can also be used to achieve person identification and trajectory tracking. For example, infrared sensors detect infrared light from the human body to identify entry and exit, and are suitable for various lighting environments. RFID readers use radio signals to identify people wearing RFID tags, effectively recording their entry and exit movements. Laser scanners or laser radar (LiDAR) emit and receive laser beams to construct three-dimensional images, accurately tracking the location and direction of movement of people. Ultrasonic sensors use reflection to detect the presence and distance of objects and can also be used for people counting in specific scenarios. Wi-Fi or Bluetooth detectors estimate the number of people by detecting mobile device signals. This eliminates the need for direct interaction, but its accuracy depends on the proportion of devices carrying and enabling the relevant functions. The most suitable technology for counting devices can be selected based on actual needs, budget, and accuracy requirements.
[0067] These counting devices are deployed at building entrances and exits and at room connections to monitor the entry and exit of people. The counting devices use target detection algorithms, such as YOLO and Faster R-CNN, to identify features such as the human body, head, and shoulders to confirm the presence of people. Combined with multi-target tracking algorithms, such as DeepSORT, they continuously track individual identities based on feature matching and target motion trajectory association to prevent duplicate counting or missed counts. This system integrates data processing units and technical equipment to achieve efficient and accurate monitoring of the flow of people in multi-connected spaces. Overall, the device improves the accuracy and efficiency of head count estimation in complex scenarios and reduces the false alarm rate. It is suitable for situations requiring high reliability, such as emergency rescue and public safety management, and enhances the ability to respond to emergencies and the level of decision support.
[0068] In a preferred embodiment, it also includes: a display terminal, which communicates with the modeling unit, and is used to display and detect the real-time number of people model of the space in real time, and issue an alarm based on the abnormal detection results of the real-time number of people model of the space; working equipment, which is deployed in part of the space, and is used to perform work corresponding to the space; a safety control device, which communicates with the modeling unit and the working equipment, and is used to perform abnormal detection on the real-time number of people model of the space in real time, and before the working equipment is started, confirm whether the number of people in the corresponding space is cleared, and if not, organize the work equipment to start and issue a warning.
[0069] In this embodiment, the display terminal enables real-time monitoring of personnel flow and visualization of anomaly detection results, helping to quickly identify potential risks and take appropriate action. Security control equipment ensures that no one is present in the area before performing space-related operations, effectively preventing safety incidents and improving work efficiency. This system not only enhances the safety of space use but also optimizes space utilization efficiency by analyzing real-time occupancy models, reducing unnecessary waiting time and ensuring the safety of personnel and equipment. It is suitable for a variety of locations requiring precise personnel flow monitoring and safety management, such as factories, shopping malls, and office buildings. This design is of great significance for improving the level of intelligent space management.
[0070] It should be understood that the embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the appended claims of the application.
Claims
1. A real-time number estimation method for multi-connected spaces, characterized by: The following steps are involved: a. Construct a mathematical model based on the target area; b. In the mathematical model, dividing at least two spaces, and dividing the area connecting the two spaces into channels, setting the direction attribute of the channel, and constructing a directed connectivity graph of the space and the channel; c. Identify the target personnel and their travel trajectories passing through all channels, and count the real-time number of people in each space based on the directed connectivity graph.
2. The method for real-time number estimation in multi-connected spaces according to claim 1, characterized in that: The step b comprises: Acquire all units of the target area, and divide the units into the spaces or the channels according to a division condition; The classification conditions include: If the unit to be divided is directly connected to the unit and has independent physical isolation, the unit to be divided is divided into the space; If the unit to be divided has at least three units directly connected thereto and there is no independent physical isolation, dividing the unit to be divided into the spaces; If the unit to be divided is directly connected to only two other units and has no independent physical isolation, the unit to be divided is divided into the channels.
3. The method for real-time number estimation in multi-connected spaces according to claim 1, characterized in that: The step c specifically includes: A virtual counting line is correspondingly defined in the channel; Identify the target person and their trajectory passing through the corresponding channel in real time, and determine the intersection of the target person's trajectory and the virtual counting line based on the trained cross-line judgment algorithm to obtain a timestamp and intersection judgment result; The number of people in each space in the directed connectivity graph is updated in real time based on the intersection determination results of all target persons and the corresponding timestamps.
4. The method for real-time number estimation in multi-connected spaces according to claim 3, characterized in that: The process of real-time identification of target personnel passing through the corresponding channel and their trajectory includes: Acquire target features associated with the identity of the target person in real time based on a target detection algorithm, and determine the initial location of the target person; Based on a multi-target tracking algorithm, the continuous moving position of the target person is continuously acquired according to the identity and the initial position of the target person, and the moving trajectory corresponding to the target person is generated.
5. The method for real-time number estimation in multi-connected spaces according to claim 3, characterized in that: The execution process of the line crossing judgment algorithm includes: for Passing through the channel at the moment Target personnel , identify its trajectory , and based on the crossing line condition, the travel trajectory With the channel Corresponding virtual counting line Perform intersection determination; If the cross-line condition is met, the intersection determination result is obtained : ; in, Indicates the target person The unit step length changes when the target person from Enter +1 when entering, −1 when leaving; in and Respectively represent the channels Two spaces that are directly connected; based on The intersection determination result is obtained at the moment The corresponding timestamp.
6. The method for real-time number estimation in multi-connected spaces according to claim 5, characterized in that: The step c also includes: Based on event-driven, an event is established for the behavior of a single intersection determination, and an association is made. All events under the record event information; The event information includes: the space, the channel, the target person, and the intersection determination result corresponding to the event; Based on graph theory algorithm, according to the event information statistics The number of people flowing out of the space and the number of people flowing into the corresponding space are calculated, and the number of people in each space in the directed connectivity graph is updated.
7. The method for real-time number estimation in multi-connected spaces according to claim 6, characterized in that: The process of updating the number of people in each space in the directed connectivity graph includes: set up For space exist The total number of people at the time is: ; in, Indicates that from the space Adjacent space Flowing into the space Number of people, Indicates that from the space Flow out to adjacent space number of people.
8. The method for real-time number estimation in multi-connected spaces according to any one of claims 3 to 7, characterized in that: Also includes step d: Establishing a time axis for the intersection determination result based on the timestamp, continuously detecting the directed connectivity graph, and recording the anomaly detection result at the current moment; The abnormality detection result triggers a timeline backtracking, and the number of people in each space of the directed connectivity graph is adjusted based on the intersection determination result closest to the current moment on the timeline; If the number of people corresponding to the target space is a negative number or the increment of the number of people corresponding to the space at the same moment exceeds the preset number, the target space is abnormal at the current moment.
9. A real-time people estimation system in multi-connected spaces, characterized by: include: a data processing unit, configured to construct a mathematical model based on the target area, divide the mathematical model into at least two spaces, divide the area connecting the two spaces into channels, and construct a directed connectivity graph using the spaces and the channels; The counting device is used to identify the target person passing through the corresponding channel in real time, determine the moving trajectory of the target person based on the target person, and count the real-time number of people in each space based on the directed connectivity graph.
10. The multi-connected space real-time number estimation system according to claim 9, characterized in that: Also includes: a display terminal, configured to display and detect the directed connectivity graph in real time, and issue an alarm based on an abnormality detection result of the directed connectivity graph; Working equipment, deployed in part of the space, for performing work corresponding to the space; The safety control device is used to detect anomalies in the directed connectivity graph in real time and confirm whether the number of people in the corresponding space is cleared before the working equipment is started. If it is not cleared, the working equipment is prevented from starting and a warning is issued.