Agricultural greenhouse electricity short-term load prediction method based on whale optimization algorithm

By combining the whale optimization algorithm with VMD, CNN and LSTM technologies, the problem of model parameter optimization in agricultural greenhouse power load forecasting has been solved, achieving high-precision and high-reliability load forecasting, supporting the rational allocation of power resources and energy conservation and emission reduction.

CN121663457APending Publication Date: 2026-03-13STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing methods for predicting electricity load in agricultural greenhouses struggle to achieve ideal prediction accuracy when dealing with complex data characterized by high nonlinearity, high volatility, peak-to-valley differences, and transferability. Furthermore, they are difficult to optimize model parameters and exhibit poor robustness.

Method used

The variational mode decomposition (VMD) algorithm based on the whale optimization algorithm is used to decompose the electricity load data. The autocorrelation of historical data is analyzed by combining autocorrelation and partial autocorrelation functions. Feature vectors are extracted by convolutional neural network (CNN) and prediction is performed by long short-term memory network (LSTM) to optimize model parameters.

Benefits of technology

It improves the accuracy and reliability of electricity load forecasting for agricultural greenhouses, adapts to the nonlinear changes of complex data, and supports the rational allocation of power resources and energy conservation and emission reduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121663457A_ABST
    Figure CN121663457A_ABST
Patent Text Reader

Abstract

The invention provides an agricultural greenhouse electricity short-term load prediction method based on a whale optimization algorithm. The method comprises the following steps: sampling electrical load data, and decomposing the electrical load data into a plurality of intrinsic mode components by using a VMD algorithm based on a whale optimization algorithm; analyzing autocorrelation through ACF and PACF, and determining a prediction period; standardizing the meteorological data and the intrinsic mode component, and inputting the standardized meteorological data and intrinsic mode component into a CNN to extract features; setting an LSTM historical window length based on an autocorrelation and partial autocorrelation period, and inputting the LSTM to obtain a predicted load value; and training the optimization model and carrying out rolling prediction. The VMD technology, the CNN technology and the LSTM technology are fused, the whale optimization algorithm is used for optimizing parameters, and prediction precision and reliability are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power load forecasting, and in particular to a method for short-term power load forecasting for agricultural greenhouses based on the whale optimization algorithm. Background Technology

[0002] With the continuous development of modern agricultural technology, the electricity demand of agricultural greenhouses is increasing day by day. Accurate prediction of their electricity load is of great significance for the rational allocation of electricity resources and energy conservation and emission reduction. Existing methods for predicting agricultural greenhouse electricity load mainly include statistical analysis methods and traditional machine learning methods, such as time series analysis, regression analysis, and artificial neural networks. These methods are effective when processing stationary or linear data, but they often fail to achieve ideal prediction accuracy for complex data such as agricultural greenhouse electricity load, which is highly nonlinear, highly volatile, has peak-to-valley differences, and is transferable.

[0003] For example, traditional time series analysis methods can usually only capture simple trends and periodicity in data, but cannot fully consider the impact of complex factors such as weather conditions on electricity load; regression analysis methods have high requirements for data, lack adaptability, and are difficult to adapt to nonlinear changes in load data.

[0004] In addition, due to the complexity and variability of the electricity load of agricultural greenhouses, existing methods also face great difficulties in optimizing model parameters. It usually requires a lot of experiments and debugging to find a suitable combination of parameters, and the robustness of the prediction results is poor. Summary of the Invention

[0005] This application provides a method for short-term load forecasting of electricity consumption in agricultural greenhouses based on the whale optimization algorithm, in order to solve the technical problem of difficulty in optimizing model parameters.

[0006] In a first aspect, this application provides a method for short-term load forecasting of electricity consumption in agricultural greenhouses based on the whale optimization algorithm, including: Electricity load data is sampled, and variational mode decomposition (VMD) algorithm based on whale optimization algorithm is used to decompose the electricity load data with volatility exceeding the threshold into multiple intrinsic mode components with limited bandwidth. The autocorrelation function ACF and the partial autocorrelation function PACF are used to analyze the autocorrelation between historical load values ​​and current values, and the cutoff point is selected as the prediction period. The meteorological data and intrinsic mode components corresponding to the time period of the electricity load data are standardized together and combined into a two-dimensional vector, which is then input into a convolutional neural network (CNN) to extract feature vectors. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM. The predicted load value is obtained through the fully connected layer. The model is trained and optimized using the training set to obtain a prediction model, which is then applied to the test set for rolling prediction of short-term loads.

[0007] Optionally, during the parameter optimization process of the VMD algorithm, the whale optimization algorithm is used to determine the optimal parameter combination (k, α), where k is the number of intrinsic mode functions, α is the penalty parameter, and the fitness function is the minimum envelope entropy.

[0008] Optionally, in the CNN network, the kernel size of the convolutional layer is 2*2, the stride is 1, the activation function is ReLU, and the parameter of the Dropout layer is 0.1.

[0009] Optionally, in the LSTM model, the root mean square error (RMSE) is selected as the model evaluation criterion, and the number of LSTM layers is set to 3, with 64, 128, and 32 neurons per layer, respectively.

[0010] Optionally, in the rolling forecasting process of short-term load, the forecasted load value is used as the input data for the next time point, and forecasts are performed sequentially until the desired short-term load forecast result is obtained.

[0011] Secondly, this application provides a short-term load forecasting device for agricultural greenhouse electricity consumption based on the whale optimization algorithm, comprising: The data acquisition module is used to sample the power load data and use the variational mode decomposition (VMD) algorithm based on the whale optimization algorithm to decompose the power load data with fluctuations exceeding the threshold into multiple intrinsic mode components with limited bandwidth. The data processing module is used to analyze the autocorrelation between historical load values ​​and current values ​​using the autocorrelation function ACF and the partial autocorrelation function PACF, and to select the cutoff point as the prediction period. The model training module is used to standardize the meteorological data and intrinsic mode components corresponding to the time period of the electricity load data, combine them into a two-dimensional vector, and input it into the convolutional neural network (CNN) to extract feature vectors. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM. The predicted load value is obtained through the fully connected layer. The prediction module is used to train and optimize the model using the training set to obtain a prediction model, which is then applied to the test set for rolling prediction of short-term loads.

[0012] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the short-term load forecasting method for agricultural greenhouse electricity consumption based on the whale optimization algorithm as described in any of the first aspects.

[0013] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the short-term load forecasting method for agricultural greenhouse electricity consumption based on the whale optimization algorithm as described in any of the first aspects.

[0014] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the short-term load forecasting method for agricultural greenhouse electricity consumption based on the whale optimization algorithm as described in any of the first aspects.

[0015] This application provides a short-term load forecasting method for agricultural greenhouse electricity consumption based on the whale optimization algorithm. By integrating VMD, CNN, and LSTM technologies and utilizing the whale optimization algorithm for parameter optimization, it can effectively improve the accuracy and reliability of short-term load forecasting for agricultural greenhouse electricity consumption based on the whale optimization algorithm. VMD decomposition can extract the intrinsic modal features of the data, CNN can automatically extract the local and spatial features of the data, LSTM can capture the long-term dependencies of time series data, and the whale optimization algorithm can optimize model parameters and improve model performance. The combination of these technologies enables this method to better adapt to the complexity and volatility of agricultural greenhouse electricity load, providing strong support for the rational allocation of power resources and energy conservation and emission reduction. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] Figure 1 A flowchart illustrating a short-term load forecasting method for agricultural greenhouse electricity consumption based on the whale optimization algorithm, provided for an embodiment of this application; Figure 2 A schematic diagram of a short-term load forecasting device for agricultural greenhouse electricity based on the whale optimization algorithm provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application.

[0018] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0020] The aforementioned short-term load forecasting of agricultural greenhouse electricity consumption based on the whale optimization algorithm is performed by electronic equipment, which is a terminal device.

[0021] The aforementioned terminal devices can be either wireless or wired. A wireless terminal can be a device that provides voice and / or other service data connectivity to a user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. The wireless terminal can communicate with one or more core network devices via a Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) or a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile device, which exchanges voice and / or data with the RAN. Furthermore, a wireless terminal can also be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), or other similar devices. Wireless terminals can also be referred to as systems, subscriber units, subscriber stations, mobile stations, mobile devices, remote stations, remote terminals, access terminals, user terminals, user agents, user devices, or user equipment; no specific terminology is used here. Optionally, the aforementioned terminal devices can also include smartwatches, tablets, and other similar devices.

[0022] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0023] like Figure 1 As shown, Figure 1 A flowchart illustrating a short-term load forecasting method for agricultural greenhouse electricity consumption based on the whale optimization algorithm is provided in this application embodiment. Specifically, the method may include steps S201 to S204, wherein: S201. Sample the electricity load data and use the variational mode decomposition (VMD) algorithm based on the whale optimization algorithm to decompose the electricity load data with fluctuations exceeding the threshold into multiple intrinsic mode components with limited bandwidth.

[0024] Electronic devices first periodically sample electricity load data, acquiring a series of data points reflecting power consumption at different times. Then, a variational mode decomposition (VMD) algorithm based on the whale optimization algorithm is used to process this collected electricity load data, which exhibits strong fluctuations. Through this process, the raw data is precisely decomposed into several eigenmode components with finite bandwidth. Each component represents a different fluctuation characteristic or frequency component in the data, thereby enabling effective analysis and understanding of complex electricity load patterns. This method not only improves the accuracy of data parsing but also provides a solid foundation for further energy management decisions.

[0025] The whale optimization algorithm includes the following three steps: First, the whale optimization algorithm approximates the current best candidate solution as the optimal solution, and its mathematical expression is:

[0026] Where X(t) represents the current solution, Let r represent the optimal solution, where r is a random number between [-1, 1].

[0027] Secondly, a spiral search is performed based on the position of the current optimal solution and the current solution's position. The position update formula is:

[0028] A and C are coefficient vectors. This represents the distance between the current solution and the optimal solution, b is a constant used to control the shape of the spiral, and l is a random number between [-1, 1].

[0029] Finally, when individual solutions are far from the optimal solution, they will perform a random search throughout the solution space. The position update formula is as follows:

[0030] in, The solution location is randomly selected. This indicates the distance between the current solution and the random solution. This step helps the algorithm escape local optima and search for the global optimum.

[0031] During the optimization process, the upper and lower limits of k and α, as well as the number of initial solutions, are initialized. The data is then input into the algorithm for iteration to obtain the optimal k and α, as well as the intrinsic mode components.

[0032] The original data is represented as f(t) and expressed as k eigenmode functions. The VMD-constrained variational model is as follows:

[0033]

[0034] Where K is the number of intrinsic mode functions, Let k be the eigenmode function. Let the frequency center of the k-th mode function be ( The signal is the interpreter of the Hilbert transform. Used to correct and modulate the spectrum of each mode function to the corresponding fundamental frequency band. To determine the sign of the partial derivative, j is the imaginary unit, and t represents time.

[0035] To solve the constrained optimization problem described above, the constrained variational problem is transformed into an unconstrained variational problem. Leveraging the advantages of the quadratic penalty term and the Lagrange multiplier method, an augmented Lagrangian function is introduced, as shown in the equation:

[0036] Here, α is the penalty parameter, and λ is the Lagrange multiplier. Among all parameters, k and α have a significant impact on the decomposition performance of VMD. Traditional methods often rely on experience to select these parameters, which involves considerable subjectivity. If k is set too small, multiple components of the signal may be contained in a single mode simultaneously; if k is too large, a single component may be contained in multiple modes, and the center frequencies obtained through iteration will overlap. Regarding α, if α is large, the bandwidth limitation will be very narrow, leading to the elimination of useful frequency components; conversely, redundant frequency components will be retained. This scheme uses the whale optimization algorithm to determine the optimal parameter combination (k, α), with the fitness function being the minimum envelope entropy, because it has the advantages of strong adaptability, stability, and no prior knowledge dependency.

[0037] S202. Analyze the autocorrelation between historical load values ​​and current values ​​using the autocorrelation function ACF and the partial autocorrelation function PACF, and select the cutoff point as the prediction period.

[0038] Electronic equipment first samples electricity load data at regular intervals, collecting data points reflecting power consumption at different times. Then, it uses the autocorrelation function (ACF) and partial autocorrelation function (PACF) to analyze the autocorrelation between these historical load data and current values ​​to identify inherent patterns and periodic characteristics in the data. During the analysis, the cutoff point—the point where the autocorrelation significantly disappears—is determined by observing the ACF and PACF plots, and this point serves as the basis for selecting the period length of the prediction model. This process helps to accurately capture the changing trends of load data, providing reliable time period parameters for subsequent load forecasting. This not only improves forecast accuracy but also provides crucial information for optimizing energy management.

[0039] Assuming the time series data is

[0040] The formula for calculating the autocorrelation function is as follows:

[0041] The formula for calculating the partial autocorrelation function is:

[0042] in, For the current period's data, This is data from the preceding period. for right Make the predicted values ​​after regression.

[0043] The autocorrelation function (ACF) measures the correlation of time series at different lag orders, helping to identify the moving average characteristics of the data. The partial autocorrelation function (PACF) measures the pure correlation after controlling for the effects of intermediate lags, helping to identify the autoregressive characteristics of the data.

[0044] S203. Standardize the meteorological data and intrinsic mode components corresponding to the time period of the electricity load data, combine them into a two-dimensional vector, and input the vector into a convolutional neural network (CNN) to extract feature vectors.

[0045] First, meteorological data and intrinsic mode components (IMCs) for the corresponding time periods of the electricity load data are collected to ensure comprehensive coverage of influencing factors. Then, these data are standardized along with the electricity load data to eliminate the impact of differences in dimensions and orders of magnitude. Next, the standardized data are combined to form a two-dimensional vector, where one dimension represents the processed load data, and the other dimension contains the corresponding meteorological information and IMCs. Finally, the constructed two-dimensional vector is input into a pre-trained convolutional neural network (CNN). Leveraging the powerful feature extraction capabilities of CNNs, the network automatically learns and identifies key feature vectors affecting electricity load, providing accurate data support for subsequent load forecasting.

[0046] S204. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM. The predicted load value is obtained through the fully connected layer.

[0047] S204. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM. The predicted load value is obtained through the fully connected layer.

[0048] The standardized formula is:

[0049] in, For each time point, n is the number of data points.

[0050] Next, the intrinsic mode components of temperature, humidity, precipitation, and power load are combined into a two-dimensional vector and input into a convolutional network (CNN). The convolutional layer convolves the feature matrix with the convolutional kernel to obtain multiple sets of feature vectors.

[0051] The processing of convolutional layers is as follows:

[0052] in The weights of the (i+1)th layer are... Let be the weight of the i-th layer. Let b be the input of the i-th layer, b be the bias term, and the activation function be ReLU.

[0053] The formula for the ReLU function is as follows:

[0054] The input is then fed into a pooling layer for max pooling. The pooled feature vector is then fed into a Dropout layer to reduce dependence on local features in each iteration and prevent overfitting. Finally, the feature vector is reduced in dimensionality and arranged into a real-number vector in temporal order.

[0055] Finally, the period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real-valued vector output from the CNN layer is sliced ​​and used as the input to the LSTM. The outputs of the LSTM hidden layers are then weighted and summed in the fully connected layer to obtain the predicted load value. This predicted load value is then used as historical data input into the model to obtain the value at the next time point, and so on, to perform rolling predictions of electricity load.

[0056] Based on the obtained period, it is set as the historical window length of the input vector in the Long Short-Term Memory (LSTM) network model. Next, using the real-number vectors processed by the Convolutional Neural Network (CNN) as the basic data, these vectors are sliced ​​according to the determined historical window length to generate data segments adapted to the LSTM model's input format. Subsequently, the sliced ​​data is input into the LSTM model, which captures long-term dependencies in the time-series data. Finally, the data processed by the LSTM layers is further refined through fully connected layers to extract features, and the final predicted load value is output. This process fully leverages the advantages of CNNs in feature extraction and the ability of LSTMs to process time-series data, improving the accuracy and reliability of load prediction.

[0057] S205. Use the training set to train and optimize the model to obtain a prediction model, and apply it to the test set for short-term load rolling prediction.

[0058] In one possible implementation, the kernel size of the convolutional layer in the CNN network is 2*2, the stride is 1, the activation function is ReLU, and the parameter of the Dropout layer is 0.1.

[0059] In the convolutional layers of the CNN network, 2x2 kernels with a stride of 1 are used to convolve the input data to extract features. Next, ReLU is used as the activation function to perform a non-linear transformation on the output data of the convolutional layers, enhancing the model's expressive power. Subsequently, after several layers of feature extraction, a Dropout layer with a parameter set to 0.1 is added to randomly drop 10% of the neuron connections, thereby reducing the risk of overfitting and improving the model's generalization ability.

[0060] In one feasible approach, the root mean square error (RMSE) is selected as the model evaluation criterion in the LSTM model, and the number of LSTM layers is set to 3, with 64, 128, and 32 neurons per layer, respectively.

[0061] First, the structural parameters of the LSTM model were determined, specifically setting the number of LSTM layers to 3, with 64, 128, and 32 neurons per layer, respectively. Then, an LSTM model was constructed based on this structure, and the root mean square error (RMSE) was used as the evaluation metric to measure model performance. During the model training phase, forward propagation was performed using the input sequence data, and the RMSE value was calculated based on the difference between the predicted result and the actual target. Subsequently, the backpropagation algorithm was used to adjust the model's internal parameters to optimize performance until a predetermined stopping condition was met. This process ensures that the LSTM model can effectively learn the temporal dependencies of the input data and achieve high prediction accuracy.

[0062] In one feasible approach, during the rolling forecasting of short-term load, the forecasted load value is used as the input data for the next time point, and forecasts are performed sequentially until the desired short-term load forecast result is obtained.

[0063] In the implementation of short-term rolling load forecasting, electronic equipment first performs an initial forecast based on an initial input dataset to obtain the load value for the first forecast time point. Subsequently, this forecast value is used as part of the new input data for the next time point, combined with actual observation data (if available), for the next round of forecasting. This process is repeated, each time incorporating the most recently forecasted load value into the input data for the next time point, until the load forecast result for the entire required forecast period is generated.

[0064] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0065] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0066] Figure 2 A schematic diagram of a short-term load forecasting device for agricultural greenhouse electricity based on the whale optimization algorithm is provided in this application embodiment. Figure 2 As shown in the embodiment of this application, the short-term load forecasting device 40 for agricultural greenhouse electricity based on the whale optimization algorithm includes: The data acquisition module is used to sample the power load data and use the variational mode decomposition (VMD) algorithm based on the whale optimization algorithm to decompose the power load data with fluctuations exceeding the threshold into multiple intrinsic mode components with limited bandwidth. The data processing module is used to analyze the autocorrelation between historical load values ​​and current values ​​using the autocorrelation function ACF and the partial autocorrelation function PACF, and to select the cutoff point as the prediction period. The model training module is used to standardize the meteorological data and intrinsic mode components corresponding to the time period of the electricity load data, combine them into a two-dimensional vector, and input it into the convolutional neural network (CNN) to extract feature vectors. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM. The predicted load value is obtained through the fully connected layer. The prediction module is used to train and optimize the model using the training set to obtain a prediction model, which is then applied to the test set for rolling prediction of short-term loads.

[0067] In one possible implementation, the data acquisition module described above, during the parameter optimization process of the VMD algorithm, is used to: The optimal parameter combination (k, α) is determined using the whale optimization algorithm, where k is the number of intrinsic mode functions, α is the penalty parameter, and the fitness function is the minimum envelope entropy.

[0068] In one possible implementation, the kernel size of the convolutional layer in the CNN network is 2*2, the stride is 1, the activation function is ReLU, and the parameter of the Dropout layer is 0.1.

[0069] In one possible implementation, the LSTM model selects the root mean square error (RMSE) as the model evaluation criterion, sets the number of LSTM layers to 3, and the number of neurons in each layer to 64, 128, and 32, respectively.

[0070] In one possible implementation, the forecasting module described above, when performing the rolling forecasting process for short-term loads, is used to: The predicted load value is used as the input data for the next time point, and predictions are made sequentially until the desired short-term load forecast result is obtained.

[0071] The short-term load forecasting device for agricultural greenhouse electricity based on the whale optimization algorithm provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0072] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0073] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0074] When an integrated unit / module is implemented in hardware, that hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc.

[0075] Figure 3 A schematic diagram of the structure of the electronic device provided in this application. Figure 3 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0076] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0077] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0078] Unless otherwise specified, processor 501 can be any suitable hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, memory 502 can be any suitable magnetic or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.

[0079] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0080] This application also provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the above-described method for updating redundant fields in a distributed system.

[0081] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for updating redundant fields in a distributed system.

[0082] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as these combinations of technical features do not contradict each other, they should be considered within the scope of this specification. Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0083] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for short-term load forecasting of electricity consumption in agricultural greenhouses based on the whale optimization algorithm, characterized in that, include: Electricity load data is sampled, and the variational mode decomposition (VMD) algorithm based on the whale optimization algorithm is used to decompose the fluctuating electricity load data exceeding the threshold into multiple intrinsic mode components with limited bandwidth. The autocorrelation function (ACF) and partial autocorrelation function (PACF) are used to analyze the autocorrelation between historical load values ​​and current values, and the cutoff point is selected as the prediction period. Here, the historical load value is the historical electricity load data, and the current value is the current electricity load data. The meteorological data and intrinsic mode components corresponding to the time period of the electricity load data are standardized together and combined into a two-dimensional vector, which is then input into a convolutional neural network (CNN) to extract feature vectors. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM, which is then passed through a fully connected layer to obtain the predicted load value. The model is trained and optimized using the training set to obtain the prediction model, which is then applied to the test set for short-term rolling load prediction.

2. The method for short-term load forecasting of agricultural greenhouse electricity consumption based on the whale optimization algorithm according to claim 1, characterized in that, In the parameter optimization process of the VMD algorithm, the whale optimization algorithm is used to determine the optimal parameter combination (k, α), where k is the number of intrinsic mode functions, α is the penalty parameter, and the fitness function is the minimum envelope entropy.

3. The method for short-term load forecasting of agricultural greenhouse electricity consumption based on the whale optimization algorithm according to claim 1, characterized in that, In the CNN network, the kernel size of the convolutional layer is 2*2, the stride is 1, the activation function is ReLU, and the parameter of the Dropout layer is 0.

1.

4. The method for short-term load forecasting of agricultural greenhouse electricity consumption based on the whale optimization algorithm according to claim 1, characterized in that, In the LSTM model, the root mean square error (RMSE) is selected as the model evaluation criterion, and the number of LSTM layers is set to 3, with 64, 128, and 32 neurons per layer, respectively.

5. The method for short-term load forecasting of agricultural greenhouse electricity consumption based on the whale optimization algorithm according to claim 1, characterized in that, In the rolling forecasting process of short-term load, the forecasted load value is used as the input data for the next time point, and the forecasting is carried out sequentially until the required short-term load forecasting result is obtained.

6. A short-term load forecasting device for agricultural greenhouse electricity consumption based on the whale optimization algorithm, characterized in that, include: The data acquisition module is used to sample the power load data and use the variational mode decomposition (VMD) algorithm based on the whale optimization algorithm to decompose the power load data with fluctuations exceeding the threshold into multiple intrinsic mode components with limited bandwidth. The data processing module is used to analyze the autocorrelation between historical load values ​​and current values ​​using the autocorrelation function ACF and the partial autocorrelation function PACF, and to select the cutoff point as the prediction period. The model training module is used to standardize the meteorological data and intrinsic mode components corresponding to the time period of the electricity load data, combine them into a two-dimensional vector, and input it into the convolutional neural network (CNN) to extract feature vectors. The period obtained through autocorrelation and partial autocorrelation is used as the historical window length of the vector in the LSTM prediction model. The real number vector output by the CNN layer is sliced ​​and used as the input of the LSTM. The predicted load value is obtained through the fully connected layer. The prediction module is used to train and optimize the model using the training set to obtain a prediction model, which is then applied to the test set for rolling prediction of short-term loads.

7. The short-term load forecasting device for agricultural greenhouse electricity based on the whale optimization algorithm according to claim 6, characterized in that, The prediction module, when performing rolling predictions for short-term loads applied to the test set, is used to: The predicted load value is used as the input data for the next time point, and predictions are made sequentially until the desired short-term load forecast result is obtained.

8. The short-term load forecasting device for agricultural greenhouse electricity based on the whale optimization algorithm according to claim 6, characterized in that, In the LSTM model, the root mean square error (RMSE) is selected as the model evaluation criterion, and the number of LSTM layers is set to 3, with 64, 128, and 32 neurons per layer, respectively.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 5.