A Method and Device for Determining Potential Grid Security Based on Heterogeneous Neural Networks
Through the grid potential safety determination method based on heterogeneous neural networks, the historical anomaly data is automatically iteratively updated, which solves the problems of mathematical modeling time and manual extraction of features in traditional grid security threat prediction methods, and improves the accuracy and efficiency of prediction.
Patent Information
- Application Number
- CN202210072577.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-01-21
AI Technical Summary
The traditional grid security threat prediction method is time-consuming and complicated in mathematical modeling, which increases the prediction difficulty and reduces efficiency, and manual extraction of historical abnormal data features is prone to errors, resulting in insufficient robustness of the model and low prediction accuracy.
A grid potential security determination method based on heterogeneous neural network is adopted. By obtaining the training sample set, multiple preset heterogeneous neural networks are used for training prediction, the basic prediction result set is obtained, and the target prediction result is obtained through iterative update calculations to determine the potential security threat of the power grid.
This method can automatically iteratively update historical anomaly data, improve the accuracy of safe prediction, reduce manual intervention, and improve prediction processing efficiency.
Smart Images

Figure CN114429246B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid management, and particularly to a method and device for determining potential safety of a power grid based on a heterogeneous neural network. Background Art
[0002] The safe operation of the power grid is an important part of the national energy security and also an important part to ensure the stable development of the national industry and economic lifeline. To ensure the stable operation of the power grid, in addition to real-time monitoring and recording of the operation data of the power grid, it is also necessary to perform safety prediction based on the recorded operation data to avoid situations where the power grid operation goes wrong due to omissions in monitoring or management.
[0003] Currently, the commonly used method for predicting power grid security threats is to use historical abnormal data information for complex mathematical modeling and then use the established model for safety threat prediction.
[0004] However, the traditional method has the following technical problems: the mathematical modeling takes a long time and has complex steps, which not only increases the difficulty of prediction but also reduces the efficiency of prediction processing. Moreover, the mathematical modeling requires manual extraction of the features of historical abnormal data, and manual extraction is prone to errors, resulting in insufficient robustness of the single prediction model and low prediction accuracy. Summary of the Invention
[0005] The present invention provides a method and device for determining potential safety of a power grid based on a heterogeneous neural network. The method can automatically iteratively update historical abnormal data and perform safety prediction based on the updated historical abnormal data to improve the prediction accuracy.
[0006] In a first aspect of an embodiment of the present invention, a method for determining potential safety of a power grid based on a heterogeneous neural network is provided. The method includes:
[0007] Obtain a training sample set, where the training sample set is composed of multiple abnormal data samples regarding the operation of the power grid;
[0008] Use multiple preset heterogeneous neural networks to perform training prediction on the training sample set to obtain multiple basic prediction results, and synthesize the multiple basic prediction results into a basic prediction result set;
[0009] Use the basic prediction result set to perform iterative update calculation on multiple preset heterogeneous neural networks to obtain a target prediction result;
[0010] Determine the potential safety threat of the power grid according to the target prediction result set.
[0011] In a possible implementation manner of the first aspect, the iterative update calculation is specifically:
[0012] Calculate the true value difference between the basic prediction result set and the training sample set;
[0013] Based on the true value difference, calculate the inner product of the basic prediction results of each of the preset heterogeneous neural networks to obtain a plurality of inner products;
[0014] Use the plurality of inner products to update the calculation weights of each of the preset heterogeneous neural networks respectively to obtain a plurality of updated weights;
[0015] Use the plurality of updated weights and the basic prediction result set to calculate a target prediction result set.
[0016] In a possible implementation manner of the first aspect, the using the plurality of updated weights and the basic prediction result set to calculate a target prediction result set includes:
[0017] Perform normalization processing on the plurality of updated weights to obtain normalized weights;
[0018] Use the normalized weights and the basic prediction result set to calculate a target prediction result set;
[0019] The calculation formulas for the normalized weights and the basic prediction result set are as follows:
[0020]
[0021] where E(A) * is the target prediction result set; W scale * is the normalized weight, and A is the basic prediction result.
[0022] In a possible implementation manner of the first aspect, the using the plurality of inner products to update the calculation weights of each of the preset heterogeneous neural networks respectively to obtain a plurality of updated weights includes:
[0023] Select the inner product with the smallest value from the plurality of inner products as the updated inner product;
[0024] According to the updated inner product, update the calculation weights of each of the preset heterogeneous neural networks to obtain a plurality of updated weights;
[0025] The calculation formula for updating the calculation weights according to the updated inner product is as follows:
[0026]
[0027] where, is the updated weight; ω i is the prior weight; τ is the weight adjustment parameter; is the updated inner product.
[0028] In a possible implementation of the first aspect, the calculation of the inner product is shown as follows:
[0029]
[0030] where, is the inner product; is the basic prediction result corresponding to the i-th heterogeneous neural network; is the true value difference between the basic prediction result set and the training sample set.
[0031] In a possible implementation of the first aspect, the calculation of the true value difference is shown as follows:
[0032]
[0033] where, is the true value difference; E(A) is the basic prediction result set; is the true value of the training sample set.
[0034] In a possible implementation of the first aspect, the combining of the multiple basic prediction results into a basic prediction result set includes:
[0035] Calculating the initial weights of each of the preset heterogeneous neural networks respectively, and forming an initial matrix with each of the initial weights to obtain a plurality of initial matrices;
[0036] Integrating the multiple initial matrices and the multiple basic prediction results to obtain a basic prediction result set.
[0037] In a possible implementation of the first aspect, the determining of the potential security threats of the power grid according to the target prediction result set includes:
[0038] Comparing each row of prediction data in the target prediction result set with a preset threshold respectively, where each row of data corresponds to an abnormal sample, and each of the abnormal samples is continuous historical abnormal data within a period of time;
[0039] When the preset data is greater than or equal to the preset threshold, it is determined that the abnormal data sample corresponding to the prediction data has potential security threats;
[0040] When the preset data is less than the preset threshold, it is determined that the abnormal data sample corresponding to the prediction data does not have potential security threats.
[0041] In a possible implementation of the first aspect, the preset heterogeneous neural network includes a convolutional neural network, a residual network, a long short-term memory network, a gated recurrent unit, a convolutional neural network in series with a long short-term memory network, a convolutional neural network in series with a gated recurrent unit, a residual network in series with a gated recurrent unit, a convolutional neural network in parallel with a long short-term memory network, a convolutional neural network in parallel with a gated recurrent unit, or a residual network in parallel with a gated recurrent unit.
[0042] A second aspect of the embodiments of the present invention provides a device for determining the potential safety of a power grid based on a heterogeneous neural network, the device comprising:
[0043] An acquisition module, configured to acquire a training sample set, wherein the training sample set consists of a plurality of abnormal data samples regarding the operation of the power grid;
[0044] A training and integration module, configured to perform training and prediction on the training sample set using a plurality of preset heterogeneous neural networks to obtain a plurality of basic prediction results, and synthesize the plurality of basic prediction results into a basic prediction result set;
[0045] An iterative update module, configured to perform iterative update calculations on the plurality of preset heterogeneous neural networks using the basic prediction result set to obtain a target prediction result;
[0046] A determination module, configured to determine the potential safety threat of the power grid according to the target prediction result set.
[0047] Compared with the prior art, the method and device for determining the potential safety of a power grid based on a heterogeneous neural network provided by the embodiments of the present invention have the beneficial effects that: the present invention can perform multiple iterative updates using the abnormal data of power grid equipment to update the weights of each neural network, so that the updated weights can be used to call each neural network for safety risk prediction to improve the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a schematic flowchart of a method for determining the potential safety of a power grid based on a heterogeneous neural network provided by an embodiment of the present invention;
[0049] Figure 2 is an operation flowchart of a method for determining the potential safety of a power grid based on a heterogeneous neural network provided by an embodiment of the present invention;
[0050] Figure 3 is a schematic structural diagram of a device for determining the potential safety of a power grid based on a heterogeneous neural network provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0052] The existing methods for determining potential safety hazards have the following technical problems: Since mathematical modeling takes a long time and has complex steps, it not only increases the difficulty of prediction but also reduces the efficiency of prediction processing. Moreover, mathematical modeling requires manual extraction of the characteristics of historical abnormal data, and manual extraction is prone to errors, resulting in insufficient robustness of the single prediction model and low prediction accuracy.
[0053] To solve the above problems, the following specific embodiments will be used to introduce and illustrate in detail a method for determining potential grid safety based on a heterogeneous neural network provided by the embodiments of the present application.
[0054] Refer to Figure 1 , which shows a schematic flowchart of a method for determining potential grid safety based on a heterogeneous neural network provided by an embodiment of the present invention.
[0055] In an alternative implementation, the method can be applied to a power grid system to determine potential safety hazards existing in the power grid.
[0056] Among them, as an example, the method for determining potential grid safety based on a heterogeneous neural network may include:
[0057] S11. Obtain a training sample set, where the training sample set is composed of multiple abnormal data samples regarding the operation of the power grid.
[0058] In an embodiment, multiple sensors can be installed in the power grid system. Each sensor can be used to detect the operation data of a device, and when the operation data does not meet the preset standard, the operation data is determined as an abnormal data sample. The abnormal data samples of multiple different devices are combined into a training sample set.
[0059] S12. Use multiple preset heterogeneous neural networks to train and predict the training sample set to obtain multiple basic prediction results, and aggregate the multiple basic prediction results into a basic prediction result set.
[0060] In one embodiment, the preset heterogeneous neural network includes a convolutional neural network, a residual network, a long short-term memory network, a gated recurrent unit, a convolutional neural network in series with a long short-term memory network, a convolutional neural network in series with a gated recurrent unit, a residual network in series with a gated recurrent unit, a convolutional neural network in parallel with a long short-term memory network, a convolutional neural network in parallel with a gated recurrent unit, or a residual network in parallel with a gated recurrent unit.
[0061] Optionally, the training sample set can be input into each preset heterogeneous neural network for training and prediction respectively. Each preset heterogeneous neural network can output a basic prediction result. Finally, multiple basic prediction results are aggregated to generate a corresponding basic prediction result set for convenient subsequent prediction processing.
[0062] Since the prediction processes of different heterogeneous neural networks are different, in order to improve the prediction accuracy and enable each heterogeneous neural network to better cooperate in processing, in an optional embodiment, step S12 may include the following sub-steps:
[0063] Sub-step S121: Calculate the initial weights of each of the preset heterogeneous neural networks respectively, and form an initial matrix with each of the initial weights to obtain multiple initial matrices.
[0064] Sub-step S122: Integrate the multiple initial matrices and the multiple basic prediction results to obtain a basic prediction result set.
[0065] Specifically, a detailed description is made in combination with 10 heterogeneous neural networks.
[0066] In this embodiment, the 10 heterogeneous neural networks are shown in the following table:
[0067]
[0068] Among them, the convolutional neural network model alternately uses three one-dimensional convolutional layers and one-dimensional average pooling layers to extract sample features. The number of neurons in the three one-dimensional convolutional layers are 6, 6, and 12 respectively, the convolutional kernel sizes are 2, 4, and 2 respectively, the activation function uses ReLU, the size of the one-dimensional average pooling layer is 2, the number of neurons in one flatten layer and one fully connected layer is 1, and the Adam optimizer is selected.
[0069] The basic structure of the residual network is similar to that of the convolutional neural network, but a residual connection between layers is added. In the residual network model, three convolutional blocks with the same structure are set. Each convolutional block contains three one-dimensional convolutional layers, with the number of neurons being 16, 8, and 12 respectively, and the kernel size of all convolutional kernels being 2. To implement the residual connection, a one-dimensional convolutional layer for expanding the input data of this convolutional block is added, with the number of neurons being 12 and the kernel size being 1. At the end of the convolutional block, the convolutional results of the first three layers are combined with the convolutional result of the expansion layer and output. After the three convolutional blocks, a global average pooling layer is added, and the last layer is a fully connected layer with 1 neuron. The selected optimizer is Adam, and all activation functions are ReLu.
[0070] The long short-term memory network has two LSTM layers, with the number of neurons being 30 and 20 respectively, a Dropout layer with a Dropout ratio of 0.3, and a fully connected layer with 1 neuron. The optimizer used in this model is Adam.
[0071] The gated recurrent unit model contains a GRU layer with 30 neurons, a Dropout layer with a Dropout ratio of 0.2, and a fully connected layer with 1 neuron. The optimizer used in this model is Adam, and the activation function is ReLu.
[0072] The remaining 6 fusion models are connected with the above 4 neural network models as the basic structure. In series, that is, first extract local features through the convolutional neural network or the residual network and then input them into the gated recurrent unit or the long short-term memory network to extract temporal features. In parallel, that is, simultaneously input the data into the convolutional neural network and the gated recurrent unit to extract local features and temporal features respectively, and fuse the two features at the last layer and then output.
[0073] Use the sample set to train each heterogeneous neural network and save the trained model. When new data needs to be predicted, generate samples according to the sample processing method and send the data into the heterogeneous neural network to complete the prediction.
[0074] In the specific implementation, it can be denote the set of prediction results obtained by 10 heterogeneous neural networks, and n is the number of prediction results.
[0075] Then send the samples generated by the training sample set itself into the heterogeneous neural network for prediction to obtain 10 basic prediction results. The composition matrix of the basic prediction results is as follows (here, for the convenience of display, 4 decimal places are reserved):
[0076]
[0077] Then represent the weights corresponding to the prediction results of multiple heterogeneous neural networks as W = {ωi |i = 1, 2, …, m}, where ω i needs to satisfy
[0078] Then, use the following formula to calculate the initial weights of each heterogeneous neural network, and form the obtained initial weights into an initial matrix W;
[0079]
[0080] According to the obtained initial matrix W and combined with the following formula, obtain a basic prediction result set E(A), where the basic prediction result set E(A) is shown as follows:
[0081] E(A) = AW T
[0082] Its matrix is as follows:
[0083]
[0084] S13. Use the basic prediction result set to perform iterative update calculations on multiple preset heterogeneous neural networks to obtain the target prediction result.
[0085] It is possible to call the basic prediction result set to perform iterative update calculations on multiple preset heterogeneous neural networks according to the preset number of iterative updates to obtain the target prediction result.
[0086] Among them, the preset number of iterative updates can be adjusted according to actual needs.
[0087] In order to accurately obtain the target prediction result, in one of the embodiments, step S13 may include the following sub-steps:
[0088] Sub-step S131. Calculate the true value difference between the basic prediction result set and the training sample set.
[0089] Specifically, the true value difference is calculated as shown in the following formula:
[0090]
[0091] Among them, is the true value difference; E(A) is the basic prediction result set; is the true value of the training sample set.
[0092] Sub-step S132. Based on the true value difference, calculate the inner product of the basic prediction results of each preset heterogeneous neural network to obtain multiple inner products.
[0093] Specifically, the calculation of the inner product is shown as follows:
[0094]
[0095] Among them, is the inner product; is the basic prediction result corresponding to the i-th heterogeneous neural network; is the true value difference between the basic prediction result set and the training sample set.
[0096] Sub-step S133: Use the multiple inner products to update the calculation weights of each of the preset heterogeneous neural networks to obtain multiple updated weights.
[0097] Specifically, sub-step S133 may include:
[0098] Sub-step S1331: Screen the inner product with the smallest value from the multiple inner products as the updated inner product;
[0099] Sub-step S1332: Update the calculation weights of each of the preset heterogeneous neural networks according to the updated inner product to obtain multiple updated weights;
[0100] The calculation formula for updating the calculation weights according to the updated inner product is as follows:
[0101]
[0102] Among them, is the updated weight; ω i is the previous weight; τ is the weight adjustment parameter; is the updated inner product.
[0103] Sub-step S134: Calculate the target prediction result set by using the multiple updated weights and the basic prediction result set.
[0104] Specifically, sub-step S134 may include:
[0105] Sub-step S1341: Perform normalization processing on the multiple updated weights to obtain normalized weights.
[0106] Sub-step S1342: Calculate the target prediction result set by using the normalized weights and the basic prediction result set.
[0107] The calculation formula for the normalized weights and the basic prediction result set is as follows:
[0108]
[0109] Among them, E(A) * is the target prediction result set; W scale * is the normalized weight, and A is the basic prediction result.
[0110] Specifically, a further description is made in combination with the basic prediction result set E(A) output by the above 10 heterogeneous neural networks.
[0111] In actual operation, the difference between the basic integration result E(A) and the true value of the training sample set can be calculated using the following formula of the difference
[0112]
[0113] The result is shown in the following matrix:
[0114]
[0115] Then, the following formula is used to calculate the difference with the prediction results of each neural network of the inner product:
[0116]
[0117] The result is as follows:
[0118]
[0119] Then, update the current weight according to the principle that the smaller the inner product, the greater the weight.
[0120] Specifically, the weight can be updated according to the following formula to obtain the updated weight
[0121]
[0122] where ω i is the original weight, and τ is the weight adjustment parameter. In an optional embodiment, τ = 0.01 here.
[0123] The calculation result is as follows:
[0124]
[0125] Then, the updated weight can be normalized according to the following formula to obtain the normalized weight:
[0126]
[0127] The result is as follows:
[0128]
[0129] Then, the integration result is updated in combination with the normalized weight through the following formula to obtain the updated integration result:
[0130]
[0131] Among them, E(A) * is the updated integration result; W scale * is the set of normalized weights.
[0132] The results are as follows:
[0133]
[0134] Then it can be determined whether the preset number of iterative updates is reached. If the preset number of iterative updates is not reached, the updated integration result sets are combined into an updated integration result set, and based on the updated integration result set, a prediction result set is predicted, and the step of calculating the true value difference between the basic prediction result set and the training sample set is repeated; if the preset number of iterative updates is reached, the corresponding updated weights are calculated based on the updated integration result, and the updated weights are used as the target weights, and the target prediction results corresponding to each heterogeneous neural network are calculated using the target weights, and each target prediction result is combined into a target prediction result set.
[0135] In this embodiment, the obtained target prediction result set is shown as follows:
[0136] E(A) * = AW **T , where W **T represents the target weight.
[0137] Among them, the target weights are as follows:
[0138]
[0139] The target prediction result set is as follows:
[0140]
[0141] S14. Determine the potential security threats of the power grid according to the target prediction result set.
[0142] It is possible to determine whether there are security threats to the power grid according to the numerical values of the target prediction result set.
[0143] Specifically, in order to accurately determine the potential security threats of the power grid, in one embodiment, step S14 may include the following sub-steps:
[0144] Sub-step S141. Compare each row of prediction data in the target prediction result set with a preset threshold respectively, where each row of data corresponds to an abnormal sample, and each of the abnormal samples is continuous historical abnormal data within a period of time.
[0145] Sub-step S142: When the preset data is greater than or equal to the preset threshold, it is determined that there is a potential security threat in the abnormal data sample corresponding to the predicted data.
[0146] Sub-step S143: When the preset data is less than the preset threshold, it is determined that there is no potential security threat in the abnormal data sample corresponding to the predicted data.
[0147] In this embodiment, each decimal number corresponding to each row of predicted data in the integration result is a probability value, and each probability value corresponds to the possibility of a sample having a security threat.
[0148] The integration result is a column of data, and each row of data corresponds to an abnormal sample; the essence of each abnormal sample is a continuous historical abnormal data within a period of time.
[0149] Refer to Figure 2 , which shows the operation flowchart of a method for determining the potential security of a power grid based on a heterogeneous neural network provided by an embodiment of the present invention.
[0150] Specifically, first, the measurement data of abnormal devices and the abnormal detection sequence of control instructions are obtained to form a training sample set; then, multiple preset heterogeneous neural networks are used to obtain their respective prediction results on the training sample set itself, and the basic prediction result set is calculated by the average method; then, the difference between the basic prediction result set and the true value of the training sample set is calculated, and the inner product of the calculated difference and the basic prediction result of each heterogeneous neural network is calculated; then, the weights are updated according to the principle that the smaller the inner product, the greater the weight, and the updated integration result is calculated with this weight, and it is judged whether the preset iteration update times are reached. When the preset iteration update times are not reached, the difference between the basic prediction result set and the true value of the training sample set is recalculated, and the inner product of the calculated difference and the basic prediction result of each heterogeneous neural network is calculated. When the preset iteration update times are reached, the integrated target prediction result set of the hybrid neural network is calculated with the weights obtained at the end of the iterative update; finally, it is determined whether there is a potential security threat in the power grid based on the target prediction result set.
[0151] In this embodiment, the embodiment of the present invention provides a method for determining the potential security of a power grid based on a heterogeneous neural network, and its beneficial effect is that: the present invention can use the abnormal data of power grid devices for multiple iterative updates to update the weights of each neural network, so that the updated weights can be used to call each neural network for security risk prediction to improve the prediction accuracy.
[0152] The embodiment of the present invention also provides a device for determining the potential security of a power grid based on a heterogeneous neural network. Refer to Figure 3 , which shows the structural schematic diagram of a device for determining the potential security of a power grid based on a heterogeneous neural network provided by an embodiment of the present invention.
[0153] Among them, by way of example, the power grid potential safety determination device based on heterogeneous neural networks may include:
[0154] An acquisition module 301, configured to acquire a training sample set, where the training sample set is composed of a plurality of abnormal data samples regarding power grid operation;
[0155] A training and integration module 302, configured to perform training prediction on the training sample set by using a plurality of preset heterogeneous neural networks to obtain a plurality of basic prediction results, and synthesize the plurality of basic prediction results into a basic prediction result set;
[0156] An iterative update module 303, configured to perform iterative update calculation on the plurality of preset heterogeneous neural networks by using the basic prediction result set to obtain a target prediction result;
[0157] A determination module 304, configured to determine the potential safety threat of the power grid according to the target prediction result set.
[0158] Optionally, the iterative update module is further configured to:
[0159] Calculate the true value difference between the basic prediction result set and the training sample set;
[0160] Calculate the inner product of the basic prediction results of each of the preset heterogeneous neural networks based on the true value difference to obtain a plurality of inner products;
[0161] Use the plurality of inner products to update the calculation weights of each of the preset heterogeneous neural networks respectively to obtain a plurality of updated weights;
[0162] Calculate a target prediction result set by using the plurality of updated weights and the basic prediction result set.
[0163] Optionally, the iterative update module is further configured to:
[0164] Perform normalization processing on the plurality of updated weights to obtain normalized weights;
[0165] Calculate a target prediction result set by using the normalized weights and the basic prediction result set;
[0166] The calculation formulas for the normalized weights and the basic prediction result set are as follows:
[0167]
[0168] Among them, E(A) * is the target prediction result set; W scale * is the normalized weight, and A is the basic prediction result.
[0169] Optionally, the iterative update module is further configured to:
[0170] Select the inner product with the smallest value from the multiple inner products as the updated inner product;
[0171] Update the calculation weights of each of the preset heterogeneous neural networks according to the updated inner product to obtain multiple updated weights;
[0172] The calculation formula for updating the calculation weights according to the updated inner product is as follows:
[0173]
[0174] Wherein, is the updated weight; ω i is the prior weight; τ is the weight adjustment parameter; is the updated inner product.
[0175] Optionally, the calculation of the inner product is as shown in the following formula:
[0176]
[0177] Wherein, is the inner product; is the basic prediction result corresponding to the i-th heterogeneous neural network; is the true value difference between the basic prediction result set and the training sample set.
[0178] Optionally, the calculation of the true value difference is as shown in the following formula:
[0179]
[0180] Wherein, is the true value difference; E(A) is the basic prediction result set; is the true value of the training sample set.
[0181] Optionally, the training and integration module is further configured to:
[0182] Calculate the initial weights of each of the preset heterogeneous neural networks respectively, and form an initial matrix with each of the initial weights to obtain multiple initial matrices;
[0183] Integrate the multiple initial matrices and the multiple basic prediction results to obtain a basic prediction result set.
[0184] Optionally, the determination module is further configured to:
[0185] Compare each row of prediction data in the target prediction result set with a preset threshold value, where each row of data corresponds to an abnormal sample, and each of the abnormal samples is a continuous historical abnormal data within a period of time;
[0186] When the preset data is greater than or equal to the preset threshold value, it is determined that the abnormal data sample corresponding to the prediction data has a potential security threat;
[0187] When the preset data is less than the preset threshold value, it is determined that the abnormal data sample corresponding to the prediction data does not have a potential security threat.
[0188] Optionally, the preset heterogeneous neural network includes a convolutional neural network, a residual network, a long short-term memory network, a gated recurrent unit, a convolutional neural network in series with a long short-term memory network, a convolutional neural network in series with a gated recurrent unit, a residual network in series with a gated recurrent unit, a convolutional neural network in parallel with a long short-term memory network, a convolutional neural network in parallel with a gated recurrent unit, or a residual network in parallel with a gated recurrent unit.
[0189] Furthermore, an embodiment of the present application also provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method for determining the potential security of a power grid based on a heterogeneous neural network as described in the above embodiment.
[0190] Furthermore, an embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute the method for determining the potential security of a power grid based on a heterogeneous neural network as described in the above embodiment.
[0191] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A method for determining the potential security of a power grid based on a heterogeneous neural network, characterized in that The method includes: Obtaining a training sample set, where the training sample set consists of multiple abnormal data samples regarding power grid operation; Using multiple preset heterogeneous neural networks to perform training and prediction on the training sample set to obtain multiple basic prediction results, and aggregating the multiple basic prediction results into a basic prediction result set. The preset heterogeneous neural networks include convolutional neural network, residual network, long short-term memory network, gated recurrent unit, convolutional neural network in series with long short-term memory network, convolutional neural network in series with gated recurrent unit, residual network in series with gated recurrent unit, convolutional neural network in parallel with long short-term memory network, convolutional neural network in parallel with gated recurrent unit, or residual network in parallel with gated recurrent unit; Performing iterative update calculation on the multiple preset heterogeneous neural networks using the basic prediction result set to obtain a target prediction result; Determining potential security threats to the power grid based on the target prediction result set; The iterative update calculation specifically is: Calculating the true value difference between the basic prediction result set and the training sample set; Calculating the inner product of the basic prediction results of each of the preset heterogeneous neural networks based on the true value difference to obtain multiple inner products; Using the multiple inner products to update the calculation weights of each of the preset heterogeneous neural networks respectively to obtain multiple updated weights; Calculating a target prediction result set using the multiple updated weights and the basic prediction result set; The step of using the multiple inner products to update the calculation weights of each of the preset heterogeneous neural networks respectively to obtain multiple updated weights includes: Selecting the inner product with the smallest value from the multiple inner products as the update inner product; Updating the calculation weights of each of the preset heterogeneous neural networks according to the update inner product to obtain multiple updated weights; The calculation formula for updating the calculation weights according to the update inner product is as follows: Among them, is the updated weight; ω i is the prior weight; τ is the weight adjustment parameter; is the updated inner product.
2. The method for determining potential grid security based on a heterogeneous neural network according to claim 1, wherein The step of calculating a target prediction result set using the multiple updated weights and the basic prediction result set includes: Performing normalization processing on the multiple updated weights to obtain normalized weights; Calculating a target prediction result set using the normalized weights and the basic prediction result set; The calculation formula for the normalized weights and the basic prediction result set is as follows: Among them, E(A) * is the target prediction result set; W scale * is the normalized weight, and A is the basic prediction result.
3. The method for determining the potential security of a power grid based on a heterogeneous neural network according to claim 1, wherein The calculation of the inner product is as shown in the following formula: wherein, is the inner product; is the basic prediction result corresponding to the i-th heterogeneous neural network; is the true value difference between the basic prediction result set and the training sample set.
4. The method for determining the potential security of a power grid based on a heterogeneous neural network according to claim 1, wherein The calculation of the true value difference is as shown in the following formula: Among them, is the true value difference; E(A) is the basic prediction result set; is the true value of the training sample set.
5. The method for determining the potential security of a power grid based on a heterogeneous neural network according to claim 1, wherein The step of aggregating the multiple basic prediction results into a basic prediction result set includes: Calculating the initial weights of each of the preset heterogeneous neural networks respectively, and forming an initial matrix with each of the initial weights to obtain multiple initial matrices; Aggregating the multiple initial matrices and the multiple basic prediction results to obtain a basic prediction result set.
6. The method for determining potential grid security based on a heterogeneous neural network according to claim 1, wherein The step of determining potential security threats to the power grid based on the target prediction result set includes: Comparing each row of prediction data in the target prediction result set with a preset threshold respectively, where each row of data corresponds to an abnormal sample, and each of the abnormal samples is continuous historical abnormal data within a period of time; When the preset data is greater than or equal to the preset threshold, it is determined that the abnormal data sample corresponding to the prediction data has potential security threats; When the preset data is less than the preset threshold, it is determined that there is no potential security threat for the abnormal data sample corresponding to the predicted data.
7. The method for determining the potential security of a power grid based on a heterogeneous neural network according to any one of claims 1-6, characterized in that The preset heterogeneous neural networks include convolutional neural network, residual network, long short-term memory network, gated recurrent unit, convolutional neural network in series with long short-term memory network, convolutional neural network in series with gated recurrent unit, residual network in series with gated recurrent unit, convolutional neural network in parallel with long short-term memory network, convolutional neural network in parallel with gated recurrent unit, or residual network in parallel with gated recurrent unit.
8. A power grid potential safety determination device based on a heterogeneous neural network, characterized in that, The device includes: An acquisition module, configured to acquire a training sample set, where the training sample set consists of multiple abnormal data samples regarding power grid operation; A training and integration module, configured to perform training and prediction on the training sample set by using multiple preset heterogeneous neural networks to obtain multiple basic prediction results, and synthesize the multiple basic prediction results into a basic prediction result set. The preset heterogeneous neural networks include convolutional neural network, residual network, long short-term memory network, gated recurrent unit, convolutional neural network in series with long short-term memory network, convolutional neural network in series with gated recurrent unit, residual network in series with gated recurrent unit, convolutional neural network in parallel with long short-term memory network, convolutional neural network in parallel with gated recurrent unit, or residual network in parallel with gated recurrent unit; An iterative update module, configured to perform iterative update calculation on the multiple preset heterogeneous neural networks by using the basic prediction result set to obtain a target prediction result; A determination module, configured to determine the potential security threat of the power grid according to the target prediction result set; The iterative update calculation specifically is: Calculate the true value difference between the basic prediction result set and the training sample set; Calculate the inner product of the basic prediction results of each of the preset heterogeneous neural networks based on the true value difference to obtain multiple inner products; Use the multiple inner products to update the calculation weights of each of the preset heterogeneous neural networks to obtain multiple updated weights; Calculate a target prediction result set by using the multiple updated weights and the basic prediction result set; The step of using the multiple inner products to update the calculation weights of each of the preset heterogeneous neural networks to obtain multiple updated weights includes: Screen the inner product with the smallest value from the multiple inner products as the updated inner product; Update the calculation weights of each of the preset heterogeneous neural networks according to the updated inner product to obtain multiple updated weights; The calculation formula for updating the calculation weights according to the updated inner product is as follows: Among them, is the updated weight; ω i is the prior weight; τ is the weight adjustment parameter; is the updated inner product.
Citation Information
Patent Citations
Power system anomaly prediction method based on machine learning and big data analysis
CN112084237A