A cloud-edge collaborative power grid load forecasting method and system
By dividing microgrids into regions and utilizing edge computing and cloud collaboration, combined with long short-term memory networks and BP neural network models, the problems of regional differences and data uniformity in power grid load forecasting are solved, achieving higher forecast accuracy.
Patent Information
- Application Number
- CN202311291161.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-10-07
AI Technical Summary
In the existing technology, the power grid load forecasting scheme that uses users as the data collection object may be affected by different regions, resulting in inaccurate predictions, and the data type is single and lacks comparison, which affects the accuracy.
The microgrid is divided into multiple areas, and the edge computing server performs load forecasting on each area. The cloud server compares the overall forecast results and verifies the BP neural network model to determine the final forecast result.
It improves the accuracy of power grid load forecasting, avoids forecasting errors caused by regional differences and data uniformity, and enhances the reliability of forecasting results.
Smart Images

Figure CN117394312B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid technology, and in particular to a cloud-edge collaborative power grid load forecasting method and system. Background Art
[0002] Cloud computing is a model for enabling anytime, anywhere, on-demand network access to a shared pool of configurable computing resources. These resources can be quickly provisioned and released with minimal management effort or service provider interaction. Edge computing refers to enabling technologies that allow computing to be performed at the edge of the network, allowing computation to occur close to the data source. Compared to cloud computing, edge computing can provide users with more abundant resources and lower latency access in terms of latency and computing resources.
[0003] In the field of power grid load forecasting, there are technical solutions in the prior art for power grid load forecasting through cloud-edge collaboration. For example, the publication number (CN114862052A) discloses a power grid load forecasting method and system based on cloud-edge collaboration. This method can be used to classify users on the power grid side, determine the input data of the corresponding algorithm model according to the user classification, and use different algorithms to separately predict the next day's electricity load for the two types of users. This can achieve the prediction of the next day's electricity load for a single user. Determining the input data of the corresponding algorithm model according to the user classification can improve the accuracy of the prediction for a single user, thereby improving the accuracy of the next day's electricity load prediction on the power grid side, ensuring the supply and demand balance of electricity consumption on the power grid side, and ensuring the security of the power grid.
[0004] The above solution uses user classification to achieve load forecasting. However, using users as the forecasting target can lead to inaccurate forecasts due to differences in user locations and schedules on the forecast day. Furthermore, the above solution directly generates forecast results by collecting user data, resulting in relatively simple data and a lack of comparison between multiple sets of forecast data. When a small number of users' behavior deviates from the set expectations, this can significantly impact the accuracy of the forecast. Summary of the Invention
[0005] The purpose of the present invention is to provide a cloud-edge collaborative power grid load forecasting method and system to solve the problems in the existing technology that data collection based on users may be affected by different regions, and the single data type lacks comparison, resulting in unsatisfactory accuracy.
[0006] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0007] A cloud-edge collaborative power grid load forecasting method includes the following steps:
[0008] S1. Setting up a cloud server and multiple edge computing servers in a microgrid, and dividing the microgrid into multiple areas, with each edge computing server corresponding to each area of the microgrid;
[0009] S2. The edge computing server is used to perform a power load forecast for each corresponding microgrid area for the next day, and add up the results to obtain a first power load forecast result for each area of the microgrid on the next day;
[0010] S3. The cloud server predicts the power load of the microgrid to obtain a second power load prediction result;
[0011] S4. Determine whether the error between the first power load forecast result and the second power load forecast result is less than a preset threshold. If so, take the average of the sum of the first power load forecast result and the second power load forecast result as the final forecast result. If the error is greater than or equal to the preset threshold, proceed to step S5.
[0012] S5. Using a BP neural network model to predict the power load of the microgrid to obtain a third power load prediction result;
[0013] S6. Calculate errors between the first power load prediction result, the second power load prediction result, and the third power load prediction result, and take the average of the two prediction results with the smallest errors as the final prediction result.
[0014] As a preferred solution of the present invention, in S2, the edge computing server performs the following specific steps to predict the power load of each corresponding microgrid area for the next day:
[0015] S201: Establishing a long short-term memory network model;
[0016] S202: Inputting the electricity load data of the region n days before the day to be predicted into the long short-term memory network model, and the long short-term memory network model outputs the electricity load prediction result of the region on the day to be predicted;
[0017] S203: Execute steps S201-S202 for each area of the microgrid in sequence to obtain a power load forecast result for each area on the day to be forecasted.
[0018] As a preferred solution of the present invention, in S201, the long short-term memory network model is trained by a training set, and the training set includes historical electricity load data of the area corresponding to the microgrid. The historical electricity load data of the area corresponding to the microgrid for the previous n days is used as the input of the long short-term memory network model, and the historical electricity load data of the area corresponding to the microgrid on the n+1th day is used as the output of the model.
[0019] As a preferred solution of the present invention, in S203, training sets of corresponding areas are collected according to the classification of each area of the microgrid, and long short-term memory network models corresponding to each area of the microgrid are trained using each training set.
[0020] As a preferred solution of the present invention, in S4, the error between the first power load forecast result and the second power load forecast result is set to n 1 . The specific calculation formula of n 1 is:
[0021]
[0022] Among them, P1 represents the first power load forecast result,
[0023] P2 represents the second power load forecast result.
[0024] As a preferred solution of the present invention, in S5, the specific steps of using the BP neural network model to predict the power load of the microgrid are as follows:
[0025] S501: Establishing the BP neural network model;
[0026] S502: Training the BP neural network model;
[0027] S503: Pre-process the historical power load data and weather conditions n days before the day to be predicted and input them into the BP neural network model, and obtain the third power load prediction result of the microgrid on the day to be predicted by the BP neural network model.
[0028] As a preferred solution of the present invention, in S501, the BP neural network model is composed of an input layer, a hidden layer, and an output layer. The input data of the BP neural network model include: the historical power load and weather conditions of the microgrid,
[0029] The weather conditions include: daily maximum temperature, daily minimum temperature;
[0030] The historical power load and weather conditions of the microgrid are pre-processed and then input into the BP neural network model, so that the BP neural network model can identify the historical power load and weather conditions of the microgrid.
[0031] As a preferred solution of the present invention, in S502, the BP neural network model is trained by a training set, which includes the historical power load data and weather conditions of the microgrid. The historical power load data and weather conditions of the area corresponding to the microgrid for the previous n days are used as input to the BP neural network model, and the historical power load data of the area corresponding to the microgrid for the n+1 days are used as output of the model.
[0032] As a preferred solution of the present invention, in S6, calculating the errors between the first power load forecast result, the second power load forecast result, and the third power load forecast result comprises:
[0033] The first power load forecast result and the second power load forecast result are n1, and the specific calculation method of n1 is as described above;
[0034] The first power load forecast result and the third power load forecast result are n2, and the specific calculation formula of n2 is:
[0035]
[0036] Wherein, P3 represents the third power load forecast result;
[0037] The second power load forecast result and the third power load forecast result are n3, and the specific calculation formula of n3 is:
[0038]
[0039] A cloud-edge collaborative power grid load forecasting system adopts the above-mentioned cloud-edge collaborative power grid load forecasting method.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] (1) The present invention first divides the microgrid into different areas, and then sets up edge computing servers for different areas to predict the power load of each area. This can effectively avoid the problem of inaccurate prediction when predicting the overall load of the microgrid due to factors such as weather or forecast day type in different areas.
[0042] (2) The present invention compares the overall prediction result of the cloud server on the microgrid with the sum of the regional prediction results of the cloud server, and uses different means to determine the prediction result according to the comparison result, thereby further improving the accuracy of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other implementation drawings based on the provided drawings without inventive effort.
[0044] Figure 1 Schematic diagram of a flow chart of a power grid load forecasting method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0046] The following first describes the concepts involved in this application with reference to the accompanying drawings. It should be noted that the following description of each concept is intended only to make the content of this application easier to understand and does not limit the scope of protection of this application. At the same time, the embodiments and features in the embodiments of this application can be combined with each other unless there is a conflict. The following detailed description of this application will be made with reference to the accompanying drawings and in conjunction with the embodiments.
[0047] Example 1
[0048] like Figure 1 As shown, the present invention provides a cloud-edge collaborative power grid load forecasting method, comprising the following steps:
[0049] Step S1: Set up a cloud server and multiple edge computing servers in the microgrid, and divide the microgrid into multiple areas, each of the edge computing servers corresponding to each area of the microgrid.
[0050] Specifically, the microgrid is divided into multiple areas according to type, such as residential power consumption area, industrial power consumption area, commercial power consumption area, etc.
[0051] Step S2: The edge computing server is used to perform a power load forecast for each corresponding microgrid area for the next day, and add up the results to obtain the first power load forecast result for each area of the microgrid on the day to be predicted.
[0052] Specifically, the power load of the corresponding area of the microgrid is predicted based on the network using a bidirectional long-term and short-term model;
[0053] Furthermore, the LSTM network model introduces a gating mechanism to overcome the shortcomings of general neural network models in gradient updating. The gating mechanism is divided into four parts: a forget gate, an input gate, an output gate, and a state unit.
[0054] Furthermore, the formula of the forget gate ft is:
[0055] ft = σ(wfxt+ufht—1+bf)
[0056] Wherein, σ is the activation function, Wf, Uf, bf are the forget gate parameters, xt is the input at time t, and ht-1 is the output of the hidden layer at time t-1;
[0057] The forget gate determines the degree of retention of the information input at the previous moment. The forget gate linearly transforms the input xt at time t and the hidden layer output ht-1 at time t-1, and then applies the activation function σ.
[0058] Furthermore, the formula of the input gate it is:
[0059] it = σ(wixt+ uiht—1+ bi)
[0060] Where it is the input gate function, Wi, Ui, bi are input parameters, σ is the activation function, xt is the input at time t, and ht-1 is the hidden layer output at time t-1;
[0061] The function of the input gate is to determine the degree of retention of input information at time t;
[0062] Furthermore, the main function of the state unit is to update the internal state of the long-term and short-term models and the model, and update the internal state ct-1 at the previous moment to the internal state ct at the current moment;
[0063] Furthermore, the formula of the output gate ot is:
[0064] ot= σ(oxt+uoht—1+bo)
[0065] Where ot is the output gate function, σ is the activation function, Wo, Uo, and bo are the output gate parameters, xt is the input at time t, and ht-1 is the hidden layer output at time t-1.
[0066] Among them, ht is the hidden state output at time t, which is determined by the internal state at time t and the input gate.
[0067] In step S2, the edge computing server performs the following steps to predict the power load of each corresponding microgrid area for the next day:
[0068] Step S201: Establishing a long short-term memory network model.
[0069] In step S201, the long short-term memory network model is trained using a training set, where the training set includes historical electricity load data of the area corresponding to the microgrid. The historical electricity load data of the area corresponding to the microgrid for the previous n days is used as input to the long short-term memory network model, and the historical electricity load data of the area corresponding to the microgrid on the n+1th day is used as output of the model.
[0070] Step S202: inputting the electricity load data of the region n days before the day to be predicted into the long short-term memory network model, and the long short-term memory network model outputs the electricity load prediction result of the region on the day to be predicted.
[0071] Step S203: executing steps S201-S202 for each area of the microgrid in sequence to obtain a power load forecast result for each area on the day to be forecasted.
[0072] In the step S203, training sets of corresponding areas are collected according to the classification of each area of the microgrid, and the long short-term memory network models corresponding to each area of the microgrid are trained using the training sets.
[0073] Step S3: The cloud server predicts the power load of the microgrid to obtain a second power load prediction result.
[0074] Step S4: Determine whether the error between the first power load forecast result and the second power load forecast result is less than a preset threshold. If so, take the average of the sum of the first power load forecast result and the second power load forecast result as the final forecast result. If the error is greater than or equal to the preset threshold, proceed to step S5.
[0075] In step S4, the error between the first power load forecast result and the second power load forecast result is set to n1. The specific calculation formula of n1 is:
[0076]
[0077] Among them, P1 represents the first power load forecast result,
[0078] P2 represents the second power load forecast result.
[0079] Step S5: Use the BP neural network model to predict the power load of the microgrid to obtain a third power load prediction result.
[0080] In step S5, the specific steps of using the BP neural network model to predict the power load of the microgrid are as follows:
[0081] Step S501: Establish the BP neural network model.
[0082] In step S501, the BP neural network model is composed of an input layer, a hidden layer, and an output layer. The input data of the BP neural network model include: the historical power load and weather conditions of the microgrid,
[0083] The weather conditions include: daily maximum temperature, daily minimum temperature;
[0084] The historical power load and weather conditions of the microgrid are pre-processed and then input into the BP neural network model, so that the BP neural network model can identify the historical power load and weather conditions of the microgrid.
[0085] Step S502: training the BP neural network model.
[0086] In step S502, the BP neural network model is trained using a training set, which includes the historical power load data and weather conditions of the microgrid. The historical power load data and weather conditions of the microgrid corresponding area for the previous n days are used as input to the BP neural network model, and the historical power load data of the microgrid corresponding area for the n+1 days are used as output of the model.
[0087] Step S503: pre-process the historical power load data and weather conditions n days before the day to be predicted and input them into the BP neural network model, and obtain the third power load prediction result of the microgrid on the day to be predicted by the BP neural network model.
[0088] Step S6: Calculate the errors between the first power load forecast result, the second power load forecast result, and the third power load forecast result, and take the average of the two forecast results with the smallest errors as the final forecast result.
[0089] In step S6, calculating the errors between the first power load forecast result, the second power load forecast result, and the third power load forecast result comprises:
[0090] The first power load forecast result and the second power load forecast result are n1, and the specific calculation method of n1 is as described above;
[0091] The first power load forecast result and the third power load forecast result are n2, and the specific calculation formula of n2 is:
[0092]
[0093] Wherein, P3 represents the third power load forecast result;
[0094] The second power load forecast result and the third power load forecast result are n3, and the specific calculation formula of n3 is:
[0095]
[0096] The present invention first divides the microgrid into different areas, and then sets up edge computing servers for different areas to predict the power load of each area. This can effectively avoid the problem of inaccurate prediction when predicting the overall load of the microgrid due to factors such as weather or forecast day type in different areas.
[0097] The present invention compares the overall prediction result of the cloud server on the microgrid with the sum of the regional prediction results of the cloud server, and adopts different means to determine the prediction result according to the comparison result, thereby further improving the accuracy of the prediction.
[0098] Example 2
[0099] A cloud-edge collaborative power grid load forecasting system adopts the above-mentioned cloud-edge collaborative power grid load forecasting method.
[0100] Example 3
[0101] This embodiment includes a computer-readable storage medium, on which a data processing program is stored. The data processing program is executed by a processor to implement a cloud-edge collaborative power grid load forecasting method according to embodiment one.
[0102] Those skilled in the art will appreciate that the embodiments herein may be provided as methods, apparatuses (devices), or computer program products. Therefore, the present invention may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. These include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and that can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery medium.
[0103] This document is described with reference to flowcharts and / or block diagrams of methods, apparatuses (devices), and computer program products according to the embodiments of this document. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0104] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0105] It should be noted that the terms used in this application are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.
[0106] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0107] The embodiments and / or implementation methods described above are only used to illustrate the preferred embodiments and / or implementation methods for realizing the technology of the present invention, and do not impose any form of limitation on the implementation methods of the technology of the present invention. Any person skilled in the art may make slight changes or modifications to other equivalent embodiments without departing from the scope of the technical means disclosed in the content of the present invention, but they should still be regarded as technologies or embodiments that are essentially the same as the present invention.
[0108] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression, there are objectively infinite specific structures. For ordinary technicians in this technical field, without departing from the principles of this application, they can also make several improvements, modifications or changes, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.
Claims
1. A cloud-edge collaborative power grid load forecasting method, characterized in that: The steps include: S1. Setting up a cloud server and multiple edge computing servers in a microgrid, and dividing the microgrid into multiple areas, with each edge computing server corresponding to each area of the microgrid; S2, the edge computing server is used to perform a power load forecast for each corresponding microgrid area on the next day, and add the results to obtain a first power load forecast result for each area of the microgrid on the forecast day; in S2, the specific steps of the edge computing server performing a power load forecast for each corresponding microgrid area on the next day are as follows: S201: Establishing a long short-term memory network model; S202: Inputting the electricity load data of the region n days before the day to be predicted into the long short-term memory network model, and the long short-term memory network model outputs the electricity load prediction result of the region on the day to be predicted; S203: executing steps S201-S202 for each area of the microgrid in sequence to obtain a power load forecast result for each area on the day to be forecasted; S3. The cloud server predicts the power load of the microgrid to obtain a second power load prediction result; S4. Determine whether the error between the first power load forecast result and the second power load forecast result is less than a preset threshold. If so, take the average of the sum of the first power load forecast result and the second power load forecast result as the final forecast result. If the error is greater than or equal to the preset threshold, proceed to step S5; S5. Predicting the power load of the microgrid using a BP neural network model to obtain a third power load prediction result; S6. Calculate errors between the first power load prediction result, the second power load prediction result, and the third power load prediction result, and take the average of the two prediction results with the smallest errors as the final prediction result.
2. The cloud-edge collaborative power grid load forecasting method according to claim 1, characterized in that: In S201, the long short-term memory network model is trained using a training set, which includes historical electricity load data of the area corresponding to the microgrid. The historical electricity load data of the area corresponding to the microgrid for the previous n days is used as the input of the long short-term memory network model, and the historical electricity load data of the area corresponding to the microgrid on the n+1th day is used as the output of the model.
3. The cloud-edge collaborative power grid load forecasting method according to claim 1, characterized in that: In S203 , training sets of corresponding areas are collected according to the classification of the areas of the microgrid, and long short-term memory network models corresponding to the areas of the microgrid are trained using the training sets.
4. The cloud-edge collaborative power grid load forecasting method according to claim 1, characterized in that: In S4, the error between the first power load forecast result and the second power load forecast result is set to n 1 . The specific calculation formula of n 1 is: ; Among them, P1 represents the first power load forecast result, P2 represents the second power load forecast result.
5. The cloud-edge collaborative power grid load forecasting method according to claim 1, characterized in that: In S5, the specific steps of using the BP neural network model to predict the power load of the microgrid are as follows: S501: Establishing the BP neural network model; S502: Training the BP neural network model; S503: Pre-process the historical power load data and weather conditions n days before the day to be predicted and input them into the BP neural network model, and obtain the third power load prediction result of the microgrid on the day to be predicted by the BP neural network model.
6. The cloud-edge collaborative power grid load forecasting method according to claim 5, characterized in that: In S501, the BP neural network model is composed of an input layer, a hidden layer, and an output layer. The input data of the BP neural network model include: the historical power load and weather conditions of the microgrid, The weather conditions include: daily maximum temperature, daily minimum temperature; The historical power load and weather conditions of the microgrid are pre-processed and then input into the BP neural network model, so that the BP neural network model can identify the historical power load and weather conditions of the microgrid.
7. The cloud-edge collaborative power grid load forecasting method according to claim 5, characterized in that: In S502, the BP neural network model is trained by a training set, which includes the historical power load data and weather conditions of the microgrid. The historical power load data and weather conditions of the area corresponding to the microgrid for the previous n days are used as input to the BP neural network model, and the historical power load data of the area corresponding to the microgrid for the n+1 days are used as output of the model.
8. The cloud-edge collaborative power grid load forecasting method according to claim 1, characterized in that: In S6, calculating the errors between the first power load forecast result, the second power load forecast result, and the third power load forecast result comprises: The first power load forecast result and the second power load forecast result are n1, and the specific calculation method of n1 is as described above; The first power load forecast result and the third power load forecast result are n2, and the specific calculation formula of n2 is: ; Wherein, P3 represents the third power load forecast result; The second power load forecast result and the third power load forecast result are n3, and the specific calculation formula of n3 is: 。 9. A cloud-edge collaborative power grid load forecasting system, characterized by: The system adopts the cloud-edge collaborative power grid load forecasting method described in any one of claims 1-8.
Citation Information
Patent Citations
Power grid side load prediction method and system based on cloud edge collaboration
CN114862052A
Active power-distribution network energy storage configuration strategy based on regional prediction error index
CN108832645A
Method for establishing power grid load prediction model and computer readable storage medium
CN115879570A