Front-end acceleration method for production safety risk identification model considering risk transience
By deploying a lightweight risk identification model on an edge AI chip at the power production site, and utilizing MobileNetV3 and joint discriminant function to prune feature channels, the problem of high computational resource requirements of existing models is solved, enabling rapid response and local real-time alarms, and ensuring the timeliness of production safety risks.
Patent Information
- Application Number
- CN202310120330.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Existing security risk identification models are large in structure, have many network layers, and require high computing resources, making them unsuitable for production security risk protection front-end devices with limited computing power, resulting in slow response speeds.
A lightweight production image visual feature extraction module based on MobileNetV3 is adopted to replace the complex feature extraction module. The importance of feature channels is evaluated by a joint discriminant function, redundant channels are pruned, and quantization is combined to reduce model complexity. The module is then deployed on an edge AI chip for real-time risk identification.
This improved the model's response speed at the risk protection front-end device, enabling edge intelligent autonomy and local real-time alarms at the power production site, thus ensuring the timeliness of production safety risks.
Smart Images

Figure CN116311037B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of power safety management and control methods, and relates to a front-end acceleration method for production safety risk identification models that considers the instantaneous nature of risks. Background Technology
[0002] With the continuous expansion of power systems, safety accidents occur frequently during system operation. The highly transient nature of power production safety risks poses a significant challenge to power safety management. Due to the highly transient nature of power production safety risks, there is a high demand for the response speed of intelligent risk identification models. Delegating the intelligent model inference process to the front end of physical protection devices to achieve localized risk identification and alarm has become an urgent development trend. However, current safety risk identification methods are mainly based on deep learning models such as convolutional neural networks, relying on the abundant computing resources of cloud computing centers for model training and inference. Existing safety risk identification models are characterized by large structures, numerous network layers, and high computational resource requirements, making them unsuitable for production safety risk protection front-end devices with limited computing power.
[0003] To improve the transmission capacity and processing speed of terminal data, edge computing has received widespread attention in related fields, giving rise to several related concepts such as Mobile Edge Computing (MEC), Fog Computing, and Sea Computing. Simultaneously, edge computing and artificial intelligence technologies mutually empower each other, giving rise to the concept of edge intelligence. Edge intelligence is a mode of deploying and running intelligent identification methods for data analysis and processing in edge devices with computing resources. This enables rapid processing of data generated by user terminals, thereby achieving rapid response to user needs and intelligent services. Edge terminals include user-side data acquisition devices and edge servers. Utilizing the concept of edge intelligence can effectively overcome the limitations of computing resources at sensing terminals, allowing the deployment of intelligent risk identification models based on deep convolutional neural networks in security risk protection front-end devices. This is key to improving model response speed and prevention effectiveness. Current security risk identification methods are mainly based on deep learning models such as convolutional neural networks, using the abundant computing resources of cloud computing centers for model training and inference. Existing security risk identification models are characterized by large structures, numerous network layers, and high computational resource requirements, making them unsuitable for production security risk protection front-end devices with limited computing power. Summary of the Invention
[0004] The purpose of this invention is to provide a front-end acceleration method for production safety risk identification models that considers the instantaneous nature of risks, thereby solving the problem of existing safety risk identification models having a large structure.
[0005] The technical solution adopted in this invention is a front-end acceleration method for production safety risk identification models that considers the instantaneous nature of risks, comprising the following steps:
[0006] Step 1: Use the production safety risk identification model as the original model;
[0007] Step 2: Replace the complex feature extraction module based on convolutional neural networks in the production safety risk identification model with a lightweight production image visual feature extraction module based on MobileNetV3 to obtain the replaced production safety risk identification model.
[0008] Step 3: Train and test the replaced production safety risk identification model with samples to obtain the baseline production safety risk identification model;
[0009] Step 4: Use the joint discriminant function to evaluate the importance of each feature channel in the baseline production safety risk identification model;
[0010] Step 5: Based on the importance of each feature channel, prune and delete redundant feature channels in the baseline production safety risk identification model. Then, make minor adjustments to the model architecture after deleting feature channels to ensure the integrity of the risk identification model after pruning, and obtain a lightweight production safety risk identification model.
[0011] Step 6: Determine whether the lightweight production safety risk identification model has met the termination conditions; otherwise, return to the previous step.
[0012] Step 7: Use quantization to compress the lightweight production safety risk identification model.
[0013] The invention is further characterized by:
[0014] The acquisition process of the lightweight production image visual feature extraction module based on MobileNetV3 is as follows: first, the reusable features of the production image are obtained by using an inverted residual structure with a linear bottleneck; then, the expression of important visual features is enhanced by a lightweight attention mechanism module; and finally, the lightweight production image visual feature extraction module is obtained by a network search architecture module.
[0015] The joint discriminant function is the reconstruction error. and the discriminative loss function of the intermediate channel of the network sum:
[0016]
[0017] In the above formula, This represents the balance coefficient between the reconstruction error and the discriminative loss function, two indicators for evaluating the importance of the channel.
[0018]
[0019] In the above formula, I{ } is the indicator function, θ is the weight of the fully connected layer, c represents the number of target classes to be detected, t=1,2,…,c represents the t-th target class, and y represents the output feature map mapping corresponding to the training samples. This indicates the number of samples in the training set. This represents the w-th training sample in the training set. Represents each intermediate layer of the w-th training sample. L b Loss function for output features This indicates the number of iterations during the channel pruning process.
[0020] The termination condition for step 6 is:
[0021]
[0022] In the above formula, s is the number of iterations in the channel pruning process. This represents the tolerance threshold for the difference in the joint discriminant loss function between the two channel pruning results.
[0023] Step 7 is as follows: First, the feature parameters of the input feature map are converted from high-precision floating-point type to low-precision integer type through quantization operation, and then the converted low-precision integer feature parameters are operated on; then the routine operation of the lightweight production safety risk identification model is performed, and finally the low-precision integer feature parameters are converted back to high-precision floating-point type through inverse quantization operation.
[0024] The beneficial effects of this invention are as follows: This invention considers the instantaneous nature of risks in the production safety risk identification model front-end acceleration method. It uses the discriminant loss function as the basis for channel importance assessment, incorporates average pooling in the feature mapping of the network's intermediate layer for feature optimization selection, and adds a batch normalization layer and a ReLU activation function layer before the average pooling layer, which improves the convergence speed of the model training process. By lightweighting the risk identification model's computation, its computational complexity is further reduced, thereby improving the response speed of the risk identification model in the risk protection front-end device. Its deployment is adapted to front-end devices with limited computing resources to achieve edge intelligent autonomy and local real-time alarm for identifying violations at power production sites, thus ensuring the timeliness of production safety risk prevention and control. Attached Figure Description
[0025] Figure 1 This is a flowchart of the front-end acceleration method for the production safety risk identification model that considers the instantaneous nature of risk in this invention;
[0026] Figure 2 This is an application diagram of the front-end acceleration method of the production safety risk identification model that considers the instantaneous nature of risk in this invention;
[0027] Figure 3 This is a schematic diagram of the lightweight production image visual feature extraction module based on MobileNetV3 within the front-end acceleration method of the production safety risk identification model that considers the instantaneous nature of risk in this invention.
[0028] Figure 4 This is a schematic diagram of the front-end acceleration method for the production safety risk identification model based on discriminative force driving model channel pruning within the present invention, which considers the instantaneous nature of risk.
[0029] Figure 5 This is a schematic diagram of the process of discriminative force-driven model channel pruning in the front-end acceleration method of the production safety risk identification model that considers the instantaneous nature of risk in this invention;
[0030] Figure 6 This is a schematic diagram of the operation and calculation process of the ReLU activation function before quantization in the front-end acceleration method of the production safety risk identification model that considers the instantaneous nature of risk in this invention;
[0031] Figure 7 This is a schematic diagram of the operation and calculation process after ReLU quantization of the activation function in the front-end acceleration method of the production safety risk identification model that considers the instantaneous nature of risk in this invention. Detailed Implementation
[0032] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0033] Front-end acceleration methods for production safety risk identification models that consider the transient nature of risks, such as... Figure 1 As shown, it includes the following steps:
[0034] Step 1: Use the production safety risk identification model as the original model; the production safety risk identification model can be a risk identification model based on Faster R-CNN or a risk identification model based on Mask R-CNN. For example... Figure 2 As shown, for the operation process at the power production site, production safety images are first collected and monitored through new physical protection devices such as fixed video surveillance or surveillance balls. Then, edge AI chips are deployed in the front-end device with limited computing resources to perform safety image analysis and risk identification. The collected safety images are first screened and allocated within the edge AI chip. Then, the production safety risk identification model is used to perform intelligent analysis and risk identification of the images. Local real-time alarms are issued for safety images or monitoring screens that are identified as risky. The safety risk identification results and alarm information can be uploaded to the production safety supervision cloud platform.
[0035] Step 2: Replace the complex feature extraction module based on convolutional neural networks in the production safety risk identification model with a lightweight production image visual feature extraction module based on MobileNetV3 to obtain the replaced production safety risk identification model.
[0036] The acquisition process of the lightweight production image visual feature extraction module based on MobileNetV3 is as follows: First, a reciprocal residual structure with a linear bottleneck is used to obtain the reused features of the production image. Then, a lightweight attention mechanism module (Squeeze and Excitation, or SE module for short) is used to enhance the expression of important visual features. Finally, a network search architecture module is used to obtain the lightweight production image visual feature extraction module, such as... Figure 3 As shown.
[0037] Step 3: Train and test the replaced production safety risk identification model with samples to obtain the baseline production safety risk identification model;
[0038] like Figure 4 As shown, step 4 involves using a joint discriminant function to evaluate the importance of each feature channel in the baseline production safety risk identification model. Specifically, based on the reconstruction error, a discriminant power loss function is introduced to assist in assessing channel importance, using the discriminant power of a channel for the risk identification results as an indicator of channel importance. The reconstruction error is measured and calculated using the mean square error between the feature maps of the baseline network model and the pruned network model. For example... Figure 5 As shown, to improve the effectiveness of the discriminative loss function calculation, this invention incorporates average pooling for feature optimization in the feature mapping of the intermediate layers of the network, and adds a batch normalization (BN) layer and a ReLU activation function layer before the average pooling layer to improve the convergence speed of the model training process. The original baseline model can be divided into B intermediate layer modules, and the loss function calculation formula for the output features of each intermediate layer Lb is as follows:
[0039]
[0040] In the above formula, Indicates the intermediate layer The output feature map, b=1,2,…,B.
[0041] The joint discriminant function is the reconstruction error. and the discriminative loss function of the intermediate channel of the network sum:
[0042]
[0043] In the above formula, This represents the balance coefficient between the reconstruction error and the discriminative loss function, two indicators for evaluating the importance of the channel.
[0044]
[0045] In the above formula, I{ } is the indicator function, θ is the weight of the fully connected layer, c represents the number of target classes to be detected, t=1,2,…,c represents the t-th target class, and y represents the output feature map mapping corresponding to the training samples. This indicates the number of samples in the training set. This represents the w-th training sample in the training set. Represents each intermediate layer of the w-th training sample. L b Loss function for output features This indicates the number of iterations during the channel pruning process.
[0046] Step 5: Based on the importance of each feature channel, prune and delete redundant feature channels in the baseline production safety risk identification model. Then, make minor adjustments to the model architecture after deleting feature channels to ensure the integrity of the risk identification model after pruning, and obtain a lightweight production safety risk identification model.
[0047] Step 6: Determine whether the lightweight production safety risk identification model has met the termination conditions; otherwise, return to the previous step.
[0048] The termination condition is:
[0049]
[0050] In the above formula, s is the number of iterations in the channel pruning process. This represents the tolerance threshold for the difference in the joint discriminant loss function between the two channel pruning results.
[0051] Step 7: Use quantization to compress the lightweight production safety risk identification model to accelerate its operation.
[0052] Specifically, for the high-precision feature map input to the lightweight production safety risk identification model, the input feature parameters are first converted from high-precision floating-point (usually 32-bit or 16-bit floating-point) to low-precision integer (usually 8-bit) through quantization. Then, operations are performed on the converted low-precision integer feature parameters. Next, the standard operations of the lightweight production safety risk identification model are performed. Finally, the low-precision integer feature parameters are converted back to high-precision floating-point through dequantization. In this embodiment, the ReLU activation function, commonly used in convolutional neural network models, is used as an example to illustrate the quantization operation. The operation process before quantization of the ReLU activation function is as follows: Figure 6 As shown, the operation process of quantizing the activation function into an 8-bit integer is as follows: Figure 7 As shown in the figure, float refers to a high-precision floating-point number.
[0053] It also includes step 8, deploying the lightweight and compressed risk identification model to a front-end device with limited computing resources for edge testing and verification, to verify the effectiveness of the front-end acceleration method of the present invention.
[0054] Through the above methods, this invention provides a front-end acceleration method for a production safety risk identification model that considers the instantaneous nature of risks. It uses the discriminant loss function as the basis for channel importance assessment, incorporates average pooling for feature optimization in the feature mapping of the network's intermediate layer, and adds a batch normalization layer and a ReLU activation function layer before the average pooling layer, thereby improving the convergence speed of the model training process. By computationally lightweighting the risk identification model, its computational complexity is further reduced, thus improving the response speed of the risk identification model in risk protection front-end devices. Its deployment is adapted to front-end devices with limited computing resources to achieve edge intelligent autonomy and local real-time alarms for identifying violations at power production sites, thereby ensuring the timeliness of production safety risk prevention and control.
Claims
1. A front-end acceleration method for production safety risk identification models that considers the instantaneous nature of risk, characterized in that, Includes the following steps: Step 1: Use the production safety risk identification model as the original model; Step 2: Replace the complex feature extraction module based on convolutional neural networks in the production safety risk identification model with a lightweight production image visual feature extraction module based on MobileNetV3 to obtain the replaced production safety risk identification model. Step 3: Train and test the replaced production safety risk identification model with samples to obtain the baseline production safety risk identification model; Step 4: Use the joint discriminant function to evaluate the importance of each feature channel in the baseline production safety risk identification model; The joint discriminant function is the reconstruction error. and the discriminative loss function of the intermediate channel of the network sum: In the above formula, This represents the balance coefficient between the reconstruction error and the discriminative loss function, two indicators for evaluating the importance of the channel. In the above formula, I{ } is the indicator function, θ is the weight of the fully connected layer, c represents the number of target classes to be detected, t=1,2,…,c represents the t-th target class, and y represents the output feature map mapping corresponding to the training samples. This indicates the number of samples in the training set. This represents the w-th training sample in the training set. Represents each intermediate layer of the w-th training sample. L b Loss function for output features Indicates the number of iterations during the channel pruning process; Step 5: Based on the importance of each feature channel, prune and delete redundant feature channels in the baseline production safety risk identification model. Then, make minor adjustments to the model architecture after deleting feature channels to ensure the integrity of the risk identification model after pruning, and obtain a lightweight production safety risk identification model. Step 6: Determine whether the lightweight production safety risk identification model has met the termination conditions; otherwise, return to the previous step. Step 7: Use quantization to compress the lightweight production safety risk identification model.
2. The front-end acceleration method for production safety risk identification model considering the instantaneous nature of risk as described in claim 1, characterized in that, The acquisition process of the lightweight production image visual feature extraction module based on MobileNetV3 is as follows: first, the reusable features of the production image are obtained by using an inverted residual structure with a linear bottleneck; then, the expression of important visual features is enhanced by a lightweight attention mechanism module; and finally, the lightweight production image visual feature extraction module is obtained by a network search architecture module.
3. The front-end acceleration method for the production safety risk identification model considering the instantaneous nature of risk as described in claim 1, characterized in that, The termination condition described in step 6 is: In the above formula, s is the number of iterations in the channel pruning process. This represents the tolerance threshold for the difference in the joint discriminant loss function between the two channel pruning results.
4. The front-end acceleration method for the production safety risk identification model considering the instantaneous nature of risk as described in claim 1, characterized in that, Step 7 is as follows: First, the feature parameters of the input feature map are converted from high-precision floating-point type to low-precision integer type through quantization operation, and then the converted low-precision integer feature parameters are operated on; then the routine operation of the lightweight production safety risk identification model is performed, and finally the low-precision integer feature parameters are converted back to high-precision floating-point type through inverse quantization operation.
Citation Information
Patent Citations
Quantitative evaluation system and method for reducing risks of production operators
CN114266441A
Power transmission channel external damage hidden danger identification method and device and storage medium
CN115100592A