A power load forecasting method combining knowledge graph and neural network
By combining the knowledge graph and BP neural network, we construct a knowledge graph of power load influencing factors and establish a prediction model, which solves the problem of traditional power load forecasting methods relying on historical data and human intervention, and achieves accurate prediction and stability of power load changes. promote.
Patent Information
- Application Number
- CN202011092980.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-13
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-10-13
AI Technical Summary
Traditional power load forecasting methods rely on historical data and human intervention, and are difficult to effectively handle a large number of unquantifiable and unstructured factors, resulting in inaccurate forecast results and susceptible to noise.
Combine the knowledge graph and BP neural network to construct a knowledge graph of power load influencing factors, determine the main factors, quantify the influencing factors, and establish a prediction model based on historical data to conduct power load prediction through BP neural network.
It achieves accurate prediction of power load changes, reduces human intervention, improves the accuracy and stability of prediction results, and can effectively handle complex influencing factors.
Smart Images

Figure CN112183878B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more specifically, to a method for predicting power load by combining a knowledge graph with a neural network. Background Art
[0002] As one of the pillar industries in the national industrial system, the smooth operation of the power industry is closely related to the lifeblood of the national economy. The prediction of power load is crucial in the management of the power system. The smooth operation of the power system, the formulation of reasonable electricity prices, and the real-time dispatch of electricity rely on accurate power load prediction. In the economic field, the power load budget has a huge impact on the rational allocation of resources, the optimization of power generation plans, and the achievement of the best social and economic benefits. With the improvement of living standards, the demand for electricity is positively correlated with the level of the national economy. On the other hand, date, temperature, climate, market and policy will have a huge impact on the power load, which further increases the difficulty of power load prediction.
[0003] Traditional methods of power load forecasting include: exponential smoothing, regression analysis, time series, grey prediction, Kalman filtering, wavelet analysis, expert system, artificial neural network, etc. These traditional methods rely too much on historical load data and preprocessing of historical data. In the actual working power system, human factors such as power outages will affect the operation of the system. There are many other human factors similar to this factor. On the one hand, these factors make the power system in a relatively stable environment and can also operate stably. On the other hand, many human factors determine that the system will be frequently affected and cannot escape the invasion of noise. These reasons lead to the emergence of "bad data", so the preprocessing of data is particularly important, and human intervention is inevitable.
[0004] There are too many uncontrollable factors that may cause changes in load. In addition to natural conditions, major social events such as economic factors, energy policies, environmental policies, and industry structural adjustments may have a significant impact on load forecasting, making it impossible for the expert system to eliminate them in advance.
[0005] In addition, there are some factors that cannot be quantified. Although we know that they will have an impact, we cannot accurately determine their impact. In addition to the relevant factors represented by structured data considered in traditional predictions, there are also a large number of unstructured and semi-structured influencing factors. These are difficult to solve with existing methods. Summary of the invention
[0006] In view of this, the present invention provides a power load forecasting method combining knowledge graph and neural network to achieve accurate power load forecasting.
[0007] In order to achieve the above objectives, the proposed solution is as follows:
[0008] A method for power load forecasting combining knowledge graph and neural network includes the following steps:
[0009] S101. Construct a knowledge graph of factors affecting power load;
[0010] S102, using the power load influencing factor knowledge graph to determine the main factors that affect the power load change;
[0011] S103, quantifying the main factors affecting the change of power load;
[0012] S104. Establish a prediction model by combining historical power load data and influencing factors;
[0013] S105. Perform power load forecasting based on the forecasting model to obtain a power load forecasting result.
[0014] Furthermore, the construction of the knowledge graph of factors affecting power load includes:
[0015] Build a semantic network based on entities, attributes and relationships of power load influencing factors extracted from open databases;
[0016] Acquire knowledge about power loads;
[0017] Performing digital knowledge representation on the power load related knowledge;
[0018] The knowledge related to the electric power load represented by the digital knowledge is fused and calculated.
[0019] Furthermore, the use of the knowledge graph of factors affecting power load to determine the main factors affecting power load changes includes:
[0020] By utilizing the knowledge graph of factors influencing power load and taking factors influencing power load prediction as keywords, a semantic-level search is performed to obtain the main factors influencing power load changes.
[0021] Furthermore, the determining of the main factors affecting the change in power load also includes:
[0022] Important factors that affect the change of power load are introduced; the important factors at least include: meteorological factors and holiday factors.
[0023] Furthermore, the prediction model is established by combining the historical data of power load with the influencing factors, including:
[0024] Acquiring power load data, and screening and preprocessing the power load data;
[0025] Determine the hyperparameters in the neural network, and establish and train a power load forecasting model based on the BP neural network based on the hyperparameters.
[0026] Furthermore, the screening and preprocessing of the power load data includes:
[0027] Determine historical data on power load;
[0028] Preprocessing the power load historical data to remove abnormal data;
[0029] The historical power load data is normalized after removing abnormal data.
[0030] Furthermore, the establishing and training of a power load forecasting model based on a BP neural network based on the hyperparameters includes:
[0031] S401, initializing the connection weight and threshold of the network;
[0032] S402, given input x i and the target output y i ;
[0033] S403, determining the number of neurons in the hidden layer, and determining the number of neurons in the hidden layer according to the following formula:
[0034] Among them, n and m are the number of neurons in the input and output layers respectively; a is a regulation constant between 1 and 10;
[0035] S404, the preceding propagation process of the signal:
[0036] Let the input of the i-th node be x i , and the sum of them is I i , the output is limited to a certain range through f, and the output O is obtained i :
[0037]
[0038]
[0039] Among them, w ij represents the weight of the connection between nodes i and j; θ i represents the threshold of neuron i;
[0040] The output of each layer is used as the input of the next layer, and the final output is obtained by iterating through the designed network.
[0041] S405, calculate the mean square error: k With the expected output Tk Calculate the mean square error. The mean square error value E is an important reference indicator in the neural network training process;
[0042]
[0043] Among them, O k is the output of the kth neuron among n neurons;
[0044] S406, the reverse transmission process of the error: The neural network adjusts the weight and threshold of each neuron along the negative direction of the partial derivative of the error function through the gradient descent method, and makes corrections according to the following formula:
[0045]
[0046]
[0047] Where η is the learning rate; Δw ij is the weight of the connection between nodes i and j after correction; Δθ i is the threshold of neuron i after correction;
[0048] S407, repeat steps S404 to S406 until the entire training error reaches the error accuracy requirement, that is, ΔE<s, ΔE(t)=E(t+1)-E(t); s is a preset error threshold.
[0049] It can be seen from the above technical scheme that the power load forecasting method combining knowledge graph and neural network disclosed in the present invention analyzes the characteristics of power load and the influencing factors related to its prediction, uses knowledge graph to characterize the factors affecting the change of power load, combines these influencing factors with historical data, and applies BP neural network to forecast power load, which can obtain accurate power load forecasting results. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A flowchart of a method for power load forecasting combining knowledge graph and neural network disclosed in an embodiment of the present invention;
[0052] Figure 2 A flowchart of constructing a knowledge graph of factors affecting power load disclosed in an embodiment of the present invention;
[0053] Figure 3 A schematic diagram of a knowledge graph of main influencing factors of power load disclosed in an embodiment of the present invention;
[0054] Figure 4 The figure is a flow chart of a BP neural network disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] The present invention provides a power load forecasting method combining knowledge graph and neural network to achieve accurate power load forecasting.
[0057] See also Figure 1 , which shows a flow chart of a method for power load prediction combining knowledge graph and neural network in an embodiment of the present invention. The method comprises the following steps:
[0058] S101. Construct a knowledge graph of factors affecting power load;
[0059] The specific methods of constructing the knowledge graph of factors affecting power load include:
[0060] a. Build a semantic network;
[0061] Using the concepts of graph and network, a semantic network is established. The edges in the graph represent attributes or relationships, while the nodes in the graph point to entities or attribute values. First, enter an open database (usually the Internet, HowNet, or something like an intranet of a power grid), and then extract the entities, attributes, and relationships of the relevant factors affecting the power load that need to be constructed, and build a semantic network from the bottom up, ultimately forming a knowledge graph of factors affecting the power load.
[0062] b. Acquire knowledge related to power load;
[0063] Building a knowledge graph requires acquiring knowledge, using crawlers, machine learning, crowdsourcing and other methods to extract information related to power load changes from data of different structures and types from the complex information network, and then converting them into structured data that can be understood and calculated by computers for further analysis and utilization.
[0064] c. Digital knowledge representation;
[0065] The knowledge related to power load can be defined as the factors that affect load changes. Knowledge representation is to transform these factors into structured data that can be understood and calculated by computers. It requires knowledge applied to data structures in order to better describe and define knowledge.
[0066] d. Knowledge fusion and computation;
[0067] Knowledge fusion is the process of knowledge organization and information fusion. By acquiring, matching, integrating, and mining knowledge from many scattered and heterogeneous resources, implicit or valuable new knowledge is obtained, while optimizing the structure and connotation of knowledge and providing knowledge services. Knowledge computing mainly does two things: one is knowledge statistics and graph mining, which mainly does preliminary statistics and query work; the other is knowledge reasoning, which mainly does symbol-based logical reasoning and statistical-based computational reasoning work. Knowledge computing mainly serves the output of knowledge graphs.
[0068] S102, determining factors affecting changes in power load;
[0069] As an emerging technology, knowledge graph provides a concise and clear way to express information in today's big data era. It organically combines massive amounts of trivial information and presents them clearly to people, making knowledge expression closer to human understanding.
[0070] The established knowledge graph of power load related factors is used for semantic search. Compared with traditional keyword search, the advantages of knowledge graph are obvious, especially when there are multiple keywords in the search conditions and there are certain connections between the keywords. Based on intelligent query, with the factors affecting power load prediction as keywords, a knowledge graph about the main factors affecting power load can be obtained.
[0071] After analyzing the factors that affect power load forecasting and constructing a knowledge graph, meteorological factors and holiday factors can be introduced to improve the model. It should be noted that factors such as geographical differences and policy differences are of course also important factors that affect power load changes and can also be introduced as inputs into the forecasting model. The present invention does not limit the important factors introduced into the forecasting model.
[0072] S103. Quantify the factors that affect the change of power load;
[0073] Taking weather and holidays as an example, the relevant factors are processed:
[0074] (1) Quantitative processing of weather;
[0075] The weather is roughly divided into five different types: sunny, cloudy, overcast, rainy, and snowy. Their corresponding values are shown in Table 1.
[0076] Table 1
[0077] Weather conditions sunny partly cloudy cloudy day rain Snowy Days Value 1 0.8 0.6 0.4 0.2
[0078] (2) Quantitative processing of holidays;
[0079] In addition to weather, it is obvious that holidays are also a key factor affecting power load. For example, the power consumption of large factories on weekdays should be greater than that on holidays. The dates are divided into two categories: weekdays and holidays. Weekdays are the days when factories normally go to work. Considering social factors, holidays refer to weekends and national statutory holidays, such as Spring Festival, May Day, National Day, etc. In the input here, the working day is set to 0.5 and the holiday is set to 1.
[0080] S104. Establish a prediction model by combining historical power load data and influencing factors;
[0081] To build a model for power load forecasting, it is necessary to collect and organize relevant load data, screen and preprocess the data, and establish the target sample and training sample of the BP neural network. After quantifying and normalizing the historical load data and influencing factors, input them into the model and start training.
[0082] (a) obtaining power load data, and screening and preprocessing the obtained power load data;
[0083] The preprocessing stage mainly requires the following steps:
[0084] Determine historical data: For a prediction problem, the importance of accurate historical data is self-evident. It can be said that believing in history is the fundamental basis for future predictions. In the prediction of power load, the data is generally provided by the power supply department, and its reliability is guaranteed to a certain extent.
[0085] Data preprocessing: There will inevitably be abnormal data in a large amount of data. If these abnormal data are not processed, the final result will have a large error. Here we use two data preprocessing methods: horizontal and vertical. Horizontal preprocessing is to eliminate data that changes too drastically, and vertical preprocessing is to eliminate data that is too inconsistent with common sense and rules.
[0086] Data normalization: Since the input of artificial neurons is [0,1] or [-1,1] data, and the power load data obviously does not meet such characteristics, they need to be normalized and converted into data between [0,1]. Specifically, the difference between the maximum and minimum values of the existing data can be divided equally, and the maximum value can be set to 1 (0.9) and the minimum value to 0 (0.1), and then the existing data can be mapped to this range for calculation.
[0087] (b),Selection of hyperparameters in neural networks;
[0088] The hyperparameters in the BP neural network can be divided into the following three categories according to their different adjustment methods. Some parameters need to be adjusted according to the mechanism of action, some parameters need to be adjusted according to the training situation of the training set, and some parameters need to be adjusted according to the prediction effect of the model on the non-training set (the generalization ability of the model). Among them, the comprehensive use of broad policies and control variable methods can quickly and effectively select the best parameters, such as the adjustment of the learning rate η and the selection of the regularization parameter λ. The number of layers L of the neural network and the number of neurons j acting in the middle layer are usually fine-tuned according to experimental results.
[0089] (c), BP neural network algorithm;
[0090] S401: First, initialize the connection weights and thresholds of the network.
[0091] At this stage, the system automatically and randomly initializes all weights and thresholds. In order to prevent the network from entering a saturated state too early, they are generally set to smaller random numbers.
[0092] S402, given input x i and the target output y i , that is, given sample data.
[0093] S403. Determine the number of neurons in the hidden layer, which is usually related to the dimensions of the input and output. The number can be determined according to the following formula:
[0094] Among them, n and m are the number of neurons in the input and output layers respectively; a is a regulation constant between 1 and 10;
[0095] S404, the preceding propagation process of the signal;
[0096] Let the input of the i-th node be x i , and the sum of them is I i , after f limits the output to a certain range, the output O is obtained i :
[0097]
[0098]
[0099] Among them, w ij represents the weight of the connection between nodes i and j; θ i represents the threshold of neuron i;
[0100] The output of each layer serves as the input of the next layer, and the final output is obtained by iterating through the designed network.
[0101] S405, calculate the mean square error: k With the expected output T k Calculate the mean square error. The mean square error value E is an important reference indicator in the neural network training process;
[0102]
[0103] Among them, O k is the output of the kth neuron among n neurons;
[0104] S406, the reverse transmission process of the error: The neural network adjusts the weight and threshold of each neuron along the negative direction of the partial derivative of the error function through the gradient descent method, and makes corrections according to the following formula:
[0105]
[0106]
[0107] Where η is the learning rate; Δw ij is the weight of the connection between nodes i and j after correction; Δθ i is the threshold of neuron i after correction;
[0108] S407, repeat the above three steps (S4-S6) until the entire training error reaches the error accuracy requirement, that is, △E<s, △E(t)=E(t+1)-E(t); s is the preset error threshold.
[0109] S105. Perform power load forecasting based on the forecasting model to obtain a power load forecasting result.
[0110] The power load forecasting method combining knowledge graph and neural network in the embodiment of the present invention analyzes the characteristics of power load and the influencing factors related to its prediction, uses knowledge graph to characterize the factors affecting the change of power load, combines these influencing factors with historical data, and applies BP neural network to forecast power load, which can obtain accurate power load forecasting results.
[0111] Finally, it should be noted that in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.
[0112] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for power load forecasting combining knowledge graph and neural network, characterized in that: The following steps are involved: S101. Construct a knowledge graph of factors affecting power load. The process includes: Build a semantic network based on entities, attributes and relationships of power load influencing factors extracted from open databases; Acquire knowledge about power loads; Performing digital knowledge representation on the power load related knowledge; Performing knowledge fusion and calculation on the power load related knowledge represented by the digital knowledge; S102: using the knowledge graph of factors affecting power load, determine the main factors affecting power load changes, specifically: By using the knowledge graph of factors influencing power load, using factors influencing power load prediction as keywords, a semantic search is performed to obtain the main factors affecting power load changes; important factors affecting power load changes are introduced; the important factors affecting power load changes include: meteorological factors, holiday factors, geographical differences and policy differences; S103, quantifying the main factors affecting the change of power load; S104. Establish a prediction model by combining historical power load data and influencing factors; S105. Perform power load forecasting based on the forecasting model to obtain a power load forecasting result.
2. The method according to claim 1, characterized in that The prediction model is established by combining historical power load data with influencing factors, including: Acquiring power load data, and screening and preprocessing the power load data; Determine the hyperparameters in the neural network, and establish and train a power load forecasting model based on the BP neural network based on the hyperparameters.
3. The method according to claim 2, characterized in that Screening and preprocessing the power load data include: Determine historical data on power load; Preprocessing the power load historical data to remove abnormal data; The historical power load data is normalized after removing abnormal data.
4. The method according to claim 2, characterized in that: The method of establishing and training a power load prediction model based on a BP neural network based on the hyperparameters includes: S401, initializing the connection weight and threshold of the network; S402, given input x i and the target output y i ; S403, determining the number of neurons in the hidden layer, and determining the number of neurons in the hidden layer according to the following formula: Among them, n and m are the number of neurons in the input and output layers respectively; a is a regulation constant between 1 and 10; S404, the preceding propagation process of the signal: Let the input of the i-th node be x i , the hidden layer input is I i , the output is limited to a certain range through the transfer function f, and the output O is obtained i : where w ij , represents the weight of the connection between nodes i and j; θ i represents the threshold of neuron i; The output of each layer is used as the input of the next layer, and the final output is obtained by iterating through the designed network. S405, calculate the mean square error: k With the expected output T k Calculate the mean square error. The mean square error value E is an important reference indicator in the neural network training process; Among them, O k is the output of the kth neuron among n neurons; S406, the reverse transmission process of the error: The neural network adjusts the weight and threshold of each neuron along the negative direction of the partial derivative of the error function through the gradient descent method, and makes corrections according to the following formula: Where η is the learning rate; Δw ij is the weight of the connection between nodes i and j after correction; Δθ i is the threshold of neuron i after correction; S407. Repeat steps S404 to S406 until the entire training error reaches the error accuracy requirement.
Citation Information
Patent Citations
Power load prediction method
CN106997495A
Knowledge graph expansion method and device in electric power field
CN110851577A
