Complex neural network miniaturized high-voltage transmission line monitoring method and system
By introducing a search strategy based on reinforcement learning and decoupled head design, the search and design process of neural network models are optimized, and the problem of high consumption of deep learning model training resources in the existing technology is solved, and an efficient and resource-saving model design is realized, which is suitable for high-voltage transmission line monitoring.
Patent Information
- Application Number
- CN202411664033.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The lack of miniaturization methods for model search and design of high-voltage transmission line detection tasks in the prior art, resulting in the training of deep learning models requiring a large amount of computing resources and time, making it difficult to meet the needs of small enterprises with limited computing power or scarce resources.
A search strategy based on reinforcement learning is introduced to optimize the search and design process of neural network models, and the complexity of the model is reduced by decoupling head design and multi-level knowledge distillation, and a jump connection is set in the convolutional neural network architecture to search for the optimal connection combination based on reinforcement learning strategy.
It realizes that while ensuring model performance, it reduces model complexity, improves model operation efficiency, and saves resources. It is suitable for complex environments in high-voltage transmission line monitoring.
Smart Images

Figure CN119598342A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems, and more specifically, to a high-voltage transmission line monitoring method and system with a miniaturized complex neural network. Background Art
[0002] In the electric power industry, traditional high-voltage transmission line monitoring methods mainly rely on manual patrols, but this method has a series of problems in terms of efficiency and accuracy. The development of modern science and technology has made it possible to use computer vision and artificial intelligence technology for intelligent monitoring and identification. The application of such technologies not only has great potential, but also has real practical value. However, since high-voltage transmission lines are often located outdoors and the environment is complex and changeable, monitoring tasks face visual challenges such as small target detection and complex background segmentation, so more sophisticated and robust neural network models are needed for processing.
[0003] With the widespread application of deep learning models in image recognition, autonomous driving, speech recognition and other fields, their importance has become increasingly prominent. Improving the performance of deep learning models requires designing increasingly complex architectures, but this process usually requires a lot of time and practical experience. Therefore, neural architecture search (NAS) has become an important solution that can automatically search for the optimal neural network architecture. However, the training of deep learning models usually requires a lot of computing resources and time, which is a huge challenge for hardware devices and small businesses. Therefore, introducing a search strategy based on reinforcement learning is of great significance to optimize the model search and design process and reduce the complexity of the model.
[0004] Since the size and computing power of drone inspection equipment for high-voltage transmission lines are limited, we also need to optimize the neural network model, reduce its size as much as possible, and achieve model miniaturization, which will play an important role in improving model operation efficiency and saving resources. However, in the existing technology, there is no miniaturized method for model search and design for detection tasks.
[0005] In the traditional high-voltage transmission line monitoring process, we often encounter some problems that cannot be solved manually, such as low efficiency and insufficient accuracy. Therefore, it is necessary to seek a new solution, and it is particularly important to use computer vision and AI technology for intelligent detection and identification. However, the detection task of high-voltage transmission lines is quite arduous. The challenge is that these lines are usually located outdoors and are greatly affected by the environment. They often need to deal with extremely challenging visual tasks, such as the detection of small targets and the segmentation of complex backgrounds. Solving these problems requires more sophisticated and robust neural network models.
[0006] The abstraction and self-learning capabilities of deep learning models have made them play an increasingly important role in many fields such as image recognition, autonomous driving, and speech recognition. With the continuous development of hardware technology, we can design more complex deep learning models to improve performance. However, manually designing an excellent model requires a lot of time and experience, and even requires continuous trial and error to obtain the best results, which undoubtedly increases the difficulty of design. To solve this problem, neural architecture search (NAS) applies automatic search technology, which can automatically find and determine the optimal neural network architecture, greatly saving design time and improving efficiency. However, deep learning models still require a lot of computing resources and take a long time to train, which undoubtedly adds a lot of difficulty for small businesses with limited computing power or scarce resources. Therefore, we need to find a way to optimize the model structure and calculation process to minimize training time and resource consumption.
[0007] In view of the above problems, there is an urgent need for a high-voltage transmission line monitoring method and system with a miniaturized complex neural network. Summary of the invention
[0008] In order to address the deficiencies in the prior art, the present invention provides a high-voltage transmission line monitoring method and system with a miniaturized complex neural network, introduces a search strategy based on reinforcement learning, helps optimize the search and design process of the model, and reduces the complexity of the model while ensuring the performance of the model through technologies such as decoupled head design and multi-level knowledge distillation.
[0009] The present invention adopts the following technical solution.
[0010] The first aspect of the present invention relates to a high-voltage transmission line monitoring method with a miniaturized complex neural network, the method comprising the following steps: setting a jump connection in a convolutional neural network architecture, searching for an optimal connection combination based on a reinforcement learning strategy; constructing an intelligent dual-branch decoupling head, the decoupling head comprising a classification branch and a positioning branch, the classification branch being used to provide difference features between different types of information in the monitoring information of the high-voltage transmission line, the positioning branch being used to provide monitoring situation features in the monitoring information of the high-voltage transmission line, the decoupling head generating classification output and positioning output using a cross-attention mechanism and a dynamic weight adjustment module, the cross-attention mechanism performing attention calculations on the differences between different types of information to obtain difference attention results, performing attention calculations on the monitoring situation features to obtain situation attention results, and performing cross operations on the difference attention results and the situation attention results; coupling the classification output and the positioning output and inputting them into a backbone network, thereby obtaining a monitoring situation result of the high-voltage transmission line through the backbone network labeling, the monitoring situation result including the classification and alarming of the current high-voltage transmission line situation using a variety of typical situations and risk warning rules of the high-voltage transmission line.
[0011] Preferably, a skip connection is set in the convolutional neural network architecture, including: using MAE-NAS to construct a backbone convolutional neural network, defining the skip connection matrix as A N×N , N is the number of upsampling and downsampling in the backbone convolutional neural network, and the skip connection matrix A N×N The value of all elements in is 0 or 1; when the element value a ij When it is 0, it indicates that there is no skip connection from the i-th downsampling to the j-th upsampling in the search network; when the element value a ij When it is 1, it indicates that there is a skip connection from the i-th downsampling to the j-th upsampling in the search network.
[0012] Preferably, setting a skip connection in the convolutional neural network architecture includes: for the skip connection a ij , the dimension of the output result of the i-th downsampling is adjusted by the connection scale factor, and the adjusted output result of the i-th downsampling is input into the j-th upsampling; the connection scale factor is:
[0013]
[0014] Where T(·) is the scale of the input feature map for downsampling or upsampling;
[0015] Based on the value of the connection scale factor, the output of the i-th downsampling is connected with the input of the j-th upsampling by using a quick connection upsampling or a quick downsampling.
[0016] Preferably, based on the value of the connection scale factor, quick connection upsampling or quick downsampling is used to connect the output of the i-th downsampling with the input of the j-th upsampling, including: the quick upsampling uses the nearest neighbor method to obtain the value of the supplementary position of the high-voltage transmission line monitoring characteristic map during the quick upsampling calculation process; or, when the connection scale factor meets When the connection scale factor meets the requirement, the 2-fold upsampling of n connections is used as the quick upsampling, where n is an arbitrary integer; When , 2 times downsampling of n connections is used as the quick downsampling.
[0017] Preferably, searching for the optimal connection combination based on the reinforcement learning strategy includes: defining an action B of the reinforcement learning strategy t The modification made by the agent to the backbone convolutional neural network at time step t; the modification includes adding skip connections, removing skip connections, adjusting the type of layer between standard convolution kernel depth-separable convolutions, adjusting the size of the convolution kernel in the layer, and adjusting the type of acquisition function in the layer.
[0018] Preferably, searching for the optimal connection combination based on the reinforcement learning strategy includes: defining the reward function of the reinforcement learning strategy as the agent taking action B at time step t tAfter that, the generated new architecture G t+1 After that, the new architecture G t+1 Calculate the model objective function; the model objective function is:
[0019]
[0020] In the formula, α, β, and γ are the weights of model accuracy, inference time, and total number of parameters, respectively;
[0021] mAP(G) is the average precision of architecture G,
[0022] Inference Time (G) is the inference time of a single image of architecture G on a specific hardware.
[0023] Parameter Count(G) is the total number of parameters of architecture G.
[0024] Baseline Time and Baseline Params are the baseline quantities for inference time and total number of parameters, respectively.
[0025] Preferably, searching for the optimal connection sequence based on the reinforcement learning strategy includes: defining the reinforcement learning strategy as the probability distribution of all actions selected by the agent under a given state S; constructing a policy network using MLP, and training the policy network using the REINFORCE algorithm with the goal of maximizing the cumulative reward; using the trained policy network to output the probability distribution of the agent's selected actions under different states and the immediate R after selecting different actions. t ; To accumulate instant R t The highest goal is to obtain the optimal connection sequence, and based on the optimal connection sequence, the optimal backbone network searched by the reinforcement learning strategy is obtained.
[0026] The second aspect of the present invention relates to a high-voltage transmission line monitoring system with a miniaturized complex neural network, which is implemented using a high-voltage transmission line monitoring method with a miniaturized complex neural network as described in the first aspect of the present invention; the system includes a search module, a decoupling module and a monitoring module; the search module is used to set jump connections in a convolutional neural network architecture and search for an optimal connection combination based on a reinforcement learning strategy; the decoupling module is used to construct an intelligent dual-branch decoupling head, the decoupling head includes a classification branch and a positioning branch, the classification branch is used to provide difference features between different types of information in the monitoring information of the high-voltage transmission line, and the positioning branch is used to provide monitoring information in the high-voltage transmission line. Situation features, the decoupling head generates classification output and positioning output using a cross-attention mechanism and a dynamic weight adjustment module. The cross-attention mechanism performs attention calculations on the differences between different types of information to obtain difference attention results, performs attention calculations on monitoring situation features to obtain situation attention results, and performs cross operations on the difference attention results and situation attention results; the monitoring module is used to couple the classification output and the positioning output into the backbone network, thereby obtaining the monitoring situation results of the high-voltage transmission line through the backbone network labeling, and the monitoring situation results include the use of a variety of typical situations and risk warning rules of the high-voltage transmission line to classify and warn the current high-voltage transmission line situation. The third aspect of the present invention relates to a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method described in the first aspect of the present invention.
[0027] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect of the present invention.
[0028] The beneficial effect of the present invention is that, compared with the prior art, the present invention provides a high-voltage transmission line monitoring method and system with a miniaturized complex neural network, introduces a search strategy based on reinforcement learning, helps optimize the search and design process of the model, and at the same time reduces the complexity of the model while ensuring the model performance through technologies such as decoupled head design and multi-level knowledge distillation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Schematic diagram of the search space based on skip connection;
[0030] Figure 2 The diagram is the overall network diagram;
[0031] Figure 3 It is the decoupled head diagram;
[0032] Figure 4 is a classification branch diagram;
[0033] Figure 5 is a depth-wise separable convolutional graph;
[0034] Figure 6 To locate the branch diagram;
[0035] Figure 7 This is a diagram of the cross attention mechanism;
[0036] Figure 8 It is a dynamic weight generation mechanism. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present invention clearer and more accurate, the technical solution of the present invention is described in detail below through multiple specific implementation methods. The embodiments adopted by the present invention are only used to explain the present invention and are not used to limit the content of the present invention.
[0038] The present invention introduces a search strategy based on reinforcement learning to help optimize the model search and design process. By decoupling head design and multi-level knowledge distillation and other technologies, the complexity of the model is reduced while ensuring the model performance. The present invention provides a more optimized, more efficient, and more resource-saving deep learning model search, design and optimization technology to better solve the problems encountered in high-voltage transmission line monitoring.
[0039] A first aspect of the present invention relates to a high-voltage transmission line monitoring method using a miniaturized complex neural network, the method comprising steps 1 to 3.
[0040] Step 1: Set up skip connections in the convolutional neural network architecture and search for the optimal connection combination based on the reinforcement learning strategy.
[0041] The present invention is based on the backbone neural network construction method of neural architecture search MAE-NAS, and uses reinforcement learning search strategy to optimize the model. The neural architecture search NAS method defines the search space and selects the optimal model. Based on the search space of the UNet convolutional neural architecture design model, the best model is defined by itself.
[0042] For neural architecture search (NAS), a key factor is that the potential search space needs to be large and diverse enough to cover the optimal design. Therefore, the method adopts UNet, a typical convolutional neural architecture, as the basis for model search, because its skip connection mode between the encoder and decoder can provide sufficient model structure alternatives. In addition, the configuration of the upsampling module (such as kernel size, activation function) can also provide countless possibilities when combined. The method expands the search space of the model from two aspects, namely the upsampling module and the skip connection mode.
[0043] Setting up skip connections in the convolutional neural network architecture includes: using MAE-NAS to construct the backbone convolutional neural network, defining the skip connection matrix as A N×N , N is the number of upsampling and downsampling in the backbone convolutional neural network, and the skip connection matrix A N×N The value of all elements in is 0 or 1; when the element value a ij When it is 0, it indicates that there is no skip connection from the i-th downsampling to the j-th upsampling in the search network; when the element value a ij When it is 1, it indicates that there is a skip connection from the i-th downsampling to the j-th upsampling in the search network.
[0044] Figure 1 is a schematic diagram of the search space based on skip connections. Figure 1 As shown, assume that there are t levels of encoders and decoders, and denote them as e1, e2, …, e N and d1,d2,…,d N Consider different skip connection modes between the encoder and decoder. To represent each mode, define a skip connection matrix A∈{0,1} N×N , as a mask to determine whether there will be a new residual connection between the encoder and decoder. More specifically, a ij =1 means there is i to d j The skip connection, a ij =0 means there is no such skip connection.
[0045] Setting up skip connections in a convolutional neural network architecture includes: ij , the dimension of the output result of the i-th downsampling is adjusted by the connection scale factor, and the adjusted output result of the i-th downsampling is input into the j-th upsampling; the connection scale factor is:
[0046]
[0047] Where T(·) is the scale of the input feature map for downsampling or upsampling;
[0048] Based on the value of the connection scale factor, the output of the i-th downsampling is connected with the input of the j-th upsampling by using a quick connection upsampling or a quick downsampling.
[0049] Based on the value of the connection scale factor, the output of the i-th downsampling is connected with the input of the j-th upsampling by using quick connection upsampling or quick downsampling, including: the quick upsampling uses the nearest neighbor method to obtain the value of the supplementary position of the high-voltage transmission line monitoring characteristic map during the quick upsampling calculation process; or, when the connection scale factor meets When the connection scale factor meets the requirement, the 2-fold upsampling of n connections is used as the quick upsampling, where n is an arbitrary integer; When , 2 times downsampling of n connections is used as the quick downsampling.
[0050] Since the feature map sizes between different layers of the encoder and decoder may be different, for example, the output of a layer of the encoder is 136×136, and the input of a layer of the decoder is 200×200, the size of the feature map needs to be adjusted by the connection scale factor to match.
[0051] In the specific acquisition method, possible adjustment operations are first defined, such as through a series of upsampling operations, such as 2x bilinear interpolation, bicubic interpolation, nearest neighbor interpolation or downsampling operations, such as convolution with shared weights. The above adjustment operations are combined as needed to achieve matching of feature map sizes from the encoder layer to the decoder layer.
[0052] All possible scale factors are all possible combinations of operations that can achieve matching of the feature map sizes of the encoder layer and the decoder layer. For example, if you need to adjust 64×64 to 256×256, you can do it by upsampling 64→128→256 twice or other combinations. Each valid adjustment scheme corresponds to a specific connection scale factor. Each specific resizing scheme corresponds to a unique connection scale factor. These factors are defined as optional in the search space, and NAS will select the most appropriate scale factor during the search process to optimize network performance.
[0053] To construct the search process of the reinforcement learning agent, the upsampling operation is decomposed into five key components: shortcut upsampling, feature transformation, activation function, kernel size, and dilation rate, and a range of possible options are assigned to each component to provide choices for the search. When deciding on shortcut upsampling, choose from commonly used upsampling interpolation techniques such as bilinear interpolation, bicubic interpolation, and nearest neighbor interpolation. For feature transformation, choose from classic convolution techniques such as 2D convolution, separable convolution, and depthwise convolution. In terms of activation function, choose from ReLU, LeakyReLU, PReLU, etc. Provide more choices for kernel size and dilation rate, such as 1×1, 3×3, or 5×5 kernel size, and dilation rate of 1, 3, or 5. The combination of these flexible components can increase the diversity of upsampling modules.
[0054] The skip connection matrix A is obtained through the NAS search process. The reinforcement learning RL agent explores different skip connection patterns, i.e., different matrices A, in the search space to find the optimal network structure.
[0055] Searching for the optimal connection combination based on the reinforcement learning strategy, including: defining the action B of the reinforcement learning strategy tThe modification made by the agent to the backbone convolutional neural network at time step t; the modification includes adding skip connections, removing skip connections, adjusting the type of layer between standard convolution kernel depth-separable convolutions, adjusting the size of the convolution kernel in the layer, and adjusting the type of acquisition function in the layer.
[0056] Define a search strategy based on reinforcement learning. In each episode, the RL agent selects actions based on the current strategy in the state space, changes and optimizes the upsampling modules or connection patterns of the network architecture. The generated new structure is used for training and evaluated on the validation set. The performance of the model is fed back to the RL agent as a reward. Based on this feedback, the reinforcement learning method is used to optimize the RL agent's strategy. This is a continuous optimization process. When the search time reaches the preset limit or the strategy converges, the process ends and the optimal neural network structure is obtained.
[0057] At each search step, the agent chooses to add or remove a skip connection according to the current strategy, which is equivalent to adding the corresponding a in the matrix A. ij The generated new matrix A corresponds to a specific network structure, which is then trained and evaluated on the validation set. Based on the evaluation results, i.e. rewards, the agent’s strategy is updated to prefer skip connection patterns with better performance. NAS uses reinforcement learning agents to systematically explore and evaluate different skip connection combinations in the search space. ij Setting it to 1 leads to better model performance and thus determines the final skip connection configuration.
[0058] The NAS task is modeled as a Markov decision process (MDP), whose core elements include: State Space, ), ActionSpace, ), reward function (RewardFunction, R), strategy (Policy, π).
[0059] state Represents the configuration of the currently constructed UNet architecture at time step t. t ) includes the number of encoder and decoder layers, and the type of operation in each layer (such as convolution type, activation function, etc.).
[0060] Skip connection matrix A t ∈{0,1} N×N represents the skip connection matrix at time step t, where N is the maximum number of layers in UNet. The matrix element a i,jIndicates whether there is a jump connection from the i-th layer of the encoder to the j-th layer of the decoder.
[0061] S t ={L t ,A t}
[0062] in:
[0063] L t = {l 1,t ,l 2,t ,…,l k,t}, indicating the level information of the tth time step.
[0064] A t ∈{0,1} N×N , represents the skip connection matrix.
[0065] Action B t Represents the modification operations performed by the agent on the current UNet architecture at time step t. These operations include adding skip connections, that is, choosing to add skip connections from the encoder layer i to the decoder layer j, removing skip connections, that is, choosing to remove skip connections from the encoder layer i to the decoder layer j, and adjusting layer operations, such as changing the operation type of a specific layer, such as switching from standard convolution to depthwise separable convolution, or adjusting the parameters of a specific layer, such as kernel size, activation function type, etc. Action Space Defined as the set of all possible UNet architecture modification operations:
[0066]
[0067] Among them, each B i Corresponding to the above specific operations.
[0068] Searching for the optimal connection combination based on the reinforcement learning strategy includes: defining the reward function of the reinforcement learning strategy as the agent taking action B at time step t t After that, the generated new architecture G t+1 After that, the new architecture G t+1 Calculate the model objective function; the model objective function is:
[0069]
[0070] Where α, β and γ are the weights of model accuracy, inference time and total number of parameters respectively; mAP(G) is the average accuracy of architecture G, Inference Time(G) is the single image inference time of architecture G on specific hardware, Parameter Count(G) is the total number of parameters of architecture G, Baseline Time and Baseline Params are the baselines of inference time and total number of parameters respectively.
[0071] Reward R t is the action B taken by the agent at time step t t After that, the generated new architecture G t+1 The reward function comprehensively considers the detection accuracy and resource consumption of the model to guide the agent to search for an architecture with excellent performance and high efficiency.
[0072] As training progresses, the policy network is optimized through policy gradient methods (such as PolicyGradient), gradually learning which choices can bring higher rewards (i.e. better model performance). The initial stage may contain more exploratory choices (similar to random selection), but as the policy is optimized, the selection will tend to exploit known good choices. The generated structure must be within the predefined search space, that is, using the defined upsampling module and jump connection mode. All jump connections must ensure that the feature map size matches through the connection scale factor. The components of the upsampling module must be selected and configured in a predefined combination.
[0073] Figure 2 This is a schematic diagram of the overall network. Figure 2 As shown, when the e9 feature map is connected to the d8 feature map, a89=1, and the upsampled nearest neighbor difference is used to convert the 136x136 feature map into a 200x200 feature map.
[0074] The optimal connection sequence is searched based on the reinforcement learning strategy, including: defining the reinforcement learning strategy as the probability distribution of all actions selected by the agent under a given state S; using MLP to construct a policy network, and using the REINFORCE algorithm to train the policy network with the goal of maximizing the cumulative reward; using the trained policy network to output the probability distribution of the agent's selected actions under different states and the immediate R after selecting different actions t ; To accumulate instant R t The highest goal is to obtain the optimal connection sequence.
[0075] The policy π(B|S; θ) defines the probability distribution of the agent choosing action B given a state S. The policy is represented by a parameterized neural network (such as a multilayer perceptron, MLP) with parameters θ. Assume that the policy network is an MLP with the input being the state vector S and the output being the probability π(B|S; θ) of each action.
[0076] π(B|S; θ)=Softmax(f(S; θ))
[0077] Here, f(S;θ) is a linear transformation defined by a neural network.
[0078] The core idea of the REINFORCE algorithm is to sample actions and adjust the strategy based on the rewards obtained, so that high-reward actions are selected more frequently and low-reward actions are selected less frequently. t Next select Action B t The probability is π θ (B t |S t ), set the objective function to maximize the expected cumulative reward J(θ)
[0079]
[0080] Where: γ is a discount factor used to balance the importance of current rewards and future rewards, R t is the immediate reward obtained at time step (t), and T is the termination time step of the task.
[0081] In order to maximize J(θ), we need to calculate its gradient with respect to the parameter θ and use the gradient ascent method to update the parameter:
[0082]
[0083] Among them, α is the learning rate, which controls the step size of parameter update.
[0084] In each sampling process, the policy parameter θ is fixed until the trajectory sampling of the current batch is completed and the parameter is updated. At each time step t, the agent moves according to the current state S t and strategy π θ Select Action B t ,Right now:
[0085] B t ~π θ (·|S t )
[0086] Action B t It is sampled according to the probability distribution output by the policy network. Execute action B t After that, the environment returns to the next state St+1 and instant reward R t . Record the state, action, and reward to form a complete track:
[0087] τ=(S0,B0,R0,S1,B1,R1,…,S T )
[0088] where T is the terminal time step of the trajectory, e.g., reaching the goal or reaching the maximum number of steps.
[0089] Repeat the above process to generate M independent trajectories, each of which is based on the current fixed strategy π θ Generated.
[0090] The REINFORCE algorithm estimates the gradient by sampling multiple trajectories (i.e., multiple complete state-action sequences):
[0091]
[0092] in:
[0093] M is the number of trajectories sampled.
[0094] is the cumulative reward starting from time step t, defined as:
[0095]
[0096] Among them, the gradient part is the gradient of the policy log probability, reflecting the sensitivity of the policy parameter θ to the probability of action selection. Through this gradient, we can understand how to adjust the parameters to increase or decrease the probability of selecting a specific action. The cumulative reward G t It is the discounted sum of all future rewards starting from time step t, representing the total reward obtained after time step t. It acts as a weight to indicate the impact of the current action on future rewards. It indicates how to adjust the policy parameters according to the cumulative reward brought by the current action. t is very high, which means that the current action brings a high reward, and the corresponding gradient will promote the increase of the probability of the action. t If θ is very low or even negative, the gradient will push the probability of that action to decrease.
[0097] Implement the REINFORCE algorithm. First, according to the current strategy π θ Sample multiple trajectories from the environment, each trajectory consists of a series of states, actions, and rewards. The trajectory sampling process is usually completed through interaction with the environment, that is, at each time step t, according to the current state S t and strategy π θ Select Action Bt , then observe the next state S t+1 and reward R t . Secondly, calculate the cumulative reward G t , for each time step t calculate:
[0098] The cumulative reward (G t ),Right now:
[0099]
[0100] This cumulative reward reflects the total reward that the policy can bring when choosing actions after time step t.
[0101] The policy gradient is calculated using the gradient estimation formula. For each time step (t) in each trajectory, the gradient estimate is calculated:
[0102]
[0103] This step integrates the gradient information from all trajectories to obtain the overall adjustment direction of the policy parameters.
[0104] Update the policy parameters θ by using the gradient ascent method. Using the calculated gradient Update the parameters according to the following rules:
[0105]
[0106] Among them, α is the learning rate, which controls the step size of each update.
[0107] By continuously updating the policy function, the policy network gradually learns the strategy of selecting the optimal action under different states, thereby effectively searching for a high-performance and efficient UNet architecture suitable for abnormal object recognition tasks in high-voltage power transmission scenarios.
[0108] Step 2, construct a smart dual-branch decoupling head, the decoupling head includes a classification branch and a positioning branch, the classification branch is used to provide the difference characteristics between different types of information in the monitoring information of the high-voltage transmission line, the positioning branch is used to provide the monitoring situation characteristics in the monitoring information of the high-voltage transmission line, the decoupling head uses the cross-attention mechanism and the dynamic weight adjustment module to generate classification output and positioning output, the cross-attention mechanism performs attention calculations on the differences between different types of information to obtain difference attention results, performs attention calculations on the monitoring situation characteristics to obtain situation attention results, and performs cross operations on the difference attention results and the situation attention results.
[0109] Figure 3 The connection between IFTHead and the network body and its components is as follows: Figure 3As shown in the figure, after building the main body of the network, a decoupled head Intelligent Fusion TwoBranch Decoupled Head (IFTHead) is built for the network. IFTHead consists of two main branches: classification branch and positioning branch. In addition, the cross attention mechanism and dynamic weight adjustment module are integrated internally.
[0110] Figure 4 is a classification branch diagram. Figure 4 As shown in the figure, the classification branch receives the fused feature maps output by the fused feature extraction module from the main network. These fused feature maps integrate features at different levels in the main UNet to achieve the fusion of multi-scale information and provide rich semantic information and fine-grained feature representation. The classification branch uses deep separable convolution to effectively reduce the number of model parameters and computational complexity while maintaining efficient feature extraction capabilities. After being processed by the convolution layer, the features are input to the fully connected layer to generate category probability distribution, and finally output the probability prediction of the target category.
[0111] Figure 5 is a depth-wise separable convolutional graph. Figure 5 As shown in the figure, the classification branch receives the fusion feature map from the fusion feature extraction module, processes it through the depth-separable convolution layer and the fully connected layer, and outputs the classification result. The features of the classification branch then interact with the localization branch through the cross-attention mechanism to achieve information sharing and complementarity.
[0112] Figure 6 is the positioning branch diagram. Figure 6 As shown in the figure, the localization branch also receives the fused feature maps output by the fused feature extraction module of the main network. These feature maps contain multi-scale information and are suitable for accurate bounding box regression. The localization branch uses grouped convolution to improve computational efficiency and the expressiveness of the model while reducing the number of parameters. After being processed by the grouped convolution layer, the features are input to the regression layer to predict the four parameters of the bounding box (center coordinates \(x_c\), \(y_c\), width \(w\), height \(h\)), and finally output the coordinate prediction of the bounding box.
[0113] The localization branch receives the fused feature map from the fusion feature extraction module, processes it through the grouped convolution layer and the regression layer, and outputs the localization result. The features of the localization branch then interact with the classification branch through the cross-attention mechanism to achieve information sharing and complementarity.
[0114] Figure 7 is a diagram of the cross attention mechanism. Figure 7As shown in the figure, the cross attention mechanism introduces an attention mechanism between the classification branch and the localization branch, allowing the two branches to pay attention to each other's important features, thereby enhancing information sharing and complementarity. First, the feature maps of the classification branch and the localization branch are linearly transformed to generate query, key, and value vectors respectively. The attention weight is obtained by calculating the similarity between the query and the key and normalizing it using the Softmax function. The attention weight is applied to the value vector to generate a weighted feature representation. The classification and localization features are weightedly fused using the attention weights to generate a fused feature representation, and the feature representation is further optimized through residual connections and layer normalization.
[0115] When enhancing the classification features, a query vector (Q) is generated after linear transformation, which represents the important features that need to be paid attention to in the classification task. The feature map of the positioning branch is linearly transformed to generate a key vector (K) and a value vector (V), which represent the key feature information in the positioning task. By calculating the similarity between the query (Q) and the key (K), the attention weight matrix is generated using the dot product method and normalized by the Softmax function. These attention weights are used to perform weighted summation on the value (V) to generate a weighted feature representation. The weighted feature representation is re-weighted to the classification branch, strengthening the classification branch's attention to the important features of the positioning branch. At the same time, the positioning branch can also use its own features as Q and the features of the classification branch as K and V in a similar way to achieve two-way information interaction and feature enhancement.
[0116] Through the cross-attention mechanism, the classification branch and the localization branch can dynamically capture and strengthen each other's important features, improving the detection performance of the overall model. This mechanism effectively promotes the flow of information between the two branches, allowing the classification and localization tasks to be optimized collaboratively and support each other.
[0117] Figure 8 It is a dynamic weight generation mechanism. The dynamic weight adjustment module dynamically generates weight coefficients for classification and positioning tasks based on the input fused feature map to adaptively balance the loss function in multi-task learning and optimize the model training process. This module receives the fused feature map from the classification and positioning branches. Through the global average pooling layer, global feature extraction is performed on the fused feature map to generate a feature vector of fixed dimension. The feature vector is processed by several layers of fully connected layers (including ReLU activation function) to learn the high-level representation of the features. Two weight coefficients are output through a fully connected layer, corresponding to the classification loss weight w respectively. cls,i and the positioning loss weight w loc,i . Use the Sigmoid activation function to ensure that the generated weight coefficient is between (0,1).
[0118] The dynamic weight adjustment module uses a lightweight fully connected network to adaptively generate appropriate weight coefficients based on input features, ensuring that the classification and positioning tasks can obtain reasonable optimized weights during the training process. This mechanism improves the balance and robustness of the model in multi-task learning and avoids the problem of a certain task dominating the training process.
[0119] The fused classification and positioning feature maps are passed through the dynamic weight adjustment module to calculate the dynamic weights of classification and positioning losses. These weights are used to balance the loss functions of classification and positioning during training to achieve adaptive optimization.
[0120] The output layer is responsible for integrating the outputs of the classification branch and the localization branch to generate the final detection result. When calculating the head loss, the weight coefficient generated by the dynamic weight adjustment module is used to weight the classification loss and the localization loss, and the formula is:
[0121]
[0122] in:
[0123] B is the batch size.
[0124] w cls,i and w loc,i are the classification and positioning weight coefficients of the i-th sample respectively.
[0125] l cls,i is the classification loss of the i-th sample, and the cross entropy loss function is used to measure the difference between the predicted distribution and the true distribution.
[0126] l loc,i For the positioning loss of the i-th sample, a smooth L1 loss (SmoothL1Loss) is used, which combines the advantages of L1 loss and L2 loss. L2 loss is used for small errors and L1 loss is used for large errors, thereby reducing sensitivity to outliers.
[0127] Loss function details:
[0128]
[0129] in:
[0130] C is the number of categories.
[0131] y i,c is the true label of sample i corresponding to category c, usually a hot single encoding.
[0132] p i,c is the probability that the model predicts that sample i belongs to category c.
[0133] The positioning loss function uses smooth L1 loss, which combines the advantages of L1 loss and L2 loss. c ,y c , the difference z between the predicted value and the true value of width w and height h i Calculate the loss:
[0134]
[0135] In target detection, four parameters are usually used to represent a bounding box, namely the x coordinate x of the center of the bounding box c , the y coordinate of the center of the bounding box c , the width of the bounding box, the height of the bounding box.
[0136] Therefore, for each predicted bounding box and the corresponding ground-truth bounding box, the difference between these four parameters is calculated and a smooth L1 loss is applied. Finally, the losses of the four parameters are aggregated, usually by averaging or summing.
[0137]
[0138] The differences are calculated for each bounding box’s four parameters separately and a smooth L1 loss is applied. Finally, the losses of the four parameters are averaged or summed to obtain the total localization loss.
[0139] By dividing the classification loss and localization loss by the dynamic weight coefficient w cls,i and w loc,i By weighting, IFTHead achieves adaptive balanced optimization of multi-task losses during training. This design not only improves the synergy of classification and localization tasks, but also enhances the overall detection performance and robustness of the model.
[0140] The decoupling head realizes efficient coordination and optimization of classification and localization tasks. It uses multi-layer feature fusion in the UNet main body to generate rich semantic and fine-grained features, provide high-quality input for classification and localization branches, handle classification and localization tasks respectively, realize efficient feature extraction and regression through deep separable convolution and grouped convolution, allow classification branch and localization branch to pay attention to each other's important features, enhance information sharing and complementarity, and thus improve the overall detection performance. It dynamically generates weight coefficients of classification and localization loss according to the fused features, realizes adaptive balance optimization of multi-task loss, improves the training effect and generalization ability of the model, integrates classification and localization outputs, generates the final detection result through weighted fusion, and applies dynamic weight adjustment in loss calculation to realize adaptive multi-task learning. Through the above design, the intelligent dual-branch decoupling head IFTHead not only realizes efficient coordination of classification and localization tasks, but also significantly improves the overall performance and robustness of the model through dynamic weight adjustment and cross-attention mechanism, and is suitable for a variety of complex target detection scenarios.
[0141] Step 3, coupling the classification output and the positioning output into the backbone network, thereby obtaining the monitoring situation results of the high-voltage transmission line through the backbone network marking. The monitoring situation results include the classification and alarm of the current high-voltage transmission line situation using a variety of typical situations and risk warning rules of the high-voltage transmission line.
[0142] The backbone neural network is constructed using the Neural Architecture Search (NAS) method. NAS can automatically design an efficient and sophisticated neural network structure, fully tap the potential of the search space, and achieve a better model structure through exploration and search in complex environments. The classification and localization branches share information through cross-attention modules to enhance the complementarity of feature expression. A lightweight network is used to dynamically adjust the weights of classification and localization losses to achieve adaptive loss balance and improve the generalization ability of the model. Through technologies such as deep separable convolution and group convolution, the model parameters and computational complexity are reduced to ensure the efficiency of real-time detection.
[0143] The second aspect of the present invention relates to a high-voltage transmission line monitoring system with a miniaturized complex neural network, which is implemented using a high-voltage transmission line monitoring method with a miniaturized complex neural network described in the first aspect of the present invention; the system includes a search module, a decoupling module and a monitoring module; the search module is used to set jump connections in a convolutional neural network architecture and search for an optimal connection combination based on a reinforcement learning strategy; the decoupling module is used to construct an intelligent dual-branch decoupling head, the decoupling head includes a classification branch and a positioning branch, the classification branch is used to provide difference features between different types of information in the monitoring information of the high-voltage transmission line, and the positioning branch is used to provide monitoring information in the high-voltage transmission line. The decoupling head generates classification output and positioning output by using a cross-attention mechanism and a dynamic weight adjustment module. The cross-attention mechanism performs attention calculation on the differences between different types of information to obtain difference attention results, performs attention calculation on the monitoring situation characteristics to obtain situation attention results, and performs cross operations on the difference attention results and the situation attention results. The monitoring module is used to couple the classification output and the positioning output into the backbone network, thereby obtaining the monitoring situation results of the high-voltage transmission line through the backbone network marking. The monitoring situation results include the classification and alarm of the current high-voltage transmission line situation using a variety of typical situations and risk warning rules of the high-voltage transmission line.
[0144] A third aspect of the present invention relates to a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method described in the first aspect of the present invention.
[0145] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect of the present invention.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention is described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solutions of the present invention still include contents that can modify or replace the specific embodiments of the present invention. Any modification or replacement that does not depart from the spirit and scope of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A method for monitoring high-voltage transmission lines using a miniaturized complex neural network, characterized in that: The method comprises the following steps: Set up skip connections in the convolutional neural network architecture and search for the optimal connection combination based on reinforcement learning strategy; Construct a Zhirong dual-branch decoupling head, the decoupling head includes a classification branch and a positioning branch, the classification branch is used to provide the difference characteristics between different types of information in the monitoring information of the high-voltage transmission line, the positioning branch is used to provide the monitoring situation characteristics in the monitoring information of the high-voltage transmission line, the decoupling head uses the cross-attention mechanism and the dynamic weight adjustment module to generate classification output and positioning output, the cross-attention mechanism performs attention calculation on the difference between different types of information to obtain the difference attention result, performs attention calculation on the monitoring situation characteristics to obtain the situation attention result, and performs cross-operation on the difference attention result and the situation attention result; The classification output and positioning output are coupled and input into the backbone network, so as to obtain the monitoring situation results of the high-voltage transmission line through the backbone network marking. The monitoring situation results include the classification and alarm of the current high-voltage transmission line situation using a variety of typical situations and risk alarm rules of the high-voltage transmission line.
2. The high-voltage transmission line monitoring method of a complex neural network miniaturization according to claim 1 is characterized by: The step of setting a skip connection in a convolutional neural network architecture includes: MAE-NAS is used to construct the backbone convolutional neural network, and the skip connection matrix is defined as A N×N , N is the number of upsampling and downsampling in the backbone convolutional neural network, and the skip connection matrix A N×n The value of all elements in is 0 or 1; When the element value a ij When it is 0, it indicates that the jump connection from the i-th downsampling to the j-th upsampling in the search network does not exist; When the element value a ij When it is 1, it indicates that there is a skip connection from the i-th downsampling to the j-th upsampling in the search network.
3. The high-voltage transmission line monitoring method of a complex neural network miniaturization according to claim 2 is characterized by: The step of setting a skip connection in a convolutional neural network architecture includes: For skip connection a ij , adjust the dimension of the output result of the i-th downsampling by the connection scale factor, and input the adjusted output result of the i-th downsampling into the j-th upsampling; The connection scale factor is: Where T(·) is the scale of the input feature map for downsampling or upsampling; Based on the value of the connection scale factor, the output of the i-th downsampling is connected with the input of the j-th upsampling by using a quick connection upsampling or a quick downsampling.
4. The high-voltage transmission line monitoring method of a complex neural network miniaturization according to claim 3 is characterized by: The method of connecting the output of the i-th downsampling with the input of the j-th upsampling by using a quick connection upsampling or a quick downsampling based on the value of the connection scale factor includes: The quick upsampling adopts the nearest neighbor method to obtain the value of the supplementary position of the high-voltage transmission line monitoring characteristic map during the quick upsampling calculation process; or, When the connection scale factor meets When , n connections are connected with 2 times upsampling as the quick upsampling, where n is an arbitrary integer; When the connection scale factor meets When , 2 times downsampling of n connections is used as the quick downsampling.
5. The method for monitoring high-voltage power transmission lines using a miniaturized complex neural network according to claim 4, characterized in that: The search for the optimal connection combination based on the reinforcement learning strategy includes: Define the action B of the reinforcement learning policy t is the modification made by the agent to the backbone convolutional neural network at time step t; The modifications include adding skip connections, removing skip connections, adjusting the type of layers between standard convolution kernel depth-separable convolutions, adjusting the size of convolution kernels in layers, and adjusting the type of acquisition functions in layers.
6. The high-voltage transmission line monitoring method of a complex neural network miniaturization according to claim 5 is characterized by: The search for the optimal connection combination based on the reinforcement learning strategy includes: Define the reward function of the reinforcement learning policy as the agent taking action B at time step t t After that, the generated new architecture G t+1 After that, the new architecture G t+1 Calculate the model objective function; The objective function of the model is: In the formula, α, β, and γ are the weights of model accuracy, inference time, and total number of parameters, respectively; mAP(G) is the average precision of architecture G, Inference Time (G) is the inference time of a single image of architecture G on a specific hardware. Parameter Count(G) is the total number of parameters of architecture G. Baseline Time and Baseline Params are the baseline quantities for inference time and total number of parameters, respectively.
7. The high-voltage transmission line monitoring method of claim 6, characterized in that: The method of searching for the optimal connection sequence based on the reinforcement learning strategy includes: Define the reinforcement learning policy as the probability distribution of all actions chosen by the agent in a given state S; Use MLP to construct a policy network, and use the REINFORCE algorithm to train the policy network with the goal of maximizing the cumulative reward; The trained policy network is used to output the probability distribution of the agent's selected actions under different states and the immediate R after selecting different actions. t ; To accumulate instant R t The highest goal is to obtain the optimal connection sequence, and based on the optimal connection sequence, the optimal backbone network searched by the reinforcement learning strategy is obtained.
8. A high-voltage transmission line monitoring system with a miniaturized complex neural network, characterized in that: A high-voltage transmission line monitoring method using a miniaturized complex neural network as described in any one of claims 1 to 7 is implemented; The system includes a search module, a decoupling module and a monitoring module; The search module is used to set skip connections in the convolutional neural network architecture and search for the optimal connection combination based on the reinforcement learning strategy; The decoupling module is used to construct a smart dual-branch decoupling head, the decoupling head includes a classification branch and a positioning branch, the classification branch is used to provide difference characteristics between different types of information in the monitoring information of the high-voltage transmission line, the positioning branch is used to provide monitoring situation characteristics in the monitoring information of the high-voltage transmission line, the decoupling head uses a cross-attention mechanism and a dynamic weight adjustment module to generate classification output and positioning output, the cross-attention mechanism performs attention calculation on the difference between different types of information to obtain a difference attention result, performs attention calculation on the monitoring situation characteristics to obtain a situation attention result, and performs cross operations on the difference attention result and the situation attention result; The monitoring module is used to couple the classification output and the positioning output into the backbone network, so as to obtain the monitoring situation results of the high-voltage transmission line through the backbone network marking. The monitoring situation results include the classification and alarm of the current high-voltage transmission line situation using multiple typical situations and risk warning rules of the high-voltage transmission line.
9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Neural network architecture search method, neural network application method, equipment and storage medium
CN111814966A
Defect detection method based on generative adversarial network and attention
CN114943694A
Multi-attention fused high-resolution remote sensing image road extraction method
CN115439751A
Convolution and self-attention fused multi-target neural architecture search method
CN116258165A
Monocular depth prediction algorithm based on multi-scale progressive interaction and aggregation cross attention features
CN116485860A