An AI technology-based safety hazard identification and targeted safety training system

The safety training system built using AI technology, through panoramic perception, counterfactual risk simulation, and biofeedback mechanisms, solves the problems of formulaic content and difficulty in quantifying the psychological impact of existing safety training systems. It enables targeted reinforcement intervention and individualized training, thereby improving training effectiveness.

CN122157538APending Publication Date: 2026-06-05BEIJING JIANYAN TECH SOFTWARE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING JIANYAN TECH SOFTWARE TECH CO LTD
Filing Date
2026-02-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing safety training systems lack specificity, fail to strongly correlate with trainees' current work environment and personal image, and cannot objectively quantify the psychological impact, resulting in poor training effectiveness and an inability to provide differentiated interventions for individuals with different psychological qualities.

Method used

The system employs AI-based safety hazard identification and targeted safety training. It constructs a scene semantic context consistent with the real environment through a panoramic perception and identification module, generates high-fidelity accident videos using a counterfactual risk inference generation module, evaluates the training effect in real time using a biofeedback and cognitive assessment module, and makes dynamic adjustments through a closed-loop control module to ensure that the training intensity is appropriate.

Benefits of technology

It achieves a high degree of correlation with the trainees' current work environment, objectively quantifies the psychological shock effect, and enables differentiated intervention for individuals with different psychological qualities, ensuring that the training effect reaches the expected threshold for awakening safety awareness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157538A_ABST
    Figure CN122157538A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent safety management, and discloses a safety hazard identification and targeted safety training system based on AI technology, which comprises a panoramic perception module, a risk deduction module, a cognitive evaluation module and a closed-loop control module. By monitoring high-altitude operation in real time, the system identifies the behavior of not wearing a safety belt by using geometric constraint; after triggering, the system reconstructs the scene based on field data, generates a virtual video of a falling accident containing the real features of the personnel violating the rules. When the personnel pass through the access control, the video is forced to be played and the micro-expression and pupil change of the personnel are monitored, and a cognitive impact score is calculated. If the score does not meet the standard, the controller adjusts the video generation parameters (such as the distance of the viewpoint, the action rate) by using a gradient update algorithm to enhance the stimulation intensity until the score meets the standard and the access control is opened. Through the double closed-loop feedback of vision and psychology, the application realizes the precision and the compulsory nature of safety education, and significantly prolongs the safety memory retention time of the operating personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent safety management technology, specifically to a safety hazard identification and targeted safety training system based on AI technology. Background Technology

[0002] In high-risk work sectors such as construction, petrochemicals, and power maintenance, safety education and training are the first line of defense in preventing workplace accidents and protecting the lives of workers. With the development of digital technology, safety training has evolved from traditional oral lectures and paper-based tests to experiential learning based on multimedia videos or virtual reality (VR) technology. Existing safety training systems typically involve playing pre-made accident case videos or having workers wear VR glasses to experience standardized virtual hazards before they enter the site or after a violation occurs, aiming to raise their safety awareness through visual warnings.

[0003] Although existing multimedia and VR training technologies have made some progress in visual presentation, they still have technical limitations in practical applications, making it difficult to fundamentally solve the problems of habitual violations and psychological complacency among workers.

[0004] Existing training technologies often provide generic materials or pre-modeled, fixed scenarios, lacking a strong connection to the trainees' actual work environment and their own image. Whether playing generic accident documentaries or experiencing standardized VR scenarios, trainees often see unfamiliar environments and virtual, generic avatars, rather than themselves and their actual work locations. This bystander-perspective material easily leads to a sense of alienation among trainees, making it difficult for them to establish a direct causal link between the tragic consequences in the videos and their own current violations. This fails to create a sense of immersive crisis, thus weakening the deterrent effect of cautionary education.

[0005] Existing training and assessment mechanisms primarily rely on superficial behavioral validation, lacking objective quantification of the cognitive impact on trainees' psychological well-being. Traditional assessment methods typically involve recording video viewing time, quiz accuracy, or simple eye tracking. However, simply completing these actions does not necessarily indicate a genuine sense of awe or fear of danger. Due to differences in individual psychological qualities and years of experience, many experienced but habitually rule-breaking workers often exhibit strong psychological defenses or desensitization to routinely graphic or graphic scenes. Existing systems cannot distinguish whether trainees are genuinely terrified or alert, or merely mechanically completing viewing tasks, rendering the training ineffective and failing to ensure that the warning messages truly break through the trainees' psychological defenses.

[0006] Existing safety training systems typically employ an open-loop, one-way output model, lacking the ability to dynamically adjust based on feedback. Once training content is created, the content, pace, and perspective of the system remain fixed regardless of the trainees' reactions. For trainees with strong psychological resilience or those who have become immune to routine stimuli, the system cannot detect their indifferent attitude, nor can it automatically escalate the intensity of the stimulus (such as switching to a more impactful first-person perspective or adjusting the severity of the accident) to provide targeted reinforcement. This one-size-fits-all, fixed output model leads to significant differences in training effectiveness among individuals, making it difficult to ensure that every violator reaches the expected threshold for safety awareness, ultimately preventing the complete elimination of potential safety hazards. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a safety hazard identification and targeted safety training system based on AI technology. This system solves the problems of existing safety training methods being formulaic, lacking specificity, and unable to objectively quantify the psychological impact on trainees, resulting in trainees having difficulty forming solid risk memories, weak safety awareness, and a high recurrence rate of violations.

[0008] To achieve the above objectives, this invention provides the following technical solution: a security hazard identification and targeted security training system based on AI technology, comprising a technical architecture encompassing four dimensions: panoramic perception, deductive generation, cognitive assessment, and closed-loop control.

[0009] The system first establishes a digital mapping of the work site through a panoramic perception and recognition module. Unlike traditional two-dimensional video surveillance, this system utilizes computer vision algorithms for in-depth analysis of violation scenes. On one hand, it identifies specific violation categories and responsible parties; on the other hand, it extracts the geometric and textural features of the scene from two-dimensional video frames using 3D scene reconstruction techniques (such as 3D Gaussian splashing or monocular depth estimation). The essential function of this mechanism is to construct a scene semantic context vector that is highly consistent with the real physical environment, providing spatially consistent base map conditions for subsequent video generation, ensuring that the background of the generated video is the worker's current work location, rather than generic material.

[0010] The counterfactual risk simulation generation module is the core generation engine of the system. Its working principle is not simple video retrieval, but rather conditional synthesis based on generative artificial intelligence. The system utilizes a physics engine constraint unit to calculate the physical trajectory of the violating entity under hypothetical accident conditions (e.g., a fall trajectory and collision response under gravity) based on the identified violation type (e.g., not wearing a seatbelt at a height). Subsequently, the video generation unit employs a conditional diffusion model, using the aforementioned scene semantic context vector as environmental constraints and the physical trajectory as action constraints, to synthesize a counterfactual simulation video demonstrating the serious consequences of the violation. This technique transforms a risk that has not yet occurred into a visualized reality.

[0011] To objectively evaluate training effectiveness, the biofeedback and cognitive assessment module incorporates micro-expression analysis technology. During video playback, the system captures subtle facial movements of trainees using a high-frame-rate camera. Through a Facial Action Coding System (FACS), the system quantifies the activation intensity of specific motor units (such as eyelid lifting and brow retraction) and combines this with autonomic nervous system response data for pupil diameter. The system uses a weighted calculation model to map these multidimensional physiological characteristics into a cognitive impact score. This indicator objectively reflects the trainees' level of fear or alertness towards the presented accident consequences, eliminating the uncertainty of subjective questionnaires.

[0012] The closed-loop control and execution module constructs a negative feedback adjustment loop to address the issue of training intensity adaptation. The system presets an intervention target threshold and calculates the difference between it and the current cognitive impact score in real time. When the difference indicates that the training effect has not met the target (e.g., the trainee's indifference), the controller calculates the update step size of the generated parameters based on the parameter sensitivity gradient vector. The system automatically adjusts the rendering attributes of the next round of video generation based on this step size (e.g., switching from a third-person perspective to a first-person perspective, increasing the instantaneous speed of the accident, or enhancing the image contrast). Through this iterative parameter reconstruction, the system can continuously output higher-intensity intervention content until the trainee's biofeedback indicators reach the preset standard, ultimately triggering the access control linkage unit to remove the physical blockage.

[0013] This invention provides a security hazard identification and targeted security training system based on AI technology. It has the following beneficial effects: 1. This invention integrates 3D scene reconstruction technology and physical dynamic constraints in the counterfactual risk simulation generation module, and uses real-time image features of the work site as the base map to construct a virtual accident video with realistic environmental texture and conforms to physical laws. This solves the problem of the disconnect between existing general training materials and actual work scenarios, and can generate a high-fidelity image of an accident occurring at the current location. Through highly realistic visual context, trainees are forced to establish targeted risk associations.

[0014] 2. This invention utilizes a biofeedback and cognitive assessment module to capture trainees' micro-expressions and pupil changes in real time through a facial motion coding system, and then weights and calculates these changes into an objective cognitive impact score. This mechanism transforms the traditionally invisible psychological warning effect into a calculable physiological indicator, overcoming the subjectivity and bias of existing technologies that rely solely on playback duration or questionnaires to assess training effectiveness, thus ensuring the authenticity and validity of the assessment data.

[0015] 3. This invention constructs an adaptive closed-loop control mechanism based on parameter gradients, which can dynamically adjust the rendering parameters of the generated model (such as switching the first-person perspective, increasing the action rate, or enhancing the image contrast) and trigger video regeneration based on the deviation between the cognitive impact score and the preset threshold. This enables differentiated intervention for individuals with different psychological qualities, effectively solves the training immunity problem caused by the trainees' sense of luck or habit, and ensures that the final intervention intensity is sufficient to break through the trainees' cognitive defenses. Attached Figure Description

[0016] Figure 1 This is a system overall architecture block diagram according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the overall system workflow of an embodiment of the present invention. Figure 3 This is a data flow diagram illustrating the logic for calculating the instantaneous panic index in an embodiment of the present invention. Figure 4 This is a schematic diagram of the cognitive impact scoring statistics and quantification process according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating the logic of the gradient update algorithm for generating parameters according to an embodiment of the present invention. Figure 6 This is a statistical chart comparing the system application effects of embodiments of the present invention.

[0017] Among them, 100 is the panoramic perception and recognition module; 200 is the counterfactual risk inference and generation module; 300 is the biofeedback and cognitive assessment module; and 400 is the closed-loop control and execution module. Detailed Implementation

[0018] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] See attached document Figure 1This invention provides a security hazard identification and targeted security training system based on AI technology. The system mainly includes: a panoramic perception and identification module 100, a counterfactual risk deduction and generation module 200, a biofeedback and cognitive assessment module 300, and a closed-loop control and execution module 400. These modules are interconnected via a high-speed data transmission network, forming a physical entity architecture for closed-loop data flow.

[0020] The panoramic perception and recognition module 100 is deployed in the monitoring area of ​​the work site to collect visual data of the site environment. Specifically, the panoramic perception and recognition module 100 includes an image acquisition unit and an edge computing unit. The image acquisition unit consists of several high-definition cameras distributed at different locations on the work site. These high-definition cameras are fixed to scaffolding, tower cranes, or ground poles using brackets, configured to cover a panoramic field of view of the work site. The image acquisition unit is physically connected to the edge computing unit via a coaxial cable or an industrial Ethernet interface.

[0021] The edge computing unit is configured as an embedded computing device, integrating a video codec chip and a neural network acceleration processor. The edge computing unit is configured to preprocess the raw video stream transmitted by the image acquisition unit, including H.265 encoding, keyframe extraction, and preliminary target detection. The edge computing unit connects to a high-speed data transmission network via a fiber optic network or a 5G wireless communication module, transmitting the processed video frame data and extracted structured data to the counterfactual risk inference generation module 200.

[0022] The counterfactual risk simulation generation module 200 is deployed in the backend data center or cloud server cluster and is the core computing center of the system. Specifically, the counterfactual risk simulation generation module 200 includes a high-performance computing cluster and a data storage array. The high-performance computing cluster consists of multiple GPU servers working in parallel, each server equipped with a graphics processing unit with high video memory capacity, configured to support loading large video diffusion models and 3D scene reconstruction algorithms.

[0023] The high-performance computing cluster is connected to the data storage array via a PCIe bus. The data storage array is configured to store a database of historical violations, a library of pre-trained physical dynamics model parameters, and weight files for generative AI models. The counterfactual risk simulation generation module 200 is configured to receive on-site data from the panoramic perception and recognition module 100, generate counterfactual simulation videos using GPU computing power, and transmit the generated video stream in real time to the biofeedback and cognitive assessment module 300 via a high-speed data transmission network.

[0024] The biofeedback and cognitive assessment module 300 is deployed in the on-site safety education experience area or access control passage. Specifically, the biofeedback and cognitive assessment module 300 includes an interactive training terminal and a micro-expression capture unit. The interactive training terminal includes a high-resolution LCD screen and audio output devices, configured to play counterfactual simulation videos generated by the counterfactual risk simulation generation module 200 for the user.

[0025] The micro-expression capture unit is configured as a near-infrared high-frame-rate camera, embedded in the center of the upper bezel of the interactive training terminal's display screen. Its optical axis is mechanically calibrated to align with the screen's normal direction, ensuring it is directly facing the user's face when the user is looking at the screen. The micro-expression capture unit connects to the motherboard inside the interactive training terminal via a USB 3.0 or MIPI interface, uploading the captured facial image sequences in real time to a high-performance computing cluster or performing feature extraction calculations locally on the terminal.

[0026] The closed-loop control and execution module 400 includes a logic controller and an access control actuator. The logic controller can be deployed on a cloud server as a software service or on a local server as independent hardware. The logic controller communicates with the counterfactual risk inference generation module 200 via a control bus, sending parameter adjustment commands.

[0027] The access control actuator includes a gate controller, electromagnetic locks, and physical barrier gates, and is installed at the physical entrance of the work site. The access control actuator connects to the logic controller via an RS485 bus or GPIO interface. The logic controller is configured to send open or locked signals to the access control actuator based on the calculation results of the biofeedback and cognitive assessment module 300. The access control actuator only activates its motor to release the physical barrier upon receiving a verified level signal.

[0028] The high-speed data transmission network is configured as a gigabit Ethernet or enterprise-level LAN to carry the on-site video stream uploaded by the panoramic perception and recognition module 100, the generated video stream sent by the counterfactual risk inference generation module 200, and the biometric data stream uploaded by the biofeedback and cognitive assessment module 300, ensuring that the data interaction latency between the various components of the system meets the time constraints of real-time processing.

[0029] See attached document Figure 2 When performing violation recognition, the panoramic perception and recognition module 100 specifically includes four cascaded processing steps: image preprocessing, human skeleton key point extraction, object-human correlation analysis, and violation judgment based on geometric constraints.

[0030] First, the edge computing unit performs frame-level parsing on the real-time video stream transmitted by the image acquisition unit, extracting the image frame with the current timestamp. The edge computing unit then uses a lightweight object detection network to initially screen the image frames, locating the 2D bounding boxes of all workers and safety equipment (such as safety belt hooks and helmets) in the scene. This object detection network employs a convolutional neural network architecture based on single-stage detection, and the network output includes category labels, confidence scores, and the center coordinates and width / height information of the bounding boxes.

[0031] Subsequently, for each detected worker bounding box, the system invokes the pose estimation sub-network to extract skeletal key points. The pose estimation sub-network employs a deep neural network structure based on heatmap regression (such as HRNet or ViTPose architecture) to map the input worker image to a bounding box containing key points. A set of skeletal features for key points. The system's predefined set of key points covers the major joints of the human body, including the tip of the nose, neck, left and right shoulders, left and right elbows, left and right wrists, left and right hips, left and right knees, and left and right ankles.

[0032] To determine specific violations, the system performs object-human correlation analysis. Taking working at height without a safety harness as an example, the system calculates the spatial relationship between the geometric center point of the safety harness hook bounding box and the midpoint of the line connecting the key shoulder points in the worker's skeletal set. The system establishes a discriminant function based on Euclidean distance on the two-dimensional image plane to quantify the connection between safety equipment and the worker.

[0033] In the violation determination step based on geometric constraints, the system performs logical operations on the extracted skeletal data and object position data according to a preset violation logic library. For specific violation types, the system defines a set of determination rules. When a worker is in a high-altitude work area (determined through scene semantic segmentation mask), the system calculates the pixel distance between the hook point and the preset safety anchor point, and makes a comprehensive determination based on the worker's posture characteristics.

[0034] Specifically, the violation determination logic assesses the current risk status by calculating the geometric distance constraint function: ; in, This represents the calculated risk discrimination value; This represents an indicator function that takes the value 1 when the condition is met and 0 otherwise. This indicates the vertical height coordinates or estimated depth height of the operator in the image coordinate system. This indicates the preset threshold for judging high-altitude operations; Represents the two-dimensional pixel coordinate vector of the detected seatbelt hook. This represents the two-dimensional pixel coordinate vector of the nearest legal attachment point to the worker in the scene. ; Represents the Euclidean norm operation for vectors; This represents the prediction confidence of the object detection network for the seatbelt hook category, with a value ranging from (0,1]. This represents the balance weighting coefficient between the distance term and the confidence term.

[0035] The system will calculate Compared with the preset violation trigger threshold Perform a comparison. If... If the logic fails, it determines that a violation has occurred. At this point, the panoramic perception and recognition module 100 generates a list containing the violation type. Violating entity ID, current image frame and the corresponding skeletal key point data The structured data packets are sent to the counterfactual risk inference generation module 200 as input conditions for subsequent generation.

[0036] See attached document Figure 1 and attached Figure 2 After the panoramic perception and recognition module 100 locks down the specific time and image frame of the violation through the aforementioned logic, in order to provide an environmental foundation with realistic spatial structure and texture details for subsequent counterfactual video generation, the system initiates the 3D scene reconstruction unit to perform deep semantic extraction. This process aims to transform the two-dimensional surveillance video stream into a 3D parametric representation that can be rendered from any new perspective, namely, a scene semantic context vector.

[0037] Specifically, the 3D scene reconstruction unit first acquires a video frame sequence containing several seconds before and after the violation moment as source data. The structure-of-motion (SOG) algorithm is then used to perform feature point matching and camera pose calculation on this frame sequence, generating sparse point cloud data of the scene. This sparse point cloud constitutes the initial geometric skeleton of the 3D scene.

[0038] Building upon this foundation, the system employs a 3D Gaussian splashing algorithm to construct a continuous volume representation of the scene. The system models the scene as a set of massive anisotropic 3D Gaussian distributions. For each Gaussian element in the set, the system defines a set of learnable attribute parameters, including the spatial center location, covariance matrix (which determines the shape and orientation of the Gaussian sphere), opacity, and spherical harmonic coefficients used to represent view-dependent colors.

[0039] To project 3D Gaussian primitives onto a 2D image plane for rendering and comparison, the system calculates the probability density function of the 3D Gaussian distribution in the world coordinate system. .

[0040] ; in, Represents the coordinate vector of a three-dimensional sampling point in the world coordinate system; This represents the center position vector (mean) of the Gaussian element; This represents the three-dimensional covariance matrix of the Gaussian element; This represents the matrix transpose operation.

[0041] To ensure the positive semidefiniteness and physical meaning of the covariance matrix during the optimization process, the system does not directly optimize... Instead, it decomposes it into scaling and rotation matrices for parameterized storage and computation. The specific relationship is defined as follows: ; in: This represents the rotation matrix obtained from the quaternion transformation, used to describe the orientation of Gaussian elements in space; This represents the diagonal scaling matrix, used to describe the scaling of Gaussian elements along the three principal axes.

[0042] During the rendering phase, the system performs a differentiable rasterization process. The system projects 3D Gaussian primitives within the view frustum onto a 2D screen space and sorts them according to depth order (Z-depth). For each pixel on the image plane, the system accumulates the color contributions of overlapping Gaussian primitives along the viewing direction using alpha blending techniques, thereby synthesizing the current predicted image.

[0043] The cumulative calculation of pixel color follows the discretized form of the volumetric rendering equation: ; in, This represents the final color value of the pixel obtained through calculation; This represents the sorted set of Gaussian meta-indexes along the line of sight of this pixel. Indicates the first The color components are calculated by Gaussian elements using spherical harmonic functions based on the current viewing angle; Indicates the first The product of the opacity of a Gaussian element and the two-dimensional projected Gaussian value; The transmittance term reflects the amount of light that passes through the front. The residual strength after each Gaussian element.

[0044] The 3D scene reconstruction unit updates the attribute parameters of all Gaussian elements by backpropagating using a stochastic gradient descent strategy after calculating the photometric measurement error between the rendered image and the real monitoring image (such as the weighted sum of L1 loss and D-SSIM loss). When the loss function converges, the system packages the parameter set of all Gaussian elements obtained from the final optimization to form a scene semantic context vector. This vector is transmitted to the counterfactual risk inference generation module 200 as the data basis for maintaining strict consistency between the background and the real work site when generating virtual accident videos.

[0045] See attached document Figure 1 and attached Figure 2 After the panoramic perception and recognition module 100 completes the identification of violations and the extraction of scene semantics, the physics engine constraint unit in the counterfactual risk inference generation module 200 is then activated. The core task of this physics engine constraint unit is to deduce the physical process of an accident in virtual space based on the real initial state, providing motion trajectory constraints that conform to objective physical laws for subsequent video generation, thereby ensuring that the generated video does not contain logical fallacies such as violations of gravity or clipping.

[0046] Specifically, the physics engine constraint unit first executes the entity mapping procedure. The system reads the set of skeletal key points transmitted by the panoramic perception and recognition module 100 and maps it into a multi-rigid-body dynamics system, commonly known as a ragdoll system. In this ragdoll system, the human body's limbs and torso are approximated as basic collision geometries such as capsules or cuboids, and the connections between key points are defined as spherical joints or hinge joints with rotational angle restrictions. Simultaneously, the system utilizes the scene geometric features output by the 3D scene reconstruction unit to construct a static collision mesh, serving as the environmental boundary for the physical simulation.

[0047] After completing the initial mapping, the system triggers the corresponding physical failure conditions based on the identified violation type. For example, when the violation type is a fall from height, the system will remove the support constraints of the ragdoll system; when the violation type is an object impact, the system will apply an initial velocity vector to a specific collider. Subsequently, the system enters a discrete-time step physical simulation loop.

[0048] Within each simulation time step, the physics engine solver calculates the net external forces and moments acting on all rigid bodies within the system and updates their positions and orientations through integration. This calculation process follows the Newton-Euler equations of dynamics. For each independent rigid body in the ragdoll system, its state update follows the following dynamic constraint equations: ; in, Indicates the first The generalized mass matrix of a rigid body (including mass and moment of inertia); express The generalized coordinate vector of the rigid body at any given time (containing position coordinates and attitude quaternions); and These represent the generalized acceleration vector and the generalized velocity vector, respectively. Represents the matrix of Coriolis force and centrifugal force; Represents the vector of gravity and other conservative force terms; This represents the vector of external generalized forces acting on a rigid body (such as air resistance or initial impact force). This represents the transpose of the constraint Jacobian matrix, used to describe joint constraints and collision contact constraints; This represents a Lagrange multiplier vector, which represents constraint forces (such as ground support forces or joint tension forces).

[0049] The system iteratively solves the above differential equation using numerical integration methods (such as the semi-implicit Euler method or Verlet integration method) to calculate the time from 0 to 1 after the accident. The system displays the state of all rigid bodies at every time point within a second. To handle collisions between rigid bodies and the environment mesh, the system performs continuous collision detection (CCD). When the detected geometric overlap depth exceeds a preset threshold, the position and velocity of the rigid body are corrected by applying a reverse pulse force.

[0050] Finally, the physics engine constraint unit outputs a sequence of physical motion trajectories including timestamps. This sequence records the centroid 3D coordinates of the violating entity during the virtual incident. and the rotational quaternion sequence of each limb joint The sequence of physical motion trajectories will be transmitted to the video generation unit as a hard geometric constraint to control the movements of the characters in the generated video.

[0051] See attached document Figure 1 and attached Figure 2 After the physics engine constraint unit outputs a sequence of physical motion trajectories that conform to the laws of dynamics, the video generation unit uses generative artificial intelligence technology to perform high-dimensional fusion of this abstract skeleton motion data with the scene semantic context vector provided by the 3D scene reconstruction unit, synthesizing the final optical video stream. The core of this process lies in forcing the denoising process of the diffusion model to strictly follow the spatiotemporal constraints of the physical simulation through a multimodal condition control mechanism.

[0052] Specifically, the video generation unit first performs spatial projection and conditional coding preprocessing. Based on the current viewing angle parameters (set by the closed-loop control module), the system constructs the extrinsic and intrinsic parameter matrices of the virtual camera. The system projects the three-dimensional joint coordinates from the physical motion trajectory sequence onto the two-dimensional image plane, generating a corresponding sequence of two-dimensional posture control maps. These control maps, in the form of heatmaps or skeletal wireframes, clearly define the spatial position and limb shape of the violating subject in each frame.

[0053] Subsequently, the system builds and runs a potential diffusion model. This model mainly consists of a variational autoencoder (VAE), a denoising U-Net network, and a multimodal conditional encoder.

[0054] During the inference generation phase, the system first samples an initial Gaussian noise vector from a standard normal distribution. The denoising U-Net network is configured to predict and remove noise at each time step to restore the latent features of the image. To achieve precise control over the generated content, the system employs a dual conditional injection mechanism: The first layer is semantic conditional injection. The system inputs a textual prompt describing the violation into the CLIP text encoder to extract the text embedding vector. This vector is then injected into the intermediate layer of the U-Net network through a cross-attention mechanism, guiding the generated content to conform to the semantic category of the text description.

[0055] The second layer is the injection of physical spatial conditions. This is a key technical feature of the invention. The system employs a bypass network structure or spatial adapter similar to ControlNet, using the previously generated two-dimensional attitude control map sequence as spatial condition feature input. This bypass network is additively fused with the encoder feature layer of the backbone U-Net network through zero-convolutional layers. This mechanism ensures that the generated main pixels strictly conform to the bone positions calculated by the physics engine, preventing illusions of limb distortion or disjointed movement during the generation process.

[0056] Meanwhile, scene semantic context vectors are used to initialize background base maps or as global style conditions to ensure that the generated video background textures are consistent with the actual work site.

[0057] To optimize generation quality and achieve parameter controllability, the network employs a hybrid loss function that includes physical consistency constraints during the training and fine-tuning phases.

[0058] ; in, This represents the total loss function value; Indicates at time step Noisy latent feature map; A semantic conditional vector representing the text prompt; Represents the spatial geometric conditions derived from the physical trajectory of motion; This represents the true Gaussian noise from the sample; This represents the noise residual predicted by the denoising network; This represents the mean square error calculation; This represents a temporal continuity loss term, used to penalize non-smooth transitions between frames and ensure video smoothness. The weighting coefficients represent the balance between generative diversity and temporal coherence.

[0059] Furthermore, this module supports real-time rendering attribute adjustment based on parameter commands. When an adjustment command is received from the closed-loop control and execution module 400, the video generation unit performs the following operations: If the command is to adjust the viewing angle, the system modifies the camera extrinsic parameter matrix during the projection stage and regenerates the two-dimensional attitude control map sequence, thereby changing the video's shot type (e.g., switching from a long shot to a close-up) or angle (e.g., switching from third-person to first-person); if the command is to adjust the accident action rate, the system performs time-dimensional interpolation or resampling on the physical motion trajectory sequence, changing the frame rate density of the attitude control map, thereby presenting an acceleration or slow-motion effect in the video; if the command is to adjust the image contrast, the system adjusts the image histogram distribution after the VAE decoder output, or performs amplitude scaling on the feature vectors in the latent space to enhance the visual impact of the image.

[0060] See attached document Figure 1 and attached Figure 2 When the counterfactual video is played on the interactive training terminal, the biofeedback and cognitive assessment module 300 is activated simultaneously, aiming to capture the trainees' involuntary physiological responses to visual impact on a millisecond timescale. Since micro-expressions are usually extremely short-lived (1 / 25 to 1 / 5 of a second) and involve very subtle movements, this system uses a high-precision feature extraction network based on deep learning to quantify the fine movements of facial muscles.

[0061] Specifically, the micro-expression capture unit first inputs the acquired high-frame-rate near-infrared image sequence into the preprocessing submodule. The preprocessing submodule uses a multi-task cascaded convolutional neural network (MTCNN) or the RetinaFace algorithm to perform face detection and locate the face bounding box. Subsequently, the system uses a facial landmark detection algorithm (such as PFLD or 300W) to mark 68 or 98 high-precision facial feature landmarks within the face region, covering the eyebrow contour, eyelid edge, bridge of the nose, and lip boundary.

[0062] To eliminate interference from changes in the trainee's head posture (such as turning or tilting) on ​​feature extraction, the system performs facial alignment. The system selects the center of the eyebrows, the centers of the eyes, and the corners of the mouth as reference anchor points, calculates the affine transformation matrix of the current face image relative to a standard frontal face template, and performs geometric correction and normalized cropping on the image to generate a standardized facial input tensor. Furthermore, based on the keypoint coordinates, the system automatically segments several regions of interest (ROIs), focusing on the left / right eye region, eyebrow region, and mouth region.

[0063] Preprocessed global face images and local ROI images are fed in parallel into a micro-expression feature extraction network. This network employs a multi-stream fusion convolutional neural network architecture. The backbone network is configured as a ResNet-50 or MobileNetV3 deep residual network to extract global texture and geometric features from the facial images. To enhance the perception of subtle muscle movements, the network incorporates a local perception branch based on an attention mechanism. This branch performs independent convolutional feature extraction on the aforementioned cropped eye, eyebrow, and mouth ROI regions, assigning higher weights to feature channels highly correlated with fear through a channel attention module.

[0064] The network's output layer is configured as a multi-label regression head according to the Facial Action Coding System (FACS) definition. Unlike traditional classification networks, this regression head maps through fully connected layers to output the activation intensity values ​​of specific action units. This system focuses on monitoring core action units associated with emotions such as fear, surprise, and disgust, including at least: AU1 (Inner Brow Raiser). AU2 (Outer Brow Raiser); AU4 (BrowLowerer) (eyebrows drawn closer / frowning) AU5 (Upper Lid Raiser); AU20 (LipStretcher); AU26 (Jaw Drop).

[0065] Finally, the micro-expression feature extraction network outputs a time-varying sequence of action unit intensity vectors: ; in, Indicates the timestamp The facial motion unit intensity vector; Indicates the first The predicted activation intensity value of the action unit in the current frame. Its value range is constrained to the interval [0,1] by the Sigmoid activation function, where 0 indicates no activation and 1 indicates maximum activation intensity.

[0066] This intensity vector sequence will be transmitted in real time to the subsequent emotion calculation unit as the basic data source for calculating the instantaneous panic index. At the same time, the system also uses pixel analysis of the eye ROI region and Hough circle transform or edge detection algorithms to measure the rate of change of pupil diameter in real time, which, together with the AU intensity vector, constitutes a multimodal physiological feature data package.

[0067] See attached document Figure 3After obtaining the action unit intensity vector and synchronous pupil diameter data over time through the micro-expression feature extraction network, the biofeedback and cognitive assessment module 300 enters the multimodal feature fusion and index calculation stage. This stage aims to map the discrete facial muscle movement amplitude and the pupillary response of the autonomic nervous system into a single-dimensional psychophysiological indicator, namely the instantaneous panic index, to characterize the psychological stress level of trainees when they are subjected to visual stimuli at a specific moment.

[0068] Specifically, the system first performs baseline normalization on the pupil diameter data. During the silent period before video playback (e.g., the first 3 seconds), the system collects the average pupil diameter of the trainees as a baseline value. During video playback, the system calculates the relative rate of change of the pupil diameter relative to the baseline value in real time and performs temporal smoothing filtering to remove noise abrupt changes caused by blinking, thereby obtaining pupil stress characteristics.

[0069] Subsequently, the system employs a mathematical model combining weighted linear combination and Sigmoid nonlinear activation to calculate the instantaneous panic index. Based on pre-existing psychological knowledge, this model assigns differentiated weight coefficients to different action units. For example, upper eyelid levitation (AU5) and mouth opening (AU26), which are highly correlated with expressions of panic, are assigned higher positive weights, while action units related to non-panic emotions (such as simply closing the eyes) are assigned lower or zero weights.

[0070] The system calculates the timestamp using the following formula. Instantaneous panic index: ; in, This represents the calculated instantaneous panic index, with a value range of (0,1). This represents the set of action unit indices included in the calculation, specifically including... Indicates the first The weight coefficients corresponding to the action units are obtained through a logistic regression model trained on a large-scale sentiment database. Indicates the first Action unit number at timestamp Normalized activation intensity; Weighting coefficients representing pupillary stress characteristics; Represents timestamp The relative rate of change of pupil diameter is calculated using the following formula: This represents the sensitivity bias constant of the model, used to adjust the center point position of the activation function and filter out low-intensity background noise. Represented by natural constant An exponential function with base 0.

[0071] The calculated instantaneous panic index forms a time response curve that varies with the video playback progress. To eliminate glitches caused by sporadic sensor noise, the system further performs a sliding window averaging on the instantaneous panic index sequence, with the window size set to [value missing]. Frames (e.g.) The processed exponential curve can smoothly reflect the psychological fluctuations of trainees throughout the entire process of watching counterfactual simulation videos, especially the peak response at key moments when virtual accidents occur in the video (such as the moment of falling and impact). This provides a basic numerical basis for subsequent overall cognitive impact scoring.

[0072] See attached document Figure 4 After obtaining continuous instantaneous panic index curves through the aforementioned steps, the biofeedback and cognitive assessment module 300 performs time-domain integration and weighted aggregation operations to transform the fluctuating time-series data into a single scalar evaluation index, namely the cognitive impact score. This score not only reflects the trainee's peak panic at the moment of the accident but also reflects their sustained attention and psychological tension level throughout the entire risk simulation process, thereby achieving objective quantification of the training effect.

[0073] Specifically, the system first automatically defines the core accident window period based on the physical motion trajectory sequence output by the counterfactual risk simulation generation module 200. This window period covers the time from the virtual accident triggering moment (such as the start of the fall) to the end moment of the physical simulation (such as stillness or a black screen). The system only samples the instantaneous panic index within this time window to eliminate irrelevant physiological noise generated during the video prelude or after the video ends.

[0074] To comprehensively assess trainees' psychological responses, the system employs a peak-mean coupled model to calculate raw evaluation values. The system extracts the maximum value of the panic index within the window period as the instantaneous impact component, characterizing the trainees' stress sensitivity to sudden danger. Simultaneously, the system calculates the area under the panic index curve within the window period using definite integrals and divides it by the time length to obtain the average panic level, which serves as the sustained stress component, characterizing the trainees' level of immersion.

[0075] The system calculates the final normalized cognitive impact score based on the following formula: ; in: This represents the final cognitive impact score, with a value strictly limited to [0, 100]. This represents a truncation function that ensures the calculation result does not exceed the domain boundary; This represents the score mapping coefficient, used to extend the probability values ​​in the [0,1] interval to the percentage level, and is usually set to 100; This represents the weighting coefficient for the instantaneous impact component; the set value of this weighting coefficient is greater than... This emphasizes the importance of immediate stress response during an accident; The weighting coefficients for the continuous pressure component satisfy the following conditions: This operation represents the process of finding the maximum value within a specified time interval. This indicates the definite integral operation on the instantaneous panic index; and These represent the start and end timestamps of the core incident window, respectively. This represents the baseline score bias term, used to calibrate baseline physiological differences among individuals.

[0076] After the calculation is complete, the system will generate Store it in the historical database and compare it with the preset qualified threshold. The scores are then compared. This score data also serves as a feedback signal, transmitted via a high-speed data transmission network to the closed-loop control and execution module 400, which becomes the sole quantitative basis for subsequent control decisions.

[0077] See attached document Figure 1 and attached Figure 2 After the biofeedback and cognitive assessment module 300 outputs a quantified cognitive impact score, the logic controller in the closed-loop control and execution module 400 immediately initiates the negative feedback control program. The fundamental purpose of this program is to construct an automatic adjustment system with the trainee's psychological and physiological reactions as the controlled object and the video generation parameters as the control variables, ensuring that the final output training content can break through the trainee's psychological defense threshold.

[0078] Specifically, the logic controller first reads a preset intervention target threshold from the database. This intervention target threshold is a psychological statistical constant set based on a large sample of historical data, representing the minimum psychological arousal required to generate effective long-term memory. The controller then performs a difference operation between the received current cognitive impact score and the target threshold to calculate the efficacy error of this simulation.

[0079] ; in, This represents the control error value, used to quantify the gap between the current training effect and the expected goal; This indicates the preset intervention target threshold, which is usually set to a value between 80 and 90. This represents the normalized cognitive impact score output by the previous module.

[0080] After the calculation is completed, the system will proceed according to... The positive or negative value and magnitude of the value are used to execute binary branch decision logic.

[0081] when At this point, the logic determines that the intervention has met the standard. This indicates that the trainee's panic response has reached or exceeded the expected standard, and the virtual accident video has successfully triggered sufficient cognitive alertness. The logic controller then generates a set of execution signals: first, it sends a high-level unlocking pulse to the access control mechanism to drive the physical gate open; simultaneously, it sends a training completion flag to the backend database, records the timestamp of this successful completion and the corresponding score data, and ends the current closed-loop control process.

[0082] when At this point, the logic determines that the intervention is insufficient. This indicates that the trainees are indifferent, accustomed, or defensive towards the current video content, and have not generated a sufficient stress response. The logic controller then marks this positive efficiency error as a driving gain and transmits it as an input parameter to the parameter gradient update subunit. The system does not directly increase stimulation through simple repetition; instead, it uses the magnitude of this efficiency error to determine the adjustment range for the next round of video generation. A larger efficiency error means that more drastic adjustments to the generation parameters (such as viewing distance, motion rate, and image rendering style) are needed to break the trainees' psychological adaptation. At this time, the system keeps the access control mechanism locked and triggers the counterfactual risk inference generation module 200 to enter regeneration mode.

[0083] See attached document Figure 5 After the logic controller determines that the currently generated video fails to elicit sufficient cognitive alerts from the trainees, the system enters a parameter adaptive iteration phase. The core of this phase lies in using a gradient update algorithm to calculate the adjusted parameter set required for the next round of video generation, in order to directionally enhance the visual impact and physical dynamic intensity of the video.

[0084] Specifically, the system first defines a controllable parameter state vector. This controllable parameter state vector consists of values ​​for three core dimensions that control video generation: camera viewpoint distance, physical simulation time scaling factor, and image post-processing contrast.

[0085] ; in, Indicates the first The parameter state vector at the next iteration; This represents the Euclidean distance between the optical center of the virtual camera and the core point of the accident (such as the point of impact). This represents the time step scaling factor of the physics engine, used to control the visual rate at which incidents occur. (Indicates acceleration); This represents the contrast gain coefficient of the rendered image.

[0086] To calculate the parameter updates, the system introduces a sensitivity gradient vector. This sensitivity gradient vector is a constant vector pre-defined based on prior psychophysical data, indicating the contribution of each parameter's change direction to improving the cognitive impact score. Specifically, viewpoint distance is negatively correlated with the impact score (the closer the distance, the greater the impact), therefore its corresponding gradient component is negative; while the time scaling factor and contrast are positively correlated with the impact score, and their gradient components are positive.

[0087] The system calculates the first step based on the following gradient ascent formula. The parameter state vector for the next iteration: ; in, This indicates that the updated parameter state vector will serve as the input control condition for the next generation by the counterfactual risk inference generation module 200. This represents a saturation constraint function, used to force updated parameters to be constrained within a physically reasonable and device-executable range of values. Internally, to prevent viewpoint clipping or parameter overflow; This represents the learning rate or step size coefficient, used to control the adjustment range of a single iteration and prevent parameter oscillations. The sensitivity gradient vector is defined as follows: The weighted form.

[0088] After completing the above vector calculations, the system will The components are decoupled and distributed to the corresponding execution units: the updated viewpoint distance is transmitted to the projection module of the video generation unit, and the system recalculates the camera extrinsic matrix accordingly, causing the virtual camera to move towards the accident point along the optical axis. The distance; the updated time scaling factor is transmitted to the physics engine constraint unit, and the system adjusts the time step of the dynamics integral, which speeds up the falling or collision speed of objects in the regenerated video, enhancing the motion blur and instantaneous speed sense; the updated contrast is transmitted to the post-processing filter of the VAE decoder, and the system increases the standard deviation of the pixel histogram of the output frame to enhance the contrast between light and dark in the picture.

[0089] Through the above algorithm, the system constructs a local linear search mechanism in the parameter space to ensure that each regenerated video evolves in a direction that can induce a higher level of fear, until the efficiency error converges to zero or a negative value.

[0090] See attached document Figure 1 and attached Figure 2After the closed-loop control and execution module 400 iteratively generates video content using the aforementioned gradient update algorithm and confirms that the trainee's cognitive impact score meets the intervention criteria, the logic controller enters the physical execution phase. This physical execution phase, through a strict signal handshake protocol and hardware interlocking mechanism, transforms the digital evaluation results into access control over the physical space.

[0091] Specifically, the access control linkage execution logic adopts a dual-signal and logic triggering mechanism. The logic controller internally maintains two status register bits: a score pass flag and a playback end flag. When the biofeedback and cognitive assessment module 300 outputs a pass score, the system sets the score pass flag to a high level (Logic1). When the interactive training terminal reports that the video playback progress has reached 100%, the system sets the playback end flag to a high level (Logic1). The logic controller scans the states of these two registers at millisecond intervals, and only initiates the unlock instruction sequence when the condition of score pass flag bit ∧ playback end flag bit = 1 is met.

[0092] The command transmission process employs an industrial fieldbus protocol with a verification mechanism. The logic controller, acting as the master station, sends a write coil command to the access control actuator. The data frame includes the device address, function code, register start address, write data, and CRC16 checksum.

[0093] Upon receiving the instruction, the access control actuator first performs a CRC check. If the check passes, its internal microcontroller (MCU) drives the onboard relay circuit. The MCU applies a control voltage to the base of the relay driver transistor, energizing the relay coil and closing the normally open (NO) contact. This closure either connects the main power supply circuit of the gate motor or triggers the Open input port of the gate controller.

[0094] To prevent personnel congestion due to mechanical failure, the system includes an execution status feedback loop. Hall effect sensors or infrared beam sensors on the access control actuator monitor the physical position of the barrier gate. When the barrier gate is fully retracted, the sensor signal changes, and the access control actuator sends a success status word back to the logic controller via the bus.

[0095] If the logic controller does not receive the success status word within a preset time window (e.g., 2 seconds) after sending the unlock command, the system will trigger a fault alarm logic and forcibly disconnect the access control power supply to release the electromagnetic lock (Fail-Safe mechanism) to ensure the security of the physical passage in abnormal conditions.

[0096] ; in, This indicates the enable signal that is ultimately output to the access control driver circuit; A Boolean state value indicating a passing cognitive shock score; This represents a Boolean state value indicating the complete playback of the video. A Boolean status value indicating a system hardware failure or communication timeout error (1 indicates a failure exists); This represents the logical NOT operation for error states, ensuring that the enable signal is output only when there is no fault. Represents the logical AND operation.

[0097] To further illustrate the application process and beneficial effects of the technical solution of the present invention in actual industrial scenarios, the following description is provided in conjunction with specific application scenario embodiments and experimental verification data.

[0098] See attached document Figure 1 and attached Figure 2 In this application embodiment, the system is deployed in the scaffolding work area of ​​a large commercial complex construction project. This scaffolding work area is equipped with an image acquisition unit numbered CAM-04, covering a work surface with a vertical height of 15 meters.

[0099] At the point of time (10:15:23), Workers (ID:W-4021) When climbing to the third platform of the scaffolding, the system's panoramic perception and recognition module 100 detected in real time through the edge computing unit that the safety belt hook was not connected. The edge computing unit calculated the geometric distance constraint function value to be 0.89, exceeding the preset threshold of 0.75. The system immediately locked the image frame and extracted the worker's image. The set of key skeletal points and the three-dimensional point cloud data of the on-site environment.

[0100] At the point of time (10:15:25), Counterfactual risk simulation generation module 200 is launched. The physics engine constraint unit constructs the operator based on the skeleton key point set. A rag doll model was used, and the scaffolding support constraints were removed to simulate its free-fall trajectory under gravity. The video generation unit, combining the scene semantic context vector extracted in real-time, generated a 5-second video stream, Vgen_1. This video stream shows the workers from a third-person perspective. (Maintaining authentic features) The entire process of falling from a height of 15 meters and hitting the ground, with the lighting conditions and rust texture of the scaffolding in the background completely consistent with the current moment.

[0101] At the point of time (12:00:15), Workers After finishing work, the employee passes through the access control gate of the living area. The biometric feedback and cognitive assessment module 300 at the access control gate identifies the employee and forces the video stream Vgen_1 to play on the interactive training terminal.

[0102] During video playback, the micro-expression capture unit monitors the workers in real time. The system analyzed facial data. At the end of the first playback, the system calculated the peak instantaneous panic index to be 0.42, with a cognitive shock score of 55. The closed-loop control and execution module 400 calculated an efficiency error of 30. The logic controller determined that the intervention was insufficient, kept the access control locked, and triggered a parameter gradient update.

[0103] The system utilizes a gradient update algorithm to shorten the virtual camera viewpoint distance by 30% and adjust the physical simulation time scaling factor to 1.2 times. The counterfactual risk projection generation module 200 regenerates the video stream Vgen_2 within 1.5 seconds using the new parameters. This video stream is presented from a first-person subjective perspective, and the sense of falling speed is enhanced.

[0104] At the point of time (12:00:30), the terminal plays video stream Vgen_2. Monitoring data shows that the workers... The relative change rate of pupil diameter reached 0.15, and high-intensity activation was observed in facial movement units AU5 (upper eyelid elevation) and AU26 (jaw opening). The system calculated a new cognitive impact score of 92, which meets the requirements. .

[0105] At the point of time (12:00:35), the logic controller sends an unlocking command to the access control actuator, the gate opens, and the operator... pass.

[0106] See attached document Figure 6 The horizontal axis of the graph represents the experimental period (unit: week), and the vertical axis represents the daily violation rate per 100 people (%).

[0107] To verify the actual technical effectiveness of this system, a 12-week comparative experiment was conducted at the same construction site with a number of workers. The subjects were randomly divided into an experimental group (using the system of this invention) and a control group (using traditional centralized video education).

[0108] Figure 6 The solid curve in the figure represents the data trend of the experimental group, and the dashed curve represents the data trend of the control group. Data shows that in the early stages of the experiment (weeks 1-2), there was no significant difference in the violation rate between the two groups, remaining at around 4.5%. From week 3 onwards, the violation rate of the experimental group showed an exponential decline, dropping to 0.3% by week 12; while the control group only showed a linear and slow decline, remaining at 2.8% by week 12.

Claims

1. A security hazard identification and targeted security training system based on AI technology, characterized in that, include: The panoramic perception and recognition module (100) is used to access the video stream of the work site, identify the violations and the identity of the violators, and extract the image feature data of the current violation scene; The counterfactual risk simulation generation module (200) is used to construct and output a counterfactual simulation video based on the image feature data and the type of violation using a generative artificial intelligence model. The counterfactual simulation video is used to demonstrate the virtual accident process caused by the violation in the current scenario. The biofeedback and cognitive assessment module (300) is used to collect facial image data of the user through a camera device during the user's viewing of the counterfactual deduction video, and to calculate the user's cognitive impact score based on the facial image data. A closed-loop control and execution module (400) is used to compare the cognitive impact score with a preset intervention target threshold; When the cognitive shock score does not reach the intervention target threshold, a parameter adjustment instruction is sent to the counterfactual risk inference generation module (200) to trigger the regeneration of the counterfactual inference video.

2. The AI-based security hazard identification and targeted security training system according to claim 1, characterized in that, The panoramic perception and recognition module (100) also includes a three-dimensional scene reconstruction unit; The three-dimensional scene reconstruction unit is used to process the video frames of identified violations, and extract the three-dimensional geometric features and texture features of the scene using a three-dimensional Gaussian splashing algorithm or a monocular depth estimation algorithm, and transmit the three-dimensional geometric features and texture features as scene semantic context vectors to the counterfactual risk inference generation module (200).

3. The AI-based security hazard identification and targeted security training system according to claim 2, characterized in that, The counterfactual risk simulation generation module (200) includes a physics engine constraint unit and a video generation unit; The physics engine constraint unit is used to call the corresponding dynamic model according to the type of the violation, and calculate the physical motion trajectory sequence of the violating object in the virtual accident. The physical motion trajectory sequence includes the position coordinates and collision response data of the violating object as time changes. The video generation unit is used to employ a conditional diffusion model, taking the scene semantic context vector as a background map condition and the physical motion trajectory sequence as a motion constraint condition, to generate the counterfactual inference video that conforms to physical laws.

4. The AI-based security hazard identification and targeted security training system according to claim 1, characterized in that, The video generation unit is also used to receive parameter adjustment instructions from the closed-loop control and execution module (400); The video generation unit adjusts the rendering attributes during the generation process according to the control parameter vector in the parameter adjustment instruction. The rendering attributes include at least the viewing distance, the speed of the action of the accident, and the contrast intensity of the image.

5. The AI-based security hazard identification and targeted security training system according to claim 1, characterized in that, The biofeedback and cognitive assessment module (300) includes a micro-expression capture unit and an emotion calculation unit; The micro-expression capture unit is used to extract activation intensity data of key facial action units based on the facial motion coding system; The emotion calculation unit is used to receive the activation intensity data, calculate the instantaneous panic index in combination with the weighting coefficient, and then perform statistical processing on the instantaneous panic index within the video playback period to output the cognitive impact score.

6. The AI-based security hazard identification and targeted security training system according to claim 5, characterized in that, When calculating the instantaneous panic index, the emotion calculation unit executes the following logic: The activation intensity of action units associated with panic is obtained, the action units including at least inner eyebrow lifting, outer eyebrow lifting, upper eyelid lifting, and lip stretching; Obtain the rate of change of pupil diameter relative to a reference value; The activation intensity of the action unit is weighted and summed, and the rate of change of the pupil diameter is added. The resulting value is then mapped to a value within a probability interval through a normalization function, which is used as the instantaneous panic index.

7. The AI-based security hazard identification and targeted security training system according to claim 5, characterized in that, When outputting the cognitive impact score, the emotion calculation unit performs the following weighted calculation: Extract the maximum peak value of the instantaneous panic index within the video playback period; Calculate the time integral mean of the instantaneous panic index within the video playback period; The cognitive impact score is obtained by weighting and summing the maximum peak value and the average time integral value according to a preset proportional coefficient.

8. The AI-based security hazard identification and targeted security training system according to claim 4, characterized in that, The closed-loop control and execution module (400) includes an adaptive feedback controller; The adaptive feedback controller is used to calculate the difference between the intervention target threshold and the cognitive impact score; When the difference is greater than zero, the update step size of the generated parameters is calculated based on the product of the parameter sensitivity gradient vector and the difference, and the updated control parameter vector is included in the parameter adjustment instruction and sent to the counterfactual risk inference generation module (200).

9. A security hazard identification and targeted security training system based on AI technology according to claim 8, characterized in that, When adjusting the control parameter vector, the adaptive feedback controller executes at least one of the following adjustment strategies: Reduce the viewing distance or switch the viewing angle to a first-person perspective; Increase the degree of abrupt change in the rate of action that causes an accident; Enhance the color rendering contrast or create a sense of oppression in the image.

10. The AI-based security hazard identification and targeted security training system according to claim 1, characterized in that, The closed-loop control and execution module (400) also includes an access control linkage unit; The access control linkage unit is communicatively connected to the on-site access control gate system and is used to send an unlock signal to the on-site access control gate system only when the cognitive impact score reaches the intervention target threshold and the video playback is detected to be complete.