Power grid natural disaster early warning method based on knowledge graph and computer equipment

By building a power meteorological knowledge graph and using graph convolution neural network and self-attention mechanism, integrating multi-source data and extracting semantic features, the problems of data integration and feature extraction in the power grid natural disaster warning system are solved, significantly improving the accuracy of prediction Sex and robustness.

CN119398225AActive Publication Date: 2025-02-07WUHAN SANJIANG CLP TECH

Patent Information

Application Number
CN202411409425.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-07
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The existing power grid natural disaster warning system is difficult to effectively integrate multi-source data, and fails to make full use of domain knowledge to enhance model prediction capabilities, resulting in insufficient prediction accuracy and generalization capabilities.

Method used

The power meteorological knowledge graph is constructed based on the knowledge graph, and the disaster weather prediction model is constructed through the graph convolution neural network and self-attention mechanism, integrating meteorological data, geographical information and power equipment data, extracting semantic features and forming fusion features.

Benefits of technology

It improves the accuracy and accuracy of natural disaster prediction in power grids, enhances the generalization ability of the model, solves the problems of multi-source data integration and feature extraction, and significantly improves the robustness and accuracy of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398225A_ABST
    Figure CN119398225A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power meteorological prediction, and aims to solve the problem that a current power grid natural disaster early warning system has defects in feature extraction and cannot fully utilize knowledge in related fields to enhance the prediction capability of a model. The invention discloses a power grid natural disaster early warning method based on a knowledge graph, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: S1, constructing a power meteorological knowledge graph based on meteorological data, geographic information and power equipment data corresponding to a power grid natural disaster; s2, performing feature enhancement on the meteorological data according to semantic features in the knowledge graph to form fusion features; s3, according to the fusion features, constructing a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism; and S4, according to the disaster weather prediction model, performing early warning on the natural disasters of the power grid in the target weather. By adopting the method, the accuracy of power grid natural disaster prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electric power meteorological forecasting, and more specifically, to a knowledge graph-based natural disaster early warning method for power grids, computer equipment, computer-readable storage media, and computer program products. Background Art

[0002] Meteorological factors have an important impact on the safe and stable operation of the power grid. At present, the collection and analysis of power meteorological data has made significant progress, integrating multiple means such as radar planning, online monitoring devices and manual observation, and combining real-time information released by the meteorological department and historical climate data to form a complex, multi-source data set. The establishment of this set aims to fully grasp the meteorological conditions around the transmission lines, but for the current power grid natural disaster warning system, how to effectively integrate these multi-source data and extract valuable information from them for disaster warning is still an urgent problem to be solved.

[0003] In addition, the current power grid natural disaster early warning system has deficiencies in feature extraction and fails to fully utilize knowledge in related fields to enhance the model's predictive capabilities. The model's predictive accuracy and generalization capabilities also need to be improved. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a knowledge graph-based power grid natural disaster early warning method, computer equipment, computer-readable storage medium and computer program product, which will improve the accuracy of power grid natural disaster prediction.

[0005] To achieve the above object, according to a first aspect of the present invention, a method for early warning of natural disasters in a power grid based on a knowledge graph is provided, the method comprising:

[0006] Step S1, constructing a power meteorology knowledge graph based on meteorological data, geographic information and power equipment data corresponding to natural disasters occurring in the power grid;

[0007] Step S2, based on the semantic features in the knowledge graph, the meteorological data is enhanced to form fusion features;

[0008] Step S3, constructing a disaster weather prediction model based on graph convolutional neural network and self-attention mechanism according to the fusion features;

[0009] Step S4, based on the disaster weather prediction model, early warning of natural disasters in the power grid under target weather conditions.

[0010] Furthermore, in the above step S2, according to the semantic features in the knowledge graph, the features of the meteorological data are enhanced to form fusion features, including mapping the entities and relationships in the knowledge graph to the low-dimensional vector space through the knowledge graph embedding algorithm, extracting the low-dimensional vectors, and the low-dimensional vectors represent the semantic features of the electric power meteorology knowledge graph; selecting the corresponding meteorological data according to different prediction tasks; passing the meteorological data through a feature extractor to obtain meteorological features; using the meteorological features as the attributes of the nodes corresponding to the meteorological entities in the knowledge graph, and splicing them with the low-dimensional vectors of the node to form fusion features.

[0011] Furthermore, in the above step S3, according to the fusion features, a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism is constructed, including creating a graph convolutional neural network based on an input layer, a hidden layer, an activation layer and an output layer, wherein the hidden layer is composed of multiple graph convolutional layers, and each graph convolutional layer is used to aggregate and transform the information of adjacent nodes through a graph convolution operation; determining the input of the graph convolutional neural network according to the fusion features; adding a self-attention mechanism to the graph convolutional neural network to obtain a model based on the graph convolutional neural network and the self-attention mechanism; training the model based on the graph convolutional neural network and the self-attention mechanism, and outputting a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism.

[0012] Furthermore, the input of the graph convolutional neural network includes a feature matrix and an adjacency matrix. The input of the graph convolutional neural network is determined according to the fused features, including taking the fused features as node features, each node corresponds to a row of feature vectors, and forming a feature matrix; the adjacency matrix is ​​constructed based on the structural information of the knowledge graph. The adjacency matrix is ​​a binary matrix. The structural information of the knowledge graph includes whether there is a connection between different nodes and the correlation strength.

[0013] Furthermore, the model based on the graph convolutional neural network and the self-attention mechanism is trained to output a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism, including using the Focal Loss function as the loss function for training the model based on the graph convolutional neural network and the self-attention mechanism; training is performed according to the loss function, and the disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism is output.

[0014] Furthermore, in the above step S4, based on the disaster weather prediction model, an early warning is given to natural disasters in the power grid under the target weather, including extracting target semantic features through a knowledge graph embedding algorithm based on the meteorological data, geographic information and power equipment data under the target weather; obtaining corresponding target meteorological data according to the target prediction task; passing the target meteorological data through a feature extractor to obtain target meteorological features; inputting the target meteorological features and target semantic features into the disaster weather prediction model to obtain prediction results; and based on the prediction results, an early warning is given to natural disasters in the power grid under the target weather.

[0015] Furthermore, based on the prediction results, early warnings are issued for natural disasters in the power grid under target weather conditions, including determining a natural disaster warning level for the power grid based on the prediction results; and sending corresponding early warning reminder signals based on different warning levels.

[0016] According to a second aspect of the present invention, there is also provided a computer device, which includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of any one of the above methods.

[0017] According to a third aspect of the present invention, there is also provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0018] According to a fourth aspect of the present invention, there is also provided a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.

[0019] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0020] The present invention provides a knowledge graph-based power grid natural disaster warning method. Based on the meteorological data, geographic information and power equipment data corresponding to the natural disasters in the power grid, a power meteorological knowledge graph is constructed to realize the integration of multi-source power meteorological data; by extracting semantic features from the knowledge graph and combining it with the original meteorological data to form fusion features, the fusion features not only enrich the feature information, but also make full use of the complex spatiotemporal correlation between meteorological data, geographic information and power equipment data; and, according to the fusion features, a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism is constructed, which improves the generalization ability of the model and the accuracy and precision of meteorological disaster prediction, solves the problems of multi-source data integration and feature extraction faced by the current power grid meteorological disaster warning system, makes full use of the correlation between domain knowledge and data, and significantly enhances the prediction robustness and accuracy of the model in the face of extreme weather events and sudden disaster weather events, providing strong support for the safe operation and maintenance of the power industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1A schematic diagram of a flow chart of a natural disaster early warning method for a power grid based on a knowledge graph provided in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of the electric power meteorology knowledge graph provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of forming fusion features provided for the implementation of this application;

[0025] Figure 4 A schematic diagram of the structure of a graph convolutional neural network provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of the interaction between the graph convolutional neural network and the self-attention mechanism module provided in an embodiment of the present application;

[0027] Figure 6 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0029] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0030] like Figure 1 As shown, a method for early warning of natural disasters in power grids based on knowledge graph is provided. The method can be executed by a terminal or by a server that communicates with the terminal through a network. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server can be an independent server or a server cluster composed of multiple servers. The method is applied to a terminal as an example, and includes the following steps:

[0031] Step S1, constructing a power meteorology knowledge graph based on meteorological data, geographic information and power equipment data corresponding to natural disasters occurring in the power grid.

[0032] Among them, the electric power meteorology knowledge graph consists of nodes and edges, each node represents an entity, and each edge represents the relationship between two entities.

[0033] Entities include four key entities: geographic entities, meteorological entities, equipment entities, and disaster entities. Relationships include the association relationship between a disaster entity and any of the other three key entities, and the association relationship between disaster entities.

[0034] Step S2: Enhance the features of meteorological data according to the semantic features in the knowledge graph to form fusion features.

[0035] For example, Figure 3 As shown, the terminal maps entities and relationships in the electric power meteorology knowledge graph to a low-dimensional vector space through a knowledge graph embedding algorithm (such as the TransE model, the ComplEx model, etc.), extracts low-dimensional vectors, and the low-dimensional vectors represent the semantic features of the electric power meteorology knowledge graph; selects corresponding real-time meteorological data according to different prediction tasks; passes the real-time meteorological data through a feature extractor to obtain meteorological features; and fuses meteorological features and semantic features to form fused features. Specifically, the meteorological features and semantic features are fused to form fused features, including using the meteorological features as attributes of the nodes corresponding to the meteorological entities in the electric power meteorology knowledge graph, and splicing them with the low-dimensional vector of the node to form fused features.

[0036] Preferably, the entities and relations in the electric power meteorology knowledge graph are mapped to a low-dimensional vector space through the TransE model. The low-dimensional vector obtained at this time represents the semantic features of the knowledge graph. The core idea of ​​the TransE model is to map entities and relations to the same low-dimensional continuous vector space, so that for any triple (h, l, t), where h is the head entity, t is the tail entity, and l is the relationship between the two, the head entity h should be close to the tail entity t after being "translated" by the relationship l, as shown in formula (1):

[0037] h+l≈t, (1)

[0038] Preferably, the feature extractor adopts a deep learning model pre-trained on an open source dataset, such as Transformer, RNN, or Mamba.

[0039] Step S3, based on the fusion features, a disaster weather prediction model based on graph convolutional neural network and self-attention mechanism is constructed.

[0040] Exemplarily, a graph convolutional neural network is created based on the input layer, hidden layer, activation layer and output layer; the input of the graph convolutional neural network is determined according to the fusion features; a self-attention mechanism is added to the graph convolutional neural network to obtain a model based on the graph convolutional neural network and the self-attention mechanism; the model based on the graph convolutional neural network and the self-attention mechanism is trained, and a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism is output.

[0041] Step S4, based on the disaster weather prediction model, early warning of natural disasters in the power grid under target weather conditions.

[0042] In the above-mentioned knowledge graph-based power grid natural disaster warning method, a power meteorological knowledge graph is constructed based on the meteorological data, geographic information and power equipment data corresponding to the natural disasters in the power grid, so as to realize the integration of multi-source power meteorological data; by extracting semantic features from the knowledge graph and combining it with the original meteorological data, fusion features are formed. The fusion features not only enrich the feature information, but also make full use of the complex spatiotemporal correlation; and, according to the fusion features, a disaster weather prediction model based on graph convolutional neural network and self-attention mechanism is constructed, which improves the generalization ability of the model and the accuracy and precision of meteorological disaster prediction, solves the problems of multi-source data integration and feature extraction faced by the current power grid meteorological disaster warning system, makes full use of the correlation between domain knowledge and data, and significantly enhances the prediction robustness and accuracy of the model in the face of extreme weather events and sudden disaster weather events, providing strong support for the safe operation and maintenance of the power industry.

[0043] In one embodiment, step S1, based on the meteorological data, geographic information and power equipment data corresponding to the natural disasters in the power grid, constructs a power meteorological knowledge graph, including step S11 data collection, step S12 entity recognition and relationship extraction, and step S13 knowledge graph construction.

[0044] The specific steps of data collection in step S11 are as follows: First, collect weather records of natural disasters in the power grid (i.e., extreme weather events), including strong winds, heavy rains, lightning, and cold waves. Obtain detailed meteorological data from these extreme weather events, including temperature, wind speed, rainfall, atmospheric electric field, weather radar, etc. At the same time, collect relevant geographic information, such as topography, climate characteristics, etc., as well as data on power equipment at the location, including transmission towers, transformers, insulators, etc. Finally, integrate the collected meteorological data, geographic information, and power equipment data into structured data.

[0045] The specific steps of entity identification in step S12 are as follows: extract diversified information related to natural disasters in power grids from the collected structured data, and divide the structured data into the following four key entities:

[0046] (1) Geographic entities: involve a series of geographical information, including topography, latitude, climate characteristics, and altitude;

[0047] (2) Meteorological entities: involving a series of meteorological parameters, including temperature, humidity, air pressure, wind direction and speed, rainfall, optical radiation, radar combined reflectivity intensity, and atmospheric electric field intensity;

[0048] (3) Equipment entities: including different types of power equipment and their operating parameters, including transmission towers, transmission lines, transformers, disconnectors, lightning arresters, insulators and other equipment and their operating currents and voltages;

[0049] (4) Disaster entities: used to represent various extreme weather events, including strong winds, heavy rains, lightning, high temperatures, and cold waves.

[0050] Then, the above four types of key entities are processed and each entity is assigned a unique identifier to ensure node uniqueness and unified format.

[0051] The specific steps of relation extraction in step S12 are as follows: identify the logical connection between entities after entity recognition, and construct a relation triple <entity 1, relation, entity 2>. Among them, relations include but are not limited to the following types:

[0052] (1) Meteorological-disaster relationship: used to indicate the relationship between meteorological parameters and extreme weather events, such as <high ​​wind speed triggers strong winds>, ​​<heavy rainfall leads to heavy rain>, <frequent changes in the atmospheric electric field cause lightning>, etc.;

[0053] (2) Geography-hazard relationship: used to indicate the impact of geographic information on the occurrence of extreme weather events, such as <high ​​altitude areas are prone to cold waves>, <tropical areas are prone to strong winds>, ​​<coastal areas are prone to heavy rains>, etc.;

[0054] (3) Disaster-disaster relationship: used to analyze the relationship between two extreme weather events, such as <strong wind, accompanied by heavy rain>, <lightning, accompanied by strong wind>, etc.;

[0055] (4) Disaster-equipment relationship: used to assess the direct impact of extreme weather events on the operation of power equipment, such as <strong winds causing transmission tower tilting>, <lightning causing transformer damage>, <lightning causing insulator flashover>, etc.;

[0056] Step S13: The steps of constructing the knowledge graph are as follows: Store the constructed relationship triple <entity 1, relationship, entity 2> into a graph database such as ne04j or NebulaGraph to form a Figure 2 The electric power meteorology knowledge graph shown.

[0057] In this embodiment, by constructing an electric power meteorological knowledge graph, the integration of multi-source data related to natural disasters in the power grid is achieved. The graph not only contains meteorological data, geographic information and power equipment data corresponding to natural disasters in the power grid, but also captures the complex relationship between them, providing rich semantic information and structured knowledge for subsequent feature enhancement and early warning model training.

[0058] In one embodiment, mapping entities and relationships in the electric power meteorology knowledge graph to a low-dimensional vector space through the TransE model includes the following steps:

[0059] First, create an index dictionary of entities and relations, convert the text into a unique numeric ID, and then generate a certain number of negative samples, usually by randomly replacing the head entity or the tail entity to obtain negative sample triplets such as (h′, l, t) or (h, l, t′). The loss function of the TransE model considers the prediction error of both positive and negative samples. The loss function is expressed as formula (2):

[0060] L=∑(h,l,t)∈s∑(h′,l,t′)

[0061] ∈s′max(0,γ+d(h+l,t)-d(h′+l,t′)), (2)

[0062] Among them, S is the set of positive samples, S′ is the set of negative samples, γ is the loss margin, and d is the distance evaluation function.

[0063] During the training process, the TransE model minimizes the loss function through stochastic gradient descent and uses backpropagation to update the low-dimensional vector representation of entities and relationships. After multiple rounds of iterations, the TransE model is able to learn high-quality knowledge graph representations, effectively representing the distribution of entities and relationships in low-dimensional vector space, thereby obtaining more robust and discriminative relationship representations between entities.

[0064] In one embodiment, extracting features from real-time meteorological data using a Transformer pre-trained model to obtain meteorological features includes the following steps:

[0065] First, data collection is needed to obtain multi-dimensional meteorological data, including temperature, humidity, wind speed, and precipitation. These data can be monitored in real time through weather stations, satellite remote sensing, or other sensors to ensure the timeliness and accuracy of the data. After data collection, data preprocessing is a crucial step. The preprocessing process includes cleaning the collected data, removing missing values ​​and outliers, and standardizing or normalizing the data to improve the feature extraction effect of the model. For time series data, it is also necessary to convert it into a format suitable for Transformer model input, usually by splitting the data into time windows of fixed length.

[0066] Next, the pre-trained Transformer model is used to extract features from real-time meteorological data. Through the encoder part of the model, the output of the intermediate layer can be obtained as a representation of meteorological features. These extracted meteorological features will provide an important basis for subsequent meteorological forecasts and anomaly detection, further improving the accuracy and reliability of forecasts.

[0067] In one embodiment, Figure 3 As shown, the meteorological features and semantic features are fused to form an enhanced feature vector (fused feature), which includes the following steps:

[0068] 1) For the prediction task of strong wind prediction:

[0069] According to formula (3), wind speed, wind direction and semantic features are integrated:

[0070] F w =[f p (V w ), f p (D w ), E KG ], (3)

[0071] Among them, V w is the wind speed set obtained at specific time intervals within the specified time range, D w is the wind direction vector set obtained at specific time intervals within the specified time range, f p is the feature extractor, E KG It is the relevant semantic feature extracted from the knowledge graph. In the strong wind forecast, the extracted wind speed and wind direction features are used as the attributes of the wind speed node and wind direction node corresponding to the meteorological entity in the knowledge graph, and are concatenated with the low-dimensional vector of the node to form a fusion feature.

[0072] 2) For the prediction task of heavy rain:

[0073] According to formula (4), rainfall, humidity, air pressure and semantic features are integrated:

[0074] F r =[f p (R v ), f p (H v ), f p (P v ), E KG ],(4)

[0075] Among them, R v is the rainfall collection obtained at specific time intervals within the specified time range, H v is the humidity set obtained at specific time intervals within the specified time range, P v is the set of air pressures obtained at specific time intervals within a specified time range, f p is the feature extractor, E KG is the relevant semantic feature extracted from the knowledge graph. In the rainstorm prediction, the extracted rainfall, humidity and air pressure features are used as the attributes of the rainfall node, humidity node and air pressure node corresponding to the meteorological entity in the knowledge graph, and these attributes are concatenated with the low-dimensional vector of the corresponding node to generate the fusion feature.

[0076] 3) For the prediction task of lightning prediction:

[0077] According to formula (5), the atmospheric electric field intensity, six relevant meteorological elements, meteorological radar data features and semantic features are integrated:

[0078] F l =[f p (E f ), f p (M f ), f p (R f ), E KG ],(5)

[0079] Among them, E f is the atmospheric electric field strength set obtained at specific time intervals within a specified time range, M f is the vector set of six relevant meteorological elements (temperature, humidity, air pressure, wind direction, wind speed and precipitation) obtained at specific time intervals within a specified time range, R f is the feature vector set of meteorological radar data (such as radial velocity, radar echo, etc.) obtained at specific time intervals within a specified time range, f p is the feature extractor, E KGis the relevant semantic feature extracted from the knowledge graph. In lightning prediction, the extracted atmospheric electric field strength, six meteorological elements and meteorological radar data features are used as the attributes of the atmospheric electric field strength node, six meteorological elements node and meteorological radar node corresponding to meteorological entities in the knowledge graph. By splicing these attributes with the low-dimensional vectors of the corresponding nodes, fusion features are generated.

[0080] Through the above steps, an enhanced feature vector, namely the fusion feature, is formed, which realizes the feature enhancement of the original data and integrates the rich semantic information in the knowledge graph. The enhanced feature vector not only provides rich feature information, but also makes full use of the complex spatiotemporal correlation, which helps to improve the accuracy of natural disaster predictions for power grids such as strong winds, heavy rains and lightning.

[0081] In one embodiment, Figure 4 As shown, step S3, based on the fusion features, constructs a disaster weather prediction model based on graph convolutional neural network and self-attention mechanism, including the following steps:

[0082] (1) Build a model based on graph convolutional neural network and self-attention mechanism.

[0083] like Figure 4 As shown in the figure, a graph convolutional neural network is created based on the input layer, hidden layer, activation layer and output layer. First, the input layer receives the feature matrix and graph structure information; the hidden layer is composed of multiple graph convolutional layers, each of which aggregates and transforms the information of adjacent nodes through graph convolution operations; the activation layer uses a nonlinear activation function (such as ReLU) to introduce nonlinear features through the activation layer; finally, the output layer generates the prediction results of the network.

[0084] Graph Convolutional Network (GCN) mainly processes graph data and has two inputs: feature matrix and graph structure information (adjacency matrix).

[0085] Taking lightning prediction as an example, the fusion feature [f p (E f ), f p (M f ), f p (R f ), E KG ] is converted into the input of the GCN model. First, [f p (E f ), f p (M f ), f p (R f ), E KG] as node features, each node corresponds to a row of feature vectors, forming a feature matrix H(1). Next, the adjacency matrix A is constructed based on the structural information of the knowledge graph. The adjacency matrix is ​​a binary matrix. For example, A[i][j] indicates whether there is a connection between node i and node j and the strength of the connection. Each layer of the GCN model can be expressed as a nonlinear function:

[0086] H (l+1) =g(H (l) , A), (6)

[0087] Where l is the number of layers, H l is the output of the previous layer, and g is the design function. The commonly used GCN model architecture usually takes the following form:

[0088]

[0089] Among them, A is the adjacency matrix with the identity matrix added, D is the corresponding degree matrix, W is the learnable parameter matrix, and σ is the nonlinear activation function.

[0090] like Figure 4 As shown in Figure 1, GCN models usually consist of multiple hidden layers. This stacked design helps capture complex patterns and high-order features in the data. Figure 4 The GCN model shown in sets 64 hidden layers (GCN-64 for short), each of which transforms the input node features and uses the topological structure of the graph to aggregate the information of neighboring nodes.

[0091] In order to improve the generalization ability of the GCN model and make full use of the fusion features, a self-attention mechanism (SimAM module) is added to the GCN model to obtain a model based on graph convolutional neural network and self-attention mechanism (also known as GCN-SimAM model). SimAM is a lightweight self-attention mechanism. It is inspired by visual neuroscience and believes that neurons with specific discharge patterns are the most informative and should be given important weights. Traditional attention mechanisms (such as channel and spatial attention) only refine features in a single dimension and ignore other dimensions. SimAM treats all dimensions equally and generates three-dimensional weights.

[0092] Specifically, a SimAM module is introduced after each hidden layer, and the output of the hidden layer is used as the input of the SimAM module, such as Figure 5 As shown in the figure, the input features are first extracted through the ReLU activation layer, and then the three-dimensional weights (i.e., 3D weights) are generated through the energy function. The weight adjustment is generated through the Sigmoid function, and finally the adjusted features are fused with the original input features to output the optimized results.

[0093] SimAM uses an energy function method to identify neurons with spatial inhibition effects. For example, the minimum energy function of the kth neuron is The calculation formula is:

[0094]

[0095] Among them, λ is the regularization term, t k is the kth neuron of the input feature map on a single channel, is the variance of all neurons on a single channel, is the mean of all neurons on a single channel. The smaller it is, the lower the energy is. The more different the k-th neuron is from the surrounding neurons, the more important it is.

[0096] (2) Define the loss function.

[0097] In view of the difficulty in collecting disaster weather data and the extremely unbalanced sample distribution, the Focal Loss function is used as the loss function for training. This function effectively reduces the impact of class imbalance on model training by reducing the weight of samples with a large number and increasing the weight of samples with a small number. The formula of the Focal Loss function is:

[0098] L=-α t (1-p t ) γ log p t ,(9)

[0099] Among them, p t is the model’s prediction confidence score, α t It is an indicator to balance the importance of positive and negative samples, and γ is a focusing parameter.

[0100] (3) Train the GCN-SimAM model based on the loss function.

[0101] During the training process, the Adam optimizer is used to optimize the model, and the learning rate decay strategy is adopted until the training is completed, and the disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism is output. In order to illustrate the effectiveness of the GCN-SimAM model, a variety of typical algorithms, including MLP, GCN-64, and GAT, are trained on the same data set. Through this series of training, the prediction accuracy of each model is obtained, as shown in Table 1.

[0102] Table 1

[0103]

[0104]

[0105] It can be seen that the GCN-SimAM model surpasses all the comparison models in terms of accuracy, proving that the introduction of the SimAM module can effectively improve the model performance.

[0106] Through the above steps, a disaster weather prediction model based on graph convolutional neural network and self-attention mechanism was built and trained. The model takes fusion features as input, introduces SimAM module to improve the generalization ability of GCN model, uses Focal Loss as loss function to deal with data imbalance problem, and uses Adam optimizer for model training optimization. Finally, the trained disaster weather prediction model has a high accuracy rate of natural disaster prediction.

[0107] In one embodiment, the above step S4, based on the disaster weather prediction model, issues an early warning for natural disasters in the power grid under target weather conditions, including the following steps: extracting target semantic features through a knowledge graph embedding algorithm (such as TransE) based on the meteorological data, geographic information and power equipment data under the target weather conditions; obtaining corresponding target meteorological data according to the target prediction task; passing the target meteorological data through a feature extractor to obtain target meteorological features; inputting the target meteorological features and the target semantic features into the disaster weather prediction model to obtain prediction results; and issuing an early warning for natural disasters in the power grid under target weather conditions (lightning, cold waves, heavy rains, strong winds; shaking of transmission lines, tilting of transmission towers) based on the prediction results.

[0108] As shown in Table 2, when the target prediction task is a strong wind warning, if the predicted wind speed v (i.e., the model prediction result of the disaster weather prediction model corresponding to the target weather being a strong wind day) exceeds the standard wind speed v p , the warning level is determined according to the ratio; the warning levels include level one, level two, level three, and level four; according to different warning levels, corresponding warning reminder signals are sent, such as level one is a red signal, level two is an orange signal, level three is a yellow signal, and level four is a blue signal.

[0109] Table 2

[0110] Warning level Forecast wind speed range Level 1 (red) <![CDATA[1.1v p ≤v]]> Level 2 (orange) <![CDATA[1.05v p ≤v<1.1v p ]]> Level 3 (yellow) <![CDATA[1.0v p ≤v<1.05v p ]]> Level 4 (blue) <![CDATA[0.95v p ≤v<1.0v p ]]>

[0111] In this embodiment, by obtaining the target semantic features under the target weather and the target meteorological data corresponding to the target prediction task, these two are input into the disaster weather prediction model to obtain the prediction results. Since the disaster weather prediction model has high prediction accuracy and precision, therefore, issuing an alarm based on the prediction results obtained by the model can achieve the purpose of obtaining more accurate power meteorological disaster warning results.

[0112] The present application also provides a computer device, the internal structure diagram of the computer can be as follows Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a natural disaster warning method for a power grid based on a knowledge graph is implemented.

[0113] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] like Figure 6 As shown, the present application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.

[0115] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0116] The present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0117] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0119] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

[0120] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0121] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A natural disaster early warning method for power grid based on knowledge graph, characterized in that: include: Step S1, constructing a power meteorology knowledge graph based on meteorological data, geographic information and power equipment data corresponding to natural disasters occurring in the power grid; Step S2, based on the semantic features in the knowledge graph, feature enhancement is performed on the meteorological data to form fusion features; Step S3, constructing a disaster weather prediction model based on graph convolutional neural network and self-attention mechanism according to the fusion features; Step S4: issuing an early warning for natural disasters in the power grid under target weather conditions according to the disaster weather prediction model.

2. The method according to claim 1, characterized in that The step S2, based on the semantic features in the knowledge graph, performs feature enhancement on the meteorological data to form fusion features, includes: Mapping entities and relationships in the knowledge graph to a low-dimensional vector space through a knowledge graph embedding algorithm, extracting a low-dimensional vector, wherein the low-dimensional vector represents the semantic features of the electric power meteorology knowledge graph; Select corresponding meteorological data according to different forecasting tasks; Passing the meteorological data through a feature extractor to obtain meteorological features; The meteorological features are used as attributes of nodes corresponding to meteorological entities in the knowledge graph, and are concatenated with low-dimensional vectors of the nodes to form fusion features.

3. The method according to claim 1, characterized in that The step S3, based on the fusion features, constructs a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism, including: Based on the input layer, the hidden layer, the activation layer and the output layer, a graph convolutional neural network is created, wherein the hidden layer is composed of a plurality of graph convolutional layers, each of which is used to aggregate and transform information of adjacent nodes through a graph convolution operation; Determining the input of the graph convolutional neural network according to the fusion features; Adding a self-attention mechanism to the graph convolutional neural network to obtain a model based on the graph convolutional neural network and the self-attention mechanism; The model based on the graph convolutional neural network and the self-attention mechanism is trained to output a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism.

4. The method according to claim 3, characterized in that The input of the graph convolutional neural network includes a feature matrix and an adjacency matrix, and determining the input of the graph convolutional neural network according to the fusion features includes: The fused features are used as node features, and each node corresponds to a row of feature vectors to form a feature matrix; An adjacency matrix is ​​constructed based on the structural information of the knowledge graph, where the adjacency matrix is ​​a binary matrix. The structural information of the knowledge graph includes whether there is a connection between different nodes and the correlation strength.

5. The method according to claim 3, characterized in that The training of the model based on the graph convolutional neural network and the self-attention mechanism to output a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism includes: A Focal Loss function is used as a loss function for training the model based on the graph convolutional neural network and the self-attention mechanism; Training is performed according to the loss function to output a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism.

6. The method according to claim 1, characterized in that The step S4, according to the disaster weather prediction model, provides early warning for natural disasters in the power grid under target weather conditions, including: According to the meteorological data, geographic information and power equipment data under the target weather, the target semantic features are extracted through the knowledge graph embedding algorithm; According to the target prediction task, obtain the corresponding target meteorological data; Passing the target meteorological data through a feature extractor to obtain target meteorological features; Inputting the target meteorological features and the target semantic features into the disaster weather prediction model to obtain a prediction result; Based on the forecast results, early warnings are issued for natural disasters in power grids under target weather conditions.

7. The method according to claim 6, characterized in that According to the prediction results, early warning of natural disasters in the power grid under target weather conditions is provided, including: Determine the natural disaster warning level of the power grid based on the prediction results; According to different warning levels, corresponding warning reminder signals are sent.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Lightning detection method and device, computer equipment and readable medium

    CN112396116A

  • Equipment disaster accident prediction method

    CN114519464A

  • Power grid operation and maintenance knowledge graph construction method and system

    CN115759253A

  • Equipment fault early warning language generation method

    CN116484853A

  • Fault information early warning system and method based on electrical equipment inspection knowledge graph

    CN117114657A

Cited By

  • Mountain torrent disaster risk level prediction method based on knowledge graph and graph neural network

    CN119721722A

  • Mountain flood disaster risk level prediction method based on knowledge graph and graph neural network

    CN119721722B

  • Weather and meteorological risk early warning method and system

    CN119918958A

  • Weak weather power grid risk identification method and system based on knowledge graph

    CN120373156A

  • Power equipment meteorological monitoring and early warning system based on artificial intelligence

    CN120507808A