Elastic supporting capacity prediction method and system oriented to demand side resources
Through the variational modal decomposition model and the long-term and short-term memory network model based on attention mechanism, the elastic support capabilities of demand-side resources are predicted, and the problems of single prediction methods and low automation in the existing technology are solved, and more accurate and efficient prediction results are achieved.
Patent Information
- Application Number
- CN202411555495.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, the elastic support capability prediction method for demand-side resources has a single dimension and a low level of automation, which cannot fully reflect the actual adjustment capability of the resource pool, and is inefficient and subjective, and is prone to errors.
The variational modal decomposition model is used to decompose the improved historical electricity consumption data of the demand-side users into multiple modal components, and these modal components are predicted through a long and short-term memory network model based on the attention mechanism to generate the elastic support capability prediction results of the demand-side resources. This method uses the whale optimization algorithm to perform global optimization in advance to optimize the number of modalities and quadratic punishment factors of the variational modal decomposition model.
A multi-dimensional analysis of the elastic support capacity of the demand-side resource is achieved, improving the accuracy and automation of predictions, reducing manual participation, improving efficiency and reducing subjectivity.
Smart Images

Figure CN119647731A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems, and in particular to a method and system for predicting elastic support capacity of demand-side resources. Background Art
[0002] With the rapid development of smart grid technology, the elastic support capability of demand-side resources plays an increasingly important role in ensuring the stable operation of the power grid and optimizing resource allocation. Demand-side resources include industrial loads, building control systems, energy storage equipment, etc., which have significant regulation potential in the power system and can balance the supply and demand relationship of the power grid by reducing or increasing loads when the power supply is tight or excessive.
[0003] However, the diversity of demand-side resource types makes the prediction of their adjustable capacity extremely challenging. Existing demand-side resource elastic support capacity prediction methods often rely on single-dimensional data, such as historical electricity consumption data or equipment capacity, which cannot fully reflect the actual adjustment capacity of the resource pool. In addition, the level of automation is low, requiring a large amount of manual participation in verification, which is inefficient, subjective and prone to errors. Summary of the invention
[0004] In order to solve the problem that the elastic support capacity prediction method of demand-side resources in the prior art has a single dimension and a low level of automation, the present invention proposes an elastic support capacity prediction method for demand-side resources, including:
[0005] Inputting the improved historical electricity consumption data of the demand-side user as an initial mode into a variational mode decomposition model to decompose the improved historical electricity consumption data into multiple mode components;
[0006] Inputting multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capability of demand-side resources to obtain multiple prediction vectors, each of which includes various indicators representing the elastic support capability of demand-side resources;
[0007] The corresponding elements of multiple prediction vectors are superimposed to obtain the elastic support capacity of demand-side resources;
[0008] Among them, the number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained in advance by global optimization using the whale optimization algorithm; the improved historical electricity consumption data is obtained by encoding the resources owned by the corresponding user and the adjustment parameters of the resources, and then splicing them with the historical electricity consumption data.
[0009] Optionally, the number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained as follows:
[0010] S11: using the number of modes and the quadratic penalty factor in the variational mode decomposition model as the position vector of the individual whale in the whale optimization algorithm, and using the envelope entropy of the individual whale as the fitness function to calculate the fitness, wherein the envelope signal of the envelope entropy is the modal component obtained by decomposing and improving the historical electricity consumption data using the variational mode decomposition model;
[0011] S12: Calculate the fitness of each individual whale to initialize the current position vector of each whale, and take the position vector corresponding to the individual whale with the smallest fitness as the optimal solution of the current state;
[0012] S13: Generate a random number p. If p<γ, further determine the convergence factor |A|. If |A|<β, use the encirclement contraction strategy to update the whale position. If |A|≥β, use the random exploration strategy to update the whale position. If p≥γ, use the spiral contraction strategy to update the whale position. γ is the first preset value and β is the second preset value.
[0013] S14: Repeat the above steps S12 and S13 until the preset number of iterations is reached, and output the individual position of the whale corresponding to the minimum fitness value, that is, the optimal combination of the number of modes and the secondary penalty factor.
[0014] Optionally, the formula of the encirclement and contraction strategy is:
[0015]
[0016] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the whale individual with the minimum fitness at the tth iteration, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0017] Optionally, the formula of the spiral contraction strategy is:
[0018]
[0019] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the individual whale with the minimum fitness at the tth iteration, b is the spiral constant, l is a random number between (-1, 1), is the distance between the whale group and the prey, is the position vector of the individual whale at the tth iteration.
[0020] Optionally, the formula of the random exploration strategy is:
[0021]
[0022] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of a randomly selected individual whale, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0023] Optionally, the fitness function is:
[0024]
[0025] Among them, the envelope entropy E p The minimum value of is used as the fitness function, α(j) is the envelope signal constructed by the modal components obtained by decomposing the improved historical electricity consumption data based on the variational modal decomposition model at the j-th sampling point, ε(j) is the entropy value of the j-th sampling point, and N is the total number of sampling points.
[0026] Optionally, the training steps of the attention-based long short-term memory network model include:
[0027] Obtaining improved historical electricity consumption data for training and corresponding values of indicators representing the elastic support capability of demand-side resources;
[0028] Inputting the improved historical electricity consumption data for demand-side user training into the variational modal decomposition model to obtain a plurality of modal components for training;
[0029] Taking the multiple training modal components as input and the corresponding values of the indicators as output, the long short-term memory network model based on the attention mechanism is trained until the loss function of the long short-term memory network model based on the attention mechanism converges, thereby completing the training of the long short-term memory network model based on the attention mechanism.
[0030] Optionally, the improved historical electricity consumption data is encoded by encoding the resources owned by the corresponding user and the adjustment parameters of the resources in the following encoding method:
[0031] The real number coding method is used to encode the resources owned by the user and the adjustment parameters of the resources.
[0032] Optionally, after obtaining the prediction result, the method further includes:
[0033] The prediction results are visualized.
[0034] Optionally, after obtaining the prediction result, the method further includes:
[0035] The forecast results are written into a preset report template to generate a report on the elastic support capacity of demand-side resources.
[0036] Optionally, the historical electricity consumption data includes the user's electricity load and electricity consumption.
[0037] Optionally, the indicator includes one or more of the following:
[0038] Response time, adjustment rate, adjustable resources, adjustment accuracy and reliability.
[0039] On the other hand, the present application provides a system for predicting elastic support capacity of demand-side resources, including:
[0040] An input module, used for inputting the improved historical electricity consumption data of the demand-side user as an initial mode into the variational mode decomposition model to decompose the improved historical electricity consumption data into multiple mode components;
[0041] An indicator prediction module is used to input multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capability of demand-side resources to obtain multiple prediction vectors, each of which includes various indicators representing the elastic support capability of demand-side resources;
[0042] A result prediction module, used to superimpose corresponding elements of multiple prediction vectors to obtain the elastic support capacity of demand-side resources;
[0043] Among them, the number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained in advance by global optimization using the whale optimization algorithm; the improved historical electricity consumption data is obtained by encoding the resources owned by the corresponding user and the adjustment parameters of the resources, and then splicing them with the historical electricity consumption data.
[0044] Optionally, the number of modes and the quadratic penalty factor of the variational mode decomposition model in the indicator prediction module are obtained as follows:
[0045] S11: using the number of modes and the quadratic penalty factor in the variational mode decomposition model as the position vector of the individual whale in the whale optimization algorithm, and using the envelope entropy of the individual whale as the fitness function to calculate the fitness, wherein the envelope signal of the envelope entropy is the modal component obtained by decomposing and improving the historical electricity consumption data using the variational mode decomposition model;
[0046] S12: Calculate the fitness of each individual whale to initialize the current position vector of each whale, and take the position vector corresponding to the individual whale with the smallest fitness as the optimal solution of the current state;
[0047] S13: Generate a random number p. If p<γ, further determine the convergence factor |A|. If |A|<β, use the encirclement contraction strategy to update the whale position. If |A|≥β, use the random exploration strategy to update the whale position. If p≥γ, use the spiral contraction strategy to update the whale position. γ is the first preset value and β is the second preset value.
[0048] S14: Repeat the above steps S12 and S13 until the preset number of iterations is reached, and output the individual position of the whale corresponding to the minimum fitness value, that is, the optimal combination of the number of modes and the secondary penalty factor.
[0049] Optionally, the formula of the encirclement and contraction strategy in the indicator prediction module is:
[0050]
[0051] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the whale individual with the minimum fitness at the tth iteration, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0052] Optionally, the formula of the spiral contraction strategy in the indicator prediction module is:
[0053]
[0054] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the individual whale with the minimum fitness at the tth iteration, b is the spiral constant, l is a random number between (-1, 1), is the distance between the whale group and the prey, is the position vector of the individual whale at the tth iteration.
[0055] Optionally, the formula of the random exploration strategy in the indicator prediction module is:
[0056]
[0057] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of a randomly selected individual whale, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0058] Optionally, the fitness function in the indicator prediction module is:
[0059]
[0060] Among them, the envelope entropy E p The minimum value of is used as the fitness function, α(j) is the envelope signal constructed by the modal components obtained by decomposing the improved historical electricity consumption data based on the variational modal decomposition model at the j-th sampling point, ε(j) is the entropy value of the j-th sampling point, and N is the total number of sampling points.
[0061] Optionally, the training steps of the long short-term memory network model based on the attention mechanism in the indicator prediction module include:
[0062] Obtaining improved historical electricity consumption data for training and corresponding values of indicators representing the elastic support capability of demand-side resources;
[0063] Inputting the improved historical electricity consumption data for demand-side user training into the variational modal decomposition model to obtain a plurality of modal components for training;
[0064] Taking the multiple training modal components as input and the corresponding values of the indicators as output, the long short-term memory network model based on the attention mechanism is trained until the loss function of the long short-term memory network model based on the attention mechanism converges, thereby completing the training of the long short-term memory network model based on the attention mechanism.
[0065] Optionally, the input module improves the historical electricity consumption data by encoding the resources owned by the corresponding user and the adjustment parameters of the resources in the encoding method as follows:
[0066] The real number coding method is used to encode the resources owned by the user and the adjustment parameters of the resources.
[0067] Optionally, after obtaining the prediction result, the result prediction module further includes:
[0068] The prediction results are visualized.
[0069] Optionally, after obtaining the prediction result, the result prediction module further includes:
[0070] The forecast results are written into a preset report template to generate a report on the elastic support capacity of demand-side resources.
[0071] Optionally, the historical electricity consumption data in the input module includes the user's electricity load and electricity consumption.
[0072] Optionally, the indicators in the indicator prediction include one or more of the following:
[0073] Response time, adjustment rate, adjustable resources, adjustment accuracy and reliability.
[0074] In another aspect, the present application further provides a computing device, comprising: at least one processor and a memory;
[0075] The memory is used to store one or more programs;
[0076] When the one or more programs are executed by the one or more processors, a method for predicting elastic support capacity of demand-side resources as described above is implemented.
[0077] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, it implements a method for predicting elastic support capacity of demand-side resources as described above.
[0078] Compared with the prior art, the present invention has the following beneficial effects:
[0079] The present invention provides a method and system for predicting the elastic support capacity of demand-side resources, the method comprising: using the improved historical electricity consumption data of demand-side users as the initial modal input to a variational modal decomposition model to decompose the improved historical electricity consumption data into multiple modal components; inputting the multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capacity of demand-side resources to obtain multiple prediction vectors, each prediction vector including various indicators representing the elastic support capacity of demand-side resources; superimposing corresponding elements of the multiple prediction vectors to obtain the elastic support capacity of demand-side resources; the present application uses a variational modal decomposition model to predict the elastic support capacity of demand-side resources. The improved historical electricity consumption data of various resources in the resource pool are modally separated and extracted to achieve multi-dimensional analysis. The number of modes and the quadratic penalty factor of the variational modal decomposition model are obtained by global optimization of the whale optimization algorithm, which ensures the rationality of the selection of key parameters of the variational modal decomposition model, and can not only ensure that the decomposed modal components accurately represent the original data information, but also avoid information redundancy. The long short-term memory network based on the attention mechanism is further adopted to more efficiently and reasonably process and learn the key data that affects the elastic support capability in the long-term data on the resource demand side of the smart grid, improve the ability to learn the important features of the data, and further improve the accuracy of the elastic support capability prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A schematic diagram of the steps of the method for predicting the elastic support capability of demand-side resources proposed by the present invention;
[0081] Figure 2 A schematic diagram of the parameter determination steps of the variational mode decomposition model proposed in the present invention;
[0082] Figure 3 A schematic diagram of a parameter determination process of the variational mode decomposition model proposed in the present invention;
[0083] Figure 4 A schematic diagram of the training steps of the long short-term memory network model based on the attention mechanism proposed in the present invention;
[0084] Figure 5 This is an application flow chart of the method for predicting the elastic support capability of demand-side resources proposed by the present invention;
[0085] Figure 6This is a schematic diagram of the structure of the elastic support capability prediction system for demand-side resources proposed by the present invention;
[0086] Figure 7 This is a schematic diagram of the structure of the electronic device proposed by the present invention. DETAILED DESCRIPTION
[0087] The present invention proposes a method and system for predicting elastic support capacity for demand-side resources to solve the technical problems of single prediction method and low automation level in the prior art. Specifically, the present invention uses a variational mode decomposition model to perform modal separation and extraction on the improved historical electricity consumption data of various resources in the resource pool to achieve multidimensional analysis, wherein the number of modes and the secondary penalty factor of the variational mode decomposition model are obtained by global optimization of the whale optimization algorithm, and the rationality of the selection of key parameters of the variational mode decomposition model is achieved, which can not only ensure that the decomposed modal components accurately express the original data information, but also avoid information redundancy; further adopting the long short-term memory network (AttLSTM) based on the attention mechanism can more efficiently and reasonably process and learn the key data affecting the elastic support capacity in the long-term data on the resource demand side of the smart grid, improve the learning ability of the important features of the data, and further improve the accuracy of the prediction of the elastic support capacity. The present invention also visualizes the prediction results and outputs the prediction report, so that the elastic support capacity is more intuitively displayed.
[0088] Embodiment 1:
[0089] A prediction method for the elastic support capacity of demand-side resources, such as Figure 1 As shown, the process includes the following steps S1 to S3.
[0090] S1: using the improved historical electricity consumption data of the demand-side user as the initial mode input into the variational mode decomposition model to decompose the improved historical electricity consumption data into multiple mode components;
[0091] S2: Input multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capability of demand-side resources to obtain multiple prediction vectors, each of which includes various indicators representing the elastic support capability of demand-side resources;
[0092] S3: Superimpose the corresponding elements of multiple prediction vectors to obtain the elastic support capacity of demand-side resources.
[0093] In step S1, the improved historical electricity consumption data is obtained by encoding the resources owned by the corresponding user and the adjustment parameters of the resources, and then splicing them with the historical electricity consumption data.
[0094] Among them, the historical electricity consumption data mainly includes continuous data signals such as historical electricity load and power consumption. The resources owned by users (for example, resource type and quantity) and resource adjustment parameters (for example, equipment adjustment capability, response time, maximum / minimum load and other parameters) are discrete data. Therefore, the discrete data is first encoded by real number coding method, and then the encoded data is spliced with the historical electricity consumption data by timestamp alignment method and user ID matching method to ensure that the encoded resource data and historical electricity consumption data are aligned in the time dimension and correspond to the same user in the user dimension, forming a complete variational mode decomposition model (VMD) that can process signal data, and the improved historical electricity consumption data of demand-side users is input as the initial mode into the variational mode decomposition model to decompose the improved historical electricity consumption data into multiple modal components.
[0095] Furthermore, it also includes data cleaning and normalization of the above historical electricity consumption data, resources owned and resource adjustment parameters to avoid data redundancy and eliminate useless data.
[0096] The number of modes and the quadratic penalty factor in the variational mode decomposition model (VMD) described in step S1 are obtained by global optimization in advance by the whale optimization algorithm (WOA), such as Figure 2 and Figure 3 As shown, the specific process includes the following steps S11 to S13.
[0097] S11: The number of modes and the quadratic penalty factor in the variational modal decomposition model are used as the position vector of the individual whale in the whale optimization algorithm, and the envelope entropy of the individual whale is used as the fitness function to calculate the fitness, wherein the envelope signal of the envelope entropy is the modal component obtained by decomposing and improving the historical electricity consumption data using the variational modal decomposition model.
[0098] The position vector of individual whales is constructed, and the number of modes and the quadratic penalty factor of the variational mode decomposition model (VMD) are used as the position vector of the whale optimization algorithm (WOA), so that the number of modes and the quadratic penalty factor can be globally optimized.
[0099] The fitness function of the individual whale is constructed to calculate the fitness value of each individual whale after update. In this embodiment, the envelope entropy of the individual whale is used as the fitness function. The specific formula is:
[0100]
[0101] Among them, the envelope entropy E p The minimum value of is used as the fitness function, α(j) is the envelope signal constructed by decomposing the improved historical electricity consumption data based on the variational modal decomposition model at the j-th sampling point, ε(j) is the entropy value of the j-th sampling point, and N is the total number of sampling points.
[0102] Initialize the parameters of the whale's individual position vector and the number of iterations. The i-th whale's individual position vector X i as follows:
[0103] x i =r·(ub-lb)+lb
[0104] Among them, r is a random number in [0, 1], ub is the upper bound of the value range search space, and lb is the lower bound of the value range search space.
[0105] S12: Calculate the fitness of each individual whale to initialize the current position vector of each whale, and take the position vector corresponding to the whale individual with the smallest fitness as the optimal solution of the current state.
[0106] The fitness function is used to calculate the fitness of each individual whale, and the position vector of the individual whale with the minimum fitness is taken as the optimal solution among the current candidate solutions, and the optimal solution is taken as the target prey position in the current state.
[0107] S13: Generate a random number p. If p<γ, further determine the convergence factor |A|. If |A|<β, adopt the encirclement contraction strategy to update the whale position. If |A|≥β, adopt the random exploration strategy to update the whale position. If p≥γ, adopt the spiral contraction strategy to update the whale position. γ is the first preset value, β is the second preset value. In this embodiment, γ is 0.5 and β is 1.
[0108] In a further preferred solution, the formula of the encirclement and contraction strategy is:
[0109]
[0110] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the whale individual with the minimum fitness at the tth iteration, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0111] In a further preferred embodiment, the formula of the spiral contraction strategy is:
[0112]
[0113] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the individual whale with the minimum fitness at the tth iteration, b is the spiral constant, l is a random number between (-1, 1), is the distance between the whale group and the prey, is the position vector of the individual whale at the tth iteration.
[0114] In a further preferred solution, the formula of the random exploration strategy is:
[0115]
[0116] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of a randomly selected individual whale, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0117] S14: Repeat the above steps S12 and S13 until the preset number of iterations is reached, and output the individual position of the whale corresponding to the minimum fitness value, that is, the optimal combination of the number of modes Q and the quadratic penalty factor α.
[0118] Taking the improved historical electricity consumption data as the initial modal set {f(t)}, the corresponding central frequency set is {u(t)}, and the Lagrangian operator set is {λ(t)}, VMD is iteratively updated in the following way:
[0119]
[0120] in, is the center frequency u of the kth mode k The Fourier transform of (t), is the Fourier transform of f(t), f(t) is the initial mode composed of improved historical electricity consumption data, is the Fourier transform of λ(t), is the Fourier transform of the Lagrangian operator at the n+1th iteration, is the Fourier transform of the Lagrangian operator at the nth iteration, is the center frequency of the kth mode at the n+1th iteration, ω is the frequency value, is the frequency center of the n+1th iteration under the kth mode, ω k is the frequency center of the kth mode, and τ is the noise tolerance.
[0121] During the iteration process, the following method is used to determine whether the termination condition is met:
[0122]
[0123] Among them, ε is the preset judgment accuracy, ε>0, if it is not satisfied, the iteration continues, if it is satisfied, Q modal component IMF sequences are output, is the center frequency of the kth mode at the nth iteration.
[0124] In a further preferred embodiment, in step S2, as Figure 4 As shown, the training steps of the long short-term memory network model based on the attention mechanism include the following S21 to S23:
[0125] S21: Obtain the improved historical electricity consumption data for training and the corresponding index corresponding value representing the elastic support capacity of demand-side resources. Obtain the historical electricity consumption data, user resources and corresponding resource parameters of multiple users, and process them to obtain the improved historical electricity consumption data of each user. The index includes one or more of the following:
[0126] Response time, adjustment rate, adjustable resource quantity, adjustment accuracy, reliability and other indicator parameters that can characterize the elastic support capability of resources can be calculated using existing technologies or obtained through engineering experience, and will not be elaborated here.
[0127] S22: inputting the improved historical electricity consumption data for training of the demand-side user into the variational modal decomposition model to obtain a plurality of modal components for training;
[0128] S23: Taking the multiple modal components for training as input and the corresponding values of the indicators as output, the long short-term memory network model based on the attention mechanism is trained until the loss function of the long short-term memory network model based on the attention mechanism converges, thereby completing the training of the long short-term memory network model based on the attention mechanism.
[0129] In a further preferred solution, after obtaining the prediction result, the method further includes: visually displaying the prediction result. Specifically, the method may adopt multi-dimensional data visualization technology such as improved radar chart for visual display, and may further explore the elastic support capability of the adjustable resource pool in multiple dimensions, including key indicators such as adjustment capacity, response time, and adjustment frequency.
[0130] In a further preferred solution, after obtaining the forecast result, the method further includes: writing the forecast result into a preset report template to generate an elastic support capacity report of demand-side resources. Through standardized templates and processes, the elastic support capacity analysis report can be automatically generated, thereby improving the standardization and readability of the forecast result.
[0131] like Figure 5 The figure shows the detailed application process of the method of the present invention. First, the user and device information are imported, and the network parameters are configured. WOA is used to globally optimize the parameters in VMD. The optimized parameters are used to decompose the data information to obtain multiple IMF modal components. The multiple IMF modal components are respectively input into AttLSTM to obtain multiple prediction vectors. The multiple prediction vectors are reconstructed to obtain prediction results. The elastic support capability is further demonstrated through multi-dimensional analysis and visualization, and a report is generated according to the report template.
[0132] Embodiment 2:
[0133] The present invention based on the same inventive concept also provides a prediction system for elastic support capacity of demand-side resources, such as Figure 6 As shown, including:
[0134] An input module, used for inputting the improved historical electricity consumption data of the demand-side user as an initial mode into the variational mode decomposition model to decompose the improved historical electricity consumption data into multiple mode components;
[0135] An indicator prediction module is used to input multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capability of demand-side resources to obtain multiple prediction vectors, each of which includes various indicators representing the elastic support capability of demand-side resources;
[0136] A result prediction module, used to superimpose corresponding elements of multiple prediction vectors to obtain the elastic support capacity of demand-side resources;
[0137] Among them, the number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained in advance by global optimization using the whale optimization algorithm; the improved historical electricity consumption data is obtained by encoding the resources owned by the corresponding user and the adjustment parameters of the resources, and then splicing them with the historical electricity consumption data.
[0138] In a further preferred embodiment, the number of modes and the quadratic penalty factor of the variational mode decomposition model in the index prediction module are obtained as follows:
[0139] S11: using the number of modes and the quadratic penalty factor in the variational mode decomposition model as the position vector of the individual whale in the whale optimization algorithm, and using the envelope entropy of the individual whale as the fitness function to calculate the fitness, wherein the envelope signal of the envelope entropy is the modal component obtained by decomposing and improving the historical electricity consumption data using the variational mode decomposition model;
[0140] S12: Calculate the fitness of each individual whale to initialize the current position vector of each whale, and take the position vector corresponding to the individual whale with the smallest fitness as the optimal solution of the current state;
[0141] S13: Generate a random number p. If p<γ, further determine the convergence factor |A|. If |A|<β, use the encirclement contraction strategy to update the whale position. If |A|≥β, use the random exploration strategy to update the whale position. If p≥γ, use the spiral contraction strategy to update the whale position. γ is the first preset value and β is the second preset value.
[0142] S14: Repeat the above steps S12 and S13 until the preset number of iterations is reached, and output the individual position of the whale corresponding to the minimum fitness value, that is, the optimal combination of the number of modes and the secondary penalty factor.
[0143] Optionally, the formula of the encirclement and contraction strategy in the indicator prediction module is:
[0144]
[0145] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the whale individual with the minimum fitness at the tth iteration, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0146] In a further preferred embodiment, the formula of the spiral contraction strategy in the indicator prediction module is:
[0147]
[0148] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the individual whale with the minimum fitness at the tth iteration, b is the spiral constant, l is a random number between (-1, 1), is the distance between the whale group and the prey, is the position vector of the individual whale at the tth iteration.
[0149] In a further preferred solution, the formula of the random exploration strategy in the indicator prediction module is:
[0150]
[0151] in, is the position vector of the individual whale at the t+1th iteration, is the position vector of a randomly selected individual whale, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0, 1], is the second coefficient vector, is a random vector between [0, 1], is the position vector of the individual whale at the tth iteration.
[0152] In a further preferred solution, the fitness function in the indicator prediction module is:
[0153]
[0154] Among them, the envelope entropy E p The minimum value of is used as the fitness function, α(j) is the envelope signal constructed by the modal components obtained by decomposing the improved historical electricity consumption data based on the variational modal decomposition model at the j-th sampling point, ε(j) is the entropy value of the j-th sampling point, and N is the total number of sampling points.
[0155] In a further preferred solution, the training steps of the long short-term memory network model based on the attention mechanism in the indicator prediction module include:
[0156] Obtaining improved historical electricity consumption data for training and corresponding values of indicators representing the elastic support capability of demand-side resources;
[0157] Inputting the improved historical electricity consumption data for demand-side user training into the variational modal decomposition model to obtain a plurality of modal components for training;
[0158] Taking the multiple training modal components as input and the corresponding values of the indicators as output, the long short-term memory network model based on the attention mechanism is trained until the loss function of the long short-term memory network model based on the attention mechanism converges, thereby completing the training of the long short-term memory network model based on the attention mechanism.
[0159] In a further preferred solution, the input module improves the historical electricity consumption data by encoding the resources owned by the corresponding user and the adjustment parameters of the resources in the encoding method as follows:
[0160] The real number coding method is used to encode the resources owned by the user and the adjustment parameters of the resources.
[0161] In a further preferred solution, after obtaining the prediction result, the result prediction module further comprises:
[0162] The prediction results are visualized.
[0163] In a further preferred solution, after obtaining the prediction result, the result prediction module further comprises:
[0164] The forecast results are written into a preset report template to generate a report on the elastic support capacity of demand-side resources.
[0165] In a further preferred solution, the historical electricity consumption data in the input module includes the user's electricity load and electricity consumption.
[0166] In a further preferred embodiment, the indicators in the indicator prediction include one or more of the following:
[0167] Response time, adjustment rate, adjustable resources, adjustment accuracy and reliability.
[0168] Example 3
[0169] like Figure 7 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.
[0170] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of a method for predicting elastic support capacity for demand-side resources in the above-mentioned embodiment.
[0171] Example 4
[0172] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The storage medium provides a storage space that stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a method for predicting elastic support capacity for demand-side resources in the above embodiment.
[0173] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take 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 code.
[0174] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0175] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A method for predicting elastic support capacity of demand-side resources, characterized in that: include: Inputting the improved historical electricity consumption data of the demand-side user as an initial mode into a variational mode decomposition model to decompose the improved historical electricity consumption data into multiple mode components; Inputting multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capability of demand-side resources to obtain multiple prediction vectors, each prediction vector including various indicators representing the elastic support capability of demand-side resources; The corresponding elements of multiple prediction vectors are superimposed to obtain the elastic support capacity of demand-side resources; The number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained by global optimization in advance using the whale optimization algorithm; The improved historical electricity consumption data is obtained by encoding the resources owned by the corresponding user and the adjustment parameters of the resources, and then splicing them with the historical electricity consumption data.
2. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: The number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained as follows: S11: using the number of modes and the quadratic penalty factor in the variational mode decomposition model as the position vector of the individual whale in the whale optimization algorithm, and using the envelope entropy of the individual whale as the fitness function to calculate the fitness, wherein the envelope signal of the envelope entropy is the modal component obtained by decomposing and improving the historical electricity consumption data using the variational mode decomposition model; S12: Calculate the fitness of each individual whale to initialize the current position vector of each whale, and take the position vector corresponding to the individual whale with the smallest fitness as the optimal solution of the current state; S13: Generate a random number p. If p<γ, further determine the convergence factor |A|. If |A|<β, use the encirclement contraction strategy to update the whale position. If |A|≥β, use the random exploration strategy to update the whale position. If p≥γ, use the spiral contraction strategy to update the whale position. γ is the first preset value and β is the second preset value. S14: Repeat the above steps S12 and S13 until the preset number of iterations is reached, and output the individual position of the whale corresponding to the minimum fitness value, that is, the optimal combination of the number of modes and the secondary penalty factor.
3. The method for predicting elastic support capacity of demand-side resources according to claim 2, characterized in that: The formula of the encirclement and contraction strategy is: in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the whale individual with the minimum fitness at the tth iteration, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0,1], is the second coefficient vector, is a random vector between [0,1], is the position vector of the individual whale at the tth iteration.
4. The method for predicting elastic support capacity of demand-side resources according to claim 2, characterized in that: The formula for the spiral contraction strategy is: in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the individual whale with the minimum fitness at the tth iteration, b is the spiral constant, l is a random number between (-1,1), is the distance between the whale group and the prey, is the position vector of the individual whale at the tth iteration.
5. The method for predicting elastic support capacity of demand-side resources according to claim 2, characterized in that: The formula for the random exploration strategy is: in, is the position vector of the individual whale at the t+1th iteration, is the position vector of a randomly selected individual whale, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0,1], is the second coefficient vector, is a random vector between [0,1], is the position vector of the individual whale at the tth iteration.
6. The method for predicting elastic support capacity of demand-side resources according to claim 2, characterized in that: The fitness function is: Among them, the envelope entropy E p The minimum value of is used as the fitness function, α(j) is the envelope signal constructed by the modal components obtained by decomposing the improved historical electricity consumption data based on the variational modal decomposition model at the j-th sampling point, ε(j) is the entropy value of the j-th sampling point, and N is the total number of sampling points.
7. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: The training steps of the long short-term memory network model based on the attention mechanism include: Obtaining improved historical electricity consumption data for training and corresponding values of indicators representing the elastic support capability of demand-side resources; Inputting the improved historical electricity consumption data for demand-side user training into the variational modal decomposition model to obtain a plurality of modal components for training; Taking the multiple training modal components as input and the corresponding values of the indicators as output, the long short-term memory network model based on the attention mechanism is trained until the loss function of the long short-term memory network model based on the attention mechanism converges, thereby completing the training of the long short-term memory network model based on the attention mechanism.
8. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: The improved historical electricity consumption data is encoded by encoding the resources owned by the corresponding user and the adjustment parameters of the resources in the following encoding method: The real number coding method is used to encode the resources owned by the user and the adjustment parameters of the resources.
9. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: After obtaining the prediction result, the method further includes: The prediction results are visualized.
10. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: After obtaining the prediction result, the method further includes: The forecast results are written into a preset report template to generate a report on the elastic support capacity of demand-side resources.
11. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: The historical electricity consumption data includes the user's electricity load and electricity consumption.
12. The method for predicting elastic support capacity of demand-side resources according to claim 1, characterized in that: The indicators include one or more of the following: Response time, adjustment rate, adjustable resources, adjustment accuracy and reliability.
13. A system for predicting elastic support capacity of demand-side resources, characterized in that: include: An input module, used for inputting the improved historical electricity consumption data of the demand-side user as an initial mode into the variational mode decomposition model to decompose the improved historical electricity consumption data into multiple mode components; An indicator prediction module is used to input multiple modal components into a pre-trained long short-term memory network model based on an attention mechanism to predict various indicators representing the elastic support capability of demand-side resources to obtain multiple prediction vectors, each of which includes various indicators representing the elastic support capability of demand-side resources; A result prediction module, used to superimpose corresponding elements of multiple prediction vectors to obtain the elastic support capacity of demand-side resources; The number of modes and the quadratic penalty factor of the variational mode decomposition model are obtained by global optimization in advance using the whale optimization algorithm; The improved historical electricity consumption data is obtained by encoding the resources owned by the corresponding user and the adjustment parameters of the resources, and then splicing them with the historical electricity consumption data.
14. The elastic support capacity prediction system for demand-side resources according to claim 13, characterized in that: The number of modes and the quadratic penalty factor of the variational mode decomposition model in the index prediction module are obtained as follows: S11: using the number of modes and the quadratic penalty factor in the variational mode decomposition model as the position vector of the individual whale in the whale optimization algorithm, and using the envelope entropy of the individual whale as the fitness function to calculate the fitness, wherein the envelope signal of the envelope entropy is the modal component obtained by decomposing and improving the historical electricity consumption data using the variational mode decomposition model; S12: Calculate the fitness of each individual whale to initialize the current position vector of each whale, and take the position vector corresponding to the individual whale with the smallest fitness as the optimal solution of the current state; S13: Generate a random number p. If p<γ, further determine the convergence factor |A|. If |A|<β, use the encirclement contraction strategy to update the whale position. If |A|≥β, use the random exploration strategy to update the whale position. If p≥γ, use the spiral contraction strategy to update the whale position. γ is the first preset value and β is the second preset value. S14: Repeat the above steps S12 and S13 until the preset number of iterations is reached, and output the individual position of the whale corresponding to the minimum fitness value, that is, the optimal combination of the number of modes and the secondary penalty factor.
15. The elastic support capability prediction system for demand-side resources according to claim 14, characterized in that: The formula of the encirclement and contraction strategy in the indicator prediction module is: in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the whale individual with the minimum fitness at the tth iteration, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0,1], is the second coefficient vector, is a random vector between [0,1], is the position vector of the individual whale at the tth iteration.
16. The elastic support capacity prediction system for demand-side resources according to claim 14, characterized in that: The formula of the spiral contraction strategy in the indicator prediction module is: in, is the position vector of the individual whale at the t+1th iteration, is the position vector of the individual whale with the minimum fitness at the tth iteration, b is the spiral constant, l is a random number between (-1,1), is the distance between the whale group and the prey, is the position vector of the individual whale at the tth iteration.
17. The elastic support capacity prediction system for demand-side resources according to claim 14, characterized in that: The formula of the random exploration strategy in the indicator prediction module is: in, is the position vector of the individual whale at the t+1th iteration, is the position vector of a randomly selected individual whale, is the first coefficient vector, is the convergence factor, which decreases linearly to 0 during the iteration process. is a random vector between [0,1], is the second coefficient vector, is a random vector between [0,1], is the position vector of the individual whale at the tth iteration.
18. The elastic support capacity prediction system for demand-side resources according to claim 14, characterized in that: The fitness function in the indicator prediction module is: Among them, the envelope entropy E p The minimum value of is used as the fitness function, α(j) is the envelope signal constructed by the modal components obtained by decomposing the improved historical electricity consumption data based on the variational modal decomposition model at the j-th sampling point, ε(j) is the entropy value of the j-th sampling point, and N is the total number of sampling points.
19. The elastic support capacity prediction system for demand-side resources according to claim 13, characterized in that: The training steps of the long short-term memory network model based on the attention mechanism in the indicator prediction module include: Obtaining improved historical electricity consumption data for training and corresponding values of indicators representing the elastic support capability of demand-side resources; Inputting improved historical electricity consumption data for demand-side user training into the variational modal decomposition model to obtain a plurality of modal components for training; Taking the multiple training modal components as input and the corresponding values of the indicators as output, the long short-term memory network model based on the attention mechanism is trained until the loss function of the long short-term memory network model based on the attention mechanism converges, thereby completing the training of the long short-term memory network model based on the attention mechanism.
20. The method for predicting elastic support capacity of demand-side resources according to claim 13, characterized in that: The input module improves the historical electricity consumption data by encoding the resources owned by the corresponding user and the adjustment parameters of the resources in the encoding method as follows: The real number coding method is used to encode the resources owned by the user and the adjustment parameters of the resources.
21. The elastic support capability prediction system for demand-side resources according to claim 13, characterized in that: After obtaining the prediction result, the result prediction module further includes: The prediction results are visualized.
22. The elastic support capability prediction system for demand-side resources according to claim 13, characterized in that: After obtaining the prediction result, the result prediction module further includes: The forecast results are written into a preset report template to generate a report on the elastic support capacity of demand-side resources.
23. The elastic support capacity prediction system for demand-side resources according to claim 13, characterized in that: The historical electricity consumption data in the input module includes the user's electricity load and electricity consumption.
24. The elastic support capability prediction system for demand-side resources according to claim 13, characterized in that: The indicators in the indicator prediction include one or more of the following: Response time, adjustment rate, adjustable resources, adjustment accuracy and reliability.
25. A computer device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the elastic support capacity prediction method for demand-side resources as described in any one of claims 1 to 12 is implemented.
26. A computer-readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, the elastic support capacity prediction method for demand-side resources as described in any one of claims 1 to 12 is implemented.