Power equipment real-time monitoring method and device, electronic equipment and readable medium
By employing a deep neural network model compression technique with Newton's method to optimize the loss function on edge computing devices, the resource constraint problem in real-time monitoring of power equipment is solved, achieving high-precision and low-complexity power equipment status monitoring, ensuring grid security and reducing data pressure.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INFORMATION & COMMUNICATION BRANCH STATE GRID JIBEI ELECTRIC POWER CO LTD
- Filing Date
- 2021-07-15
- Publication Date
- 2026-07-21
Smart Images

Figure CN115619999B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of power equipment operation and maintenance, and more specifically, to a method, apparatus, electronic device, and computer-readable medium for real-time monitoring of power equipment. Background Technology
[0002] my country's power grid is characterized by its diverse types of substation equipment, wide distribution, and varied structural parameters. During long-term operation, equipment failures are almost inevitable. Causes of these failures include defects inherited from the manufacturing process, problems during installation, inspection, and maintenance, and factors such as insulation aging and structural deterioration due to long-term operation. Currently, substation inspections are largely conducted using intelligent inspection equipment, such as drones, robots, and smart helmets. This significantly reduces the workload of maintenance personnel and lowers the cost of daily power equipment maintenance. However, real-time image capture of equipment generates a large amount of image data, requiring manual assessment of equipment status. This process increases the workload of maintenance personnel and consumes significant manpower. Therefore, it is essential to utilize intelligent recognition technology to analyze and process this data, extract key information, and automate data processing.
[0003] Edge computing enables more monitoring applications to perform computational tasks on distributed nodes at the network edge, thus reducing latency and enabling real-time online decision-making. In the field of power equipment operation and maintenance and inspection, real-time status monitoring of power equipment in a power Internet of Things (IoT) environment is required. Since the power IoT deployed by power companies consists of a large number of power terminal devices, edge computing-based power monitoring application systems are generally used to analyze and process the collected real-time images of power equipment to monitor their condition. However, complex network models face resource constraints when deployed on terminal or edge devices.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] In view of this, the present disclosure provides a method, apparatus, electronic device and computer-readable medium for real-time monitoring of power equipment, which can deploy a high-precision, low-complexity computing model in an edge computing device to monitor power equipment in real time, ensuring the safe operation of the power grid while reducing the data pressure on the Internet of Things.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part by practice of this disclosure.
[0007] According to one aspect of this disclosure, a method for real-time monitoring of power equipment is proposed. The method includes: acquiring real-time images of the power equipment via the Internet of Things; preprocessing the real-time images to generate image data; inputting the image data into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; and real-time monitoring of the state of the power equipment based on the target detection results.
[0008] In one exemplary embodiment of this disclosure, the method further includes: acquiring multiple historical images of power equipment; preprocessing the multiple historical images to generate multiple historical image data; training a deep neural network model based on the multiple historical image data to generate an initial target detection model; and optimizing a loss function based on Newton's method to compress the initial target detection model to generate the target detection model.
[0009] In one exemplary embodiment of this disclosure, preprocessing the plurality of historical images to generate a plurality of historical image data includes: performing data cleaning on the plurality of historical images to generate a plurality of historical image data; and / or performing data transformation on the plurality of historical images to generate a plurality of historical image data; and / or performing data normalization processing on the plurality of historical images to generate a plurality of historical image data.
[0010] In one exemplary embodiment of this disclosure, optimizing the loss function based on Newton's method to compress the initial target detection model and generate the target detection model includes: generating an exponential loss function; generating a compression function; optimizing the exponential loss function based on Newton's method to obtain a minimized exponential loss function and its corresponding model parameters; decoupling the compression function to obtain the weights of the compressed target detection model; and generating the target detection model based on the model parameters and the weights.
[0011] In one exemplary embodiment of this disclosure, generating an exponential loss function includes: obtaining initialization parameters, the initialization parameters including a compression target, an algorithm iteration count, and a sample iteration count; and generating the exponential loss function based on the initialization parameters.
[0012] In one exemplary embodiment of this disclosure, generating a compression function includes: obtaining the original weight tensor of the initial target detection model; and generating the compression function based on the original weight tensor.
[0013] In one exemplary embodiment of this disclosure, optimizing the exponential loss function based on Newton's method to obtain a minimized exponential loss function and its corresponding model parameters includes: determining initial values for iteration; determining a search direction; performing iterative calculations based on the search direction to solve for the minimized exponential function; and determining the model parameters based on the minimized exponential function.
[0014] In one exemplary embodiment of this disclosure, determining the search direction includes: obtaining the search direction by performing a linear transformation on the gradient using the Hessian matrix based on the initial iteration value.
[0015] In one exemplary embodiment of this disclosure, decoupling the compression function to obtain the weights of the compressed target detection model includes: determining dual variables; decoupling the compression function based on the dual variables and the alternating direction multiplier method; and calculating the weights of the target detection model based on iterative calculation of the decoupled compression function.
[0016] According to one aspect of this disclosure, a real-time monitoring device for power equipment is proposed. The device includes: an image module for acquiring real-time images of the power equipment via the Internet of Things; a processing module for preprocessing the real-time images to generate image data; a calculation module for inputting the image data into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; and a monitoring module for real-time monitoring of the state of the power equipment based on the target detection results.
[0017] In one exemplary embodiment of this disclosure, the system further includes: a model training module, configured to acquire multiple historical images of power equipment; preprocess the multiple historical images to generate multiple historical image data; train a deep neural network model based on the multiple historical image data to generate an initial target detection model; and optimize the loss function based on Newton's method to compress the initial target detection model to generate the target detection model.
[0018] According to one aspect of this disclosure, an electronic device is proposed, comprising: one or more processors; a storage device for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method as described above.
[0019] According to one aspect of this disclosure, a computer-readable medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0020] According to the real-time monitoring method, apparatus, electronic device, and computer-readable medium for power equipment disclosed herein, real-time images of power equipment are acquired via the Internet of Things (IoT); the real-time images are preprocessed to generate image data; the image data is input into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; the method of real-time monitoring of the state of the power equipment based on the target detection results enables the deployment of a high-precision, low-complexity computational model in an edge computing device, thereby enabling real-time monitoring of the power equipment, ensuring the safe operation of the power grid while reducing the data pressure on the IoT.
[0021] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this disclosure. Attached Figure Description
[0022] The above and other objects, features, and advantages of this disclosure will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this disclosure, and those skilled in the art will be able to obtain other drawings based on these drawings without any inventive effort.
[0023] Figure 1 This is a system block diagram illustrating a real-time monitoring method and apparatus for power equipment according to an exemplary embodiment.
[0024] Figure 2 This is a flowchart illustrating a real-time monitoring method for power equipment according to an exemplary embodiment.
[0025] Figure 3 This is a flowchart illustrating a real-time monitoring method for power equipment according to another exemplary embodiment.
[0026] Figure 4 This is a flowchart illustrating a real-time monitoring method for power equipment according to another exemplary embodiment.
[0027] Figure 5 This is a schematic diagram illustrating a real-time monitoring method for power equipment according to another exemplary embodiment.
[0028] Figure 6 This is a schematic diagram illustrating a real-time monitoring method for power equipment according to another exemplary embodiment.
[0029] Figure 7 This is a block diagram illustrating a real-time monitoring device for power equipment according to an exemplary embodiment.
[0030] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0031] Figure 9 This is a block diagram illustrating a computer-readable medium according to an exemplary embodiment. Detailed Implementation
[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0033] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0036] It should be understood that while the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this disclosure. As used herein, the term "and / or" includes all combinations of any and more of the associated listed items.
[0037] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing this disclosure, and therefore cannot be used to limit the scope of protection of this disclosure.
[0038] Network devices in the Internet of Things (IoT) environment accumulate massive amounts of data. While cloud computing technologies have the potential to successfully process this vast amount of data, handling and analyzing such data remains a challenge for most typical monitoring applications. Complex network models face resource constraints when deployed on terminals or edge devices. Therefore, researching neural network model compression techniques to achieve the portability and computational optimization of neural network models on terminals or edge devices while maintaining model accuracy is crucial for reducing the computational complexity of edge computing in monitoring applications.
[0039] The inventors of this application have observed that various techniques for compressing DNN (Deep Neural Network) models have been proposed in recent years. Pruning and quantization are the two most widely used methods in practice. In addition to using weight pruning for model compression, pruning methods have also proposed channel (filter / neuron) pruning to remove the entire filter of CNN weights, thereby accelerating inference. Besides reducing parameters through pruning, quantization is considered another direction for compressing DNNs. The quantization interval can be uniform or non-uniform; generally, non-uniform quantization can achieve a higher compression ratio, while uniform quantization can provide acceleration. The quantization bit width can be further reduced using Hoffman coding. In addition to scalar quantization, vector quantization can also be applied to DNN model compression.
[0040] To maximize compression performance, some methods perform pruning and quantization together during training. However, this approach suffers from the interplay between layer sparsity and quantization bit width, and these methods rely on setting hyperparameters to compress layers, increasing the difficulty of manually selecting compression ratios or adjusting hyperparameters. In view of the technical bottlenecks in existing technologies, this application provides a method for real-time monitoring of power equipment.
[0041] In the real-time monitoring method for power equipment disclosed herein, the specific technical description is based on the monitoring application of power equipment operation and maintenance. It is understood that the method disclosed herein can also be applied to other fields, and this application is not limited thereto.
[0042] More specifically, in the target recognition task of power distribution operation and maintenance, firstly, real-time equipment status images captured by intelligent inspection equipment used in power distribution operation and maintenance are collected, and suitable research samples are selected from them. Then, image enhancement technology is used to preprocess the data. Next, the images are manually labeled to obtain a dataset for power equipment target detection. This image dataset can then be used for edge computing-based target detection tasks. In the automatic DNN compression framework proposed in this paper, the image dataset first needs to be preprocessed, including data cleaning to remove dirty data, then converting the image data into tensors, and then normalizing the images channel-by-channel by setting the mean and variance. Then, the model is trained based on the processed image dataset, and the trained model is compressed using an optimized automatic DNN compression method. An optimization method for the loss function is used to accelerate the training convergence process of the loss function, finally obtaining the compressed neural network model.
[0043] The target detection model proposed in the real-time monitoring method for power equipment disclosed herein has a higher compression ratio and accuracy compared to the existing DNN model, significantly reducing the size of the DNN model and effectively reducing its complexity. The method of this disclosure will be described below with the aid of specific embodiments.
[0044] Figure 1 This is a system block diagram illustrating a real-time monitoring method and apparatus for power equipment according to an exemplary embodiment.
[0045] like Figure 1 As shown, system architecture 10 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0046] Terminal devices 101, 102, and 103 can interact with server 105 via network 104 to receive or send data. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as video monitoring applications, web browser applications, instant data transmission applications, and email clients.
[0047] Terminal devices 101, 102, and 103 can be various electronic devices with monitoring functions and supporting data transmission or calculation, including but not limited to power electronic devices, smart cameras, and smart monitoring instruments.
[0048] Terminal devices 101, 102, and 103 can, for example, acquire real-time images of power equipment via the Internet of Things; terminal devices 101, 102, and 103 can, for example, preprocess the real-time images to generate image data; terminal devices 101, 102, and 103 can, for example, input the image data into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; terminal devices 101, 102, and 103 can, for example, monitor the state of the power equipment in real time based on the target detection results.
[0049] Server 105 can be a server that provides various services, such as a backend server that supports the tasks processed by terminal devices 101, 102, and 103. The backend server can analyze and process the received requests and feed back the processing results (compressed monitoring model) to the terminal devices.
[0050] Server 105 may, for example, acquire multiple historical images of power equipment; server 105 may, for example, preprocess the multiple historical images to generate multiple historical image data; server 105 may, for example, train a deep neural network model based on the multiple historical image data to generate an initial target detection model; server 105 may, for example, optimize the loss function based on Newton's method to compress the initial target detection model to generate the target detection model.
[0051] Server 105 can be a single physical server, or it can be composed of multiple servers. It should be noted that the real-time monitoring method for power equipment provided in this embodiment can be executed by server 105 and / or terminal devices 101, 102, 103. Correspondingly, the real-time monitoring device for power equipment can be set in server 105 and / or terminal devices 101, 102, 103.
[0052] Figure 2 This is a flowchart illustrating a real-time monitoring method for power equipment according to an exemplary embodiment. The real-time monitoring method 20 for power equipment can be applied to edge devices in the Internet of Things (IoT) and includes at least steps S202 to S208.
[0053] like Figure 2As shown in S202, real-time images of power equipment are acquired through the Internet of Things (IoT). The IoT refers to the use of various information sensors, RFID technology, GPS, infrared sensors, laser scanners, and other devices and technologies to collect real-time information on any object or process that needs to be monitored, connected, or interacted with. This information includes sound, light, heat, electricity, mechanics, chemistry, biology, and location data. Through various possible network access methods, ubiquitous connectivity between things and between things and people is achieved, enabling intelligent perception, identification, and management of objects and processes. Edge devices in the IoT can acquire and process real-time images. An edge device is a device that provides an entry point to the core network of an enterprise or service provider.
[0054] In S204, the real-time images are preprocessed to generate image data. To purify the dataset, the acquired raw power equipment image data needs to undergo a certain degree of filtering to remove blurry, duplicate, and damaged image files, avoiding unnecessary impact on the training model quality and retaining relatively clear image data.
[0055] The data transformation process involves storing the acquired image dataset in separate folders according to labels for different categories of training data, then loading the data and transforming the image grayscale range from [0,255] to [0,1]. The given image is randomly cropped to different sizes and aspect ratios, then scaled to a specified size. The given PIL image is then randomly horizontally flipped with a given probability. Finally, the image is converted to an in-memory storage format, with bytes input as a stream, converted into a one-dimensional tensor, reorganized and transposed, and each element of the current tensor divided by 255 before outputting the tensor.
[0056] To accelerate the convergence of the model, the image is standardized channel by channel, as shown in formula (1), where mean represents the mean of each channel and std represents the standard deviation of each channel. This formula can be used to standardize the data, resulting in a mean of 0 and a standard deviation of 1.
[0057] output = (input - mean) / std(1)
[0058] In S206, the image data is input into the target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression.
[0059] In S208, the status of the power equipment is monitored in real time based on the target detection results. A warning message may be generated if a preset target is included in the detection results. The preset target may be an image indicating damage to the power equipment.
[0060] According to the real-time monitoring method for power equipment disclosed herein, real-time images of power equipment are acquired through the Internet of Things (IoT); the real-time images are preprocessed to generate image data; the image data is input into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; the method of real-time monitoring of the state of the power equipment based on the target detection results enables the deployment of a high-precision, low-complexity computing model in an edge computing device, so as to monitor the power equipment in real time, ensuring the safe operation of the power grid while reducing the data pressure on the IoT.
[0061] It should be clearly understood that this disclosure describes how specific examples are formed and used, but the principles of this disclosure are not limited to any details of these examples. Rather, based on the teachings of this disclosure, these principles can be applied to many other embodiments.
[0062] Figure 3 This is a flowchart illustrating a real-time monitoring method for power equipment according to another exemplary embodiment. The real-time monitoring method 30 for power equipment can be applied to a server that supports edge computing devices. Figure 3 The process shown in step 30 is... Figure 2 Supplementary description of the process shown.
[0063] like Figure 3 As shown, in S302, multiple historical images of the power equipment are acquired.
[0064] In step S304, the plurality of historical images are preprocessed to generate a plurality of historical image data. This includes: cleaning the plurality of historical images to generate a plurality of historical image data; and / or converting the plurality of historical images to generate a plurality of historical image data; and / or normalizing the plurality of historical images to generate a plurality of historical image data.
[0065] In step S306, a deep neural network model is trained based on the multiple historical image data to generate an initial object detection model. The image data after preprocessing is input into the DNN model for training to generate the initial object detection model.
[0066] In step S308, the loss function is optimized based on Newton's method to compress the initial object detection model and generate the object detection model. For example, an exponential loss function may be generated; a compression function may be generated; the exponential loss function may be optimized using Newton's method to obtain a minimized exponential loss function and its corresponding model parameters; the compression function may be decoupled to obtain the weights of the compressed object detection model; and the object detection model may be generated based on the model parameters and the weights.
[0067] The present invention discloses a real-time monitoring method for power equipment, which proposes a deep neural network model compression optimization method for intelligent detection of power equipment. This method is based on the joint pruning and quantization of the model. Under the premise of data preprocessing of power equipment image data, it calculates the original weights of the model, initializes the parameters, and decouples the parameters by using the Alternating Iterative Multiplier (ADMM) algorithm. This method does not require the use of any hyperparameters to manually set the compression ratio of each layer, and can learn the compression ratio and the compression model weights at the same time.
[0068] This disclosure of a real-time monitoring method for power equipment proposes a model compression optimization technique based on the Newton-Raphson method loss function. Unlike traditional classical loss functions such as information entropy and mean square error, this patent employs the Newton-Raphson method to accelerate the training and convergence process of the loss function, while simultaneously improving the accuracy of the model's classification results.
[0069] Experimental results show that, compared with currently popular methods, the method proposed in this patent has higher compression ratio and accuracy, reduces the size of the DNN model, and can effectively reduce the complexity of the model.
[0070] Figure 4 This is a flowchart illustrating a real-time monitoring method for power equipment according to another exemplary embodiment. Figure 4 The process shown in step 40 is... Figure 3 The flowchart shown includes a detailed description of step S308, "Optimize the loss function based on Newton's method to compress the initial target detection model and generate the target detection model."
[0071] like Figure 4 As shown, in S402, the exponential loss function is generated. This includes: obtaining initialization parameters, which include the compression target, the number of algorithm iterations, and the number of sample iterations; and generating the exponential loss function based on the initialization parameters.
[0072] In step S404, the compression function is generated. This includes: obtaining the original weight tensor of the initial object detection model; and generating the compression function based on the original weight tensor.
[0073] In step S406, the exponential loss function is optimized using Newton's method to obtain a minimized exponential loss function and its corresponding model parameters. This includes: determining initial values for iteration; determining the search direction; performing iterative calculations based on the search direction to solve for the minimized exponential function; and determining the model parameters based on the minimized exponential function.
[0074] Determining the search direction includes: obtaining the search direction by performing a linear transformation on the gradient using the Hessian matrix based on the initial iteration value.
[0075] In step S408, the compression function is decoupled to obtain the weights of the compressed target detection model. This includes: determining the dual variable; decoupling the compression function based on the dual variable and the alternating direction multiplier method; and calculating the weights of the target detection model based on iterative calculation of the decoupled compression function.
[0076] In S410, the target detection model is generated based on the model parameters and the weights.
[0077] In one embodiment, the original weight tensor W of the model can be calculated, and the initialization parameters include the target size of the model compression, the total number of SGD iterations of the algorithm, and the number of iterations required to train all samples in the training set once. Then, the loss function l is defined. This disclosure uses the exponential loss function to calculate the loss, as shown in formula (2). Where n is the number of samples, y is the true value of the sample, and f(x) = 1 / 2 * y ... i ) is the weight of the model in the i-th iteration.
[0078]
[0079] The general function for DNN compression is shown in Equation (3). It is constrained by the total size of the compressed DNN weights, and its goal is to minimize the loss function. It is a set of weight vectors with L layers of DNN, b(W (i) ) is the minimum bit width of all non-zero elements in the encoding W, L0 norm ||W||0 is the number of non-zero elements in W, Z is the target size of the model, and l is the loss function.
[0080]
[0081]
[0082] Since b(.) and ||.‖0 are non-differentiable functions, they cannot be solved by normal training algorithms. In the embodiments of this application, the ADMM method can be used to decouple its L0 norm and bit width, as shown in formula (4). By introducing dual variables... The equality constraints are then incorporated into the augmented Lagrangian function, where λ > 0 is a hyperparameter. It is a copy of the DNN weight W.
[0083]
[0084]
[0085] The ADMM method enables the model compression method based on joint pruning and quantization to be trained normally. By iteratively updating the three variables W, V and Y in formula (4), the problem of non-differentiability of b(.) and ||.|0 can be solved. Finally, the weights of the compressed DNN model are output.
[0086] To optimize the loss function l, this disclosure utilizes Newton's method, employing a linear transformation of the Hessian matrix on the gradient to obtain the search direction, thereby accelerating the convergence of the loss function. First, an initial value x0∈Ω needs to be selected for iteration, with ε>0, and the following operations are repeated. If... Then stop the loop. Next, start calculating the gradient G, as shown in formula (5), where the total number of training samples is n, t = 0, 1, ..., n, f(x) is the loss function, and x is the parameter object to be optimized:
[0087]
[0088] The calculation of the Hessian matrix H is shown in formula (6);
[0089]
[0090] The search direction d is calculated as shown in formula (7):
[0091]
[0092] The calculation of the final update iteration point is shown in formula (8):
[0093] x t+1 =x t -d t (8)
[0094] As shown above, by iteratively solving for the minimum value of the function, the minimized loss function and model parameter values are finally obtained, thus achieving model parameter optimization.
[0095] The following is an example of an experimental result to illustrate the effectiveness of the model compression method mentioned in this disclosure:
[0096] Experimental setup and dataset
[0097] The experiments were conducted using Windows 10, a GPU with a GTX 1070 and 8GB of RAM, and CUDA / CUDNN. The training dataset consisted of 5944 images of power equipment status, including images of six types of equipment: breathers, meters, insulators, oil leaks, foreign objects, and metal corrosion. The dataset was divided into standard training and testing sets: 70% was used for model training (the training set), and 30% was used for model testing (the test set). AlexNet was used as the DNN model for both training and testing the power image data to evaluate the performance of the proposed compression method.
[0098] The batch size can be set to 128, momentum SGD can be used to optimize the exponential loss function l(W), the initial learning rate is 0.005, cosine annealing is used to decay the learning rate, and the hyperparameter λ = 0.05 is set. To make the comparison between methods more obvious, the compression budget Z can be set to a value similar to or smaller than that of the comparison method. The experiment was conducted on a dataset containing 4160 training instances for 120 iterations.
[0099] Experimental indicators
[0100] To evaluate the performance of model compression, compression ratio and accuracy are used as evaluation metrics, as shown in Equations (9) and (10).
[0101]
[0102] Among them, R C N represents the compression factor. original N represents the number of parameters in the original model. compressed This indicates the number of parameters in the compressed model.
[0103]
[0104] Where A represents accuracy, N correct N represents the number of correctly classified samples. test This represents the total number of samples in the test set. In accuracy metrics, correct classification means that the predicted label is the one with the highest probability in the final probability vector. If the one with the highest probability in the prediction is correctly classified, then the prediction is correct. The accuracy is then calculated by counting the frequency of correct classifications.
[0105] Comparison Methods
[0106] To verify the effectiveness of the automatic neural network compression method employing a joint pruning and quantization strategy, this disclosure compares the automatic DNN compression method with the pruning method in deep compression, a currently popular model compression method. Unlike the end-to-end framework used in this disclosure, this method requires setting the pruning rate as a hyperparameter.
[0107] The pruning method is described below. First, the network learns connections through normal training. Next, small-weight connections are pruned, meaning all connections with weights below a threshold are removed from the network. Finally, the network is retrained to learn the final weights of the remaining sparse connections. This pruning method reduces the number of parameters in the model.
[0108] Experimental Results and Analysis
[0109] In this experiment, the method disclosed herein and the deep compression method used for comparison were used to train and test the AlexNet model. Both training and testing data used a power equipment operation and maintenance image dataset, and detection was performed on equipment in different states, such as... Figure 5 and Figure 6 As shown, the experimental results of model compression ratio and classification accuracy of the compressed model are presented for the two methods.
[0110] Figure 5 The results show that the compression ratio of the AlexNet model using the automatic DNN compression method is significantly higher than that produced by the deep compression method.
[0111] The AlexNet model was compressed using both automatic neural network compression and deep compression methods. The compressed model was then retrained using the training set, and tested using the test set. Figure 6 As shown, the model compressed using the method of this disclosure has higher classification accuracy than the model compressed using deep compression methods.
[0112] comprehensive Figure 5 and Figure 6 Analysis shows that the compression method introduced in this disclosure is more efficient than existing neural network compression methods, achieving higher compression ratios and accuracy. This method is well-suited for models in edge computing environments that require processing and analyzing large amounts of image data. Therefore, the method employed in this disclosure is effective in applications based on power equipment image target detection, particularly in achieving high model prediction accuracy while reducing the size and complexity of the DNN model, thereby reducing the load on edge computing.
[0113] This disclosure introduces an optimized automatic neural network compression method based on joint pruning and quantization strategies, and provides specific implementation measures for applying this method in the field of power equipment operation and maintenance. In this disclosure, a loss function optimization method using Newton's method is employed to accelerate the training and convergence process of the loss function. Extensive experiments verify the effectiveness and practicality of this method for neural network compression. This method can be used in target detection edge services for processing and analyzing real-time power equipment defect image data, reducing model complexity and the load on edge computing, particularly achieving high model prediction accuracy while reducing model size.
[0114] Those skilled in the art will understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, it performs the functions defined by the methods provided in this disclosure. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
[0115] Furthermore, it should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0116] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.
[0117] Figure 7 This is a block diagram illustrating a real-time monitoring device for power equipment according to an exemplary embodiment. Figure 7 As shown, the real-time monitoring device 70 for power equipment includes: an image module 702, a processing module 704, a calculation module 706, a monitoring module 708, and a model training module 710.
[0118] Image module 702 is used to acquire real-time images of power equipment via the Internet of Things;
[0119] Processing module 704 is used to preprocess the real-time image to generate image data;
[0120] The calculation module 706 is used to input the image data into the target detection model to generate the target detection result, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression;
[0121] The monitoring module 708 is used to monitor the status of the power equipment in real time based on the target detection results.
[0122] The model training module 710 is used to acquire multiple historical images of power equipment; preprocess the multiple historical images to generate multiple historical image data; train a deep neural network model based on the multiple historical image data to generate an initial target detection model; and optimize the loss function based on Newton's method to compress the initial target detection model to generate the target detection model.
[0123] According to the real-time monitoring device for power equipment disclosed herein, real-time images of power equipment are acquired through the Internet of Things (IoT); the real-time images are preprocessed to generate image data; the image data is input into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; the method of real-time monitoring of the state of the power equipment based on the target detection results enables the deployment of a high-precision, low-complexity computing model in an edge computing device, so as to monitor the power equipment in real time, ensuring the safe operation of the power grid while reducing the data pressure on the IoT.
[0124] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0125] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0126] like Figure 8 As shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including storage unit 820 and processing unit 810), a display unit 840, etc.
[0127] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 810 can perform actions such as... Figure 2 , Figure 3 , Figure 4 The steps are shown in the figure.
[0128] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache storage unit 8202, and may further include a read-only memory unit (ROM) 8203.
[0129] The storage unit 820 may also include a program / utility 8204 having a set (at least one) program module 8205, such program module 8205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0130] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0131] Electronic device 800 can also communicate with one or more external devices 800' (e.g., keyboard, pointing device, Bluetooth device, etc.), enabling users to communicate with devices that interact with electronic device 800, and / or any device (e.g., router, modem, etc.) that allows electronic device 800 to communicate with one or more other computing devices. This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. Network adapter 860 can communicate with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0132] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software, or by combining software with necessary hardware. Therefore, as... Figure 9 As shown, the technical solution according to the embodiments of this disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the above-described method according to the embodiments of this disclosure.
[0133] The software product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0134] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0135] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0136] The aforementioned computer-readable medium carries one or more programs, which, when executed by a device, enable the computer-readable medium to perform the following functions: acquire real-time images of power equipment via the Internet of Things; preprocess the real-time images to generate image data; input the image data into a target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; and monitor the state of the power equipment in real time based on the target detection results.
[0137] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0138] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0139] Exemplary embodiments of this disclosure have been specifically shown and described above. It should be understood that this disclosure is not limited to the detailed structures, arrangements, or implementations described herein; rather, this disclosure is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.
Claims
1. A method for real-time monitoring of power equipment, characterized in that, include: Acquire real-time images of power equipment through the Internet of Things; The real-time image is preprocessed to generate image data; The image data is input into the target detection model to generate target detection results, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; The status of the power equipment is monitored in real time based on the target detection results; The target detection model is generated by compressing the initial target detection model based on the loss function optimized by Newton's method, including: Generate an exponential loss function; Generate compression function; The exponential loss function is optimized based on Newton's method to obtain the minimized exponential loss function and its corresponding model parameters. Decouple the compression function to obtain the weights of the compressed target detection model; The target detection model is generated based on the model parameters and the weights; Decoupling the compression function to obtain the weights of the compressed object detection model includes: Identify the dual variable; The compression function is decoupled based on the dual variables and the alternating direction multiplier method; The decoupled compression function is calculated based on iterative calculation to obtain the target detection model. The weights of the compressed DNN model are output by iteratively updating the three variables W, V and Y in the following formula. ; W is the set of weight vectors of a DNN with L layers, V is a copy of the DNN weights W, Y is the dual variable, l is the loss function, Z is the model target size, and λ > 0 is a hyperparameter.
2. The real-time monitoring method for power equipment as described in claim 1, characterized in that, Also includes: Acquire multiple historical images of the power equipment; The multiple historical images are preprocessed to generate multiple historical image data; The deep neural network model is trained based on the aforementioned historical image data to generate an initial target detection model; The loss function is optimized based on Newton's method to compress the initial target detection model and generate the target detection model.
3. The real-time monitoring method for power equipment as described in claim 2, characterized in that, The multiple historical images are preprocessed to generate multiple historical image data, including: Data cleaning is performed on the multiple historical images to generate multiple historical image data; and / or Data conversion is performed on the multiple historical images to generate multiple historical image data; and / or The multiple historical images are subjected to data normalization processing to generate multiple historical image data.
4. The real-time monitoring method for power equipment as described in claim 1, characterized in that, Generate the exponential loss function, including: Obtain initialization parameters, including compression target, number of algorithm iterations, and number of sample iterations; The exponential loss function is generated based on the initialization parameters.
5. The real-time monitoring method for power equipment as described in claim 1, characterized in that, Generate compression functions, including: Obtain the original weight tensor of the initial target detection model; The compression function is generated based on the original weight tensor.
6. The real-time monitoring method for power equipment as described in claim 1, characterized in that, The exponential loss function is optimized based on Newton's method to obtain the minimized exponential loss function and its corresponding model parameters, including: Determine the initial values for the iteration; Determine the search direction; Iterative calculations are performed based on the search direction to solve for minimizing the exponential function; The model parameters are determined based on the minimized exponential function.
7. The real-time monitoring method for power equipment as described in claim 6, characterized in that, Determine the search direction, including: The search direction is obtained by performing a linear transformation on the gradient using the Hessian matrix based on the initial values of the iteration.
8. A real-time monitoring device for power equipment, characterized in that, include: The image module is used to acquire real-time images of power equipment via the Internet of Things. The processing module is used to preprocess the real-time image to generate image data; The calculation module is used to input the image data into the target detection model and generate the target detection result, wherein the target detection model is a deep neural network model based on Newton's method to optimize the loss function for compression; The monitoring module is used to monitor the status of the power equipment in real time based on the target detection results; The target detection model is generated by compressing the initial target detection model based on the loss function optimized by Newton's method, including: Generate an exponential loss function; Generate compression function; The exponential loss function is optimized based on Newton's method to obtain the minimized exponential loss function and its corresponding model parameters. Decouple the compression function to obtain the weights of the compressed target detection model; The target detection model is generated based on the model parameters and the weights; Decoupling the compression function to obtain the weights of the compressed object detection model includes: Identify the dual variable; The compression function is decoupled based on the dual variables and the alternating direction multiplier method; The decoupled compression function is calculated based on iterative calculation to obtain the target detection model. The weights of the compressed DNN model are output by iteratively updating the three variables W, V and Y in the following formula. ; W is the set of weight vectors of a DNN with L layers, V is a copy of the DNN weights W, Y is the dual variable, l is the loss function, Z is the model target size, and λ > 0 is a hyperparameter.
9. The real-time monitoring device for power equipment as described in claim 8, characterized in that, Also includes: The model training module is used to acquire multiple historical images of power equipment; The multiple historical images are preprocessed to generate multiple historical image data; The deep neural network model is trained based on the aforementioned historical image data to generate an initial target detection model; The loss function is optimized based on Newton's method to compress the initial target detection model and generate the target detection model.
10. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Improved gradient elevator based wind generation set detecting method and device
CN110685868A
Power data monitoring system and method
CN112348085A