Training method, device and equipment of power grid response resource input value prediction model
By generating adversarial networks to expand real-world grid scenario data and training prediction models, the problem of difficulty in predicting resource input values in grid response is solved, achieving more accurate resource input value prediction and supporting users in rationally planning grid response.
Patent Information
- Application Number
- CN202510917005.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-11-04
AI Technical Summary
Existing technologies are unable to effectively predict the value of user resource input in grid response, making it difficult for users to rationally plan their participation in grid response.
Generative adversarial networks are used to expand the sample power grid real-world scenario data to generate expanded power grid real-world scenario data. The initial prediction model is then trained using the data generated by the generative adversarial network to obtain the first and second prediction models for predicting resource input values.
By expanding data and training models, the accuracy and reliability of resource input value predictions have been improved, helping users to better plan grid response.
Smart Images

Figure CN120893288A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power grids, and in particular to a method and device for training a power grid response resource input value prediction model. BACKGROUND
[0002] Power grid response refers to a mechanism in which various subjects react to changes in power supply and demand, frequency fluctuations, fault risks, etc. by adjusting power consumption or power generation behavior to maintain stable operation of the power system. Since user participation in power grid response may affect the production and operation of the user, it is necessary to predict the resource input value of the user when participating in power grid response, so that the user can better plan to participate in power grid response according to the predicted resource input value.
[0003] However, due to the small amount of actual power grid response data, there is a problem in the prior art that it is difficult to predict the resource input value of the user participating in power grid response. SUMMARY
[0004] Therefore, it is necessary to provide a method and device for training a power grid response resource input value prediction model that can predict the resource input value of the user participating in power grid response.
[0005] In a first aspect, the present application provides a method for training a power grid response resource input value prediction model, comprising:
[0006] The generative adversarial network is used to expand the sample power grid actual scene data to generate expanded power grid actual scene data; the sample power grid actual scene data is quantifiable data generated by an industrial user when participating in power grid response;
[0007] For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0008] A second initial prediction model is trained using a second training sample to obtain a second prediction model; the second prediction model is used to predict the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample prediction value of the different types of resource input values obtained by the different types of first prediction models and the actual combination value of the different types of resource input values.
[0009] In one embodiment, the method further comprises:
[0010] determining a correlation coefficient between the resource input value of each type and other types of sample variable matrices to obtain a coefficient matrix of the resource input value of each type;
[0011] According to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value, a sample feature matrix of each type of resource input value is obtained.
[0012] In one embodiment, the first initial prediction model is trained using the first training sample to obtain a first prediction model of different types of resource input values, including:
[0013] For each type of resource input value, a training step is performed to obtain a first prediction model of different types of resource input values; the training step includes: inputting the sample feature matrix of a certain type of resource input value into the corresponding first initial prediction model to obtain the sample predicted value of the certain type of resource input value; training the first initial prediction model corresponding to the certain type of resource input value according to the sample predicted value of the certain type of resource input value and the actual resource input value to obtain the first prediction model of the certain type of resource input value.
[0014] In one embodiment, the second initial prediction model is trained using the second training sample to obtain a second prediction model, including:
[0015] According to the sample predicted value of each type of resource input value and the preset weight coefficient, a sample combined predicted value of each type of resource input value is determined;
[0016] The difference between the sample combined predicted value and the combined actual value of each type of resource input value is determined as an actual difference value;
[0017] The sample predicted value of each type of resource input value is input into the second initial prediction model to obtain a sample prediction difference value between the sample predicted value of the combination of each type of resource input value and the actual value of the combination of each type of resource input value;
[0018] According to the sample prediction difference value and the actual difference value, the second initial prediction model is trained to obtain the second prediction model.
[0019] In one embodiment, the preset weight coefficient is optimized by using a particle swarm algorithm on an initial weight coefficient, and is determined in a case where the difference between the predicted value and the actual value of the power grid response resource input value is minimum.
[0020] In one embodiment, the method further includes:
[0021] for each type of resource input value, input a variable matrix of the each type of resource input value into a corresponding first prediction model to obtain a predicted value of the each type of resource input value;
[0022] input the predicted value of the each type of resource input value into the second prediction model to obtain a predicted difference value between the predicted value of the combination of the each type of resource input value and the actual value of the combination of the each type of resource input value;
[0023] determine a combined predicted value of the each type of resource input value according to the predicted value of the each type of resource input value and a preset weight coefficient;
[0024] determine the sum of the combined predicted value and the predicted difference value as a power grid response resource input value when an industrial user performs power grid response.
[0025] In a second aspect, the present application further provides a training device of a power grid response resource input value prediction model, comprising:
[0026] an expansion module configured to expand sample power grid actual scene data by using a generative adversarial network to generate expanded power grid actual scene data; the sample power grid actual scene data is quantifiable data generated when an industrial user performs power grid response;
[0027] a first training module configured to train a first initial prediction model by using a first training sample for each type of resource input value to obtain a first prediction model of different types of resource input values; the first training sample comprises a sample feature matrix of the each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0028] a second training module configured to train a second initial prediction model by using a second training sample to obtain a second prediction model; the second prediction model is used to predict a difference value between a sample predicted value of a combination of the different types of resource input values and an actual value of the combination of the different types of resource input values; the second training sample comprises the sample predicted value of the different types of resource input values obtained by the different types of first prediction models and the actual combined value of the different types of resource input values.
[0029] In a third aspect, the present application further provides a computer device comprising a memory and a processor; the memory stores a computer program; and the processor realizes the following steps when executing the computer program:
[0030] The sample power grid actual scene data is quantifiable data generated when an industrial user responds to a power grid.
[0031] For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0032] A second prediction model is obtained by training a second initial prediction model using a second training sample; the second prediction model is used to predict the difference between the sample predicted value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample predicted value of the different types of resource input values obtained by the different types of first prediction models and the actual combination value of the different types of resource input values.
[0033] In a fourth aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the following steps:
[0034] The sample power grid actual scene data is quantifiable data generated when an industrial user responds to a power grid.
[0035] For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0036] A second prediction model is obtained by training a second initial prediction model using a second training sample; the second prediction model is used to predict the difference between the sample predicted value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample predicted value of the different types of resource input values obtained by the different types of first prediction models and the actual combination value of the different types of resource input values.
[0037] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which is executed by a processor to implement the following steps:
[0038] The sample power grid actual scene data is quantifiable data generated when an industrial user performs power grid response.
[0039] For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0040] A second initial prediction model is trained using a second training sample to obtain a second prediction model; the second prediction model is used to predict the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample prediction value of the different types of resource input values obtained by the different types of first prediction models and the actual combination value of the different types of resource input values.
[0041] The training method, device and equipment of the power grid response resource input value prediction model, by obtaining quantifiable sample power grid actual scene data generated when an industrial user performs power grid response, then using a generative adversarial network to expand the sample power grid actual scene data, the data amount of the sample power grid actual scene data can be expanded, so that the first training sample of each type of resource input value including the sample feature matrix and the actual resource input value when performing power grid response can be determined using the generated expanded power grid actual scene data, so that for each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values, then the sample prediction value of different types of resource input values is obtained using different types of first prediction models, and then the second initial prediction model is trained using the sample prediction value of different types of resource input values and the actual combination value of different types of resource input values to obtain a second prediction model for predicting the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values, and then the first prediction model and the second prediction model obtained by training can be used to predict the resource input value of the power grid response. BRIEF DESCRIPTION OF DRAWINGS
[0042] In order to make the technical solutions in the embodiments of the present application or the related art clearer, the accompanying drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other related drawings can be obtained without any creative effort based on these drawings.
[0043] Figure 1 A flowchart of a training method of a power grid response resource input value prediction model in an embodiment is shown in FIG. 1.
[0044] Figure 2 A flowchart of a training method of a power grid response resource input value prediction model in another embodiment is shown in FIG. 2.
[0045] Figure 3 A flowchart of a training method of a power grid response resource input value prediction model in another embodiment is shown in FIG. 3.
[0046] Figure 4 A flowchart of a training method of a power grid response resource input value prediction model in another embodiment is shown in FIG. 4.
[0047] Figure 5 A block diagram of a training device of a power grid response resource input value prediction model in an embodiment is shown in FIG. 5.
[0048] Figure 6 An internal structure diagram of a computer device in an embodiment is shown in FIG. 6. DETAILED DESCRIPTION
[0049] In order to make the technical solutions in the embodiments of the present application or the related art clearer, the accompanying drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other related drawings can be obtained without any creative effort based on these drawings.
[0050] It should be noted that the terms "first", "second", and the like used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" and any variations thereof used in the present application are intended to cover non-exclusive inclusion. The term "multiple" used in the present application refers to two or more. The term "and / or" used in the present application refers to one of the options or any combination of multiple options.
[0051] In an embodiment, as shown in FIG. 1, the training method of the power grid response resource input value prediction model includes the following steps. Figure 1As shown, a method for training a power grid response resource input value prediction model is provided. In this embodiment, the method is applied to a computer device. It should be understood that the method can also be applied to a server, and can also be applied to a system including a computer device and a server, and can be implemented through the interaction of the computer device and the server. In this embodiment, the method includes the following steps:
[0052] In S201, the sample power grid actual scenario data is expanded by using a generative adversarial network to generate expanded power grid actual scenario data. The sample power grid actual scenario data is quantifiable data generated by an industrial user when performing power grid response.
[0053] The power grid response refers to the mechanism by which an industrial user reacts to changes in power supply and demand, frequency fluctuations, fault risks, etc. by adjusting power consumption or power generation behavior to maintain stable operation of the power system.
[0054] In this embodiment, the sample power grid actual scenario data and the actual resource input value of each type of resource input value are obtained from the data recorded by the industrial user when performing power grid response. For example, the sample power grid actual scenario data can include primary index data and secondary index data. The power grid actual scenario data can include transformation investment resource input value, equipment operation and maintenance resource input value, response additional energy consumption resource input value, yield, worker overtime cost, response compensation, response period power saving, worker comfort resource input value, default risk, response compensation history response data of the industrial user, transformation resource input value, operation resource input value, human resource input value, opportunity resource input value, response income, etc. The index system of the power grid response resource input value is explained below by Table 1.
[0055] For example, in this embodiment, the sample power grid actual scenario data can be formed into a feature matrix. For example, the sample power grid actual scenario data includes 13 different types of resource input values, and each type of resource input value includes n data. Therefore, the size of the feature matrix can be n*13. Then, the generated matrix is input into the generative adversarial network. The sample power grid actual scenario data is expanded by the generative adversarial network, effectively solving the problem of insufficient power grid actual scenario data and improving the data basis quality of model training.
[0056] Table 1
[0057]
[0058] S202, for each type of resource input value, the first initial prediction model is trained using the first training sample to obtain the first prediction model for different types of resource input values; the first training sample includes the sample feature matrix and the actual resource input value for each type of resource input value; the sample feature matrix is determined based on the actual scenario data of the expansion power grid.
[0059] In this embodiment, a sample feature matrix for each type of resource input value can be determined based on the aforementioned data from the actual scenario of the expanded power grid. Then, the sample feature matrix and the actual resource input value for each type of resource input value are used as the first training samples. The first initial prediction model is trained using these first training samples to obtain a first prediction model for different types of resource input values. Optionally, the first initial prediction model in this embodiment can be a gated recurrent unit network.
[0060] For example, in this embodiment, for different types of resource input values, the Pearson coefficient can be used to calculate the correlation coefficient between different types of resource input values and input features. Based on the correlation coefficient, different input features are weighted to obtain a sample feature matrix for each type of resource input value.
[0061] S203, the second initial prediction model is trained using the second training samples to obtain the second prediction model; the second prediction model is used to predict the difference between the sample predicted value of different types of resource input value combinations and the actual value of different types of resource input value combinations; the second training samples include the sample predicted values of different types of resource input values obtained through different types of first prediction models and the actual combination values of different types of resource input values.
[0062] In this embodiment, firstly, sample predicted values of different types of resource input values can be obtained through different types of first prediction models. Then, the sample predicted values of different types of resource input values and the actual combined values of different types of resource input values are used as second training samples. For example, in this embodiment, the combined predicted value of the sample predicted values of different types of resource input values can be calculated first, and then the difference between the combined predicted value and the actual combined value can be calculated. This difference is used as the gold standard of the second initial prediction model to train the second initial prediction model and obtain the second prediction model.
[0063] In the training method of the power grid response resource input value prediction model, quantifiable sample power grid actual scene data generated when the industrial user performs power grid response is obtained, and then the generative adversarial network is used to expand the sample power grid actual scene data, so that the data amount of the sample power grid actual scene data can be expanded, so that the first training sample including the sample feature matrix of each type of resource input value and the actual resource input value when performing power grid response can be determined, so that the first initial prediction model can be trained by using the first training sample for each type of resource input value, and the first prediction model of different types of resource input values is obtained. Then, the sample prediction value of different types of resource input values is obtained by using different types of first prediction models, and the second initial prediction model is trained by using the sample prediction value of different types of resource input values and the actual combination value of different types of resource input values, and the second prediction model for predicting the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values is obtained. Then, the first prediction model and the second prediction model obtained by training can be used to predict the resource input value of the power grid response.
[0064] In this embodiment, the acquisition process of the sample feature matrix of each type of resource input value will be explained. In an exemplary embodiment, as shown in Figure 2 The method further includes:
[0065] S301, for each type of resource input value, determine the correlation coefficient between the resource input value and other types of sample variable matrices to obtain a coefficient matrix of each type of resource input value.
[0066] In this embodiment, for each type of resource input value, the correlation coefficient between the other types of sample variable matrices related to the resource input value can be determined to obtain a coefficient matrix of each type of resource input value.
[0067] Exemplarily, taking the transformation resource input value as an example, the other types of resource input values related to the transformation resource input value can include transformation investment resource input value, equipment operation and maintenance resource input value, response additional energy resource input value, worker overtime cost, yield rate, response compensation, response period electricity saving, etc.
[0068] Wherein, the calculation formula of the correlation coefficient between the transformation resource input value and the transformation investment resource input value matrix can be as follows, wherein, denotes the correlation coefficient between the transformation resource input value and the transformation investment resource input value matrix, denotes the first data of the transformation investment resource input value, denotes the mean of the transformation investment resource input value, the first data representing the transformed resource input value, the mean value representing the transformed resource input value.
[0069]
[0070] The formula for calculating the correlation coefficient between the transformed resource input value and other types of sample variable matrices is similar to the above formula, and examples are not listed one by one in this embodiment.
[0071] Further, after determining the correlation coefficient between the transformed resource input value and other types of sample variable matrices, the obtained correlation coefficient can be constructed into a matrix to obtain the coefficient matrix of the transformed resource input value. Similarly, for other types of resource input values, the above calculation method can be used to obtain the coefficient matrix of other types of resource input values.
[0072] S302, according to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value, obtaining the sample feature matrix of each type of resource input value.
[0073] Exemplarily, in this embodiment, for each type of resource input value, the product of the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value can be determined as the sample feature matrix of each type of resource input value. Exemplarily, assuming that the sample variable matrix of the transformed resource input value is , the coefficient matrix of the transformed resource input value is , then the sample feature matrix of the transformed resource input value is .
[0074] In this embodiment, for each type of resource input value, by determining the correlation coefficient between each type of resource input value and other types of sample variable matrices, the coefficient matrix of each type of resource input value can be accurately obtained, so that the sample feature matrix of each type of resource input value can be accurately obtained according to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value.
[0075] The training process of the first initial prediction model will be explained in this embodiment. In an exemplary embodiment, S202 described above includes:
[0076] Step A, for each type of resource input value, performing a training step to obtain a first prediction model of different types of resource input values; the training step includes: inputting a sample feature matrix of a certain type of resource input value into a corresponding first initial prediction model to obtain a sample predicted value of the certain type of resource input value; training the first initial prediction model corresponding to the certain type of resource input value according to the sample predicted value and the actual resource input value of the certain type of resource input value to obtain the first prediction model of the certain type of resource input value.
[0077] In this embodiment, for each type of resource input value, a training step can be performed to obtain a first prediction model of different types of resource input values. Illustratively, the training step in this embodiment can include the following steps:
[0078] Step B, inputting a sample feature matrix of a certain type of resource input value into a corresponding first initial prediction model to obtain a sample predicted value of the certain type of resource input value.
[0079] Step C, training the first initial prediction model corresponding to the certain type of resource input value according to the sample predicted value and the actual resource input value of the certain type of resource input value to obtain the first prediction model of the certain type of resource input value.
[0080] The certain type of resource input value in this embodiment refers to any type of resource input value among different types of resource input values. Next, taking the transformation resource input value as an example, a sample feature matrix of the transformation resource input value can be input into a corresponding first initial prediction model to obtain a sample predicted value of the transformation resource input value, and then the first initial prediction model corresponding to the transformation resource input value can be trained according to the sample predicted value of the transformation resource input value and the actual resource input value of the transformation resource input value to obtain the first prediction model of the transformation resource input value.
[0081] In this embodiment, for each type of resource input value, by inputting a sample feature matrix of the type of resource input value into a corresponding first initial prediction model, a sample predicted value of the type of resource input value can be obtained, so that the first initial prediction model corresponding to the type of resource input value can be accurately trained according to the sample predicted value and the actual resource input value of the type of resource input value, thereby ensuring the accuracy of the first prediction model corresponding to each type of resource input value obtained.
[0082] The training process of the second initial prediction model will be explained in this embodiment. In an exemplary embodiment, as shown in Figure 3 S203 includes:
[0083] S401, determine a sample combined prediction value of each type of resource input value according to the sample prediction value of each type of resource input value and a preset weight coefficient.
[0084] Optionally, in the embodiment, the sample combined prediction value of each type of resource input value can be determined by weighting and summing the sample prediction value of each type of resource input value according to the sample prediction value of each type of resource input value and a preset weight coefficient. For example, the sample combined prediction value is determined as C1=u*Cre,pre+v*Cop,pre+w*Chu,pre+x*Cch,pre+y*Cpro,pre, where u, v, w, x, and y are preset weight coefficients corresponding to different types of resource input values, and the sample prediction values of different types of resource input values include the sample prediction value Cre,pre of transformation resource input value, the sample prediction value Cop,pre of operation resource input value, the sample prediction value Chu,pre of human resource input value, the sample prediction value Cch,pre of opportunity resource input value, and the sample prediction value Cpro,pre of response revenue.
[0085] Optionally, the preset weight coefficient in the embodiment can be determined by optimizing the initial weight coefficient by using a particle swarm algorithm, and the weight coefficient is determined when the difference between the prediction value and the actual value of the grid response resource input value is minimum. That is, when the initial weight coefficient is optimized by using the particle swarm algorithm, the optimization target of the particle swarm algorithm is to minimize the mean square error value between the response resource input value calculated by the model and the actual response resource input value, where is the first data of the response resource input value, is the mean value of the response resource input value.
[0086] S402, determine the actual difference value as the difference between the sample combined prediction value and the combined actual value of each type of resource input value.
[0087] In the embodiment, the combined actual value of each type of resource input value can also be determined according to the preset weight coefficient and the actual value of each type of resource input value, and then the actual difference value is determined as the difference between the sample combined prediction value and the combined actual value of each type of resource input value.
[0088] S403, input the sample prediction value of each type of resource input value into the second initial prediction model to obtain the sample prediction difference value between the sample prediction value of each type of resource input value combination and the actual value of each type of resource input value combination.
[0089] In the embodiment, the sample predicted value of each type of resource input value can be input into the second initial prediction model, and the sample prediction difference between the sample predicted value of each type of resource input value combination and the actual value of each type of resource input value combination can be predicted by the second initial prediction model.
[0090] In S404, the second initial prediction model is trained according to the sample prediction difference and the actual difference, and the second prediction model is obtained.
[0091] In the embodiment, the actual difference can be used as the gold standard data, the value of the loss function of the second initial prediction model can be calculated by the sample prediction difference and the actual difference, and then the second initial prediction model is trained by using the value of the loss function, and the second prediction model is obtained.
[0092] In the embodiment, the process of determining the sample combination predicted value of each type of resource input value according to the sample predicted value of each type of resource input value and the preset weight coefficient is relatively simple, and the sample combination predicted value can be quickly determined, so that the difference between the sample combination predicted value and the actual value of each type of resource input value combination can be quickly determined as the actual difference. The process of inputting the sample predicted value of each type of resource input value into the second initial prediction model to obtain the sample prediction difference between the sample predicted value of each type of resource input value combination and the actual value of each type of resource input value combination is also relatively simple, so that the second initial prediction model can be quickly trained according to the sample prediction difference and the actual difference, and the efficiency of obtaining the second prediction model is ensured.
[0093] After the first prediction model and the second prediction model are trained, the first prediction model and the second prediction model can be used to predict the grid response resource input value when the industrial user responds to the grid. In an exemplary embodiment, as shown in Figure 4 The method further includes:
[0094] In S501, for each type of resource input value, a variable matrix of each type of resource input value is input into the corresponding first prediction model to obtain a predicted value of each type of resource input value.
[0095] In the embodiment, the variable matrix of each type of resource input value can be obtained when the industrial user performs the grid response. Optionally, the different types of resource input values in the embodiment can include a retrofit investment resource input value, a device operation and maintenance resource input value, a response additional energy consumption resource input value, a yield rate, a worker overtime cost, a response compensation, a response period electricity saving amount, a worker comfort resource input value, a default risk, a historical response data of the response compensation of the industrial user participating in the response, a retrofit resource input value, an operation resource input value, a human resource input value, an opportunity resource input value, a response benefit, and the like.
[0096] In the embodiment, different types of resource input values correspond to different first prediction models. After obtaining the variable matrix of each type of resource input value, the variable matrix of each type of resource input value can be input into the corresponding first prediction model to obtain the predicted value of each type of resource input value.
[0097] S502, input the predicted value of each type of resource input value into the second prediction model to obtain the prediction difference between the predicted value of each type of resource input value combination and the actual value of each type of resource input value combination.
[0098] In the embodiment, the obtained predicted value of each type of resource input value can be input into the second prediction model to predict the prediction difference between the predicted value of each type of resource input value combination and the actual value of each type of resource input value combination.
[0099] S503, determine the combined predicted value of each type of resource input value according to the predicted value of each type of resource input value and a preset weight coefficient.
[0100] In the embodiment, the preset weight coefficient can be a weight coefficient determined in the training process. For example, the weighted sum of the predicted value of each type of resource input value and the corresponding preset weight coefficient can be determined as the combined predicted value of each type of resource input value.
[0101] S504, determine the sum of the combined predicted value and the prediction difference as the grid response resource input value when the industrial user performs the grid response.
[0102] In the embodiment, the sum of the combined predicted value of each type of resource input value determined above and the prediction difference input into the second prediction model can be determined as the grid response resource input value when the industrial user performs the grid response.
[0103] In this embodiment, for each type of resource input value, the variable matrix of each type of resource input value is input into the corresponding first prediction model, the prediction value of each type of resource input value can be accurately obtained through the first prediction model, the prediction value of each type of resource input value is input into the second prediction model, the prediction difference between the prediction value of each type of resource input value combination and the actual value of each type of resource input value combination can be accurately obtained through the second prediction model, and then the combination prediction value of each type of resource input value can be accurately determined according to the prediction value of each type of resource input value and the preset weight coefficient, thereby ensuring the accuracy of the sum of the combination prediction value and the prediction difference as the power grid response resource input value when the industrial user performs power grid response.
[0104] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or stages. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.
[0105] Based on the same inventive concept, the present application also provides a power grid response resource input value prediction model training device for implementing the power grid response resource input value prediction model training method described above. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more power grid response resource input value prediction model training device embodiments provided below can refer to the limitations of the power grid response resource input value prediction model training method described above, which will not be repeated here.
[0106] In one exemplary embodiment, as shown in Figure 5 A power grid response resource input value prediction model training device is provided, comprising: an expansion module, a first training module and a second training module, wherein:
[0107] The expansion module is configured to expand the sample power grid actual scene data using a generative adversarial network to generate expanded power grid actual scene data; the sample power grid actual scene data is quantifiable data generated when the industrial user performs power grid response.
[0108] The first training module is configured to train the first initial prediction model by using first training samples for each type of resource input value, to obtain first prediction models of different types of resource input values; the first training samples include a sample feature matrix of each type of resource input value and an actual resource input value; and the sample feature matrix is determined according to the expanded power grid actual scene data.
[0109] The second training module is configured to train the second initial prediction model by using second training samples, to obtain a second prediction model; the second prediction model is used to predict a difference value between a sample prediction value of a combination of different types of resource input values and an actual value of the combination of different types of resource input values; and the second training samples include the sample prediction value of the different types of resource input values obtained by the different types of first prediction models and the actual combination value of the different types of resource input values.
[0110] The training device for the power grid response resource input value prediction model provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0111] On the basis of the above-mentioned embodiments, the device can further include a first determining module and a first obtaining module; wherein:
[0112] The first determining module is configured to determine, for each type of resource input value, a correlation coefficient between the resource input value and other types of sample variable matrices, to obtain a coefficient matrix of each type of resource input value.
[0113] The first obtaining module is configured to obtain, according to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value, a sample feature matrix of each type of resource input value.
[0114] The training device for the power grid response resource input value prediction model provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0115] On the basis of the above-mentioned embodiments, the first training module can include a first training unit, wherein:
[0116] The first training unit is configured to perform a training step for each type of resource input value to obtain a first prediction model of different types of resource input values; the training step comprises: inputting a sample feature matrix of a certain type of resource input value into a corresponding first initial prediction model to obtain a sample predicted value of the certain type of resource input value; and training the first initial prediction model corresponding to the certain type of resource input value according to the sample predicted value of the certain type of resource input value and an actual resource input value to obtain the first prediction model of the certain type of resource input value.
[0117] The training device for the power grid response resource input value prediction model provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0118] On the basis of the above embodiment, the second training module comprises a first determination unit, a second determination unit, an acquisition unit and a second training unit.
[0119] The first determination unit is configured to determine a sample combined predicted value of each type of resource input value according to the sample predicted value of each type of resource input value and a preset weight coefficient.
[0120] The second determination unit is configured to determine a difference between the sample combined predicted value and a combined actual value of each type of resource input value as an actual difference.
[0121] The acquisition unit is configured to input the sample predicted value of each type of resource input value into the second initial prediction model to obtain a sample prediction difference between the sample predicted value of each type of resource input value combination and the actual value of each type of resource input value combination.
[0122] The second training unit is configured to train the second initial prediction model according to the sample prediction difference and the actual difference to obtain the second prediction model.
[0123] Optionally, the preset weight coefficient is determined by optimizing an initial weight coefficient by using a particle swarm algorithm in a case where a difference between a predicted value and an actual value of the power grid response resource input value is minimum.
[0124] The training device for the power grid response resource input value prediction model provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0125] On the basis of the above embodiment, the device further comprises a second acquisition module, a third acquisition module, a second determination module and a third determination module.
[0126] The second obtaining module is configured to input a variable matrix of each type of resource input value into a corresponding first prediction model to obtain a predicted value of each type of resource input value.
[0127] The third obtaining module is configured to input the predicted value of each type of resource input value into a second prediction model to obtain a predicted difference value between a predicted value of each type of resource input value combination and an actual value of each type of resource input value combination.
[0128] The second determining module is configured to determine a combined predicted value of each type of resource input value according to the predicted value of each type of resource input value and a preset weight coefficient.
[0129] The third determining module is configured to determine a sum of the combined predicted value and the predicted difference value as a power grid response resource input value when an industrial user performs power grid response.
[0130] The training device of the power grid response resource input value prediction model provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0131] The modules in the training device of the power grid response resource input value prediction model can be all or partially implemented by software, hardware, and combinations thereof. The modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0132] In an exemplary embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 6 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store sample power grid actual scene data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a training method of a power grid response resource input value prediction model.
[0133] Those skilled in the art can understand that Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0134] In one exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0135] The sample power grid actual scene data is quantifiable data generated when an industrial user performs power grid response.
[0136] For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0137] A second training sample is used to train a second initial prediction model to obtain a second prediction model; the second prediction model is used to predict the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample prediction value of different types of resource input values obtained by different types of first prediction models and the actual combination value of different types of resource input values.
[0138] In one embodiment, the processor further implements the following steps when executing the computer program:
[0139] For each type of resource input value, a correlation coefficient between the resource input value and other types of sample variable matrices is determined to obtain a coefficient matrix of each type of resource input value;
[0140] According to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value, a sample feature matrix of each type of resource input value is obtained.
[0141] In one embodiment, the processor further implements the following steps when executing the computer program:
[0142] The training step is performed for each type of resource input value to obtain a first prediction model of different types of resource input values; the training step includes: inputting a sample feature matrix of a certain type of resource input value into a corresponding first initial prediction model to obtain a sample predicted value of the certain type of resource input value; training the first initial prediction model corresponding to the certain type of resource input value according to the sample predicted value and the actual resource input value of the certain type of resource input value to obtain the first prediction model of the certain type of resource input value.
[0143] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0144] According to the sample predicted value of each type of resource input value and the preset weight coefficient, a sample combined predicted value of each type of resource input value is determined;
[0145] The difference between the sample combined predicted value and the combined actual value of each type of resource input value is determined as the actual difference value;
[0146] The sample predicted value of each type of resource input value is input into the second initial prediction model to obtain a sample prediction difference value between the sample predicted value of the combination of each type of resource input value and the actual value of the combination of each type of resource input value;
[0147] The second initial prediction model is trained according to the sample prediction difference value and the actual difference value to obtain a second prediction model.
[0148] Optionally, the preset weight coefficient is optimized by using a particle swarm algorithm on an initial weight coefficient, and is determined in a case where the difference between the predicted value and the actual value of the grid response resource input value is minimum.
[0149] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0150] For each type of resource input value, a variable matrix of each type of resource input value is input into a corresponding first prediction model to obtain a predicted value of each type of resource input value;
[0151] The predicted value of each type of resource input value is input into a second prediction model to obtain a prediction difference value between the predicted value of the combination of each type of resource input value and the actual value of the combination of each type of resource input value;
[0152] According to the predicted value of each type of resource input value and the preset weight coefficient, a combined predicted value of each type of resource input value is determined;
[0153] The sum of the combined predicted value and the prediction difference value is determined as the grid response resource input value when the industrial user performs grid response.
[0154] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the following steps:
[0155] The sample power grid actual scene data is quantifiable data generated when an industrial user performs power grid response.
[0156] For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0157] A second training sample is used to train a second initial prediction model to obtain a second prediction model; the second prediction model is used to predict the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample prediction value of different types of resource input values obtained by different types of first prediction models and the actual combination value of different types of resource input values.
[0158] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0159] For each type of resource input value, a correlation coefficient between the resource input value and other types of sample variable matrices is determined to obtain a coefficient matrix of each type of resource input value;
[0160] According to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value, a sample feature matrix of each type of resource input value is obtained.
[0161] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0162] For each type of resource input value, a training step is performed to obtain a first prediction model of different types of resource input values; the training step includes: inputting the sample feature matrix of a certain type of resource input value into the corresponding first initial prediction model to obtain the sample prediction value of the certain type of resource input value; according to the sample prediction value and the actual resource input value of the certain type of resource input value, the first initial prediction model corresponding to the certain type of resource input value is trained to obtain the first prediction model of the certain type of resource input value.
[0163] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0164] determine a sample combined prediction value of each type of resource input value according to the sample prediction value of each type of resource input value and the preset weight coefficient;
[0165] determine an actual difference value as a difference between the sample combined prediction value and a combined actual value of each type of resource input value;
[0166] input the sample prediction value of each type of resource input value into the second initial prediction model to obtain a sample prediction difference value between the sample prediction value of each type of resource input value combination and the actual value of each type of resource input value combination;
[0167] train the second initial prediction model according to the sample prediction difference value and the actual difference value to obtain a second prediction model.
[0168] Optionally, the preset weight coefficient is determined by optimizing an initial weight coefficient by using a particle swarm algorithm in a case that a difference between a prediction value and an actual value of a grid response resource input value is minimum.
[0169] In an embodiment, the computer program, when executed by the processor, further implements the following steps:
[0170] for each type of resource input value, input a variable matrix of each type of resource input value into a corresponding first prediction model to obtain a prediction value of each type of resource input value;
[0171] input the prediction value of each type of resource input value into a second prediction model to obtain a prediction difference value between the prediction value of each type of resource input value combination and the actual value of each type of resource input value combination;
[0172] determine a combined prediction value of each type of resource input value according to the prediction value of each type of resource input value and the preset weight coefficient;
[0173] determine a grid response resource input value when an industrial user performs grid response as a sum of the combined prediction value and the prediction difference value.
[0174] In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:
[0175] generate augmented grid actual scene data by using a generative adversarial network to augment sample grid actual scene data; the sample grid actual scene data is quantifiable data generated when an industrial user performs grid response;
[0176] The first initial prediction model is trained by using the first training sample for each type of resource input value, to obtain the first prediction model of different types of resource input values; the first training sample includes a sample feature matrix of each type of resource input value and an actual resource input value; the sample feature matrix is determined according to the expanded power grid actual scene data;
[0177] The second training sample is used to train the second initial prediction model, to obtain the second prediction model; the second prediction model is used to predict the difference between the sample prediction value of the combination of different types of resource input values and the actual value of the combination of different types of resource input values; the second training sample includes the sample prediction value of different types of resource input values obtained by the first prediction model of different types and the actual combination value of different types of resource input values.
[0178] In one embodiment, the computer program is further implemented when executed by the processor to implement the following steps:
[0179] For each type of resource input value, a correlation coefficient between the resource input value and other types of sample variable matrices is determined, to obtain a coefficient matrix of each type of resource input value;
[0180] According to the sample variable matrix of each type of resource input value and the coefficient matrix of each type of resource input value, a sample feature matrix of each type of resource input value is obtained.
[0181] In one embodiment, the computer program is further implemented when executed by the processor to implement the following steps:
[0182] For each type of resource input value, the training step is performed to obtain the first prediction model of different types of resource input values; the training step includes: inputting the sample feature matrix of a certain type of resource input value into the corresponding first initial prediction model to obtain the sample prediction value of the certain type of resource input value; according to the sample prediction value and the actual resource input value of the certain type of resource input value, the first initial prediction model corresponding to the certain type of resource input value is trained to obtain the first prediction model of the certain type of resource input value.
[0183] In one embodiment, the computer program is further implemented when executed by the processor to implement the following steps:
[0184] According to the sample prediction value of each type of resource input value and the preset weight coefficient, a sample combination prediction value of each type of resource input value is determined;
[0185] The difference between the sample combination prediction value and the combination actual value of each type of resource input value is determined as the actual difference value;
[0186] inputting the sample predicted value of each type of resource input value into the second initial prediction model to obtain a sample prediction difference value between the sample predicted value of each type of resource input value combination and the actual value of each type of resource input value combination;
[0187] training the second initial prediction model according to the sample prediction difference value and the actual difference value to obtain a second prediction model.
[0188] Optionally, the preset weight coefficient is optimized by using a particle swarm algorithm to the initial weight coefficient, and is determined in a case that a difference value between the predicted value and the actual value of the power grid response resource input value is minimum.
[0189] In an embodiment, the computer program, when executed by the processor, further implements the following steps:
[0190] for each type of resource input value, inputting a variable matrix of each type of resource input value into a corresponding first prediction model to obtain a predicted value of each type of resource input value;
[0191] inputting the predicted value of each type of resource input value into the second prediction model to obtain a prediction difference value between the predicted value of each type of resource input value combination and the actual value of each type of resource input value combination;
[0192] determining a combination predicted value of each type of resource input value according to the predicted value of each type of resource input value and a preset weight coefficient;
[0193] determining a sum of the combination predicted value and the prediction difference value as the power grid response resource input value when the industrial user performs power grid response.
[0194] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0195] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.
[0196] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A training method for a power grid response resource input value prediction model, characterized in that, The method includes: Generative adversarial networks are used to augment the sample power grid real-world scenario data to generate augmented power grid real-world scenario data; the sample power grid real-world scenario data is quantifiable data generated by industrial users when responding to power grid changes; For each type of resource input value, a first initial prediction model is trained using a first training sample to obtain a first prediction model for different types of resource input values; the first training sample includes a sample feature matrix and the actual resource input value for each type of resource input value; the sample feature matrix is determined based on the actual scenario data of the expanded power grid; The second initial prediction model is trained using the second training samples to obtain the second prediction model; the second prediction model is used to predict the difference between the sample predicted value of the combination of resource input values of the different types and the actual value of the combination of resource input values of the different types; the second training samples include the sample predicted values of resource input values of the different types obtained by the first prediction model of different types and the actual combination value of resource input values of the different types.
2. The method according to claim 1, characterized in that, The method further includes: For each type of resource input value, determine the correlation coefficient between the resource input value and other types of sample variable matrices to obtain the coefficient matrix of each type of resource input value; Based on the sample variable matrix and coefficient matrix of each type of resource input value, the sample feature matrix of each type of resource input value is obtained.
3. The method according to claim 2, characterized in that, The step of training a first initial prediction model using a first training sample for each type of resource input value to obtain a first prediction model for different types of resource input values includes: For each type of resource input value, a training step is performed to obtain a first prediction model for the different types of resource input values. The training step includes: inputting the sample feature matrix of a certain type of resource input value into the corresponding first initial prediction model to obtain the sample prediction value of the certain type of resource input value; and training the first initial prediction model corresponding to the certain type of resource input value based on the sample prediction value of the certain type of resource input value and the actual resource input value to obtain the first prediction model of the certain type of resource input value.
4. The method according to claim 1, characterized in that, The step of training the second initial prediction model using the second training samples to obtain the second prediction model includes: Based on the sample predicted value of each type of resource input value and the preset weight coefficient, determine the sample combination predicted value of each type of resource input value; The difference between the predicted value of the sample combination and the actual value of the combination of each type of resource input value is determined as the actual difference. Input the sample predicted value of each type of resource input value into the second initial prediction model to obtain the sample prediction difference between the sample predicted value of each type of resource input value combination and the actual value of each type of resource input value combination. The second initial prediction model is trained based on the sample prediction difference and the actual difference to obtain the second prediction model.
5. The method according to claim 4, characterized in that, The preset weighting coefficients are determined by optimizing the initial weighting coefficients using a particle swarm optimization algorithm, with the difference between the predicted and actual values of the power grid response resource input values being minimized.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: For each type of resource input value, the variable matrix of each type of resource input value is input into the corresponding first prediction model to obtain the predicted value of each type of resource input value; The predicted value of each type of resource input value is input into the second prediction model to obtain the prediction difference between the predicted value of each type of resource input value combination and the actual value of each type of resource input value combination. Based on the predicted value of each type of resource input and the preset weighting coefficient, determine the combined predicted value of each type of resource input; The sum of the combined predicted value and the predicted difference is determined as the grid response resource input value when industrial users conduct grid response.
7. A training device for a power grid response resource input value prediction model, characterized in that, The device includes: An expansion module is used to expand the sample power grid real-world scenario data using a generative adversarial network to generate expanded power grid real-world scenario data; the sample power grid real-world scenario data is quantifiable data generated by industrial users when responding to power grid changes; The first training module is used to train the first initial prediction model using the first training samples for each type of resource input value, so as to obtain the first prediction model for different types of resource input values; the first training samples include the sample feature matrix and the actual resource input value for each type of resource input value; the sample feature matrix is determined based on the actual scenario data of the expanded power grid; The second training module is used to train the second initial prediction model using the second training samples to obtain the second prediction model; the second prediction model is used to predict the difference between the sample predicted value of the combination of resource input values of different types and the actual value of the combination of resource input values of different types; the second training samples include the sample predicted values of resource input values of different types obtained by the first prediction model of different types and the actual combination value of resource input values of different types.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.