Distributed collaborative safety helmet detection model training system
By combining contribution-credibility evaluation and federated averaging algorithms with differential privacy and asymmetric encryption, and optimizing node weights and resource allocation, the low accuracy and security issues in the training of distributed safety helmet detection models are resolved, achieving efficient and secure model training and detection.
Patent Information
- Application Number
- CN202511829591.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the training of distributed safety helmet detection models suffers from low global model accuracy and weak anti-attack capabilities due to large differences in node data quality/contribution, non-independent and identically distributed data, and difficulty in assessing node credibility. Furthermore, there is a high risk of privacy leakage during data transmission, unreasonable resource allocation, and low efficiency and poor stability in the training process.
By dynamically calculating node weights through a dual evaluation of contribution and credibility, and combining local parameters with a federated averaging algorithm, a robust and highly accurate global optimization model is generated. Furthermore, data transmission security is ensured through real-time construction of trusted node profiles, differential privacy, and asymmetric encryption, while communication efficiency is optimized through dynamic resource scheduling.
In complex construction scenarios, a robust, highly accurate, and malicious attack-resistant global optimization model is generated, which improves the versatility and security of model aggregation, ensures the confidentiality of data transmission and the efficient allocation of resources, and achieves stable, secure, and efficient model training and iteration.
Smart Images

Figure CN121640223A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, in particular to a distributed cooperative safety helmet detection model training system. BACKGROUND
[0002] A safety helmet is a kind of personal protective equipment specially designed to protect the head from physical injury. In high-risk operation scenes such as construction sites and mines, wearing a safety helmet is the core defense line to protect the lives of operating personnel. With the application of intelligent technology in the field of safety production, safety helmet detection technology based on computer vision has gradually become a key means for safety supervision in high-risk operation scenes. By identifying whether operating personnel are wearing safety helmets in a standard manner in real time, it can timely warn against irregular behavior and reduce the risk of accidents. The core support of the detection technology lies in a high-precision safety helmet detection model.
[0003] Currently, to adapt to the distributed deployment needs of multiple regions and multiple devices in scenes such as construction sites and mines, the industry adopts a distributed model training mode to improve the adaptability of the model to different sub-scenes. However, in the existing technology, in the distributed safety helmet detection model training scene, the global model has low precision and weak anti-attack ability due to the large difference in node data quality / contribution, non-independent and identically distributed data, and difficulty in evaluating node credibility. At the same time, there is a high risk of privacy leakage in data transmission, and the training process is inefficient and unstable due to unreasonable resource allocation.
[0004] Based on this, the present application provides a distributed cooperative safety helmet detection model training system to solve the above-mentioned technical problems. SUMMARY
[0005] The present application aims to provide a distributed cooperative safety helmet detection model training system. The present application dynamically calculates node weights based on contribution and credibility, and combines a federated averaging algorithm to fuse local parameters, effectively avoiding the negative impact of low-contribution and low-trust nodes on the global model, generating a globally optimized model with strong robustness, high detection accuracy, and resistance to malicious attacks. It also adapts to non-independent and identically distributed data scenarios to improve the generalizability of aggregation, and ensures the confidentiality, integrity, and efficient allocation of resources in the whole process of distributed collaborative training by constructing a real-time node credibility profile, differential privacy, and asymmetric encryption to protect data transmission security and optimize communication efficiency. Thus, the system can stably, safely, and efficiently complete safety helmet detection model training and iteration in complex construction scenes.
[0006] To achieve the above-mentioned purpose, the present application provides the following technical solutions: The application provides a distributed cooperative hard hat detection model training system, comprising a data acquisition and preprocessing unit, a model training unit, a model aggregation unit, a model deployment and inference unit, and a safety and communication coordination unit. The data acquisition and preprocessing unit is used for distributed acquisition of construction site image or video data in a multi-node environment and preprocessing of the acquired data. The model training unit is used for parallel execution of training and local parameter optimization of the hard hat detection model on each local node based on a distributed computing framework. The model aggregation unit is used for receiving local model parameters uploaded by each node, dynamically calculating node weights and performing weighted aggregation based on an adaptive safety aggregation mechanism of contribution-degree-confidence double evaluation, and generating a globally optimized model. The model deployment and inference unit is used for distributing the updated global model to edge devices or terminal nodes and performing a hard hat detection inference task. The safety and communication coordination unit is used for monitoring the network state, computing load and historical cooperative behavior of each node, constructing a lightweight node trust profile, ensuring the safety of model updates by combining differential privacy and encrypted transmission, and optimizing communication efficiency through dynamic resource scheduling.
[0007] The data acquisition and preprocessing unit comprises a distributed data acquisition module, a data cleaning and screening module, and a data labeling and enhancement module. The distributed data acquisition module is used for real-time acquisition of hard hat wearing image and video data in different construction scenes through multi-node deployed image sensors. The data cleaning and screening module is used for excluding invalid data such as blur, repetition and irrelevance, and retaining valid samples containing clear hard hat targets and typical scene features. The data labeling and enhancement module is used for labeling the hard hat target frame through a semi-automatic labeling tool and expanding the diversity of the data set through enhancement operations such as image flipping, brightness adjustment and occlusion simulation.
[0008] The model training unit comprises a local model initialization module, a distributed training execution module and a local model evaluation module. The local model initialization module is used for downloading the latest global model from the model aggregation unit and initializing it as the basis on the local node. The distributed training execution module is used for performing forward and backward propagation of the hard hat detection model using the locally preprocessed data to iteratively update the local model. The local model evaluation module is used for calculating the precision and recall of the model on the local validation set to evaluate the local training effect.
[0009] The model aggregation unit comprises a node contribution degree evaluation module, a node credibility evaluation module, and an adaptive weighted aggregation module, wherein: The node contribution degree evaluation module is configured to quantize the training contribution degree of each node to the global model according to the node data volume, data quality, and local model performance. The node credibility evaluation module is configured to evaluate the node historical behavior compliance and data transmission security in combination with the credible image of the security and communication coordination unit. The adaptive weighted aggregation module is configured to dynamically calculate the node weight based on the contribution degree-credibility dual evaluation results, fuse the local parameters through the federated average algorithm, and generate a globally optimized model.
[0010] In the node contribution degree evaluation module, the training contribution degree of each node to the global model is quantized according to the node data volume, data quality, and local model performance, and the specific expression is as follows: ; In the formula, is the contribution degree, is the effective sample number of node i, is the maximum sample number in all nodes, is the data quality score, is the accuracy of the local model on the validation set, , , is a preset weight coefficient and satisfies .
[0011] In the adaptive weighted aggregation module, the node weight is dynamically calculated based on the contribution degree-credibility dual evaluation results, the local parameters are fused through the federated average algorithm, and a globally optimized model is generated. The specific calculation formula is as follows: The global model parameters are calculated as follows: ; In the formula, is the local model parameter uploaded by the i-th node, K is the total number of nodes participating in aggregation, is the weight of node i; The weight is calculated as follows: ; In the formula, is the contribution degree of node i, is the credibility score of node i, is the credibility score of node j, and the weight satisfies .
[0012] The model deployment and inference unit includes a lightweight model conversion module, a model distribution and update module, and a real-time inference and result feedback module, wherein: The model lightweight conversion module is used to convert the global model into a lightweight format suitable for edge / terminal devices. The model distribution and update module is used to push lightweight models to various edge devices or terminal nodes and supports incremental updates based on version management. The real-time reasoning and result feedback module is used to detect the helmet wearing status in images in real time on the terminal device, output the detection results, and feed back false detection / missed detection data to the data acquisition and preprocessing unit.
[0013] The security and communication coordination unit includes a node status monitoring and trusted profiling module, a secure transmission and privacy protection module, and a dynamic resource scheduling module, wherein: The node status monitoring and trust profile module is used to collect node network latency, computing load and historical collaboration records in real time, and to construct a node profile including a trust score. The secure transmission and privacy protection module is used to desensitize local parameters through differential privacy technology and combine asymmetric encryption to protect the confidentiality and integrity of data transmission between nodes. The dynamic resource scheduling module adaptively allocates communication bandwidth and computing resources based on node status monitoring results, prioritizing the transmission of model parameters and training tasks for high-reliability nodes.
[0014] The node status monitoring and trust profile module collects node network latency, computing load, and historical collaboration records in real time to construct a node profile including a trust score. The specific operation is as follows: A1: Periodically obtain the network status and load data of the nodes, and obtain their historical task execution records from the system logs; A2: Evaluate the reliability and stability of node behavior based on historical records; A3: Combine the real-time status and historical behavior evaluation results of the node to generate its comprehensive credibility score; The credibility score The specific formula is as follows: ; In the formula, Let i be the average network latency of node i. For its CPU / GPU load rate, Score its historical collaborative behavior. , These are the system's preset latency and load thresholds, respectively. , , Preset weighting coefficients and satisfying .
[0015] The secure transmission and privacy protection module uses differential privacy technology to desensitize local parameters and combines it with asymmetric encryption to protect the confidentiality and integrity of data transmission between nodes. The specific operation is as follows: B1: Add Gaussian noise that satisfies differential privacy to the local model parameters obtained from training at the local node; B2: Encrypt the de-identified model parameters using the public key of the receiving aggregation server, and generate a digital signature using the node's own private key; B3: Send the ciphertext and signature together to the aggregation server. The server will decrypt the signature using its private key and verify it before the signature can be used for aggregation.
[0016] Compared with the prior art, the beneficial effects of the present invention are: This invention effectively avoids the negative impact of low-contribution and low-trust nodes on the global model by dynamically calculating node weights through a dual evaluation of contribution and credibility, combined with a federated averaging algorithm to fuse local parameters. This generates a robust, highly accurate, and maliciously attack-resistant global optimization model. It also adapts to non-independent, identically distributed data scenarios to improve aggregation versatility. Furthermore, it ensures data transmission security through real-time construction of trusted node profiles, differential privacy and asymmetric encryption, and dynamic resource scheduling to optimize communication efficiency. This provides a reliable basis for node credibility in model aggregation and ensures the confidentiality, integrity, and efficient resource allocation throughout the distributed collaborative training process. Thus, the system can stably, securely, and efficiently complete the training and iteration of the safety helmet detection model in complex construction scenarios. Attached Figure Description
[0017] Fig. 1 This is a system diagram of a distributed collaborative safety helmet detection model training system according to the present invention.
[0018] Fig. 2 This is a system architecture diagram of a distributed collaborative safety helmet detection model training system according to the present invention.
[0019] Explanation of icon numbers: 1. Data Acquisition and Preprocessing Unit; 11. Distributed Data Acquisition Module; 12. Data Cleaning and Filtering Module; 13. Data Labeling and Augmentation Module; 2. Model Training Unit; 21. Local Model Initialization Module; 22. Distributed Training Execution Module; 23. Local Model Evaluation Module; 3. Model Aggregation Unit; 31. Node Contribution Evaluation Module; 32. Node Credibility Evaluation Module; 33. Adaptive Weighted Aggregation Module; 4. Model Deployment and Inference Unit; 41. Lightweight Model Conversion Module; 42. Model Distribution and Update Module; 43. Real-time Inference and Result Feedback Module; 5. Security and Communication Coordination Unit; 51. Node Status Monitoring and Trust Profile Module; 52. Secure Transmission and Privacy Protection Module; 53. Dynamic Resource Scheduling Module. Detailed Implementation
[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] Example: like Figs. 1-2 As shown, this embodiment provides a distributed collaborative safety helmet detection model training system, including a data acquisition and preprocessing unit 1, a model training unit 2, a model aggregation unit 3, a model deployment and inference unit 4, and a security and communication coordination unit 5. Specifically: the data acquisition and preprocessing unit 1 is used to collect construction site image or video data in a distributed manner in a multi-node environment and preprocess the collected data; the model training unit 2, based on a distributed computing framework, performs parallel training and local parameter optimization of the safety helmet detection model on each local node; the model aggregation unit 3 is used to receive local model parameters uploaded by each node, dynamically calculate node weights and perform weighted aggregation based on an adaptive security aggregation mechanism with dual evaluation of contribution and credibility, and generate a globally optimized model; the model deployment and inference unit 4 is used to distribute the updated global model to edge devices or terminal nodes and execute safety helmet detection inference tasks; and the security and communication coordination unit 5 is used to monitor the network status, computing load, and historical collaborative behavior of each node, construct a lightweight node credibility profile, combine differential privacy and encrypted transmission to ensure the security of model updates, and optimize communication efficiency through dynamic resource scheduling.
[0022] It should be noted that the data acquisition and preprocessing unit 1 provides high-quality training data, the model training unit 2 performs privacy-preserving model updates locally on the edge nodes, the security and communication coordination unit 5 constructs a trusted profile of the nodes in real time and ensures communication security and efficiency, the model aggregation unit 3 dynamically weights and aggregates the trusted profile and the node contribution to generate a global model, and finally the model deployment and inference unit 4 distributes the optimized model to the edge for real-time detection and feeds back the feedback data to the front-end unit to drive continuous iterative optimization.
[0023] In this embodiment, it should also be noted that the data acquisition and preprocessing unit 1 includes a distributed data acquisition module 11, a data cleaning and filtering module 12, and a data annotation and enhancement module 13, wherein: the distributed data acquisition module 11 is used to collect images and videos of safety helmets worn in different construction scenarios in real time through image sensors deployed at multiple nodes; the data cleaning and filtering module 12 is used to remove fuzzy, duplicate, and irrelevant invalid data, and retain valid samples containing clear safety helmet targets and typical scene features; the data annotation and enhancement module 13 is used to annotate the safety helmet target boxes using a semi-automatic annotation tool, and to expand the diversity of the dataset through enhancement operations such as image flipping, brightness adjustment, and occlusion simulation.
[0024] It should be noted that the distributed data acquisition module 11 collects raw image and video data in real time under multiple construction scenarios, and then the data cleaning and screening module 12 removes low-quality or irrelevant samples to ensure data validity. Finally, the data annotation and augmentation module 13 completes the target annotation and uses diverse augmentation strategies to improve the generalization ability of the dataset and the robustness of the model.
[0025] Furthermore, it should be noted that the image sensors used include industrial-grade CMOS cameras and infrared cameras; the acquisition frequency is 10 frames / second to 30 frames / second. Different construction scenarios include high-altitude work areas, ground construction areas, and material storage areas. Semi-automatic annotation tools include LabelImg and VIA. Occlusion simulation includes randomly adding safety helmet obstructions and simulating different occlusion ratios.
[0026] In this embodiment, it should also be noted that the model training unit 2 includes a local model initialization module 21, a distributed training execution module 22, and a local model evaluation module 23, wherein: the local model initialization module 21 is used to download the latest global model from the model aggregation unit 3 and use it as the basis for initialization at this node; the distributed training execution module 22 is used to use the locally preprocessed data to perform forward and backward propagation of the safety helmet detection model and iteratively update the local model; the local model evaluation module 23 is used to calculate the model's accuracy and recall on the local validation set and evaluate the local training effect.
[0027] It should be noted that the local model initialization module 21 obtains the latest global model from the model aggregation unit 3 as the starting point. Subsequently, the distributed training execution module 22 performs forward inference and backpropagation based on the local preprocessed data to iteratively optimize the model parameters. Finally, the local model evaluation module 23 quantifies the model performance on the local validation set.
[0028] Furthermore, it should be noted that the helmet detection model is YOLOv5, with an iteration update range of 50-200 rounds; the learning rate is set to an initial value of 0.01, with cosine annealing decay. The validation set comprises 20% of the total data.
[0029] In this embodiment, it should also be noted that the model aggregation unit 3 includes a node contribution evaluation module 31, a node credibility evaluation module 32, and an adaptive weighted aggregation module 33, wherein: the node contribution evaluation module 31 is used to quantify the contribution of each node to the training of the global model based on the node data volume, data quality, and local model performance; the specific expression is: ; In the formula, As for contribution level, Let be the number of valid samples at node i. The maximum number of samples in a given node. Score the data quality. The accuracy of the local model on the validation set. , , Preset weighting coefficients and satisfying Node credibility assessment module 32: Used to assess the compliance of node historical behavior and the security of data transmission by combining the credibility profile of security and communication coordination unit 5; Adaptive weighted aggregation module 33: Dynamically calculates node weights based on the dual assessment results of contribution and credibility, and integrates local parameters through a federated averaging algorithm to generate a global optimization model. The specific calculation formula is as follows: Calculate global model parameters : ; In the formula, Here, K represents the local model parameters uploaded by the i-th node, and K is the total number of nodes participating in the aggregation. Let i be the weight of node i; calculate the weight. : ; In the formula, The contribution of node i. Score the credibility of node i. Assign a credibility score to node j, with weights satisfy .
[0030] It should be noted that the node contribution evaluation module 31 quantifies the training value of each node based on data volume, data quality, and local model performance, while the node credibility evaluation module 32 evaluates the compliance of its behavior and the security of its transmission by combining the node credibility profile provided by the security and communication coordination unit 5. This together provides the basis for weight calculation for the adaptive weighted aggregation module 33. Finally, the local model parameters of each node are dynamically weighted and fused through the normalized contribution-credibility product to generate a robust, efficient, and malicious attack-resistant global optimization model.
[0031] Furthermore, it should be noted that the data quality score... The specific calculation is as follows: The federated averaging algorithm iterates through 10 rounds of local training before performing aggregation once, employing aggregation optimization strategies (such as local parameter standardization) for non-independent and identically distributed (Non-IID) data.
[0032] In this embodiment, it should also be noted that the model deployment and inference unit 4 includes a model lightweight conversion module 41, a model distribution and update module 42, and a real-time inference and result feedback module 43, wherein: the model lightweight conversion module 41 is used to convert the global model into a lightweight format suitable for edge / terminal devices; the model distribution and update module 42 is used to push the lightweight model to each edge device or terminal node and support incremental updates based on version management; the real-time inference and result feedback module 43 is used to detect the helmet wearing status in the image in real time on the terminal device, output the detection results, and feed back the false detection / missed detection data to the data acquisition and preprocessing unit 1.
[0033] It should be noted that the model lightweight conversion module 41 compresses and adapts the global model to the resource constraints of the edge device, and then efficiently pushes and manages the model version through the model distribution and update module 42. Finally, the real-time inference and result feedback module 43 performs the safety helmet detection task on the terminal and sends back the false detection or missed detection samples to the data acquisition and preprocessing unit 1.
[0034] Furthermore, it should be noted that by employing model pruning techniques, the number of parameters in the global model is reduced by more than 70%, and the computational load is reduced by more than 60%. For example, the global model based on YOLOv5 is converted into a lightweight version with INT8 quantization, which is adapted to the resource constraints of edge devices such as NVIDIA Jetson Nano and industrial-grade edge gateways.
[0035] The system achieves a helmet detection inference latency of ≤200ms on the terminal device, marks false detection / missed detection samples with 3 consecutive detection errors, and sends the sample data back to the data acquisition and preprocessing unit 1 via the MQTT protocol for subsequent iterative optimization of the dataset.
[0036] In this embodiment, it should also be noted that the security and communication coordination unit 5 includes a node status monitoring and trust profile module 51, a secure transmission and privacy protection module 52, and a dynamic resource scheduling module 53. Specifically: the node status monitoring and trust profile module 51 is used to collect node network latency, computing load, and historical collaboration records in real time to construct a node profile containing a trust score. The specific operations are as follows: A1: Periodically obtain the node's network status and computing load data, and obtain its historical task execution records from the system log; A2: Based on historical records, evaluate the reliability and stability of node behavior; A3: Combine the node's real-time status and historical behavior evaluation results to generate its comprehensive trust score; trust score. The specific formula is as follows: ; In the formula, Let i be the average network latency of node i. For its CPU / GPU load rate, Score its historical collaborative behavior. , These are the system's preset latency and load thresholds, respectively. , , Preset weighting coefficients and satisfying Secure Transmission and Privacy Protection Module 52: Used to desensitize local parameters using differential privacy technology, combined with asymmetric encryption to protect the confidentiality and integrity of data transmission between nodes; the specific operation is as follows: B1: Add Gaussian noise satisfying differential privacy to the trained local model parameters on the local node; B2: Encrypt the desensitized model parameters using the public key of the receiving aggregation server, and generate a digital signature using the node's own private key; B3: Send the ciphertext and signature together to the aggregation server, where the server decrypts and verifies the signature using its private key before participating in the aggregation. Dynamic Resource Scheduling Module 53: Based on node status monitoring results, adaptively allocate communication bandwidth and computing resources, prioritizing the transmission of model parameters and training tasks for high-trust nodes.
[0037] It should be noted that the node status monitoring and trust profile module 51 collects network, computing power and historical behavior data in real time to generate a quantitative trust score. This trust score not only serves as the basis for risk assessment in the secure transmission and privacy protection module 52, but also drives the dynamic resource scheduling module 53 to prioritize the communication and computing resources of highly trustworthy nodes. At the same time, the secure transmission and privacy protection module 52 ensures that model updates are transmitted efficiently under the triple protection of confidentiality, integrity and privacy through differential privacy desensitization and asymmetric encryption signature mechanism, thereby achieving secure, reliable and efficient distributed collaborative training support.
[0038] Furthermore, it should be noted that the historical collaborative behavior score... The specific calculation is as follows: The specific type of asymmetric encryption algorithm is RSA-2048. The hash algorithm for digital signatures is SHA-256.
[0039] Priority rules for resource allocation: credibility score Nodes are prioritized for 80% bandwidth allocation. Resource scheduling cycle: The scheduling policy is updated every minute.
[0040] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0041] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A distributed cooperative hard hat detection model training system, characterized in that, The system comprises a data acquisition and preprocessing unit (1), a model training unit (2), a model aggregation unit (3), a model deployment and inference unit (4), and a security and communication coordination unit (5), wherein: The data acquisition and preprocessing unit (1) is used for distributed acquisition of construction site image or video data in a multi-node environment and preprocessing of the acquired data; The model training unit (2) is based on a distributed computing framework and performs training and local parameter optimization of the safety helmet detection model on each local node in parallel; The model aggregation unit (3) is used for receiving local model parameters uploaded by each node, dynamically calculating node weights and performing weighted aggregation based on an adaptive security aggregation mechanism of contribution-degree-confidence dual evaluation, and generating a globally optimized model; The model deployment and inference unit (4) is used for distributing the updated global model to edge devices or terminal nodes and performing safety helmet detection inference tasks; The security and communication coordination unit (5) is used for monitoring the network state, computing load and historical cooperative behavior of each node, constructing a lightweight node trust profile, ensuring the security of model updates through differential privacy and encrypted transmission, and optimizing communication efficiency through dynamic resource scheduling.
2. The distributed cooperative hard hat detection model training system of claim 1, wherein, The data acquisition and preprocessing unit (1) comprises a distributed data acquisition module (11), a data cleaning and screening module (12), and a data labeling and enhancement module (13), wherein: The distributed data acquisition module (11) is used for real-time acquisition of safety helmet wearing image and video data in different construction scenes through multi-node deployed image sensors; The data cleaning and screening module (12) is used for excluding invalid data such as blur, repetition and irrelevance, and retaining valid samples containing clear safety helmet targets and typical scene features; The data labeling and enhancement module (13) is used for labeling safety helmet target frames through semi-automatic labeling tools and expanding data set diversity through enhancement operations such as image flipping, brightness adjustment and occlusion simulation.
3. The distributed cooperative hard hat detection model training system of claim 1, wherein, The model training unit (2) comprises a local model initialization module (21), a distributed training execution module (22), and a local model evaluation module (23), wherein: The local model initialization module (21) is used for downloading the latest global model from the model aggregation unit (3) and initializing it as the basis on the local node; The distributed training execution module (22) is used for performing forward and backward propagation of the safety helmet detection model using locally preprocessed data to iteratively update the local model; The local model evaluation module (23) is used for calculating model precision and recall rate on the local validation set to evaluate the local training effect.
4. The distributed cooperative hard hat detection model training system of claim 1, wherein, The model aggregation unit (3) comprises a node contribution evaluation module (31), a node trust evaluation module (32), and an adaptive weighted aggregation module (33), wherein: The node contribution evaluation module (31) is used for quantifying the training contribution of each node to the global model according to the node data volume, data quality and local model performance; The node credibility evaluation module (32) is used for evaluating node historical behavior compliance and data transmission security in combination with a trusted portrait of the security and communication coordination unit (5); The adaptive weighted aggregation module (33) dynamically calculates node weights based on the contribution-degree-credibility dual evaluation results, fuses local parameters through a federated average algorithm, and generates a global optimization model.
5. The distributed cooperative hard hat detection model training system of claim 4, wherein, In the node contribution-degree evaluation module (31), the training contribution degree of each node to the global model is quantified according to the node data volume, data quality and local model performance, and the specific expression is: ; In the formula, is the contribution degree, is the effective sample number of node i, is the maximum sample number in all nodes, is the data quality score, is the accuracy of the local model on the validation set, , , is a preset weight coefficient and satisfies .
6. The distributed cooperative hard hat detection model training system of claim 4, wherein, The adaptive weighted aggregation module (33) dynamically calculates node weights based on the contribution-degree-credibility dual evaluation results, fuses local parameters through a federated average algorithm, and generates a global optimization model, and the specific calculation formula is as follows: computing global model parameters : ; In the formula, is the local model parameter uploaded by the ith node, K is the total number of nodes participating in aggregation, is the weight of node i; Computing weights : ; wherein is the contribution of node i, is the trust score of node i, is the trust score of node j, and the weight satisfies .
7. The distributed cooperative hard hat detection model training system of claim 1, wherein, The model deployment and inference unit (4) includes a model lightweight conversion module (41), a model distribution and update module (42), and a real-time inference and result feedback module (43), wherein: The model lightweight conversion module (41) is used for converting the global model into a lightweight format suitable for edge / terminal devices; The model distribution and update module (42) is used for pushing the lightweight model to each edge device or terminal node, and supports incremental update based on version management; The real-time inference and result feedback module (43) is used for real-time detection of the safety helmet wearing state in the image on the terminal device, and outputs the detection result and feeds back the mis-detection / miss-detection data to the data acquisition and preprocessing unit (1).
8. The distributed cooperative hard hat detection model training system of claim 1, wherein, The security and communication coordination unit (5) includes a node state monitoring and trusted portrait module (51), a secure transmission and privacy protection module (52), and a dynamic resource scheduling module (53), wherein: The node state monitoring and trusted portrait module (51) is used for real-time acquisition of node network delay, computing load and historical cooperation records, and construction of a node portrait containing a credibility score; The secure transmission and privacy protection module (52) is used for desensitizing local parameters through differential privacy technology, and combining asymmetric encryption to protect the confidentiality and integrity of data transmission between nodes; The dynamic resource scheduling module (53) adaptively allocates communication bandwidth and computing resources based on node state monitoring results, and preferentially guarantees model parameter transmission and training tasks of high credibility nodes.
9. The distributed cooperative hard hat detection model training system of claim 8, wherein, In the node state monitoring and trusted portrait module (51), real-time acquisition of node network delay, computing load and historical cooperation records is performed, and a node portrait containing a credibility score is constructed, and the specific operation is as follows: A1: periodically acquire network state and computing load data of the node, and acquire historical task execution records of the node from system logs; A2: based on the historical records, evaluate the reliability and stability of the node behavior; A3: generate a comprehensive credibility score of the node in combination with the real-time state of the node and the evaluation results of the historical behavior; The trustworthiness score The specific formula is: ; wherein, is the average network delay of node i, is its CPU / GPU load rate, is its historical coordination behavior score, , are the system preset delay and load thresholds, respectively, , , are preset weight coefficients and satisfy .
10. The distributed cooperative hard hat detection model training system of claim 8, wherein, In the secure transmission and privacy protection module (52), local parameters are desensitized through differential privacy technology, and confidentiality and integrity protection is performed on data transmission between nodes through asymmetric encryption, and the specific operation is as follows: B1: Add Gaussian noise satisfying differential privacy to the local model parameters trained at the local node; B2: Encrypt the de-identified model parameters using the public key of the receiver aggregation server, and generate a digital signature using the private key of the node itself; B3: Send the ciphertext and signature to the aggregation server, which can participate in aggregation only after decrypting using the private key and verifying the signature.