Power consumption prediction model training method for household energy storage, electronic equipment and medium
By using the encrypted power consumption prediction model parameters in the home energy storage system for global optimization and local training, a personalized power consumption prediction model is built, which solves the problem of power consumption demand prediction caused by the differences in power consumption behaviors of different households, and achieves fast and accurate power consumption demand prediction and home energy management.
Patent Information
- Application Number
- CN202411912924.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-18
AI Technical Summary
How to quickly and accurately predict the personalized electricity needs of different families while ensuring family privacy, given the large differences in electricity use behaviors of different families.
A method of electricity prediction model training for household energy storage is proposed. By obtaining and aggregating the model parameters of the encrypted electricity prediction model, a global optimization model is constructed, and deploying it to each object for local training, updating the model parameters, obtaining the electricity consumption prediction model of other matching objects, and constructing the electricity consumption prediction model of the current object.
It realizes rapid and accurate prediction of the family's personalized electricity needs without revealing family privacy, and improves the accuracy and adaptability of the electricity usage prediction model.
Smart Images

Figure CN119852997A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of energy management technology, and in particular, relates to a method for training an electricity consumption prediction model for household energy storage, an electronic device, and a computer-readable storage medium. Background Art
[0002] As an efficient, clean and convenient secondary energy source, electricity is widely used in smart homes, distributed energy systems, electric vehicles and other fields, and has a broad application prospect. With the popularization of distributed energy in households, efficient home energy management is very important. Accurately predicting electricity demand can reduce electricity costs and reasonably plan electricity.
[0003] Since electricity usage behaviors vary greatly among different households, how to quickly and accurately predict the personalized electricity needs of different households while ensuring family privacy is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method for training a power consumption prediction model for household energy storage, a device for training a power consumption prediction model for household energy storage, an electronic device, a computer-readable storage medium, and a computer program product, which can quickly and accurately predict the personalized power consumption needs of different households.
[0005] In a first aspect, the present application provides a method for training a power consumption prediction model for household energy storage, comprising:
[0006] Obtain and aggregate the model parameters of the encrypted power consumption prediction model of each object to build a global optimization model;
[0007] Deploy the global optimization model to each of the objects, so that any target object among the objects performs local training based on a preset reinforcement learning algorithm, and updates model parameters of the global optimization model deployed to the target object;
[0008] Obtaining power consumption prediction models of other objects among the objects that match the current object;
[0009] Based on each of the power consumption prediction models matching the current object, a power consumption prediction model corresponding to the current object is constructed.
[0010] In a second aspect, the present application provides a power consumption prediction model training device for household energy storage, and the model training device includes a transfer learning module, a federated reinforcement learning module and a scheduling optimization module.
[0011] The transfer learning module is used to obtain the migration features of the power consumption prediction models of other objects matching the current object, and to construct the power consumption prediction model corresponding to the current object based on the migration features;
[0012] The federated reinforcement learning module is used to receive the model parameters transmitted by each object through a preset encryption mechanism, aggregate the received model parameters to construct a global optimization model, deploy the global optimization model to each object for local training, and update the model parameters of the global optimization model deployed to the target object;
[0013] The scheduling optimization module is used to predict electricity demand information based on the electricity prediction model and electricity data of the current object, and adjust the charging and discharging strategy of the energy storage device based on a preset objective function and the electricity demand information to minimize the electricity cost.
[0014] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned model training method when executing the program.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the above-mentioned model training method when executed by a processor.
[0016] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned model training method when executed by a processor.
[0017] The electricity consumption prediction model training method for household energy storage, the electricity consumption prediction model training device for household energy storage, the electronic device, the computer-readable storage medium and the computer program product provided in the embodiments of the present application, when the current object performs electricity demand forecasting for the first time or updates the electricity consumption prediction model when changing residence, constructs a global optimization model by acquiring and aggregating the model parameters of the electricity consumption prediction models encrypted by each object; deploys the global optimization model to each object so that any target object among the objects performs local training based on a preset reinforcement learning algorithm, and updates the model parameters of the global optimization model deployed to the target object; acquires the electricity consumption prediction models of other objects among the objects that match the current object; and constructs the electricity consumption prediction model corresponding to the current object based on the electricity consumption prediction models that match the current object.
[0018] What is acquired and aggregated are encrypted model parameters, so that there is no risk of leaking the privacy of each object in the process of building the global optimization model; deploying the global optimization model for continuous local training and continuously updating the model parameters of the global optimization model can improve the accuracy and adaptability of the global optimization model; the current object matches other objects, indicating that the power consumption of the current object is similar to that of other objects, and the power consumption prediction model corresponding to the current object constructed based on the power consumption prediction models of other objects matching the current object can accurately predict the personalized power consumption demand of the current object.
[0019] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0021] Figure 1 This is an application scenario diagram of the electricity consumption prediction model training method for household energy storage provided in an embodiment of the present application;
[0022] Figure 2 It is a first flow chart of a method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0023] Figure 3 It is a second flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0024] Figure 4 It is a third flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0025] Figure 5 It is a fourth flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0026] Figure 6 It is a fifth flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0027] Figure 7 It is a sixth flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0028] Figure 8 It is a seventh flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0029] Fig. 9 This is an eighth flow chart of the method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application;
[0030] Fig.10 It is a module schematic diagram of a power consumption prediction model training device for household energy storage provided in an embodiment of the present application;
[0031] Fig.11 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0033] For ease of understanding, the technical background and application scenarios of this application are first introduced below:
[0034] Electricity is an efficient, clean and convenient secondary energy source. The rapid development of new energy generation has delivered a large amount of electricity to the power grid. Smart grids can optimize the allocation of power resources, improve the efficiency and reliability of power grid operation, and better meet users' requirements for power quality and power supply stability. Energy storage technology is becoming increasingly mature and has been widely used in home energy storage, distributed energy projects, and grid-side energy storage.
[0035] With the continuous development of battery technology and inverter technology, the market size of home energy storage systems has grown rapidly. As the global energy structure transforms to renewable energy, the demand for home energy storage systems, as an important bridge connecting renewable energy and modern family life, will continue to grow.
[0036] Home energy storage systems can better reduce electricity costs while meeting the electricity needs of users. Quickly and accurately predicting users' electricity needs facilitates the optimization of electrical appliances and ensures electricity safety. Accurately predicting users' electricity needs combined with home energy storage systems can reasonably arrange the charging and discharging of energy storage equipment, achieve effective management and conservation of household energy, reduce unnecessary energy waste, and reduce household electricity costs.
[0037] Machine learning refers to the process by which a computer system can use experience (usually in the form of data) to automatically improve its performance. Machine learning algorithms can build a basic model by analyzing and learning from data. Fusion and integration of different machine learning models can improve the performance and generalization ability of the model. Generally, machine learning algorithms can build a basic model for electricity consumption prediction by analyzing and learning from users' electricity consumption data. Fusion and integration of different basic models for electricity consumption prediction can improve the performance and generalization ability of the model. See Figure 1 , Figure 1 1 is an application scenario diagram of a method for training a power consumption prediction model for household energy storage provided in an embodiment of the present application. The application scenario provided in the present application includes a server 100 and a terminal device 200.
[0038] The server can be an independent physical server or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN for short), as well as big data and artificial intelligence platforms, but the embodiments of the present application do not limit this.
[0039] Terminal equipment may include but is not limited to:
[0040] (1) Internet of Things devices: smart meters, robots, sensor devices (such as temperature sensors, humidity sensors, light sensors, etc.), actuator devices (smart light bulbs, smart sockets, electronic locks, etc.), embedded devices (smart TVs, smart speakers, smart refrigerators, etc.), vehicle-mounted devices (smart vehicles, vehicle-mounted navigation systems, etc.), etc., which are not limited to the embodiments of the present application.
[0041] (2) Other devices: smart phones (such as Android phones, IOS phones, etc.), tablet computers, laptops, desktop computers, smart speakers, smart watches, portable personal computers, mobile Internet devices (Mobile Internet Devices, referred to as MID), intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, wearable devices, etc., which are not limited to the embodiments of the present application.
[0042] The terminal device may be integrated with a client, which may be a client having the function of displaying data information such as text, images, audio and video, including but not limited to an instant messaging client (such as a personal instant messaging client (i.e., social software) or an enterprise instant messaging client (i.e., collaborative office software), etc.), a social client (e.g., a content publishing platform client), a browser client, a cloud service control client, an entertainment client (e.g., a game client), a multimedia client (e.g., a video client), an information client (e.g., a news client), a shopping client, a car client, etc. The client may be an independent client or an embedded sub-client integrated in a client (e.g., a social client), which is not limited here.
[0043] It should be noted that Figure 1 The number of servers and terminal devices is only used as an example, and the number of servers and terminal devices can be more or less, which is not limited here. The server and the terminal device can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0044] The model training method involved in this application can be implemented based on cloud technology.
[0045] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data calculation, storage, processing and sharing.
[0046] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0047] The electricity consumption prediction model training method for home energy storage of the present application can be implemented based on cloud computing. Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". The resources in the "cloud" are infinitely expandable in the eyes of users, and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0048] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0049] The method for training a power consumption prediction model for household energy storage in the embodiment of the present application can be executed by an electronic device, which can be at least one of a server and a terminal device, that is, the method can be executed by a server or a terminal device alone, or by a server and a terminal device together. Therefore, the execution subject of each step will not be repeatedly described below.
[0050] It should be noted that in the example of the electricity consumption prediction model training method for home energy storage below, the server execution model training method is used as an example for explanation. Those skilled in the art, based on their understanding of the following, can apply the electricity consumption prediction model training method for home energy storage provided in the embodiment of the present application to other types of scenarios (such as the terminal device executing the model training method, or the terminal device cooperating with the server to jointly execute the electricity consumption prediction model training method for home energy storage).
[0051] Based on the introduction of the above-mentioned related scenarios, the embodiment of the present application provides a method for training a power consumption prediction model for household energy storage. The following is a detailed introduction to the method for training a power consumption prediction model for household energy storage:
[0052] See also Figure 2 The present application embodiment provides a method for training a power consumption prediction model for household energy storage, which is implemented by steps 011, 012, 013 and 014, as described in detail below.
[0053] Step 011: Obtain and aggregate the model parameters of the encrypted electricity consumption prediction model of each object to build a global optimization model.
[0054] The objects may be other objects located in the same area as the current object or all other objects whose models have been constructed.
[0055] The global optimization model is a model used to find the optimal solution of the objective function in the entire feasible domain. The global optimization model can be an electricity consumption prediction model that adapts to the different electricity consumption demands of various objects.
[0056] Specifically, the model parameters of the power consumption prediction model of each object are obtained, and a global optimization model is constructed based on these model parameters. In this way, a global optimization model with strong generalization ability can be constructed.
[0057] In some embodiments, see Figure 7 , the model training method also includes step 015, which is described in detail below.
[0058] Step 012: deploy the global optimization model to each object, so that any target object among the objects is locally trained based on a preset reinforcement learning algorithm, and the model parameters of the global optimization model deployed to the target object are updated.
[0059] The preset reinforcement learning algorithm refers to a pre-set machine learning algorithm framework in the process of reinforcement learning. Optionally, the preset reinforcement learning algorithm can be an algorithm for reinforcement learning of the global optimization model.
[0060] Among them, local training refers to the process of training the machine learning model using locally stored data on a local device (such as a personal computer, a local server, etc.). Optionally, local training can be the process of training the global optimization model using the power consumption data of each object on a local terminal device.
[0061] Specifically, the global optimization model is deployed to each object, and any one or more target objects among the objects can locally train the global optimization model through a preset reinforcement learning algorithm, gradually iterating the training until convergence, and updating the model parameters of the global optimization model that has been deployed to the target object.
[0062] In this way, by training the global optimization model locally and updating the model parameters, the prediction accuracy of the global optimization model for various household electricity consumption behaviors can be improved.
[0063] Step 013: Obtaining power consumption prediction models of other objects that match each object with the current object;
[0064] Step 014: Based on the various power consumption prediction models matching the current object, a power consumption prediction model corresponding to the current object is constructed, wherein the current object is a user who needs to construct or update a power consumption prediction model.
[0065] Optionally, the current object may be a new user who is conducting electricity demand forecasting for the first time, or a user who needs to update the electricity forecasting model due to a change of residence or the like.
[0066] Among them, other objects are users who have built electricity consumption prediction models.
[0067] Specifically, the power consumption prediction model used by other objects with similar power consumption as the current object is obtained. According to the power consumption environment and power consumption habits of the current object, such as the number of power users, the types and quantity of electrical appliances used, the climate environment, and the daily routine, other objects with similar power consumption environments and power consumption habits as the current object are selected, and the power consumption prediction models of other objects are extracted.
[0068] In this way, the power consumption prediction model corresponding to the current object, which is constructed based on the power consumption prediction model used by other objects with similar power consumption to the current object, can accurately predict the personalized power consumption demand of the current object. The power consumption prediction model training method for household energy storage of the present application is implemented through federated learning, which is a machine learning technology that can perform model training between multiple distributed devices or data centers while ensuring data privacy. Since the encrypted model parameters are obtained and aggregated, there is no risk of leaking the privacy of each object in the process of building the global optimization model; deploying the global optimization model for continuous local training and continuously updating the model parameters of the global optimization model can improve the accuracy and adaptability of the global optimization model; the current object matches other objects, indicating that the power consumption of the current object is similar to that of other objects, and the power consumption prediction model corresponding to the current object constructed based on the power consumption prediction model of other objects matching the current object can accurately predict the personalized power consumption demand of the current object.
[0069] In some embodiments, see Figure 3 Optionally, step 011 includes:
[0070] Step 0111: receiving model parameters transmitted by each object through a preset encryption mechanism;
[0071] The preset encryption mechanism refers to a set of pre-set rules and methods for encrypting and decrypting data in a data processing or communication system. Optionally, the preset encryption mechanism can be homomorphic encryption, which can perform operations on data while protecting data privacy.
[0072] Specifically, the model parameters of the electricity consumption prediction model of each object are homomorphically encrypted. Through homomorphic encryption, the results of corresponding operations on the encrypted model parameters are decrypted and the results are consistent with the results of the same operations on the unencrypted model parameters, thereby obtaining the model parameters of the electricity consumption prediction model of each object after homomorphic encryption.
[0073] In this way, the encrypted model parameters can be processed while protecting data privacy. When the global model is built and then deployed to each object, the encrypted model parameters can be directly integrated with the electricity consumption prediction model of each object after decryption.
[0074] Step 0112: Aggregate the received model parameters to construct a global optimization model.
[0075] Specifically, through the weighted aggregation method, the encrypted model parameters are aggregated to construct a global optimization model.
[0076] In some embodiments, any target parameter of the global optimization model is calculated by the following formula:
[0077]
[0078] Among them, w global represents the target parameter, w i is the model parameter corresponding to the target parameter among the model parameters of the i-th object, and N is the number of objects for constructing the global optimization model.
[0079] In this way, based on the various objective parameters of the global optimization model obtained by weighted aggregation, a global optimization model with strong generalization ability can be constructed.
[0080] In some embodiments, see Figure 4 Optionally, step 014 includes:
[0081] Step 0141: extracting migration features of each power consumption prediction model matching the current object;
[0082] The transfer feature refers to a feature extracted from the source domain in the case of transfer learning that is potentially helpful for the learning task in the target domain. Optionally, the transfer feature can be a feature extracted from the power consumption prediction model of other objects and used to construct the power consumption prediction model corresponding to the current object.
[0083] Specifically, the migration features that are helpful for constructing the power consumption prediction model corresponding to the current object are extracted from the power consumption prediction models of the other objects, for example, the model parameters in the power consumption prediction models of the other objects.
[0084] In this way, based on the extracted migration features of each power consumption prediction model, it is helpful to build a more accurate power consumption prediction model corresponding to the current object.
[0085] Step 0142: Based on the migration characteristics, construct an electricity consumption prediction model corresponding to the current object.
[0086] Specifically, the power consumption prediction model corresponding to the current object is constructed by extracting the migration features of the power consumption prediction models of various other objects.
[0087] For example, the model parameters of the power consumption prediction model of each other object are obtained, so as to determine the model parameters of the power consumption prediction model corresponding to the current object, and realize the construction of the power consumption prediction model corresponding to the current object.
[0088] The current object matches other objects, indicating that the power consumption of the current object is similar to that of other objects. Migration features are extracted from the power consumption prediction models of other objects. Based on the extracted migration features, a power consumption prediction model corresponding to the current object can be easily and quickly constructed. Because the power consumption of the current object is similar to that of other objects, the power consumption prediction model corresponding to the current object constructed can accurately predict the personalized power consumption demand of the current object.
[0089] In some embodiments, see Figure 5 Optionally, step 0141 includes:
[0090] Step 01411: Extract migration features of the electricity consumption prediction models of other objects through the basic model.
[0091] Among them, the basic model refers to a pre-trained model containing a large number of parameters.
[0092] Optionally, the basic model includes a deep neural network, a convolutional neural network, a recurrent neural network, and a long short-term memory network. For example, a deep neural network includes an artificial neural network with multiple hidden layers, which can simulate the connection mode of human brain neurons to process data information. A deep neural network can extract migration features in multiple electricity consumption prediction models.
[0093] Specifically, the power consumption prediction models of various other objects are processed by the basic model to extract the migration features of the power consumption prediction models of various other objects, which is helpful to construct the power consumption prediction model corresponding to the current object.
[0094] In some embodiments, please refer to Figure 6 Optionally, step 0142 includes:
[0095] Step 01421: Based on the migration features, transfer learning is performed on the basic model to build a power consumption prediction model corresponding to the current object.
[0096] Among them, transfer learning is a machine learning strategy that applies knowledge (including features, model parameters, learning strategies, etc.) learned from one or more source domains to a different but related target task and target domain. Optionally, transfer learning can be a strategy that uses the migration features of the power consumption prediction model of various other objects in the base model.
[0097] Specifically, the migration features of the power consumption prediction models of other objects are applied to the basic model, and the basic model performs migration learning based on these migration features to construct the power consumption prediction model corresponding to the current object.
[0098] In this way, the rapidly constructed electricity consumption prediction model can predict the personalized electricity consumption demand of the current object.
[0099] In some embodiments, see Figure 7 Optionally, step 01421 includes:
[0100] Step 01422: Calculate feature distribution information between the features of the current object and each migration feature;
[0101] The feature distribution information refers to the distribution of values of each feature in the data set. Optionally, the feature distribution information may refer to the distribution of similarities between features of the current object and other objects.
[0102] Specifically, based on the migration features of the electricity consumption prediction models of each other object obtained and the features of the current object, the Maximum Mean Discrepancy (MMD) method is applied to calculate the feature distribution information between the features of the current object and each migration feature. Among them, the MMD method is a measurement method for measuring the difference between two data distributions. If the MMD is small, it indicates that the difference between the two data distributions is small; if the MMD is large, it indicates that there is a large difference between the two data distributions.
[0103] Step 01423: Based on the feature distribution information, the basic model is trained to construct a power consumption prediction model corresponding to the current object.
[0104] Specifically, based on the features of the current object and the feature distribution information between each migration feature, the basic model is continuously trained through back propagation, where back propagation is a key algorithm for training models, which can make the predicted output of the trained model closer to the real output. Training the basic model reduces the maximum mean difference of the feature distribution information, and the similarity between the current object and other objects gradually increases, thereby constructing a power consumption prediction model corresponding to the current object, which can more accurately predict the personalized power consumption demand of the current object.
[0105] In some embodiments, see Figure 8 Optionally, step 01423 includes:
[0106] Step 01424: Based on making L MMD The minimum x i ′ and j ′, train the basic model to build the electricity consumption prediction model corresponding to the current object.
[0107] The feature distribution information between the features of the current object and each migration feature can be calculated by the following formula.
[0108]
[0109] Among them, L MMD The maximum mean difference representing the feature distribution information;
[0110] k(x i ,y i ) represents the kernel function, which is used to calculate x i and i The similarity between
[0111] x i and i and represent the characteristics of other objects and the current object respectively;
[0112] x i ′ and j ′ respectively represent the features of other objects and the current object after migration and adaptation;
[0113] n represents the number of samples of other objects, It is the normalization process of similarity of other object samples;
[0114] m represents the number of samples of the current object, It is the normalization process of the similarity of the current object sample;
[0115] It is the normalization process of the similarity between other objects and the current object sample;
[0116] Among them, normalization is a data preprocessing technology that is used to convert data into a distribution form with a unit norm (such as unit standard deviation), eliminating unreasonable effects caused by differences in dimensions, orders of magnitude, etc. between different features, making the data more effective in subsequent analysis, modeling and other operations.
[0117] Specifically, the difference between the feature distribution information of the current object feature and each migration feature can be calculated by the above formula. MMDThe smaller it is and the closer it is to zero, the more similar the current object is to other objects in L MMD When the minimum value is reached, the corresponding features of other objects and the current object after migration and adaptation are obtained. The basic model is trained by applying the features of other objects and the current object after migration and adaptation, and then the power consumption prediction model corresponding to the current object is constructed.
[0118] In this way, the electricity consumption prediction model corresponding to the current object constructed can accurately predict the personalized electricity consumption demand of the current object.
[0119] In some embodiments, see Fig. 9 The electricity consumption prediction model training method for household energy storage also includes steps 015 and 016, which are described in detail below.
[0120] Step 015: Based on the power consumption prediction model and power consumption data of the current object, predict the power consumption demand information of the current object;
[0121] The power demand information refers to relevant data and descriptions reflecting the power demand of power users (including residential users, commercial users, etc.) at a specific time and under specific conditions. Optionally, the power demand information includes power consumption.
[0122] Specifically, the electricity consumption prediction model and electricity consumption data of the current object are used to continuously train and optimize the electricity consumption prediction model, and the latest electricity consumption prediction model is used to predict the electricity demand information of the current object, including the predicted electricity consumption.
[0123] In this way, the personalized electricity demand of the current object can be accurately predicted, which helps to reduce electricity costs.
[0124] Step 016: Based on the preset objective function and electricity demand information, adjust the charging and discharging strategy of the energy storage device to minimize the electricity cost. The objective function is used to calculate the electricity cost. The objective function includes at least the electricity price, the electricity purchased from the power grid, the charging and discharging status of the energy storage device, and the energy storage loss coefficient.
[0125] The objective function is a function that needs to be maximized or minimized according to the target. Optionally, the objective function can be a function that minimizes the electricity cost by applying Mixed-Integer Linear Programming (MILP).
[0126] The energy storage device is a device that can store energy in a certain form and release the stored energy for use when needed. Alternatively, the energy storage device can be a battery pack that provides electrical energy for household electrical loads.
[0127] The energy storage loss coefficient refers to the ratio of energy lost to stored or input energy during the energy storage and release process of the energy storage device. For example, if the energy storage loss coefficient is 0.2, it means that the energy storage device has a 20% energy loss during the energy storage and release process.
[0128] Specifically, through the preset objective function and electricity demand information, the charging and discharging strategy of the energy storage device is dynamically adjusted to minimize the electricity cost.
[0129] In this way, by accurately predicting electricity consumption and dynamically adjusting the charging and discharging strategies of energy storage equipment, electricity costs can be saved and energy utilization efficiency can be improved.
[0130] In some embodiments, the preset objective function is as follows:
[0131]
[0132] Among them, C t is the electricity price, P t is the electricity purchased from the grid, E t is the charging and discharging state of the energy storage device, and λ is the energy storage loss coefficient.
[0133] In some embodiments, there are multiple constraints in solving the objective function, including that electricity consumption is equal to the sum of electricity purchased from the grid and the discharge of the energy storage device, the capacity range limit of the energy storage device, the power range limit of the energy storage device, and the balance condition of distributed energy generation.
[0134] Specifically, the objective function is solved for the minimum value using the MILP method and optimizer (such as the Gurobi optimizer), and there are multiple constraints, including:
[0135] The sum of the electricity purchased from the grid and the discharge of the energy storage device must meet the electricity consumption predicted by the current object through the electricity consumption prediction model and meet the current object's electricity demand;
[0136] The charge and discharge capacity and charge and discharge power of energy storage equipment cannot exceed the limit range;
[0137] Distributed energy generation must maintain balanced conditions, including power balance, voltage balance, frequency balance and other balance conditions, to ensure the effective use of electricity and safe and stable operation of energy storage equipment.
[0138] In this way, by solving the objective function, we can obtain the optimal charging and discharging strategy and reduce electricity costs.
[0139] According to the method described in the above embodiment, the present application embodiment also provides a device 300 for training a power consumption prediction model for home energy storage, which is used to execute the steps in the above method for training a power consumption prediction model for home energy storage. Fig.10 , Fig.10 : is a module diagram of a power consumption prediction model training device 300 for household energy storage provided in an embodiment of the present application. The model training device 300 includes:
[0140] The transfer learning module 301 is used to obtain the power consumption prediction models of other objects matching the current object, extract the migration features of each power consumption prediction model, and construct the power consumption prediction model corresponding to the current object based on the migration features;
[0141] The federated reinforcement learning module 302 is used to receive and aggregate model parameters transmitted by each object through a preset encryption mechanism, build a global optimization model, and then deploy the global optimization model to each object, so that any target object among the objects can be locally trained based on a preset reinforcement learning algorithm, and update the model parameters of the global optimization model deployed to the target object;
[0142] The scheduling optimization module 303 is used to predict the power demand information based on the power prediction model and power demand data of the current object, and adjust the charging and discharging strategy of the energy storage device based on the preset objective function and power demand information to minimize the power cost.
[0143] It should be noted that the specific details of each module unit in the above-mentioned electricity consumption prediction model training device for household energy storage have been described in detail in the embodiment of the above-mentioned electricity consumption prediction model training method for household energy storage, and will not be repeated here.
[0144] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0145] In some embodiments, the electricity consumption prediction model training device for home energy storage in the embodiments of the present application can be implemented in hardware, such as an electronic device or a component in an electronic device, such as an integrated circuit or a chip; the electricity consumption prediction device for home energy storage can also be implemented in software, such as as an application installed in an electronic device.
[0146] In some embodiments, see Fig.11 , Fig.114 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 400 includes a processor 401 and a memory 402. The memory 402 stores a computer program 403 that can be run on the processor 401. When the program 403 is executed by the processor 401, each process of the embodiment of the above-mentioned method for training a power consumption prediction model for household energy storage is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0147] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the embodiment of the above-mentioned method for training a power consumption prediction model for household energy storage are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0148] The processor may be a processor in the electronic device in the above embodiment. The computer readable storage medium may be a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0149] Computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state memory technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media are not limited to the above.
[0150] The embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned method for training a power consumption prediction model for household energy storage when executed by a processor. The processor may be a processor in an electronic device in the above-mentioned embodiment. When the computer program is executed by the processor, each process of the embodiment of the above-mentioned method for training a power consumption prediction model for household energy storage is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0151] It is understandable that in the specific implementation of this application, data related to user identity or characteristics is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0152] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0153] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0154] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for training a power consumption prediction model for household energy storage, characterized in that: include: Obtain and aggregate the model parameters of the encrypted power consumption prediction model of each object to build a global optimization model; Deploy the global optimization model to each of the objects, so that any target object among the objects performs local training based on a preset reinforcement learning algorithm, and updates model parameters of the global optimization model deployed to the target object; Obtaining power consumption prediction models of other objects among the objects that match the current object; Based on each of the power consumption prediction models matching the current object, a power consumption prediction model corresponding to the current object is constructed.
2. The method for training a power consumption prediction model for household energy storage according to claim 1, characterized in that: The obtaining and aggregating the model parameters of the power consumption prediction model of each object to construct a global optimization model includes: Receiving the model parameters transmitted by each object through a preset encryption mechanism; Aggregate the received model parameters to build a global optimization model.
3. The method for training a power consumption prediction model for household energy storage according to claim 1 or 2, characterized in that: Any objective parameter of the global optimization model is obtained based on the following formula: Among them, w global represents the target parameter, w i is the model parameter corresponding to the target parameter among the model parameters of the i-th object, and N is the number of the objects for constructing the global optimization model.
4. The method for training a power consumption prediction model for household energy storage according to claim 1, characterized in that: The constructing a power consumption prediction model corresponding to the current object based on each of the power consumption prediction models matching the current object includes: Extracting migration features of each of the power consumption prediction models matching the current object; Based on the migration characteristics, the electricity consumption prediction model corresponding to the current object is constructed.
5. The method for training a power consumption prediction model for household energy storage according to claim 4, characterized in that: The extracting of migration features of each of the electricity consumption prediction models includes: Extracting migration characteristics of each of the electricity consumption prediction models through the basic model; The constructing the power consumption prediction model corresponding to the current object based on the migration feature includes: Based on the migration features, migration learning is performed on the basic model to construct the electricity consumption prediction model corresponding to the current object.
6. The method for training a power consumption prediction model for household energy storage according to claim 5, characterized in that: The performing transfer learning on the basic model based on the transfer feature to construct the power consumption prediction model corresponding to the current object includes: Calculating feature distribution information between the feature of the current object and each of the migration features; Based on the feature distribution information, the basic model is trained to construct the electricity consumption prediction model corresponding to the current object.
7. The method for training a power consumption prediction model for household energy storage according to claim 6, characterized in that: The feature distribution information is obtained based on the following formula: Among them, L MMD The maximum mean difference representing the feature distribution information; k(x i ,y i ) represents the kernel function, which is used to calculate x i and i The similarity between x i and i and respectively represent the features of the other objects and the current object; x i ′ and j ' respectively represent the features of the other objects and the current object after migration and adaptation; n represents the number of samples of the other objects, is a normalization process for the similarity of the other object samples; m represents the number of samples of the current object, is a normalization process for the similarity of the current object sample pair; is a normalization process for the similarity between the other objects and the current object sample; The training of the basic model based on the feature distribution information to construct the power consumption prediction model corresponding to the current object includes: Based on making L MMD The minimum x i ′ and j ', train the basic model to construct the electricity consumption prediction model corresponding to the current object.
8. The method for training a power consumption prediction model for household energy storage according to any one of claims 1 to 7, characterized in that: Also includes: Predicting the power demand information of the current object based on the power consumption prediction model and power consumption data of the current object; Based on a preset objective function and the electricity demand information, the charging and discharging strategy of the energy storage device is adjusted to minimize the electricity cost. The objective function is used to calculate the electricity cost. The objective function includes at least the electricity price, the electricity purchased from the power grid, the charging and discharging status of the energy storage device, and the energy storage loss coefficient.
9. The method for training a power consumption prediction model for household energy storage according to claim 8, characterized in that: The objective function includes: Among them, C t is the electricity price, P t is the electricity purchased from the grid, E t is the charging and discharging state of the energy storage device, and λ is the energy storage loss coefficient.
10. The method for training a power consumption prediction model for household energy storage according to claim 8 or 9, characterized in that: The electricity demand information includes electricity consumption, and the constraint conditions for solving the objective function include: The electricity consumption is equal to the sum of the electricity purchased from the power grid and the discharge of the energy storage device, the energy storage capacity range limitation, the power range limitation and the balance conditions of distributed energy generation.
11. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for training a power consumption prediction model for household energy storage as described in any one of claims 1 to 10 is implemented.
12. 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 electricity consumption prediction model training method for household energy storage as described in any one of claims 1-10.