Energy internet load prediction method and device and electronic equipment
By building and processing the load matrix and selecting the appropriate neural network model for training, the problem of low load prediction accuracy in the existing technology is solved, and more efficient and robust load prediction is achieved.
Patent Information
- Application Number
- CN202311638203.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-06-03
AI Technical Summary
The existing energy Internet load prediction method adopts a fixed neural network structure, resulting in low prediction accuracy, lack of dynamics and adaptability, and it is difficult to adapt to the dynamic changes of samples and complex system operation characteristics.
By constructing the first load matrix based on historical data, selecting the second load matrix from it using the information entropy change rate, and determining the backward propagation network or echo state network as the prediction model based on its information entropy threshold, training is performed to obtain the load prediction value of the target time position.
It improves the accuracy and robustness of energy Internet load prediction, can better adapt to the dynamic changes of load data and complex system characteristics, and improves the accuracy of prediction.
Smart Images

Figure CN120090155A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power equipment detection, and particularly to a method, device and electronic device for load forecasting in an energy Internet. Background Art
[0002] The operation of the energy Internet is a complex system. Effective analysis of the load forecasting data collected during its operation can improve the system operation efficiency, and then achieve system optimization control, assist the system to complete intelligent operation and maintenance, reduce energy consumption and operation costs, and ensure the economy and stability of the system operation.
[0003] The load forecasting of the power system is affected by many factors, such as weather, faults, noise and user satisfaction, etc. These effects lead to the system being non-linear, non-periodic and non-stationary, bringing great challenges to the accurate estimation of future power loads.
[0004] Currently, when performing load forecasting based on neural networks, a fixed neural network structure is adopted, which is difficult to adjust according to specific forecasting tasks, resulting in the lack of dynamics and self-adaptability of the forecasting method, and it is difficult to adapt to the dynamic changes of samples and the complex system operation characteristics, resulting in low forecasting accuracy. Summary of the Invention
[0005] In view of this, the present application provides a method, device and electronic device for load forecasting in an energy Internet to solve the technical problem that the current load forecasting method in the energy Internet uses a fixed neural network structure, resulting in low forecasting accuracy.
[0006] In a first aspect, an embodiment of the present application provides a method for load forecasting in an energy Internet, including:
[0007] Determine a first load matrix based on the historical data of the energy Internet load. The column vectors of the first load matrix include the energy Internet loads at the same time position within a plurality of preset time units within a preset time range, and the row vectors of the first load matrix include the energy Internet loads at a plurality of time positions of the same preset time unit;
[0008] Select a second load matrix from the first load matrix based on the information entropy change rate, where the last column of the second load matrix corresponds to the target time position;
[0009] Determine whether the information entropy of the second load matrix is less than a preset first information entropy threshold. If so, determine that the prediction model uses a backpropagation network; otherwise, determine that the prediction model uses an echo state network;
[0010] Obtain a plurality of training samples from the second load matrix, and use the plurality of training samples to train the prediction model to obtain a trained prediction model;
[0011] Obtain input data from the second load matrix, where the input data at least includes the row vector corresponding to the time position closest to the target time position in the second load matrix; use the trained prediction model to process the input data to obtain the predicted value of the energy Internet load at the target time position.
[0012] In a possible implementation, determining the first load matrix based on the historical data of the energy Internet load includes:
[0013] Obtain the energy Internet load data of multiple preset time units within a preset time range;
[0014] Preprocess the energy Internet load data of multiple preset time units, where the preprocessing includes at least one of normalization, denoising, compressive sensing, and principal component analysis;
[0015] Align the time positions of the energy Internet load data of multiple preset time units so that the energy Internet load data of each preset time unit includes the energy Internet load at multiple identical time positions;
[0016] Use the energy Internet load at multiple time positions of each preset time unit as row vectors to establish the first load matrix.
[0017] In a possible implementation, selecting the second load matrix from the first load matrix based on the information entropy change rate; includes:
[0018] Use the column where the target time position of the first load matrix is located as the first variable-length window with a length of 1; increment the length of the first variable-length window by 1 in the row direction to the left to obtain multiple first variable-length windows with increasing lengths;
[0019] Set the initial value of m to 1, increment m by 1, and calculate the change rate of the information entropy of the energy Internet load of the first variable-length window with a length of m and the first variable-length window with a length of m + 1 in sequence;
[0020] When the change rate of the information entropy is greater than the preset threshold, use the first variable-length window with a length of m to obtain the second load matrix in the first load matrix.
[0021] In a possible implementation, the method further includes:
[0022] Calculate the information entropy of each column vector in the first load matrix;
[0023] Based on the k-means algorithm, classify the information entropy of all column vectors into three categories: low information entropy, medium information entropy, and high information entropy;
[0024] Calculate the average of the maximum value among all low information entropies and the minimum value among all medium information entropies as the second information entropy threshold;
[0025] Calculate the average of the maximum value among all medium information entropies and the minimum value among all high information entropies as the first information entropy threshold.
[0026] In a possible implementation, obtaining multiple training samples from the second load matrix includes:
[0027] Calculate the information entropy of each column vector of the second load matrix to obtain the maximum value maxE of all information entropies;
[0028] Calculate the first length K of the sliding window 1 :
[0029]
[0030] where ceil() is the ceiling function; E is the information entropy of the column vector of the last column of the second load matrix;
[0031] Set the window length to K 1 The first sliding window slides along the column direction in the second load matrix, and multiple training samples are obtained in the second load matrix using multiple first sliding windows; where one training sample includes K 1 row vectors of the second load matrix, and the first K 1 -1 row vectors are the input samples of the prediction model, and the last row vector is the labeled data.
[0032] In a possible implementation, obtaining input data from the second load matrix includes:
[0033] Determine the first length N of the input data 1 as the first length K of the sliding window 1 minus 1;
[0034] Use the last N 1 row vectors of the second load matrix as the input data.
[0035] In a possible implementation, obtaining multiple training samples from the second load matrix includes:
[0036] Use the row vector of the last row of the second load matrix as the second variable-length window; increase the length of the second variable-length window by 1 incrementally in the column direction to obtain multiple second variable-length windows with increasing lengths;
[0037] Set the initial value of n to 1, increase n by 1 incrementally, and calculate the change rate of the information entropy of the energy Internet load of the second variable-length window with length n and the second variable-length window with length n + 1 in sequence;
[0038] When the change rate of the information entropy is greater than a preset threshold, determine the second length K of the sliding window 2 equal to n;
[0039] Slide the second sliding window with window length K 2 along the column direction in the second load matrix, and obtain multiple training samples in the second load matrix by using multiple second sliding windows; wherein, one training sample includes K 2 row vectors of the second load matrix, and the first K 2 -1 row vectors are input samples of the prediction model, and the last row vector is labeled data.
[0040] In a possible implementation, obtaining input data from the second load matrix includes:
[0041] Determine the second length N of the input data 2 as the second length K of the sliding window 2 minus 1;
[0042] Use the last N 2 row vectors of the second load matrix as input data.
[0043] In a possible implementation, when the preset time unit is days, the method further includes:
[0044] Obtain the external feature vectors corresponding to the dates of each row of the first load matrix, and the external feature vectors include at least one of weather, network topology, network faults, electricity price, and user comfort;
[0045] Add the corresponding external feature vectors to each element of each row of the first load matrix.
[0046] In a second aspect, an energy Internet load prediction device provided by an embodiment of the present application includes:
[0047] A determination unit, configured to determine a first load matrix based on historical data of energy Internet loads, where column vectors of the first load matrix include energy Internet loads at the same time position within a preset time range for multiple preset time units, and row vectors of the first load matrix include energy Internet loads at multiple time positions of the same preset time unit;
[0048] A processing unit, configured to select a second load matrix from the first load matrix based on the information entropy change rate, where the last column of the second load matrix corresponds to the target time position;
[0049] A model determination unit, configured to determine whether the information entropy of the second load matrix is less than a preset first information entropy threshold. If so, it determines that the prediction model uses a backpropagation network; otherwise, it determines that the prediction model uses an echo state network.
[0050] A training unit, configured to obtain a plurality of training samples from the second load matrix, and use the plurality of training samples to train the prediction model to obtain a trained prediction model.
[0051] A prediction unit, configured to obtain input data from the second load matrix, where the input data at least includes a row vector corresponding to the time position closest to the target time position in the second load matrix; use the trained prediction model to process the input data to obtain a predicted value of the energy Internet load at the target time position.
[0052] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor, where an executable program is stored in the memory, and the processor executes the executable program to implement the steps of the method in the embodiment of the present application.
[0053] In a fourth aspect, an embodiment of the present application provides a storage medium, which carries one or more computer programs, and when the one or more computer programs are executed by a processor, the steps of the method in the embodiment of the present application are implemented.
[0054] The present application improves the accuracy and robustness of the prediction of the energy Internet load. Description of the Drawings
[0055] Figure 1 It is a flowchart of the energy Internet load prediction method in the embodiment of the present application;
[0056] Figure 2 It is a schematic diagram of the backpropagation network in the embodiment of the present application;
[0057] Figure 3 It is a schematic diagram of the echo state network in the embodiment of the present application;
[0058] Figure 4 It is a schematic diagram of an application example in the embodiment of the present application;
[0059] Figure 5 It is a structural block diagram of the energy Internet load prediction device in the embodiment of the present application;
[0060] Figure 6 It is a structural block diagram of the electronic device in the embodiment of the present application. Detailed Embodiments
[0061] Reference is made herein to the various solutions and features of the present application with reference to the drawings.
[0062] It should be understood that various modifications can be made to the embodiments applied herein. Therefore, the above description should not be construed as limiting, but merely as an example of the embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the present application.
[0063] The accompanying drawings, which are included in and constitute a part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0064] These and other features of the present application will become apparent from the following description of the preferred forms of the embodiments, given by way of non-limiting example with reference to the accompanying drawings.
[0065] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art can surely implement many other equivalent forms of the present application.
[0066] When taken in conjunction with the accompanying drawings, the above and other aspects, features, and advantages of the present application will become more apparent in view of the following detailed description.
[0067] Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied are merely examples of the present application and can be implemented in various ways. Well-known and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details applied herein are not intended to be limiting, but merely as a basis for the claims and a representative basis for teaching those skilled in the art to use the present application in substantially any suitable detailed structure in a variety of ways.
[0068] This specification may use the phrases "in one embodiment", "in another embodiment", "in yet another embodiment", or "in other embodiments", which may each refer to one or more of the same or different embodiments according to the present application.
[0069] First, a brief introduction to the design concept of the embodiments of the present application will be given.
[0070] With the development and maturity of artificial intelligence technology, researchers have increasingly applied neural networks to the load forecasting and estimation of the energy Internet. However, the recognition performance of artificial networks based on overall training for different operating states is limited, and there are sample conflicts in some cases when estimating and modeling only through implicit functions, which brings certain performance limitations to the energy consumption estimation in the full operating stage. Neural networks based on classification / clustering have received increasing attention.
[0071] When performing load forecasting, existing methods rarely consider the uncertainty of historical data and determine corresponding classification methods according to its uncertainty, resulting in poor forecasting performance and difficulty in meeting the load forecasting requirements of the energy Internet.
[0072] In order to achieve accurate estimation of the load data of the energy Internet, this application first obtains the historical energy consumption data of the energy Internet system over a period of time. Based on the periodic characteristics and similarity of the system, as well as the uncertainty of the load data, the information entropy state classification is performed on the training sample data. Different neural network models are established for each information entropy state for training to achieve accurate estimation of the current system load. Selecting different prediction neural network structures for prediction according to the information entropy size of the training sample data can effectively improve the accuracy of the energy Internet load forecasting and greatly enhance the operation performance of the energy Internet.
[0073] This application can realize multi-scale and multi-time dimension estimation of the energy consumption load of the energy Internet; the periodicity of the data sequence and the uncertainty state (entropy value) at different time positions of the data sequence are considered in the estimation process. Based on the uncertainty estimation, different neural network structures are selected to establish corresponding neural network models to achieve the energy Internet load estimation under different states. In addition, the energy Internet load results of this application can be used for the operation state analysis and optimization of the energy Internet system, realizing the low-cost operation and robust and efficient operation and maintenance of the energy Internet system, ensuring the overall security and stability of the regional power system, improving the energy consumption comfort of users, and bringing considerable economic and social benefits.
[0074] After introducing the application scenarios and design ideas of the embodiments of this application, the technical solutions provided by the embodiments of this application will be described below.
[0075] As Figure 1 shown, the embodiments of this application provide a method for forecasting the load of the energy Internet, including the following steps:
[0076] Step 101: Determine a first load matrix based on the historical data of the energy Internet load. The column vectors of the first load matrix include the energy Internet loads at the same time position within a plurality of preset time units within a preset time range, and the row vectors of the first load matrix include the energy Internet loads at a plurality of time positions within the same preset time unit;
[0077] Step 102: Select a second load matrix from the first load matrix based on the information entropy change rate, where the last column of the second load matrix corresponds to the target time position;
[0078] Step 103: Determine whether the information entropy of the second load matrix is less than a preset first information entropy threshold. If so, determine that the prediction model uses a backpropagation network; otherwise, determine that the prediction model uses an echo state network.
[0079] Step 104: Obtain multiple training samples from the second load matrix, and use the multiple training samples to train the prediction model to obtain a trained prediction model.
[0080] Step 105: Obtain input data from the second load matrix, where the input data at least includes the row vector corresponding to the time position closest to the target time position in the second load matrix; use the trained prediction model to process the input data to obtain the predicted value of the energy Internet load at the target time position.
[0081] In a preferred embodiment, the preset time unit is a day, and the time positions are obtained by equally spaced time division within a day. For example, every 2 hours, every 1 hour, every 30 minutes, every 15 minutes, etc. The specific division is determined according to the actual requirements of the application scenario.
[0082] When the preset time unit is a day, determining the first load matrix based on the historical data of the energy Internet load includes:
[0083] Obtain the energy Internet load data for consecutive multiple days within a preset time range;
[0084] Preprocess the energy Internet load data for consecutive multiple days, where the preprocessing includes at least one of normalization, denoising, compressive sensing, and principal component analysis;
[0085] Align the time positions of the energy Internet load data for multiple days so that the energy Internet load data for each day includes the energy Internet load at multiple identical time positions;
[0086] Use the energy Internet load at multiple time positions for each day as row vectors to establish the first load matrix.
[0087] In another embodiment, the preset time unit is a month, then the time position is a day; in other embodiments, the preset time unit is a year, then the time position is a month. Thus, different time predictions for long cycles and short cycles are achieved.
[0088] In this embodiment, the information entropy is used to reflect the uncertainty state of the load sequences (column vectors) at different time positions, and then different neural network structures are selected based on the uncertainty state. To calculate the information entropy, the required data sequence needs to be determined first. Usually, the column vector where the target time position is located is directly used as the load sequence. However, this single-column load data cannot accurately reflect the uncertainty state. Based on this column as a reference, several columns of data need to be added to the left in the row direction to calculate the information entropy. This process is as follows: Select a second load matrix from the first load matrix based on the information entropy change rate; specifically including:
[0089] Use the column where the target time position of the first load matrix is located as the first variable-length window with a length of 1; increment the length of the first variable-length window by 1 in the row direction to the left, and obtain multiple first variable-length windows with increasing lengths;
[0090] Set the initial value of m to 1, increment m by 1, and calculate the change rate of the information entropy of the energy Internet load of the first variable-length window with a length of m and the first variable-length window with a length of m + 1 in turn;
[0091] When the change rate of the information entropy is greater than the preset threshold, use the first variable-length window with a length of m to obtain the second load matrix in the first load matrix.
[0092] Preferably, the preset threshold is 10%.
[0093] After obtaining the information entropy, it is necessary to obtain the state of the information entropy according to the judgment threshold of the information entropy state. The calculation method of the threshold includes:
[0094] Calculate the information entropy of each column vector in the first load matrix;
[0095] Based on the k-means algorithm, divide the information entropy of all column vectors into three categories: low information entropy, medium information entropy, and high information entropy;
[0096] Calculate the average value of the maximum value of all low information entropy and the minimum value of all medium information entropy as the second information entropy threshold;
[0097] Calculate the average value of the maximum value of all medium information entropy and the minimum value of all high information entropy as the first information entropy threshold.
[0098] Then, when the information entropy of the second load matrix is less than or equal to the first information entropy threshold, the information entropy state of the second load matrix is low information entropy; when the information entropy of the second load matrix is greater than the first information entropy threshold and less than or equal to the second information entropy threshold, the information entropy state of the second load matrix is medium information entropy; when the information entropy of the second load matrix is greater than the second information entropy threshold, the information entropy state of the second load matrix is high information entropy.
[0099] When the information entropy state of the second load matrix is low information entropy and medium information entropy, it indicates that the uncertainty of the second load matrix is low. Therefore, the backpropagation network BPN is used as the prediction model to improve the prediction accuracy. The backpropagation network BPN is as Figure 2 shown. When the state of the second load matrix is high information entropy, it indicates that the uncertainty of the second load matrix is high. Therefore, the echo state network ESN is used as the prediction model to improve the prediction robustness. The echo state network ESN is as Figure 3 shown.
[0100] To further improve the prediction effect, a more complex information entropy classification logic can also be adopted. In addition, the backpropagation network BPN can be replaced by a more complex neural network structure, such as a convolutional neural network, a recurrent neural network, an LSTM neural network, etc. The echo state network ESN can also adopt an improved version to further improve the algorithm performance. The combination with other machine learning algorithms can also be realized in the classification prediction algorithm.
[0101] Preferably, the node function of the backpropagation network selects the tanh(x) function:
[0102]
[0103] where x is a variable.
[0104] After the neural network structure of the prediction model is determined, training samples need to be selected from the second load matrix to train the prediction model. Since the number of columns of the second load matrix has been determined, then the number of rows of the second load matrix included in a training sample needs to be determined.
[0105] This embodiment uses two methods to determine the number of row vectors in the training sample:
[0106] The first method is to calculate the length of the optimal fixed window, which specifically includes:
[0107] Calculate the information entropy of each column vector of the second load matrix to obtain the maximum value maxE of all information entropies;
[0108] Calculate the first length K of the sliding window 1 :
[0109]
[0110] where ceil() is the ceiling function; E is the information entropy of the column vector of the last column of the second load matrix;
[0111] Take the window length as K 1The first sliding window slides along the column direction of the second load matrix, and multiple training samples are obtained in the second load matrix by using multiple first sliding windows; wherein, one training sample includes K 1 row vectors of the second load matrix, and the first K 1 -1 row vectors are input samples of the prediction model, and the last row vector is labeled data.
[0112] The second method is to determine the length of the optimal fixed window through the change rate of information entropy, which specifically includes:
[0113] Taking the row vector of the last row of the second load matrix as the second variable-length window; increasing the length of the second variable-length window by 1 incrementally upward in the column direction to obtain multiple second variable-length windows with increasing lengths;
[0114] Set the initial value of n to 1, increase n by 1 incrementally, and calculate the change rate of the information entropy of the energy Internet load of the second variable-length window with length n and the second variable-length window with length n + 1 in turn;
[0115] When the change rate of information entropy is greater than the preset threshold, determine that the second length K 2 of the sliding window is equal to n;
[0116] Slide the second sliding window with window length K 2 along the column direction of the second load matrix, and obtain multiple training samples in the second load matrix by using multiple second sliding windows; wherein, one training sample includes K 2 row vectors of the second load matrix, and the first K 2 -1 row vectors are input samples of the prediction model, and the last row vector is labeled data.
[0117] Preferably, the preset threshold is 10%.
[0118] For the prediction model trained with the training samples determined by the first method, obtaining input data from the second load matrix in step 105 includes:
[0119] Determine that the first length N 1 of the input data is the first length K 1 of the sliding window minus 1;
[0120] Take the last N 1 row vectors of the second load matrix as input data.
[0121] For the prediction model trained with the training samples determined by the second method, obtaining input data from the second load matrix in step 105 includes:
[0122] Determine the second length N2 is the second length K of the sliding window 2 minus 1;
[0123] Use the reciprocals N of the second load matrix 2 row vectors as input data.
[0124] Optionally, if K 1 and K 2 are not equal, two methods can be used to determine the training samples respectively, train the prediction models respectively to obtain two prediction models, input the input data determined by the two methods into the corresponding prediction models respectively, output two prediction values, and take the average of the two prediction values as the final prediction value.
[0125] In addition, during the model training process, external factors can be considered, such as weather, network topology, network failures, electricity prices, user comfort, etc., and added to the training samples in the form of variables.
[0126] Exemplarily, taking weather as an example, it includes {sunny, rainy, foggy, special weather, etc.}, corresponding to {1 / 4, 2 / 4, 3 / 4, 4 / 4} respectively. Taking network topology as an example {complex network, simple network, specific structure network, etc.}, corresponding to {1 / 3, 2 / 3, 3 / 3} respectively. Taking failures as an example, it includes {normal, warning, failure, severe failure, etc.}, corresponding to {1 / 4, 2 / 4, 3 / 4, 4 / 4} respectively. Taking electricity prices as an example, it specifically includes {peak, valley, flat electricity prices, etc.}, corresponding to {1 / 3, 2 / 3, 3 / 3} respectively. Taking user comfort as an example, it specifically includes {satisfied, perceivable change, slightly uncomfortable, obviously uncomfortable, intention to file a complaint, etc.}, corresponding to {1 / 5, 2 / 5, 3 / 5, 4 / 5, 1} respectively. The above variables can be trained and predicted together with the historical load data.
[0127] The specific implementation process includes:
[0128] Obtain the external feature vectors corresponding to each date in the first load matrix, and the external feature vectors include at least one of weather, network topology, network failures, electricity prices, and user comfort; add the corresponding external feature vectors to each element in each row of the first load matrix.
[0129] Exemplarily, the external feature vector of a date is: (1 / 4, 2 / 3, 1 / 4, 3 / 3, 2 / 5), then the external factors of this date include: the weather is sunny, the network topology is a simple network, the failure is normal, the electricity price is the flat electricity price, and the user comfort is a perceivable change.
[0130] The method of this embodiment can realize the real-time prediction of the operating load of different power grids. Based on the collection density and frequency of historical data, load predictions for different scales, different times, and different levels can be achieved. Based on the relevant prediction data, with energy conservation and cost minimization as the optimization objectives, the real-time state optimization of the energy Internet operation can be realized. Based on the long-term and short-term load predictions of the energy Internet, the high-performance operation and maintenance control of the regional power system can be realized. By reducing the macro energy consumption cost and improving the user comfort, the robust, stable, and efficient operation of the energy Internet can be achieved.
[0131] Next, the specific implementation process of this application will be described in conjunction with a specific application scenario.
[0132] As Figure 4 shown, a first load matrix is constructed with the load data at 3 o'clock, 4 o'clock, 5 o'clock, and 6 o'clock on the (N - 4)th day, (N - 3)th day, (N - 2)th day, (N - 1)th day, and Nth day. The target date is the Nth day, and the target time position is 6 o'clock.
[0133] First, it is necessary to select a second load matrix from the first load matrix: taking the column where the 6 o'clock time position of the first load matrix is located as a first variable-length window with a length of 1; calculating the change rate of the information entropy of the energy Internet load of the first variable-length window with a length of 1 and the first variable-length window with a length of 2; it is found that the change rate of the information entropy is greater than 10%. Therefore, the second load matrix is a column, that is, the column vector where the 6 o'clock time position is located.
[0134] Next, calculate the information entropy of the second load matrix, and thus judge that the information entropy state of the second load matrix is low information entropy, and select the neural network structure of BPN as the prediction model.
[0135] Then, select training samples from the second load matrix. Using the first method, after calculation, K 1 = 3, so there are 3 training samples:
[0136] The first one: 6 o'clock on the (N - 2)th day, 6 o'clock on the (N - 1)th day, 6 o'clock on the Nth day. Among them, the first two are the model input samples, and the last one is the labeled data;
[0137] The second one: 6 o'clock on the (N - 3)th day, 6 o'clock on the (N - 2)th day, 6 o'clock on the (N - 1)th day. Among them, the first two are the model input samples, and the last one is the labeled data;
[0138] The third one: 6 o'clock on the (N - 4)th day, 6 o'clock on the (N - 3)th day, 6 o'clock on the (N - 2)th day. Among them, the first two are the model input samples, and the last one is the labeled data;
[0139] Use the training samples to train the prediction model to obtain the trained prediction model.
[0140] Finally, obtain input data from the second load matrix: the load at 6 o'clock on the (N-2)th day, the load at 6 o'clock on the (N-1)th day, and the load at 6 o'clock on the Nth day. Input the input data into the trained prediction model to obtain the load prediction value at 6 o'clock on the (N+1)th day.
[0141] Based on the same inventive concept, an embodiment of the present application provides a network control device. Refer to Figure 5 As shown, the energy Internet load prediction method and device 200 provided by the embodiment of the present application at least include:
[0142] A determination unit 201, configured to determine a first load matrix based on historical data of the energy Internet load. A column vector of the first load matrix includes the energy Internet load at the same time position within a plurality of preset time units within a preset time range. A row vector of the first load matrix includes the energy Internet load at a plurality of time positions within the same preset time unit;
[0143] A processing unit 202, configured to select a second load matrix from the first load matrix based on the information entropy change rate, where the last column of the second load matrix corresponds to the target time position;
[0144] A model determination unit 203, configured to determine whether the information entropy of the second load matrix is less than a preset first information entropy threshold. If so, determine that the prediction model uses a backpropagation network; otherwise, determine that the prediction model uses an echo state network;
[0145] A training unit 204, configured to obtain a plurality of training samples from the second load matrix, and use the plurality of training samples to train the prediction model to obtain a trained prediction model;
[0146] A prediction unit 205, configured to obtain input data from the second load matrix. The input data at least includes a row vector corresponding to the time position closest to the target time position of the second load matrix; use the trained prediction model to process the input data to obtain a prediction value of the energy Internet load at the target time position.
[0147] Among them, determining the first load matrix based on the historical data of the energy Internet load includes:
[0148] Obtain the energy Internet load data within a plurality of preset time units within a preset time range;
[0149] Perform preprocessing on the energy Internet load data of the plurality of preset time units, where the preprocessing includes at least one of normalization, denoising, compressive sensing, and principal component analysis;
[0150] Align the energy Internet load data of multiple preset time units in terms of time position, so that the energy Internet load data of each preset time unit includes the energy Internet loads at multiple identical time positions;
[0151] Using the energy Internet loads at multiple time positions of each preset time unit as row vectors, establish a first load matrix.
[0152] In this embodiment, selecting a second load matrix from the first load matrix based on the information entropy change rate includes:
[0153] Taking the column where the target time position of the first load matrix is located as a first variable-length window with a length of 1; increasing the length of the first variable-length window by 1 incrementally to the left in the row direction to obtain multiple first variable-length windows with increasing lengths;
[0154] Set the initial value of m to 1, increase m by 1 incrementally, and calculate the change rate of the information entropy of the energy Internet loads of the first variable-length window with a length of m and the first variable-length window with a length of m + 1 in sequence;
[0155] When the change rate of the information entropy is greater than a preset threshold, use the first variable-length window with a length of m to obtain a second load matrix in the first load matrix.
[0156] Optionally, the device further includes a calculation unit, specifically used for:
[0157] Calculate the information entropy of each column vector in the first load matrix;
[0158] Based on the k-means algorithm, classify the information entropy of all column vectors into three categories: low information entropy, medium information entropy, and high information entropy;
[0159] Calculate the average value of the maximum value of all low information entropy and the minimum value of all medium information entropy as the second information entropy threshold;
[0160] Calculate the average value of the maximum value of all medium information entropy and the minimum value of all high information entropy as the first information entropy threshold.
[0161] In this embodiment, the first implementation manner of obtaining multiple training samples from the second load matrix includes:
[0162] Calculate the information entropy of each column vector of the second load matrix to obtain the maximum value maxE of all information entropy;
[0163] Calculate the first length K of the sliding window 1 :
[0164]
[0165] Among them, ceil() is the ceiling function; E is the information entropy of the column vector of the last column of the second load matrix;
[0166] The first sliding window with a window length of K 1 slides along the column direction in the second load matrix, and multiple training samples are obtained in the second load matrix by using multiple first sliding windows; where one training sample includes K 1 row vectors of the second load matrix, and the first K 1 -1 row vectors are input samples of the prediction model, and the last row vector is the labeled data.
[0167] For the above training samples, input data is obtained from the second load matrix, including:
[0168] Determine the first length N of the input data 1 as the first length K of the sliding window 1 minus 1;
[0169] Take the last N 1 row vectors of the second load matrix as the input data.
[0170] As an alternative implementation, the second implementation of obtaining multiple training samples from the second load matrix includes:
[0171] Use the row vector of the last row of the second load matrix as the second variable-length window; increase the length of the second variable-length window by 1 incrementally upward in the column direction to obtain multiple second variable-length windows with increasing lengths;
[0172] Set the initial value of n to 1, increase n by 1 incrementally, and calculate the change rate of the information entropy of the energy Internet load of the second variable-length window with length n and the second variable-length window with length n + 1 in turn;
[0173] When the change rate of the information entropy is greater than the preset threshold, determine that the second length K of the sliding window 2 is equal to n;
[0174] The second sliding window with a window length of K 2 slides along the column direction in the second load matrix, and multiple training samples are obtained in the second load matrix by using multiple second sliding windows; where one training sample includes K 2 row vectors of the second load matrix, and the first K 2 -1 row vectors are input samples of the prediction model, and the last row vector is the labeled data.
[0175] For the above training samples, input data is obtained from the second load matrix, including:
[0176] Determine the second length N of the input data 2 as the second length K of the sliding window 2 minus 1;
[0177] Use the reciprocal N of the second load matrix 2 row vectors as input data.
[0178] As an optional implementation, when the preset time unit is days, the method further includes:
[0179] Obtain the external feature vectors corresponding to each row of the first load matrix for the corresponding dates, where the external feature vectors include at least one of weather, network topology, network failures, electricity prices, and user comfort;
[0180] Add the corresponding external feature vectors to each element in each row of the first load matrix.
[0181] As Figure 6 shown, the electronic device 300 provided by the embodiments of the present application at least includes: a processor 301, a memory 302, and a computer program stored on the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, it implements the energy Internet load forecasting method provided by the embodiments of the present application.
[0182] The electronic device 300 provided by the embodiments of the present application may further include a bus 303 connecting different components (including the processor 301 and the memory 302). Among them, the bus 303 represents one or more of several bus structures, including a memory bus, a peripheral bus, a local bus, etc.
[0183] The memory 302 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 3021 and / or a cache memory 3022, and may further include a read-only memory (ROM) 3023.
[0184] The memory 302 may further include a program tool 3024 having a set (at least one) of program modules 3025. The program modules 3025 include, but are not limited to: an operating subsystem, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0185] The electronic device 300 can also communicate with one or more external devices 304 (such as a keyboard, a remote control, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 300 (such as a mobile phone, a computer, etc.), and / or communicate with any device that enables the electronic device 300 to communicate with one or more other electronic devices 300 (such as a router, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 305. Moreover, the electronic device 300 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 306. As Figure 6 shown, the network adapter 306 communicates with other modules of the electronic device 300 through a bus 303. It should be understood that although Figure 6 not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 300, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, redundant arrays of independent disks (RAID) subsystems, tape drives, and data backup storage subsystems, etc.
[0186] It should be noted that Figure 6 the electronic device 300 shown is only an example, and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0187] The embodiments of the present application also provide a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by a processor, the energy Internet load forecasting method provided by the embodiments of the present application is implemented.
[0188] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0189] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0190] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An energy Internet load forecasting method, characterized in that, it includes: Determine a first load matrix based on the historical data of the energy Internet load. The column vectors of the first load matrix include the energy Internet loads at the same time position within a plurality of preset time units within a preset time range. The row vectors of the first load matrix include the energy Internet loads at a plurality of time positions of the same preset time unit; Select a second load matrix from the first load matrix based on the information entropy change rate. Among them, the last column of the second load matrix corresponds to the target time position; Determine whether the information entropy of the second load matrix is less than a preset first information entropy threshold. If so, determine that the prediction model uses a backpropagation network; otherwise, determine that the prediction model uses an echo state network; Obtain a plurality of training samples from the second load matrix, and use the plurality of training samples to train the prediction model to obtain a trained prediction model; Obtain input data from the second load matrix. The input data at least includes the row vector corresponding to the time position closest to the target time position of the second load matrix; use the trained prediction model to process the input data to obtain the predicted value of the energy Internet load at the target time position.
2. The energy Internet load forecasting method according to claim 1, characterized in that, Determining a first load matrix based on the historical data of the energy Internet load includes: Obtain the energy Internet load data of a plurality of preset time units within a preset time range; Preprocess the energy Internet load data of a plurality of preset time units, and the preprocessing includes at least one of normalization, denoising, compressive sensing, and principal component analysis; Align the time positions of the energy Internet load data of a plurality of preset time units so that the energy Internet load data of each preset time unit includes the energy Internet loads at a plurality of identical time positions; Establish a first load matrix with the energy Internet loads at a plurality of time positions of each preset time unit as row vectors.
3. The energy Internet load forecasting method according to claim 1 or 2, characterized in that, Selecting a second load matrix from the first load matrix based on the information entropy change rate; includes: Use the column where the target time position of the first load matrix is located as a first variable-length window with a length of 1; increase the length of the first variable-length window by 1 incrementally to the left in the row direction to obtain a plurality of first variable-length windows with increasing lengths; Set the initial value of m to 1, increase m by 1 incrementally, and calculate the change rate of the information entropy of the energy Internet load of the first variable-length window with a length of m and the first variable-length window with a length of m + 1 in turn; When the change rate of the information entropy is greater than a preset threshold, use the first variable-length window with a length of m to obtain the second load matrix in the first load matrix.
4. The energy Internet load forecasting method according to claim 1, characterized in that, The method further includes: Calculate the information entropy of each column vector in the first load matrix; Based on the k-means algorithm, classify the information entropy of all column vectors into three categories: low information entropy, medium information entropy, and high information entropy; Calculate the average value of the maximum value among all low information entropies and the minimum value among all medium information entropies as the second information entropy threshold; Calculate the average value of the maximum value among all medium information entropies and the minimum value among all high information entropies as the first information entropy threshold.
5. The energy Internet load forecasting method according to claim 3, characterized in that Obtain multiple training samples from the second load matrix, including: Calculate the information entropy of each column vector of the second load matrix to obtain the maximum value maxE of all information entropies; Calculate the first length K of the sliding window 1 : where ceil() is the floor function; E is the information entropy of the column vector of the last column of the second load matrix; Set the window length to K 1 Slide the first sliding window with a window length of K along the column direction in the second load matrix, and obtain multiple training samples in the second load matrix by using multiple first sliding windows; wherein, one training sample includes K 1 row vectors of the second load matrix, and the first K 1 - 1 row vectors are input samples of the prediction model, and the last row vector is labeled data.
6. The energy Internet load forecasting method according to claim 5, characterized in that Obtain input data from the second load matrix, including: Determine a first length N of the input data 1 is a first length K of the sliding window 1 minus 1; Use the reciprocals of the row vectors of the second load matrix, N 1 as input data.
7. The energy Internet load forecasting method according to claim 1, characterized in that Obtain multiple training samples from the second load matrix, including: Use the row vector of the last row of the second load matrix as the second variable-length window; increase the length of the second variable-length window by 1 incrementally in the column direction to obtain multiple second variable-length windows with increasing lengths; Set the initial value of n to 1, increase n by 1 incrementally, and calculate the change rate of the information entropy of the energy Internet load of the second variable-length window with length n and the second variable-length window with length n + 1 in sequence; When the change rate of the information entropy is greater than a preset threshold, determine the second length K of the sliding window 2 equal to n; Set the window length to K 2 Slide the second sliding window with a window length of K along the column direction in the second load matrix, and obtain multiple training samples in the second load matrix by using multiple second sliding windows; wherein, one training sample includes K 2 row vectors of the second load matrix, and the first K 2 - 1 row vectors are input samples of the prediction model, and the last row vector is the labeled data.
8. The energy Internet load forecasting method according to claim 7, characterized in that Obtain input data from the second load matrix, including: Determine a second length N of the input data 2 as a second length K of the sliding window 2 minus 1; Use the reciprocals N of the second load matrix 2 of row vectors as input data.
9. The energy Internet load forecasting method according to claim 1, characterized in that When the preset time unit is a day, the method further includes: Obtain the external feature vector corresponding to each row date of the first load matrix, and the external feature vector includes at least one of weather, network topology, network fault, electricity price, and user comfort; Add the corresponding external feature vector to each element of each row of the first load matrix.
10. An energy Internet load forecasting device, characterized in that including: A determination unit for determining a first load matrix based on the historical data of the energy Internet load. The column vectors of the first load matrix include the energy Internet loads at the same time position within a plurality of preset time units within a preset time range, and the row vectors of the first load matrix include the energy Internet loads at a plurality of time positions within the same preset time unit; A processing unit for selecting a second load matrix from the first load matrix based on the information entropy change rate, wherein the last column of the second load matrix corresponds to the target time position; A model determination unit for determining whether the information entropy of the second load matrix is less than a preset first information entropy threshold. If so, determine that the prediction model uses a backpropagation network; otherwise, determine that the prediction model uses an echo state network; A training unit for obtaining multiple training samples from the second load matrix and training the prediction model using the multiple training samples to obtain a trained prediction model; A prediction unit is configured to obtain input data from the second load matrix, where the input data at least includes a row vector corresponding to the time position closest to the target time position in the second load matrix; and process the input data by using a trained prediction model to obtain a predicted value of the load of the energy Internet at the target time position.