Electric power emergency resource allocation method and system based on knowledge graph and improved graph neural network

By building a knowledge graph of power emergency resources and using improved graph neural network model, the problems of insufficient data utilization and low intelligence in traditional power emergency resource allocation methods are solved, and efficient and accurate allocation of power emergency resources and improvement of power system emergency response capabilities are achieved.

CN120218504AActive Publication Date: 2025-06-27HUNAN UNIV

Patent Information

Application Number
CN202510283103.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-27
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

The traditional power emergency resource allocation method relies on manual experience and rule databases, lack of data utilization, limited knowledge representation ability, low intelligence level, and difficult to extract effective information from massive data and generate optimal allocation solutions.

Method used

Using a method based on knowledge graph and improved graph neural network, we use the method to extract the relationship between entities and entities from multi-source data, build a knowledge graph, and map it to vector space, and use the improved relationship graph convolution network model to perform knowledge inference to generate the optimal resource allocation plan.

Benefits of technology

It realizes efficient and accurate allocation of power emergency resources, improves the emergency response capabilities and recovery efficiency of the power system, and can dynamically adjust the relationship weights and accurately identify entity information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218504A_ABST
    Figure CN120218504A_ABST
Patent Text Reader

Abstract

The invention discloses a power emergency resource allocation method and system based on a knowledge graph and an improved graph neural network. The method comprises the following steps: firstly, extracting key entities and relationships among the entities from multi-source data, and constructing a power emergency resource allocation knowledge graph; mapping the constructed knowledge graph to a vector space, and generating a vectorization representation for each entity and relationship in the knowledge graph; then, a dynamic relation weight mechanism is introduced into a classic relation graph convolutional network model, an improved relation graph convolutional network model is constructed, vectorized data of the knowledge graph is used as input, and the deep relation between entities is learned; when a new power emergency event occurs, the method comprises the following steps: firstly, updating information of the new emergency event in the knowledge graph, expanding fault equipment, influence range and emergency resource information, ensuring that the latest environment information is fully utilized, then performing knowledge reasoning by using a relational graph convolutional network model, and generating an optimal resource allocation scheme. Therefore, efficient and accurate emergency response is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system emergency management and intelligent decision-making, and particularly to a power emergency resource allocation method based on a knowledge graph and an improved graph neural network. Background Art

[0002] The power system is an important infrastructure of modern society, and its stable operation is directly related to the normal operation of the national economy and people's livelihood.

[0003] However, during operation, the power system may face various emergencies such as natural disasters (such as typhoons, earthquakes, floods), equipment failures, and human sabotage. These events may lead to large-scale power outages, causing serious economic losses and social impacts.

[0004] Therefore, how to quickly and accurately allocate emergency resources and restore power supply when an emergency occurs is the core issue of power system emergency management.

[0005] However, traditional power emergency resource allocation methods mainly rely on manual experience and rule bases, and have the following limitations: First, the utilization of data is insufficient. Traditional methods usually only rely on a single data source (such as power grid operation data) and fail to fully utilize multi-source data such as historical cases, meteorological information, and resource distribution, resulting in incomplete decision-making bases; Second, the knowledge representation ability is limited. Emergency resource allocation involves complex entity relationships (such as equipment, personnel, materials, disaster types, etc.), and traditional methods are difficult to effectively represent and utilize these relationships, resulting in low decision-making accuracy; Third, the level of intelligence is low. Traditional methods lack intelligent reasoning and optimization capabilities and are difficult to extract effective information from massive data and generate an optimal allocation plan.

[0006] Glossary of Terms:

[0007] Self-loop: That is, a self-loop connection is a mechanism in which each node retains and processes its own information during the feature update process. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to propose a power emergency resource allocation method and system based on a knowledge graph and an improved graph neural network for the deficiencies of the prior art.

[0009] To solve the above technical problem, the technical solution of the present invention is as follows:

[0010] A power emergency resource allocation method based on a knowledge graph and an improved graph neural network includes the following steps:

[0011] S1, extracting entities and relationships between entities from multi-source data to construct a knowledge graph;

[0012] S2. Map the constructed knowledge graph to a vector space, generate vectorized representations for each entity and relationship in the knowledge graph, and obtain the vectorized data of the knowledge graph;

[0013] S3. Divide the vectorized data of the knowledge graph into a training set, a validation set, and a test set; construct an improved relational graph convolutional network model, train the improved relational graph convolutional network model with the training set, adjust the hyperparameters of the improved relational graph convolutional network model with the validation set, and evaluate the generalization ability of the improved relational graph convolutional network model with the test set to obtain a trained improved relational graph convolutional network model;

[0014] S4. Update the information of newly occurred emergency events in the knowledge graph, expand the information of faulty equipment, affected areas, and emergency resources to obtain an updated knowledge graph; map the updated knowledge graph to a vector space to obtain the vectorized data of the updated knowledge graph;

[0015] S5. Extract the subgraph corresponding to the newly occurred emergency event from the updated knowledge graph, generate a vectorized representation for the subgraph at the same time, input it into the trained improved relational graph convolutional network model for knowledge reasoning, and generate an optimal resource allocation plan.

[0016] Further improvement, the multi-source data includes a historical emergency case library, an emergency resource management system, and a meteorological monitoring system;

[0017] The entities include disaster victims, fault types, maintenance personnel, emergency supplies, and disaster types;

[0018] The relationships between the entities include equipment-fault relationship, personnel-equipment relationship, and material-equipment relationship;

[0019] The knowledge graph is a power emergency resource allocation graph;

[0020] In the second step, by aligning the same or similar entities from different data sources, merging redundant information, forming a consistent power emergency knowledge system, the extracted entities and relationships are stored in the Neo4j graph database in the form of triples to form a knowledge graph and realize the visualization of the knowledge graph; each triple is represented as (h, r, t), where h and t represent the head entity and the tail entity respectively, and r represents the relationship.

[0021] Further improvement, the specific steps of the second step are as follows:

[0022] Initialize the vector representation of each entity e i and relationship r j Randomly assign them to a low-dimensional vector space. The vector representations of entities and relationships are generated by the following formula:

[0023]

[0024] d is the vector dimension, taking values between 50 and 300; e i is the i-th entity; r j is the j-th relation, represents a d-dimensional vector in the real number field;

[0025] The rationality of a triple is measured by calculating the distance between the sum of the head entity vector and the relation vector and the tail entity vector in the triple through the scoring function f(h, r, t):

[0026] f(h, r, t) = ||h + r - t||

[0027] h, r, and t respectively represent the vector representations of the head entity, relation, and tail entity;

[0028] The smaller the value of f(h, r, t), the more reasonable the triple;

[0029] Then all positive sample triples are extracted from the knowledge graph Then negative sample triples are generated for each positive sample triple;

[0030] A loss function L is constructed for positive sample triples and negative sample triples:

[0031]

[0032] (h′, r, t′) is a negative sample triple; γ is the margin parameter, set to 1 - 2; max represents taking the maximum value;

[0033] Using the stochastic gradient descent method or the Adam optimizer, gradually adjust the vector representations of entities and relations; and in each round of training: randomly sample a batch of positive samples and corresponding negative samples, calculate the value of the loss function; calculate the gradient through the backpropagation algorithm, and update the vector representations of entities and relations;

[0034] After training is completed, each entity and relation are mapped to a low-dimensional vector space to generate embedding representations.

[0035] For further improvement, in step three:

[0036] For each relation type r, construct an adjacency matrix A r , where A r [i, j] = 1 indicates that there is a relation r between entity i and entity j, otherwise it is 0;

[0037] Then construct a node feature matrix where each row corresponds to the embedding representation of an entity, N represents the number of entities, and d represents the vector dimension;

[0038] The node feature matrix and the adjacency matrix are used as the inputs of the relational graph convolutional network model;

[0039] The relational graph convolutional network model sequentially includes an input layer, a relational graph convolutional layer, a graph pooling layer, and a fully connected layer according to the data processing order. The stacked multiple relational graph convolutional layers include three RGCN layers. The output of the previous RGCN layer is used as the input of the next RGCN layer. The first RGCN layer is used to learn direct associations, the second RGCN layer is used to capture indirect associations, and the third RGCN layer is used to integrate global information to generate the final node feature representation;

[0040] The data processing process of each RGCN layer in the multiple relational graph convolutional network is as follows:

[0041] 3.1 Introduce a dynamic weight calculation module: The multiple relational graph convolutional network introduces a dynamic weight calculation module for each relation type r. The dynamic weight calculation module generates a dynamic weight α according to the context information of the current event r : α r = softmax(W c c + b r )

[0042] where c is the context vector of the current event, W c and b r are learnable parameters, and softmax represents the normalized exponential function;

[0043] 3.2 Message generation: For the neighbor node u of each node v, generate a message under the relation r

[0044] where, W r ′ = α r W r , W r is the weight matrix corresponding to the relation r, and h u is the current feature representation of the neighbor node u;

[0045] 3.3 Neighbor aggregation: Aggregate all neighbor messages under the same relation r and calculate

[0046] where c v,r is the normalization coefficient, usually represents the set of neighbor nodes of node v under the relation r;

[0047] 3.4 Cross-relation aggregation: Add the aggregation results of all relation types and superimpose the self-loop connection W0h to retain the node's own features. W0 is the weight matrix of the self-loop, and h is the feature representation of the current node;

[0048] 3.5 Feature update: Update the node features through the non-linear activation function σ:

[0049]

[0050] Among them, represents the feature representation of node v at the l-th layer, R represents the set of relationship types, and W' r and W0 are the weight matrices of relationship r and self-loop respectively; represents the feature representation of node u at the l-th layer.

[0051] For further improvement, the loss function during the training of the improved relational graph convolutional network model is as follows:

[0052]

[0053] Among them, y i represents the true label, represents the model prediction value; N represents the total number of samples, that is, the number of samples included in the current training batch or dataset.

[0054] For further improvement, the specific steps of step four are as follows:

[0055] When a new power emergency event occurs, first obtain the latest data in real time from relevant data sources, then use natural language processing technology to automatically extract entities and their relationships from the latest data, and adopt incremental learning technology to integrate the newly extracted entities and relationships into the existing knowledge graph in the form of triples to obtain an updated knowledge graph.

[0056] For further improvement, the specific steps of step five are as follows:

[0057] Extract the knowledge graph subgraph related to the current event from the updated knowledge graph, generate a vectorized representation for the knowledge graph subgraph related to the event, input it into the trained improved relational graph convolutional network model, the trained improved relational graph convolutional network model generates multiple resource allocation plans, and sorts the resource allocation plans according to the success rate or the length of execution time; regard the resource allocation plans other than the optimal plan as backup plans; when the optimal plan cannot be executed, select the backup plans in sequence for execution.

[0058] For further improvement, record the actual effect after the resource allocation plan is executed and integrate it into the knowledge graph as new knowledge.

[0059] A power emergency resource allocation system based on a knowledge graph and an improved graph neural network, comprising a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the power emergency resource allocation method based on the knowledge graph and the improved graph neural network as described above.

[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0061] The present invention introduces a dynamic relationship weight mechanism into the classical relational graph convolutional network, dynamically adjusts the relationship weight for different situations, accurately identifies entity information, realizes the efficient and accurate allocation of personnel and emergency materials, and improves the emergency response ability and recovery efficiency of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a schematic diagram of the basic process of the method of the embodiment of the present invention.

[0063] Figure 2 It is a flow chart of knowledge graph construction of the method of the embodiment of the present invention.

[0064] Figure 3 It is a calculation graph for node update of the R-GCN model in the method of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0066] As Figure 1 shown, a power emergency resource allocation method based on a knowledge graph and an improved graph neural network proposed by the present invention includes the following steps:

[0067] Step S1: Extract key entities and their relationships from multi-source data to construct a power emergency resource allocation knowledge graph. As Figure 2 shown, it specifically includes:

[0068] First, obtain raw data from multiple data sources such as a historical emergency case library, an emergency resource management system, and a meteorological monitoring system. The data content includes:

[0069] Historical emergency cases: affected locations, affected objects, fault types, influence ranges, response plans, etc.;

[0070] Emergency resource data: maintenance personnel, emergency supplies, vehicles and equipment, etc.;

[0071] Meteorological data: typhoon path, rainfall, wind speed, etc.;

[0072] Then, natural language processing (NLP) techniques (such as named entity recognition, relation extraction) and rule matching methods are used to extract key entities and their relationships from the text data.

[0073] Entities that can be extracted include but are not limited to:

[0074] Affected objects: transformers, transmission lines, distribution cabinets, etc.;

[0075] Fault types: short circuit, open circuit, overload, etc.;

[0076] Maintenance personnel: engineers, technicians, etc.;

[0077] Emergency supplies: generators, cables, insulation equipment, etc.;

[0078] Disaster types: typhoon, earthquake, flood, etc.;

[0079] Relationships that can be extracted include but are not limited to:

[0080] Equipment - fault relationship: a certain equipment has a certain fault;

[0081] Person - equipment relationship: a certain person is responsible for maintaining a certain equipment;

[0082] Supply - equipment relationship: a certain supply is used to repair a certain equipment;

[0083] Then, knowledge fusion is carried out to integrate data from different sources, eliminate redundancy and ensure data consistency, specifically including:

[0084] Entity alignment technology is adopted to handle different names or attributes of the same entity from different data sources to ensure the unified representation of the same entity;

[0085] Disambiguate polysemous words, ambiguous words, etc. in relation extraction to make the meaning of each relationship in the graph clear;

[0086] For multiple data sources of the same type, information is merged. For example, data obtained from different equipment status sources are integrated to ensure the integrity of the status and attribute information of power equipment.

[0087] After that, the extracted entities and relationships are stored in the Neo4j graph database in the form of triples, and appropriate attributes are added to them. Neo4j is a high-performance graph database widely used in fields such as recommendation systems and knowledge graphs. Other graph databases can also be used to store knowledge graphs. Use the visualization function of Neo4j to display the structure and content of the knowledge graph.

[0088] Each triple is represented as (h, r, t), where h and t represent the head entity and the tail entity respectively, and r represents the relationship. For example: (Team A, responsible for maintenance, Transformer B).

[0089] Step S2: Map the constructed knowledge graph to the vector space to generate an embedding representation for each entity in the knowledge graph, specifically including:

[0090] Initialize the vector representation of each entity e i and relationship r j Randomly assign their vector representations to a low-dimensional vector space. The vector representations of entities and relationships are generated by the following formula:

[0091]

[0092] d is the vector dimension, usually taking values between 50 and 300;

[0093] Define a scoring function to measure the rationality of triples (head entity, relationship, tail entity) in the knowledge graph. In TransE, the scoring function measures the rationality of triples by calculating the distance between the sum of the head entity vector and the relationship vector and the tail entity vector. The formula is as follows:

[0094] f(h,r,t)=||h+r-t||

[0095] where h, r, and t represent the vector representations of the head entity, relationship, and tail entity respectively;

[0096] The smaller the value of the scoring function, the more reasonable the triple.

[0097] Then extract all positive sample triples from the knowledge graph

[0098] Generate negative sample triples for each positive sample triple. The generation methods of negative samples include: randomly replacing the head entity or the tail entity; randomly replacing the relationship.

[0099] For example, for the positive sample (Transformer A, fails, short circuit), the generated negative samples may be (Transformer A, fails, overload) or (Transformer B, fails, short circuit).

[0100] To optimize the embedding of the knowledge graph, it is necessary to minimize the loss function, which usually consists of positive and negative examples. The goal of the loss function is to adjust the vectors of entities and relationships so that the scores of positive example triples are smaller and the scores of negative example triples are larger. Common loss functions are as follows:

[0101]

[0102] Among them, represents the set of positive sample triples; (h′, r, t′) is a negative sample triple; γ is the margin parameter (usually set to 1 - 2); the goal of the loss function is to make the score of positive samples as low as possible and the score of negative samples as high as possible.

[0103] Use Stochastic Gradient Descent (SGD) or Adam optimizer to gradually adjust the vector representations of entities and relationships;

[0104] In each round of training: randomly sample a batch of positive samples and corresponding negative samples from the training data; calculate the value of the loss function; calculate the gradient through the backpropagation algorithm and update the vector representations of entities and relationships.

[0105] After training is completed, each entity and relationship is mapped to a low - dimensional vector space to generate its embedding representation.

[0106] Step S3, construct an improved relational graph convolutional network model, using the vectorized data of the knowledge graph as input to learn the deep relationships between entities, specifically including:

[0107] First, use the embedding representations of entities and relationships generated in step S2 as input. The embedding vector of each entity e is The embedding vector of each relationship r is

[0108] Next, construct an adjacency matrix according to the entities and relationships in the knowledge graph. For each relationship type r, construct an adjacency matrix A r , where A r [i, j] = 1 indicates that there is a relationship r between entity i and entity j, otherwise it is 0;

[0109] Then, construct a node feature matrix where each row corresponds to the embedding representation of an entity. The node feature matrix and the adjacency matrix will be used as the input of the relational graph convolutional network model;

[0110] Design a multi - layer relational graph convolutional network (RGCN), and each layer aggregates the information of neighbor nodes through a message passing mechanism. As Figure 3 shown, the specific process is as follows:

[0111] (1) Introduce a dynamic weight calculation module: For each relationship type r, introduce a dynamic weight calculation module that generates a dynamic weight α based on the context information of the current event (such as event type, severity, and scope of influence). r , and its calculation formula is:

[0112] α r = softmax(W c c + b r )

[0113] Among them, c is the context vector of the current event, and W c and b r are learnable parameters;

[0114] (2) Message generation: For each neighbor node u of node v, generate a message under relationship r

[0115] Among them, W′ r = α r W r , and W r is the weight matrix corresponding to relationship r, and h u is the current feature representation of neighbor node u;

[0116] (3) Neighbor aggregation: Aggregate all neighbor messages under the same relationship r and calculate

[0117] Among them, c v,r is the normalization coefficient, usually

[0118] (4) Cross-relationship aggregation: Add the aggregation results of all relationship types and superimpose the self-loop connection W0h v (retain the node's own features);

[0119] (5) Feature update: Update the node features through a non-linear activation function σ (such as ReLU):

[0120]

[0121] Among them, represents the feature representation of node v at the l-th layer, R represents the set of relationship types, represents the set of neighbor nodes of node v under relationship r, and W' r and W0 are the weight matrices of relationship r and the self-loop respectively.

[0122] Through multi-layer relational graph convolution operations, gradually extract the high-order relationships between entities. For example, use 2 - 3 layers of RGCN layers, and the output of each layer is used as the input of the next layer;

[0123] The first layer: Learn direct associations (such as "Transformer A - malfunction - short circuit");

[0124] The second layer: Capture indirect associations (such as the association between "short circuit - affected area - Area B" and "Area B - requires deployment - Generator C");

[0125] The third layer: Integrate global information to generate the final feature representation of the nodes;

[0126] Divide historical power emergency cases into a training set (70%), a validation set (15%), and a test set (15%); the training set is used to train model parameters, the validation set is used to adjust hyperparameters (such as learning rate, number of layers), and the test set is used to evaluate the model's generalization ability;

[0127] Define the loss function according to the task requirements. For example, for the task of generating a resource deployment plan, the mean squared error (MSE) loss function can be used:

[0128]

[0129] where y i represents the true label (such as the effectiveness score of the resource deployment plan), represents the model's predicted value;

[0130] Use Stochastic Gradient Descent (SGD) or the Adam optimizer to gradually adjust the model parameters. In each round of training, randomly sample a batch of data from the training set, calculate the values of the model output and the loss function, calculate the gradients through the backpropagation algorithm, and update the model parameters. During the training process, the Early Stopping strategy can be used to prevent overfitting;

[0131] Adjust hyperparameters (such as learning rate, number of RGCN layers, etc.) on the validation set and select the optimal model configuration.

[0132] Step S4: Update the information of newly occurred emergency events in the knowledge graph, and expand the information of faulty equipment, affected scope, and emergency resources, specifically including:

[0133] When a new power emergency event occurs, first obtain the latest data in real - time from relevant data sources (such as power grid monitoring systems, meteorological warning systems, emergency resource management systems, etc.). This data includes faulty equipment information (such as faulty equipment name, fault type, fault location), affected scope data (such as power - outage area, number of affected users), and emergency resource status (such as location of maintenance personnel, material inventory, vehicle availability);

[0134] Using natural language processing (NLP) technology, automatically extract key entities and their relationships from new data. For example, extract "Transformer A" as the faulty device, "short circuit" as the fault type, "Area B" as the affected area, "Engineer C" as the maintenance personnel, and "Generator D" as the emergency supplies from the fault report;

[0135] Perform semantic alignment and fusion on the extracted entities and relationships. For example, if "Transformer A" in the new data is the same entity as the existing "Transformer A" in the knowledge graph, then merge its attributes; if it is a new entity (such as "Generator D"), then add it as a new node to the knowledge graph;

[0136] Integrate the newly extracted entities and relationships into the existing knowledge graph in the form of triples. For example, add new triples (Transformer A, has fault, short circuit), (short circuit, affects area, Area B), (Engineer C, is responsible for maintenance, Transformer A), (Generator D, can be used for repair, Transformer A);

[0137] Dynamically update the knowledge graph to ensure it contains the latest environmental information and emergency resource distribution. For example, update the status of "Transformer A" to "faulty", update the number of power outage users in "Area B", and update the inventory quantity of "Generator D";

[0138] Mark the time attribute for the relevant information of new emergency events to distinguish whether it is the information of the current emergency event, and it is also convenient to extract the sub-graph related to the current event in the knowledge graph as the input for knowledge reasoning;

[0139] During the update process, adopt incremental learning technology to avoid reconstructing the entire knowledge graph. For example, only perform embedding representation training on the newly added entities and relationships, and at the same time adjust the embedding representations of the existing entities and relationships related to them;

[0140] Through the visualization function of the Neo4j graph database, display the updated knowledge graph in real time. For example, in the visualization interface, the newly added faulty devices, affected areas, and emergency resources will be displayed as nodes with different colors or shapes, facilitating decision-makers to intuitively understand the latest situation;

[0141] The updated knowledge graph will be used as the input of the relational graph convolutional network model for subsequent knowledge reasoning and generation of resource allocation plans. For example, the model can utilize the latest fault information of "Transformer A" and the available information of "Generator D" to generate a more accurate emergency resource allocation plan.

[0142] Step S5, use the relational graph convolutional network model for knowledge reasoning to generate the optimal resource allocation plan, specifically including:

[0143] Extract a sub - graph related to the current event from the updated knowledge graph;

[0144] The updated knowledge graph contains information such as the faulty equipment, the affected area, available resources, etc. of the current emergency event, as well as information on historical events directly related to the current event;

[0145] Input the extracted sub - graph of the knowledge graph into the trained Relational Graph Convolutional Network (RGCN) model;

[0146] Through the message - passing mechanism, the model conducts multi - hop reasoning in the knowledge graph to capture the deep relationships between entities. For example, starting from the faulty equipment "Transformer A", the model can infer the following paths:

[0147] Transformer A → Fault occurred → Short - circuit;

[0148] Short - circuit → Affected area → Area B;

[0149] Area B → Require deployment → Generator D;

[0150] Generator D → Availability → Sufficient inventory;

[0151] Based on the reasoning results, the model generates multiple resource deployment plans. Each plan includes the following information:

[0152] Deployed maintenance personnel (such as Engineer C, Engineer G);

[0153] Deployed emergency supplies (such as Generator D, Generator H);

[0154] Estimated execution time (such as 3 hours, 4.5 hours);

[0155] Success rate assessment (such as 90%, 85%);

[0156] Score and rank the generated plans. The score comprehensively considers the execution time and success rate. When the preferred plan cannot be executed, an alternative plan can be used for resource deployment;

[0157] Submit the finally determined resource deployment plan to the emergency dispatch system. After the plan is executed, record the actual effects (such as actual time consumption, actual cost, repair success rate), and integrate them as new knowledge into the knowledge graph. For example, add new triples (Engineer C, Repair successfully, Transformer A), (Generator D, Usage situation, Inventory decreased);

[0158] Use other high-scoring solutions except the optimal resource allocation solution as backup solutions and store them in the emergency dispatch system. When it is found that the optimal resource allocation solution cannot be executed due to road blockage, deteriorating weather, etc., the selection mechanism of the backup solution is automatically triggered. During the execution of the backup solution, continuously monitor the changes in the external environment. If the backup solution cannot be executed either, restart the knowledge reasoning process to generate a new resource allocation solution to ensure the continuity and reliability of the emergency response.

[0159] It should be understood that although the steps in the flowcharts in the above embodiments are shown in the order indicated by the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict limit on the execution order of these steps, and they can be executed in other orders. In addition, at least some of the steps in the flowcharts in the above embodiments may include multiple steps or stages. These steps or stages do not have to be completed simultaneously, and their execution order can also be discontinuous and can be executed alternately with other steps or steps or stages in other embodiments.

[0160] The technical features in the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described in detail. As long as the combinations of these technical features are not contradictory, they should be regarded as within the scope of this specification.

[0161] In addition, each functional module in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical disks, etc., which can store program codes.

[0162] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application also intends to include these changes and modifications.

Claims

1. A method for emergency power resource allocation based on knowledge graph and improved graph neural network, characterized in that: The steps include: S1, extract entities and relationships between entities from multi-source data to build a knowledge graph; S2, mapping the constructed knowledge graph to the vector space, generating vectorized representations for each entity and relationship in the knowledge graph, and obtaining vectorized data of the knowledge graph; S3, dividing the vectorized data of the knowledge graph into a training set, a validation set and a test set; constructing an improved relational graph convolutional network model, and training the improved relational graph convolutional network model through the training set, adjusting the hyperparameters of the improved relational graph convolutional network model through the validation set, and evaluating the generalization ability of the improved relational graph convolutional network model through the test set, to obtain a trained improved relational graph convolutional network model; S4, updating the newly occurred emergency event information in the knowledge graph, expanding the faulty equipment, impact range and emergency resource information to obtain an updated knowledge graph; mapping the updated knowledge graph to the vector space to obtain the vectorized data of the updated knowledge graph; S5, extracting the subgraph corresponding to the newly occurred emergency event from the updated knowledge graph, generating a vectorized representation for the subgraph, inputting the trained improved relational graph convolutional network model for knowledge reasoning, and generating the optimal resource allocation plan.

2. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 1, characterized in that: The multi-source data includes a historical emergency case database, an emergency resource management system, and a meteorological monitoring system; The entities include the affected object, fault type, maintenance personnel, emergency supplies and disaster type; The relationships between the entities include equipment-fault relationship, personnel-equipment relationship and material-equipment relationship; The knowledge graph is a power emergency resource allocation graph; In the step 2, the same or similar entities from different data sources are aligned and redundant information is merged to form a consistent power emergency knowledge system. The extracted entities and relationships are stored in the Neo4j graph database in the form of triples to form a knowledge graph and realize the visualization of the knowledge graph; each triple is represented as (h, r, t), where h and t represent the head entity and the tail entity respectively, and r represents the relationship.

3. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 2, characterized in that: The specific steps of step 2 are as follows: Initialize each entity e i and the relationship j The vector representation of entities and relations is randomly assigned to a low-dimensional vector space. The vector representation of entities and relations is generated by the following formula: d is the vector dimension, ranging from 50 to 300; e i is the i-th entity; r j is the jth relationship, represents a d-dimensional vector in the real number field; The rationality of the triple is measured by calculating the distance between the sum of the head entity vector and the relationship vector in the triple and the tail entity vector through the scoring function f(h,r,t): f(h,r,t)=||h+rt|| h, r, and t represent the vector representations of the head entity, relation, and tail entity, respectively; The smaller the value of f(h,r,t), the more reasonable the triple is; Then extract all positive sample triplets from the knowledge graph Then generate a negative sample triplet for each positive sample triplet; Construct the loss function L about the positive sample triples and negative sample triples: (h′, r, t′) is a negative sample triplet; γ is a marginal parameter, set to 1-2; max means taking the maximum value; Use stochastic gradient descent or Adam optimizer to gradually adjust the vector representation of entities and relationships. In each round of training: randomly sample a batch of positive samples and corresponding negative samples, and calculate the value of the loss function. Calculate the gradient through the back-propagation algorithm and update the vector representation of entities and relations; After training, each entity and relation is mapped to a low-dimensional vector space to generate an embedded representation.

4. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 3 is characterized in that: In the step three: For each relationship type r, construct an adjacency matrix A r , where A r [i,j] = 1 means there is a relationship r between entity i and entity j, otherwise it is 0; Then construct the node feature matrix Each row corresponds to the embedding representation of an entity, N represents the number of entities, and d represents the vector dimension; The node feature matrix and the adjacency matrix are used as inputs of the graph convolutional network model; The relationship graph convolutional network model includes a multi-layer relationship graph convolutional layer, and the multi-layer relationship graph convolutional layer includes three RGCN layers, and the output of the previous RGCN layer is used as the input of the next RGCN layer; the first RGCN layer is used to learn direct associations, the second RGCN layer is used to capture indirect associations, and the third RGCN layer is used to integrate global information and generate the final feature representation of the node; The data processing flow of each RGCN layer in the multi-layer relational graph convolutional network is as follows: 3.1 Introducing dynamic weight calculation module: The multi-layer relationship graph convolutional network introduces a dynamic weight calculation module for each relationship type r. The dynamic weight calculation module generates a dynamic weight α according to the context information of the current event. r :α r =softmax(W c c+b r ) Among them, c is the context vector of the current event, W c and b r is a learnable parameter, and softmax represents a normalized exponential function; 3.2 Message Generation: For each neighbor node u of node v, generate a message under relationship r Among them, W r ′=α r W r , W r is the weight matrix corresponding to the relation r, h u is the current feature representation of neighbor node u; 3.3 Neighbor aggregation: Aggregate all neighbor messages under the same relationship r and calculate Among them, c v,r is the normalization coefficient, usually Represents the set of neighbor nodes of node v under relationship r; 3.4 Cross-relation aggregation: Aggregate results of all relationship types Add and superimpose the self-loop connection W0h to retain the node's own characteristics. W0 is the weight matrix of the self-loop, and h is the feature representation of the current node. 3.5 Feature update: Update node features through nonlinear activation function σ: in, represents the feature representation of node v at layer l, R represents the set of relationship types, and W' r and W0 are the weight matrices of relation r and self-loop respectively; Represents the feature representation of node u at layer l.

5. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 4, characterized in that: The loss function of the improved graph convolutional network model during training is as follows: Among them, y i represents the true label, Represents the model prediction value; N represents the total number of samples, that is, the number of samples contained in the current training batch or dataset.

6. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 1, characterized in that: The specific steps of step 4 are as follows: When a new power emergency occurs, we first obtain the latest data from relevant data sources in real time, then use natural language processing technology to automatically extract entities and their relationships from the latest data, and use incremental learning technology to integrate the newly extracted entities and relationships into the existing knowledge graph in the form of triples to obtain an updated knowledge graph.

7. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 1, characterized in that: The specific steps of step five are as follows: A knowledge graph subgraph related to the current event is extracted from the updated knowledge graph, a vectorized representation is generated for the knowledge graph subgraph related to the event, and the trained improved relational graph convolutional network model is input. The trained improved relational graph convolutional network model generates multiple resource allocation plans, and the resource allocation plans are sorted according to the success rate or execution time. Resource allocation plans other than the optimal plan are used as backup plans. When the optimal plan cannot be executed, the backup plans are selected in order for execution.

8. The method for emergency power resource allocation based on knowledge graph and improved graph neural network as claimed in claim 7, characterized in that: After the resource allocation plan is executed, the actual effect is recorded and integrated into the knowledge graph as new knowledge.

9. A power emergency resource allocation system based on knowledge graph and improved graph neural network, characterized in that: It includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the power emergency resource allocation method based on the knowledge graph and improved graph neural network as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Power grid fault plan generation method and system based on knowledge graph, and storage medium

    CN116680417A

  • Construction method and construction system of urban inland inundation management system based on knowledge graph

    CN116957078A

  • Method and device for recommending emergency plan based on knowledge graph, equipment and medium

    CN117150042A

  • Disaster emergency knowledge graph construction method for aid decision-making

    CN117252255A

  • Method and device for constructing power transformation engineering knowledge graph based on graph convolutional network

    CN117669724A

Cited By

  • Distribution transformer heavy load rate prediction method and system based on multi-source data fusion

    CN120744844A

  • Project budget management method and device

    CN121052785A

  • Flood control emergency plan generation method, system and equipment and storage medium

    CN121093173A

  • Work order intelligent scheduling and resource optimal configuration method and system oriented to energy industry

    CN121303420A

  • Work order intelligent scheduling and resource optimization configuration method and system for energy industry

    CN121303420B