A power marketing field operation operation dynamic detection method and device
By combining Retinex theory and LSTM network image processing methods, the latency and accuracy problems in power marketing field operation detection are solved, realizing fast and accurate identification and early warning of violations, and improving the practicality and efficiency of the model.
Patent Information
- Application Number
- CN202210926831.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-08-03
AI Technical Summary
Existing on-site operation detection methods for power marketing suffer from long detection time delays in complex external environments, insufficient model accuracy, and time-consuming and labor-intensive deployment, making it impossible to effectively identify personnel operating procedures and provide real-time early warnings.
Image preprocessing is performed using Retinex theory, and a lightweight dynamic detection model is trained by combining LSTM network and knowledge distillation techniques. The importance of key points is adjusted by spatial and temporal attention, and geometric features are generated for violation judgment.
It enables rapid and accurate identification and early warning of power marketing field operations in complex environments, improving the model's response speed and accuracy while reducing deployment complexity.
Smart Images

Figure CN115393572B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and device for dynamic detection of on-site operations in power marketing, belonging to the field of operational safety technology. Background Technology
[0002] Currently, the power industry is vigorously promoting the integration of information technology and safe production, and actively adopting advanced technologies such as intelligent safety tools, video surveillance, and image analysis to improve on-site safety technology. However, the complex scenarios in which marketing professionals operate, the wide range of lighting conditions, interference from extreme weather such as wind, rain, and snow, and the introduction of various new equipment with the advancement of new power systems bring enormous challenges to the analysis of multi-source information and the safe management of operations at marketing sites.
[0003] Effective identification and early warning of operational procedures for on-site personnel in complex external environments is a crucial aspect of ensuring power safety. Existing monitoring methods primarily focus on personnel attire or fail to consider dynamic changes in the external environment. These methods are often complex, slow to react, and unsuitable for real-world applications. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and device for dynamic detection of on-site operations in power marketing, solving the technical problems of long detection time delay, insufficient model accuracy, and time-consuming and labor-intensive model deployment in the current detection model.
[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0006] In a first aspect, the present invention provides a method for dynamic detection of on-site operations in power marketing, comprising:
[0007] Acquire current time-series scene images of power marketing field operations;
[0008] Preprocessing of current temporal scene images based on Retinex theory;
[0009] Key data are extracted from the pre-processed current time-series scene image based on a pre-built dynamic detection model;
[0010] Generate geometric features to describe the motion based on key data;
[0011] Determine whether on-site operations in power marketing are in violation of regulations based on geometric characteristics.
[0012] Optionally, the preprocessing includes:
[0013] Constructing scene images:
[0014]
[0015] In the formula, For scene images, For reflection images, For lighting images, Let the coordinates be the points;
[0016] Illumination image estimation using Gaussian center-encircle function :
[0017]
[0018] In the formula, These are the parameters of the Gaussian center-circle function;
[0019] Scene images Reflected images Illumination Images Transformation from the real number field to the logarithmic field:
[0020]
[0021] Calculate and obtain the reflection image in the logarithmic domain. :
[0022]
[0023] Reflected image Transformation from the logarithmic field to the real number field:
[0024]
[0025] The final obtained reflection image As a preprocessing result.
[0026] Optionally, the key data includes the coordinates of the head, face, neck, left shoulder, right shoulder, left hand, right hand, left arm, and right arm.
[0027] Optionally, the construction of the dynamic detection model includes:
[0028] Acquire historical time-series images of on-site electricity marketing operations;
[0029] Preprocessing of historical time-series scene images based on Retinex theory;
[0030] Add annotation information to the preprocessed historical time-series scene images and generate a training sample set;
[0031] Initialize the LSTM network model and train it using the training sample set. Calculate the loss based on the model output and annotation information, and update the model parameters of the LSTM network model based on the loss until the loss converges.
[0032] The trained LSTM network model is used as the teacher model, and the student model is trained using the knowledge distillation method. The trained student model is then used as the dynamic detection model.
[0033] Optionally, the initialization of the LSTM network model and the input of the training sample set for training further includes introducing spatial attention and temporal attention methods;
[0034] The spatial attention method includes automatically learning and recognizing the importance of scene images in different frames of a temporal sequence through an LSTM sub-network;
[0035] The temporal attention method involves using an LSTM subnetwork to acquire the importance of different key data based on different frames of scene images in a temporal sequence.
[0036] Optionally, training the student model using knowledge distillation includes:
[0037] The training sample set is input into the teacher model and the student model, and the softmax of the teacher model is used as the softtarget.
[0038] The cross-entropy between the softmax output and softtarget of the student model at the same temperature coefficient T is denoted as... ;
[0039] The cross-entropy between the softmax output of the student model and the labeled values at a temperature coefficient T=1 is denoted as... ;
[0040] Construct the objective function for knowledge distillation:
[0041]
[0042] In the formula, The coefficient is a constant;
[0043] The model parameters of the learning model are updated based on the loss until the objective function result converges.
[0044] Secondly, the present invention provides a dynamic detection device for on-site operations in power marketing, the device comprising:
[0045] The data acquisition module is used to acquire current time-series scene images of power marketing field operations;
[0046] The preprocessing module is used to preprocess the current temporal scene image based on Retinex theory;
[0047] The extraction module is used to extract key data from the preprocessed current time-series scene image based on a pre-built dynamic detection model;
[0048] The feature module is used to generate geometric features to describe motion based on key data;
[0049] The judgment module is used to determine whether on-site operations in power marketing are in violation of regulations based on geometric features.
[0050] Thirdly, the present invention provides a dynamic detection device for on-site operation of power marketing, including a processor and a storage medium;
[0051] The storage medium is used to store instructions;
[0052] The processor is configured to operate according to the instructions to perform the steps according to the method described above.
[0053] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0054] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0055] This invention provides a method and device for dynamic detection of on-site operations in power marketing. It uses Retinex theory to perform operations such as enhancement, denoising, and restoration on acquired images. A lightweight dynamic detection model is trained based on LSTM and knowledge distillation techniques to monitor violations in on-site operations in power marketing. Furthermore, by introducing temporal and spatial attention models to dynamically adjust the allocation of key point importance, the accuracy of the model and the optimal results are ensured. Attached Figure Description
[0056] Figure 1 This is a flowchart of a method for dynamic detection of on-site operations in power marketing, provided by an embodiment of the present invention;
[0057] Figure 2 This is a flowchart illustrating the construction process of a dynamic detection model provided in this embodiment of the invention. Detailed Implementation
[0058] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0059] Example 1:
[0060] like Figure 1 As shown, this embodiment of the invention provides a method for dynamic detection of on-site operations in power marketing, including the following steps:
[0061] 1. Acquire current time-series scene images of power marketing field operations;
[0062] The scene images mainly include routine marketing site actions such as electricity meter installation, electricity meter removal, current transformer installation, and current transformer removal.
[0063] 2. Preprocess the current temporal scene image based on Retinex theory;
[0064] Based on Retinex theory, image enhancement, dehazing, and restoration operations are performed on the collected marketing field operation image set to increase its clarity and reduce noise; specifically including:
[0065] 2.1 Constructing scene images:
[0066]
[0067] In the formula, For scene images, For reflection images, For lighting images, Let the coordinates be the points;
[0068] 2.2. Estimating Illumination Images Using the Gaussian Center-Wrap Function :
[0069]
[0070] In the formula, These are the parameters of the Gaussian center-circle function;
[0071] 2.3. Scene Images Reflected images Illumination Images Transformation from the real number field to the logarithmic field:
[0072]
[0073] 2.4 Calculate and obtain the reflection image in the logarithmic domain :
[0074]
[0075] 2.5. Reflected image Transformation from the logarithmic field to the real number field:
[0076]
[0077] 2.6. Obtain the final reflection image As a preprocessing result.
[0078] 3. Extract key data from the pre-processed current time-series scene image based on the pre-built dynamic detection model;
[0079] 3.1 Based on the characteristics of on-site electricity marketing operations, the actions performed on-site mainly focus on the upper body. Key data selected include the coordinate positions of the head, face, neck, left shoulder, right shoulder, left hand, right hand, left arm, and right arm.
[0080] 3.2, such as Figure 2 As shown, the construction of the dynamic detection model includes:
[0081] 3.2.1 Acquire historical time-series scene images of power marketing field operations;
[0082] 3.2.2 Preprocessing of historical time-series scene images based on Retinex theory;
[0083] 3.2.3 Add annotation information to the preprocessed historical time-series scene images and generate a training sample set;
[0084] 3.2.4 Initialize the LSTM network model and input the training sample set for training. Calculate the loss based on the model output and annotation information, and update the model parameters of the LSTM network model based on the loss until the loss converges.
[0085] The initialization of the LSTM network model and the input of the training sample set for training also includes the introduction of spatial domain attention and temporal domain attention methods.
[0086] Spatial attention methods involve automatically learning and recognizing the importance of scene images in different frames of a temporal sequence through an LSTM subnetwork;
[0087] Temporal attention methods involve using an LSTM subnetwork to extract the importance of different key data from different frames of scene images in a temporal sequence.
[0088] 3.2.5. Use the trained LSTM network model as the teacher model, train the student model using the knowledge distillation method, and use the trained student model as the dynamic detection model.
[0089] Among them, the student model trained by knowledge distillation includes:
[0090] The training sample set is input into the teacher model and the student model, and the softmax of the teacher model is used as the softtarget.
[0091] The cross-entropy between the softmax output and softtarget of the student model at the same temperature coefficient T is denoted as... ;
[0092] The cross-entropy between the softmax output of the student model and the labeled values at a temperature coefficient T=1 is denoted as... ;
[0093] Construct the objective function for knowledge distillation:
[0094]
[0095] In the formula, The coefficient is a constant;
[0096] The model parameters of the learning model are updated based on the loss until the objective function result converges.
[0097] 4. Generate geometric features to describe the motion based on key data;
[0098] 5. Determine whether on-site operations in power marketing are in violation of regulations based on geometric features.
[0099] Example 2:
[0100] This invention provides a dynamic detection device for on-site operations in power marketing, the device comprising:
[0101] The data acquisition module is used to acquire current time-series scene images of power marketing field operations;
[0102] The preprocessing module is used to preprocess the current temporal scene image based on Retinex theory;
[0103] The extraction module is used to extract key data from the preprocessed current time-series scene image based on a pre-built dynamic detection model;
[0104] The feature module is used to generate geometric features to describe motion based on key data;
[0105] The judgment module is used to determine whether on-site operations in power marketing are in violation of regulations based on geometric features.
[0106] Example 3:
[0107] This invention provides a dynamic detection device for on-site operations in power marketing, including a processor and a storage medium;
[0108] Storage media are used to store instructions;
[0109] The processor is used to perform operations according to instructions to execute the steps according to the method described above.
[0110] Example 4:
[0111] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0112] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0113] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0116] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for dynamic detection of on-site operations in power marketing, characterized in that, include: Acquire current time-series scene images of power marketing field operations; Preprocessing of current temporal scene images based on Retinex theory; Based on a pre-built dynamic detection model, key data is extracted from the pre-processed current time-series scene image; the key data includes the coordinate positions of the head, face, neck, left shoulder, right shoulder, left hand, right hand, left arm, and right arm. Generate geometric features to describe the motion based on key data; Determine whether on-site operations in power marketing are in violation of regulations based on geometric characteristics; The construction of the dynamic detection model includes: Acquire historical time-series images of on-site electricity marketing operations; Preprocessing of historical time-series scene images based on Retinex theory; Add annotation information to the preprocessed historical time-series scene images and generate a training sample set; Initialize the LSTM network model and train it using the training sample set. Calculate the loss based on the model output and annotation information, and update the model parameters of the LSTM network model based on the loss until the loss converges. The trained LSTM network model is used as the teacher model, and the student model is trained by knowledge distillation. The trained student model is then used as the dynamic detection model. The initialization of the LSTM network model and the input of the training sample set for training also includes the introduction of spatial attention and temporal attention methods; The spatial attention method includes automatically learning and recognizing the importance of scene images in different frames of a temporal sequence through an LSTM sub-network; The temporal attention method includes obtaining the importance of different key data based on different frames of scene images in a temporal sequence through an LSTM sub-network; The student model trained using the knowledge distillation method includes: The training sample set is input into the teacher model and the student model, and the softmax of the teacher model is used as the softtarget. The cross-entropy between the softmax output and softtarget of the student model at the same temperature coefficient T is denoted as... ; The cross-entropy between the softmax output of the student model and the labeled values at a temperature coefficient T=1 is denoted as... ; Construct the objective function for knowledge distillation: ; In the formula, The coefficient is a constant; The model parameters of the learning model are updated based on the loss until the objective function result converges.
2. The method for dynamic detection of on-site operations in power marketing according to claim 1, characterized in that, The preprocessing includes: Constructing scene images: ; In the formula, For scene images, For reflection images, For lighting images, Let the coordinates be the points; Illumination image estimation using Gaussian center-encircle function : ; In the formula, These are the parameters of the Gaussian center-circle function; Scene images Reflected images Illumination Images Transformation from the real number field to the logarithmic field: ; Calculate and obtain the reflection image in the logarithmic domain. : ; Reflected image Transformation from the logarithmic field to the real number field: ; The final obtained reflection image As a preprocessing result.
3. A dynamic detection device for on-site operation in power marketing, characterized in that, The device includes: The data acquisition module is used to acquire current time-series scene images of power marketing field operations; The preprocessing module is used to preprocess the current temporal scene image based on Retinex theory; The extraction module is used to extract key data from the preprocessed current temporal scene image based on a pre-built dynamic detection model; the key data includes the coordinate positions of the head, face, neck, left shoulder, right shoulder, left hand, right hand, left arm, and right arm; The feature module is used to generate geometric features to describe motion based on key data; The judgment module is used to determine whether on-site operations in power marketing are in violation of regulations based on geometric features. The construction of the dynamic detection model includes: Acquire historical time-series images of on-site electricity marketing operations; Preprocessing of historical time-series scene images based on Retinex theory; Add annotation information to the preprocessed historical time-series scene images and generate a training sample set; Initialize the LSTM network model and train it using the training sample set. Calculate the loss based on the model output and annotation information, and update the model parameters of the LSTM network model based on the loss until the loss converges. The trained LSTM network model is used as the teacher model, and the student model is trained by knowledge distillation. The trained student model is then used as the dynamic detection model. The initialization of the LSTM network model and the input of the training sample set for training also includes the introduction of spatial attention and temporal attention methods; The spatial attention method includes automatically learning and recognizing the importance of scene images in different frames of a temporal sequence through an LSTM sub-network; The temporal attention method includes obtaining the importance of different key data based on different frames of scene images in a temporal sequence through an LSTM sub-network; The student model trained using the knowledge distillation method includes: The training sample set is input into the teacher model and the student model, and the softmax of the teacher model is used as the softtarget. The cross-entropy between the softmax output and softtarget of the student model at the same temperature coefficient T is denoted as... ; The cross-entropy between the softmax output of the student model and the labeled values at a temperature coefficient T=1 is denoted as... ; Construct the objective function for knowledge distillation: ; In the formula, The coefficient is a constant; The model parameters of the learning model are updated based on the loss until the objective function result converges.
4. A dynamic detection device for on-site operation in power marketing, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to claim 1 or 2.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method described in claim 1 or 2.
Citation Information
Patent Citations
Student model training method and device, computer equipment and storage medium
CN112749728A
Image enhancement processing method and device, computer equipment and medium
CN114463223A