Intelligent park personnel management method and system

CN122657950APending Publication Date: 2026-08-28GUANGZHOU POLY DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610765072.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

当出现未经授权人员尾随进入或在园区内异常活动时,管理者难以及时发现并定位其当前位置

Benefits of technology

[0014] Compared with existing technologies, the present invention provides a smart park personnel management method that can realize localized real-time tracking and statistics of unauthorized personnel, thereby improving the intelligent response speed of park security management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122657950A_ABST
    Figure CN122657950A_ABST
Patent Text Reader

Abstract

The application discloses a kind of wisdom park personnel management method and system, method includes: according to the verification notice containing current authorized personnel face feature vector generated periodically by entrance face verification equipment, filter out the unauthorized face feature vector and its detection time point that do not hit authorized sequence;According to the random timer started after each camera completes local comparison, generate the continuous dynamic number of unique network by multicast declaration and conflict resolution mechanism, obtain the dynamic number allocation result of each camera;According to the camera of dynamic number for 1, trigger multi-round merging process, obtain complete unauthorized face feature sequence and statistical information after multi-round merging by the camera that finally wins;According to the camera of final victory, complete sequence is unicast to entrance face verification equipment, and obtain unauthorized personnel information.Utilize the embodiment of the application, the real-time tracking and statistics of unauthorized personnel can be realized locally, and the intelligent response speed of park security management is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Internet of Things (IoT) technology, specifically a smart park personnel management method and system. Background Technology

[0002] As a crucial component of modern urban management, the level of intelligence in personnel access control within smart parks directly impacts park security and operational efficiency. Currently, mainstream personnel management solutions primarily rely on facial recognition devices deployed at key entrances and exits, controlling entry and exit by comparing the faces of passersby with an authorization database. However, this centralized verification model suffers from significant blind spots: once personnel enter the park, their subsequent movement and activity patterns become difficult to track continuously. While security cameras are widely deployed within parks, they are typically only used for post-event video playback, lacking a real-time linkage mechanism with the entrance verification system. When unauthorized personnel follow others in or engage in unusual activities within the park, managers struggle to promptly detect and locate their current position. Furthermore, attempting to aggregate all camera video streams to a central server for unified analysis would face immense network bandwidth and computational resource consumption, and real-time performance is uncertain. Therefore, how to utilize existing park camera resources to construct a distributed, low-latency management method capable of continuously tracking and statistically analyzing unauthorized personnel entering the park has become a pressing technical challenge. Summary of the Invention

[0003] The purpose of this invention is to provide a smart park personnel management method and system to address the shortcomings of existing technologies, enabling localized real-time tracking and statistics of unauthorized personnel, and improving the intelligent response speed of park security management.

[0004] One embodiment of this application provides a smart park personnel management method, the method comprising: Authorization information multicast delivery and local comparison: Based on the verification notification periodically generated by the entrance face verification device, which contains the face feature vector of the currently authorized person, it is sent to all cameras in the park via multicast. This triggers each camera to compare the face feature vectors detected before the verification time point recorded locally with the authorization sequence, and to filter out the unauthorized face feature vectors that do not match the authorization sequence and their detection time points. Distributed dynamic numbering competition: After each camera completes local comparison, a random timer is started, and a unique continuous dynamic number is generated across the entire network through multicast declaration and conflict resolution mechanism to obtain the dynamic numbering allocation result for each camera; Fault self-healing iterative merging and spatiotemporal cross-validation: Multiple merging processes are triggered based on the camera with dynamic number 1. In each round, odd-numbered cameras multicast unauthorized face feature vector sequences to even-numbered cameras. After receiving the sequences, even-numbered cameras compare feature similarity. When the similarity is higher than the face similarity threshold, the movement speed is calculated by combining the physical distance and time difference between the two records. Only when the speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold are the cameras merged into the same target and the count is accumulated. Otherwise, they are retained separately. After multiple rounds of merging, the camera that wins the final round obtains the complete unauthorized face feature sequence and statistical information. During the merging process, single-point failures of cameras are automatically resolved by non-faulty cameras according to a preset timer and relay triggering mechanism. Result reporting and screening location: The complete sequence of the winning camera is unicast to the entrance face verification device. The entrance device filters out the records of unauthorized personnel whose number of occurrences exceeds a preset statistical threshold, and associates them with the location of their last appearance to obtain the information of the unauthorized personnel.

[0005] Optionally, the comparison between the multicast delivery of the authorization information and the local comparison includes: Authorization sequence generation and multicast: Based on the entrance face verification device reading the authorized face feature vectors of the currently present personnel stored locally at a preset period, a verification notification message is generated. The message contains the authorized face feature vector sequence and the verification time point, and is sent to all cameras in the park through a preset multicast address. Local record maintenance: Based on the continuous detection of people's faces by various cameras in the park, feature vectors are extracted for each detected face and the detection time point is recorded. If the same person appears repeatedly, only the latest detection time point is updated. Comparison and Extraction: After receiving the verification notification from the camera, extract all facial feature vectors in the local record that are earlier than the verification time point, compare them one by one with the authorized sequence, and filter out the feature vectors that do not appear in the authorized sequence and their latest detection time points to form a local unauthorized facial feature vector sequence.

[0006] Optionally, the distributed dynamic numbering contention includes: Random timing start: After each camera completes local comparison, a random timing value is generated within a preset random time range, and timing begins. At the same time, the system listens for dynamic number declaration messages sent by other cameras in the network. Initial Declaration and Number Increment: The camera whose timeout expires first sends a dynamic number declaration message via multicast, declaring its own dynamic number as 1 and carrying a declaration timestamp; subsequent cameras whose timeouts expire are declared based on the maximum dynamic number that has been detected, adding 1 to it as their own dynamic number. Conflict resolution: If a camera receives a claim with the same dynamic number from another camera after sending its own claim, the timestamps of the claims are compared. The camera with the later timestamp restarts random timing and re-claims after listening for the current maximum dynamic number, until all cameras obtain a unique continuous dynamic number.

[0007] Optionally, the fault self-healing iterative merging and spatiotemporal cross-validation include: First round of merging triggered: After the camera with dynamic number 1 does not detect a new dynamic number declaration within a preset time, a multicast notification message to start the first round of merging is sent. Odd-to-even transmission: After receiving the start notification, the camera with an odd dynamic number sends a missed face synchronization multicast message to the even-numbered camera with a dynamic number that is 1 greater than its own. The message carries its own dynamic number, static number, summary round number and unauthorized face feature vector sequence, which includes the latest detection time point. Reception and Confirmation: After receiving multicast messages from the target even-numbered cameras, the target cameras reply with confirmation messages to the source cameras via unicast and mark themselves as active cameras. If the source camera does not receive confirmation within a preset time, it marks itself as an active camera. If the target even-numbered cameras do not receive multicast messages from odd-numbered cameras with dynamic numbers one less than their own within a preset time, they mark themselves as active cameras. Feature merging and spatiotemporal verification: Based on the number of active even-numbered cameras, the received sequences are merged with the local sequences. For two records with a similarity higher than the face similarity threshold, the installation coordinates are obtained based on the static number of the associated camera, the physical distance and time difference are calculated, and then the movement speed is calculated. If the movement speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, they are determined to be the same target, the records are merged, the latest detection time point and the corresponding static number of the camera are retained, and the count is accumulated; otherwise, two records are retained respectively. Multiple iterations and fault self-healing: After the first round of merging is completed, the camera with dynamic number 1 starts the first timer. If it receives a multicast message from another camera indicating a missed face during the timer period, it restarts the first timer. After the timer expires and it is confirmed that all odd-numbered cameras have sent their data, it triggers the next round of startup notification. All active cameras update their own dynamic number to the original number divided by two and rounded up. The process is repeated, with odd-numbered cameras sending data to even-numbered cameras for feature merging and spatiotemporal verification. If the camera with dynamic number 1 fails before triggering the next round of startup notification, the camera with the smallest dynamic number among the subsequent dynamic numbered cameras will take over and trigger the startup notification when its second timer expires and it has not received the next round of startup notification. Through multiple iterations, until only one active camera obtains the complete unauthorized face feature sequence.

[0008] Optionally, the result reporting and filtering / locating includes: Final result unicast reporting: Based on the winning camera, the complete unauthorized face feature sequence is encapsulated into a unicast message. The sequence includes the face feature vector, count, and static number of the latest detected camera for each unauthorized record, and is sent to the entrance face verification device. Threshold filtering: After the face verification device at the entrance receives the sequence, it filters out unauthorized records whose count is greater than or equal to a preset statistical threshold to obtain a set of suspected unauthorized persons; Location positioning: Based on the static camera numbers associated with the filtered records, locate the corresponding installation locations, determine the area where unauthorized personnel last appeared, and generate the number and location information of unauthorized personnel.

[0009] Optionally, the method further includes hierarchical aggregation and dynamic partitioning based on a virtual grid: Grid affiliation determination: Based on the virtual grid information pre-acquired by each camera and divided according to its geographical location, the grid number to which it belongs is determined in combination with its own installation coordinates; Group leader election within the grid: Based on the load perception timer started by each camera in the same grid, the timing duration of the load perception timer is the sum of the product of the base random value, the current task queue number and the preset step size. The camera whose timer expires first sends a group leader declaration, and the other cameras in the same grid stop timing and unicast their unauthorized face feature vector sequence, static number and coordinates to the group leader. Intra-group spatiotemporal clustering: After the group leader collects all data within the grid, spatiotemporal cross-validation based on velocity constraints is performed. For two records with feature similarity higher than the face similarity threshold, the physical distance and time difference are calculated to obtain the movement speed. If the movement speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, they are merged into the same target; otherwise, they are retained separately to obtain the grid-level unauthorized face summary result. Inter-group aggregation: Each grid group leader participates in the dynamic numbering and iterative merging of the entire network as a representative. During the merging process, the group leaders perform spatiotemporal cross-validation based on velocity constraints again to merge the same target records across grids and obtain the unauthorized face feature sequence of the entire park.

[0010] Optionally, the method further includes dynamic partitioning of the virtual mesh: Global coordinator election: Based on the daily agreed time, all cameras generate random delays, and the camera whose delay expires first sends a declaration to become the temporary global coordinator; Coordinate collection: Based on the location reporting request sent by the global coordinator via multicast, collect the static IDs and installation coordinates of all cameras; Adaptive Mesh Generation: Based on the coordinate set collected by the global coordinator, a virtual mesh is generated by executing an equal-number rectangular segmentation algorithm that ensures approximately equal numbers of cameras within each mesh. The algorithm includes: determining the overall rectangular boundary; setting the vertical segmentation number K to the square root of the target mesh number J, rounded to the nearest whole number; sorting all cameras by their X-coordinates and assigning them to K vertical strips, where the first N mod K strips are each assigned... N / K One camera, with the remaining strips each allocated... N / K There are 10 cameras, and the average X-coordinate of the cameras at the critical positions of adjacent strips is taken as the longitudinal dividing line; for each longitudinal strip, the target grid number Lp is assigned to the strip according to the total grid number J and the longitudinal division number K, where let The remainder R = J - Jbase * K, the first R strips are assigned grid numbers Lp = Jbase + 1, and the remaining strips are assigned grid numbers Lp = Jbase; after sorting the Mp cameras in the current vertical strip according to their Y coordinates, they are assigned to Lp horizontal grids, and the first Mp mod Lp grids are each assigned... Mp / Lp One camera, and the remaining grid is allocated to... Mp / Lp A set of cameras is used, and the average Y-coordinate of the cameras at the critical positions of adjacent grids is taken as the horizontal dividing line; the boundaries of each grid are generated and numbered, and the boundaries adopt the principle of left-closed and right-open, and bottom-closed and top-open; The grid division results are distributed as follows: The global coordinator multicasts the generated grid division results to each camera. Each camera determines its grid according to its own coordinates, following the principle of left-closed and right-open, and bottom-closed and top-open, and updates its grid affiliation.

[0011] Another embodiment of this application provides a smart park personnel management system, the system comprising: The distribution module is used for multicast distribution and local comparison of authorization information: Based on the verification notification periodically generated by the entrance face verification device, which contains the face feature vector of the currently authorized person, it is sent to all cameras in the park via multicast. This triggers each camera to compare the face feature vectors detected before the verification time point recorded locally with the authorization sequence, and to filter out the unauthorized face feature vectors that do not match the authorization sequence and their detection time points. The competition module is used for distributed dynamic number competition: after each camera completes local comparison, a random timer is started, and a unique continuous dynamic number is generated through multicast declaration and conflict resolution mechanism to obtain the dynamic number allocation result of each camera; The verification module is used for fault self-healing iterative merging and spatiotemporal cross-verification: multiple merging processes are triggered based on the camera with dynamic number 1. In each round, the odd-numbered camera multicasts the unauthorized face feature vector sequence to the even-numbered camera. After receiving the sequence, the even-numbered camera performs feature similarity comparison. When the similarity is higher than the face similarity threshold, the movement speed is further calculated by combining the physical distance and time difference between the two records. Only when the speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, the two records are merged into the same target and the count is accumulated. Otherwise, they are retained separately. After multiple rounds of merging, the camera that wins the final round obtains the complete unauthorized face feature sequence and statistical information. During the merging process, the single-point failure of the camera is automatically completed by the non-faulty camera according to the preset timer and relay triggering mechanism. The reporting module is used for result reporting and filtering location: the complete sequence of the winning camera is unicast to the entrance face verification device, and the entrance device filters out the records of unauthorized personnel whose number of times exceeds the preset statistical threshold, and associates them with the last appearance location to obtain the unauthorized personnel information.

[0012] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0013] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0014] Compared with existing technologies, the present invention provides a smart park personnel management method that can realize localized real-time tracking and statistics of unauthorized personnel, thereby improving the intelligent response speed of park security management. Attached Figure Description

[0015] Figure 1 Hardware structure block diagram of a computer terminal for a smart park personnel management method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a smart park personnel management method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a smart park personnel management system provided in an embodiment of the present invention. Detailed Implementation

[0016] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0017] Smart industrial parks (including construction sites and completed parks) require real-name authentication for personnel entering. Taking a construction site as an example, there are facial recognition devices (such as turnstiles) at the entrance. After starting work each day, workers complete real-name authentication through the facial recognition devices before entering the construction site. However, some workers bypass the facial recognition devices and do not register, posing a challenge to the safety management of the construction site.

[0018] The construction site in the park is equipped with multiple facial recognition cameras. There are several ways to issue alerts for unverified personnel passing by. The traditional implementation methods and their problems are analyzed below: Method 1: Cameras capture the faces of passersby and send them to a cloud server for verification. The main problem with this method is that the bandwidth of most industrial parks and construction sites is small and unstable, making it unsuitable for all cameras to upload high-definition facial images to the cloud for centralized verification in real time.

[0019] Method 2: Cameras capture the faces of passersby and send them to the entrance face verification device for verification. The main problem with this method is that the entrance face verification device often has low hardware configuration and is mainly used for face recognition at the entrance. If every image sent by all cameras needs to be analyzed, there will be a performance bottleneck, which will affect the entrance verification task.

[0020] Method 3: The cloud server or the entrance face verification device sends the face feature vector of the verified person entering the construction site to all cameras in the construction site, which then saves it locally and performs comparison analysis. The main problems with this method are: (1) High false alarm rate of single-point comparison: The construction site environment is complex (such as dust, obstruction, non-frontal posture), and the independent decision of a single camera is very likely to produce false alarms or missed alarms; (2) Centralized processing has performance bottlenecks: If the original detection results of each camera are uniformly sent to the entrance device for all summarization, deduplication and logical judgment operations, the latter will again become a performance bottleneck. In addition, the harsh environment of the construction site leads to frequent camera failures, and with the progress of construction, the number of cameras increases or decreases and their positions change dynamically, which brings great difficulties to the collaborative work between cameras and the continuous tracking of personnel.

[0021] The technical problem this solution aims to solve is to achieve low false alarm and high reliability in detecting and tracking unauthorized personnel without modifying the network, adding central equipment, or relying on a fixed network topology.

[0022] This invention first provides a smart park personnel management method, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers.

[0023] The following detailed explanation uses a computer terminal as an example. Figure 1This is a hardware structure block diagram of a computer terminal for a smart park personnel management method provided in an embodiment of the present invention. (See diagram below.) Figure 1 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0024] See Figure 2 The present invention provides a smart park personnel management method, which may include the following steps: S201, Authorization Information Multicast Distribution and Local Comparison: Based on the verification notification periodically generated by the entrance face verification device, which includes the facial feature vector of the currently authorized person, it is sent to all cameras in the park via multicast. This triggers each camera to compare the facial feature vectors detected before the verification time point recorded locally with the authorization sequence, filtering out unauthorized facial feature vectors that do not match the authorization sequence and their detection time points. Specifically, the authorization information multicast distribution and local comparison includes: Authorization sequence generation and multicast: Based on the entrance face verification device reading the authorized face feature vectors of the currently present personnel stored locally at a preset period, a verification notification message is generated. The message contains the authorized face feature vector sequence and the verification time point, and is sent to all cameras in the park through a preset multicast address. Local record maintenance: Based on the continuous detection of people's faces by various cameras in the park, feature vectors are extracted for each detected face and the detection time point is recorded. If the same person appears repeatedly, only the latest detection time point is updated. Comparison and Extraction: After receiving the verification notification from the camera, extract all facial feature vectors in the local record that are earlier than the verification time point, compare them one by one with the authorized sequence, and filter out the feature vectors that do not appear in the authorized sequence and their latest detection time points to form a local unauthorized facial feature vector sequence.

[0025] S202, Distributed Dynamic Numbering Competition: After each camera completes local comparison, a random timer is started. A unique, continuous dynamic number is generated across the entire network through multicast declaration and conflict resolution mechanisms, resulting in the dynamic number allocation for each camera. Specifically, the distributed dynamic numbering competition includes: Random timing start: After each camera completes local comparison, a random timing value is generated within a preset random time range, and timing begins. At the same time, the system listens for dynamic number declaration messages sent by other cameras in the network. Initial Declaration and Number Increment: The camera whose timeout expires first sends a dynamic number declaration message via multicast, declaring its own dynamic number as 1 and carrying a declaration timestamp; subsequent cameras whose timeouts expire are declared based on the maximum dynamic number that has been detected, adding 1 to it as their own dynamic number. Conflict resolution: If a camera receives a claim with the same dynamic number from another camera after sending its own claim, the timestamps of the claims are compared. The camera with the later timestamp restarts random timing and re-claims after listening for the current maximum dynamic number, until all cameras obtain a unique continuous dynamic number.

[0026] S203, Fault Self-Healing Iterative Merging and Spatiotemporal Cross-Verification: A multi-round merging process is triggered based on the camera dynamically numbered 1. In each round, odd-numbered cameras multicast unauthorized face feature vector sequences to even-numbered cameras. Even-numbered cameras receive these sequences and perform feature similarity comparisons. When the similarity exceeds a face similarity threshold, the movement speed is further calculated by combining the physical distance and time difference between the two records. Only when the speed is less than or equal to a preset normal movement speed threshold or the time difference is less than a preset minimum time threshold are the two records merged into the same target and their counts accumulated; otherwise, they are retained separately. After multiple rounds of merging, the winning camera obtains the complete unauthorized face feature sequence and statistical information. During the merging process, single-point camera failures are automatically resolved by non-faulty cameras using a preset timer and relay triggering mechanism. Specifically, the fault self-healing iterative merging and spatiotemporal cross-verification include: First round of merging triggered: After the camera with dynamic number 1 does not detect a new dynamic number declaration within a preset time, a multicast notification message to start the first round of merging is sent. Odd-to-even transmission: After receiving the start notification, the camera with an odd dynamic number sends a missed face synchronization multicast message to the even-numbered camera with a dynamic number that is 1 greater than its own. The message carries its own dynamic number, static number, summary round number and unauthorized face feature vector sequence, which includes the latest detection time point. Reception and Confirmation: After receiving multicast messages from the target even-numbered cameras, the target cameras reply with confirmation messages to the source cameras via unicast and mark themselves as active cameras. If the source camera does not receive confirmation within a preset time, it marks itself as an active camera. If the target even-numbered cameras do not receive multicast messages from odd-numbered cameras with dynamic numbers one less than their own within a preset time, they mark themselves as active cameras. Feature merging and spatiotemporal verification: Based on the number of active even-numbered cameras, the received sequences are merged with the local sequences. For two records with a similarity higher than the face similarity threshold, the installation coordinates are obtained based on the static number of the associated camera, the physical distance and time difference are calculated, and then the movement speed is calculated. If the movement speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, they are determined to be the same target, the records are merged, the latest detection time point and the corresponding static number of the camera are retained, and the count is accumulated; otherwise, two records are retained respectively. Multiple iterations and fault self-healing: After the first round of merging is completed, the camera with dynamic number 1 starts the first timer. If it receives a multicast message from another camera indicating a missed face during the timer period, it restarts the first timer. After the timer expires and it is confirmed that all odd-numbered cameras have sent their data, it triggers the next round of startup notification. All active cameras update their own dynamic number to the original number divided by two and rounded up. The process is repeated, with odd-numbered cameras sending data to even-numbered cameras for feature merging and spatiotemporal verification. If the camera with dynamic number 1 fails before triggering the next round of startup notification, the camera with the smallest dynamic number among the subsequent dynamic numbered cameras will take over and trigger the startup notification when its second timer expires and it has not received the next round of startup notification. Through multiple iterations, until only one active camera obtains the complete unauthorized face feature sequence.

[0027] S204, Result Reporting and Filtering Location: Based on the winning camera, the complete sequence is unicast to the entrance face verification device. The entrance device filters out records of unauthorized personnel whose counts exceed a preset threshold and associates them with the location of their last appearance to obtain unauthorized personnel information. Specifically, the result reporting and filtering location includes: Final result unicast reporting: Based on the winning camera, the complete unauthorized face feature sequence is encapsulated into a unicast message. The sequence includes the face feature vector, count, and static number of the latest detected camera for each unauthorized record, and is sent to the entrance face verification device. Threshold filtering: After the face verification device at the entrance receives the sequence, it filters out unauthorized records whose count is greater than or equal to a preset statistical threshold to obtain a set of suspected unauthorized persons; Location positioning: Based on the static camera numbers associated with the filtered records, locate the corresponding installation locations, determine the area where unauthorized personnel last appeared, and generate the number and location information of unauthorized personnel.

[0028] Furthermore, the method also includes hierarchical aggregation and dynamic partitioning based on a virtual grid: Grid affiliation determination: Based on the virtual grid information pre-acquired by each camera and divided according to its geographical location, the grid number to which it belongs is determined in combination with its own installation coordinates; Group leader election within the grid: Based on the load perception timer started by each camera in the same grid, the timing duration of the load perception timer is the sum of the product of the base random value, the current task queue number and the preset step size. The camera whose timer expires first sends a group leader declaration, and the other cameras in the same grid stop timing and unicast their unauthorized face feature vector sequence, static number and coordinates to the group leader. Intra-group spatiotemporal clustering: After the group leader collects all data within the grid, spatiotemporal cross-validation based on velocity constraints is performed. For two records with feature similarity higher than the face similarity threshold, the physical distance and time difference are calculated to obtain the movement speed. If the movement speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, they are merged into the same target; otherwise, they are retained separately to obtain the grid-level unauthorized face summary result. Inter-group aggregation: Each grid group leader participates in the dynamic numbering and iterative merging of the entire network as a representative. During the merging process, the group leaders perform spatiotemporal cross-validation based on velocity constraints again to merge the same target records across grids and obtain the unauthorized face feature sequence of the entire park.

[0029] Furthermore, the method also includes dynamic partitioning of the virtual mesh: Global coordinator election: Based on the daily agreed time, all cameras generate random delays, and the camera whose delay expires first sends a declaration to become the temporary global coordinator; Coordinate collection: Based on the location reporting request sent by the global coordinator via multicast, collect the static IDs and installation coordinates of all cameras; Adaptive Mesh Generation: Based on the coordinate set collected by the global coordinator, a virtual mesh is generated by executing an equal-number rectangular segmentation algorithm that ensures approximately equal numbers of cameras within each mesh. The algorithm includes: determining the overall rectangular boundary; setting the vertical segmentation number K to the square root of the target mesh number J, rounded to the nearest whole number; sorting all cameras by their X-coordinates and assigning them to K vertical strips, where the first N mod K strips are each assigned... N / K One camera, with the remaining strips each allocated... N / K There are 10 cameras, and the average X-coordinate of the cameras at the critical positions of adjacent strips is taken as the longitudinal dividing line; for each longitudinal strip, the target grid number Lp is assigned to the strip according to the total grid number J and the longitudinal division number K, where let The remainder R = J - Jbase * K, the first R strips are assigned grid numbers Lp = Jbase + 1, and the remaining strips are assigned grid numbers Lp = Jbase; after sorting the Mp cameras in the current vertical strip according to their Y coordinates, they are assigned to Lp horizontal grids, and the first Mp mod Lp grids are each assigned... Mp / Lp One camera, and the remaining grid is allocated to... Mp / Lp A set of cameras is used, and the average Y-coordinate of the cameras at the critical positions of adjacent grids is taken as the horizontal dividing line; the boundaries of each grid are generated and numbered, and the boundaries adopt the principle of left-closed and right-open, and bottom-closed and top-open; The grid division results are distributed as follows: The global coordinator multicasts the generated grid division results to each camera. Each camera determines its grid according to its own coordinates, following the principle of left-closed and right-open, and bottom-closed and top-open, and updates its grid affiliation.

[0030] Without modifying the existing IP network at the construction site, adding high-performance central servers or entrance facial recognition devices, or relying on a fixed network topology, this solution utilizes the embedded computing power of cameras and employs a self-negotiation protocol to achieve low-cost and highly reliable visual evidence collection and trajectory tracing of unauthorized entry behavior. The technical solution includes: (I) Core Idea: Prerequisites: 1. The facial verification device at the entrance of the construction site and the facial recognition camera inside the construction site are all connected to the construction site IP network and joined to multicast group G.

[0031] 2. The original static numbers of the face recognition cameras are a, b, c, d, etc., which can be used for physical positioning.

[0032] 3. The face verification device and the face recognition camera achieve time synchronization through NTP service.

[0033] 4. The camera records latitude and longitude location information during installation and saves it locally.

[0034] Core process: I. Self-organizing, iterative merging-based detection of unauthorized personnel: When workers enter and exit the construction site, the facial verification equipment at the entrance updates the facial feature vector information of the people currently present in real time. Facial recognition cameras inside the construction site continuously detect faces, recording only the feature vector and timestamp locally. If the same person appears repeatedly, only the latest detection time is updated.

[0035] The entry device periodically (e.g., every 2 hours) multicasts a notification to verify unauthorized personnel, including the currently authorized facial feature vector sequence and the verification time. Upon receiving this notification, the internal camera compares locally recorded facial features earlier than the verification time with the authorized sequence and filters out the mismatched sequences.

[0036] The cameras then enter a distributed dynamic numbering competition: each camera starts a 5-10 second random timer, and the first one to expire declares dynamic number 1. Subsequent cameras listen for the current maximum number and declare numbers sequentially. If there is a conflict, the timestamps of the declarations are compared, and the losing camera re-enters the random competition. This mechanism ensures that the cameras automatically adapt to camera malfunctions, additions, removals, and changes in location.

[0037] After dynamic numbering is completed, multiple rounds of iterative merging and aggregation are triggered by camera number 1. In each round, odd-numbered cameras multicast the missed sequence to even-numbered cameras one greater than themselves. Even-numbered cameras unicast confirmation upon receiving the sequence and perform feature similarity merging: if the similarity is higher than a threshold, they are merged into one record, retaining the static number of the last detected camera, and the count is accumulated. If an odd-numbered camera does not receive a confirmation message or an even-numbered camera does not receive a message, the corresponding camera automatically becomes an active node, ensuring that a single point of failure does not affect the process. After one round, camera number 1 uses a timer to ensure that all odd-numbered cameras have sent their sequences before triggering the next round; if it fails, subsequent numbered cameras take over. After each round, the active cameras update their numbers (new number = ...). Original dynamic number / 2 , (This indicates a rounding up operation), continuing to the next round until only camera number 1 has obtained the complete sequence. This mechanism simultaneously performs multi-camera cross-validation during the merging process and retains trajectory tracing information.

[0038] Finally, camera number 1 unicasts the complete miss sequence to the entry device, which retains records of >= 3 counts (achieving independent verification by multiple cameras), obtaining the number of unauthorized personnel and their last location, thus assisting in accurate security screening.

[0039] II. Further Improvements: Intra-group and Inter-group Summarization Based on Virtual Grid: For large-scale construction site scenarios, the flat dynamic numbering system has problems such as high probability of conflict and large network overhead. The improvement solution is to introduce a geographic location-based hierarchical aggregation mechanism.

[0040] The system administrator pre-divides the construction site into a virtual grid and sends the grid number and boundary coordinates to all cameras. After completing local match-3 checks, each camera first determines its virtual grid based on its own location coordinates.

[0041] Subsequently, each camera in the grid starts a load-aware leader election timer. The timer duration is calculated as a base random value plus the current task queue number multiplied by a preset step size. This duration indirectly reflects the current load of the camera; cameras with lower loads have priority in expiring their timers. The camera whose timer expires first sends a declaration to the leader. Upon receiving this declaration, other cameras in the same grid stop timing and unicast to the leader their missing face feature vectors, static numbers, and coordinates.

[0042] After the team leader collects all data within the grid, spatiotemporal constraint clustering is performed within the grid: for two records with feature similarity higher than the threshold, their physical distance ΔS and time difference ΔT are calculated, and the movement speed V = ΔS / ΔT is calculated. If V <= the normal movement threshold for personnel (e.g., 5 m / s), they are merged into the same target, and the latest detection position and count are retained; if V exceeds the threshold or ΔT is too small, the records are retained separately without merging, thus achieving the first level of false alarm filtering within the grid.

[0043] Each group leader represents their grid in the overall network aggregation, at which point the number of nodes has been significantly reduced. Group leaders are dynamically numbered and iterative merging and aggregation are performed. During the merging process, spatiotemporal consistency checks are also performed between group leaders: when merging records from different group leaders, the coordinates of the latest detected camera associated with each record are extracted, and ΔS, ΔT, and V are recalculated. If the velocity constraints are met, the records are merged; otherwise, they are retained separately. Finally, after screening by the entry verification device (retaining records with a count >= 3), the precise number and trajectory locations of unauthorized personnel are obtained.

[0044] III. Further Improvements: Dynamic Partitioning of Virtual Mesh To address the issue that static grids cannot adapt to uneven camera distribution, a dynamic partitioning improvement scheme is proposed.

[0045] At a pre-agreed time each day, all cameras compete to elect a temporary global coordinator through a random delay. After collecting the coordinates of all cameras, the coordinator executes an equal-number rectangular partitioning algorithm (the goal is to divide all N cameras into J rectangular grids, with approximately the same number of cameras in each grid (target value approximately N / J, allowing for some deviation)): ① First, determine the overall rectangular boundary (four vertices); ② Then, divide the data into vertical stripes, i.e., calculate the number of vertical partitions K = round(√J) (Note: K is the square root of J rounded to the nearest whole number), then sort the cameras in ascending order of their X-coordinates and distribute them equally among the K vertical stripes. The first N cameras... mod K strips are each allocated N / K (Note: N / K is rounded up) cameras, the remaining strips are allocated to... N / K (Note: N / K is rounded down) There are 3 cameras to ensure a near-balanced number of cameras in each strip. The average X-coordinate of the two cameras at the critical point of adjacent strips is used as the vertical dividing line (to avoid ambiguity regarding camera placement on the boundary); ③ Next, each vertical strip is horizontally divided. That is, for the p-th vertical strip, the number of target grids Lp within this strip is allocated according to the total number of grids J, as follows: Let Jbase = J / K (Note: J / K is rounded down), remainder R = J - Jbase × K. The first R strips are assigned a grid number of Lp = Jbase + 1, and the remaining strips are assigned a grid number of Lp = Jbase. Sort the Mp cameras within the strip in ascending order of their Y coordinates, and the first Mp modulo... Lp grids are each allocated Mp / Lp One camera, and the remaining grid is allocated to... Mp / Lp For each camera, the average Y-coordinate of the cameras at the critical positions of adjacent grids is taken as the horizontal dividing line (to avoid ambiguity in the attribution of cameras that happen to fall exactly on the boundary); ④ Finally, J grid boundaries are generated and numbered.

[0046] Finally, the coordinator multicasts the partitioning results, and each camera determines its virtual grid according to the principle of left-closed, right-open, and bottom-closed, top-open, then proceeds to elect a group leader. This method allows the grid size to adaptively adjust with the camera density, achieving load balancing for grid group leaders.

[0047] (II) Complete technical implementation process: Prerequisites: Same as above.

[0048] Complete process: 1. Entry registration cancellation: When a worker enters the construction site, the facial recognition device at the entrance verifies their identity and saves their facial feature vector. When the worker leaves the construction site, the facial feature vector is deleted from the local database after verification.

[0049] 2. Internal face capture: Facial recognition cameras on the construction site record facial feature vectors and the detection time point when a face is detected. If the same person is detected repeatedly, the latest detection time point is updated.

[0050] 3. Multicast notification verification: The face verification device periodically (e.g., every 2 hours) sends a multicast notification to unauthorized personnel, including the latest locally recorded facial feature vector sequence and the verification time.

[0051] 4. Local match-miss: After receiving the verification notification, the facial recognition camera on the construction site compares the facial feature vector sequence it recorded earlier than the verification time with the facial feature vector sequence in the multicast message. If it finds a sequence that is not in the sequence, it forms a missed facial feature vector sequence (including the latest detection time).

[0052] 5. Dynamic numbering competition: Because construction site cameras have a high failure rate and their number and location change dynamically, it is necessary to dynamically and continuously number the face recognition cameras to facilitate subsequent distributed aggregation of missed face operations.

[0053] The face recognition camera starts a random timer for 5-10 seconds (more than 5 seconds is to give the camera enough time to complete step 4), and at the same time starts listening for dynamic number declaration multicast messages in the network and records the maximum dynamic number currently declared.

[0054] The camera whose timeout expires first multicasts a dynamic number declaration message, declaring its dynamic number as 1 and including the declaration time. The second camera whose timeout expires multicasts a dynamic number declaration message, declaring its dynamic number as 2 (it detected the multicast message for dynamic number 1, so it knows the maximum declared dynamic number is 1, and increments its own by 1); and so on. If a camera sends a dynamic number declaration message and then receives declaration messages for the same dynamic number from other cameras, the declaration times are compared, and the one with the earlier time wins. The losing camera restarts a random timer for 1-5 seconds, while simultaneously listening for the maximum declared dynamic number in the network. Upon resetting its timer, it increments that maximum dynamic number by 1 and declares a new dynamic number. Finally, all face recognition cameras complete their dynamic numbering.

[0055] 6. Distributed Iterative Summary: (1) Start distributed iterative aggregation. If the camera with dynamic number 1 does not receive a new dynamic number declaration multicast message within a preset time (e.g., 10 seconds) (indicating that all cameras have completed dynamic numbering), then the multicast sends a missed face iterative aggregation message, carrying the aggregation round number (1 in this case), and notifies the multicast group member cameras to aggregate the missed face feature vector sequence in a distributed manner. The current round is the 1st round.

[0056] (2) The first round of distributed aggregation is performed by cameras with odd dynamic numbers sending multicast messages to cameras with even dynamic numbers that are one greater than their own to aggregate information. Specifically, cameras with odd dynamic numbers such as 1, 3, 5, etc. (i.e., dynamic numbers of 2n-1, n=1, 2, 3, 4, etc.) multicast and send a missed face synchronization message, carrying the aggregation round number (1 in this case), their own missed face feature vector sequence (including the latest detection time point), their own dynamic number, and their own static number. The target cameras in the data message are set to even dynamic numbers such as 2, 4, 6, etc. (i.e., the target camera dynamic number is 2n).

[0057] After receiving the message, other cameras in the multicast group parse the header. If it's not the target device, it discards it. The target even-numbered cameras, upon receiving the message, reply with a confirmation message to the source camera via unicast. They then mark themselves as active cameras and integrate the received sequence of missed face feature vectors with their own local sequence of missed face feature vectors. If there are face feature vectors with a similarity higher than a threshold, they are merged into one record, retaining the static ID of the last detected camera (for subsequent personnel location). This record is counted as 2; otherwise, it is counted as 1. If the former does not receive a unicast reply from the latter within a set time (e.g., 5 seconds) after sending the multicast message, it indicates the latter is faulty or the latter camera does not exist, and the former marks itself as an active camera. If the latter does not receive the former's multicast message within a set time (e.g., 5 seconds) after the camera with dynamic ID 1 sends a missed face iteration summary message, it indicates the former is faulty, and the latter marks itself as an active camera.

[0058] (3) Start the second round of summarization (supports self-healing). After the camera with dynamic number 1 multicasts the missed face synchronization message in step (2), it starts a preset timer (e.g., 5 seconds, pre-set). If it receives a missed face synchronization multicast message from another camera during this period, it restarts the preset timer. After the preset timer expires (meaning that all cameras that should have sent the missed face synchronization multicast message have completed sending), the camera with dynamic number 1 multicasts the missed face iteration summary message, carrying the summary round number (2 in this case), and notifies the start of the second round of missed face summarization. After other cameras multicast a missed face synchronization message in step (2), they also start a preset timer (with the same timer duration as the camera with dynamic number 1). Similarly, if they receive a missed face synchronization multicast message from another camera during this period, they restart the preset timer. After the preset timer expires, if the camera does not receive a multicast notification to start the second round message, it multicasts a notification to start the second round message itself; if it receives a multicast notification to start the second round message, it cancels its own timer. Considering network transmission jitter, each camera can introduce a small random delay (such as 0-10 milliseconds) after detecting that the timer has expired before sending the start notification to avoid message collisions in extreme cases. The purpose of step (3) is that if the camera with dynamic number 1 fails at this time, the camera with dynamic number 2 will multicast a notification to start the second round; and so on, to ensure that the second round can start normally. Since in step (2), the dynamic number 2 camera sends the missed face synchronization message after the dynamic number 1 camera, the dynamic number 3 camera sends the missed face synchronization message after the dynamic number 2 camera, and so on, and their preset timers are fixed and the same, theoretically the multicast notification to start the second round will not be repeated; even if there is a repetition, since it has already started, other cameras can ignore the message.

[0059] (4) Next is the second round of distributed aggregation. All active cameras update their own dynamic IDs, i.e., the new dynamic ID = Original dynamic number / 2 This indicates that the original dynamic number is divided by 2 and then rounded up. Therefore, the dynamic numbers of all active cameras are still consecutive numbers such as 1, 2, 3, 4, etc. Then, all active cameras operate according to the above step (2), and the sum of rounds in the multicast message is 2.

[0060] (5) Then continue with step (3), followed by the third and fourth rounds of distributed aggregation, until the last round.

[0061] (6) In the last round, the camera with the current dynamic number 1 will send a multicast message to the camera with the dynamic number 2. If no reply is received from the other party and no multicast message is received from other cameras (indicating that all other cameras have been summarized and only the camera with the dynamic number 1 remains), the iteration operation will stop. It will obtain a complete sequence of missing face feature vectors, including face feature vectors, statistics, and the static number of the latest detected camera, and then send the sequence to the face verification device at the entrance via unicast.

[0062] 7. Entry point filtering and positioning The face verification device views the received sequence of non-matching facial feature vectors and retains records of non-matching facial feature vectors with a count of >= 3 (this can be set to indicate that the face has been verified by multiple independent cameras to avoid false alarms). The number of records can be summarized to obtain the number of people who entered the area without passing the face verification device. At the same time, based on the static number of the latest detected camera associated with the non-matching facial feature vector, the location of the area where the person last appeared can be located to assist in security screening.

[0063] In this step, the entry device only needs to receive a final result message and perform simple threshold filtering, which puts very little pressure on its calculation and storage and does not affect its core gate verification task.

[0064] 8. Further improvements: Intra-group and inter-group summaries based on virtual grids.

[0065] In step 5, all cameras in the network are dynamically numbered using a flat, competitive system. If the construction site area is large and the number of cameras is high (e.g., more than 80), the probability of collisions is high, and false alarms will also increase. The improved approach is to use the physical location coordinates of the cameras to create "virtual groups (grids)," first aggregating within each group (small area), and then aggregating between groups to reduce network storms. The specific process is as follows: (1) The system administrator pre-divides the construction site into virtual grids using the management server (for example, pre-divides into 30m*30m grids, numbering the grids from left to right and from top to bottom as 1, 2, 3, etc.). The server then sends the grid number of each virtual grid and the coordinates of its upper left and lower right corners to each camera.

[0066] (2) Following step 4, after the face recognition camera receives the verification notification, it does not perform dynamic numbering across the entire network. Instead, it calculates the virtual grid to which it belongs based on its own location coordinates and the information of each grid range.

[0067] (3) Next, each camera starts a timer. The timer duration = base random value + (current task queue number * preset step size). The base random value can be set (e.g., 0-1 second random value, globally uniform), and the preset step size is globally uniformly set (e.g., 0.5 seconds). The current task queue number is the length of the unprocessed face detection task queue inside the camera. This timer duration indirectly reflects the current load of the camera; the shorter the duration, the lower the load. After the camera's timer expires, it multicasts a grid leader declaration message, including the virtual grid number and its own IP address. After receiving the grid leader declaration message, other cameras stop their own timers and unicast their own missed face feature vector sequence (including the latest detection time point), their own static number, and coordinates to the grid leader.

[0068] (4) After the group leader in each grid summarizes the sequence of missed face feature vectors from the cameras in the grid, a spatiotemporally constrained clustering algorithm is executed within the grid. That is, for two records with feature similarity higher than the threshold, their physical distance ΔS and time difference ΔT are calculated, and the moving speed V=ΔS / ΔT is calculated. If V<=Vmax (Vmax is the estimated normal moving speed of the person, such as 5m / s), they are merged into the same target, and the latest detection time point of the two records is retained; if V>Vmax, they are judged as false alarms or different people, and are not merged, but retained separately. If ΔT is less than the preset time threshold (such as 0.1 seconds), the records are directly merged without speed verification to avoid calculation errors.

[0069] (5) Each group leader represents their grid in the overall network aggregation. Then, following step 5, the group leaders are dynamically numbered (at this point, the number of nodes has been greatly reduced). Then, the subsequent steps 6 (distributed aggregation) and 7 (entry point filtering and positioning) are executed. During the aggregation process, the group leaders also perform "spatiotemporal consistency verification". That is, when merging records in each round, if two records come from the aggregation results of different group leaders, the static number of the latest detected camera and its coordinates are extracted. Similarly, ΔS, ΔT and velocity V are calculated. If V <= Vmax, they are merged; otherwise, they are retained separately (in step 7, retaining the face feature vectors of the missing faces with a statistical count >= 3 times can further eliminate false alarm data).

[0070] 9. Further improvements: Dynamic partitioning of virtual meshes.

[0071] In step 8, the virtual grid is pre-configured and has the same area. However, the distribution of cameras on the construction site may be uneven (e.g., dense in some areas, sparse in others), causing some grid leaders to be overloaded while others are idle. The improved approach is to adaptively adjust the grid size by estimating the camera distribution density. The specific process is as follows: (1) All cameras agree on a time each day (e.g., 6:00 AM) and each generate a random delay of 0-1 seconds. The camera whose timeout expires first sends a global coordinator declaration message via multicast, including its own static ID, IP address, and declaration timestamp. Upon receiving the declaration, other cameras stop timing and record that camera as the global coordinator; if a subsequent declaration with an earlier timestamp is received, the coordinator is updated.

[0072] (2) The global coordinator multicasts a location reporting request message, carrying the request ID. Each camera, upon receiving the message, unicasts its own static ID and location coordinates (X, Y). The global coordinator sets a timeout window (e.g., 5 seconds), collects all responses, and counts the number of cameras.

[0073] (3) The global coordinator performs equal-number rectangular subdivision based on the collected coordinate set. The goal is to divide all N cameras into J rectangular grids, with approximately the same number of cameras in each grid (the target value is approximately N / J, with some deviation allowed). The specific steps are as follows: 1) Determine the overall rectangle boundary: Xmin=min(Xi), Xmax=max(Xi), Ymin=min(Yi), Ymax=max(Yi), where Xi and Yi represent the position coordinates fed back by each camera, i=1,2,...,N.

[0074] 2) Vertical strip division: Set the vertical division number K = round (√J) (Note: K is the square root of J rounded to the nearest whole number).

[0075] Sort all cameras in ascending order of their X-coordinates, and assign them sequentially to the 1st to Kth vertical stripes from beginning to end. The first N... mod K strips are each allocated N / K (Note: N / K is rounded up) cameras, the remaining strips are allocated to... N / K (Note: N / K are rounded down) cameras.

[0076] The average X-coordinate of two cameras at the critical position of adjacent strips is taken as the vertical dividing line (note: if the X-coordinates of the two cameras are the same, a very small offset is added to the dividing line coordinates), resulting in X1, X2, …, XK-1, where X0=Xmin and XK=Xmax. This method avoids ambiguity regarding the attribution of cameras that happen to fall exactly on the boundary.

[0077] 3) Horizontal division within each longitudinal strip: For the p-th vertical strip (p=1, 2, ..., K), extract the subset of cameras within this strip, sort them in ascending order by Y coordinate, and let the number be Mp.

[0078] The target grid number Lp of the p-th vertical strip is allocated according to the following rule: Let Jbase = J / K (Note: J / K is rounded down), the remainder R = J - Jbase × K. The number of grid cells assigned to the first R stripes is Lp = Jbase + 1, and the number of grid cells assigned to the remaining stripes is Lp = Jbase.

[0079] Sort the Mp cameras within the strip according to their Y coordinates, and then sort the first Mp cameras by modulo... Lp grids are each allocated Mp / Lp One camera, and the remaining grid is allocated to... Mp / Lp For each camera, the average Y-coordinate of the cameras at the critical positions of adjacent grids is taken as the horizontal dividing line Yp,1, Yp,2, …, Yp,Lp-1, where Yp,0 = Ymin and Yp,Lp = Ymax. (Note: If the Y-coordinates of two cameras are the same, a very small offset is added to the horizontal dividing line coordinates.)

[0080] 4) Generate and number the mesh boundaries: Each grid is uniquely defined by its left, right, bottom, and top boundaries: Gridp,j: [Xp-1, Xp) × [Yp,j-1, Yp,j), where Gridp,j is the grid number, p represents the vertical strip number (from left to right), j represents the horizontal grid number (row number from bottom to top) within that vertical strip, [Xp-1, Xp) are the left and right boundaries of the grid, [Yp,j-1, Yp,j) are the bottom and top boundaries, and × is the Cartesian product, representing the rectangular region enclosed by the X and Y intervals.

[0081] (4) The coordinator encapsulates the generated grid ID and boundary information into a grid division result message, and performs multicast notification. Each camera determines which grid it falls into according to its own coordinates (adopting the principle of left-closed right-open and bottom-closed top-open, e.g., Xp-1 ≤ X < Xp and Yp,j-1 ≤ Y < Yp,j). For a camera whose coordinate is exactly equal to the overall maximum boundary (X = Xmax or Y = Ymax), it is classified into the last grid (that is, setting the right boundary of the rightmost grid as a closed interval and the upper boundary of the topmost grid as a closed interval, or including the point by adding a very small offset to the maximum value), so as to ensure that all cameras have a grid they belong to. Thereafter, each camera records its own grid number and enters the leader election stage (see step 8(3) for subsequent content).

[0082] (5) Example of dynamic division of virtual grids: Assume the number of cameras N = 100, and the target number of divided grids J = 6.

[0083] Then the number of longitudinal divisions K = Round(√J) = 2, that is, 2 longitudinal segments are divided.

[0084] Longitudinal strip 1: L1 = 3 (3 grids), longitudinal strip 2: L2 = 3 (3 grids).

[0085] Strip 1 (number of cameras M1 = 50, number of grids L1 = 3): 50 mod 3 = 2. The first 2 grids are each allocated 50 / 3 = 17 cameras, and the 3rd grid is allocated 50 / 3 = 16 cameras. After sorting by Y coordinate, the average value of Y coordinates at the critical positions of adjacent grids is taken to obtain horizontal dividing lines Y1,1, Y1,2.

[0086] Strip 2 (number of cameras M2 = 50, number of grids L2 = 3): 50 mod 3 = 2. The first 2 grids are each allocated 17 cameras, and the 3rd grid is allocated 16 cameras. The horizontal dividing lines Y2,1, Y2,2 are obtained.

[0087] Finally, 6 grids are obtained, and the number of cameras in each grid is 17 or 16, which are relatively close.

[0088] Beneficial effects: 1. Adaptive distributed collaboration. In weak network and dynamic environments, unauthorized person detection and positioning can be completed without a central server.

[0089] 2. High-precision false alarm filtering. Through spatio-temporal cross-validation by multiple cameras, false alarms caused by environmental interference can be effectively eliminated.

[0090] 3. High scalability. Through intra-group and inter-group aggregation mechanisms based on virtual grids, and dynamic partitioning methods for virtual networks, it supports large-scale self-organizing and collaborative work of cameras.

[0091] New innovation point: 1. Distributed Dynamic Numbering and Iterative Summarization. Cameras generate dynamic, continuous numbers through random timing competition. An iterative process of sending numbers from odd-numbered cameras to even-numbered cameras is used to merge unauthorized facial features. The winning camera in the merging process ultimately obtains the complete sequence. This mechanism requires no fixed network topology and can automatically adapt to camera malfunctions, additions, removals, or changes in location.

[0092] 2. Spatiotemporal constraint cross-validation. When merging similar facial features, the moving speed (V=ΔS / ΔT) is calculated by combining physical distance and time difference. Only when the speed is less than or equal to the normal threshold is the target identified as the same; otherwise, it is retained as a false alarm, significantly improving recognition accuracy.

[0093] 3. Virtual Grid Grouping and Load Balancing. Virtual grids are divided according to geographical location. Within each grid, a group leader is elected using a load-aware timer (duration = base random value + task queue number × step size), with priority given to grids with light loads. After spatiotemporal clustering, the group leader represents the grid in the overall network aggregation, significantly reducing communication volume.

[0094] 4. Dynamic Grid Partitioning. Camera coordinates are collected daily by a temporary global coordinator. A grid is dynamically generated using an equal-number rectangular partitioning algorithm (vertical partition number K = round(√J), horizontal partition number is equally distributed) to ensure that the number of cameras in each grid is approximately equal, thus achieving load balancing for the group leader.

[0095] 5. Fault self-healing and timeout retransmission. In case of dynamic number conflict, the losing party will compete again; if the target does not respond in the summary, the source node will automatically become the active node; if the coordinator fails, the next round will be triggered by the subsequent number, ensuring that a single point of failure does not affect the overall process.

[0096] Another embodiment of the present invention provides a smart park personnel management system, see [link to relevant documentation]. Figure 3 The system may include: The distribution module 301 is used for multicast distribution of authorization information and local comparison: Based on the verification notification periodically generated by the entrance face verification device, which contains the face feature vector of the currently authorized person, it is sent to all cameras in the park via multicast. This triggers each camera to compare the face feature vectors detected before the verification time point recorded locally with the authorization sequence, and to filter out the unauthorized face feature vectors that do not match the authorization sequence and their detection time points. Competition module 302 is used for distributed dynamic number competition: after each camera completes local comparison, a random timer is started, and a unique continuous dynamic number is generated in the whole network through multicast declaration and conflict resolution mechanism to obtain the dynamic number allocation result of each camera; The verification module 303 is used for fault self-healing iterative merging and spatiotemporal cross-verification: a multi-round merging process is triggered based on the camera with dynamic number 1. In each round, the odd-numbered camera multicasts the unauthorized face feature vector sequence to the even-numbered camera. After receiving the sequence, the even-numbered camera performs feature similarity comparison. When the similarity is higher than the face similarity threshold, the movement speed is further calculated by combining the physical distance and time difference between the two records. Only when the speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, the two records are merged into the same target and the count is accumulated. Otherwise, they are retained separately. After multiple rounds of merging, the camera that wins the final round obtains the complete unauthorized face feature sequence and statistical information. During the merging process, the single-point failure of the camera is automatically completed by the non-faulty camera according to the preset timer and relay triggering mechanism. The reporting module 304 is used for result reporting and filtering location: the complete sequence is unicast to the entrance face verification device according to the final winning camera. The entrance device filters out the records of unauthorized personnel whose number of times exceeds the preset statistical threshold, and associates them with the last appearance location to obtain the unauthorized personnel information.

[0097] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0098] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0099] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0100] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A method for personnel management in a smart industrial park, characterized in that, The method includes: Authorization information multicast delivery and local comparison: Based on the verification notification periodically generated by the entrance face verification device, which contains the face feature vector of the currently authorized person, it is sent to all cameras in the park via multicast. This triggers each camera to compare the face feature vectors detected before the verification time point recorded locally with the authorization sequence, and to filter out the unauthorized face feature vectors that do not match the authorization sequence and their detection time points. Distributed dynamic numbering competition: After each camera completes local comparison, a random timer is started, and a unique continuous dynamic number is generated across the entire network through multicast declaration and conflict resolution mechanism to obtain the dynamic numbering allocation result for each camera; Fault self-healing iterative merging and spatiotemporal cross-validation: Multiple merging processes are triggered based on the camera with dynamic number 1. In each round, odd-numbered cameras multicast unauthorized face feature vector sequences to even-numbered cameras. After receiving the sequences, even-numbered cameras compare feature similarity. When the similarity is higher than the face similarity threshold, the movement speed is calculated by combining the physical distance and time difference between the two records. Only when the speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold are the cameras merged into the same target and the count is accumulated. Otherwise, they are retained separately. After multiple rounds of merging, the camera that wins the final round obtains the complete unauthorized face feature sequence and statistical information. During the merging process, single-point failures of cameras are automatically resolved by non-faulty cameras according to a preset timer and relay triggering mechanism. Result reporting and screening location: The complete sequence of the winning camera is unicast to the entrance face verification device. The entrance device filters out the records of unauthorized personnel whose number of occurrences exceeds a preset statistical threshold, and associates them with the location of their last appearance to obtain the information of the unauthorized personnel.

2. The method according to claim 1, characterized in that, The authorization information multicast delivery and local comparison include: Authorization sequence generation and multicast: Based on the entrance face verification device reading the authorized face feature vectors of the currently present personnel stored locally at a preset period, a verification notification message is generated. The message contains the authorized face feature vector sequence and the verification time point, and is sent to all cameras in the park through a preset multicast address. Local record maintenance: Based on the continuous detection of people's faces by various cameras in the park, feature vectors are extracted for each detected face and the detection time point is recorded. If the same person appears repeatedly, only the latest detection time point is updated. Comparison and Extraction: After receiving the verification notification from the camera, extract all facial feature vectors in the local record that are earlier than the verification time point, compare them one by one with the authorized sequence, and filter out the feature vectors that do not appear in the authorized sequence and their latest detection time points to form a local unauthorized facial feature vector sequence.

3. The method according to claim 2, characterized in that, The distributed dynamic numbering contention includes: Random timing start: After each camera completes local comparison, a random timing value is generated within a preset random time range, and timing begins. At the same time, the system listens for dynamic number declaration messages sent by other cameras in the network. Initial Declaration and Number Increment: The camera whose timeout expires first sends a dynamic number declaration message via multicast, declaring its own dynamic number as 1 and carrying a declaration timestamp; subsequent cameras whose timeouts expire are declared based on the maximum dynamic number that has been detected, adding 1 to it as their own dynamic number. Conflict resolution: If a camera receives a claim with the same dynamic number from another camera after sending its own claim, the timestamps of the claims are compared. The camera with the later timestamp restarts random timing and re-claims after listening for the current maximum dynamic number, until all cameras obtain a unique continuous dynamic number.

4. The method according to claim 3, characterized in that, The fault self-healing iterative merging and spatiotemporal cross-validation include: First round of merging triggered: After the camera with dynamic number 1 does not detect a new dynamic number declaration within a preset time, a multicast notification message to start the first round of merging is sent. Odd-to-even transmission: After receiving the start notification, the camera with an odd dynamic number sends a missed face synchronization multicast message to the even-numbered camera with a dynamic number that is 1 greater than its own. The message carries its own dynamic number, static number, summary round number and unauthorized face feature vector sequence, which includes the latest detection time point. Reception and Confirmation: After receiving multicast messages from the target even-numbered cameras, the target cameras reply with confirmation messages to the source cameras via unicast and mark themselves as active cameras. If the source camera does not receive confirmation within a preset time, it marks itself as an active camera. If the target even-numbered cameras do not receive multicast messages from odd-numbered cameras with dynamic numbers one less than their own within a preset time, they mark themselves as active cameras. Feature merging and spatiotemporal verification: Based on the number of active even-numbered cameras, the received sequences are merged with the local sequences. For two records with a similarity higher than the face similarity threshold, the installation coordinates are obtained based on the static number of the associated camera, the physical distance and time difference are calculated, and then the movement speed is calculated. If the movement speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, they are determined to be the same target, the records are merged, the latest detection time point and the corresponding static number of the camera are retained, and the count is accumulated; otherwise, two records are retained respectively. Multiple iterations and fault self-healing: After the first round of merging is completed, the camera with dynamic number 1 starts the first timer. If it receives a multicast message from another camera indicating a missed face during the timer period, it restarts the first timer. After the timer expires and it is confirmed that all odd-numbered cameras have sent their data, it triggers the next round of startup notification. All active cameras update their own dynamic number to the original number divided by two and rounded up. The process is repeated, with odd-numbered cameras sending data to even-numbered cameras for feature merging and spatiotemporal verification. If the camera with dynamic number 1 fails before triggering the next round of startup notification, the camera with the smallest dynamic number among the subsequent dynamic numbered cameras will take over and trigger the startup notification when its second timer expires and it has not received the next round of startup notification. Through multiple iterations, until only one active camera obtains the complete unauthorized face feature sequence.

5. The method according to claim 4, characterized in that, The result reporting and filtering / location include: Final result unicast reporting: Based on the winning camera, the complete unauthorized face feature sequence is encapsulated into a unicast message. The sequence includes the face feature vector, count, and static number of the latest detected camera for each unauthorized record, and is sent to the entrance face verification device. Threshold filtering: After the face verification device at the entrance receives the sequence, it filters out unauthorized records whose count is greater than or equal to a preset statistical threshold to obtain a set of suspected unauthorized persons; Location positioning: Based on the static camera numbers associated with the filtered records, locate the corresponding installation locations, determine the area where unauthorized personnel last appeared, and generate the number and location information of unauthorized personnel.

6. The method according to claim 5, characterized in that, The method also includes hierarchical aggregation and dynamic partitioning based on virtual grids: Grid affiliation determination: Based on the virtual grid information pre-acquired by each camera and divided according to its geographical location, the grid number to which it belongs is determined in combination with its own installation coordinates; Group leader election within the grid: Based on the load perception timer started by each camera in the same grid, the timing duration of the load perception timer is the sum of the product of the base random value, the current task queue number and the preset step size. The camera whose timer expires first sends a group leader declaration, and the other cameras in the same grid stop timing and unicast their unauthorized face feature vector sequence, static number and coordinates to the group leader. Intra-group spatiotemporal clustering: After the group leader collects all data within the grid, spatiotemporal cross-validation based on velocity constraints is performed. For two records with feature similarity higher than the face similarity threshold, the physical distance and time difference are calculated to obtain the movement speed. If the movement speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, they are merged into the same target; otherwise, they are retained separately to obtain the grid-level unauthorized face summary result. Inter-group aggregation: Each grid group leader participates in the dynamic numbering and iterative merging of the entire network as a representative. During the merging process, the group leaders perform spatiotemporal cross-validation based on velocity constraints again to merge the same target records across grids and obtain the unauthorized face feature sequence of the entire park.

7. The method according to claim 6, characterized in that, The method also includes dynamic partitioning of the virtual mesh: Global coordinator election: Based on the daily agreed time, all cameras generate random delays, and the camera whose delay expires first sends a declaration to become the temporary global coordinator; Coordinate collection: Based on the location reporting request sent by the global coordinator via multicast, collect the static IDs and installation coordinates of all cameras; Adaptive Mesh Generation: Based on the coordinate set collected by the global coordinator, a virtual mesh is generated by executing an equal-number rectangular segmentation algorithm that ensures approximately equal numbers of cameras within each mesh. The algorithm includes: determining the overall rectangular boundary; setting the vertical segmentation number K to the square root of the target mesh number J, rounded to the nearest whole number; sorting all cameras by their X-coordinates and assigning them to K vertical strips, where the first N mod K strips are each assigned... N / K One camera, with the remaining strips each allocated... N / K There are 10 cameras, and the average X-coordinate of the cameras at the critical positions of adjacent strips is taken as the longitudinal dividing line; for each longitudinal strip, the target grid number Lp is assigned to the strip according to the total grid number J and the longitudinal division number K, where let The remainder R = J - Jbase * K, the first R strips are assigned grid numbers Lp = Jbase + 1, and the remaining strips are assigned grid numbers Lp = Jbase; after sorting the Mp cameras in the current vertical strip according to their Y coordinates, they are assigned to Lp horizontal grids, and the first Mp mod Lp grids are each assigned... Mp / Lp One camera, and the remaining grid is allocated to... Mp / Lp A set of cameras is used, and the average Y-coordinate of the cameras at the critical positions of adjacent grids is taken as the horizontal dividing line; the boundaries of each grid are generated and numbered, and the boundaries adopt the principle of left-closed and right-open, and bottom-closed and top-open; The grid division results are distributed as follows: The global coordinator multicasts the generated grid division results to each camera. Each camera determines its grid according to its own coordinates, following the principle of left-closed and right-open, and bottom-closed and top-open, and updates its grid affiliation.

8. A smart park personnel management system, characterized in that, The system includes: The distribution module is used for multicast distribution and local comparison of authorization information: Based on the verification notification periodically generated by the entrance face verification device, which contains the face feature vector of the currently authorized person, it is sent to all cameras in the park via multicast. This triggers each camera to compare the face feature vectors detected before the verification time point recorded locally with the authorization sequence, and to filter out the unauthorized face feature vectors that do not match the authorization sequence and their detection time points. The competition module is used for distributed dynamic number competition: after each camera completes local comparison, a random timer is started, and a unique continuous dynamic number is generated across the entire network through multicast declaration and conflict resolution mechanism to obtain the dynamic number allocation result of each camera; The verification module is used for fault self-healing iterative merging and spatiotemporal cross-verification: multiple merging processes are triggered based on the camera with dynamic number 1. In each round, the odd-numbered camera multicasts the unauthorized face feature vector sequence to the even-numbered camera. After receiving the sequence, the even-numbered camera performs feature similarity comparison. When the similarity is higher than the face similarity threshold, the movement speed is further calculated by combining the physical distance and time difference between the two records. Only when the speed is less than or equal to the preset normal movement speed threshold or the time difference is less than the preset minimum time threshold, the two records are merged into the same target and the count is accumulated. Otherwise, they are retained separately. After multiple rounds of merging, the camera that wins the final round obtains the complete unauthorized face feature sequence and statistical information. During the merging process, the single-point failure of the camera is automatically completed by the non-faulty camera according to the preset timer and relay triggering mechanism. The reporting module is used for result reporting and filtering location: the complete sequence of the winning camera is unicast to the entrance face verification device, and the entrance device filters out the records of unauthorized personnel whose number of times exceeds the preset statistical threshold, and associates them with the last appearance location to obtain the unauthorized personnel information.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method of any one of claims 1-6 when it is run.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-6.