A source-load power prediction method and device considering different granularities and a storage medium
By extracting and analyzing the semantic dependency features of data at different granularities using the MultiGNet prediction model, the problem of insufficient prediction accuracy at a single granularity in existing technologies is solved, achieving higher accuracy in source-load power prediction and ensuring the stability of the power system.
Patent Information
- Application Number
- CN202211555127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-12-06
AI Technical Summary
Most existing source-load power prediction models are based on single-granularity data, ignoring the rich information of data at different granularities, resulting in insufficient prediction accuracy and an inability to effectively utilize the coupling and complementary relationships between sources and loads.
The MultiGNet prediction model is adopted. The semantic dependency features of data groups of different granularities are extracted through the cross-granularity learning module, and the feature relationship is analyzed through the granularity attention module to obtain the optimal weight. The mean squared error loss function is used for training to establish the connection between data groups of different granularities.
It improves the accuracy of source-load power prediction, enhances the identification and utilization of potential consistency between data of different granularities, and ensures the safe and reliable operation of the power system.
Smart Images

Figure CN116245211B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a source-load power prediction method and device considering different granularities and a storage medium, and belongs to the technical field of power systems. BACKGROUND
[0002] In recent years, with the rapid development and popularization of new energy, the volatility and uncertainty factors between source and load have increased significantly. The prediction of source and load power is crucial for ensuring the stable operation and reliability of the power system. The main difficulty of active power prediction in regional power systems is the inherent volatility and high uncertainty of wind power generation, photovoltaic power generation on the power generation side of the power grid and electricity consumption on the load side of the power grid, which may make the model learning more complex and lead to an increase in prediction error. Therefore, there is an urgent need to develop a high-precision model for predicting the power of both source and load.
[0003] At present, most source and load power prediction models are based on data-driven methods; for example, Random Forest (RF), Long short-term memory (LSTM) and Attention mechanism model. Among them, the document "Day-ahead load forecast using random forest and expert input selection" gives the Random Forest model for short-term prediction of wind power and load. This method is based on a traditional machine learning method. The document "Deep concatenated residual network with bidirectional LSTM for one-hour-ahead wind power forecasting" uses the Long short-term memory (LSTM) network for wind power and photovoltaic power prediction. This method only uses a single deep learning model, and there are still some deficiencies in feature extraction. The document "Short-term wind power forecasting based on Attention Mechanism and Deep Learning" uses the Attention mechanism model for short-term wind power prediction. This method also only uses a single deep learning structure.
[0004] In addition to the single method and simple model, the existing power prediction models are separately established, and the source and load are not combined for prediction. Although the wind power and photovoltaic power on the source side and the load side may be different in physics, they share some similar spatial information and exhibit similar spatial information. These coupling and complementary relationships mean that they can adapt to a region. At the same time, the existing research only uses one granularity data for power prediction task, and ignores the rich information of different granularity data, thereby affecting the prediction accuracy. SUMMARY
[0005] The present application aims to overcome the deficiencies in the prior art, and provides a source and load power prediction method, device and storage medium considering different granularity, which improves the accuracy of source and load power prediction by fully utilizing the rich information of different granularity data.
[0006] To achieve the above object, the present application is realized by the following technical scheme:
[0007] In a first aspect, the present application provides a source and load power prediction method considering different granularity, comprising:
[0008] Collecting source and load historical data in a to-be-predicted area;
[0009] Preprocessing the source and load historical data to obtain a plurality of groups of data groups of different granularity;
[0010] Inputting the preprocessed plurality of groups of data groups of different granularity into a pre-constructed and trained MultiGNet prediction model respectively to obtain a prediction result of source and load power on both sides;
[0011] The MultiGNet prediction model is obtained by extracting semantic dependency features of different granularity data groups and establishing a connection between different granularity data groups through a cross-granularity learning module, analyzing the feature relationship of different granularity data groups through a granularity attention module to obtain the optimal weight of different granularity data groups, and then using source and load historical data to train the minimum mean square error loss function as the target.
[0012] In combination with the first aspect, preferably, the source and load historical data includes wind power and photovoltaic power on the power generation side of the power grid, and power consumption on the load side of the power grid.
[0013] In combination with the first aspect, preferably, the training method of the MultiGNet prediction model comprises:
[0014] Collecting source and load historical data according to a preset time, and constructing an original data set;
[0015] Preprocess the original data set to obtain multiple groups of data groups with different granularities and form a sample set;
[0016] Divide the sample set into a training set and a test set according to the sampling time of the source load history data, wherein the sampling time of the data groups in the test set is later than the sampling time of the data groups in the training set;
[0017] Select multiple groups of data groups with different granularities from the training set and input them into the MultiGNet prediction model for training to obtain the prediction results of the training set source load bilateral power of multiple MultiGNet prediction models;
[0018] Take the source load history data in the test set as the true value, take the prediction results of the training set source load bilateral power at the same time as the predicted value, and calculate the root mean square error of the true value and the predicted value;
[0019] Optimize the parameters of the MultiGNet prediction model to minimize the root mean square error of the true value and the predicted value as the optimization target, and obtain the final trained MultiGNet prediction model.
[0020] In combination with the first aspect, preferably, the preprocessing comprises:
[0021] Extract the data of 0 o'clock, 15 minutes, 30 minutes and 45 minutes of each hour in 24 hours of each day from the source load history data at a time interval of 15 minutes, to form an original data group T';
[0022] Divide the extracted data of 0 o'clock of each hour in 24 hours of each day into a granularity 0 data group T 0 ;
[0023] Divide the extracted data of 15 o'clock of each hour in 24 hours of each day into a granularity 15 data group T 15 ;
[0024] Divide the extracted data of 30 o'clock of each hour in 24 hours of each day into a granularity 30 data group T 30 ;
[0025] Divide the extracted data of 45 o'clock of each hour in 24 hours of each day into a granularity 45 data group T 45 .
[0026] In combination with the first aspect, preferably, the cross-granularity learning module is composed of multiple block structures, which are block c , block0, block 15, block 30 and block 45 ; each block structure integrates a long short-term memory network (LSTM) and an attention mechanism (Attention);
[0027] The block c , block0, block 15 , block 30 and block 45 are respectively used to extract semantic dependency features of the original data group T', the granularity 0 data group T 0 , the granularity 15 data group T 15 , the granularity 30 data group T 30 and the granularity 45 data group T 45 and establish a connection between different granularity data groups.
[0028] In combination with the first aspect, preferably, the granularity attention module is used to perform correlation calculation on the outputs of block c , block0, block 15 , block 30 and block 45 respectively, obtain four feature matrices, and take the feature matrix with the largest similarity as the output of the granularity attention module.
[0029] In combination with the first aspect, preferably, the expression of the mean square error loss function is:
[0030]
[0031] In the formula, N is the number of test set samples, y n is the true value of the nth sample, is the predicted value of the nth sample obtained by training.
[0032] Secondly, the application provides a source-load power prediction device considering different granularities, which comprises:
[0033] A data acquisition module is configured to acquire source-load historical data in a region to be predicted;
[0034] A data preprocessing module is configured to preprocess the source-load historical data to obtain a plurality of data groups with different granularities;
[0035] A source-load power prediction module is configured to input the plurality of data groups with different granularities after preprocessing into a pre-constructed and trained MultiGNet prediction model to obtain a prediction result of source-load bilateral power.
[0036] The MultiGNet prediction model is obtained by extracting semantic dependency features of different granularity data groups and establishing a connection between the different granularity data groups through a cross-granularity learning module, analyzing feature relationships of the different granularity data groups through a granularity attention module to obtain optimal weights of the different granularity data groups, and training source load historical data with a mean square error loss function as an objective.
[0037] In a third aspect, the present application provides a source-load power prediction device considering different granularities, comprising a processor and a storage medium.
[0038] The storage medium is used for storing instructions.
[0039] The processor is used for operating according to the instructions to perform the steps of the source-load power prediction method considering different granularities according to any one of the first aspect.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the source-load power prediction method considering different granularities according to any one of the first aspect.
[0041] Compared with the prior art, the present application has the following beneficial effects:
[0042] The present application predicts the wind power and photovoltaic power on the power generation side of the same regional power grid and the power consumption on the power load side through the MultiGNet prediction model based on multiple granularities. These target variables share similar encoder structures, each of which can fully utilize rich information by extracting features of different granularities, and each prediction target can learn a nonlinear function to express information trends. Compared with a single-granularity prediction model, the present application strengthens the identification of potential consistency between different granularities and makes the learnable parameters better express sequence trends. Cross analysis between different granularities is performed in the cross-granularity learning module to obtain prior knowledge representation of each granularity. The mutual information between each granularity is increased through the granularity attention module to select the optimal weight between multiple granularities, thereby continuously learning and optimizing the nonlinear trend characteristics of wind power, photovoltaic power and load. The MultiGNet prediction model of the present application can fully utilize time information to improve the source-load power prediction performance and ensure the safe and reliable operation of the power system. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 is a flowchart of a source-load power prediction method considering different granularities provided by an embodiment of the present application;
[0044] Figure 2 is a schematic diagram of a MultiGNet prediction model framework provided by an embodiment of the present application;
[0045] Figure 3 Figure is a schematic diagram of a granularity attention module framework provided by an embodiment of the present application;
[0046] Figure 4 Figure is a comparison diagram of the predicted result and the actual value of wind power provided by an embodiment of the present application;
[0047] Figure 5 Figure is a comparison diagram of the predicted result and the actual value of photovoltaic power provided by an embodiment of the present application;
[0048] Figure 6 Figure is a comparison diagram of the predicted result and the actual value of load power provided by an embodiment of the present application;
[0049] Figure 7 Figure is a structural principle block diagram of a source-load power prediction device considering different granularities provided by an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solutions of the present application will be described in detail below with the aid of the accompanying drawings and specific embodiments. It should be understood that the specific features in the embodiments and the specific features in the embodiments are detailed descriptions of the technical solutions of the present application, and are not limitations of the technical solutions of the present application. In the case of no conflict, the technical features in the embodiments and the embodiments can be combined with each other.
[0051] The term "and / or" in this paper is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the associated objects before and after are a "or" relationship.
[0052] Embodiment one:
[0053] As shown in Figure 1 , the present embodiment introduces a source-load power prediction method considering different granularities, which specifically includes the following steps:
[0054] Step 1: Collecting source-load historical data in the area to be predicted;
[0055] With the large-scale integration of new energy into the power grid, the uncertainty of the power grid is enhanced, and a high-precision source-load power prediction method is urgently needed to assist in control decision-making in power grid dispatching operation; although the wind power and photovoltaic power on the source side and the power consumption on the load side of the power grid may be different in physics, they share some similar spatial information and exhibit similar spatial information; these coupling and complementary relationships mean that they can be adaptively adapted to a region. As an embodiment of the present application, the source-load historical data includes but is not limited to wind power and photovoltaic power on the power generation side of the power grid, and power consumption on the load side of the power grid.
[0056] Step 2: preprocessing the source-load historical data to obtain multiple groups of data groups of different granularities;
[0057] In the embodiment of the present application, considering that the existing new energy source-load power prediction method only uses one granularity data for power prediction task, and ignores the rich information of data of different granularities, thereby affecting the prediction accuracy and cannot meet the accuracy requirement; therefore, the present application divides the source-load historical data into multiple groups of data groups of different granularities according to different time interval settings, and the time span includes minutes, hours. Preferably, the present application divides the data groups by extracting 15-minute interval data and 1 hour as the time interval; the specific preprocessing steps include:
[0058] The source-load historical data is divided into 15-minute time intervals, and the data of 0 o'clock, 15-minute time, 30-minute time and 45-minute time of each hour in 24 hours of each day is extracted respectively to form an original data group T';
[0059] The extracted data of 0 o'clock of each hour in 24 hours of each day is divided into granularity 0 data group T 0 ;
[0060] The extracted data of 15 o'clock of each hour in 24 hours of each day is divided into granularity 15 data group T 15 ;
[0061] The extracted data of 30 o'clock of each hour in 24 hours of each day is divided into granularity 30 data group T 30 ;
[0062] The extracted data of 45 o'clock of each hour in 24 hours of each day is divided into granularity 45 data group T 45 .
[0063] Step 3: inputting the multiple groups of data groups of different granularities after preprocessing into the pre-constructed and trained MultiGNet prediction model to obtain the prediction result of the source-load power.
[0064] With the large-scale integration of new energy into the power grid, the uncertainty of the power grid is enhanced, and a high-precision source and load power prediction method is urgently needed to assist in control decision-making in power grid dispatching operation. However, the existing new energy source and load power prediction method cannot meet the accuracy requirement. In order to increase the data features learned by the model, the embodiment proposes a MultiGNet prediction model based on multi-granularity information. Specifically, the MultiGNet prediction model extracts semantic dependency features of different granularity data groups and establishes the relationship between different granularity data groups through a cross-granularity learning module, analyzes the feature relationship of different granularity data groups through a granularity attention module to obtain the optimal weight of different granularity data groups, and then uses source and load historical data to train to obtain the minimum mean square error loss function as the target.
[0065] Referring to Figure 2 FIG. 1 is a structural schematic diagram of a MultiGNet prediction model provided by an embodiment of the present application; wherein the cross-granularity learning module is composed of a plurality of block structures, which are block c , block0, block 15 , block 30 and block 45 ; each block structure fuses a long short-term memory network LSTM and an attention mechanism Attention; the block c , block0, block 15 , block 30 and block 45 are respectively used to extract semantic dependency features of an original data group T', a granularity 0 data group T 0 , a granularity 15 data group T 15 , a granularity 30 data group T 30 and a granularity 45 data group T 45 , and establish the relationship between different granularity data groups; the granularity attention module is used to calculate the correlation between the outputs of block c and the outputs of block0, block 15 , block 30 , block 45 respectively, obtain four feature matrices, and take the feature matrix with the largest similarity as the output of the granularity attention module.
[0066] The parameters of the MultiGNet prediction model provided by the embodiment of the application include: the number of hidden layer nodes of the LSTM in the cross-granularity learning module is 128, the number of hidden layer layers is 2, the number of attentions is 8, and the number of attention nodes is 128; the number of attentions of the granularity attention module is 8, and the number of attention nodes is 128. The selected optimizer for training is the Adam optimizer, the batch size for training is set to 128, the learning rate is 0.0001, and the loss function is the mean square error loss function:
[0067]
[0068] In the formula, N is the number of test set samples, y n is the true value of the nth sample, is the predicted value of the nth sample obtained by training.
[0069] As an embodiment of the application, the training method of the MultiGNet prediction model includes:
[0070] Step A: collecting source-load historical data according to a preset time and constructing an original data set;
[0071] The time length of the source-load historical data with a determined data structure in the application is two years; the embodiment uses real data of the power grid operation in northern China from January 2019 to December 2020, including historical data of wind power and photovoltaic power on the power generation side of the power grid and historical data of power consumption on the power load side.
[0072] Step B: preprocessing the original data set to obtain multiple groups of data groups with different granularities and forming a sample set;
[0073] The preprocessing method of the original data set is the same as the method described in step 2 in the foregoing, that is, extracting data at an interval of 15 minutes and dividing the data groups at an interval of 1 hour to obtain the original data group T', the granularity 0 data group T 0 , the granularity 15 data group T 15 , the granularity 30 data group T 30 , and the granularity 45 data group T 45 .
[0074] Step C: dividing the sample set into a training set and a test set according to the sampling time of the source-load historical data, and the sampling time of the data groups in the test set is later than that of the data groups in the training set;
[0075] Taking the total length of the sampling time of two years as an example, the embodiment takes the source-load historical data from January 2019 to September 2020 as the training set, and the source-load historical data from October 2020 to December 2020 as the test set. The purpose of such division is that when predicting the source-load power of the last three months using multiple groups of data groups with different granularities in the training set, the source-load historical data in the test set can be used as the true value to verify the prediction results.
[0076] Step D: Selecting multiple groups of data groups with different granularities from the training set and inputting them into the MultiGNet prediction model for training to obtain the prediction results of the training set source-load bilateral power of multiple MultiGNet prediction models;
[0077] In this embodiment, the training set of multiple groups of data groups with different granularities is input into the constructed MultiGNet prediction model, the historical data information is encoded into the feature matrix, the feature matrix is input into the similar encoding structure, the distribution of different granularities is learned, the corresponding nonlinear function expression of the future trend is learned for different prediction targets; at the same time, the relationship between different granularities is established to obtain the weight of different granularities so as to better express the sequence trend and capture the semantic dependency relationship between different granularities.
[0078] Specifically, in the encoding structure, the cross-granularity learning module is composed of multiple block structures, which are block c , block0, block 15 , block 30 , block 45 ; each block structure integrates long short-term memory network LSTM and attention mechanism Attention; data feature extraction of original data group T', granularity 0 data group T 0 , granularity 15 data group T 15 , granularity 30 data group T 30 and granularity 45 data group T 45 ; the feature extraction formula in each block structure is as follows:
[0079]
[0080]
[0081] In the formula, L c represents the output feature matrix of the original data group T' after the LSTM function; T 0 , granularity 15 data group T 15 , granularity 30 data group T 30and granularity 45 data group T 45 ; respectively represent the calculation operations of data feature extraction of LSTM network on original data group T', granularity 0 data group T 0 , granularity 15 data group T 15 , granularity 30 data group T 30 and granularity 45 data group T 45 ; respectively represent the corresponding output feature matrices of data of granularity 0 data group T 0 , granularity 15 data group T 15 , granularity 30 data group T 30 and granularity 45 data group T 45 after passing through the LSTM function.
[0082] After the data of the above plurality of granularity data groups pass through the long short-term memory network LSTM, further feature extraction is needed through the attention mechanism; the attention mechanism can obtain a global similarity weight matrix between different sequences, and determine the features with strong correlation according to the similarity; the formula of the attention mechanism is as follows:
[0083] K = Linear (W k ·X k +b k )
[0084] Q = Linear (W q ·X q +b q )
[0085] V = Linear (W v ·X v +b v )
[0086]
[0087] Wherein, K, Q, V are three feature matrices from the long short-term memory network LSTM output respectively; W q , W k , W v are the weights of the corresponding nonlinear functions of X q , X k , X v , b k , b q , b v are the threshold values of the corresponding nonlinear functions of K, Q, V respectively; Linear represents a nonlinear function of the full connection layer, that is; d kIt is the dimension corresponding to the LSTM output matrix K; it should be further clarified that in the cross-granularity learning module of this embodiment, the block c Its attention mechanism differs from other blocks, where the block... c It employs a self-attention mechanism structure, that is, the input X q X k X v Everyone should come to the block c The output of X; while other block structures use a dot product attention mechanism structure, i.e., X q X v The output from each block, X k Output from the self-attention mechanism under the blockc structure.
[0088] Furthermore, in the granular attention module, a granular self-attention mechanism structure is proposed, aiming to enhance the similarity matrix between the original data and various coarse-grained groups; in this granular attention module, the focus is mainly on blocks. c The output of [the block name] is correlated with the outputs of the other four blocks to obtain four feature matrices. The feature matrix with the highest similarity is then selected as the output feature matrix. Specifically, [the process is described in the original text]. Figure 3 The diagram shown is a structural schematic of the granular attention module in an embodiment of the present invention; in the diagram: O c It is a block c The output matrix, O 0 f O 15 f O 30 f O 45 f They are block0 and block 15 , block 30 , block 45 The output of ; calculate O respectively. c With O 0 f O 15 f O 30 f O 45 f The similarity is calculated using the Matmul dot product function, followed by a dimensionality reduction scaling operation, and finally a softmax function to obtain four similarity matrices. The matrix with the largest similarity among the four is then compared with the block. c The output matrix O c Perform matrix multiplication to obtain the final output matrix.
[0089] Step E: The source load history data in the test set is taken as the true value, and the prediction result of the training set source load bilateral power at the same time is taken as the predicted value, and the root mean square error of the true value and the predicted value is calculated;
[0090] The test set data in step C is used to verify the prediction result of the test set source load bilateral power of the MultiGNet prediction model, and if the obtained prediction data is better than the previous training, the current model parameters are retained, otherwise the model is discarded. After multiple training, the model with the best performance in the test set data is selected as the final training result.
[0091] Step F: The MultiGNet prediction model is parameter optimized with the minimum value of the root mean square error of the true value and the predicted value as the optimization target, and the final trained MultiGNet prediction model is obtained.
[0092] As an embodiment of the application, the training result obtained by the final MultiGNet prediction model is compared with the true data; the performance of the MultiGNet prediction model in predicting the source load power is measured by the following evaluation function:
[0093]
[0094]
[0095]
[0096]
[0097] In the formula, N is the number of test set samples, y n is the true value of the nth sample, is the predicted value obtained by training the nth sample; is the average value of the prediction; n=1, 2...N; RMSE represents the root mean square error of the true value and the predicted value, which is used to measure the deviation between the predicted value and the true value; MAE represents the average absolute error of the true value and the predicted value, which can better reflect the actual situation of the prediction error; R 2 indicates the regression coefficient of the true value and the predicted value, which is used to measure the goodness of regression; d indicates the determination coefficient of the true value and the predicted value, which evaluates the goodness of fit of the regression model coefficient.
[0098] Based on the evaluation function, the test data set evaluation values of different models in the prior art are shown in Table 1, and the performance of the MultiGNet prediction model provided by the embodiment of the application is judged by comparing the evaluation indexes:
[0099] Table 1
[0100]
[0101]
[0102] From the data in Table 1, it can be seen that the MultiGNet prediction model provided by the application has smaller values of RMSE and MAE and the largest value of R 2 It can be seen that the prediction results of the MultiGNet prediction model provided by the application are obviously better than those of other models in the prediction of wind power, photovoltaic power and load power, and the accuracy of source-load power prediction is improved. In addition, referring to Figure 4 、 Figure 5 and Figure 6 , it is shown that the prediction results of wind power, photovoltaic power and load power provided by the embodiment of the application are compared with the actual values, and it can be seen from the figure that the accuracy of prediction is improved, and the source-load power prediction method considering different granularities provided by the application has great application prospect.
[0103] Embodiment two:
[0104] As shown in Figure 7 , the embodiment of the application provides a source-load power prediction device considering different granularities, which can be used to implement the method described in embodiment one, and specifically includes:
[0105] A data collection module is configured to collect source-load historical data in a to-be-predicted area;
[0106] A data preprocessing module is configured to preprocess the source-load historical data to obtain a plurality of groups of data groups of different granularities;
[0107] A source-load power prediction module is configured to input the plurality of groups of data groups of different granularities after preprocessing into a pre-constructed and trained MultiGNet prediction model to obtain a prediction result of source-load bilateral power.
[0108] The MultiGNet prediction model is obtained by a cross-granularity learning module extracting semantic dependency features of different granularities of data groups and establishing a connection between different granularities of data groups, and a granularity attention module analyzing feature relationships of different granularities of data groups to obtain optimal weights of different granularities of data groups, and then using source-load historical data to train a mean square error loss function to obtain the minimum target.
[0109] The source-load power prediction device considering different granularities provided by the embodiment of the present application and the source-load power prediction method considering different granularities provided by the first embodiment are based on the same technical concept, and can produce the beneficial effects as described in the first embodiment. The content not described in detail in the present embodiment can be referred to the first embodiment.
[0110] Embodiment three:
[0111] The embodiment of the present application provides a source-load power prediction device considering different granularities, comprising a processor and a storage medium.
[0112] The storage medium is used for storing instructions.
[0113] The processor is used for operating according to the instructions to perform the steps of the method according to any one of the first embodiment.
[0114] Embodiment four:
[0115] The embodiment of the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method according to any one of the first embodiment are realized.
[0116] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0117] The present application is described with reference to flowcharts and / or block diagrams according to the method, equipment (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to produce a machine, so that the instructions executed by the computer or other programmable data processing equipment produce a method for realizing the functions specified in the flowcharts and / or block diagrams. Figure 1 The function of the device specified in one flow or multiple flows and / or blocks. Figure 1 The function of the device specified in one flow or multiple flows and / or blocks.
[0118] These computer program instructions can also be stored in a computer readable storage medium, which can guide the computer or other programmable data processing equipment to work in a specific way, so that the instructions stored in the computer readable storage medium produce a product including instruction devices, which realize the functions specified in the flowcharts and / or block diagrams.Figure 1 one or more processes and / or functions described in one or more blocks. Figure 1 one or more blocks or multiple blocks.
[0119] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable data processing devices provide steps for implementing the function described in one or more processes and / or functions described in one or more blocks. Figure 1 one or more processes and / or functions described in one or more blocks. Figure 1 one or more blocks or multiple blocks.
[0120] The above description is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the technical principles of the present application, a number of improvements and modifications can be made, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims
1. A method of source-load power prediction considering different granularities, characterized in that, The method comprises: collecting source-load historical data in a region to be predicted; preprocessing the source-load historical data to obtain a plurality of data groups of different granularities; inputting the plurality of preprocessed data groups of different granularities into a pre-constructed and trained MultiGNet prediction model respectively to obtain a prediction result of source-load bilateral power; wherein the MultiGNet prediction model is obtained by a cross-granularity learning module extracting semantic dependency features of the data groups of different granularities and establishing a connection between the data groups of different granularities, and by a granularity attention module analyzing feature relationships of the data groups of different granularities to obtain optimal weights of the data groups of different granularities, and then using the source-load historical data to train the model with a minimum mean square error loss function as the target.
2. The method for source-load power prediction considering different granularities according to claim 1, characterized in that, The source-load historical data includes wind power and photovoltaic power on the power generation side of a power grid, and power consumption on the power load side of the power grid.
3. The method for source-load power prediction considering different granularities according to claim 1, characterized in that, The training method of the MultiGNet prediction model comprises: collecting source-load historical data according to a preset time and constructing an original data set; preprocessing the original data set to obtain a plurality of data groups of different granularities and form a sample set; dividing the sample set into a training set and a test set according to sampling times of the source-load historical data, wherein the sampling times of the data groups in the test set are later than the sampling times of the data groups in the training set; selecting a plurality of data groups of different granularities from the training set and inputting them into the MultiGNet prediction model for training to obtain prediction results of source-load bilateral power of the training set of a plurality of MultiGNet prediction models; taking the source-load historical data in the test set as a true value, taking the prediction results of source-load bilateral power of the training set at the same time as a prediction value, and calculating a root mean square error of the true value and the prediction value; optimizing parameters of the MultiGNet prediction model with a minimum root mean square error of the true value and the prediction value as an optimization target to obtain a final trained MultiGNet prediction model.
4. The method for source-load power prediction considering different granularities according to claim 1 or 3, characterized in that, The preprocessing comprises: The source load historical data is extracted at a time interval of 15 minutes, and data at 0 o'clock, 15 minutes, 30 minutes and 45 minutes of each hour in 24 hours is extracted to form an original data group T ’ ; The data of the 0 o'clock time of each hour of the 24 hours of the day extracted is divided into a granularity 0 data group T with 1 hour as the granularity 0 ; The data extracted for each of the 15 points in time of each hour of the 24 hours of the day is divided into groups of data T of granularity 1 hour 15 ; The data of 30 points of time of each hour of 24 hours per day extracted are divided into a data group T of granularity 30 with a granularity of 1 hour 30 ; The data of the 45 points of time of each hour of the 24 hours of the day extracted are divided into groups of data of granularity 45 with a granularity of 1 hour 45 .
5. The method for source-load power prediction considering different granularities according to claim 4, characterized in that, The cross-granularity learning module is composed of multiple block structures, namely block c , block0, block 15 , block 30 , and block 45 ; each block structure integrates a long short-term memory network (LSTM) and an attention mechanism (Attention); The block c , block0, block 15 , block 30 , and block 45 are respectively used to extract semantic dependency features of the original data group T ’ , the granularity 0 data group T 0 , the granularity 15 data group T 15 , the granularity 30 data group T 30 , and the granularity 45 data group T 45 , and establish the connection between different granularity data groups.
6. The method for source-load power prediction considering different granularities according to claim 5, characterized in that, The granularity attention module is used for calculating the correlation of the outputs of block c , block 15 , block 30 , block 45 respectively, obtaining four feature matrices, and taking the feature matrix with the largest similarity as the output of the granularity attention module.
7. The method for source-load power prediction considering different granularities according to claim 1, wherein, An expression of the mean square error loss function is: In the formula, N is the number of samples in the test set, y n is the true value of the nth sample, is the predicted value of the nth sample obtained by training.
8. A source-load power prediction device considering different granularities, characterized by, The device comprises: a data collection module for collecting source-load historical data in a region to be predicted; a data preprocessing module for preprocessing the source-load historical data to obtain a plurality of data groups of different granularities; a source-load power prediction module for inputting the plurality of preprocessed data groups of different granularities into a pre-constructed and trained MultiGNet prediction model respectively to obtain a prediction result of source-load bilateral power; wherein the MultiGNet prediction model is obtained by a cross-granularity learning module extracting semantic dependency features of the data groups of different granularities and establishing a connection between the data groups of different granularities, and by a granularity attention module analyzing feature relationships of the data groups of different granularities to obtain optimal weights of the data groups of different granularities, and then using the source-load historical data to train the model with a minimum mean square error loss function as the target.
9. A source-load power prediction device considering different granularities, characterized by, comprise a processor and a storage medium; the storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method of source-load power prediction considering different granularities according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, which is executed by a processor, implements the steps of the method of source-load power prediction considering different granularities according to any one of claims 1 to 7.
Citation Information
Patent Citations
Building energy consumption prediction method
CN114326391A
Source load combination probability prediction method and device and storage medium
CN115375014A