Power load spatio-temporal dynamic knowledge graph construction and load prediction method
By constructing a spatiotemporal dynamic knowledge graph of power load, using ALBERT and hash coding to generate embedding vectors, combining bidirectional gating mechanism and conditional random field for entity recognition, dividing the spatiotemporal subgraph and constructing an adaptive adjacency matrix, and using graph convolution and temporal convolutional networks for feature extraction, the problem of node spatial dependence not being considered in load forecasting is solved, and high-precision load forecasting is achieved.
Patent Information
- Application Number
- CN202511131344.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2026-01-06
AI Technical Summary
Existing load forecasting methods fail to effectively consider the spatial dependence of nodes in power systems and cannot meet the requirements of load in both time and space, resulting in insufficient forecasting accuracy.
A spatiotemporal dynamic knowledge graph of power load is constructed. Embedding vectors are generated through ALBERT pre-trained model and binary hash encoding. Entity recognition is performed by combining bidirectional gating mechanism and conditional random field. Spatiotemporal subgraphs are divided and a spatiotemporal coupled adaptive adjacency matrix is constructed. Spatiotemporal features are extracted and predicted using graph convolutional network and temporal convolutional network.
It improves the accuracy of load forecasting, helps to realize refined energy management and optimized dispatching strategies for the power system, and enhances the accuracy and reliability of forecasting.
Smart Images

Figure CN121282840A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power load forecasting technology, and in particular to a method for constructing a spatiotemporal dynamic knowledge graph of power load and forecasting load. Background Technology
[0002] With the rapid development of intelligent metering equipment and artificial intelligence technology, load forecasting methods based on deep learning have become the mainstream of current research. Accurate short-term electric load forecasting (SELF) is a core prerequisite for realizing refined energy management of power systems and assisting in the formulation of optimized dispatching strategies. As the complexity of power systems increases and the spatial coupling effect of the power grid strengthens, the spatial dependence between system nodes has become a key factor restricting the accuracy of forecasting.
[0003] Against this backdrop, knowledge graphs, as a graph-structured knowledge base that reveals semantic relationships between entities, can avoid complex mathematical modeling processes. By constructing entity-relationship networks to explicitly express the association rules of "load type-equipment-data," they transform the implicit coupling constraints in traditional mathematical models into interpretable logical chains. Ultimately, they use graph structures to connect and visualize massive amounts of multi-source heterogeneous data in the power system. Currently, knowledge graph research in the power field is still in its early stages. Furthermore, existing time-series load forecasting methods focus on time series analysis, neglecting the spatial dependencies of nodes and failing to meet the requirements of both spatiotemporal load forecasting. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and propose a method for constructing a spatiotemporal dynamic knowledge graph of power load and for load forecasting. This method can not only give full play to the advantages of the knowledge graph's multimodal semantic integration and spatiotemporal modeling capabilities, but also improve the accuracy of load forecasting. It is a core prerequisite for realizing refined energy management of the power system and assisting in the formulation of optimized scheduling strategies, and has good prospects for engineering applications.
[0005] The technical problem solved by this invention is achieved through the following technical solution: A method for constructing a spatiotemporal dynamic knowledge graph of power load and for load forecasting includes the following steps: Step 1: Construct a mixed vector encoding module for text and number sequences to generate the embedding vector of the original features; Step 2: Based on the embedding vector, identify power load entities, build a hierarchical entity relationship joint extraction framework for power system load data, and construct a spatiotemporal dynamic knowledge graph of power load. Step 3: Use the sliding time window algorithm to divide the spatiotemporal dynamic knowledge graph of power load into multiple spatiotemporal subgraphs; Step 4: Construct the spatiotemporal subgraph spatial structure into a spatiotemporally coupled adaptive adjacency matrix; Step 5: Extract the spatiotemporal features of the spatiotemporal coupled adaptive adjacency matrix through graph convolutional networks and temporal convolutional networks, construct a spatiotemporal graph convolutional feature fusion module for adjacency relationship fusion, and perform power load prediction.
[0006] Moreover, the specific implementation method of step 1 is as follows: use the ALBERT pre-trained model to perform word vector conversion of text data, and use binary hash encoding to convert the embedding vector of the number sequence to improve the efficiency of embedding vector conversion and generate the embedding vector of the original feature, taking into account the uniqueness and high cardinality of the identifier number sequence.
[0007] Furthermore, step 2 includes the following steps: Step 2.1: Combine bidirectional gating mechanism to capture long sequence dependencies and generate contextual feature representations for each word; The hidden state output by the GRU at the current moment h t The calculation formula is as follows:
[0008] in, z t To update the gate output, h t-1 This is the hidden state from the previous moment. For candidate hidden state, by h t-1 Input at the current time x t Decision; Reset Door: Determines whether to reset the previously hidden state. h t-1 Its output r t The calculation method is as follows:
[0009] in, σ It is the sigmoid activation function. x t For the current input, W r To reset the gate weight matrix, W hr for h t-1 The weight matrix in the reset gate, br For bias term; reset gate output and current input. x t Forming candidate hidden states The calculation method is as follows:
[0010] Where tanh is the hyperbolic tangent activation function. W xh , W hh This is the weight matrix. b h For bias terms; Update gate output z t Decide how to merge the hidden state from the previous moment h t-1 With candidate hidden state The calculation method is as follows:
[0011] in, W z To update the gate weight matrix, W hz for h t-1 In updating the weight matrix of the gate, b z For bias terms; Step 2.2: Based on the feature representation output by the bidirectional gating mechanism, the optimal label sequence is obtained through Viterbi feature decoding to complete the identification of power load entities; For the input feature sequence H n ={ h 1, h 2, h 3,…, h n} and label sequence Y =[ y 1, y 2, y 3,…, y n The label sequence scoring function is:
[0012] in, T The transition score matrix between labels. P Output feature vector label score matrix for Bi-GRU; normalize all label output sequence paths to obtain the probability of entity label corresponding to the sequence:
[0013] in, Y H Represents all possible label sequences. y ʹThe correct label sequence is represented by the label sequence with the highest prediction score: ; Step 2.3: Construct a rule base for relationships between power load entities, perform entity pair relationship matching guided by the rule base, and visualize the result as a spatiotemporal dynamic knowledge graph of power load.
[0014] Moreover, the specific implementation method of step 3 is as follows: the structural features in the graph are transformed into numerical features that the model can process, a spatiotemporally coupled adaptive adjacency matrix is constructed, and the spatial dependence and temporal dynamics between nodes of the power system knowledge graph are quantitatively represented.
[0015] Moreover, the specific implementation method of step 4 is as follows: using the attention mechanism to assign different weights to different relationships, merging the node entity embedding vector and the adjacency relationship embedding vector to obtain the spatiotemporal coupled adaptive adjacency matrix. Embed the initial node of the graph into a vector representation. E 1. Embedded representation with target node E The similarity matrix is obtained by the inner product of two elements:
[0016] in, E 1 represents the initial node embedding vector. E 2 represents the target node embedding. The ReLU activation function ensures that the similarity score is non-negative, and the Softmax function is used to convert the similarity into a probability distribution. Considering the predefined physical adjacency relationships and dynamic feature similarities in the knowledge graph, a predefined physical adjacency matrix is introduced. A pre After normalizing the weights of each row, the mixed adjacency matrix is obtained as follows:
[0017] in, Apre For a predefined physical adjacency matrix, Aadp This is a similarity matrix.
[0018] Moreover, the specific implementation method of step 5 is as follows: construct a spatiotemporal graph convolutional module for adjacency fusion, input the relation-aware node joint entity representation into the graph convolutional network and the temporal convolutional network, extract the spatial and temporal features of the nodes, and aggregate the spatiotemporal features through linear layers to achieve accurate load prediction.
[0019] Furthermore, step 5 includes the following steps: Step 5.1: Represent the adjacency-aware node union entity: For the graph G = ( V , E ),inV For a set of nodes, E As an edge set, GCN captures the spatial dependencies of graph structure data by aggregating the feature information of nodes and their neighbors. Based on the embedding of relationships between the same entity in different triples, it uses an attention mechanism to assign different weights to different relationships, merging the adjacency embeddings into the entity representation to obtain a joint entity representation of entities and relationships. H : relation r k To the entity e i attention weights α ik The calculation method is as follows:
[0020] in, a This is the weight matrix. For inclusion e i A collection of entities For a set of relations; ri k To account for the relationship vector of attention weights, the following calculation is performed:
[0021] The node-joined entity representation of the relation vector is merged using the Concat() concatenation function. E i :
[0022] Step 5.2: Extract the spatial characteristics of node loads in the node federation entity: Representing joint entities E i In the input GCN network, the method for calculating the node feature vectors considering the network topology is as follows:
[0023] in, D Let be the spatial node degree matrix. An adjacency matrix that takes into account the characteristics of the nodes themselves. E i for i Layer node feature vectors W i The weight matrix is adjustable for training model parameters.
[0024] Step 5.3: Extract the temporal characteristics of node loads in the node federation entity: TCN pads the beginning of the sequence using a causal convolution module. k -1 zero, kThe kernel size is set to ensure that the output at any time t depends on the input at the current time and previous times. Simultaneously, a dilated convolution module is introduced to insert into the convolution kernel. d Each space, denoted as the inflation factor, expands the coverage of the convolution kernel on the data without increasing computational cost, thereby capturing longer dependencies in the time series:
[0025] in, F ( i ) is the convolution kernel weight matrix, x ( t )for t Input characteristics at any given time.
[0026] The advantages and positive effects of this invention are: This invention addresses the multi-source heterogeneous data of power systems by constructing a hybrid vector encoding module for text and numerical sequences. It employs an ALBERT pre-trained model and binary hash encoding for word vector conversion of text and numerical sequences, improving the efficiency of embedding vector conversion. Furthermore, it proposes a hierarchical entity relationship joint extraction framework for power system load data, constructing a Multi-Encoder-Bi-GRU-CRF power load entity recognition model. Based on a predefined relationship rule base, it completes entity pair relationship matching, constructing a spatiotemporal dynamic knowledge graph from the spatial dependencies between power system nodes and temporal operational data. Simultaneously, it divides the graph into spatiotemporal subgraphs, transforming structural features into numerical features that the model can process, and constructs a spatiotemporally coupled adaptive adjacency matrix to quantify the spatial dependencies and temporal dynamics between nodes in the power system knowledge graph. Finally, it merges the node entity embedding vectors and adjacency relationship embedding vectors in the knowledge graph to obtain a relationship-aware joint entity representation of nodes, enriching the information contained in the nodes. A spatiotemporal graph convolutional neural network is then used to jointly extract the spatial and temporal features of the power load data, achieving efficient extraction of node spatiotemporal features. Therefore, the load forecasting algorithm proposed in this patent can not only give full play to the advantages of knowledge graph multimodal semantic integration and spatiotemporal modeling capabilities, but also improve the accuracy of load forecasting. It is a core prerequisite for realizing refined energy management of power systems and assisting in the formulation of optimized scheduling strategies, and has good engineering application prospects. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the text and number sequence hybrid vector encoding module of the present invention; Figure 2 This is a flowchart illustrating the construction process of the spatiotemporal dynamic knowledge graph of power load in this invention. Figure 3 This is a schematic diagram of the spatiotemporal subgraph sequence extraction using a sliding time window according to the present invention; Figure 4This is a schematic diagram of the spatiotemporal graph convolutional network feature fusion module of the present invention; Figure 5 A schematic diagram of the daily load forecast results of this invention; Figure (a) shows the predicted operating load curve for the generating units on summer working days, and Figure (b) shows the predicted operating load curve for the generating units on winter working days. Detailed Implementation
[0028] The present invention will be further described in detail below with reference to the accompanying drawings.
[0029] The concept behind this patent is to construct a spatiotemporal dynamic knowledge graph by combining the spatial dependencies between power system nodes with time-series load data, and to achieve efficient and accurate prediction of power load by integrating graph structure features and time series features. First, a hybrid vector encoding module for text and number sequences is constructed. ALBERT pre-trained model and binary hash encoding are used for word vector conversion of text and number sequences respectively, improving the efficiency of embedding vector conversion. Second, a hierarchical entity relation joint extraction framework for power system load data is proposed. A Multi-Encoder-Bi-GRU-CRF power load entity recognition model is constructed, and entity pair relation matching is completed based on a predefined relation rule base. The spatial dependencies between power system nodes and time-series load data are constructed into a spatiotemporal dynamic knowledge graph. Then, the knowledge graph is divided into subgraphs, and the structural features in the graph are transformed into numerical features that the model can process, constructing a spatiotemporally coupled adaptive adjacency matrix. Finally, the node entity embedding vectors and adjacency relation embedding vectors in the knowledge graph are merged to obtain relation-aware entity representations (RER). These RERs are then processed through Graph Convolutional Networks (GCN) and Temporal Convolutional Networks (TCN). TCN (Transmission Control Network) enables the extraction of spatiotemporal features of nodes, constructs the RER-STGCN model, aggregates spatial structure features and load temporal features, and performs power load forecasting, which has broad application prospects in supporting power grid dispatching.
[0030] Step 1: Construct a mixed vector encoding module for text and number sequences: Data in power systems often contains a large number of technical terms. To capture the semantic information within these terms, a sequence of input text is required. X n ={ x 1, x 2, x 3,…, x n ALBERT associates each word with an initial embedding vector. Hn Using the attention mechanism of the transformer structure to H n Encoded as Q , K , V Vector sequence: (1) in, W Q , W K , W V These are the query matrix, key matrix, and value matrix, respectively, which are updated through model training. The attention weight matrix is normalized using the softmax function. (2) in, d k For vector dimensions. Weighted values are obtained. V The vector, i.e., the output of the attention layer, is shown below: (3) By computing multiple attention heads in parallel, concatenating the results, and performing a linear transformation, the final attention output is obtained as follows: (4) Where Concat(·) is the concatenation function. m To focus on the number of heads, W O This is the output weight matrix.
[0031] Because power systems contain various types of data, this invention uses an ALBERT pre-trained model for word vector conversion for textual data. However, for identifier-type numeric sequences, using ALBERT character-level encoding decomposes the identifier into individual characters and creates an embedding for each character, leading to increased computation and impacting model performance. Therefore, considering the uniqueness and high cardinality of identifier-type data, binary hash encoding is used to convert numeric sequence embedding vectors. Figure 1 As shown, the identifier ID sequence is converted into a vector through hash encoding, and the text data is converted into word vectors through the ALBERT pre-trained model.
[0032] The numerical sequence is converted into a unique hash ID using the MurmurHash function, outputting a 64-bit integer. During the embedding index generation stage, the hash ID is converted into binary code and flexibly allocated to different blocks using a code block strategy. Each block's 0-1 code represents a different integer, thus serving as an index for the embedding table. Finally, by combining the embedding vectors corresponding to these indices, the original feature embedding vector is generated.
[0033] Step 2: Establish a hierarchical entity relationship joint extraction framework for power system load data. Knowledge graphs can integrate spatial (e.g., equipment connection relationships, location, etc.) and temporal (e.g., equipment operation data) information of power systems. Nodes represent different equipment entities, data types, data acquisition units, etc., while edges represent relationship types such as equipment connection relationships, deployment relationships, and data transmission relationships. Timestamp associations are established for time-related attributes (e.g., equipment operating parameters, energy consumption data). This invention uses a top-down approach to construct a spatiotemporal dynamic knowledge graph of power load. The construction process is as follows: Figure 2 As shown, a knowledge graph ontology is constructed by combining domain expert knowledge, determining the types of equipment entities and their relationships, building a Multi-Encoder-Bi-GRU-CRF (MEBC) power system entity recognition model, completing entity extraction, matching relationships based on the extraction results and a predefined Relation Rules Base, and batch importing the entity relationship extraction results into the graph database Neo4j to complete the knowledge graph construction.
[0034] Step 2.1: Enhance long-sequence dependencies using a two-way gating mechanism: Bi-GRU (Bidirectional-Gated Recurrent Unit) consists of two GRUs, one processing the sequence from front to back and the other from back to front. Combining a bidirectional model and gating mechanism can more effectively capture more contextual information and handle bidirectional dependencies.
[0035] The hidden state output by the GRU at the current moment h t The calculation formula is as follows: (5) in, z t To update the gate output, h t-1 This is the hidden state from the previous moment. For candidate hidden state, byh t-1 Input at the current time x t Decide.
[0036] Resetting the door determines whether to reset the previous hidden state. h t-1 Its output r t The calculation formula is as follows: (6) in, σ It is the sigmoid activation function. x t For the current input, W r To reset the gate weight matrix, W hr for h t-1 The weight matrix in the reset gate, br This is a bias term.
[0037] Reset gate output and current input x t Forming candidate hidden states The calculation formula is as follows: (7) Where tanh is the hyperbolic tangent activation function. W xh , W hh This is the weight matrix. b h This is a bias term.
[0038] Update gate output z t Decide how to merge the hidden state from the previous moment h t-1 With candidate hidden state The calculation formula is as follows: (8) in, W z To update the gate weight matrix, W hz for h t-1 In updating the weight matrix of the gate, b z This is a bias term.
[0039] Step 2.2, Viterbi decoding tag optimization strategy: The Bi-GRU layer captures contextual information by bidirectionally processing the input sequence, generating a context-dependent representation for each word. However, in entity recognition, complex dependencies exist between tags. For example, the start tag B-DEV of an entity transformer identifier is adjacent to its inner tag I-DEV, but not to the inner tag I-LOC of the ground entity. Bi-GRU primarily focuses on local context and cannot adequately model the dependencies between tags. Therefore, a Conditional Random Field (CRF) is introduced to consider the dependencies between adjacent tags, model the transition probabilities between tags, and introduce tag transition scores. Since directly traversing all tag sequences for computation is complex, Viterbi decoding is used to find the globally optimal path for the sequence tags. At each step, the current optimal path and its corresponding score are recorded, and finally, the optimal tag sequence is obtained by backtracking.
[0040] For the input feature sequence H n ={ h 1, h 2, h 3,…, h n} and label sequence Y =[ y 1, y 2, y 3,…, y n The label sequence scoring function is as follows: (9) in, T The transition score matrix between labels. P Output the feature vector label score matrix for Bi-GRU.
[0041] Normalize all label output sequence paths to obtain the probability of the entity label corresponding to the sequence. The formula for calculating the normalized predicted label sequence is as follows: (10) in, Y H Represents all possible label sequences. y ʹ Indicates the correct label sequence Finally, the label sequence with the highest prediction score is used as the final label prediction result: (11) Step 2.3: Entity pair relation matching guided by relation rule base: Considering that power load forecasting only needs to focus on key energy-consuming equipment and does not require modeling all equipment in the station, and that the relational connections required for load forecasting are relatively limited, a relational rule base is constructed based on predefined entity types to avoid redundant relational modeling. This results in standardized RDF triple data in formats such as "system-belongs to-equipment," "equipment-energy consumption-value," and "equipment-located-location," with timestamps embedded as numerical attributes. Entity-pair relation matching guided by the relational rule base effectively improves the accuracy of relation extraction and is suitable for the vertical domain knowledge graph constructed in this paper.
[0042] Step 3: Spatiotemporal sub-diagram division of power load A sliding time window algorithm was used to divide the spatiotemporal dynamic knowledge graph of power load into multiple spatiotemporal subgraph sequences, constructing a load prediction graph database. Power load typically exhibits fluctuations on a 15-minute to 1-hour scale. The time series cross-sectional granularity was set to 15 minutes, the window length to 1 hour, the step size to 30 minutes, and adjacent windows to have 50% overlap. Figure 3 As shown. The time section of the subgraph is { t i , t i +15, …, t i +60}、{ t i +30, t i +45, …, t i +90}, and so on, each slide lasting 30 minutes.
[0043] Step 4: Construction of Spatiotemporal Coupling Adaptive Adjacency Matrix To quantify the spatial dependencies and temporal dynamics among nodes in the spatiotemporal dynamic knowledge graph representing the load, the structural features in the graph are transformed into numerical features that the model can process, and a spatiotemporally coupled adaptive adjacency matrix is constructed. The initial nodes of the graph are embedded into vector representations. E 1. Embedded representation with target node E The similarity matrix is obtained by the inner product of two elements: (12) The ReLU activation function ensures that the similarity score is non-negative, and the Softmax function is used to convert the similarity into a probability distribution.
[0044] Taking into account both the predefined physical adjacency relationships and dynamic feature similarity in the knowledge graph, a predefined physical adjacency matrix is introduced. A pre After normalizing the weights of each row, the mixed adjacency matrix is obtained as follows: (13) Step 5: Construction of the spatiotemporal graph convolutional feature fusion module for adjacency relationship fusion While time-series analysis-based load forecasting methods can effectively capture temporal fluctuations, the spatial topological coupling effects caused by the integration of distributed photovoltaics, V2B charging piles, and heterogeneous energy storage in new power systems make the spatial dependence between nodes a critical factor that cannot be ignored in load forecasting tasks. To address this issue, a spatiotemporal graph convolutional module with adjacency relationship fusion is proposed. This module merges the node entity embedding vectors and adjacency relationship embedding vectors from the knowledge graph to obtain relation-aware entity representations (RERs). Spatiotemporal features of nodes are extracted through graph convolutional networks (GCNs) and temporal convolutional networks (TCNs), constructing an RER-STGCN model for power load forecasting. The spatiotemporal graph convolutional feature fusion module is as follows: Figure 4 As shown.
[0045] Step 5.1: Adjacency-aware joint entity representation of nodes For the graph G = ( V , E ),in V For a set of nodes, E As an edge set, GCN captures the spatial dependencies of graph structure data by aggregating the feature information of nodes and their neighbors. Unlike undirected graphs, the spatiotemporal subgraph of power load constructed in this invention includes not only node entity representations but also relational representations between different entities, possessing more information than undirected graphs. Considering the embedding of relationships between the same entity in different triples, an attention mechanism is used to assign different weights to different relations, merging the adjacency relationship embedding into the entity representation to obtain a joint entity representation of entities and relations. H .
[0046] relation r k To the entity e i attention weights α ik The calculation is as follows: (14) in, a This is the weight matrix. For inclusion e i A collection of entities It is a set of relations.
[0047] Considering the relationship of attention weights ri k Vector representation is calculated as follows: (15) The node-joined entity representation of the relation vector is merged using the Concat() concatenation function. E i The calculation formula is as follows: (16) Step 5.2: Extraction of spatial features of nodal loads Representing joint entities E i The formula for calculating the node feature vectors in the input GCN network, taking into account the network topology, is as follows: (17) in, D Let be the spatial node degree matrix. An adjacency matrix that takes into account the characteristics of the nodes themselves. E i for i Layer node feature vectors W i The model training parameters are adjustable weight matrices. This invention selects a 2-layer GCN network for training.
[0048] Step 5.3: Extraction of Node Load Time-Series Features When processing time series data, CNNs have the limitation of using future time series information to predict current time series information. To address this, TCN introduces Casual Convolution and Dilated Convolution modules to alleviate the gradient vanishing problem in deep networks through residual connections.
[0049] TCN pads the beginning of the sequence using a causal convolution module. k -1 zero, k The kernel size is set to ensure that the output at any time t depends on the input at the current time and previous times. Simultaneously, a dilated convolution module is introduced to insert into the convolution kernel. d Each space, denoted as the inflation factor, expands the coverage of the convolution kernel on the data without increasing computational cost, thereby capturing longer dependencies in the time series. The calculation formula is shown below: (18) in, F ( i ) is the convolution kernel weight matrix, x ( t )for t Input characteristics at any given time.
[0050] Based on the aforementioned method for constructing a spatiotemporal dynamic knowledge graph of power load and for load forecasting, a case study of a substation in a certain region is used to illustrate the technical effects of this invention. The data sources mainly include SCADA (Supervisory Control and Data Acquisition) systems, PMU (Phasor Measurement Unit), AMI (Advanced Metering Infrastructure) measurement systems, GIS (Geographic Information System), power supply topology, and outdoor meteorological data. Data preprocessing, including text cleaning, data normalization, and standardization, resulted in 259 nodes and 413 entity relationships. Neo4j was used to automatically generate a visualized spatiotemporal dynamic knowledge graph of power load, containing entities and their relationships, such as power supply systems, equipment names, equipment numbers, regions, and load data. The experimental environment configuration is shown in Table 1, and the experimental parameter settings are shown in Table 2.
[0051] Table 1 Experimental Environment Configuration
[0052] Table 2 Experimental parameter settings
[0053] First, to verify the effectiveness of the proposed relation extraction model (M1) based on Multi-Encoder-Bi-GRU-CRF and relation rule base model, M2 (Casrel) and M3 (CopyR) were used. RL Table 3 compares the proposed model with M1 (Bert-BiLSTM-CRF) and M4 (BiLSTM-Attention) as baseline models. The results are shown in Table 3. Table 3 shows that the proposed model performs best in entity relation extraction, followed by M4. Compared to M5, M1 improves precision, recall, and F1 by 3.53%, 2.95%, and 3.1%, respectively. M4, a commonly used method for entity relation extraction, also performs well. Compared to M5, the proposed model improves F1 by 3.18%, possibly because the word embedding transformation model used in the comparison model failed to effectively capture contextual dependencies. In M2, entity recognition errors directly propagate to relation extraction, resulting in poor extraction performance. M3's precision and recall are lower than other models. As a sequence-to-sequence model, it relies heavily on generative model capabilities and lacks sufficient understanding of domain terminology, resulting in less than ideal extraction performance.
[0054] Table 3 Comparison of entity relation extraction results for different models
[0055] Secondly, to verify the effectiveness of the load forecasting method proposed in this invention, the proposed RER-STGCN model was compared with the comparative models CNN-LSTM, TCN, PSO-BP, and Bi-LSTM. Taking the unit operating load of this distribution area in the summer months of June-July, August-September, and winter months of November-December and January-February of 2024 as examples, the model prediction performance evaluation results are shown in Table 4. In the four groups of unit load data divided by month, the proposed RER-STGCN model showed better performance in load forecasting. Compared with the second-best model TCN, its IMAE decreased by a maximum of 6.863kW and a minimum of 5.632kW, while its IMAPE decreased by a maximum of 3.367% and a minimum of 2.502%. Compared with the above comparative models, RER-STGCN constructs a node adjacency matrix through a knowledge graph, integrates entity embedding vectors and adjacency relationship embedding vectors to enhance node feature representation, and uses GCN and TCN to model the load spatial structure and temporal dependence, realizing spatiotemporal feature fusion, which effectively improves the load forecasting accuracy.
[0056] Table 4 Comparison of Load Forecasting Performance Results of Different Model Units
[0057] Finally, taking the operating load of the units in this distribution area during the week of June 1st to 5th, summer 2024, and the operating load during the week of January 2nd to 5th, winter 2024, as examples, the load forecast was performed using the model proposed in this invention. The forecast results... Figure 5 As shown. The unit's operating hours are matched to residents' usage needs, with a cyclical operation mode from 8:00 to 19:00 daily conforming to daily routines. In summer, the system exhibits a significant high-power characteristic at startup, increasing output power in a short period. In winter, due to the large temperature difference between indoors and outdoors, the air conditioning load is high, and the unit needs to maintain a relatively stable power throughout the day to ensure that the indoor temperature is maintained within an appropriate range.
[0058] It should be emphasized that the embodiments described in this invention are illustrative and not limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation schemes. Any other implementations derived by those skilled in the art based on the technical solutions of this invention also fall within the scope of protection of this invention.
Claims
1. A method for constructing a spatiotemporal dynamic knowledge graph of power load and load forecasting, characterized in that: Comprise the following steps: Step 1, construct a text and digital sequence mixed vector encoding module to generate the embedding vector of the original feature; Step 2, based on the embedding vector, the power load entity recognition is carried out, the hierarchical entity relationship joint extraction framework is built for the power system load data, and the power load spatio-temporal dynamic knowledge graph is constructed; Step 3, the sliding time window algorithm is used to divide the power load spatio-temporal dynamic knowledge graph into multiple spatio-temporal subgraphs; Step 4, the spatial structure of the spatio-temporal subgraph is constructed into a spatio-temporal coupled adaptive adjacency matrix; Step 5, the spatio-temporal features of the spatio-temporal coupled adaptive adjacency matrix are extracted through the graph convolution network and the time convolution network, the spatio-temporal graph convolution feature fusion module of the adjacent relationship fusion is constructed, and the power load prediction is carried out. 2.The method of claim 1, wherein: The specific implementation method of step 1 is: the ALBERT pre-training model is used for text data word vector conversion, the embedding vector conversion of the digital sequence is carried out through binary hash coding for the uniqueness and high base number of the identification type digital sequence, the embedding vector conversion efficiency is improved, and the embedding vector of the original feature is generated. 3.The method of claim 1, wherein: The step 2 comprises the following steps: Step 2.1, the long sequence dependence relationship is captured by combining the bidirectional gate mechanism, and the context feature representation of each word is generated; the hidden state of the current time GRU output h t The calculation formula is as follows: ; wherein, z t to update the gate output, h t-1 the hidden state of the previous time step, the candidate hidden state, by h t-1 and the input of the current time step x t determines whether to reset the hidden state of the previous time step h t-1 whose output is r t the calculation method is: ; wherein, σ sigmoid activation function, x t is the current input, W r is the reset gate weight matrix, W hr is h t-1 is the weight matrix in the reset gate, br is the bias term; the reset gate output is a function of the current input x t composing the candidate hidden state is calculated as: ; wherein tanh is the hyperbolic tangent activation function, W xh , W hh is a weight matrix, b h is a bias term; Update gate output z t Decide how to fuse the hidden state from the previous time step h t-1 With the candidate hidden state The calculation method is: ; wherein, W z to update the gate weight matrix, W hz to h t-1 in the update gate, b z bias term; Step 2.2, based on the feature representation output by the bidirectional gate mechanism, the optimal label sequence is obtained through Viterbi feature decoding, and the power load entity recognition is completed; For an input sequence of features H n ={ h 1, h 2, h 3,…, h n} and a sequence of labels Y =[ y 1, y 2, y 3,…, y n}, the label sequence scoring function is: ; wherein, T is a transition score matrix between tags, P is a Bi-GRU output feature vector tag score matrix; normalize all tag output sequence paths to obtain the probability of the corresponding entity label of the sequence: ; wherein, Y H denotes all possible label sequences, y ʹ denotes the correct label sequence, the power load entity recognition is completed by the label sequence with the highest prediction score: ; Step 2.3, the relationship rule base between power load entities is constructed, the entity pair relationship matching guided by the relationship rule base is carried out, and the power load spatio-temporal dynamic knowledge graph is visualized and displayed. 4.The method of claim 1, wherein: The specific implementation method of step 3 is: the structural features in the graph are converted into numerical features that can be processed by the model, the spatio-temporal coupled adaptive adjacency matrix is constructed, and the spatial dependence and time dynamics between nodes in the power system knowledge graph are quantitatively represented.
5. The method according to claim 1, characterized in that: The specific implementation method of step 4 is: different weights are given to different relationships by using attention mechanism, the node entity embedding vector and the adjacent relationship embedding vector are merged to obtain the spatio-temporal coupled adaptive adjacency matrix; Embedding graph initial node vectors E 1 With target node embedding representation E 2 Inner product to get similarity matrix: ; where, E 1 is the initial node embedding vector representation, E 2 is the target node embedding representation, the ReLU activation function ensures that the similarity score is non-negative, and the Softmax function is used to convert the similarity into a probability distribution; considering the pre-defined physical adjacency relationship in the knowledge graph and the dynamic feature similarity, a pre-defined physical adjacency matrix A pre , normalize each row of weights to obtain the hybrid adjacency matrix as follows: ; wherein, Apre is a predefined physical adjacency matrix, Aadp is a similarity matrix. 6.The method of claim 1, wherein: The specific implementation method of step 5 is: the spatio-temporal graph convolution module of the adjacent relationship fusion is constructed, the relationship-aware node joint entity representation is input into the graph convolution network and the time convolution network, the spatial features and time sequence features of the node are extracted, the spatio-temporal features are aggregated through the linear layer, and the accurate load prediction is realized. 7.The method of claim 1, wherein: The step 5 comprises the following steps: Step 5.1, the adjacent relationship-aware node joint entity is represented: For FIG G = ( V , E ), wherein V is a node set, E is an edge set, the GCN captures the spatial dependence of the graph structure data by aggregating the feature information of the node and its neighbor nodes; according to the relationship embedding of the same entity between different triples, different weights are given to different relationships by using an attention mechanism, and the adjacent relationship embedding is merged into the entity representation to obtain the joint entity representation of the entity and the relationship H ; Relationship r k To entity e i Attention weight α ik The calculation method is: ; wherein, a is a weight matrix, is a set of relations comprising e i is a set of entities, is a set of relations; ri k is a relation vector considering attention weights, computed as follows: ; The node joint entity representation of the relation vector is fused by a Concat(·) concatenation function E i : ; Step 5.2, the node load spatial features in the node joint entity are extracted: Representing joint entities E i In the input GCN network, the node feature vector calculation method considering the network topology structure is: ; wherein, D is a spatial node degree matrix, is a neighborhood matrix considering the node's own characteristics, E i is i layer node feature vector, W i is a weight matrix adjustable by model training parameters; Step 5.3, the node load time sequence features in the node joint entity are extracted: TCN fills the beginning of the sequence with causal convolution modules k -1 zero, k The kernel size is the number of input features, thus ensuring that the output at any time t depends on the current time and its previous inputs. In addition, the dilated convolution module inserts d spaces in the kernel, noted as the dilation factor, which expands the coverage of the kernel on the data without additional computational cost, thus capturing longer dependencies in the time series: ; in, F ( i ) is the convolution kernel weight matrix, x ( t )for t Input characteristics at any given time.
Citation Information
Cited By
Electric vehicle charging load prediction method based on pre-training language model
CN121834756A
Elevator health assessment method based on time sequence knowledge graph and deep learning
CN121902952A