A safety identification method and system for a smart camera

By constructing a two-dimensional grid map and a three-dimensional scene model containing semantic labels, the behavioral intentions of moving targets at the construction site are identified, and static and dynamic risk fields are generated. The warning threshold is dynamically calculated, which solves the problems of high false alarm rate and rigid threshold at the construction site and achieves accurate safety warning.

CN122116266APending Publication Date: 2026-05-29GUANGZHOU JINYUAN TECH DEV CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU JINYUAN TECH DEV CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-29

Smart Images

  • Figure CN122116266A_ABST
    Figure CN122116266A_ABST
Patent Text Reader

Abstract

The application belongs to the field of safety identification, and discloses a safety identification method and system for an intelligent camera. The method comprises the following steps: generating a two-dimensional grid map containing semantic labels based on a real-time video stream of a construction site and a three-dimensional scene model; detecting and tracking a moving target in the video stream to obtain its continuous trajectory in a world coordinate system; identifying the behavior intention of the moving target by combining the trajectory and the semantic labels of the grid; generating a static risk field based on a static dangerous area, and generating a dynamic risk field of space-time diffusion for a preset risk intention target; obtaining a total risk field by fusing the static and dynamic risk fields, and calculating a real-time personal risk value of a person; and dynamically adjusting a warning threshold in combination with the area type, historical warning information and behavior intention, and generating a warning if the threshold is exceeded. The application accurately identifies intention through multi-dimensional features, filters normal operation to reduce false positives, realizes spatial quantization of risk and individual accurate dynamic measurement, and can balance the sensitivity and accuracy of the warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of security identification, and more particularly to a security identification method and system for smart cameras. Background Technology

[0002] In complex work scenarios such as construction, mining, and large equipment installation, personnel coexist with heavy machinery, working at heights, and hazardous areas, resulting in extremely high safety risks. To prevent accidents, automatic safety early warning technology based on video surveillance has become a hot topic in research and application.

[0003] Currently, most mainstream automated early warning methods rely on analyzing the displacement or trajectory of target objects in surveillance videos. The typical technical approach involves identifying and locating moving objects (such as people or vehicles) in a scene using target detection and tracking algorithms, calculating their position, speed, and other motion parameters, and setting fixed speed thresholds or displacement boundaries. When the detected object's speed exceeds the preset threshold, or its position intrudes into a pre-defined virtual electronic fence (such as near a pit or edge), the system triggers an alarm.

[0004] However, these early warning methods based on simple displacement criteria reveal significant shortcomings in complex real-world construction scenarios. The core problem lies in their inability to effectively distinguish between "normal operational behavior" and "genuine dangerous behavior," leading to a high false alarm rate. Specifically: Normal operations are misjudged as dangerous: For example, workers running quickly in passageways to pass tools, trucks reversing into loading and unloading areas according to designated routes, and normal movement of tower crane hooks are all planned or necessary operations. However, because the displacement speed or position triggers a fixed threshold, they are often misreported by the system as "personnel running danger", "vehicles approaching abnormally" or "uncontrolled hoisting".

[0005] Lack of contextual information: Existing methods only focus on the kinematic characteristics of objects themselves, ignoring their behavioral intentions and their interactions with the scene structure and other objects. For example, a worker approaching the edge of a pit may have similar displacements if their intention is to "go around" or "stop to observe" (normal) versus "slip and fall" (dangerous), but the risks are completely different. The system makes incorrect judgments because it cannot understand this context.

[0006] Rigid threshold settings: Fixed speed or distance thresholds cannot adapt to diverse work stages, job characteristics, and dynamic changes in scenarios. For example, during peak concrete pouring periods, frequent vehicle traffic is normal, and a rigid threshold will cause frequent alarms; while at night, slight abnormalities may indicate real risks, and a fixed threshold may miss alarms.

[0007] High false alarm rates have serious consequences: on the one hand, frequent false alarms severely disrupt normal on-site operations, leading to a "boy who cried wolf" effect, causing staff to become desensitized and distrustful of the early warning system, thus ignoring genuine danger warnings; on the other hand, blindly raising alarm thresholds to reduce false alarms significantly increases the risk of missed alarms, rendering the system ineffective. Therefore, accurately understanding behavioral intent and achieving a leap from "displacement judgment" to "semantic understanding" to fundamentally reduce false alarm rates has become a core technical bottleneck that must be overcome for practical application in this field.

[0008] Existing technologies also include some methods that attempt to introduce simple rules or scenario information, but these are mostly limited to adding limited filtering conditions on the basis of displacement judgment. They have failed to establish a complete, quantifiable, and dynamically coupled behavioral intent understanding and risk assessment model that can address both dynamic and static risks. As a result, they have limited effectiveness in controlling false alarm rates and cannot meet the high-precision and high-reliability early warning requirements in complex construction scenarios. Summary of the Invention

[0009] The purpose of this invention is to disclose a secure identification method and system for smart cameras, thereby solving the technical problems mentioned in the background art.

[0010] To achieve the above objectives, the present invention adopts the following technical solution: On one hand, the present invention provides a secure identification method for smart cameras, comprising: S1. Generate a two-dimensional grid map containing semantic tags based on real-time video streams and 3D scene model data from the construction site; S2. Perform target detection and tracking on the real-time video stream to obtain the continuous trajectory of each moving target in the world coordinate system corresponding to the two-dimensional grid map; S3. Based on the continuous trajectory of each moving target and the semantic label of its grid cell, identify and output the behavioral intention category of each moving target; S4. Based on the static hazardous areas marked in the two-dimensional grid map, calculate and generate a static risk field; S5. For moving targets identified as having a preset behavioral intention category in S3, generate a dynamic risk field that spreads over time and space based on their motion state information. S6. Merge the static risk field generated in S4 with all the dynamic risk fields generated in S5 to obtain the total risk field, and calculate the real-time personal risk value of the person based on the position of the person in the total risk field. S7. Based on the type of the area where the person is located, their historical early warning information, and the behavioral intention category identified in S3, dynamically calculate the individualized early warning threshold. When the real-time personal risk value calculated in S6 exceeds the individualized early warning threshold, generate early warning information.

[0011] Preferably, generating a two-dimensional grid map containing semantic labels includes: S11. By optimizing the pose relationship between the camera and the 3D scene model, establish the projection relationship between the pixel coordinates of the video image and the world coordinates. S12. Project the semantic information and danger zone labels in the three-dimensional scene model onto the ground plane, and perform grid discretization to form a two-dimensional grid map in which each grid cell has a semantic label.

[0012] Preferably, acquiring the continuous trajectory of each moving target includes: S21. Perform target detection on video frames in the real-time video stream to obtain the bounding boxes and category information of moving targets; S22. Transform the image coordinates of the moving target into the world coordinate system of the two-dimensional grid map through the projection relationship established in S11 to obtain its world coordinates; S23. Based on the world coordinates, category information, and appearance features, a multi-target tracking algorithm is used to associate the same moving target across frames to form continuous trajectories for each moving target.

[0013] Preferably, the identification and output of the behavioral intent category of each moving target includes: S31. Based on the continuous trajectory of each moving target and the semantic label of its grid cell, extract kinematic features, scene interaction features and social interaction features to form a behavioral feature vector. S32. Input the behavior feature vector into the pre-trained behavior classification model and output the behavior intention category and confidence level of each moving target.

[0014] Preferably, the calculation to generate the static risk field includes: S41. Configure the type, impact range, and maximum risk value for each type of static hazardous area in the two-dimensional grid map; S42. Based on the location, type, influence range, and maximum risk value of the static hazard area, a preset attenuation function is used to calculate the static risk value of each grid cell in the two-dimensional grid map, forming a static risk field.

[0015] Preferably, the generation of the dynamic risk field that diffuses over time and space includes: S51. Based on the behavioral intent category identified in S3, select the corresponding dynamic risk calculation formula; S52. Based on the dynamic risk field calculation model, calculate and generate a dynamic risk field covering a two-dimensional grid map.

[0016] Preferably, the calculation process of the real-time personal risk value includes: S61. For each grid cell in the two-dimensional grid map, take the maximum value from the static risk value and all dynamic risk values ​​of the grid cell as the total risk value of the grid cell. S62. Determine the grid cell in which the person is located based on the person's world coordinates, and use the total risk value of that grid cell or the statistical value of the total risk value of its neighboring grid cells as the person's real-time personal risk value.

[0017] Preferably, the dynamic calculation of the individualized early warning threshold includes: S71. Determine the basic threshold based on the semantic label of the grid cell where the person is located; S72. Based on the person's last warning time interval, the recent warning frequency of their area, and the current behavioral intent category identified in S3, calculate the time decay factor, the regional warning frequency factor, and the behavioral context factor, respectively. S73. Multiply the basic threshold by the factors of each type calculated in S72 to obtain the individualized early warning threshold for the person.

[0018] Preferably, optimizing the pose relationship between the camera and the 3D scene model includes: S111, from the current video frame Extracting ORB feature point set Each feature point contains pixel coordinates. Extract the corresponding feature point set from the BIM model rendering or point cloud projection. Each feature point contains world coordinates. ; S112, If the camera mounting position is known, use the mounting parameters as the initial rotation matrix. Translation vector Otherwise, use the PnP algorithm to estimate the initial camera pose. ]; S113, Establish the reprojection error function: in, For camera projection function, , Homogeneous coordinates; Let be the rotation matrix to be optimized. ; Let be the translation vector to be optimized. Optimization using the Levenberg-Marquardt algorithm ,make Minimize to obtain the optimized extrinsic parameters. and .

[0019] On the other hand, the present invention provides a security identification system for smart cameras, comprising: The generation module is used to generate a two-dimensional grid map containing semantic tags based on real-time video streams and 3D scene model data from the construction site. The acquisition module is used to perform target detection and tracking on the real-time video stream and acquire the continuous trajectory of each moving target in the world coordinate system corresponding to the two-dimensional grid map; The identification module is used to identify and output the behavioral intention category of each moving target based on the continuous trajectory of each moving target and the semantic label of the grid cell in which it is located; The calculation module is used to calculate and generate a static risk field based on the static hazardous areas marked in the two-dimensional grid map; The generation module is also used to generate a dynamic risk field that spreads over time and space based on the motion state information of moving targets identified as belonging to a preset behavioral intention category. The calculation module is also used to merge the generated static risk field with all generated dynamic risk fields to obtain the total risk field, and to calculate the real-time personal risk value of the person based on the person's position in the total risk field. The early warning module is used to dynamically calculate an individualized early warning threshold based on the type of area where the person is located, their historical early warning information, and the identified behavioral intent category. When the calculated real-time personal risk value exceeds the individualized early warning threshold, an early warning message is generated.

[0020] Beneficial effects: Existing technologies, relying solely on simple kinematic features such as displacement and velocity, cannot distinguish between "normal work behavior" and "real dangerous behavior." This invention, through step S3 (behavioral intent recognition), integrates multi-dimensional features of kinematics, scene interaction, and social interaction, utilizing machine learning models (such as GBDT) to accurately understand the target's behavioral intent (e.g., distinguishing between "observing around" and "slipping and falling"), thereby filtering out a large number of planned normal operations from the warning judgment, fundamentally solving the core problem of high false alarm rates. Existing methods lack consideration for scene context and interactions with other objects. This invention quantifies and spatializes risk through steps S1 (constructing a semantically meaningful two-dimensional grid map) and S4 / S5 (constructing dynamic and static risk fields). The static risk field models inherently dangerous areas (such as potholes and edges), while the dynamic risk field simulates the spatiotemporal diffusion of risky behavioral intents (such as falling objects or vehicle anomalies). Finally, in S6, a total risk field is formed through fusion, and a personalized risk value associated with each person's specific location and behavior is calculated. This makes risk assessment no longer a general regional judgment, but a dynamic measurement precise to the individual, location, and instantaneous behavioral context. Addressing the problem of rigid thresholds in existing technologies that cannot adapt to dynamic changes in different work stages and scenarios, this invention introduces a multi-factor dynamic threshold adjustment mechanism in S7. The warning threshold is no longer fixed, but dynamically calculated based on the basic risk level of the area where the person is located, the historical warning frequency of the person and the area, the time decay effect, and the person's current behavioral intention (whether they are performing high-risk work). This enables the system to automatically increase alarm sensitivity during high-risk periods or areas, automatically suppress false alarms after frequent false alarms, or reduce interference in low-risk operations, achieving an adaptive balance between warning sensitivity and accuracy, effectively avoiding the "crying wolf" effect and the risk of missed alarms. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of a security identification method for smart cameras according to the present invention.

[0023] Figure 2 This is a schematic diagram of a security identification system for a smart camera according to the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0025] like Figure 1 As shown in one embodiment, the present invention provides a secure identification method for smart cameras, including... S1. Based on real-time video streams and 3D scene model data from the construction site, generate a 2D grid map containing semantic tags.

[0026] Specifically, the real-time video stream is acquired through smart cameras set up at the construction site (RGB image frame sequence), denoted as the t-th frame. The 3D scene model data is either a scene BIM model (including semantic information) or a 3D point cloud, denoted as 3D point cloud. ,in This represents world coordinates. Additionally, the camera intrinsic parameter matrix K (with known calibration results) can be obtained in S1, with a size of 3×3.

[0027] Preferably, generating a two-dimensional grid map containing semantic labels includes: S11. By optimizing the pose relationship between the camera and the 3D scene model, establish the projection relationship between the pixel coordinates of the video image and the world coordinates.

[0028] Furthermore, optimizing the pose relationship between the camera and the 3D scene model includes: S111, from the current video frame Extracting ORB feature point set Each feature point contains pixel coordinates. Extract the corresponding feature point set from the BIM model or point cloud projection map of the scene captured by the camera. Each feature point contains world coordinates. ; Feature points refer to pixels in an image that have significant local features (such as corner points, edge intersections, and texture protrusions). These points can be stably detected and matched in different images and are often used for tasks such as image alignment and 3D reconstruction.

[0029] A feature point set refers to a collection of feature points. In S111, the feature point set is discussed. and By matching these two sets of feature points, a correspondence between image pixels and 3D world coordinates can be established, which can be used for subsequent camera pose optimization.

[0030] S112, If the camera mounting position is known, use the mounting parameters as the initial rotation matrix. Translation vector Otherwise, use the PnP algorithm to estimate the initial camera pose. ]; S113, Establish the reprojection error function: in, For camera projection function, , Homogeneous coordinates; Let be the rotation matrix to be optimized. ; Let be the translation vector to be optimized. ; M represents the number of feature points, i.e., the number of feature point pairs extracted and successfully matched from the image and model. P represents the coordinates of a point in 3D space in the world coordinate system. K represents the camera's intrinsic parameter matrix.

[0031] Optimize using the Levenberg-Marquardt algorithm ,make Minimize to obtain the optimized extrinsic parameters. and Thus, the optimized camera projection matrix is ​​obtained. .

[0032] The above steps establish a precise projection relationship between image pixels and world coordinates, solving the problem of object positioning deviation caused by camera perspective and distortion, and laying a geometric foundation for subsequent accurate trajectory analysis and risk assessment under a unified world coordinate system.

[0033] S12. Project the semantic information and danger zone labels in the three-dimensional scene model onto the ground plane, and perform grid discretization to form a two-dimensional grid map in which each grid cell has a semantic label.

[0034] Furthermore, S12 includes: S121. Ground Plane Extraction: Assume the construction ground is a plane. (This can be adjusted based on point cloud fitting). In the world coordinate system, the Z-axis points vertically upwards, and the equation of the ground plane is: .

[0035] S122. Coordinate Transformation: Projecting hazardous areas (openings, edges, etc.) in the 3D BIM model vertically onto the ground plane to obtain a set of 2D polygonal regions. Each region Consists of a series of vertex coordinates describe.

[0036] S123. Mesh Discretization: Set grid resolution (e.g., 0.1 meters per grid). Create a 2D grid map. The size is The range of the monitored area in world coordinates . and These represent the minimum and maximum X-axis coordinates of the monitored area in the world coordinate system, respectively. and These are the minimum and maximum values ​​of the Y-axis coordinates of the monitored area in the world coordinate system, respectively. Each grid cell (in , and Record the following information (number of columns and number of rows for each grid cell): Semantic tags (such as passageways, work areas, openings, edges, etc.).

[0037] World coordinates , , .

[0038] In step S12 of this invention, the complex scene knowledge is transformed into structured data that can be quantified and processed by a computer by discretizing the three-dimensional scene structure and semantic information (such as dangerous areas) into labeled two-dimensional grids, thus providing a static knowledge base for subsequent location-based scene interaction analysis.

[0039] S2. Target detection and tracking are performed on the real-time video stream to obtain the continuous trajectory of each moving target in the world coordinate system corresponding to the two-dimensional grid map.

[0040] The goal of S2 is to identify and track all moving objects in the scene and obtain their continuous motion trajectories.

[0041] Preferably, acquiring the continuous trajectory of each moving target includes: S21. Perform target detection on video frames in the real-time video stream to obtain the bounding boxes and category information of moving targets.

[0042] Specifically, YOLOv8 is used to detect each video frame. The objects in the set are used to obtain the detection set. : in: The bounding box range, and These are the minimum and maximum X-axis coordinates within the bounding box, respectively. and These are the minimum and maximum Y-axis coordinates within the bounding box, respectively. u and v are the X-axis and Y-axis coordinates within the bounding box, respectively. To test the confidence level. Category information (such as people, vehicles, etc.).

[0043] The present invention's S21 can accurately identify and frame moving targets such as people and vehicles in video frames and their categories, providing reliable initial input for subsequent tracking and behavior analysis, and avoiding the loss of risky targets due to detection omissions or false detections.

[0044] S22. The image coordinates of the moving target are transformed into the world coordinate system of the two-dimensional grid map through the projection relationship established in S11 to obtain its world coordinates.

[0045] Specifically, for each detection box Take the pixel coordinates of the top center point. Using the obtained camera projection matrix Calculate its ground position (assuming the object is on the ground). superior): The world plane coordinates are obtained by solving. .in is the scale factor. and These are the X-axis and Y-axis coordinates in the world coordinate system, respectively.

[0046] The above step S22 converts the image pixel position of the target into real-world coordinates, so that the judgment of the target's movement speed and distance is based on the real physical scale, rather than the image pixel distance affected by perspective, thus solving the problem of displacement judgment distortion.

[0047] S23. Based on the world coordinates, category information, and appearance features, a multi-target tracking algorithm is used to associate the same moving target across frames to form continuous trajectories for each moving target.

[0048] Specifically, each trajectory The state vector is ,in For location, For speed.

[0049] For each existing trajectory Use Kalman filtering to predict its state in the current frame: in: Here is the state transition matrix, assuming uniform motion: . Let be the state covariance matrix of the previous time step. Let be the process noise covariance matrix. This represents the time interval between adjacent video frames. Let be the state vector of the trajectory at time t−1. Let be the state vector of the trajectory predicted using Kalman filtering at time t. To and The corresponding state covariance matrix.

[0050] A lightweight ReID network is used to extract the appearance feature vector of each detected target. The dimension is 128.

[0051] Calculate the cost matrix C, elements For detection target With trajectory Matching cost: in, The Mahalanobis distance, For detection target Position observation (i.e.) ), For the observation matrix, To observe the covariance matrix, For cosine similarity, For the weighting coefficients, satisfying , usually take , . Let i be the appearance feature vector of the i-th existing trajectory. This is the appearance feature vector of the j-th detected target in the current frame.

[0052] The Hungarian algorithm is used to find the optimal match. If a match is successful, the trajectory is updated. Unmatched detections are initialized as new trajectories. Unmatched trajectories are retained for a certain number of frames (e.g., 30 frames) and then deleted.

[0053] The Hungarian algorithm finds the one-to-one matching scheme that minimizes the total matching cost through iterative solutions.

[0054] The trajectory generation method of the present invention forms a continuous and stable motion trajectory of the target through cross-frame association, overcoming the trajectory interruption caused by the target's brief occlusion and appearance changes, and providing a complete and coherent spatiotemporal data sequence for analyzing the target's behavior patterns and intentions.

[0055] S2 yields the set of trajectories for all moving targets. , of which trajectory , The length of the trajectory.

[0056] S3. Based on the continuous trajectory of each moving target and the semantic label of its grid cell, identify and output the behavioral intention category of each moving target.

[0057] The purpose of S3 is to identify the behavioral intent of an object based on trajectory features, and to distinguish between normal operations and dangerous behaviors.

[0058] Preferably, the identification and output of the behavioral intent category of each moving target includes: S31. Based on the continuous trajectory of each moving target and the semantic labels of its grid cell, extract kinematic features, scene interaction features and social interaction features to form a behavioral feature vector.

[0059] Specifically, for each object's trajectory segment (most recent) (frame), calculate behavioral feature vector The details are as follows: Motion characteristics (5 dimensions): Average speed: ,in .

[0060] and , where are the coordinates of the detected target in the world coordinate system at frame t. and They are respectively The X-axis and Y-axis coordinates in the diagram.

[0061] Maximum acceleration: ,in It is obtained by trajectory difference.

[0062] This represents the instantaneous velocity vector at frame t. and They are respectively Velocity components in the X and Y directions of the world coordinate system.

[0063] Trajectory difference refers to the calculation of position differences between adjacent frames.

[0064] Mean curvature of the trajectory: ,in .

[0065] Standard deviation of the rate of change of direction: ,in .

[0066] express and The angle between them. Represents the arithmetic mean of the angle sequence .

[0067] The standard deviation of the rate of change of the target's direction of motion reflects the degree of fluctuation in the direction of change. The larger the value, the more frequently the target turns and the more irregular its direction of motion.

[0068] Motion irregularity: (If the distance between the start and end points is greater than the threshold, otherwise it is 1).

[0069] and These are the coordinates of the target in frame N and frame 1, respectively.

[0070] Scene interaction features (3D): Region type encoding: based on the semantic label of the grid where the trajectory point is located. If it is a safety passage, it is coded as [1,0,0], the work area is [0,1,0], and the danger zone is [0,0,1].

[0071] Distance to the nearest danger zone: ,in These are the coordinates of the center point of the trajectory.

[0072] Does it cross regional boundaries? If different semantic labels appear in the trajectory points, the value of the feature "whether it crosses the region boundary" is 1; otherwise, it is 0.

[0073] Social interaction characteristics (3 dimensions): Distance to the nearest person: , in A collection of all personnel.

[0074] The coordinates of the moving target (which can be a vehicle, object, or other non-person target) whose features are currently being calculated. Let J be the coordinates of person j.

[0075] Relative velocity: The magnitude of the difference between the velocity vector of the nearest person and the velocity vector of the nearest person.

[0076] Whether they are getting close to each other: If the dot product of the relative velocity direction and the relative position direction with the nearest person is negative, then the value of the feature of whether they are getting close to each other is 1; otherwise, it is 0.

[0077] As can be seen from the above, S31 extracts 11-dimensional features from the trajectory, including kinematics, scene interaction (such as distance from dangerous areas), and social interaction (such as distance from others), thus overcoming the limitations of relying solely on speed / displacement and providing rich information that reflects the "behavioral context" for intent recognition.

[0078] S32. Input the behavior feature vector into the pre-trained behavior classification model and output the behavior intention category and confidence level of each moving target.

[0079] Specifically, in S32, Gradient Boosting Decision Tree (GBDT) is used as the classifier. Let the training dataset be... ,in Category labels (categories for security libraries and risk libraries).

[0080] To generate the behavioral feature vector of the nth sample in the training dataset, This represents the total number of training samples.

[0081] The GBDT model is: Where F represents the behavioral feature vector input to the GBDT model. This represents the output of the m-th decision tree in the GBDT model. Let the number of decision trees be 150. For the first A decision tree, The learning rate is set to 0.1. This represents the label score obtained by the GBDT model in predicting the input feature vector F; Category of behavioral intentions Determination method: Let the set of behavioral intention categories be... GBDT model for the first Feature vector of a moving target Output scores for each category Transformed into a probability distribution using Softmax ,but: The category with the highest probability is taken as the behavioral intention category of the moving target; at the same time, the probability corresponding to the category can be extracted as the prediction confidence.

[0082] The model is trained using the cross-entropy loss function and employs early stopping.

[0083] As can be seen from the above, after the calculation by S3, we can obtain the behavioral intention category of each moving target. (e.g., "normal walking", "falling object") and confidence level The above processing method uses machine learning models to make comprehensive decisions on complex features, classifying continuous trajectories into specific behavioral intention categories such as "normal walking" and "falling objects", thus achieving a leap from "physical displacement observation" to "behavioral semantic understanding" and fundamentally solving the false alarm problem.

[0084] S4. Based on the static hazardous areas marked in the two-dimensional grid map, calculate and generate a static risk field.

[0085] The role of S4 is to quantify the risk distribution of inherently hazardous areas in a scenario.

[0086] Preferably, the calculation to generate the static risk field includes: S41. Configure the type, influence range and maximum risk value for each type of static hazardous area in the two-dimensional grid map.

[0087] Specifically, scene semantic map The set of static hazardous areas in the data is as follows: K is the total number of elements in the set, k∈[1,K], representing each static danger zone. Define the following parameters: type Edges, openings, high-voltage lines, etc.

[0088] Scope of influence : Based on type, for example, edge: Rice, cave entrance: meters, high-voltage line: rice.

[0089] Maximum risk value Based on the level of danger, for example, edge: Cave entrance: High-voltage lines: .

[0090] By setting the type, scope of impact, and maximum risk value, parameters can be provided for refined risk assessment.

[0091] S42. Based on the location, type, influence range, and maximum risk value of the static hazard area, a preset attenuation function is used to calculate the static risk value of each grid cell in the two-dimensional grid map, forming a static risk field.

[0092] Specifically, in S42, for mesh cells Its world coordinates First, calculate the distance from this point to each static hazard zone. The closest distance: in for The set of boundary points. If point exist Inside, . and These are the X-axis and Y-axis coordinates of the boundary point, respectively.

[0093] The risk value generated by this grid cell is: in, The attenuation coefficient is defined as follows: This makes in At that time, the risk diminished to approximately .

[0094] For each grid cell, take the maximum risk value generated by all static hazardous areas: Thus, each grid cell Corresponding to a static risk value Thus, the static risk field grid can be obtained. , Size and The same applies; the properties of each grid cell are... .

[0095] S5. For moving targets identified in S3 as belonging to the preset behavioral intention category, a dynamic risk field that diffuses over time and space is generated based on their motion state information.

[0096] In this invention, the role of S5 is to perform spatiotemporal risk diffusion on the identified risky behaviors.

[0097] Preferably, the generation of the dynamic risk field that diffuses over time and space includes: S51. Based on the behavioral intent category identified in S3, select the corresponding dynamic risk calculation formula.

[0098] Specifically, taking an object falling from a height as an example, the formula for calculating the dynamic risk value is as follows: in, , The base amplitude is set to 1.0. The predicted landing point of the object is updated over time (it can be predicted based on the equation of motion, for example, by using algorithms such as uniform acceleration motion model and Kalman filtering to predict the equation of motion). , Rice-based diffusion, The magnitude of the horizontal velocity. Seconds represent the time of uncertainty in the forecast. ,in The decay rate is denoted by (x, y), where (x, y) represents the current position of the object. For landing time, Let m represent the quality level of the object, where m ∈ {1, 2, 3}. The dynamic risk value is the value of the grid cell with coordinates (x, y).

[0099] m is a discrete mass level parameter set according to the object type and prior knowledge, used to quantify the risk level of an object (the greater the mass, the higher the risk of injury from falling objects or collisions). The core classification basis is the weight of the moving target, combined with the safety specifications of the engineering scenario.

[0100] For example, when the mass is ≤5kg, m is 1; when the mass is >20kg, m is 3; otherwise, m is 2.

[0101] Taking abnormal vehicle movement as an example, the formula for calculating the dynamic risk value is: in, This is the longitudinal distance (along the direction of movement). This represents the lateral distance (vertical direction of movement). , The speed threshold (e.g., 5 m / s). . , rice, v represents the vehicle's current speed. The current position of the vehicle is shown. (x, y) are the coordinates of the grid cell. The dynamic risk value is the value of the grid cell with coordinates (x, y).

[0102] By setting different dynamic risk value calculation formulas for different behavioral intention categories, this invention enables dynamic risk assessment to better conform to the actual diffusion law of such risks (such as falling objects exhibiting Gaussian diffusion), thereby improving the rationality of risk modeling.

[0103] S52. Based on the dynamic risk field calculation model, calculate and generate a dynamic risk field covering a two-dimensional grid map.

[0104] Specifically, S52 includes: Based on the coordinates of the grid cells, the attributes of the grid cells in the static risk field grid are modified to the dynamic risk values ​​of each moving target under that grid cell, thus obtaining the dynamic risk field.

[0105] S6. Merge the static risk field generated in S4 with all the dynamic risk fields generated in S5 to obtain the total risk field, and calculate the real-time personal risk value of the person based on the position of the person in the total risk field.

[0106] The goal of this step is to integrate dynamic and static risks and calculate the real-time individual risk value of each person.

[0107] Preferably, the calculation process of the real-time personal risk value includes: S61. For each grid cell in a two-dimensional grid map The maximum value among the static risk value and all dynamic risk values ​​of a grid cell is taken as the total risk value of that grid cell. : Represents grid cells The static risk value, This represents the dynamic risk value of the m-th dynamic risk field in that grid cell.

[0108] S62. Determine the grid cell in which the person is located based on the person's world coordinates, and use the total risk value of that grid cell or the statistical value of the total risk value of its neighboring grid cells as the person's real-time personal risk value.

[0109] For personnel its location The corresponding grid cell is (This can be obtained through the world coordinates and grid mapping relationship). Personnel risk value: If the area occupied by people is taken into account, it can be calculated as follows: Average value of the 3×3 grid area centered on: This represents the risk value for personnel.

[0110] S7. Based on the type of the area where the person is located, their historical early warning information, and the behavioral intention category identified in S3, dynamically calculate the individualized early warning threshold. When the real-time personal risk value calculated in S6 exceeds the individualized early warning threshold, generate early warning information.

[0111] The goal of this step is to dynamically adjust the alarm threshold based on the scene context to achieve accurate early warning.

[0112] Preferably, the dynamic calculation of the individualized early warning threshold includes: S71. Determine the basic threshold based on the semantic label of the grid cell where the person is located.

[0113] Specifically, a basic threshold is set based on semantic tags. For example, in high-risk work areas, = 0.7; In general work areas, = 0.5; In safe passages or office areas, .

[0114] S72. Based on the person's last warning time interval, the recent warning frequency of their area, and the current behavioral intent category identified in S3, calculate the time decay factor, the regional warning frequency factor, and the behavioral context factor, respectively.

[0115] Specifically, the time decay factor is calculated using the following formula. : in seconds, where t is the current time. The last warning time, This is the time interval between the last warning and the previous warning.

[0116] The longer the time interval since the last warning for this person, the smaller the factor becomes (lowering the threshold and increasing sensitivity).

[0117] Specifically, the regional early warning frequency factor is calculated using the following formula. : in, The grid cell containing the person and its 8 neighboring grid cells in the past time window Number of warnings per second.

[0118] The more recent warnings are issued in the area where the person is located, the larger the factor (increase the threshold and reduce false alarms).

[0119] Specifically, the behavioral context factor is calculated using the following formula. : Let j be the category of the person's behavioral intention.

[0120] If a person is performing a high-risk task (judged based on the type of behavioral intent, such as welding or working at height), the threshold is increased.

[0121] In S72, by introducing three factors—time decay, regional warning frequency, and behavioral context—the threshold can be dynamically adjusted based on historical false alarms, operational stages, and current personnel activities, adaptively balancing sensitivity and specificity, and directly solving the problem of threshold rigidity.

[0122] S73. Multiply the basic threshold by the factors of each type calculated in S72 to obtain the individualized early warning threshold for the person.

[0123] Specifically, regarding personnel The basic threshold of its grid cell The dynamic threshold is: This is a dynamic threshold.

[0124] Preferably, when the real-time personal risk value calculated by S6 exceeds the individualized early warning threshold, generating early warning information includes: like If the risk level is not specified, an early warning message will be generated, which includes information on the personnel involved, the risk level, the risk type, and recommended measures.

[0125] On the other hand, such as Figure 2 This invention provides a security identification system for smart cameras, comprising: The generation module is used to perform target detection and tracking on the real-time video stream and obtain the continuous trajectory of each moving target in the world coordinate system corresponding to the two-dimensional grid map; The identification module is used to identify and output the behavioral intention category of each moving target based on the continuous trajectory of each moving target and the semantic label of the grid cell in which it is located; The calculation module is used to calculate and generate a static risk field based on the static hazardous areas marked in the two-dimensional grid map; The generation module is also used to generate a dynamic risk field that spreads over time and space based on the motion state information of moving targets identified as belonging to a preset behavioral intention category. The calculation module is also used to merge the generated static risk field with all generated dynamic risk fields to obtain the total risk field, and to calculate the real-time personal risk value of the person based on the person's position in the total risk field. The early warning module is used to dynamically calculate an individualized early warning threshold based on the type of area where the person is located, their historical early warning information, and the identified behavioral intent category. When the calculated real-time personal risk value exceeds the individualized early warning threshold, an early warning message is generated.

[0126] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A secure identification method for smart cameras, characterized in that, include: S1. Generate a two-dimensional grid map containing semantic tags based on real-time video streams and 3D scene model data from the construction site; S2. Perform target detection and tracking on the real-time video stream to obtain the continuous trajectory of each moving target in the world coordinate system corresponding to the two-dimensional grid map; S3. Based on the continuous trajectory of each moving target and the semantic label of its grid cell, identify and output the behavioral intention category of each moving target; S4. Based on the static hazardous areas marked in the two-dimensional grid map, calculate and generate a static risk field; S5. For moving targets identified as having a preset behavioral intention category in S3, generate a dynamic risk field that spreads over time and space based on their motion state information. S6. Merge the static risk field generated in S4 with all the dynamic risk fields generated in S5 to obtain the total risk field, and calculate the real-time personal risk value of the person based on the position of the person in the total risk field. S7. Based on the type of the area where the person is located, their historical early warning information, and the behavioral intention category identified in S3, dynamically calculate the individualized early warning threshold. When the real-time personal risk value calculated in S6 exceeds the individualized early warning threshold, generate early warning information.

2. The method according to claim 1, characterized in that, The generation of a two-dimensional grid map containing semantic labels includes: S11. By optimizing the pose relationship between the camera and the 3D scene model, establish the projection relationship between the pixel coordinates of the video image and the world coordinates. S12. Project the semantic information and danger zone labels in the three-dimensional scene model onto the ground plane, and perform grid discretization to form a two-dimensional grid map in which each grid cell has a semantic label.

3. The method according to claim 2, characterized in that, The acquisition of the continuous trajectories of each moving target includes: S21. Perform target detection on video frames in the real-time video stream to obtain the bounding boxes and category information of moving targets; S22. Transform the image coordinates of the moving target into the world coordinate system of the two-dimensional grid map through the projection relationship established in S11 to obtain its world coordinates; S23. Based on the world coordinates, category information, and appearance features, a multi-target tracking algorithm is used to associate the same moving target across frames to form continuous trajectories for each moving target.

4. The method according to claim 1, characterized in that, The identification and output of behavioral intent categories for each moving target includes: S31. Based on the continuous trajectory of each moving target and the semantic label of its grid cell, extract kinematic features, scene interaction features and social interaction features to form a behavioral feature vector. S32. Input the behavior feature vector into the pre-trained behavior classification model and output the behavior intention category and confidence level of each moving target.

5. The method according to claim 1, characterized in that, The calculation generates a static risk field, including: S41. Configure the type, impact range, and maximum risk value for each type of static hazardous area in the two-dimensional grid map; S42. Based on the location, type, influence range, and maximum risk value of the static hazard area, a preset attenuation function is used to calculate the static risk value of each grid cell in the two-dimensional grid map, forming a static risk field.

6. The method according to claim 1, characterized in that, The generation of the dynamic risk field that diffuses over time and space includes: S51. Based on the behavioral intent category identified in S3, select the corresponding dynamic risk calculation formula; S52. Based on the dynamic risk field calculation model, calculate and generate a dynamic risk field covering a two-dimensional grid map.

7. The method according to claim 1, characterized in that, The calculation process for the real-time personal risk value includes: S61. For each grid cell in the two-dimensional grid map, take the maximum value from the static risk value and all dynamic risk values ​​of the grid cell as the total risk value of the grid cell. S62. Determine the grid cell in which the person is located based on the person's world coordinates, and use the total risk value of that grid cell or the statistical value of the total risk value of its neighboring grid cells as the person's real-time personal risk value.

8. The method according to claim 1, characterized in that, The dynamic calculation of individualized early warning thresholds includes: S71. Determine the basic threshold based on the semantic label of the grid cell where the person is located; S72. Based on the person's last warning time interval, the recent warning frequency of their area, and the current behavioral intent category identified in S3, calculate the time decay factor, the regional warning frequency factor, and the behavioral context factor, respectively. S73. Multiply the basic threshold by the factors of each type calculated in S72 to obtain the individualized early warning threshold for the person.

9. The method according to claim 2, characterized in that, The optimization of the pose relationship between the camera and the 3D scene model includes: S111, from the current video frame Extracting ORB feature point set Each feature point contains pixel coordinates. Extract the corresponding feature point set from the BIM model rendering or point cloud projection. Each feature point contains world coordinates. ; S112, If the camera mounting position is known, use the mounting parameters as the initial rotation matrix. Translation vector Otherwise, use the PnP algorithm to estimate the initial camera pose. ]; S113, Establish the reprojection error function: in, For camera projection function, , Homogeneous coordinates; Let be the rotation matrix to be optimized. ; Let be the translation vector to be optimized. Optimization using the Levenberg-Marquardt algorithm ,make Minimize to obtain the optimized extrinsic parameters. and .

10. A security identification system for smart cameras, characterized in that, include: The generation module is used to generate a two-dimensional grid map containing semantic tags based on real-time video streams and 3D scene model data from the construction site. The acquisition module is used to perform target detection and tracking on the real-time video stream and acquire the continuous trajectory of each moving target in the world coordinate system corresponding to the two-dimensional grid map; The identification module is used to identify and output the behavioral intention category of each moving target based on the continuous trajectory of each moving target and the semantic label of the grid cell in which it is located; The calculation module is used to calculate and generate a static risk field based on the static hazardous areas marked in the two-dimensional grid map; The generation module is also used to generate a dynamic risk field that spreads over time and space based on the motion state information of moving targets identified as belonging to a preset behavioral intention category. The calculation module is also used to merge the generated static risk field with all generated dynamic risk fields to obtain the total risk field, and to calculate the real-time personal risk value of the person based on the person's position in the total risk field. The early warning module is used to dynamically calculate an individualized early warning threshold based on the type of area where the person is located, their historical early warning information, and the identified behavioral intent category. When the calculated real-time personal risk value exceeds the individualized early warning threshold, an early warning message is generated.