Power communication network fault prediction method, device, equipment and storage medium
Through the combination of the improved MobileNet network and the bidirectional GRU network, the multi-scale features of the power communication network are extracted and fault prediction is performed, which solves the problem of high model complexity in the existing methods, achieves efficient fault prediction and reduces costs.
Patent Information
- Application Number
- CN202311257799.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2043-09-26
AI Technical Summary
The existing power communication network fault prediction method has high complexity, resulting in increased demand for computing resources and storage space and high deployment and operation costs.
The improved MobileNet network is used to extract multi-scale features from power communication network data, and these features are input into the bidirectional GRU network for fault prediction. In the improved MobileNet network, each channel contains multiple convolution kernels of different scales, and the parameters of the bidirectional GRU network are determined based on the Sand Cat Swarm Algorithm.
While ensuring the accuracy of fault prediction results, it reduces model complexity, saves computing resources and storage space, and reduces deployment and operation costs.
Smart Images

Figure CN117540187B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power fault prediction, and in particular to a method, device, equipment and storage medium for predicting power communication network faults. Background Art
[0002] At present, the common fault prediction methods for power communication networks include those based on machine learning, statistical analysis, physical models, and data mining. The machine learning-based method analyzes historical data and features, establishes a prediction model, and analyzes fault classification and prediction. It uses methods such as support vector machines, random forests, and neural networks. Its characteristics are that it can process large-scale data and has a certain degree of prediction accuracy and real-time performance.
[0003] Existing network fault prediction methods based on machine learning pursue improved accuracy, which leads to higher model complexity, requires larger computing resources and storage space, and increases the cost of deployment and operation. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a method, device, equipment and storage medium for predicting faults in a power communication network.
[0005] In a first aspect, the present invention provides a method for predicting faults in a power communication network, comprising:
[0006] Based on the improved MobileNet network, features for fault prediction are extracted from the preprocessed data of the current power communication network.
[0007] Inputting the features for fault prediction into a bidirectional GRU network to predict the fault condition of the power communication network at the next moment after the current moment;
[0008] Among them, each channel in any convolutional layer of the improved MobileNet network includes multiple convolution kernels of different scales, the parameters of the bidirectional GRU network are determined based on the sand cat swarm algorithm, the improved MobileNet network is trained based on the historical data of the power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and the historical fault conditions of the power communication network.
[0009] Optionally, the training method of the improved MobileNet network includes:
[0010] In any training, based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel, determining the convolution kernel activity value of any channel;
[0011] When the first ratio of any convolutional layer is less than the convolution kernel activation ratio of any convolutional layer, the number of convolution kernels activated in the first channel is increased, and the first channel is the channel with the highest convolution kernel activity value in any convolutional layer;
[0012] When the first ratio of any convolutional layer is greater than the convolution kernel activation ratio of any convolutional layer, reducing the number of convolution kernels activated in the second channel, where the second channel is a channel in which the number of activated convolution kernels in any convolutional layer is greater than 1 and the convolution kernel activity value is the lowest;
[0013] When the first ratio of each convolutional layer of the improved MobileNet network is equal to the convolution kernel activation ratio of each convolutional layer, completing the training of the improved MobileNet network;
[0014] The first ratio is the ratio between the number of convolution kernels activated by all channels and the total number of convolution kernels of all channels.
[0015] Optionally, determining the convolution kernel activity value of any channel based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel includes:
[0016] The convolution kernel activity value of any channel is determined based on the following formula:
[0017]
[0018] Among them, activity(k) represents the convolution kernel activity value of any channel, n k Represents the number of convolution kernels activated by any channel, V i represents the one-dimensional vector obtained by flattening the feature matrix of the i-th convolution kernel of any channel, and ||||2 represents the L2 norm operation.
[0019] Optionally, the convolution kernel activation ratio of any convolution layer is determined based on the total number of convolution kernels of each channel in any convolution layer.
[0020] Optionally, the convolution kernel activation ratio of any convolutional layer is determined based on the following formula:
[0021] α=ω[σ(W*N+b)+λR(W)]+β
[0022] Wherein, α represents the convolution kernel activation ratio of any convolution layer, the sum of the values of ω and β is 1, the value of β is the reciprocal of the total number of convolution kernels for each channel in any convolution layer, σ(·) represents the sigmoid activation function, λ represents the regularization parameter, R(·) represents the L2 regularization term, W represents the learnable weight matrix, b represents the learnable bias vector, and N represents the total number of convolution kernels for each channel in any convolution layer.
[0023] Optionally, the method for determining the parameters of the bidirectional GRU network includes:
[0024] Determine an adaptive weighting factor corresponding to a current iteration of the sand cat swarm algorithm based on a maximum number of iterations of the sand cat swarm algorithm and a current number of iterations of the sand cat swarm algorithm;
[0025] The search process of the sand cat swarm algorithm is improved based on the adaptive weighting factor, and the learning rate, number of hidden layers, batch size and number of layer neurons of the bidirectional GRU network are determined based on the improved sand cat swarm algorithm.
[0026] Optionally, determining an adaptive weighting factor corresponding to a current iteration of the sand cat swarm algorithm based on a maximum number of iterations of the sand cat swarm algorithm and a current number of iterations of the sand cat swarm algorithm comprises:
[0027] The adaptive weighting factor is determined based on the following formula:
[0028]
[0029] Wherein, μ represents the adaptive weighting factor corresponding to the current iteration of the Sand Cat Swarm Algorithm, t represents the current iteration number of the Sand Cat Swarm Algorithm, T max Represents the maximum number of iterations of the Sand Cat Swarm Algorithm.
[0030] In a second aspect, the present invention further provides a power communication network fault prediction device, comprising:
[0031] An extraction module, used for extracting features for fault prediction from preprocessed data of the power communication network at the current moment based on an improved MobileNet network;
[0032] A prediction module, used for inputting the features for fault prediction into a bidirectional GRU network to predict the fault condition of the power communication network at the next moment after the current moment;
[0033] Among them, each channel in any convolutional layer of the improved MobileNet network includes multiple convolution kernels of different scales, the parameters of the bidirectional GRU network are determined based on the sand cat swarm algorithm, the improved MobileNet network is trained based on the historical data of the power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and the historical fault conditions of the power communication network.
[0034] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for predicting faults in the electric power communication network as described in the first aspect above is implemented.
[0035] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the power communication network fault prediction method as described in the first aspect above.
[0036] The power communication network fault prediction method, device, equipment and storage medium provided by the present invention extract multi-scale features for fault prediction from the data of the power communication network through an improved MobileNet network, and then input the multi-scale features into a bidirectional GRU network to predict the fault conditions of the power communication network. While ensuring the accuracy of the fault prediction results, the complexity of the model is reduced and the deployment and operation costs are saved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 It is a flow chart of the method for predicting faults in a power communication network provided by the present invention;
[0039] Figure 2 is a flowchart of a method for predicting faults in a power communication network provided by the present invention;
[0040] Figure 3 This is a diagram showing an example of the structure of a Mobile network provided by the present invention;
[0041] Figure 4 It is a structural schematic diagram of the power communication network fault prediction device provided by the present invention;
[0042] Figure 5It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] In order to more clearly understand the technical solutions of the embodiments of the present invention, some technical contents related to the present invention are first introduced.
[0045] With the continuous construction and development of the power communication network, the network scale is getting larger and larger, the number of core power communication services will continue to increase, and the power communication network system will become more complex. As the country increases its efforts to build a wide-area smart grid, more power system services need to be transmitted through the power communication network, the power system's dependence on the communication network increases, and the impact of communication network failures on the power system becomes more serious. Therefore, the research on fault prediction for the power communication network has received more and more attention. Digital twin is a technology that interacts with the actual system in real time through a digital model, which can simulate, monitor and optimize the system in a virtual environment. It is based on data collection, modeling and analysis of the actual system, and can reflect the operating status, performance and health of the system in real time. At present, my country's power grid is in a period of rapid development, especially in recent years, the power grid is vigorously developing ultra-high voltage power grids. The ultra-high voltage power grid has long lines and a wide control range. The rapid development of the power grid has brought huge challenges to the support and guarantee capabilities of the power communication network. By collecting real-time data from the power communication network, establishing a digital twin model, and combining machine learning and artificial intelligence algorithms, potential faults in the power communication network can be predicted, and fault diagnosis, optimization and prevention measures can be provided. This combination of power communication network and digital twin technology can help operation and maintenance personnel detect and resolve faults in a timely manner, improve the reliability, stability and efficiency of the power communication network, and ensure the normal operation of the power system.
[0046] At present, the common fault prediction methods of power communication network are based on machine learning, statistical analysis, physical model and data mining. The method based on machine learning analyzes historical data and features, establishes prediction models and analyzes fault classification and prediction. It uses methods such as support vector machine, random forest and neural network. Its characteristics are that it can process large-scale data and has certain prediction accuracy and real-time performance. The method based on statistical analysis uses statistical methods to infer possible future faults, including failure rate model, failure trend analysis and time series prediction. Its characteristics are simple and easy to implement, low data requirements, but limited prediction effect on complex fault modes. The method based on physical model uses physical modeling and simulation technology, combined with the topological structure, circuit parameters and load characteristics of the power communication network, to model and simulate faults. The method based on data mining mines and analyzes the big data of the power communication network to discover the hidden patterns and association rules, thereby predicting potential faults, including cluster analysis, association rule mining and anomaly detection.
[0047] Most of the current network fault prediction methods are pursuing improved accuracy, which leads to higher model complexity, requires larger computing resources and storage space, and increases the cost of deployment and operation.
[0048] In order to balance the complexity and accuracy of the model, while ensuring the accuracy of the model, make the model occupy as few resources as possible, and further improve the prediction performance of the model, the present invention proposes a power communication network fault prediction method, which can help power communication network operation and maintenance personnel predict faults in advance, so as to take corresponding measures to reduce the risk of faults and improve the reliability and stability of the power communication network.
[0049] Figure 1 The present invention provides a flow chart of a method for predicting a fault in a power communication network. As shown in the figure, the method comprises the following steps:
[0050] Step 100: Based on the improved MobileNet network, extract features for fault prediction from the preprocessed data of the power communication network at the current moment.
[0051] Step 101: Input the features used for fault prediction into a bidirectional GRU network to predict the fault condition of the power communication network at the next moment from the current moment.
[0052] Among them, each channel in any convolutional layer of the improved MobileNet network includes multiple convolution kernels of different scales, the parameters of the bidirectional GRU network are determined based on the Sand Cat Swarm Algorithm, the improved MobileNet network is trained based on the historical data of the electric power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and the historical fault conditions of the electric power communication network.
[0053] Specifically, before using the improved MobileNet network to extract features for fault prediction, the power communication network data that needs to be extracted can be preprocessed. Preprocessing the power communication network data can include data cleaning, denoising, and normalization. The features used for fault prediction can be the power supply status and operating status of the core equipment in the power communication network, as well as the topological data and performance indicator data (such as bandwidth, latency, packet loss rate, throughput, etc.) of the network nodes in the power communication network.
[0054] In the improved MobileNet network provided by the present invention, each channel of any convolution layer includes multiple convolution kernels of different scales, which can extract multi-scale power communication network features. When performing feature extraction, the data of the power communication network can first be expanded using a 1×1 convolution kernel, and then feature extraction can be performed using a multi-scale convolution kernel, and finally a 1×1 convolution kernel can be used to compress the channel to form an inverted residual structure. The activation function used by the multi-scale convolution kernel can be a ReLU6 activation function, and the last layer of the network can use a linear bottleneck activation function.
[0055] After using the improved MobileNet network to extract features for fault prediction, these features can be input into the bidirectional GRU network to predict the fault condition of the power communication network at the next moment from the current moment.
[0056] The parameters of the bidirectional GRU network provided by the present invention are determined based on the sand cat swarm algorithm, and more accurate prediction results can be obtained.
[0057] The improved MobileNet network is trained based on historical data of the electric power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and historical fault conditions of the electric power communication network.
[0058] The power communication network fault prediction method provided by the present invention extracts multi-scale features for fault prediction from the data of the power communication network through an improved MobileNet network, and then inputs the multi-scale features into a bidirectional GRU network to predict the fault conditions of the power communication network. While ensuring the accuracy of the fault prediction results, it reduces the complexity of the model and saves the cost of deployment and operation.
[0059] Optionally, the improved MobileNet network training method includes:
[0060] In any training, the convolution kernel activity value of any channel is determined based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel;
[0061] When the first ratio of any convolutional layer is less than the convolution kernel activation ratio of any convolutional layer, increase the number of convolution kernels activated in the first channel, where the first channel is the channel with the highest convolution kernel activity value in any convolutional layer;
[0062] When the first ratio of any convolutional layer is greater than the convolution kernel activation ratio of any convolutional layer, the number of convolution kernels activated in the second channel is reduced, and the second channel is the channel in which the number of activated convolution kernels in any convolutional layer is greater than 1 and the convolution kernel activity value is the lowest;
[0063] When the first ratio of each convolutional layer of the improved MobileNet network is equal to the convolution kernel activation ratio of each convolutional layer, the training of the improved MobileNet network is completed;
[0064] The first ratio is the ratio between the number of convolution kernels activated by all channels and the total number of convolution kernels of all channels.
[0065] Specifically, when training the improved MobileNet network, in any training, the convolution kernel activity value of any channel can be determined based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel. In the first training, the first convolution kernel is activated in each channel.
[0066] Optionally, determining the convolution kernel activity value of any channel based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel may include:
[0067] The convolution kernel activity value of any channel is determined based on the following formula:
[0068]
[0069] Among them, activity(k) represents the convolution kernel activity value of any channel, n k Represents the number of convolution kernels activated in any channel, V i It represents the one-dimensional vector obtained by flattening the feature matrix of the i-th convolution kernel of any channel, and ||||2 represents the L2 norm operation.
[0070] The convolution kernel activity value of a channel can measure the activity of the convolution kernel in the channel, that is, the importance of the convolution kernel in the feature extraction process and the contribution to the output features. The larger the convolution kernel activity value of a channel, the greater the importance and contribution of the channel to feature extraction.
[0071] After determining the convolution kernel activity values of all channels in a convolution layer, the activated convolution kernels in the convolution layer can be adjusted according to the number of convolution kernels activated in the convolution layer, the total number of convolution kernels in the convolution layer, and the convolution kernel activation ratio of the convolution layer.
[0072] Optionally, the convolution kernel activation ratio of any convolution layer is determined based on the total number of convolution kernels of each channel in any convolution layer.
[0073] Optionally, the convolution kernel activation ratio of any convolution layer can be determined based on the following formula:
[0074] α=ω[σ(W*N+b)+λR(w)]+β
[0075] Among them, α represents the activation ratio of the convolution kernel of any convolution layer, the sum of ω and β is 1, β is the inverse of the total number of convolution kernels of each channel in any convolution layer, σ(·) represents the sigmoid activation function, λ represents the regularization parameter, R(·) represents the L2 regularization term, W represents the learnable weight matrix, b represents the learnable bias vector, and N is the total number of convolution kernels of each channel in any convolution layer. Xavier initialization can be used to initialize W and b to reduce the size of the gradient.
[0076] The ratio of the number of convolution kernels activated by all channels in a convolution layer to the total number of convolution kernels of all channels can be used as the first ratio of the convolution layer.
[0077] In one implementation, in a certain training, when the first ratio of a certain convolution layer is less than the convolution kernel activation ratio of the convolution layer, the number of convolution kernels activated in the first channel can be increased, and the first channel is the channel with the highest convolution kernel activity value in the layer. For example, the number of convolution kernels activated in the first channel can be increased by 1.
[0078] In one implementation, in a certain training, when the first ratio of a certain convolution layer is greater than the convolution kernel activation ratio of the convolution layer, the number of convolution kernels activated in the second channel can be reduced, where the second channel is a channel in the convolution layer in which the number of activated convolution kernels is greater than 1 and the convolution kernel activity value is the lowest. For example, the number of convolution kernels activated in the first channel can be reduced by 1.
[0079] When, in a certain training, the first ratio of each convolutional layer of the improved MobileNet network is equal to the convolution kernel activation ratio of the convolutional layer, the training of the improved MobileNet network can be completed.
[0080] Optionally, the method for determining the parameters of the bidirectional GRU network includes:
[0081] Determine an adaptive weighting factor corresponding to a current iteration of the sand cat swarm algorithm based on a maximum number of iterations of the sand cat swarm algorithm and a current number of iterations of the sand cat swarm algorithm;
[0082] The search process of the Sand Cat Swarm Algorithm is improved based on the adaptive weighting factor, and the learning rate, number of hidden layers, batch size and number of layer neurons of the bidirectional GRU network are determined based on the improved Sand Cat Swarm Algorithm.
[0083] Specifically, when determining the parameters of the bidirectional GRU network according to the Sand Cat Swarm Algorithm, the adaptive weighting factor corresponding to the current iteration of the Sand Cat Swarm Algorithm can be determined according to the maximum number of iterations of the Sand Cat Swarm Algorithm and the current number of iterations of the Sand Cat Swarm Algorithm, and the search process of the current iteration is improved according to the adaptive weighting factor corresponding to the current iteration of the Sand Cat Swarm Algorithm, so that the Sand Cat Swarm Algorithm focuses more on global search in the early stage and more on local search in the later stage.
[0084] Optionally, determining an adaptive weighting factor corresponding to a current iteration of the Sand Cat Swarm Algorithm based on a maximum number of iterations of the Sand Cat Swarm Algorithm and a current number of iterations of the Sand Cat Swarm Algorithm may include:
[0085] The adaptive weighting factor is determined based on the following formula:
[0086]
[0087] Where μ represents the adaptive weighting factor corresponding to the current iteration of the Sand Cat Swarm Algorithm, t represents the current iteration number of the Sand Cat Swarm Algorithm, and T max Indicates the maximum number of iterations of the Sand Cat Swarm Algorithm.
[0088] After improving the search process of the current iteration according to the adaptive weighting factor corresponding to the current iteration of the sand cat swarm algorithm, the position of the sand cat next time can be updated according to the following formula:
[0089]
[0090] in, Indicates the next location of the sand cat, represents the sensitivity range of the sand cat, rand(0,1) represents taking a random number in the interval (0,1), represents the optimal solution, Indicates the current location.
[0091] After improving the search process of the Sand Cat Swarm Algorithm using adaptive weighting factors, the learning rate, number of hidden layers, batch size, and number of layer neurons of the bidirectional GRU network can be determined according to the improved Sand Cat Swarm Algorithm, thereby obtaining more accurate prediction results.
[0092] The method provided by the present invention is illustrated below by using specific application scenarios.
[0093] The present invention designs a digital twin power communication network fault prediction method based on MobileNet-BiGRU. First, the power communication network data is input into the MobileNet network for feature extraction, and the network structure is improved using a multi-scale method; secondly, the channel depth optimization hyperparameter is designed to adjust the number of channel convolution kernels, adjust the accuracy and complexity of the model; finally, the bidirectional GRU network is used to fit the time series information of the power communication network fault characteristics, and the improved sand cat swarm algorithm is used to optimize the parameters, and finally the task of power communication network fault prediction is completed.
[0094] The feature extraction method of the power communication network based on the MobileNet network aims to balance the complexity and accuracy of the model, and try to make the model occupy less resources while ensuring the accuracy of the model. Secondly, the use of bidirectional GRU uses an optimization search algorithm to optimize parameters during fault prediction, which can further improve the prediction performance of the model. Therefore, the present invention uses a fault prediction method for the power communication network based on MobileNet and BiGRU, which can effectively balance the complexity and accuracy of the MobileNet network by deeply optimizing hyperparameters and improve the performance of fault prediction. And the improved sand cat group algorithm is used to optimize the parameters of the bidirectional GRU, and the use of optimized parameters in actual training can achieve better prediction results. In practical applications, the model can help the operation and maintenance personnel of the power communication network predict faults in advance, so as to take corresponding measures to reduce the risk of faults and improve the reliability and stability of the power communication network.
[0095] Figure 2 FIG. 1 is a flow chart of an example of a method for predicting faults in a power communication network provided by the present invention. Figure 2 As shown, the method comprises the following steps:
[0096] Step 200: input the preprocessed power communication network data into the MobileNet V2 network, and use a multi-scale method to improve the network structure and enhance the feature extraction capability.
[0097] Step 210: Use MobileNet V2 to extract features from the collected and processed data, design channel depth optimization hyperparameters, and adaptively adjust the number of convolution kernels in each channel.
[0098] Step 220: Use a bidirectional GRU network to fit the time series information of the fault characteristics, and use the improved sand cat swarm algorithm with adaptive weighting factors to optimize the parameters to complete the fault prediction of the power communication network.
[0099] Wherein, step 200 specifically includes:
[0100] Step 201: pre-process the operating status and operating conditions of the power communication network equipment, the performance indicators and topology of the network nodes, and input them into the improved MobileNet V2 neural network to build a fault prediction feature extraction network adapted to the power communication network.
[0101] Figure 3 The structure example diagram of the Mobile network provided by the present invention is as follows: Figure 3 As shown in the figure, first, 1×1 convolution is used to expand the channel. Considering that the characteristics of the power communication network usually contain local details and overall trends, the original network is improved and multi-scale convolution kernels are used for feature extraction. Each channel is initially set with four different scales of 3×3, 5×5, 7×7, and 3×3 depth-separable convolution kernels to extract features. Finally, 1×1 convolution is used to compress the channel to form an inverted residual structure. ReLU6 is used as the activation function, and the last layer uses a linear bottleneck activation function to better retain feature information.
[0102] Step 202: In order to measure the activity of the convolution kernel of each channel in the channel, that is, to measure the importance of the convolution kernel of the channel in the feature extraction process and the degree of contribution to the output features, the convolution kernel activity value is designed in the present invention to quantify it. The larger the value of the activity value, the stronger the activity of the convolution kernel of the channel, and the greater the contribution to feature extraction and representation. The convolution kernel activity value activity(k) of the kth channel is calculated using the following formula:
[0103]
[0104] Among them, n k is the number of convolution kernels activated for the kth channel, V i It is a one-dimensional vector formed by tiling the feature matrix of the i-th convolution kernel of the k-th channel, and ||||2 represents the L2 norm operation.
[0105] Step 210 specifically includes:
[0106] Step 211: In order to find a balance between network complexity and accuracy, the present invention improves on the original MobileNet V2 model and designs a channel depth optimization hyperparameter α to adjust the size of the model. α represents the ratio of the number of convolution kernels activated in each layer. For multiple convolution kernels in each channel, only the first convolution kernel is activated in the initial state, and the other convolution kernels are set to an inactive state and do not participate in the operation.
[0107] After each training, the activity value of the convolution kernel activated for each channel is calculated, and each layer only activates additional convolution kernels for the channel with the highest activity value. Repeat the training process until the ratio of the number of activated convolution kernels in each layer to the total number of convolution kernels in this layer reaches the overall activation ratio of each layer. If the activation ratio of the convolution kernels of a layer exceeds the activation ratio of the layer during training, the channel with the lowest activity value is selected to set the last activated convolution kernel to an inactive state.
[0108] Step 212: In order to determine the activation ratio of each layer, i.e., the deep optimization hyperparameter, the value of the parameter α is adaptively learned using the improved fully connected layer. Assuming the number of network layers is M, the dimension of α is M*1. Taking each channel as an example, each value of the convolution kernel α is in the interval [0.25, 1], and the initial value is set to 1 / 4. In order to avoid overfitting and improve the generalization ability of the model during parameter learning, the formula of the fully connected layer is improved, and the L2 regularization term is used to constrain the weights. The formula for calculating the deep optimization hyperparameter α is as follows:
[0109] α=ω[σ(W*N+b)+λR(W)]+β
[0110] Among them, the value of ω is 0.75, and the value of β is 0.25. This design is to ensure that the value of α is in the interval [0.25, 1], so that each channel has at least one convolution kernel involved in the operation, and the ratio of activated convolution kernels cannot be greater than 1, and at most four convolution kernels are activated at the same time; σ(·) is the sigmoid activation function, λ is the regularization parameter, and R(·) is the L2 regularization term; W is a learnable weight matrix, b is a learnable bias vector, and the Xavier initialization method is used to initialize W and b, which can effectively reduce the size of the gradient.
[0111] Step 220 specifically includes:
[0112] Step 221, in the bidirectional GRU model, there are many hyperparameters that have a great influence on the accuracy of fault prediction of the power communication network, such as learning rate, number of hidden layers, batch size and number of neurons in the layer. In order to improve the prediction accuracy of the model for fault prediction of the power communication network, the bidirectional GRU model is improved, and the parameters of the bidirectional GRU are optimized using the sand cat swarm algorithm. The size of the sand cat swarm is set to N, the dimension of the search space is D, the maximum number of iterations is Tmax, the initial position of the sand cat swarm is generated using the initialization method of the sand cat swarm algorithm, and the value range of all parameters is set.
[0113] The bidirectional GRU model optimized by the Sand Cat Swarm Algorithm is used for training, and the accuracy of fault prediction of the power communication network is calculated and defined as the fitness function of a single Sand Cat Swarm. After calculation and update by the Sand Cat Swarm Algorithm, the training is stopped when the fitness reaches the maximum value or the maximum number of iterations is reached, and the optimal parameter set is obtained.
[0114] Step 222. When using the sand cat swarm algorithm to optimize the parameters of BIGRU, excessive global search will lead to falling into the local optimal solution. Therefore, the present invention improves this problem and designs an adaptive weighting factor, the purpose of which is to find a balance between global search and local utilization, so that the algorithm can explore the space of global optimal solutions and make full use of the information of local optimal solutions during the search process. In the early stage of the algorithm, a greater weight is given to the global search so that the algorithm pays more attention to the exploration of the global optimal solution; as the search proceeds, the weight is gradually adjusted to increase the utilization of local optimal solutions. The formula of the designed adaptive weighting factor μ is as follows:
[0115]
[0116] Among them, t is the number of words in the current iteration, T max is the maximum number of iterations.
[0117] In the improved search process, the next sand cat position can be updated according to the following formula:
[0118]
[0119] in, Indicates the next location of the sand cat, represents the sensitivity range of the sand cat, rand(0,1) represents taking a random number in the interval (0,1), represents the optimal solution, Indicates the current location.
[0120] Step 223: Input the fault features extracted by the MobileNet V2 network into the bidirectional GRU network, and use the optimal parameter set obtained by the Sand Cat Swarm Algorithm to build a bidirectional GRU network fault prediction model. The input feature sequence is sent to the GRU units in both directions at the same time. Through the processing of the bidirectional GRU network, the fault features integrate the forward and backward context information, and the fault prediction task of the power communication network is realized through the classifier.
[0121] The power communication network fault prediction method provided by the present invention solves the problem that the fault prediction accuracy of the existing network fault prediction algorithm needs to be improved and the model complexity is too high. First, it is proposed to add deep optimization hyperparameters in MobileNet V2 to achieve a balance between lightweight and accuracy when performing fault prediction, and only activate additional convolution kernels for channels with higher activity. In addition, the size of the activated additional convolution kernel is different from that of the initial convolution kernel, which can extract multi-scale features of the power communication network. Finally, the improved sand cat group algorithm is used in the bidirectional GRU model for parameter optimization, and an adaptive weighting factor is designed to adjust the global and local search capabilities of the model to improve the accuracy of the prediction. The power communication network fault prediction method provided by the present invention can not only improve the fault prediction accuracy of the model to a certain extent, but also effectively complete the task of fault prediction for the power communication network.
[0122] The following is an example of using the power communication network fault prediction method provided by the present invention:
[0123] 1. Use sensors to collect the power supply status, operating status, operating conditions and environmental data of important equipment in the power communication network, as well as the topological data of network nodes and performance indicators such as bandwidth, latency, packet loss rate, and throughput. The collection lasts for one month, with a frequency of once every 15 minutes, and the collected data is preprocessed. The MobileNet V2 neural network is trained based on the preprocessed power communication network data. The number of network layers is 4, and the number of input feature channels is 10. The initial setting is to activate only the first 3×3 convolution kernel for each channel. The 5×5, 7×7, and 3×3 convolution kernels are temporarily inactive and do not participate in the calculation.
[0124] 2. After the first training, we get the activity matrix activity4×10=[[2.512,23.142,...,15.541],...,[1.231,5.154,...,6.216]] of each channel. It can be seen that the channels with the highest activity in the four layers are 1, 0, 7, and 5, respectively. Therefore, an additional convolution kernel is activated for the channel with the highest activity value in each layer. Repeat the operation until each layer reaches the activation ratio in the deep optimization hyperparameter α. After the overall model and the fully connected layer are trained, the value of the deep optimization hyperparameter α is [0.302, 0.495, 0.586, 0.465]. After being processed by the improved MobileNet V2, the extracted fault features are output.
[0125] 3. According to the result of step 2, the output fault feature sequence is input into the bidirectional GRU network, and the improved sand cat swarm algorithm is used to optimize the learning rate, number of hidden layers, batch size and number of neurons in each layer. The initial setting of the sand cat swarm size N = 40, the maximum number of iterations Tmax =100, and the search space dimension D = 4. During the pre-training process, the position of the sand cat is updated, and the adaptive weighting factor μ is used to adjust the algorithm's search ability for global and local information. Finally, the optimal parameter set is obtained, that is, the learning rate is 0.005, the number of hidden layers is 4, the batch size is 32, and the number of layer neurons is 89. The optimal parameter set is applied to the bidirectional GRU network, and formal training is re-performed. Then, the feature sequence output in step 2 is input into the network, processed by the GRU units in both directions, and the forward and backward context information is fused. The fault prediction of the power communication network is realized through the multi-layer perceptron classifier and softmax. The prediction result is that there will be no fault in the power communication network at the next moment.
[0126] The power communication network fault prediction device provided by the present invention is described below. The power communication network fault prediction device described below and the power communication network fault prediction method described above can be referenced to each other.
[0127] Figure 4 The schematic diagram of the structure of the power communication network fault prediction device provided by the present invention is as follows: Figure 4 As shown, the device comprises:
[0128] An extraction module 400 is used to extract features for fault prediction from preprocessed data of the power communication network at the current moment based on an improved MobileNet network;
[0129] Prediction module 410, used to input the features used for fault prediction into the bidirectional GRU network, and predict the fault condition of the power communication network at the next moment from the current moment;
[0130] Among them, each channel in any convolutional layer of the improved MobileNet network includes multiple convolution kernels of different scales, the parameters of the bidirectional GRU network are determined based on the Sand Cat Swarm Algorithm, the improved MobileNet network is trained based on the historical data of the electric power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and the historical fault conditions of the electric power communication network.
[0131] Optionally, the improved MobileNet network training method includes:
[0132] In any training, the convolution kernel activity value of any channel is determined based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel;
[0133] When the first ratio of any convolutional layer is less than the convolution kernel activation ratio of any convolutional layer, increase the number of convolution kernels activated in the first channel, where the first channel is the channel with the highest convolution kernel activity value in any convolutional layer;
[0134] When the first ratio of any convolutional layer is greater than the convolution kernel activation ratio of any convolutional layer, the number of convolution kernels activated in the second channel is reduced, and the second channel is the channel in which the number of activated convolution kernels in any convolutional layer is greater than 1 and the convolution kernel activity value is the lowest;
[0135] When the first ratio of each convolutional layer of the improved MobileNet network is equal to the convolution kernel activation ratio of each convolutional layer, the training of the improved MobileNet network is completed;
[0136] The first ratio is the ratio between the number of convolution kernels activated by all channels and the total number of convolution kernels of all channels.
[0137] Optionally, based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel, determining the convolution kernel activity value of any channel includes:
[0138] The convolution kernel activity value of any channel is determined based on the following formula:
[0139]
[0140] Among them, activity(k) represents the convolution kernel activity value of any channel, n k Represents the number of convolution kernels activated in any channel, V i It represents the one-dimensional vector obtained by flattening the feature matrix of the i-th convolution kernel of any channel, and ||||2 represents the L2 norm operation.
[0141] Optionally, the convolution kernel activation ratio of any convolution layer is determined based on the total number of convolution kernels of each channel in any convolution layer.
[0142] Optionally, the convolution kernel activation ratio of any convolutional layer is determined based on the following formula:
[0143] α=ω[σ(W*N+b)+λR(W)]+β
[0144] Among them, α represents the convolution kernel activation ratio of any convolution layer, the sum of ω and β is 1, β is the reciprocal of the total number of convolution kernels for each channel in any convolution layer, σ(·) represents the sigmoid activation function, λ represents the regularization parameter, R(·) represents the L2 regularization term, W represents the learnable weight matrix, b represents the learnable bias vector, and N is the total number of convolution kernels for each channel in any convolution layer.
[0145] Optionally, the method for determining the parameters of the bidirectional GRU network includes:
[0146] Determine an adaptive weighting factor corresponding to a current iteration of the sand cat swarm algorithm based on a maximum number of iterations of the sand cat swarm algorithm and a current number of iterations of the sand cat swarm algorithm;
[0147] The search process of the Sand Cat Swarm Algorithm is improved based on the adaptive weighting factor, and the learning rate, number of hidden layers, batch size and number of layer neurons of the bidirectional GRU network are determined based on the improved Sand Cat Swarm Algorithm.
[0148] Optionally, based on the maximum number of iterations of the sand cat swarm algorithm and the current number of iterations of the sand cat swarm algorithm, determining an adaptive weighting factor corresponding to the current iteration of the sand cat swarm algorithm includes:
[0149] The adaptive weighting factor is determined based on the following formula:
[0150]
[0151] Where μ represents the adaptive weighting factor corresponding to the current iteration of the Sand Cat Swarm Algorithm, t represents the current iteration number of the Sand Cat Swarm Algorithm, and T max Indicates the maximum number of iterations of the Sand Cat Swarm Algorithm.
[0152] It should be noted here that the above-mentioned device provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0153] Figure 5 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute any of the power communication network fault prediction methods provided in the above embodiments.
[0154] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0155] It should be noted here that the electronic device provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0156] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute any of the power communication network fault prediction methods provided in the above embodiments.
[0157] It should be noted here that the non-transitory computer-readable storage medium provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0158] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0160] 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 it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting faults in a power communication network, characterized in that: include: Based on the improved MobileNet network, features for fault prediction are extracted from the preprocessed data of the current power communication network. Inputting the features for fault prediction into a bidirectional GRU network to predict the fault condition of the power communication network at the next moment after the current moment; Wherein, each channel in any convolutional layer of the improved MobileNet network includes a plurality of convolutional kernels of different scales, the parameters of the bidirectional GRU network are determined based on the Sand Cat Swarm Algorithm, the improved MobileNet network is trained based on the historical data of the electric power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and the historical fault conditions of the electric power communication network; The improved MobileNet network training method includes: In any training, based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel, determining the convolution kernel activity value of any channel; When the first ratio of any convolutional layer is less than the convolution kernel activation ratio of any convolutional layer, the number of convolution kernels activated in the first channel is increased, and the first channel is the channel with the highest convolution kernel activity value in any convolutional layer; When the first ratio of any convolutional layer is greater than the convolution kernel activation ratio of any convolutional layer, reducing the number of convolution kernels activated in the second channel, where the second channel is a channel in which the number of activated convolution kernels in any convolutional layer is greater than 1 and the convolution kernel activity value is the lowest; When the first ratio of each convolutional layer of the improved MobileNet network is equal to the convolution kernel activation ratio of each convolutional layer, completing the training of the improved MobileNet network; The first ratio is the ratio between the number of convolution kernels activated in all channels and the total number of convolution kernels in all channels, and the convolution kernel activation ratio of any convolution layer is determined based on the total number of convolution kernels in each channel in any convolution layer.
2. The method for predicting faults in a power communication network according to claim 1, characterized in that: The determining the convolution kernel activity value of any channel based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel includes: The convolution kernel activity value of any channel is determined based on the following formula: Among them, activity(k) represents the convolution kernel activity value of any channel, n k Represents the number of convolution kernels activated by any channel, V i represents the one-dimensional vector obtained by flattening the feature matrix of the i-th convolution kernel of any channel, and ||||2 represents the L2 norm operation.
3. The method for predicting faults in a power communication network according to claim 1, characterized in that: The convolution kernel activation ratio of any convolutional layer is determined based on the following formula: α=ω[σ(W*N+b)+λR(W)]+β Wherein, α represents the convolution kernel activation ratio of any convolution layer, the sum of the values of ω and β is 1, the value of β is the reciprocal of the total number of convolution kernels for each channel in any convolution layer, σ(·) represents the sigmoid activation function, λ represents the regularization parameter, R(·) represents the L2 regularization term, W represents the learnable weight matrix, b represents the learnable bias vector, and N represents the total number of convolution kernels for each channel in any convolution layer.
4. The method for predicting faults in a power communication network according to claim 1, characterized in that: The method for determining the parameters of the bidirectional GRU network includes: Determine an adaptive weighting factor corresponding to a current iteration of the sand cat swarm algorithm based on a maximum number of iterations of the sand cat swarm algorithm and a current number of iterations of the sand cat swarm algorithm; The search process of the sand cat swarm algorithm is improved based on the adaptive weighting factor, and the learning rate, number of hidden layers, batch size and number of layer neurons of the bidirectional GRU network are determined based on the improved sand cat swarm algorithm.
5. The method for predicting faults in a power communication network according to claim 4, characterized in that: The step of determining an adaptive weighting factor corresponding to a current iteration of the sand cat swarm algorithm based on a maximum number of iterations of the sand cat swarm algorithm and a current number of iterations of the sand cat swarm algorithm comprises: The adaptive weighting factor is determined based on the following formula: Wherein, μ represents the adaptive weighting factor corresponding to the current iteration of the Sand Cat Swarm Algorithm, t represents the current iteration number of the Sand Cat Swarm Algorithm, T max Represents the maximum number of iterations of the Sand Cat Swarm Algorithm.
6. A power communication network fault prediction device, characterized in that: include: An extraction module, used for extracting features for fault prediction from preprocessed data of the power communication network at the current moment based on an improved MobileNet network; A prediction module, used for inputting the features for fault prediction into a bidirectional GRU network to predict the fault condition of the power communication network at the next moment after the current moment; Wherein, each channel in any convolutional layer of the improved MobileNet network includes a plurality of convolutional kernels of different scales, the parameters of the bidirectional GRU network are determined based on the Sand Cat Swarm Algorithm, the improved MobileNet network is trained based on the historical data of the electric power communication network, and the bidirectional GRU network is trained based on the output of the improved MobileNet network and the historical fault conditions of the electric power communication network; The improved MobileNet network training method includes: In any training, based on the number of convolution kernels activated in any channel and the feature matrix of each activated convolution kernel in any channel, determining the convolution kernel activity value of any channel; When the first ratio of any convolutional layer is less than the convolution kernel activation ratio of any convolutional layer, the number of convolution kernels activated in the first channel is increased, and the first channel is the channel with the highest convolution kernel activity value in any convolutional layer; When the first ratio of any convolutional layer is greater than the convolution kernel activation ratio of any convolutional layer, reducing the number of convolution kernels activated in the second channel, where the second channel is a channel in which the number of activated convolution kernels in any convolutional layer is greater than 1 and the convolution kernel activity value is the lowest; When the first ratio of each convolutional layer of the improved MobileNet network is equal to the convolution kernel activation ratio of each convolutional layer, completing the training of the improved MobileNet network; The first ratio is the ratio between the number of convolution kernels activated in all channels and the total number of convolution kernels in all channels, and the convolution kernel activation ratio of any convolution layer is determined based on the total number of convolution kernels in each channel in any convolution layer.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the power communication network fault prediction method according to any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting faults in a power communication network as claimed in any one of claims 1 to 5 is implemented.