A method, device, equipment and storage medium for early warning of power grid data
By using residual network models in the smart grid and introducing weighted incomplete modules, the problem of large amount of power grid data early warning calculation in the existing technology is solved, and efficient power grid data early warning services are realized.
Patent Information
- Application Number
- CN202110782797.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-12
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-07-12
AI Technical Summary
The support vector machine (SVM) technology used for power grid data warning in existing smart grids has a large amount of calculation and it is difficult to achieve efficient early warning services.
The residual network model is used as the grid data analysis model, and a weighted residual module is introduced into it, and the weighted value of the fully connected layer is used as the output reference to simplify the network structure and reduce the calculation workload.
By reducing the computational workload of the residual network model, its working efficiency is improved, and the target grid data warning effect with a lower calculation amount is achieved.
Smart Images

Figure CN113378483B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of smart grid technology, and in particular to an early warning method, device, equipment and storage medium for power grid data. Background Art
[0002] In recent years, with the rapid popularization of smart power grid terminals, smart grids have developed rapidly in the direction of digitalization, informatization and intelligence.
[0003] In order to improve the online analysis capability of power grid characteristics, so as to achieve a global grasp of the power grid operation status and optimize the control of system resources, especially through the key analysis of customers' electricity usage and consumption behavior to achieve differentiated services, provide customers with further value-added services, improve customer satisfaction and loyalty, we can always pay attention to the user's electricity safety, and then provide timely safety warning services.
[0004] Currently, the above security warning service is mainly realized by using the support vector machine (SVM) technology, but it has the problem of large amount of calculation. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, equipment and storage medium for early warning of power grid data, so as to achieve an early warning effect of target power grid data with low calculation amount.
[0006] In a first aspect, an embodiment of the present invention provides an early warning method for power grid data, which may include:
[0007] Collecting target power grid data to be analyzed, and inputting the target power grid data into a trained power grid data analysis model, wherein the power grid data analysis model includes a residual network model, the residual network model includes a weighted residual module, and the weighted residual module includes a network module that uses the weighted value of the fully connected layer as an output reference;
[0008] The target analysis result of the target power grid data is obtained according to the output result of the power grid data analysis model, and it is determined whether an early warning is needed for the target power grid data according to the target analysis result.
[0009] In a second aspect, an embodiment of the present invention further provides an early warning device for power grid data, which may include:
[0010] A power grid data input module, used to collect target power grid data to be analyzed, and input the target power grid data into a trained power grid data analysis model, wherein the power grid data analysis model includes a residual network model, the residual network model includes a weighted residual module, and the weighted residual module includes a network module that uses the weighted value of the fully connected layer as an output reference;
[0011] The power grid data early warning module is used to obtain the target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determine whether it is necessary to issue an early warning for the target power grid data according to the target analysis result.
[0012] In a third aspect, an embodiment of the present invention further provides an early warning device for power grid data, which may include:
[0013] one or more processors;
[0014] A memory for storing one or more programs;
[0015] When one or more programs are executed by one or more processors, the one or more processors implement the early warning method for power grid data provided by any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the early warning method for power grid data provided by any embodiment of the present invention.
[0017] The technical solution of the embodiment of the present invention collects the target power grid data to be analyzed, and inputs the target power grid data into the trained power grid data analysis model, obtains the target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determines whether it is necessary to warn the target power grid data according to the target analysis result. The above-mentioned power grid data analysis model includes a residual network model, and the residual network model includes a weighted incomplete module with the weighted value of the fully connected layer as the output reference. The introduction of the weighted incomplete module simplifies the network structure of the residual network model, thereby reducing the computational workload of the residual network model, and further improving the working efficiency of the residual network model. The above-mentioned technical solution effectively reduces the computational workload of the residual network model by introducing a weighted incomplete module with the weighted value of the fully connected layer as the output reference in the residual network model, thereby reducing the computational workload of the target power grid data in the warning process, thereby completing the effective warning of the target power grid data with a lower computational workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of a power grid data early warning method in Embodiment 1 of the present invention;
[0019] Figure 2a It is a structural schematic diagram of a residual network model in an early warning method for power grid data in Embodiment 1 of the present invention;
[0020] Figure 2b It is a structural diagram of a weighted defect module in a power grid data early warning method in the first embodiment of the present invention;
[0021] Figure 3 This is a flow chart of a method for early warning of power grid data in Embodiment 2 of the present invention;
[0022] Figure 4 This is a flow chart of a method for early warning of power grid data in Embodiment 3 of the present invention;
[0023] Figure 5 This is a structural block diagram of an early warning device for power grid data in Embodiment 4 of the present invention;
[0024] Figure 6 It is a structural diagram of a power grid data early warning device in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It is also necessary to explain that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0026] Embodiment 1
[0027] Figure 1 It is a flow chart of a method for early warning of power grid data provided in the first embodiment of the present invention. This embodiment can be applicable to the case where early warning is provided for target power grid data with early warning requirements, and is particularly applicable to the case where early warning is provided for target power grid data with early warning requirements with a lower amount of calculation. The method can be executed by the early warning device for power grid data provided in the embodiment of the present invention, and the device can be implemented by software and / or hardware, and the device can be integrated in the early warning device for power grid data, and the device can be various user terminals or servers.
[0028] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0029] S110, collecting target power grid data to be analyzed, and inputting the target power grid data into a trained power grid data analysis model, wherein the power grid data analysis model includes a residual network model, the residual network model includes a weighted residual module, and the weighted residual module includes a network module that uses the weighted value of the fully connected layer as an output reference.
[0030] Among them, the target power grid data can be data collected from the power grid that needs to be analyzed. In practical applications, the number of data of the target power grid data can be one, two or more; the number of data in each target power grid data can be one, two or more, and the data form of each target power grid data can be discrete points, target data waveforms composed of discrete points, etc. The timing of data collection can be real-time collection or collection based on a preset time interval, which is not specifically limited here. The power grid data analysis model can be a trained neural network model for analyzing the target power grid data. The specific content of its analysis is related to its own training process, such as whether the change trend of the target power grid data is stable, whether there are abnormalities, etc. Therefore, the collected target power grid data can be input into the power grid data analysis model so that the target power grid data can be analyzed based on the power grid data analysis model.
[0031] Considering the application scenarios that may be involved in the embodiments of the present invention, the above steps can be optionally completed by the following contents: continuously collecting the target power grid data to be analyzed, dividing the target power grid data based on a preset sliding window, and taking each divided target power grid sub-data as the target power grid data; for each target power grid data, inputting the target power grid data into the trained power grid data analysis model. Among them, the continuous collection process of the target power grid data can be understood as a process of real-time collection or collection based on a preset time interval. At this time, the target power grid data can be understood as a whole, which includes at least two data. The sliding window can be a pre-set window for dividing the target power grid data, such as dividing the target power grid data into at least one target power grid sub-data according to the window size of the sliding window. Exemplarily, when the target power grid data is displayed through a target data waveform, each complete target data waveform in the target power grid data can be taken as a target power grid sub-data, that is, the preset data number of data in the target power grid data that is continuous in time is taken as a target power grid sub-data, and the specific size of the preset data number can be related to the window size. Furthermore, each target power grid sub-data may be taken as a target power grid data, and then each target power grid data may be respectively input into the power grid data analysis model, so as to analyze the target power grid data based on the power grid data analysis model.
[0032] It should be noted that the above-mentioned power grid data analysis model may include a residual network model, which may include a weighted residual module, which may include a network module with the weighted value of the fully connected layer as the output reference. The introduction of the weighted residual module with the weighted value of the fully connected layer as the output reference effectively reduces the computational workload of the residual network model, thereby improving the analysis efficiency of the residual network model (i.e., the power grid data analysis model).
[0033] S120, obtaining a target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determining whether an early warning is required for the target power grid data according to the target analysis result.
[0034] Among them, after analyzing the target power grid data, the power grid data analysis model can output the specific content of the analysis, and then the early warning device of the above-mentioned power grid data can obtain the target analysis result of the target power grid data according to the output result of the power grid data analysis model. The target analysis result can indicate whether there is an early warning demand for such target power grid data. Therefore, it can be determined whether it is necessary to issue an early warning for the above-mentioned target power grid data according to the target analysis result. If so, a real-time early warning will be given, otherwise no early warning is required. For example, if the target analysis result is that the target power grid data is abnormal target abnormal power grid data, which indicates that there is an early warning demand for the target power grid data, and a real-time early warning can be given; if the target analysis result is that the target power grid data is normal target power grid data without abnormalities, which indicates that there is no early warning demand for the target power grid data, and no early warning is required.
[0035] The technical solution of the embodiment of the present invention collects the target power grid data to be analyzed, and inputs the target power grid data into the trained power grid data analysis model, obtains the target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determines whether it is necessary to warn the target power grid data according to the target analysis result. The above-mentioned power grid data analysis model includes a residual network model, and the residual network model includes a weighted incomplete module with the weighted value of the fully connected layer as the output reference. The introduction of the weighted incomplete module simplifies the network structure of the residual network model, thereby reducing the computational workload of the residual network model, and further improving the working efficiency of the residual network model. The above-mentioned technical solution effectively reduces the computational workload of the residual network model by introducing a weighted incomplete module with the weighted value of the fully connected layer as the output reference in the residual network model, thereby reducing the computational workload of the target power grid data in the warning process, thereby completing the effective warning of the target power grid data with a lower computational workload.
[0036] On this basis, optionally, the above residual network model may also include an activation layer and / or an average pooling layer connected to the weighted incomplete module. The specific connection method may be to use the output of the activation layer as the input of the weighted incomplete module, and the output of the weighted incomplete module as the input of the average pooling layer, etc., which is not specifically limited here. Of course, the above residual network model may also include other network layers, such as convolutional layers, normalization layers, batch normalization layers, fully connected layers, etc., which are also not specifically limited here. For example, Figure 2aAs shown, the residual network model may include a convolutional layer, a normalization layer, a batch normalization layer, an activation layer, a weighted residual module, an average pooling layer, and a fully connected layer, which are sequentially connected and encapsulated from front to back. Optionally, the weighted residual module may also include a batch normalization layer connected to the fully connected layer, and a convolutional layer connected to the batch normalization layer. For example, see Figure 2b , the weighted incomplete module may include a convolutional layer, a batch normalization layer, and a fully connected layer that are sequentially connected and encapsulated from front to back.
[0037] Embodiment 2
[0038] Figure 3 It is a flow chart of an early warning method for power grid data provided in the second embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the early warning method for power grid data may also include: obtaining historical power grid data that has been analyzed, and historical analysis results of historical power grid data, and using the historical power grid data and historical analysis results as a group of training samples; training the constructed original neural network model based on multiple groups of training samples to obtain a power grid data analysis model, wherein the original neural network model may include an untrained residual network model. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0039] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0040] S210, obtaining the analyzed historical power grid data and the historical analysis results of the historical power grid data, and using the historical power grid data and the historical analysis results as a set of training samples.
[0041] Among them, the historical power grid data can be data collected from the power grid and analyzed. In practical applications, optionally, the number of data in the historical power grid data can be one, two or more; the number of data in each historical power grid data can be one, two or more, and the data form of each historical power grid data can be discrete points, historical data waveforms composed of discrete points, etc. The data collection time can be real-time collection or collection based on a preset time interval, which is not specifically limited here. Exemplarily, the historical power grid data can be historical abnormal power grid data, that is, historical power grid data with abnormalities after analysis, which can be collected from a fault recording device; it can also be historical normal power grid data, that is, historical power grid data without abnormalities after analysis. In practical applications, optionally, when there are multiple samples of training samples, they can also be randomly divided into training sets and verification sets, thereby improving the analysis accuracy of the subsequent trained power grid data analysis model. Optionally, since the target power grid data can be obtained based on the sliding window segmentation, the historical power grid data can also be obtained based on the same sliding window segmentation, thereby ensuring that the subsequent power grid data analysis model trained based on such historical power grid data can adapt to the target power grid data obtained based on the sliding window segmentation.
[0042] The historical analysis result may be the result obtained after analyzing the above historical power grid data. Considering the application scenarios that may be involved in the embodiments of the present invention, theoretically, over time, the change trend of the historical power grid data is stable, or the historical data waveform composed of the historical power grid data is smooth. However, due to normal disturbances caused by load changes or other reasons, it will cause the historical data waveform to change. Therefore, the above historical analysis result may be the result obtained after analyzing the historical power grid data under pre-set historical analysis conditions. The historical analysis conditions may include historical attributes and historical thresholds corresponding to the historical attributes, such as voltage and XX volts (V), current and XX amperes (A), etc. In practical applications, optionally, for the same historical power grid data, different historical analysis results may be obtained under different historical analysis conditions. Therefore, in addition to reflecting the analysis results of the historical power grid data, the above historical analysis results can also reflect the corresponding historical analysis conditions, so that the historical analysis results can be directly determined from the historical analysis results under what historical analysis conditions the historical analysis results are obtained. The above historical analysis results can be understood as the marking process in the model training process.
[0043] On this basis, the historical power grid data and the historical analysis results of the historical power grid data can be used as a set of training samples. Continuing with the above example, illustratively, when the historical power grid data is historical abnormal power grid data or historical normal power grid data, the above training samples can be positive training samples or negative training samples. Of course, whether the training samples corresponding to the historical abnormal power grid data are used as positive training samples or the training samples corresponding to the historical abnormal power grid data are used as negative training samples can be set according to the actual application scenario, and no specific limitation is made here.
[0044] S220. Based on multiple groups of training samples, the constructed original neural network model is trained to obtain a power grid data analysis model, wherein the original neural network model includes an untrained residual network model, the residual network model includes a weighted residual module, and the weighted residual module includes a network module that uses the weighted value of the fully connected layer as an output reference.
[0045] Among them, the original neural network model has the same network structure as the power grid data analysis model, which can be understood as a power grid data analysis model that has been constructed but not yet trained, that is, the weighted incomplete module therein is a network module that has been constructed but not yet trained and uses the weighted value of the fully connected layer as the output reference. Therefore, the original neural network model can be trained based on multiple groups of training samples to obtain a power grid data analysis model. It should be noted that if the above-mentioned training samples are training samples obtained under certain historical analysis conditions, then the target analysis results obtained after subsequent analysis based on the power grid data analysis model obtained by such training can also be the analysis results under the target analysis conditions corresponding to the historical analysis conditions.
[0046] S230: Collect target power grid data to be analyzed, and input the target power grid data into a trained power grid data analysis model.
[0047] S240: Obtain a target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determine whether an early warning is required for the target power grid data according to the target analysis result.
[0048] The technical solution of the embodiment of the present invention is to use the acquired analyzed historical power grid data and the historical analysis results of the historical power grid data as a group of training samples, and train the already constructed original neural network model including the untrained residual network model based on multiple groups of training samples, thereby achieving the effect of effective training of the power grid data analysis model.
[0049] An optional technical solution, the historical analysis result includes historical analysis conditions, the historical analysis conditions include historical attributes, and historical thresholds corresponding to the historical attributes, and inputting the target power grid data into the trained power grid data analysis model may include: determining the target analysis conditions of the target power grid data, and determining the target power grid data analysis model obtained by training based on the historical analysis conditions corresponding to the target analysis conditions during the model training process from each trained power grid data analysis model; inputting the target power grid data into the target power grid data analysis model; accordingly, obtaining the target analysis result of the target power grid data according to the output result of the power grid data analysis model may include: obtaining the target analysis result of the target power grid data according to the output result of the target power grid data analysis model. Among them, the historical analysis condition may be the analysis condition used when analyzing the historical power grid data, the historical attribute may be a certain attribute of the historical power grid data, such as voltage, current, etc., and the historical threshold may be a threshold corresponding to the historical attribute that can indicate whether the historical power grid data is historical normal power grid data (or historical abnormal power grid data). Exemplarily, taking the historical power grid data as a historical data waveform, assuming that the historical data waveform includes a historical voltage waveform at a certain point in the power grid, the historical attribute can be voltage, and the historical threshold can be XX volts when it is a historical normal voltage waveform. Optionally, the historical abnormal voltage waveform can be a waveform from a single-phase ground short circuit, lightning strike, etc. In order to improve the accuracy of the target analysis result, after obtaining the target power grid data, its target analysis conditions can be determined first, and then the target power grid data analysis model obtained by training based on the historical analysis conditions corresponding to the target analysis conditions during the model training process can be determined from each trained power grid data analysis model, thereby the target power grid data can be input into the target power grid data analysis model, and the target analysis result of the target power grid data can be obtained according to the output result of the target power grid data analysis model, thereby achieving the effect of accurate analysis of the target analysis result.
[0050] Another optional technical solution, the historical power grid data includes the first power grid data and the second power grid data, the original neural network model may also include a loss function calculation module, the loss function calculation module is a module constructed based on a preset attribute loss function, the attribute loss function may include an attribute formula related to the first historical attribute value of the first power grid data on the historical attribute and the second historical attribute value of the second power grid data on the historical attribute, and a feature mapping formula related to the first feature mapping value learned by the original neural network model for the first power grid data and the second feature mapping value learned for the second power grid data. The loss function calculation module may be a module for calculating the loss function, which may be constructed based on a preset attribute loss function, and the attribute loss function may be a loss function matching the historical attributes of the historical power grid data, which may include an attribute formula related to the first historical attribute value of the first power grid data on the historical attribute and the second historical attribute value of the second power grid data on the historical attribute. The above technical solution, by introducing the attribute loss function, can better distinguish the various historical attributes, and can also avoid the situation where the historical analysis results are affected by normal disturbances within the historical threshold range, thereby improving the analysis accuracy of the power grid data analysis model obtained by subsequent training.
[0051] On this basis, optionally, the above attribute loss function can be expressed by the following formula:
[0052]
[0053] Where L a is the loss function calculation result, i is the first power grid data, j is the second power grid data, g i is the first eigenmap value, g j is the second eigenmap value, g i -g j is the feature mapping formula, and y i is the first historical attribute value, y j is the second historical attribute value, G is the matrix parameter in the model training process, G(y i -y j ) is an attribute formula. In combination with the application scenarios that may be involved in the embodiments of the present invention, when the historical power grid data is a historical data waveform, the meaning of the above variables can also be expressed as: g i is the feature mapping value learned by the residual network model at the i-th point in the historical data waveform, g j is the feature mapping value learned by the residual network model at the jth point in the historical data waveform, y i is the historical attribute value of the i-th point in the historical data waveform on the historical attribute, y jis the historical attribute value of the jth point in the historical data waveform on the historical attribute, and G is the matrix parameter in the model training process.
[0054] Embodiment 3
[0055] Figure 4 1 is a flow chart of a power grid data early warning method provided in Embodiment 3 of the present invention. This embodiment is optimized based on the above technical solutions. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0056] See also Figure 4 The method of this embodiment may specifically include the following steps:
[0057] S310, collecting the analyzed historical data waveforms of the smart grid, segmenting each historical data waveform based on a preset sliding window, and taking each segmented historical sub-data waveform as a historical data waveform, wherein the historical data waveform includes a historical normal data waveform and a historical abnormal data waveform.
[0058] S320: Mark the historical abnormal data waveform, wherein the marking content includes historical analysis conditions, and the historical analysis conditions include historical attributes and historical thresholds corresponding to the historical attributes.
[0059] S330, obtaining a constructed original neural network model, wherein the original neural network model includes an untrained residual network model, the residual network model includes a convolution layer, a normalization layer, a batch normalization layer, an activation layer, a weighted incomplete module, an average pooling layer, and a fully connected layer that are sequentially connected and encapsulated from front to back, the weighted incomplete module includes a convolution layer, a batch normalization layer, and a fully connected layer that are sequentially connected and encapsulated from front to back, the original neural network model also includes a loss function calculation module, the loss function calculation module includes a module constructed based on a preset attribute loss function, and the attribute loss function is represented by the following formula:
[0060]
[0061] Where L a is the result of loss function calculation, g i is the feature mapping value learned by the residual network model at the i-th point in the historical data waveform, g j is the feature mapping value learned by the residual network model at the jth point in the historical data waveform, y i is the historical attribute value of the i-th point in the historical data waveform on the historical attribute, y j is the historical attribute value of the jth point in the historical data waveform on the historical attribute, and G is the matrix parameter in the model training process.
[0062] Among them, the weighted incomplete module is a network module that uses the weighted value of the fully connected layer as the output reference. In practical applications, optionally, the convolution kernel of the first convolution layer in the residual network model can be 3×3 or 5×5, and the convolution kernel can be 2; optionally, the convolution kernel of the convolution layer in the weighted incomplete module can be 1×1, and the convolution kernel can be 1. Of course, other convolution kernels can also be selected, which are not specifically limited here.
[0063] S340, training the original neural network model based on the marked historical abnormal data waveform and the unmarked historical normal data waveform to obtain a trained optimal power grid data analysis model.
[0064] Among them, under the above-mentioned historical analysis conditions, the historical normal data waveform without a mark can be considered that the historical analysis result of the historical normal data waveform is normal, and the historical analysis result of the historical abnormal data waveform with a mark is abnormal. In practical applications, optionally, in order to achieve accurate analysis of power grid data, each power grid data analysis model can be trained based on a historical data waveform with the same historical analysis condition, that is, each power grid data analysis model can correspond to its own historical analysis condition. Optionally, the above-mentioned historical data waveforms can be arbitrarily divided into a training set and a verification set. After the power grid data analysis model is obtained based on the training of the historical data waveforms in the training set, the power grid data analysis model can also be verified based on the historical data waveforms in the verification set to judge the training effect of the power grid data analysis model.
[0065] S350, collecting the target data waveform to be analyzed of the smart grid, segmenting the target data waveform based on the sliding window, and using each segmented target sub-data waveform as the target data waveform.
[0066] The target data waveform may be a waveform composed of a plurality of target power grid data, and its acquisition process may be considered as a real-time acquisition process, that is, segmentation is performed based on a sliding window during the real-time acquisition process.
[0067] S360. For each target data waveform, determine the target analysis condition of the target data waveform, and determine from each power grid data analysis model a target power grid data analysis model obtained by training based on historical analysis conditions corresponding to the target analysis condition during the model training process.
[0068] S370, inputting the target data waveform into the target power grid data analysis model, and determining the target analysis result of the target data waveform according to the output result of the target power grid data analysis model.
[0069] S380. Determine whether the target data waveform is a target abnormal data waveform according to the target analysis result.
[0070] S390. If yes, give a real-time warning and exit after the warning; otherwise, exit.
[0071] The technical solution of the embodiment of the present invention, by adding a weighted incomplete module with the weighted value of the fully connected layer as the output reference when constructing the original neural network model, and a loss function calculation module constructed based on the attribute loss function matching the historical attributes, the trained power grid data analysis model has the advantages of small calculation amount and accurate analysis, thereby achieving the effect of early warning for target power grid data with early warning needs with small calculation workload and high accuracy.
[0072] Embodiment 4
[0073] Figure 5 This is a structural block diagram of a power grid data early warning device provided in Embodiment 4 of the present invention. The device is used to execute the power grid data early warning method provided in any of the above embodiments. The device and the power grid data early warning method in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the power grid data early warning device, please refer to the embodiments of the above power grid data early warning method. Figure 5 The device may specifically include: a power grid data input module 410 and a power grid data early warning module 420.
[0074] The power grid data input module 410 is used to collect target power grid data to be analyzed and input the target power grid data into the trained power grid data analysis model, wherein the power grid data analysis model includes a residual network model, the residual network model includes a weighted residual module, and the weighted residual module includes a network module that uses the weighted value of the fully connected layer as an output reference;
[0075] The power grid data early warning module 420 is used to obtain a target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determine whether it is necessary to issue an early warning for the target power grid data according to the target analysis result.
[0076] Optionally, based on the above device, the device may further include:
[0077] A training sample acquisition module is used to obtain the analyzed historical power grid data and the historical analysis results of the historical power grid data, and use the historical power grid data and the historical analysis results as a set of training samples;
[0078] The power grid data analysis model acquisition module is used to train the constructed original neural network model based on multiple groups of training samples to obtain the power grid data analysis model, wherein the original neural network model includes an untrained residual network model.
[0079] On this basis, optionally, the historical power grid data includes first power grid data and second power grid data, and the original neural network model also includes a loss function calculation module, which is a module constructed based on a preset attribute loss function, and the attribute loss function may include attribute formulas related to a first historical attribute value of the first power grid data in a historical attribute and a second historical attribute value of the second power grid data in a historical attribute, as well as feature mapping formulas related to a first feature mapping value learned by the original neural network model for the first power grid data and a second feature mapping value learned for the second power grid data.
[0080] On this basis, optionally, the attribute loss function is expressed by the following formula:
[0081]
[0082] Among them, L a is the loss function calculation result, i is the first power grid data, j is the second power grid data, g i is the first eigenmap value, g j is the second eigenmap value, g i -g j is the feature mapping formula, y i is the first historical attribute value, y j is the second historical attribute value, G is the matrix parameter in the model training process, G(y i -y j ) is an attribute formula.
[0083] Optionally, the historical analysis result includes a historical analysis condition, and the historical analysis condition includes a historical attribute and a historical threshold value corresponding to the historical attribute. The power grid data input module 410 may include:
[0084] a target power grid data analysis model determination unit, used to determine the target analysis conditions of the target power grid data, and determine the target power grid data analysis model trained based on the historical analysis conditions corresponding to the target analysis conditions during the model training process from each trained power grid data analysis model; a first power grid data input unit, used to input the target power grid data into the target power grid data analysis model;
[0085] Accordingly, the power grid data early warning module 420 may include:
[0086] The target analysis result obtaining unit is used to obtain the target analysis result of the target power grid data according to the output result of the target power grid data analysis model.
[0087] Optionally, the power grid data input module 410 may include:
[0088] The target power grid data acquisition unit is used to continuously acquire the target power grid data to be analyzed, segment the target power grid data based on a preset sliding window, and use each target power grid sub-data obtained by segmentation as the target power grid data; the second power grid data input unit is used to input the target power grid data into the trained power grid data analysis model for each target power grid data.
[0089] Optionally, the weighted incomplete module also includes a batch normalization layer connected to the fully connected layer and a convolutional layer connected to the batch normalization layer; and / or, the residual network model also includes an activation layer and / or an average pooling layer connected to the weighted incomplete module.
[0090] The power grid data early warning device provided in the fourth embodiment of the present invention collects the target power grid data to be analyzed through the cooperation between the power grid data input module and the power grid data early warning module, and inputs the target power grid data into the trained power grid data analysis model, obtains the target analysis result of the target power grid data according to the output result of the power grid data analysis model, and determines whether it is necessary to issue an early warning for the target power grid data according to the target analysis result. The above-mentioned power grid data analysis model includes a residual network model, and the residual network model includes a weighted incomplete module with the weighted value of the fully connected layer as the output reference. The introduction of the weighted incomplete module simplifies the network structure of the residual network model, thereby reducing the computational workload of the residual network model, and further improving the working efficiency of the residual network model. The above-mentioned technical scheme, by introducing a weighted incomplete module with the weighted value of the fully connected layer as the output reference in the residual network model, effectively reduces the computational workload of the residual network model, and further reduces the computational workload when issuing an early warning for the target power grid data, thereby completing the effective early warning of the target power grid data with a lower computational workload.
[0091] The early warning device for power grid data provided in the embodiment of the present invention can execute the early warning method for power grid data provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0092] It is worth noting that in the embodiment of the above-mentioned early warning device for power grid data, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0093] Embodiment 5
[0094] Figure 6 A schematic diagram of the structure of a power grid data early warning device provided in Embodiment 5 of the present invention, such as Figure 6As shown, the device includes a memory 510, a processor 520, an input device 530, and an output device 540. The number of processors 520 in the device can be one or more. Figure 6 A processor 520 is used as an example; the memory 510, the processor 520, the input device 530 and the output device 540 in the device can be connected via a bus or other means. Figure 6 The connection via bus 550 is taken as an example.
[0095] The memory 510, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the early warning method for power grid data in the embodiment of the present invention (for example, the power grid data input module 410 and the power grid data early warning module 420 in the early warning device for power grid data). The processor 520 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 510, that is, realizes the above-mentioned early warning method for power grid data.
[0096] The memory 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 510 may further include a memory remotely arranged relative to the processor 520, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0097] The input device 530 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 540 may include a display device such as a display screen.
[0098] Embodiment 6
[0099] Embodiment 6 of the present invention provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a power grid data early warning method when executed by a computer processor, the method comprising:
[0100] Collecting target power grid data to be analyzed, and inputting the target power grid data into a trained power grid data analysis model, wherein the power grid data analysis model includes a residual network model, the residual network model includes a weighted residual module, and the weighted residual module includes a network module that uses the weighted value of the fully connected layer as an output reference;
[0101] The target analysis result of the target power grid data is obtained according to the output result of the power grid data analysis model, and it is determined whether an early warning is needed for the target power grid data according to the target analysis result.
[0102] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present invention are not limited to the method operations described above, and can also execute related operations in the early warning method for power grid data provided in any embodiment of the present invention.
[0103] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention 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 a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0104] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A power grid data early warning method, characterized in that: include: Collecting the analyzed historical data waveforms of the smart grid, segmenting each of the historical data waveforms based on a preset sliding window, and using each segmented historical sub-data waveform as the historical data waveform, wherein the historical data waveform includes a historical normal data waveform and a historical abnormal data waveform; Marking the historical abnormal data waveform, wherein the marking content includes historical analysis conditions, and the historical analysis conditions include historical attributes and historical thresholds corresponding to the historical attributes; Obtain a constructed original neural network model, wherein the original neural network model includes an untrained residual network model, the residual network model includes a convolution layer, a normalization layer, a batch normalization layer, an activation layer, a weighted incomplete module, an average pooling layer and two fully connected layers that are sequentially connected and encapsulated from front to back, the weighted incomplete module includes a network module that uses the weighted value of the fully connected layer as an output reference, and the weighted incomplete module includes a convolution layer, a batch normalization layer and a fully connected layer that are sequentially connected and encapsulated from front to back; the original neural network model also includes a loss function calculation module, which is a module constructed based on a preset attribute loss function, and the attribute loss function is expressed by the following formula: Among them, L a is the result of loss function calculation, g i is the feature mapping value learned by the residual network model at the i-th point in the historical data waveform, g j is the feature mapping value learned by the residual network model at the jth point in the historical data waveform, y i is the historical attribute value of the i-th point in the historical data waveform on the historical attribute, y j is the historical attribute value of the jth point in the historical data waveform on the historical attribute, and G is the matrix parameter in the model training process; The original neural network model is trained based on the marked historical abnormal data waveform and the unmarked historical normal data waveform to obtain a trained optimal power grid data analysis model; Collecting the target data waveform to be analyzed of the smart grid, segmenting the target data waveform based on a sliding window, and using each segmented target sub-data waveform as the target data waveform; For each target data waveform, a target analysis condition for each target data waveform is determined, and a target power grid data analysis model obtained by training based on historical analysis conditions corresponding to the target analysis condition during the model training process is determined from each power grid data analysis model; Inputting the target data waveform into the target power grid data analysis model, and determining the target analysis result of the target data waveform according to the output result of the target power grid data analysis model; Determine whether the target data waveform is a target abnormal data waveform based on the target analysis result. If so, give a real-time warning and exit after the warning. If not, exit.
2. An early warning device for power grid data, characterized in that: include: A historical data waveform acquisition module is used to collect the analyzed historical data waveforms of the smart grid, segment each of the historical data waveforms based on a preset sliding window, and use each segmented historical sub-data waveform as the historical data waveform, wherein the historical data waveform includes a historical normal data waveform and a historical abnormal data waveform; A data marking module, used for marking the historical abnormal data waveform, wherein the marking content includes a historical analysis condition, and the historical analysis condition includes a historical attribute and a historical threshold value corresponding to the historical attribute; The original neural network model acquisition module is used to acquire the constructed original neural network model, wherein the original neural network model includes an untrained residual network model, and the residual network model includes a convolution layer, a normalization layer, a batch normalization layer, an activation layer, a weighted incomplete module, an average pooling layer, and two fully connected layers that are sequentially connected and encapsulated from front to back, and the weighted incomplete module includes a network module that uses the weighted value of the fully connected layer as an output reference, and the weighted incomplete module includes a convolution layer, a batch normalization layer, and a fully connected layer that are sequentially connected and encapsulated from front to back; the original neural network model also includes a loss function calculation module, and the loss function calculation module is a module constructed based on a preset attribute loss function, and the attribute loss function is expressed by the following formula: Among them, L a is the result of loss function calculation, g i is the feature mapping value learned by the residual network model at the i-th point in the historical data waveform, g j is the feature mapping value learned by the residual network model at the jth point in the historical data waveform, y i is the historical attribute value of the i-th point in the historical data waveform on the historical attribute, y j is the historical attribute value of the jth point in the historical data waveform on the historical attribute, and G is the matrix parameter in the model training process; A power grid data analysis model acquisition module, used to train the original neural network model based on the marked historical abnormal data waveform and the unmarked historical normal data waveform to obtain a trained optimal power grid data analysis model; A target data waveform acquisition module is used to collect the target data waveform to be analyzed of the smart grid, segment the target data waveform based on a sliding window, and use each segmented target sub-data waveform as the target data waveform; A target power grid data analysis model determination module is used to determine the target analysis conditions of each target data waveform for each target data waveform, and determine from each power grid data analysis model the target power grid data analysis model obtained by training based on the historical analysis conditions corresponding to the target analysis conditions during the model training process; A target analysis result determination module, used for inputting a target data waveform into a target power grid data analysis model, and determining a target analysis result of the target data waveform according to an output result of the target power grid data analysis model; The early warning module is used to determine whether the target data waveform is a target abnormal data waveform according to the target analysis result. If so, a real-time early warning is given and the module exits after the early warning. If not, the module exits.
3. An early warning device for power grid data, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the early warning method for power grid data as claimed in claim 1.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the early warning method for power grid data according to claim 1 is implemented.
Citation Information
Patent Citations
Harmonic early warning method, harmonic early warning device and terminal equipment
CN110633870A
Crop disease and insect pest type identification method, system and device, and medium
CN111814622A
Construction method of weighted residual neural network
CN112200302A
HER2 image classification method and system based on convolution and residual networks
CN112560968A
Lung distension disease identification method based on multi-task learning
CN112890768A
