A construction behavior anomaly detection method and system based on a lightweight large model
By constructing a lightweight large-scale model for detecting abnormal construction behavior, the problem of limited data perception and insufficient model computing power in construction site safety supervision has been solved. This enables comprehensive and in-depth intelligent supervision and safety early warning, thereby improving the level of safety management at construction sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GONGCHENG MANAGEMENT CONSULTING
- Filing Date
- 2025-12-25
- Publication Date
- 2026-05-29
AI Technical Summary
Existing construction site safety supervision technologies suffer from problems such as limited data perception dimensions, high model computing power requirements, and insufficient complex interactive semantic reasoning capabilities, making it difficult to achieve all-weather, full-coverage intelligent monitoring and safety early warning.
A construction behavior anomaly detection method based on a lightweight large model is adopted. By collecting multi-source heterogeneous data, a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine are constructed. Spatiotemporal alignment and deep fusion are performed, and logical reasoning is combined with a knowledge graph in the construction safety domain to identify abnormal behaviors in construction scenarios.
It has enabled comprehensive and in-depth supervision of construction sites, improved the accuracy of perception of complex environments, reduced false alarm rates, ensured the timeliness of safety management and control, generated structured rectification suggestions, and promoted the digital transformation of building safety supervision.
Smart Images

Figure CN122116260A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for detecting anomalies in construction behavior based on a lightweight large model. Background Technology
[0002] With the rapid development of the construction industry, on-site safety management has become a core element in ensuring the smooth progress of projects and the safety of personnel. Construction sites are complex environments, involving numerous personnel, diverse types of machinery and equipment, and frequent overlap of work processes, and are accompanied by various potential risks such as falls from heights, falling objects, and mechanical injuries. Traditional construction safety supervision mainly relies on manual inspections. This method not only consumes a large amount of manpower but also suffers from problems such as large blind spots, poor real-time performance, and strong subjectivity, making it difficult to achieve effective, round-the-clock, and comprehensive monitoring.
[0003] In recent years, with the popularization of computer vision and IoT technologies, automated monitoring technologies based on video surveillance have been gradually applied to construction sites. However, existing construction behavior anomaly detection technologies still face many challenges. First, most existing systems analyze based on a single video modality, failing to effectively integrate the rich environmental sensor data and spatial information of the construction site, resulting in severe data silos and an inability to comprehensively perceive the complex state of the construction site from multiple dimensions. Second, mainstream deep learning behavior recognition models typically have a huge number of parameters and high computational complexity, making it difficult to achieve efficient deployment on resource-constrained edge devices at construction sites, resulting in high detection latency and failing to meet the real-time requirements of safety warnings. In addition, existing behavior recognition algorithms are mostly limited to recognizing simple actions (such as not wearing a safety helmet or smoking), lacking a deep understanding and reasoning ability for complex interaction logic in construction scenarios. For example, it is difficult to accurately determine whether a person is in a dangerous area under a crane arm or whether the operator has the corresponding equipment operation authority based solely on vision. This lack of semantic understanding leads to high false alarm and false negative rates when the system faces complex violations, making it difficult to truly replace human intelligent decision-making.
[0004] In summary, existing construction project inspection technologies suffer from insufficient data fusion, cumbersome models, and a lack of deep semantic reasoning capabilities, making it difficult to meet the needs of refined and intelligent safety management at construction sites. Therefore, there is an urgent need for a construction behavior anomaly detection technology solution that can integrate multi-source heterogeneous data, balance lightweight design with high precision, and possess strong logical reasoning capabilities. Summary of the Invention
[0005] This invention provides a method and system for detecting construction behavior anomalies based on a lightweight large model, solving the problems of existing technologies such as single data perception dimension, high model computing power requirements, and insufficient complex interactive semantic reasoning capabilities. To achieve the above objectives, the embodiments of this invention adopt the following technical solutions:
[0006] In a first aspect, embodiments of the present invention propose a method for detecting anomalies in construction behavior based on a lightweight large model, the method comprising:
[0007] Collect multi-source heterogeneous data from the construction site. The multi-source heterogeneous data includes real-time monitoring video streams obtained through cameras, environmental and equipment status data obtained through IoT sensors, and building information model (BIM) data. Perform spatiotemporal alignment preprocessing on the multi-source heterogeneous data.
[0008] A construction behavior analysis architecture based on a lightweight large model is constructed, which includes a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine.
[0009] A lightweight visual feature extraction network is used to perform frame-by-frame detection on the preprocessed video stream to extract the entity features and location information of personnel, machinery and equipment and materials at the construction site; at the same time, a spatiotemporal graph convolutional behavior recognition network is used to analyze the sequence of key points of human skeletons in the video stream to extract the spatiotemporal features of human actions.
[0010] Entity features, location information, spatiotemporal features of motion, environmental and equipment status data, and BIM data are input into a cross-modal feature fusion encoder, which generates a fusion feature vector containing construction scene semantics through a self-attention mechanism.
[0011] The fused feature vectors are mapped to cue word embedding vectors and input into the multimodal big language model inference engine. The inference engine combines the pre-set construction safety domain knowledge graph to perform logical reasoning on the current construction scenario and identify the interaction relationships between personnel and machinery, and between personnel and the environment.
[0012] Based on the reasoning results, determine whether there are any abnormal construction behaviors. If so, generate an early warning message that includes the type of abnormality, risk level, and rectification suggestions.
[0013] Preferably, spatiotemporal alignment preprocessing of multi-source heterogeneous data includes:
[0014] Establish a unified spatiotemporal coordinate system, use geographic information in BIM data to calibrate the positions of cameras and sensors, and construct a three-dimensional spatial mapping matrix;
[0015] For video streams and sensor data with different sampling frequencies, a sliding window mechanism and interpolation algorithm are used to synchronize the time dimension.
[0016] The Kalman filter algorithm is used to denoise the sensor data, and the image enhancement algorithm is used to dehaze and adjust the brightness of the video stream, and invalid data frames are removed.
[0017] The aligned video frame images are mapped to the corresponding spatial grid of the BIM model to form enhanced video data with spatial semantic labels.
[0018] Preferably, the lightweight visual feature extraction network is built based on an improved YOLO network, and its construction process includes:
[0019] The backbone feature extraction network of the original YOLO network is replaced with the MobileNetV3 network, and depthwise separable convolutions are used to reduce the number of model parameters.
[0020] A receptive field module (RFB) is introduced into the feature output layer of the backbone network. The effective receptive field is expanded by dilated convolutions with different dilation rates, thereby enhancing the feature extraction capability for multi-scale targets.
[0021] The Global Attention Mechanism (GAM) is integrated into the neck network. By using channel attention submodules and spatial attention submodules, background noise interference is suppressed, and attention is enhanced to the key features of safety helmets, reflective vests and small construction tools.
[0022] By utilizing knowledge distillation technology, a high-precision detection model with a larger number of parameters is used as the teacher network to guide the training of a lightweight visual feature extraction network. By minimizing the loss function between the output feature maps of the teacher network and the student network, a balance between lightweight and high precision is achieved.
[0023] Preferably, the spatiotemporal graph convolutional behavior recognition network employs a centroid-aware mechanism, specifically including:
[0024] A pose estimation model is used to extract the coordinate sequence of human skeleton key points from a video stream.
[0025] Based on prior knowledge of anthropometry, the coordinates of key points of the head, torso, and limbs are weighted and calculated to estimate the global center of gravity and local core center of gravity of the human body in real time.
[0026] Extract the center of gravity dynamics features, including the distance from the keypoint to the global center of gravity, the movement rate of the global center of gravity, the distance from the keypoint to the local core center of gravity, and the relative movement rate of the local core center of gravity.
[0027] The center of gravity dynamics features are input into a multilayer perceptron to generate dynamic modulation weights. These dynamic modulation weights are then used to adaptively adjust the adjacency matrix of the spatiotemporal graph convolutional network, enhancing the network's sensitivity to changes in human balance and enabling the identification of high-risk actions such as falls, sudden running, or illegal climbing.
[0028] Preferably, the processing steps of the cross-modal feature fusion encoder include:
[0029] Construct a heterogeneous data graph structure, using entities obtained from visual detection as nodes and spatial distances between entities and physical relationships perceived by sensors as edges;
[0030] Graph neural networks (GNNs) are used to aggregate features of graph structures to generate structured features of the scene.
[0031] The scene's structured features are combined with the spatiotemporal features of actions and the textual description features of the environment;
[0032] A multi-head self-attention mechanism is used to calculate the correlation weights between features of different modalities, enhance features with high weights, suppress redundant features with low weights, and generate a cross-modal fusion feature vector with a unified dimension.
[0033] By pre-training the encoder using a contrastive learning strategy, the distance between semantically related image and text features is narrowed, while the distance between semantically unrelated features is widened, thereby improving the semantic alignment capability of features.
[0034] Preferably, the construction and reasoning process of the multimodal large language model inference engine includes:
[0035] The LoRA parameter-efficient fine-tuning technology is used to fine-tune the pre-trained basic large language model by using annotated construction safety inspection text records and corresponding violation image data, so that it can learn professional terminology and safety standard logic in the construction field.
[0036] Construct a thought chain prompt template to transform the input fused feature vector into a question described in natural language, guiding the model to reason step by step: first, identify the objects and states in the scene; second, analyze the interaction behavior between objects; and finally, determine the nature of the behavior according to safety specifications.
[0037] In the reasoning process, retrieval enhancement generation (RAG) technology is introduced to retrieve construction safety specification document library in real time, input relevant legal provisions as contextual information into the model, and verify the compliance of the reasoning results.
[0038] Output a structured anomaly detection report, which includes a confidence score for the abnormal behavior and the corresponding legal basis.
[0039] Preferably, identifying the interaction relationships between personnel and machinery, and between personnel and the environment, specifically includes:
[0040] Based on the visual inspection results, the Euclidean distance between the personnel and the hazard source is calculated. Combined with the electronic fence information in the BIM model, it is determined whether the personnel have entered the hazard area.
[0041] By analyzing the spatial overlap between the key hand trajectories of personnel and the operating parts of mechanical equipment, and combining the data from equipment operation status sensors, it can be determined whether personnel are operating machinery without authorization or performing unauthorized or incorrect operations.
[0042] By detecting the matching degree between the characteristics of the equipment worn by personnel and the type of work environment, it can be determined whether there are any abnormal interactions such as not wearing safety belts when working near the edge or not being equipped with fire extinguishing equipment when working with hot air.
[0043] For collaborative work scenarios involving multiple people, spatiotemporal graph convolutional networks are used to analyze the synchronicity of the action sequences of multiple personnel and identify whether there is a risk of object impact or crushing due to coordination errors.
[0044] Preferably, it also includes an adaptive update step for the model:
[0045] Collect abnormal samples with confidence scores below a preset threshold inferred by the large language model, as well as samples that are confirmed as false alarms or missed alarms by manual inspectors, and construct a difficult example dataset;
[0046] Using generative adversarial networks (GANs) or diffusion models, augmented samples are generated based on hard example datasets to simulate construction scenarios under different lighting, weather, and occlusion conditions.
[0047] Using a difficult example dataset and augmented samples, the lightweight visual feature extraction network and the spatiotemporal graph convolutional behavior recognition network were incrementally trained on a cloud server.
[0048] When the number of model updates reaches a preset threshold, the updated model parameters are sent to edge computing nodes through a cloud-edge collaboration mechanism to replace the old version of the model.
[0049] Preferably, determining whether there are abnormal construction behaviors and risk classifications includes:
[0050] A pre-defined safety risk assessment matrix is used, with dimensions including the severity of the behavior, frequency of occurrence, and environmental hazard coefficient.
[0051] Map the abnormal behavior categories output by the large language model to the severity of the behavior, map the frequency of historical data statistics to the frequency of occurrence, and map the on-site environmental state reflected by sensor data to the environmental hazard coefficient.
[0052] Calculate the comprehensive risk index. If the index exceeds the first threshold, it is judged as a general violation and a voice reminder is triggered. If the index exceeds the second threshold, it is judged as a serious hidden danger, triggering equipment shutdown interlock and pushing an emergency notification to the management personnel terminal.
[0053] Detected video clips of abnormal behavior are automatically edited, tagged, and stored to form a traceable chain of evidence of violations.
[0054] Secondly, embodiments of the present invention propose a construction behavior anomaly detection system based on a lightweight large model, the system comprising:
[0055] The multi-source data acquisition module is used to collect multi-source heterogeneous data from the construction site. The multi-source heterogeneous data includes real-time monitoring video streams obtained through cameras, environmental and equipment status data obtained through IoT sensors, and building information model (BIM) data. The module also performs spatiotemporal alignment preprocessing on the multi-source heterogeneous data.
[0056] The architecture building module is used to build a construction behavior analysis architecture based on a lightweight large model. The architecture includes a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine.
[0057] The feature extraction module is used to perform frame-by-frame detection on the preprocessed video stream using a lightweight visual feature extraction network to extract the entity features and location information of personnel, machinery and equipment and materials at the construction site; at the same time, it uses a spatiotemporal graph convolutional behavior recognition network to analyze the sequence of key points of human skeletons in the video stream to extract the spatiotemporal features of human actions.
[0058] The feature fusion module is used to input entity features, location information, spatiotemporal features of actions, environmental and equipment status data, and BIM data into the cross-modal feature fusion encoder, and generate a fused feature vector containing construction scene semantics through a self-attention mechanism.
[0059] The reasoning and analysis module is used to map the fused feature vector into prompt word embedding vectors, which are then input into the multimodal large language model reasoning engine. The reasoning engine combines a pre-set construction safety domain knowledge graph to perform logical reasoning on the current construction scenario and identify the interaction relationships between personnel and machinery, and between personnel and the environment.
[0060] The anomaly detection and early warning module is used to determine whether there are any abnormalities in construction behavior based on the reasoning results. If so, it generates early warning information that includes the anomaly type, risk level, and rectification suggestions.
[0061] Beneficial effects:
[0062] This invention proposes a construction behavior anomaly detection method based on a lightweight large model. Through multimodal fusion and intelligent analysis architecture, it achieves comprehensive and in-depth supervision of construction sites, breaking through the bottlenecks of traditional technologies such as single perception, limited computing power, and insufficient semantic understanding. A cross-modal feature fusion mechanism is introduced to align and deeply fuse video streams, environmental sensor data, and BIM spatial information in time and space, breaking down the information barriers of single visual monitoring and constructing a digital twin foundation with holographic perception capabilities, significantly improving the perception accuracy of complex construction environments. Specifically, a dual-stream architecture of a lightweight visual feature extraction network and a spatiotemporal graph convolutional network is adopted. Through targeted network pruning optimization, the number of model parameters is significantly reduced, making it adaptable to the computing power of edge computing nodes, achieving real-time detection and early warning, and ensuring the timeliness of safety management. A multimodal large language model inference engine combined with professional knowledge graphs is used to achieve deep logical reasoning of interaction relationships. It can not only identify surface violations, but also detect hidden risks such as unauthorized operations, and generate structured rectification suggestions, which greatly improves the intelligence level of anomaly detection, reduces the false alarm rate, and promotes the digital transformation of building safety supervision. Attached Figure Description
[0063] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0064] Figure 1 This is a flowchart of a construction behavior anomaly detection method based on a lightweight large model proposed in an embodiment of the present invention;
[0065] Figure 2 This is a schematic diagram of a construction behavior anomaly detection system based on a lightweight large model proposed in an embodiment of the present invention;
[0066] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0067] To more clearly illustrate the technical solutions in the embodiments of the invention or the prior art, the invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the invention, but does not constitute a limitation on the invention.
[0068] The first aspect, reference Figure 1 This invention provides a method for detecting construction behavior anomalies based on a lightweight large model, which can be executed on a computer device. This computer device can be a server, a personal computer (PC), or an embedded system for detecting construction behavior anomalies based on a lightweight large model with sufficient computing power. The device typically includes, but is not limited to, a processor, memory, communication interface, and input / output devices. The memory stores computer program instructions, and the processor executes these instructions to implement the construction behavior anomaly detection method based on a lightweight large model of this invention. This method aims to address the pain points in current construction project inspections, such as single data sources, high computational requirements for algorithm models, and a lack of deep semantic understanding of complex scenarios. By deeply integrating computer vision, Internet of Things (IoT) sensing technology, and Building Information Modeling (BIM), and utilizing the collaborative reasoning of lightweight neural networks and a multimodal large language model (LLM), intelligent supervision of all elements and processes of the construction site can be achieved. Figure 1 As shown, the method specifically includes the following steps:
[0069] S101 collects multi-source heterogeneous data from the construction site. The multi-source heterogeneous data includes real-time monitoring video streams obtained through cameras, environmental and equipment status data obtained through IoT sensors, and building information model (BIM) data. The multi-source heterogeneous data is then preprocessed with spatiotemporal alignment.
[0070] At construction sites, data comes from a wide range of sources and varies in format. Video data provides rich visual information, sensor data reflects the physical state of the environment and equipment, while BIM data provides precise spatial geometric and attribute information. To achieve effective fusion of multi-source data, the problem of inconsistent spatiotemporal references must first be addressed. Specifically, S101 includes the following sub-steps:
[0071] S1011, Establish a unified spatiotemporal coordinate system, and use the geographic information in the BIM data to calibrate the positions of cameras and sensors, constructing a three-dimensional spatial mapping matrix. In this embodiment, the world coordinate system of the BIM model is used as the reference coordinate system. For each camera deployed on the construction site... and sensors The physical coordinates of the camera at the construction site are determined using a total station or real-time kinematic (RTK) positioning technology. For the camera, its intrinsic parameter matrix also needs to be calibrated. and extrinsic parameter matrix Among them, the intrinsic parameter matrix This reflects the camera's optical characteristics such as focal length and principal point; the extrinsic parameter matrix is composed of the rotation matrix. Translation vector The composition describes the pose relationship between the camera coordinate system and the BIM world coordinate system.
[0072] Construct from camera pixel coordinates To BIM World Coordinates The three-dimensional spatial mapping matrix. For any point in the video, its mapping relationship with a point in the BIM space can be expressed as:
[0073]
[0074] in, , which is the scale factor, representing the depth distance of a pixel in the camera coordinate system; These are the pixel coordinates on the image plane; This refers to the three-dimensional coordinates in the BIM world coordinate system. This mapping matrix allows for the projection of two-dimensional pixels from a video image onto the three-dimensional space of the BIM model, or the projection of components from the BIM model (such as electronic fence boundaries) onto the video image, achieving precise alignment of visual and spatial information.
[0075] S1012 uses a sliding window mechanism and interpolation algorithm to synchronize the time dimension of video streams and sensor data with different sampling frequencies.
[0076] Since video streams are typically high-frequency data at 25 frames per second (FPS) or 30 FPS, while environmental sensors such as temperature, humidity, noise, and dust, as well as equipment status sensors such as tower crane load and tilt angle, may have a sampling frequency of 1 Hz or lower, there is a misalignment between the two on the time axis.
[0077] This embodiment establishes a unified timestamp benchmark for the system. For high-frequency video streams, indexing is performed on a frame-by-frame basis. For low-frequency sensor data, a cubic spline interpolation algorithm is used for upsampling to fill in the missing sensor values corresponding to each video frame, constructing a continuous sensor data curve to ensure that each video frame corresponds to an accurate sensor state value.
[0078] After interpolation is completed, a spatiotemporal data packet is constructed using a sliding window mechanism. The time length of the sliding window is set to... (e.g., 3 seconds), step size is (For example, 1 second). Each window contains several frames of video images and a sequence of sensor data aligned to the corresponding time, ensuring that the data input to the model is strictly synchronized in the time dimension.
[0079] S1013 uses the Kalman filter algorithm to denoise the sensor data, and uses the image enhancement algorithm to defog and adjust the brightness of the video stream, and removes invalid data frames.
[0080] The construction site environment is harsh, and sensor data is often subject to electromagnetic interference, resulting in noise. Video data is easily affected by dust and insufficient lighting. For sensor data, a linear Kalman filter is used for optimal estimation. Specifically, this involves calculating the prior state estimate for the current moment using the state estimate from the previous time step and the state transition matrix, and calculating the prior error covariance. Subsequently, the Kalman gain is calculated using the observation matrix, and the prior state is corrected based on the current sensor observations to obtain the optimal posterior state estimate, thereby effectively filtering out Gaussian white noise from the sensor data.
[0081] For the video stream, a dehazing algorithm based on Dark Channel Prior (DCP) is employed to estimate atmospheric light values and transmittance, restoring a haze-free image. Simultaneously, Contrast-Limited Adaptive Histogram Equalization (CLAHE) is combined to improve image contrast under low-light conditions. For invalid frames such as black screens or distorted images caused by occlusion or equipment malfunction, automatic identification and removal are performed by calculating the image's average grayscale value and variance.
[0082] S1014, the aligned video frame images are mapped to the corresponding spatial grid of the BIM model to form enhanced video data with spatial semantic labels.
[0083] Using the mapping relationship established by S1011, target areas (such as the center point of the detection box) in video frames are mapped to the BIM model space. The BIM model is pre-defined semantically according to the construction area (such as "foundation pit operation area", "high voltage power distribution area", "material storage area"). When a pixel in the video falls into a grid of the BIM model, the spatial attribute label of that grid (such as "edge", "hole", "no entry area") is automatically obtained. These spatial semantic labels are appended to the video frame data in the form of metadata to form enhanced video data, providing prior knowledge for subsequent large model inference.
[0084] S102 constructs a construction behavior analysis architecture based on a lightweight large model. The architecture includes a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine.
[0085] The architecture adopts a collaborative design concept of "end-edge-cloud". The lightweight visual feature extraction network and the spatiotemporal graph convolutional behavior recognition network are deployed on edge computing nodes at the construction site, responsible for real-time feature extraction and preliminary analysis; the multimodal large language model inference engine is deployed on high-performance servers in the cloud or locally, responsible for handling complex logical reasoning and cross-modal fusion tasks.
[0086] S103 utilizes a lightweight visual feature extraction network to perform frame-by-frame detection on the preprocessed video stream, extracting the entity features and location information of personnel, machinery, and materials at the construction site; simultaneously, it uses a spatiotemporal graph convolutional behavior recognition network to analyze the sequence of key points of human skeletons in the video stream, extracting the spatiotemporal features of human actions.
[0087] This step is the core of the entire method's perception layer, and it is divided into two parallel branches: visual object detection and action / behavior recognition. Specifically, S103 includes the following sub-steps:
[0088] Branch 1: Lightweight visual feature extraction based on the improved You Only Look Once (YOLO) algorithm;
[0089] S1031 replaces the backbone feature extraction network of the original YOLO network with the MobileNetV3 network and reduces the number of model parameters by using depthwise separable convolution.
[0090] This embodiment uses MobileNetV3 as the backbone network. The core of MobileNetV3 is Depthwise Separable Convolution, which decomposes standard convolution into depthwise convolution and pointwise convolution. This decomposition significantly reduces computation and parameter count while maintaining feature extraction capabilities. Furthermore, MobileNetV3 introduces a squeeze-and-excitation (SE) channel attention module and an h-swish activation function, further enhancing the performance of this lightweight network.
[0091] S1032 introduces a receptive field block (RFB) in the feature output layer of the backbone network. It expands the effective receptive field through dilated convolutions with different dilation rates, thereby enhancing the feature extraction capability for multi-scale targets.
[0092] The RFB module simulates the eccentricity characteristic of human vision by introducing dilated convolutions on top of the Inception structure. The RFB module contains multiple branches, each first undergoing dimensionality reduction through convolution, followed by a dilated convolution with different dilation rates (e.g., 1, 3, 5). The features extracted from each branch are concatenated and then fused through convolution. This structure significantly expands the receptive field without increasing the number of parameters, thereby improving the detection sensitivity for small targets at construction sites (such as distant individuals not wearing safety harnesses).
[0093] S1033 incorporates a Global Attention Mechanism (GAM) in the neck network. Through channel attention and spatial attention submodules, it suppresses background noise interference and enhances attention to key features of safety helmets, reflective vests, and small construction tools. The GAM module aims to improve performance by reducing information reduction and amplifying global-dimensional interactive features.
[0094] The channel attention submodule rearranges the dimensions of the input feature map before feeding it into a multi-layer perceptron (MLP) to capture channel dependencies, generating and weighting channel attention maps. The spatial attention submodule uses convolutional layers to fuse spatial information, generating and weighting spatial attention maps. Through the GAM mechanism, the network can automatically "focus" on key areas related to construction safety in the image while suppressing interference from complex backgrounds such as scaffolding and soil.
[0095] S1034. Using knowledge distillation technology, a high-precision detection model with a larger number of parameters is used as the teacher network to guide the training of the lightweight visual feature extraction network. By minimizing the loss function between the output feature maps of the teacher network and the student network, a balance between lightweight and high precision of the model is achieved.
[0096] Construct a teacher network with a large number of parameters (such as YOLOv8x) and a lightweight student network (MobileNetV3-YOLO). During training, define the total loss function. :
[0097]
[0098] in, The loss between the student's predicted bounding box and the ground truth bounding box; The distillation loss includes a soft label loss that calculates the relative entropy (Kullback-Leibler Divergence, KL divergence) between the class probability distributions of the student network and the teacher network, and a mean squared error (MSE) loss between intermediate feature layers. and This refers to the hyperparameters used to balance the weights. Through knowledge distillation, the lightweight model can learn the feature extraction patterns of the larger model, significantly improving detection accuracy.
[0099] Branch 2: Centroid-aware spatiotemporal graph convolution behavior recognition;
[0100] S1035 extracts the human skeleton keypoint coordinate sequence from the video stream using a pose estimation model. The YOLOv8-Pose model is used to detect keypoints on the detected human targets, outputting a sequence of 18 keypoint coordinates for each human body (e.g., nose, neck, shoulder, elbow, wrist, hip, knee, ankle, etc.), denoted as... This forms time series data.
[0101] S1036, based on prior knowledge of anthropometry, performs weighted calculations on the coordinates of key points of the head, torso, and limbs to estimate the global center of gravity and local core center of gravity of the human body in real time.
[0102] Traditional behavior recognition is mostly based on skeletal connections, ignoring the "center of gravity," a physical quantity that is crucial for balance.
[0103] According to anthropometry data, the proportion of the mass of each limb segment to the total body mass is relatively fixed. Define each key point. The corresponding quality weight is .
[0104] Global Center of Gravity (CoG) The calculation formula is:
[0105]
[0106] in, For the first A key point at a moment coordinates .
[0107] Local Core CoG The focus is primarily on trunk stability, selecting key points such as the neck and left and right hips. Take an average:
[0108]
[0109] in, The number of core and key points.
[0110] S1037, Extract the center of gravity dynamics features, including the distance from keypoints to the global center of gravity, the movement rate of the global center of gravity, the distance from keypoints to the local core center of gravity, and the relative movement rate of the local core center of gravity. Construct a center of gravity dynamics feature vector, including:
[0111] Distance features: (Reflects the degree of extension of the limbs relative to the center of gravity); .in This represents the Euclidean distance.
[0112] Speed characteristics: (Reflects overall movement speed);
[0113] (Reflecting the relative motion of the core with respect to the whole). These features are highly sensitive to identifying behaviors such as falls (rapid descent of the center of gravity) and unauthorized running at heights (excessive horizontal speed of the center of gravity).
[0114] S1038, the aforementioned center-of-gravity dynamic features are input into a multilayer perceptron to generate dynamically modulated weights. These weights are then used to adaptively adjust the adjacency matrix of the Spatial Temporal Graph Convolutional Network (ST-GCN), enhancing the network's sensitivity to changes in human balance and enabling the identification of high-risk actions such as falls, sudden running, or unauthorized climbing. Traditional ST-GCNs use a fixed adjacency matrix. This only expresses physical connections. This embodiment constructs a dynamic graph convolution. The centroid dynamic feature vector is then used to... Input a two-layer multi-layer perceptron (MLP), output a weight matrix with the same dimension as the adjacency matrix. .
[0115] Dynamically adjusted adjacency matrix for:
[0116]
[0117] in This represents the Hadamard product (element-wise multiplication). These are the dynamic weights output by the MLP (activated by Sigmoid). Utilizing... By performing graph convolution operations, the network can dynamically strengthen or weaken the connection weights between skeletal nodes based on the current center of gravity. For example, when instability is detected, the network automatically focuses on feature changes in the ankle and knee nodes, thereby accurately identifying signs of an impending fall.
[0118] S104 inputs entity features, location information, spatiotemporal features of motion, environmental and equipment status data, and BIM data into the cross-modal feature fusion encoder, and generates a fusion feature vector containing construction scene semantics through a self-attention mechanism.
[0119] S1041, construct a heterogeneous data graph structure, using entities obtained by visual detection as nodes, and spatial distances between entities and physical relationships perceived by sensors as edges.
[0120] Construct a scene graph, with nodes representing detected entities such as people, equipment, and materials. The edge construction rules include: spatially adjacent edges (based on Euclidean distance calculated from BIM coordinates, connected if the distance is less than a threshold) and physically related edges (based on sensor data to determine whether equipment is being operated).
[0121] S1042, Graph Neural Network (GNN) is used to aggregate features of the graph structure to generate structured features of the scene.
[0122] Feature aggregation is performed using a Graph Attention Network (GAT). For each node, the features of its neighbors are weighted and summed by calculating the attention coefficients between the node and its neighbors, thereby updating the node's feature representation. Through GNN aggregation, the features of each entity not only include its own appearance but also incorporate contextual information from the surrounding environment and objects, generating structured features of the scene.
[0123] S1043, the scene structured features are concatenated with the action spatiotemporal features and environmental textual description features. Environmental sensor data is converted into textual description features (e.g., "Current wind speed 12 m / s, strong wind warning"), and a pre-trained Bidirectional Encoder Representations from Transformers (BERT) model is used to extract textual feature vectors. The action spatiotemporal features, scene structured features, and textual features are then concatenated to form a multimodal feature vector.
[0124] S1044 employs a multi-head self-attention mechanism to calculate the correlation weights between features of different modalities, enhancing high-weight features and suppressing low-weight redundant features to generate a cross-modal fusion feature vector of uniform dimension. The concatenated features are then input into the transformer encoder layer. The multi-head self-attention mechanism automatically learns the correlations between different modalities. For example, when the text feature indicates "strong wind," the attention mechanism significantly increases the weights on the "tower crane" entity feature and the "high-altitude operation" action feature. Finally, a fixed-dimensional fusion feature vector is output, which highly condenses all the semantic information of the current construction scene.
[0125] S1045 employs a contrastive learning strategy to pre-train the encoder, bridging the gap between semantically relevant image-text features and widening the gap between semantically unrelated features, thereby improving the semantic alignment of features. To ensure that the fused features are better understood by subsequent large language models, a strategy similar to Contrastive Language-Image Pre-training (CLIP) is used for pre-training. Matching "scene-text" positive sample pairs and mismatched negative sample pairs are constructed, and the Information-Noise Contrastive Estimation (InfoNCE) loss function is optimized, ensuring that the feature vectors generated by the encoder are highly aligned with the natural language description in the semantic space.
[0126] S105 maps the fused feature vector into a prompt word embedding vector and inputs it into the multimodal large language model inference engine. The inference engine combines the preset construction safety domain knowledge graph to perform logical reasoning on the current construction scenario and identify the interaction relationship between personnel and machinery, and between personnel and the environment.
[0127] S1051, Construction and Inference Process of Multimodal Large Language Model Inference Engine. Low-Rank Adaptation (LoRA) Fine-tuning: Freezing the original weights in the Transformer layer of the pre-trained large model (such as Llama 2 or ChatGLM). Add a bypass low-rank matrix and ,make Using labeled data to and Fine-tuning allows the model to learn professional knowledge in the construction field, while significantly reducing training costs.
[0128] Chain-of-Thought (CoT) prompts construct specific prompt templates, map the input fused feature vectors into embeddings, and guide the model to reason step by step: identify object state, analyze interaction behavior, determine compliance, and give a conclusion.
[0129] Retrieval-Augmented Generation (RAG) involves pre-constructing a vector database containing safety regulations. During inference, relevant legal provisions are retrieved in real time and used as context input to the model, ensuring that the inference results are legally sound and reducing "illusions."
[0130] S1052 identifies the interaction relationships between personnel and machinery, and between personnel and the environment. Based on fused features and knowledge graphs, it performs deep logical reasoning, such as: combining BIM electronic fences to determine whether there is "intrusion into a dangerous area"; combining equipment sensor and permission information to determine whether there is "unlicensed operation"; combining environmental attributes to determine whether "working at height without a safety belt"; and using spatiotemporal graph convolution analysis to analyze the synchronization of multiple people's actions and identify "coordination error risks".
[0131] S106. Based on the reasoning results, determine whether there is any abnormality in the construction behavior. If so, generate an early warning message that includes the type of abnormality, the risk level, and rectification suggestions.
[0132] S1061, determine whether there are any abnormal construction behaviors and their risk levels. A multi-dimensional safety risk assessment matrix is preset, comprehensively considering the severity of the behavior ( ), frequency of occurrence ( ) and environmental risk factor ( Calculate the comprehensive risk index. .like If the violation exceeds the first threshold, it is considered a minor violation, triggering a voice alert; if it exceeds the second threshold, it is considered a serious hazard, triggering equipment shutdown and interlocking, and sending an emergency notification. Simultaneously, the system automatically edits and archives abnormal video clips to form a chain of evidence.
[0133] S1062, the adaptive update steps of the model. It has self-evolution capabilities, automatically collecting difficult examples with low confidence; using Generative Adversarial Networks (GANs) or diffusion models for data augmentation (such as simulating rain, fog, and occlusion); incrementally training the lightweight model in the cloud using the augmented dataset; when the model update volume reaches the target, the new model is distributed to edge nodes through a cloud-edge collaboration mechanism to achieve continuous iteration and optimization of the system.
[0134] For the second aspect, please refer to... Figure 2Furthermore, this invention also proposes a construction behavior anomaly detection system based on a lightweight large model, which is adapted to the construction behavior anomaly detection method based on a lightweight large model described in the foregoing embodiments. The system includes:
[0135] The multi-source data acquisition module is used to collect multi-source heterogeneous data from the construction site. The multi-source heterogeneous data includes real-time monitoring video streams obtained through cameras, environmental and equipment status data obtained through IoT sensors, and building information model (BIM) data. The module also performs spatiotemporal alignment preprocessing on the multi-source heterogeneous data.
[0136] The architecture building module is used to build a construction behavior analysis architecture based on a lightweight large model. The architecture includes a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine.
[0137] The feature extraction module is used to perform frame-by-frame detection on the preprocessed video stream using a lightweight visual feature extraction network to extract the entity features and location information of personnel, machinery and equipment and materials at the construction site; at the same time, it uses a spatiotemporal graph convolutional behavior recognition network to analyze the sequence of key points of human skeletons in the video stream to extract the spatiotemporal features of human actions.
[0138] The feature fusion module is used to input entity features, location information, spatiotemporal features of actions, environmental and equipment status data, and BIM data into the cross-modal feature fusion encoder, and generate a fused feature vector containing construction scene semantics through a self-attention mechanism.
[0139] The reasoning and analysis module is used to map the fused feature vector into prompt word embedding vectors, which are then input into the multimodal large language model reasoning engine. The reasoning engine combines a pre-set construction safety domain knowledge graph to perform logical reasoning on the current construction scenario and identify the interaction relationships between personnel and machinery, and between personnel and the environment.
[0140] The anomaly detection and early warning module is used to determine whether there are any abnormalities in construction behavior based on the reasoning results. If so, it generates early warning information that includes the anomaly type, risk level, and rectification suggestions.
[0141] A third aspect of this invention provides a computer device for detecting construction behavior anomalies based on a lightweight large model. Please refer to [link to relevant documentation]. Figure 3The system includes a memory and a processor connected in series. The memory stores computer programs, and the processor reads the computer programs and executes a construction behavior anomaly detection method based on a lightweight large model, as described in the first aspect of this embodiment. Specifically, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or last-in-first-out (FILO) memory, etc.; the processor may be, but is not limited to, microprocessors of the STM32F105 series, ARM (Advanced RISC Machines), x86 architecture processors, or processors with integrated NPUs (neural-network processing units). The working process, working details, and technical effects of the system provided in the second aspect of this embodiment can be found in the first aspect of this embodiment, and will not be repeated here.
[0142] This fourth aspect of the embodiment provides a computer-readable storage medium storing instructions containing the instructions of the construction behavior anomaly detection method based on a lightweight large model according to the first aspect of the embodiment. Specifically, the computer-readable storage medium stores instructions that, when executed on a computer, perform the construction behavior anomaly detection method based on a lightweight large model as described in the first aspect. The computer-readable storage medium refers to a data storage medium, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or Memory Sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The working process, details, and technical effects of the computer-readable storage medium provided in this fourth aspect of the embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0143] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform a construction behavior anomaly detection method based on a lightweight large model, as described in the first aspect of this embodiment. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0144] The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer or programmable device to execute the methods of various embodiments or some parts of embodiments.
[0146] Finally, it should be noted that although embodiments of the present invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for detecting anomalies in construction behavior based on a lightweight large model, characterized in that, The method includes: Collect multi-source heterogeneous data from the construction site. The multi-source heterogeneous data includes real-time monitoring video streams obtained through cameras, environmental and equipment status data obtained through IoT sensors, and building information model (BIM) data. Perform spatiotemporal alignment preprocessing on the multi-source heterogeneous data. A construction behavior analysis architecture based on a lightweight large model is constructed, which includes a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine. The lightweight visual feature extraction network is used to perform frame-by-frame detection on the preprocessed video stream to extract the entity features and location information of personnel, machinery and equipment and materials at the construction site; at the same time, the spatiotemporal graph convolutional behavior recognition network is used to analyze the sequence of key points of human skeletons in the video stream to extract the spatiotemporal features of human actions. The entity features, location information, spatiotemporal features of motion, environmental and equipment status data, and BIM data are input into a cross-modal feature fusion encoder, and a fusion feature vector containing construction scene semantics is generated through a self-attention mechanism. The fused feature vector is mapped to a prompt word embedding vector and input into the multimodal big language model inference engine; the inference engine combines a preset construction safety domain knowledge graph to perform logical reasoning on the current construction scenario and identify the interaction relationship between personnel and machinery, and between personnel and the environment; Based on the reasoning results, determine whether there are any abnormal construction behaviors. If so, generate an early warning message that includes the type of abnormality, risk level, and rectification suggestions.
2. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The spatiotemporal alignment preprocessing of the multi-source heterogeneous data includes: Establish a unified spatiotemporal coordinate system, use geographic information in BIM data to calibrate the positions of cameras and sensors, and construct a three-dimensional spatial mapping matrix; For video streams and sensor data with different sampling frequencies, a sliding window mechanism and interpolation algorithm are used to synchronize the time dimension. The Kalman filter algorithm is used to denoise the sensor data, and the image enhancement algorithm is used to dehaze and adjust the brightness of the video stream, and invalid data frames are removed. The aligned video frame images are mapped to the corresponding spatial grid of the BIM model to form enhanced video data with spatial semantic labels.
3. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The lightweight visual feature extraction network is built based on an improved YOLO network, and its construction process includes: The backbone feature extraction network of the original YOLO network is replaced with the MobileNetV3 network, and depthwise separable convolutions are used to reduce the number of model parameters. A receptive field module (RFB) is introduced into the feature output layer of the backbone network. The effective receptive field is expanded by dilated convolutions with different dilation rates, thereby enhancing the feature extraction capability for multi-scale targets. The Global Attention Mechanism (GAM) is integrated into the neck network. By using channel attention submodules and spatial attention submodules, background noise interference is suppressed, and attention is enhanced to the key features of safety helmets, reflective vests and small construction tools. By utilizing knowledge distillation technology, a high-precision detection model with a larger number of parameters is used as the teacher network to guide the training of the lightweight visual feature extraction network. By minimizing the loss function between the output feature maps of the teacher network and the student network, a balance between lightweight and high precision is achieved in the model.
4. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The spatiotemporal graph convolutional behavior recognition network employs a centroid-aware mechanism, specifically including: A pose estimation model is used to extract the coordinate sequence of human skeleton key points from a video stream. Based on prior knowledge of anthropometry, the coordinates of key points of the head, torso, and limbs are weighted and calculated to estimate the global center of gravity and local core center of gravity of the human body in real time. Extract the center of gravity dynamics features, which include the distance from the key point to the global center of gravity, the movement rate of the global center of gravity, the distance from the key point to the local core center of gravity, and the relative movement rate of the local core center of gravity. The aforementioned center of gravity dynamics features are input into a multilayer perceptron to generate dynamic modulation weights. These dynamic modulation weights are then used to adaptively adjust the adjacency matrix of the spatiotemporal graph convolutional network, enhancing the network's sensitivity to changes in human balance and enabling the identification of high-risk actions such as falls, sudden running, or illegal climbing.
5. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The processing steps of the cross-modal feature fusion encoder include: Construct a heterogeneous data graph structure, using entities obtained from visual detection as nodes and spatial distances between entities and physical relationships perceived by sensors as edges; The graph structure is aggregated using a graph neural network (GNN) to generate structured features of the scene. The scene structured features are concatenated with action spatiotemporal features and environmental text description features; A multi-head self-attention mechanism is used to calculate the correlation weights between features of different modalities, enhance features with high weights, suppress redundant features with low weights, and generate a cross-modal fusion feature vector with a unified dimension. By pre-training the encoder using a contrastive learning strategy, the distance between semantically related image and text features is narrowed, while the distance between semantically unrelated features is widened, thereby improving the semantic alignment capability of features.
6. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The construction and inference process of the multimodal large language model inference engine includes: The LoRA parameter-efficient fine-tuning technology is used to fine-tune the pre-trained basic large language model by using annotated construction safety inspection text records and corresponding violation image data, so that it can learn professional terminology and safety standard logic in the construction field. Construct a thought chain prompt template to transform the input fused feature vector into a question described in natural language, guiding the model to reason step by step: first, identify the objects and states in the scene; second, analyze the interaction behavior between objects; and finally, determine the nature of the behavior according to safety specifications. In the reasoning process, retrieval enhancement generation (RAG) technology is introduced to retrieve construction safety specification document library in real time, input relevant legal provisions as contextual information into the model, and verify the compliance of the reasoning results. Output a structured anomaly detection report, which includes a confidence score for the abnormal behavior and the corresponding legal basis.
7. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The identification of interactions between personnel and machinery, and between personnel and the environment, specifically includes: Based on the visual inspection results, the Euclidean distance between the personnel and the hazard source is calculated. Combined with the electronic fence information in the BIM model, it is determined whether the personnel have entered the hazard area. By analyzing the spatial overlap between the key hand trajectories of personnel and the operating parts of mechanical equipment, and combining the data from equipment operation status sensors, it can be determined whether personnel are operating machinery without authorization or performing unauthorized or incorrect operations. By detecting the matching degree between the characteristics of the equipment worn by personnel and the type of work environment, it can be determined whether there are any abnormal interactions such as not wearing safety belts when working near the edge or not being equipped with fire extinguishing equipment when working with hot air. For collaborative work scenarios involving multiple people, spatiotemporal graph convolutional networks are used to analyze the synchronicity of the action sequences of multiple personnel and identify whether there is a risk of object impact or crushing due to coordination errors.
8. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, It also includes the adaptive update step of the model: Collect abnormal samples with confidence scores below a preset threshold inferred by the large language model, as well as samples that are confirmed as false alarms or missed alarms by manual inspectors, and construct a difficult example dataset; Using generative adversarial networks (GANs) or diffusion models, augmented samples are generated based on the aforementioned hard example dataset to simulate construction scenarios under different lighting, weather, and occlusion conditions. Using the aforementioned difficult example dataset and expanded samples, the lightweight visual feature extraction network and the spatiotemporal graph convolutional behavior recognition network were incrementally trained on a cloud server; When the number of model updates reaches a preset threshold, the updated model parameters are sent to edge computing nodes through a cloud-edge collaboration mechanism to replace the old version of the model.
9. The construction behavior anomaly detection method based on a lightweight large model according to claim 1, characterized in that, The determination of whether there are abnormal construction behaviors and risk classification includes: A preset safety risk assessment matrix is provided, the dimensions of which include the severity of the behavior, the frequency of occurrence, and the environmental hazard coefficient. The abnormal behavior categories output by the large language model are mapped to the severity of the behavior, the frequency of historical data statistics is mapped to the occurrence frequency, and the on-site environmental state reflected by sensor data is mapped to the environmental hazard coefficient. Calculate the comprehensive risk index. If the index exceeds the first threshold, it is judged as a general violation and a voice reminder is triggered. If the index exceeds the second threshold, it is judged as a serious hidden danger, triggering equipment shutdown interlock and pushing an emergency notification to the management personnel terminal. Detected video clips of abnormal behavior are automatically edited, tagged, and stored to form a traceable chain of evidence of violations.
10. A construction behavior anomaly detection system based on a lightweight large model, characterized in that, The system includes: The multi-source data acquisition module is used to collect multi-source heterogeneous data from the construction site. The multi-source heterogeneous data includes real-time monitoring video streams acquired through cameras, environmental and equipment status data acquired through IoT sensors, and building information model (BIM) data. The module also performs spatiotemporal alignment preprocessing on the multi-source heterogeneous data. The architecture building module is used to build a construction behavior analysis architecture based on a lightweight large model. The architecture includes a lightweight visual feature extraction network, a spatiotemporal graph convolutional behavior recognition network, and a multimodal large language model inference engine. The feature extraction module is used to perform frame-by-frame detection on the preprocessed video stream using the lightweight visual feature extraction network to extract the entity features and location information of personnel, machinery and equipment and materials at the construction site; at the same time, it uses the spatiotemporal graph convolutional behavior recognition network to analyze the sequence of key points of human skeletons in the video stream to extract the spatiotemporal features of human actions. The feature fusion module is used to input the entity features, location information, spatiotemporal features of actions, environmental and equipment status data, and BIM data into the cross-modal feature fusion encoder, and generate a fusion feature vector containing construction scene semantics through a self-attention mechanism; The reasoning and analysis module is used to map the fused feature vector into a prompt word embedding vector and input it into the multimodal large language model reasoning engine; the reasoning engine combines a preset construction safety domain knowledge graph to perform logical reasoning on the current construction scenario and identify the interaction relationship between personnel and machinery, and between personnel and the environment; The anomaly detection and early warning module is used to determine whether there are any abnormalities in construction behavior based on the reasoning results. If so, it generates early warning information that includes the anomaly type, risk level, and rectification suggestions.