A power load forecasting method based on an event logic graph
Through the power load prediction method based on the factual map, the power scenario is identified and exogenous variables are selected, combined with long and short-term time series division and encoder extraction characteristics, the problem of inaccurate power load prediction in the prior art is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202211345202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The existing power load prediction methods lack the identification of electric usage scenarios and cannot effectively select multi-dimensional exogenous variables, resulting in large deviations in prediction results and inaccurate enough.
Using the power load prediction method based on the theory map, we use the power theory map, rule database, knowledge base and event and variable mapping relationship table to identify the power scenario and select exogenous variables. At the same time, long and short-term time series division and different encoders extract features, and a multivariate short-term power load prediction model is constructed to improve prediction accuracy.
Accurate identification of electric use scenarios and effective selection of exogenous variables are achieved, the accuracy of power load prediction is improved, and the deviation of prediction results is reduced.
Smart Images

Figure CN115577754B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric load forecasting, and particularly relates to an electric load forecasting method based on an event logic graph. Background Art
[0002] The load forecasting of the power system estimates the future electric load according to the historical data of the electric load and auxiliary information. Among them, the auxiliary information is the historical data of relevant variables that affect the electric load forecasting, such as historical temperature data, air pressure data, precipitation, social status, etc. Taking the historical data as the basic data, a theoretical model is established between the load and other relevant factors to find their internal relationship and make an accurate prediction of the future change situation. The electric load is divided into commercial load, industrial load, and residential electricity load, and the fluctuation of the electric load has periodicity and continuity. The electric load forecasting is generally classified according to the forecasting time period, and different forecasting methods are divided according to different periods. Among them, the medium and short-term forecasting includes daily forecasting and monthly forecasting, etc.
[0003] In the prior art, the medium and short-term electric load forecasting methods include classical statistical models and artificial intelligence methods. The classical statistical models include regression analysis method, time series method, grey model method, etc.; the artificial intelligence methods adopt artificial neural networks and deep learning methods, etc., and after performing big data intelligent analysis on the historical data, the electric load is forecasted. However, the causes of the electric load fluctuation are complex. To accurately forecast the electric load, it is necessary to identify the power scenarios. The existing electric load forecasting methods lack the identification of the power consumption scenarios, cannot select the multi-dimensional exogenous variables for the power consumption scenarios, cannot comprehensively consider the multi-dimensional causes affecting the electric load, and the forecasting results have large deviations and are not accurate enough. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present invention aims to provide an electric load forecasting method based on an event logic graph, introduce the event logic graph for the identification of the power scenarios, and select the exogenous variables by means of the event logic graph reasoning method and the mapping relationship table between events and variables, use the long and short time series division to distinguish the data with different distances in the time dimension, and adopt different encoders for the long and short time series to extract their respective features, so as to improve the forecasting accuracy.
[0005] In order to achieve the above object, the embodiments of the present invention adopt the following technical solutions:
[0006] The present invention provides an electric load forecasting method based on an event logic graph, and the method includes the following steps:
[0007] Step S1: Construct a power event logic graph, rule base P, knowledge base K, and event-variable mapping table MAT according to the power-related events and the causal relationships between events in the historical daily and monthly power data.
[0008] Step S2: Activate the power event logic graph, traverse the node events of the graph, and select an electricity consumption scenario in combination with the rule base P and the knowledge base K.
[0009] Step S3: Based on the selected preset electricity consumption scenario, perform reasoning on the power event logic graph to obtain a set C of cause events that may lead to the occurrence of the electricity consumption scenario.
[0010] Step S4: According to the event-variable mapping table MAT, traverse the nodes in the set of cause events, select the corresponding exogenous variables, and splice the selected exogenous variables with the historical load to obtain the input variables of the prediction model.
[0011] Step S5: Construct a multi-variable short-term power load forecasting model MNLF. The forecasting model performs long-term and short-term time series partitioning on the input data, and at the same time uses different encoders for different time series to extract long-term and short-term time series features, namely embedding representations; and calculates the correlation coefficient between the short-term time series embedding representation and the long-term time series embedding representation, and uses it as the weight of the long-term time series for weighted representation, and splices the result of the weighted representation with the short-term time series embedding representation, and inputs it into the fully connected layer of the model to predict the future value of the power load.
[0012] As a preferred embodiment of the present invention, the power event logic graph includes nodes and directed edges, denoted as G=(E,R), where E={e1,e2,...,e n} is the set of nodes in the event logic graph, and e i represents a power event; R={r1,r2,...,r m} represents the set of relationships between events, and r i represents the causal relationship between events;
[0013] The rule base P is used to store rules for determining whether relevant nodes in the power event logic graph are activated. Node activation means that the event bound to the node is likely to occur.
[0014] The knowledge base K is used to save the predicted values of exogenous variables required for rule judgment in a future period of time.
[0015] The event-variable mapping table MAT is used to save the mapping relationship between events and variables.
[0016] As a preferred embodiment of the present invention, the selected electricity usage scenario specifically includes: the knowledge base K stores the values of variables required for rule judgment in a future period of time; the values of corresponding variables in the knowledge base K in a future period of time are traversed using the rules in the rule base P to determine whether the corresponding node event is likely to occur, and when the rule judgment result is yes, the corresponding event is used as the preset electricity usage scenario.
[0017] As a preferred embodiment of the present invention, the reasoning is performed on the power event graph, and the reasoning algorithm steps are as follows:
[0018] Step S31, inputting the graph structure corresponding to the graph and the activated node A;
[0019] Step S32, start accessing from A and initialize set C;
[0020] Step S33, if there are any unvisited adjacent nodes of the currently visited vertex, select one of them to visit; if the node has no accessible nodes starting from it, add it to the set C and return to the most recently visited vertex;
[0021] Step S34, until all vertices connected to the starting vertex are visited and set C is returned.
[0022] As a preferred embodiment of the present invention, in step S5, for short-term time series, LSTM is used as an encoder to extract trend change information; for long-term time series, CNN is used as an encoder, the long-term time series is processed as a picture object, and the mutual influence between different variables is extracted.
[0023] As a preferred embodiment of the present invention, the short-term time series encoder comprises an input layer, a hidden layer and an output layer; wherein,
[0024] The core of the LSTM is the cell state, which is represented by a horizontal line running through the cell. LSTM changes the cell state through the input gate, forget gate and output gate. The input gate is shown in formula (1) and is used to control the information input into the cell unit. The forget gate is shown in formula (2) and is used to control the forgetting of the information at the previous moment. The output gate is shown in formula (3) and is used to control the information transmitted by the cell unit to the next moment. The memory state s t As shown in formula (4), historical information that is beneficial to predicting future data is memorized, where [h t-1 ;x t ] represents the hidden layer state h at the previous moment t-1 and the current input x t The concatenated vector of the current hidden layer state h is obtained by formula (5) t ;
[0025] i t = δ(W i [h t-1 ; x t +b i ) (1)
[0026] f t = δ(W f [h t-1 ; x t +b f ) (2)
[0027] o t = δ(W o [h t-1 ; x t +b o ) (3)
[0028]
[0029]
[0030] In equations (1)-(5), i t , f t , o t represent the input gate, forget gate, output gate, and memory state respectively; W i , W f , W o , W s represent the weight coefficients of the input gate, forget gate, output gate, and memory state respectively, b i , b f , b o , b s represent the bias parameters of the input gate, forget gate, output gate, and memory state respectively, δ and tanh represent the activation function sigmod; s t , s t-1 are the memory states at time t and t-1 respectively, h t , h t-1 are the hidden states at time t and t-1 respectively, represents element-wise multiplication.
[0031] As a preferred embodiment of the present invention, the long-term time series encoder uses a convolutional layer composed of multiple convolutional kernels with variable dimensions of width to perform a convolutional operation on time series data in the form of a two-dimensional matrix, and simultaneously extracts the dependencies in time of the data and the mutual influence relationships between variables.
[0032] As a preferred embodiment of the present invention, the convolutional operation is described by formula (6):
[0033] hk = φ(W S * X s + b S ) (6)
[0034] In Equation (6), b S represents the bias parameter, h k represents the encoding result of the long-term time series, X S is the time series, W S is the parameter in the convolutional kernel, φ is the activation function, and * is the convolutional operation symbol.
[0035] As a preferred embodiment of the present invention, the multivariate short-term power load forecasting model is constructed based on the memory network. In this model, the long-term time series {X i} = X1,..., X n is encoded by the encoder to obtain the embedded representation vectors {m i} = m1,..., m n which are stored in the memory array, as shown in Equation (7):
[0036] m i = Encoder(X i ) (7)
[0037] The short-term time series is used as the question to obtain its embedded vector representation u through the encoder, as shown in Equation (8):
[0038] u = Encoder(Q) (8)
[0039] In Equations (7) and (8), Encoder represents the encoder. The long-term time series encoder is CNN, and the short-term time series encoder is LSTM.
[0040] As a preferred embodiment of the present invention, the MNLF is based on the memory network model. The short-term time series is used as the question, and the long-term time series is used as the answer. Then, the correlation coefficients {p i} = p1,..., p n between each vector in {m i} = m1,..., m n and the vector u are calculated, as shown in Equation (9):
[0041] p i = Softmax(u T m i ) (9)
[0042] In Equation (9), p i represents the attention weight coefficient of the memory vector m i , and Softmax represents the Softmax function; pi As the memory vector m i The attention weight coefficient multiplies the memory vector m i with p i to obtain the weighted output vector o i , as shown in Equation (10):
[0043] o i = p i × m i (10)
[0044] Finally, the embedding representation u of the short-term time series and the set of weighted output vectors {o i} are concatenated as the input of the fully connected layer to predict the value at the future time t, as shown in Equation (11):
[0045] y t = W[u; o1; o2,…, o T + b (11).
[0046] In Equation (11), y t is the predicted value of the power load at time t.
[0047] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0048] The power load prediction method based on the event logic graph combines the power event logic graph with expert knowledge, sets up a rule library, a knowledge base, an event and variable mapping relationship table, etc., and realizes the purpose of identifying power scenarios, obtaining the cause events that lead to the occurrence of power scenarios, and selecting appropriate exogenous variables to splice with historical loads to predict future values; in the power load prediction stage, a multi-variable power load prediction model based on the memory network is proposed, which not only distinguishes the long-term and short-term time series in the time dimension, effectively extracts their respective important features, but also records the information that has an important impact on the future by referring to the memory network structure, improving the prediction accuracy.
[0049] Of course, when implementing any product or method of the present invention, it is not necessarily required to achieve all the above-mentioned advantages at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0051] Figure 1 is the flowchart of the power load prediction method based on the event logic graph in the embodiment of the present invention;
[0052] Figure 2 It is the inference principle diagram based on the power event graph in the embodiment of the present invention;
[0053] Figure 3 It is an example of the power event graph in the embodiment of the present invention;
[0054] Figure 4 It is a schematic structural diagram of the short-term time series encoder in the embodiment of the present invention;
[0055] Figure 5 It is a schematic structural diagram of the long-term time series encoder in the embodiment of the present invention;
[0056] Figure 6 It is a schematic structural diagram of the multi-variable short-term power load forecasting model in the embodiment of the present invention. Detailed implementation manners
[0057] After discovering the above problems, the inventors of the present application conducted in-depth research on existing power load forecasting methods. The research found that the causes of power fluctuations are complex, and the power load change is affected by many factors. To accurately predict the future power load, it is necessary to identify the electricity consumption scenarios; when the model input is multi-dimensional variables, the dependence of power load forecasting in different electricity consumption scenarios on different dimensional variables is different, and even some variables are noise in some situations, which will affect the prediction accuracy. Existing methods cannot select appropriate exogenous variables for different types of electricity consumption scenarios and cannot make corresponding choices for variables of different dimensions, resulting in noise and reducing the prediction effect. At the same time, existing time series forecasting methods commonly used for user power load forecasting, including statistical models, machine learning methods, and deep learning-based methods, all lack the organic combination with expert experience, and the prediction accuracy is poor. In addition, for predicting future values, historical power loads in different time periods have different meanings, and existing power load forecasting methods lack the distinction of historical loads in different time periods. Therefore, there are still certain problems in the prediction model.
[0058] At the same time, with the popularization and application of artificial intelligence and smart meters, power companies have collected a large amount of historical data. These large amounts of historical data have been shelved all the time, but the objectivity and accuracy of these data are beyond doubt and are accepted by the public. If these electricity consumption information can be effectively utilized and the electricity consumption situation of each household can be fully mastered, it is of great significance to both power enterprises and power users. For power enterprises, they can appropriately allocate resources to balance supply and demand according to the prediction results, or adjust demand response strategies such as dynamic pricing to shape the load, so as to avoid the tension of infrastructure capacity.
[0059] It should be noted that the defects existing in the above solutions in the prior art are all the results obtained by the inventor through practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed by the embodiments of the present invention below for the above problems should both be the contributions made by the inventor to the present invention during the process of the present invention.
[0060] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations. It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can also be combined with each other.
[0061] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In the description of the present invention, the terms "first", "second", "third", "fourth", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0062] After the above in-depth analysis, this application proposes a power load forecasting method based on an event logic graph. By using long-short time series partitioning, the far and near time series are distinguished, and different encoders are used to obtain the features of their respective sequences. For predicting future values, referring to the memory network structure, a memory network component is set to save the long-term time series embedding representation. The correlation between the long-term time series embedding representation and the short-term time series embedding representation is calculated, and the correlation between the time series embedding representations of different periods is calculated as the weight coefficient to perform weighted summation on the long-term time series embedding representation, and then splicing is performed to predict the future value, achieving the purpose of capturing dependencies in the time dimension. At the same time, a mapping relationship table between cause events and variables is established in combination with expert knowledge. After obtaining the set of cause events based on the event logic graph, the corresponding set of exogenous variables is selected for different scenarios through the mapping table.
[0063] The present invention first proposes a framework for an electricity load forecasting method based on an event logic graph, activates the event logic graph using a knowledge base and a rule base, then enters the event logic graph reasoning stage to obtain a set of cause events for the electricity consumption scenarios that can occur, and then based on the mapping relationship table between events and variables, selects the relevant variables involved and splices them with historical load data as the model input. In the model prediction stage, by dividing the time series into long-term and short-term periods, and using different encoders to obtain their embedded representations, calculates the correlation between the embedded representation of the short-term time series and the embedded representation of the long-term time series as the weight coefficient to perform a weighted sum of the embedded representation of the long-term time series, captures the dependencies in the time dimension, and splices it with the short-term time series, and inputs it into the prediction model to predict the future load.
[0064] See Figure 1 , the method for predicting electricity load based on an event logic graph provided by an embodiment of the present invention includes the following steps:
[0065] Step S1, construct an electricity event logic graph, a rule base P, a knowledge base K, and a mapping relationship table MAT between events and variables according to the electricity-related events and the causal relationships between events in the historical daily and monthly electricity data.
[0066] In this step, the electricity event logic graph includes nodes and directed edges, denoted as G=(E, R), where E={e1, e2,..., e n} is the set of nodes in the event logic graph, e i represents an event; R={r1, r2,..., r m} represents the set of relationships between events, and r i represents the causal relationship between events.
[0067] Among them, the nodes are events, and the directed edges are the causal relationships between events.
[0068] The rule base P is used to store the rules for determining whether the relevant nodes in the electricity event logic graph are activated. Node activation means that the event bound to the node is likely to occur. For example, the event bound to the node "the perceived temperature exceeds 28 degrees" is bound to the rule "the air temperature exceeds 28 degrees". When the air temperature reaches 28 degrees, it is considered that "the perceived temperature exceeds 28 degrees" is likely to occur.
[0069] The knowledge base K is used to save the predicted values of the exogenous variables required for rule judgment in the future for a period of time. For example, the variable required for judging "the air temperature exceeds 28 degrees" is the air temperature.
[0070] The event and variable mapping table MAT (Mapping Table) is used to store the mapping relationship between events and variables. For example, the event "rainfall approaching" may affect factors such as humidity, temperature, and air pressure, and these factors are all attribute fields in the dataset.
[0071] As Figure 3 shown, it is a typical power event graph. The nodes include an increase in power consumption load; the main reason categories for the increase in power consumption load, such as an increase in heating load; the specific reasons for each category, such as the reason for the increase in heating load being too low body sensation temperature, and the possible reasons for the too low body sensation temperature.
[0072] Among them, the nodes represent events, and the directed edges between nodes represent causal relationships. For example, in Figure 3 , the reasons for the increase in power consumption load are mainly divided into four major categories: an increase in the power consumption load of entertainment and office equipment, an increase in the power consumption load of lighting, an increase in heating load, and an increase in the power consumption load of cold electricity such as air conditioners and electric fans. One of the reasons for the increase in the power consumption load of lighting is insufficient light intensity, and the reason for the insufficient light intensity is: overcast and rainy days and seasonal factors, resulting in longer nights and shorter days. Among them, the event nodes bound by the rule base are mainly dark gray nodes, such as "insufficient light intensity" in the figure, and the reasoning results are light gray nodes, such as "overcast and rainy days" and "seasonal factors, shorter days and longer nights". Step S2, activate the power event graph, traverse the graph node events, and combine the rule base P and the knowledge base K to select the power consumption scenario.
[0073] In this step, the knowledge base K stores the predicted values of specific variables in the future for a period of time, and the rule base P stores the determination rules for judging whether each node event in the power event graph is likely to occur. The rules are established by expert knowledge, and the specific variables refer to the exogenous variables required for rule judgment. While traversing the rules in the rule base P, examine the values of the corresponding variables in the knowledge base K for a period of time in the future required by the corresponding rules, and judge whether the corresponding node events are likely to occur. When the rule judgment result is yes, take the corresponding event as the preset power consumption scenario..
[0074] Step S3, based on the selected power consumption scenario, perform reasoning on the power event graph to obtain the set C of cause events that may lead to the occurrence of the power consumption scenario.
[0075] In this step, the power event graph is the causal relationship between various power-related events formed under the guidance of expert knowledge. After the event graph activation link, the preset power consumption scenario is selected and enters the graph reasoning stage. According to the expert knowledge contained in the graph, find other possible cause events that theoretically can lead to the occurrence of the event bound by this node, and try to obtain a complete set of cause events required for examining the occurrence of this event.
[0076] Specifically, the inference algorithm includes the following steps:
[0077] Step S31, inputting the graph structure corresponding to the graph and the activated node A;
[0078] Step S32, start accessing from A and initialize set C;
[0079] Step S33, if there are any unvisited adjacent nodes of the currently visited vertex, select one of them to visit; if the node has no accessible nodes starting from it, add it to the set C and return to the most recently visited vertex;
[0080] Step S34, until all vertices connected to the starting vertex are visited and set C is returned.
[0081] The pseudo code corresponding to the algorithm is described as follows:
[0082] [Input: causal graph G = (E, R), the set of activated nodes in the graph A;
[0083] Output: The cause node set C in the graph that can activate the nodes in set A;
[0084] 1.FOR point e i IN set A
[0085] 2. Initialization of node access flags in DO graph
[0086] 3.DO slave node e i Start the deep graph traversal, and whenever you encounter a node with only in-degree and no out-degree,
[0087] 4. If it is not in set C, put it into set C;
[0088] 5.END FOR
[0089] 6. Return to set C].
[0090] Step S4, according to the event and variable mapping table MAT, traverse the nodes in the cause event set, select the corresponding exogenous variables, and splice the selected exogenous variables with the historical load to obtain the input variables of the prediction model. The length of the historical load is a set time window value, where the length of the exogenous variable is consistent with the length of the historical load, so that the historical load and the exogenous variable are spliced into a multidimensional variable.
[0091] In this step, as shown in Table 1, some examples of the cause event and variable mapping table MAT are as follows:
[0092] Table 1 Example of event and variable mapping table (MAT)
[0093]
[0094] Select corresponding exogenous variables according to the MAT.
[0095] Step S5: Construct a Multivariate Short-Term Load Forecasting model based on Memory Network (MNLF). The forecasting model divides the input data into long-term and short-term time series, and at the same time uses different encoders for different time series to extract long-term and short-term time series features, that is, embedding representations; and calculates the correlation coefficient between the short-term time series embedding representation and the long-term time series embedding representation, and uses it as the weight of the long-term time series for weighted representation, and splices the result of the weighted representation with the short-term time series embedding representation, and inputs it into the fully connected layer of the model to predict the future value of the power load.
[0096] In this step, by dividing the long-term and short-term time series, and using different encoders for the long-term and short-term time series to obtain their corresponding features, the distinction of historical data in different periods is realized. In the time dimension, the significance of recent historical data and long-term historical data for predicting future values is different. Therefore, in this step, the long-term and short-term time series are divided.
[0097] For the short-term time series, because it is closer to the future value, the trend change is more meaningful for predicting the future value. Therefore, the Long Short Term Memory (LSTM) is used as the encoder to extract the trend change information. As Figure 4 shown, the short-term time series encoder includes an input layer, a hidden layer, and an output layer. The core of the LSTM is the cell state, which is represented by a horizontal line running through the cell. The cell state is like a conveyor belt, which runs through the entire cell but has very few branches, so that the information can flow through the entire network without change. The LSTM changes the cell state through the input gate (formula (1)), the forget gate (formula (2)), and the output gate (formula (3)). The input gate is used to control the information entering the cell unit, the forget gate is used to control forgetting the information of the previous moment, and the output gate is used to control the information transmitted by the cell unit to the next moment. s t is the memory state (formula (4)) that memorizes the historical information beneficial to predicting future data, where [h t-1 ; x t represents the concatenated vector of the previous hidden layer state h t-1 and the current input x t , and the current hidden layer state h t is obtained through formula (5).
[0098] it = δ(W i [h t-1 ; x t +b i ) (1)
[0099] f t = δ(W f [h t-1 ; x t +b f ) (2)
[0100] o t = δ(W o [h t-1 ; x t +b o ) (3)
[0101]
[0102]
[0103] In equations (1)-(5), i t , f t , o t represent the input gate, forget gate, output gate, and memory state respectively; W i , W f , W o , W s represent the weight coefficients of the input gate, forget gate, output gate, and memory state respectively, b i , b f , b o , b s represent the bias parameters of the input gate, forget gate, output gate, and memory state respectively, δ and tanh represent the activation function sigmod; s t , s t-1 are the memory states at time t and t-1 respectively, h t , h t-1 are the hidden states at time t and t-1 respectively, represents element-wise multiplication.
[0104] For long time series, due to their large time span and the preservation of more abundant mutual influences among various variables, a CNN is used as the encoder to process it as a picture object and extract the mutual influences among different variables. For example Figure 5As shown, the data to be processed by the long-term time series encoder is multivariate time series, presented in the form of a two-dimensional matrix, and due to the mutual influence between its variables, it has a structure similar to picture data. Therefore, CNN is used to perform convolution operations on the multivariate time series. The effect of the convolution operation is jointly affected by the size of the convolution kernel, the choice of pooling function, the setting of the number of convolution layers, and the number of convolution channels in each layer. The long-term time series encoder uses multiple convolution kernels with a width equal to the variable dimension to form a convolution layer, performs convolution operations on the time series data in the form of a two-dimensional matrix, and simultaneously extracts the dependencies in time and the mutual influence relationships between variables. Let the time series be X S , the parameters in the convolution kernel are W S , the activation function is φ (the activation function is generally the ReLU function), the convolution operation symbol is *, and the above convolution operation is described by the formula. See formula (6):
[0105] h k = φ(W S *X s + b S ) (6)
[0106] In formula (6), b S represents the bias parameter, and h k represents the encoding result of the long-term time series.
[0107] Calculating the correlation coefficient between the short-term time series embedding representation and the long-term time series embedding representation and using it as the weight for weighted representation of the long-term time series is a process of capturing the dependencies in the time dimension of the data. For better input into the model for prediction, a weighted sum of the embedding representations of the long-term time series is performed. Specifically, first, a memory component is set to save the embedding representations of the long-term time series, and then the correlation between the short-term time series embedding representation and the long-term time series embedding representation is calculated as the weight coefficient, and a weighted sum of the long-term time series embedding representations is performed, achieving the capture of the dependencies in the time dimension. Finally, the result of the weighted sum of the long-term time series embedding representations is concatenated with the short-term time series embedding representation and input into the fully connected layer to predict future values.
[0108] When making predictions, as Figure 6 shown, the multivariate short-term power load forecasting model is constructed based on the memory network. The embedding representation vectors {m i} = m1,..., m n of the long-term time series {X i} = X1,..., X n obtained by encoding through the encoder are stored in the memory array, as shown in formula (7). The short-term time series is used as the question to obtain its embedding vector representation u through the encoder, as shown in formula (8).
[0109] m i = Encoder(X i ) (7)
[0110] u = Encoder(Q) (8)
[0111] In equations (7) and (8), Encoder represents an encoder. The long-term time series encoder is a CNN, and the short-term time series encoder is an LSTM.
[0112] When predicting future power loads, the importance of different historical load sequences at different intervals on the time axis for future prediction is different. The MNLF is based on the generalization of the memory network model, taking the short-term time series as the question and the long-term time series as the answer, and then calculating the correlation coefficients {p i} = p1,..., p n between each vector in {m i} = m1,..., m n and the vector u, as shown in equation (9):
[0113] p i = Softmax(u T m i ) (9)
[0114] In equation (9), p i represents the attention weight coefficient of the memory vector m i , and Softmax represents the Softmax function; taking p i as the attention weight coefficient of the memory vector m i , multiplying the memory vector m i by p i to obtain the weighted output vector o i , as shown in equation (10):
[0115] o i = p i × m i (10)
[0116] Finally, concatenate the embedded representation u of the short-term time series with the set of weighted output vectors {o i} as the input to the fully connected layer to predict the value at the future t-th moment, as shown in equation (11):
[0117] y t = W[u; o1; o2,..., o T + b (11).
[0118] In equation (11), T represents the length of the set time window of the duration.
[0119] As can be seen from the above technical solutions, the power load forecasting method based on the event logic graph provided by the embodiments of the present invention constructs a power event logic graph based on historical data to integrate the expert knowledge of the causal relationships between power events, sets up a knowledge base and a rule base component to activate the power event logic graph, and realizes the automation of differentiating power consumption scenarios based on expert knowledge; uses the deep traversal algorithm of the power event logic graph to reason on the power event logic graph to obtain the set of cause events that can lead to the occurrence of a preset power consumption scenario, and realizes the automation of analyzing the causes of power consumption scenarios based on expert knowledge; through the mapping relationship table between events and variables, searches for the exogenous variables involved in the set of cause events obtained by graph reasoning, and realizes the automation process from differentiating power consumption scenarios to selecting exogenous variables. While utilizing the ability of the event logic graph combined with expert knowledge, it is not limited by the ability of the event logic graph itself; at the same time, a multi-variable power load forecasting model based on the memory network is proposed. First, the time series is divided into long-term and short-term time series, and then different encoders are used to extract the features of time series with different lengths, calculate the correlation between the long-term and short-term time series, use it as a weight coefficient to perform weighted summation on the embedded representation of the long-term time series, and splice it with the embedded representation of the short-term time series, and input it into the fully connected layer to predict the future value, improving the accuracy of the prediction result.
[0120] The above description is only the preferred embodiment of the present invention and the explanation of the applied technical principles, and is not intended to limit the scope of the present invention claimed, but only represents the preferred embodiment of the present invention. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
Claims
1. A method for predicting electric load based on an event logic graph, characterized in that, The method includes the following steps: Step S1: Construct a power event logic graph, a rule base P, a knowledge base K, and an event and variable mapping relation table MAT according to power-related events and the causal relationships between events in the historical daily power data and monthly data. Step S2: Activate the power event logic graph, traverse the graph node events, and select an electricity consumption scenario in combination with the rule base P and the knowledge base K. Step S3: Based on the selected preset electricity consumption scenario, perform reasoning on the power event logic graph to obtain a set C of cause events that may lead to the occurrence of the electricity consumption scenario. Step S4: According to the event and variable mapping relation table MAT, traverse the nodes in the set of cause events, select the corresponding exogenous variables, and splice the selected exogenous variables with the historical load to obtain the input variables of the prediction model. Step S5: Construct a multi-variable short-term power load prediction model MNLF. The prediction model performs long-term and short-term time series partitioning on the input data, and at the same time uses different encoders for different time series to extract long-term and short-term time series features as embedding representations. And calculate the correlation coefficient between the short-term time series embedding representation and the long-term time series embedding representation, use it as the weight of the long-term time series for weighted representation, splice the result of the weighted representation with the short-term time series embedding representation, input it into the fully connected layer of the model, and predict the future value of the power load. For the short-term time series, use LSTM as the encoder to extract trend change information; for the long-term time series, use CNN as the encoder, process the long-term time series as a picture object, and extract the mutual influence between different variables. The multi-variable short-term power load forecasting model MNLF is constructed based on the memory network. In this model, the long-term time series {X i} = X1,..., X n The embedded representation vectors {m i} = m1,..., m n obtained by encoding through the encoder are stored in the memory array, as shown in Equation (7): m i = Encoder(X i ) (7); Take the short-term time series as a question and obtain the embedding vector representation u of the short-term time series through the encoder, as shown in Equation (8): u = Encoder(Q) (8); In Equations (7) and (8), Encoder represents the encoder; The MNLF is based on the memory network model, taking the short-term time series as the question and the long-term time series as the answer, and then calculating {m i} = m1, …, m n for the correlation coefficients {p i} = p1, …, p n of each vector in with the vector u, as shown in Equation (9): p i = Softmax(u T m i ) (9); In formula (9), p i represents the memory vector m i is the attention weight coefficient, and Softmax represents the Softmax function; taking p i as the memory vector m i as the attention weight coefficient, multiplying the memory vector m i by p i to obtain the weighted output vector o i , as shown in formula (10): o i = p i × m i (10); Finally, the embedded representation u of the short-term time series is concatenated with the weighted output vector set {o i} as the input of the fully connected layer to predict the value at the future time t, as shown in Equation (11): y t = W[u; o1; o2, …, o T + b (11); In Equation (11), y t is the predicted value of the electricity load at time t.
2. The method for predicting electric load based on an event logic graph according to claim 1, characterized in that, The described power event graph includes nodes and directed edges, denoted as G = (E, R), where E = {e1, e2,..., e n} is the set of nodes in the event graph, and e i represents a power event; R = {r1, r2,..., r m} represents the set of relationships between events, and r i represents the causal relationship between events; The rule base P is used to store the rules for determining whether the relevant nodes in the power event logic graph are activated. Node activation means that the event bound to the node is likely to occur. The knowledge base K is used to save the predicted values of the exogenous variables required for rule judgment in a future period of time. The event and variable mapping relation table MAT is used to save the mapping relationship between events and variables.
3. The method for predicting electric load based on an event logic graph according to claim 1, characterized in that, The selected electricity consumption scenario specifically includes: The knowledge base K stores the values of the variables required for rule judgment in a future period of time; for the values of the corresponding variables in the knowledge base K in a future period of time, traverse them with the rules in the rule base P to judge whether the corresponding node events are likely to occur. When the rule judgment result is yes, the corresponding event is used as the preset electricity consumption scenario.
4. The method for predicting electric load based on an event logic graph according to claim 1, characterized in that, The reasoning on the power event logic graph is as follows: Step S31: Input the graph structure corresponding to the graph and the activated node A. Step S32: Start accessing from A and initialize the set C. Step S33: If there are unvisited adjacent nodes of the currently visited vertex, select any one to visit. If the node has no accessible nodes starting from it, add it to the set C and retreat to the most recently visited vertex. Step S34, until all vertices connected to the starting vertex have been visited, and return the set C.
5. The method for predicting electric load based on an event logic graph according to claim 1, characterized in that, The short-term time series encoder includes an input layer, a hidden layer, and an output layer; among them, The core of the LSTM is the cell state, represented by a horizontal line running through the cell; the LSTM changes the cell state through an input gate, a forget gate, and an output gate; the input gate, as shown in Equation (1), is used to control the information entering the cell unit, the forget gate, as shown in Equation (2), is used to control forgetting the information from the previous moment, and the output gate, as shown in Equation (3), is used to control the information transmitted by the cell unit to the next moment; the memory state s t As shown in Equation (4), it memorizes the historical information beneficial to predicting future data, where [h t-1 ; x t represents the concatenated vector of the hidden layer state h t-1 from the previous moment and the current input x t , and the current hidden layer state h t is obtained through Equation (5); i t = δ(W i [h t-1 ; x t + b i ) (1); f t = δ(W f [h t-1 ; x t + b f ) (2); o t = δ(W o [h t-1 ; x t +b o ) (3); In formulas (1)-(5), i t , f t , o t represent the input gate, forget gate, and output gate respectively; W i , W f , W o , W s represent the weight coefficients of the input gate, forget gate, output gate, and memory state respectively, b i , b f , b o , b s represent the bias parameters of the input gate, forget gate, output gate, and memory state respectively, δ and tanh represent the activation function sigmod; s t , s t-1 are the memory states at time t and t-1 respectively, h t , h t-1 are the hidden states at time t and t-1 respectively, represents element-wise multiplication.
6. The method for predicting electric load based on an event logic graph according to claim 1, wherein, The long-term time series encoder uses a convolutional layer composed of multiple convolutional kernels with variable dimensions in width to perform a convolutional operation on time series data in the form of a two-dimensional matrix, and simultaneously extract the dependencies in time of the data and the mutual influence relationships between variables.
7. The method for predicting electric load based on an event logic graph according to claim 6, wherein, The convolutional operation is described by formula (6): h k = φ(W S * X s + b S ) (6); In Equation (6), b S represents the bias parameter, h k represents the encoding result of the long-term time series, X S is the time series, W S is the parameter in the convolutional kernel, φ is the activation function, and * is the convolutional operation symbol.
Citation Information
Patent Citations
Intelligent investor implementation method and system
CN111353013A
Risk prediction method and device, equipment and storage medium
CN113822494A