A power grid natural disaster early warning method and computer device based on a knowledge graph

By constructing a power meteorological knowledge graph and combining the graph convolution neural network and self-attention mechanism, the shortcomings of the power grid natural disaster warning system in feature extraction and data integration are solved, and higher prediction accuracy and robustness are achieved, supporting the safe operation and maintenance of the power industry.

CN119398225BActive Publication Date: 2025-07-25WUHAN SANJIANG CLP TECH
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing power grid natural disaster warning system has shortcomings in feature extraction, and fails to fully utilize knowledge in related fields to enhance the prediction ability of the model, resulting in insufficient prediction accuracy and generalization ability.

Method used

Construct a power meteorological knowledge graph, extract semantic features through a knowledge graph embedding algorithm, combine graph convolution neural network and self-attention mechanism to build a disaster weather prediction model, integrate meteorological, geography and power equipment data, and form fusion features for early warning.

Benefits of technology

It improves the accuracy and accuracy of natural disaster prediction in power grids, enhances the robustness of the model's prediction in extreme weather events and sudden disasters, and provides strong support for the safe operation and maintenance of the power industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398225B_ABST
    Figure CN119398225B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power meteorological prediction. In order to solve the problem that the current power grid natural disaster warning system has deficiencies in feature extraction and fails to make full use of the knowledge in related fields to enhance the prediction ability of the model, a power grid natural disaster warning method, a computer device, a computer-readable storage medium, and a computer program product based on a knowledge graph are disclosed. The method includes step S1 of constructing a power meteorological knowledge graph based on meteorological data, geographic information, and power equipment data corresponding to the occurrence of power grid natural disasters; step S2 of enhancing the features of the meteorological data according to the semantic features in the knowledge graph to form fused features; step S3 of constructing a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism according to the fused features; and step S4 of warning of power grid natural disasters under target weather according to the disaster weather prediction model. Using this method can improve the accuracy of power grid natural disaster prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of power meteorological prediction, and more specifically, to a power grid natural disaster early warning method, a computer device, a computer-readable storage medium, and a computer program product based on a knowledge graph. Background Art

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

[0003] Moreover, the current power grid natural disaster early warning system has deficiencies in feature extraction, fails to fully utilize the knowledge in related fields to enhance the prediction ability of the model, and the prediction accuracy and generalization ability of the model also need to be improved. Summary of the Invention

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

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

[0006] Step S1, constructing a power meteorological knowledge graph based on meteorological data, geographical information, and power equipment data corresponding to the occurrence of power grid natural disasters;

[0007] Step S2, enhancing the features of the meteorological data according to the semantic features in the knowledge graph to form fused features;

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

[0009] Step S4, warning of power grid natural disasters under the target weather according to the disaster weather prediction model.

[0010] Further, in the above step S2, according to the semantic features in the knowledge graph, the meteorological data is enhanced in features to form fused features, including mapping the entities and relationships in the knowledge graph into a low-dimensional vector space through a knowledge graph embedding algorithm, extracting low-dimensional vectors, where the low-dimensional vectors represent the semantic features of the power meteorological knowledge graph; selecting corresponding meteorological data according to different prediction tasks; passing the meteorological data through a feature extractor to obtain meteorological features; taking the meteorological features as the attributes of the nodes corresponding to the meteorological entity representations in the knowledge graph and splicing them with the low-dimensional vectors of the nodes to form fused features.

[0011] Further, in the above step S3, according to the fused 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, where the hidden layer consists of multiple graph convolutional layers, and each graph convolutional layer is used to aggregate and transform the information of adjacent nodes through graph convolutional operations; determining the input of the graph convolutional neural network according to the fused 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] Further, the input of the graph convolutional neural network includes a feature matrix and an adjacency matrix. Determining the input of the graph convolutional neural network according to the fused features includes taking the fused features as node features, with each node corresponding to a row of feature vectors to form a feature matrix; constructing an adjacency matrix based on the structural information of the knowledge graph, where the adjacency matrix is a binary matrix, and the structural information of the knowledge graph includes whether there are connections and the relevant strengths between different nodes.

[0013] Further, 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 includes 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 according to the loss function, and outputting a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism.

[0014] Further, in the above step S4, according to the disaster weather prediction model, early warnings are issued for power grid natural disasters under the target weather, including extracting target semantic features through a knowledge graph embedding algorithm according to the meteorological data, geographical 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 a prediction result; and issuing early warnings for power grid natural disasters under the target weather according to the prediction result.

[0015] Further, according to the prediction result, a warning is issued for natural disasters of the power grid under the target weather, including determining the warning level of natural disasters of the power grid according to the prediction result; and sending corresponding warning reminder signals according to different warning levels.

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

[0017] According to the 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 one of the above methods are implemented.

[0018] According to the fourth aspect of the present invention, there is also provided a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0019] Generally speaking, compared with the prior art through the above technical solutions conceived by the present invention, the following beneficial effects can be obtained:

[0020] A method for warning natural disasters of a power grid based on a knowledge graph provided by the present invention constructs a power meteorological knowledge graph based on meteorological data, geographical information, and power equipment data corresponding to the occurrence of natural disasters of the power grid, realizing the integration of multi-source power meteorological data; by extracting semantic features from the knowledge graph and combining them 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 spatio-temporal correlation between meteorological data, geographical 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, improving the generalization ability of the model and the accuracy and precision of meteorological disaster prediction, solving the problems of multi-source data integration and feature extraction faced by the current power grid meteorological disaster warning system, making full use of domain knowledge and the correlation between data, and significantly enhancing 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. Description of the Drawings

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0022] Figure 1Schematic flowchart of a power grid natural disaster warning method provided by an embodiment of the present application;

[0023] Figure 2 Schematic diagram of a power meteorology knowledge graph provided by an embodiment of the present application;

[0024] Figure 3 Schematic diagram of forming a fusion feature provided by an embodiment of the present application;

[0025] Figure 4 Schematic structural diagram of a graph convolutional neural network provided by an embodiment of the present application;

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

[0027] Figure 6 Schematic internal structure diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0028] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to 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 used 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, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. 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 further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0030] As Figure 1 shown, a power grid natural disaster warning method based on a knowledge graph is provided. This method can be executed by a terminal or by a server that communicates with the terminal through a network. Among them, the terminal can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, portable wearable devices, etc. The server can be an independent server or implemented by a server cluster composed of multiple servers. Taking the application of this method to a terminal as an example for illustration, the following steps are included:

[0031] Step S1, construct an electric power meteorological knowledge graph based on meteorological data, geographical information, and power equipment data corresponding to natural disasters occurring in the power grid.

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

[0033] The entities include four types of key entities: geographical entities, meteorological entities, equipment entities, and disaster entities. The relationships include the association relationships between disaster entities and any one of the other three types of key entities, as well as the association relationships between disaster entities and disaster entities.

[0034] Step S2, enhance the features of the meteorological data according to the semantic features in the knowledge graph to form fused features.

[0035] Exemplarily, as Figure 3 shown, the terminal maps the entities and relationships in the electric power meteorological knowledge graph to a low-dimensional vector space through a knowledge graph embedding algorithm (such as the TransE model, ComplEx model, etc.), extracts low-dimensional vectors, and the low-dimensional vectors represent the semantic features of the electric power meteorological knowledge graph; according to different prediction tasks, select corresponding real-time meteorological data; pass the real-time meteorological data through a feature extractor to obtain meteorological features; fuse the meteorological features and semantic features to form fused features. Specifically, fusing the meteorological features and semantic features to form fused features includes taking the meteorological features as the attributes of the nodes corresponding to the meteorological entities represented in the electric power meteorological knowledge graph and splicing them with the low-dimensional vectors of these nodes to form fused features.

[0036] Preferably, map the entities and relationships in the electric power meteorological knowledge graph to a low-dimensional vector space through the TransE model, and at this time, the obtained low-dimensional vectors represent the semantic features of the knowledge graph. The core idea of the TransE model is to map entities and relationships 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, after the head entity h is "translated" by the relationship l, it should be close to the tail entity t, as shown in formula (1):

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

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

[0039] Step S3, construct a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism according to the fused features.

[0040] Exemplarily, based on the input layer, hidden layer, activation layer, and output layer, a graph convolutional neural network is created; 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, according to the disaster weather prediction model, give an early warning of the power grid natural disasters under the target weather.

[0042] In the above power grid natural disaster early warning method based on the knowledge graph, a power meteorological knowledge graph is constructed based on the meteorological data, geographical information, and power equipment data corresponding to the occurrence of power grid natural disasters, realizing the integration of multi-source power meteorological data; by extracting semantic features from the knowledge graph and combining them with the original meteorological data, a fusion feature is formed. The fusion feature not only enriches the feature information but also makes full use of the complex spatio-temporal correlation; moreover, according to the fusion feature, a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism is constructed, improving the generalization ability of the model and the accuracy and precision of meteorological disaster prediction, solving the problems of multi-source data integration and feature extraction faced by the current power grid meteorological disaster early warning system, making full use of domain knowledge and the correlation between data, and significantly enhancing 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, constructing a power meteorological knowledge graph based on the meteorological data, geographical information, and power equipment data corresponding to the occurrence of power grid natural disasters includes step S11 data collection, step S12 entity recognition and relationship extraction, and step S13 knowledge graph construction.

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

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

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

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

[0048] (3) Equipment entities: Include different types of power equipment and their operating parameters, including transmission towers, transmission lines, transformers, disconnectors, lightning arresters, insulators, etc. and their operating current and voltage;

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

[0050] Then, process the above four types of key entities, and assign a unique identifier to each entity to ensure the uniqueness of nodes and the uniformity of formats.

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

[0052] (1) Meteorology-disaster relationship: Used to represent the association between meteorological parameters and extreme weather events, such as <high wind speed, trigger, strong wind>, <heavy rainfall, cause, heavy rain>, <frequent jumps in the atmospheric electric field, cause, lightning>, etc.;

[0053] (2) Geography-disaster relationship: Used to represent the impact of geographical information on the occurrence of extreme weather events, such as <high-altitude areas, vulnerable to, cold snaps>, <tropical regions, vulnerable to, strong winds>, <coastal areas, prone to, heavy rain>, 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 evaluate the direct impact of extreme weather events on the operation of power equipment, such as <strong wind, cause, transmission tower tilt>, <lightning, cause, transformer damage>, <lightning, cause, insulator flashover>, etc.;

[0056] The steps of knowledge graph construction in step S13 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 shown power meteorology knowledge graph.

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

[0058] In one embodiment, the entities and relationships in the power meteorological knowledge graph are mapped to a low-dimensional vector space through the TransE model, including the following steps:

[0059] First, create an index dictionary for entities and relationships, convert the text into unique digital IDs, and then generate a certain number of negative samples, usually by randomly replacing the head entity or the tail entity, to obtain negative sample triples such as (h′, l, t) or (h, l, t′). The loss function of the TransE model simultaneously considers the prediction errors of positive and negative samples, and this loss function is expressed by 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] Where 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 updates the low-dimensional vector representations of entities and relationships using backpropagation. After multiple rounds of iteration, the TransE model can learn a high-quality knowledge graph representation, effectively representing the distribution of entities and relationships in the low-dimensional vector space, thereby obtaining a more robust and discriminative relationship representation between entities.

[0064] In one embodiment, meteorological features are extracted from real-time meteorological data through the Transformer pre-training model, including the following steps:

[0065] First, data collection is required to obtain multi-dimensional meteorological data, including temperature, humidity, wind speed, precipitation, etc. 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 to remove missing values and outliers, and at the same time normalizing or standardizing 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 input to the Transformer model, usually by splitting the data into fixed-length time windows.

[0066] Next, use the pre-trained Transformer model 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 the representation of meteorological features. These extracted meteorological features will provide an important basis for subsequent meteorological prediction and anomaly detection, further improving the accuracy and reliability of the prediction.

[0067] In one embodiment, as Figure 3 shown, fusing meteorological features and semantic features to form an enhanced feature vector (fusion feature) includes the following steps:

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

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

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

[0071] where V w is the set of wind speeds obtained at specific time intervals within a specified time range, D w is the set of wind direction vectors obtained at specific time intervals within a specified time range, f p is the feature extractor, and E KG is the relevant semantic feature extracted from the knowledge graph. In strong wind prediction, 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 representation in the knowledge graph respectively, 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 prediction:

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

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

[0075] wherein, R v is a set of rainfall amounts obtained at specific time intervals within a specified time range, H v is a set of humidity levels obtained at specific time intervals within a specified time range, P v is a set of atmospheric pressures obtained at specific time intervals within a specified time range, f p is a feature extractor, and E KG is the relevant semantic feature extracted from the knowledge graph. In heavy rain prediction, the extracted rainfall, humidity, and atmospheric pressure features are used as the attributes of the rainfall node, humidity node, and atmospheric pressure node corresponding to the meteorological entity representation in the knowledge graph, respectively. By concatenating these attributes with the low-dimensional vectors of the corresponding nodes, a fused feature is generated.

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

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

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

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

[0080] Through the above steps, an enhanced feature vector, i.e., the fused feature, is formed, realizing the feature enhancement of the original data and integrating 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 spatio-temporal correlation, thus helping to improve the accuracy of predicting power grid natural disasters such as strong winds, heavy rains, and lightning.

[0081] In one embodiment, as Figure 4 shown, in step S3, according to the fused features, a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism is constructed, including the following steps:

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

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

[0084] The graph convolutional neural network (Graph Convolutional Network, abbreviated as GCN) mainly processes graph data and has two inputs: the feature matrix and graph structure information (adjacency matrix).

[0085] Taking lightning prediction as an example, the fused features [f p (E f ),f p (M f ),f p (R f ),E KG are converted into the input of the GCN model. First, [f p (E f ),f p (M f ),f p (R f ),E KGAs node features, each node corresponds to a row of feature vectors, forming a feature matrix H(1). Next, an 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] represents whether there is a connection between node i and node j and the relevant strength. Each layer of the GCN model can be represented as a non-linear 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 designed function. The commonly used GCN model architecture usually adopts the following form:

[0088]

[0089] where A is the adjacency matrix added with the identity matrix, D is the corresponding degree matrix, W is the learnable parameter matrix, and σ is the non-linear activation function.

[0090] As Figure 4 shown, the GCN model usually consists of multiple hidden layers. This stacked design helps to capture complex patterns and high-order features in the data. Figure 4 The GCN model shown in is set with 64 hidden layers (abbreviated as GCN-64). Each hidden layer transforms the input node features and uses the topological structure of the graph to aggregate the information of neighbor nodes.

[0091] To improve the generalization ability of the GCN model and make full use of the fused features, a self-attention mechanism (SimAM module) is added to the GCN model to obtain a model based on the graph convolutional neural network and the self-attention mechanism (also called the GCN-SimAM model). SimAM is a lightweight self-attention mechanism. Inspired by visual neuroscience, it believes that neurons with specific firing 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 while ignoring other dimensions. In contrast, SimAM treats all dimensions equally and generates three-dimensional weights.

[0092] Specifically, the SimAM module is introduced after each hidden layer, and the output of the hidden layer is used as the input of the SimAM module. As Figure 5 shown, first, the input features are extracted through the ReLU activation layer, 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 result.

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

[0094]

[0095] where λ is the regularization term, t k is the k-th neuron on a single channel of the input feature map, 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, and the greater the difference between the k-th neuron and its 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 weights of samples with a larger quantity and increasing the weights of samples with a smaller quantity. The formula of the Focal Loss function is:

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

[0099] where p t is the predicted confidence score of the model, α t is the importance index for balancing positive and negative samples, and γ is the focusing parameter.

[0100] (3) Train the GCN-SimAM model according to 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 a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism is output. To illustrate the effectiveness of the GCN-SimAM model, on the same dataset, multiple typical algorithms are trained for comparison, including MLP, GCN-64, and GAT. Through this series of trainings, the prediction accuracies of each model are obtained, as shown in Table 1.

[0102] Table 1

[0103]

[0104]

[0105] It can be seen that the GCN-SimAM model outperforms 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 is built and trained. This model takes the fused features as input, introduces the SimAM module to enhance the generalization ability of the GCN model, uses Focal Loss as the loss function to deal with the problem of data imbalance, and uses the Adam optimizer to optimize the model training. Finally, the trained disaster weather prediction model has a high natural disaster prediction accuracy.

[0107] In one embodiment, in step S4 above, according to the disaster weather prediction model, a warning is issued for the power grid natural disasters under the target weather, including the following steps: extracting the target semantic features through a knowledge graph embedding algorithm (such as TransE) based on the meteorological data, geographical information, and power equipment data under the target weather; obtaining the corresponding target meteorological data according to the target prediction task; passing the target meteorological data through a feature extractor to obtain the target meteorological features; inputting the target meteorological features and the target semantic features into the disaster weather prediction model to obtain a prediction result; and issuing a warning for the power grid natural disasters (lightning, cold wave, rainstorm, strong wind; galloping of transmission lines, tilting of transmission towers) under the target weather according to the prediction result.

[0108] As shown in Table II, when the target prediction task is 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 of strong wind) 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 a red signal for level one, an orange signal for level two, a yellow signal for level three, and a blue signal for level four.

[0109] Table II

[0110] Warning Level Predicted 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 and the target meteorological data corresponding to the target prediction task under the target weather, and inputting these two into the disaster weather prediction model to obtain a prediction result, since the disaster weather prediction model has high prediction accuracy and precision, therefore, issuing a warning according to the prediction result obtained by the model can achieve the purpose of obtaining a more accurate power meteorological disaster warning result.

[0112] This application also provides a computer device, and the internal structure diagram of this computer can be as Figure 6As shown in the figure. 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 external devices. The communication interface of the computer device is used to communicate with external terminals 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, it implements a method for early warning of natural disasters in the power grid based on a knowledge graph.

[0113] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures 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 some components, or have different component arrangements.

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

[0115] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in the above method embodiments. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nano-systems (including molecular memory ICs), 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. When the computer program is executed by a processor, it implements the steps in the above method embodiments.

[0117] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0118] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0119] As mentioned above, the above are only exemplary embodiments of the present disclosure, and the scope of the present disclosure cannot be limited thereby. That is, any equivalent changes and modifications made according to the teachings of the present disclosure still fall within the scope covered by the present disclosure. Those skilled in the art will readily think of the implementation schemes of the present disclosure after considering the specification and practicing the present disclosure here. This application aims to cover any variations, uses or adaptive changes of the present disclosure, and these variations, uses or adaptive changes follow the general principles of the present disclosure and include the common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and the embodiments 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 can be combined arbitrarily. For the sake of concise description, 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, it should be considered as the scope recorded in this specification.

[0121] Those skilled in the art can easily understand that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A power grid natural disaster early warning method based on a knowledge graph, characterized in that, Including: Step S1: Construct a power meteorological knowledge graph based on meteorological data, geographical information, and power equipment data corresponding to the occurrence of natural disasters in the power grid. Step S2: Map the entities and relationships in the knowledge graph to a low-dimensional vector space through a knowledge graph embedding algorithm to extract low-dimensional vectors, where the low-dimensional vectors represent the semantic features of the power meteorological knowledge graph; select corresponding meteorological data according to different prediction tasks; pass the meteorological data through a feature extractor to obtain meteorological features; use the meteorological features as the attributes of the nodes corresponding to meteorological entities in the knowledge graph and splice them with the low-dimensional vectors of the nodes to form fused features. Step S3: Construct a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism according to the fused features, including using the fused features as node features, with each node corresponding to a row of feature vectors to form a feature matrix. Construct an adjacency matrix based on the structural information of the knowledge graph. The adjacency matrix is a binary matrix, and the structural information of the knowledge graph includes whether there is a connection and the relevant strength between different nodes. The input layer of the graph convolutional neural network receives the feature matrix and the adjacency matrix; introduce a self-attention mechanism after each hidden layer of the graph convolutional neural network. The self-attention mechanism is the SimAM module. Use the output of the hidden layer as the input of the SimAM module. Extract the input features through the ReLU activation layer, generate three-dimensional weights through an energy function, generate weight adjustment through the Sigmoid function, and finally fuse the adjusted features with the original input features to output an optimized result, thereby constructing a model based on a graph convolutional neural network and a self-attention mechanism. Step S4: Give an early warning of natural disasters in the power grid under the target weather according to the disaster weather prediction model.

2. The method according to claim 1, wherein In step S3, constructing a disaster weather prediction model based on a graph convolutional neural network and a self-attention mechanism according to the fused features further includes: Create a graph convolutional neural network based on an input layer, hidden layers, activation layers, and an output layer. The hidden layers consist of multiple graph convolutional layers, and each graph convolutional layer is used to aggregate and transform the information of adjacent nodes through graph convolutional operations. Train the model based on the graph convolutional neural network and the self-attention mechanism and output a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism.

3. The method according to claim 2, characterized in that, The training of 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 includes: Use the Focal Loss function as the loss function for training the model based on the graph convolutional neural network and the self-attention mechanism. Train according to the loss function and output a disaster weather prediction model based on the graph convolutional neural network and the self-attention mechanism.

4. The method according to claim 1, characterized in that, In step S4, giving an early warning of natural disasters in the power grid under the target weather according to the disaster weather prediction model includes: Extract target semantic features through a knowledge graph embedding algorithm according to the meteorological data, geographical information, and power equipment data under the target weather. Obtain corresponding target meteorological data according to the target prediction task; Pass the target meteorological data through a feature extractor to obtain target meteorological features; Input the target meteorological features and the target semantic features into the disaster weather prediction model to obtain a prediction result; According to the prediction result, give an early warning of power grid natural disasters under the target weather.

5. The method according to claim 4, wherein The giving an early warning of power grid natural disasters under the target weather according to the prediction result includes: Determine the early warning level of power grid natural disasters according to the prediction result; Send corresponding early warning reminder signals according to different early warning levels.

6. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1-5.

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

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Equipment disaster accident prediction method

    CN114519464A

  • Natural disaster data monitoring method and device, storage medium and electronic equipment

    CN118277498A

  • Electric power cross-modal knowledge fusion multi-agent cooperative processing method and system

    CN119477235A

  • Small sample power transmission line pin defect detection method based on graph convolutional network

    CN119625388A

  • Distribution network middle station cross-domain data fusion method and system based on knowledge graph

    CN119669334A