Intelligent regulation method and device, equipment and storage medium
By constructing a power generation and consumption prediction model based on environmental data and the hardware parameters of the energy storage power generation system, and combining it with a graph structure calculation control strategy, the problem of inaccurate control strategies in existing photovoltaic energy storage systems has been solved, and the optimization of electricity costs has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN TCL NEW-TECH CO LTD
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-19
AI Technical Summary
Existing photovoltaic energy storage system control technologies cannot dynamically adjust according to real-time environmental conditions and electricity prices, resulting in insufficient accuracy in power generation and electricity consumption forecasts. Furthermore, the control strategies are not integrated with electricity prices, leading to high electricity costs.
A power generation prediction model based on environmental data and the hardware parameters of the energy storage power generation system is introduced. Combined with holiday information and electricity consumption prediction model, a graph structure is constructed to calculate the control strategy. The charging and discharging strategy is optimized using the shortest path algorithm or the minimum spanning tree algorithm.
It enables accurate prediction of power generation and consumption, reduces electricity costs, and optimizes electricity expenditure through off-peak electricity purchases and peak electricity consumption.
Smart Images

Figure CN122246818A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, specifically to an intelligent control method, device, equipment, and storage medium. Background Technology
[0002] Against the backdrop of global energy transition, photovoltaic (PV) power generation has developed rapidly and has become a core force in achieving the "dual carbon" goal. Improving the economic efficiency of PV power generation is a crucial area of focus. Currently, the control technologies for PV energy storage systems are mainly divided into two categories: Passive basic control relies on fixed parameters and preset strategies. For example, it sets fixed charging and discharging times or power, or adopts a simple "power generation for self-consumption, surplus power to the grid" model. The system cannot dynamically adjust according to real-time changes in the environment or electricity prices, resulting in low intelligence. Primary predictive control introduces basic predictions of PV power generation. It typically uses traditional statistical models such as linear regression and ARIMA, relying on a few indicators such as sunlight and temperature for prediction, achieving a certain degree of forward-looking control.
[0003] Both of these technologies have their own shortcomings in practical applications, resulting in poor regulation effectiveness and difficulty in maximizing economic benefits. For example, existing technologies generally lack a linkage mechanism with electricity prices. Neither passive basic regulation nor primary predictive regulation can combine time-of-use pricing and real-time price fluctuations to formulate the optimal regulation strategy, ultimately leading to higher electricity costs for users. Summary of the Invention
[0004] This application provides an intelligent control method, apparatus, device, and storage medium for optimizing control strategies and reducing electricity costs.
[0005] The technical solution adopted by this invention to solve the problem is as follows: Firstly, this application provides an intelligent control method, comprising: The first processing model is invoked to perform predictive processing on the environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain the predicted power generation value, which is used to characterize the power generation per unit time within the preset time period. The second processing model is invoked to predict the holiday information, environmental data and load power value within the preset time period to obtain the predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. Obtain electricity price information within the preset time period, which is used to represent the electricity price per unit time within the preset time period; A graph structure is constructed based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit of time within the preset time period. The control strategy is calculated based on this graph structure.
[0006] In some embodiments of this application, the control strategies calculated based on this graph structure include: The target algorithm is used to calculate the control strategy based on the preset target, constraints and graph structure. The preset target is that the electricity cost within the preset time period is lower than a preset threshold. The constraints include that the remaining battery power of the energy storage power generation unit meets a first threshold and the charging and discharging power of the energy storage power generation unit meets a second threshold.
[0007] In some embodiments of this application, the target algorithm is a shortest path algorithm or a minimum spanning tree algorithm; The shortest path algorithms include Dijkstra's algorithm, Bellmanford's algorithm, and Floyd-Worshal's algorithm.
[0008] In some embodiments of this application, the first processing model is a long short-term memory network; The second processing model is a long short-term memory network.
[0009] In some embodiments of this application, obtaining electricity price information within the preset time period includes: Call the target application interface to obtain the electricity price information for the preset time period; When the call to the target application interface fails, the local cached historical electricity price is obtained to determine the electricity price information within the preset time period.
[0010] In some embodiments of this application, the method further includes: The control strategy is sent to the energy storage power generation entity at a preset time point or preset period based on the target communication protocol, so that the energy storage power generation entity can execute the control strategy. The target communication protocol is a message queue telemetry transmission protocol, a lightweight machine-to-machine protocol, or a data distribution service protocol.
[0011] In some embodiments of this application, the method further includes: Receive execution status information fed back by the energy storage power generation entity; When the execution status information indicates an abnormal situation, the control strategy is recalculated and adjusted.
[0012] Secondly, this application provides an intelligent control device, comprising: The processing module is used to call the first processing model to perform predictive processing on the environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain a predicted power generation value, which is used to characterize the power generation per unit time within the preset time period; and to call the second processing model to perform predictive processing on the holiday information, the environmental data and the load power value within the preset time period to obtain a predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. The acquisition module is used to acquire electricity price information within the preset time period, and the electricity price information is used to represent the electricity price in each unit of time within the preset time period; The processing module is used to construct a graph structure based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure represent the electricity cost in each unit of time within the preset time period. The control strategy is calculated based on the graph structure.
[0013] Thirdly, this application also provides a computer device, which includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor to implement the intelligent control method of any of the first aspects.
[0014] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps in the intelligent control method of any of the first aspects.
[0015] The beneficial effects of this invention are as follows: A large-scale model is introduced to predict power generation based on environmental data and the hardware parameters of the energy storage power generation entity (such as the power generation information of a photovoltaic power station). Simultaneously, a large-scale model is introduced to predict electricity consumption based on environmental data, holiday information, and the sum of total power consumption. This makes the predicted power generation and electricity consumption values more accurate. A graph structure is constructed by combining real-time electricity price information, predicted power generation, and predicted electricity consumption values. Based on this graph structure, control strategies are calculated to achieve off-peak electricity purchases and peak-peak electricity consumption, thereby reducing electricity costs. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of a system architecture for the intelligent control method provided in an embodiment of the present invention; Figure 2 This is a schematic flowchart of one embodiment of the intelligent control method provided by the present invention; Figure 3 This is a schematic diagram of a module flow of the intelligent control method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the control strategy provided in an embodiment of the present invention; Figure 5 This is an example diagram of an embodiment of the intelligent control device provided in this invention; Figure 6 This is an example diagram of another embodiment of the intelligent control device provided in this invention; Figure 7 This is a schematic diagram of an embodiment of the computer device provided in this invention. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0019] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more features.
[0020] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0021] It should be noted that since the method in this application embodiment is executed in a computer device, the processing objects of each computer device exist in the form of data or information, such as time, which is essentially time information. It is understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the computer device can process them. Specific details will not be elaborated here.
[0022] Against the backdrop of global energy transition, photovoltaic (PV) power generation and other clean energy sources (such as wind power) have developed rapidly, becoming a core force in achieving the "dual carbon" goal. Improving the economic efficiency of PV power generation is a crucial area of focus. Currently, the control technologies for PV energy storage systems are mainly divided into two categories: Passive basic control relies on fixed parameters and preset strategies. For example, it sets fixed charging and discharging times or power, or adopts a simple "power generation for self-consumption, surplus power to the grid" model. The system cannot dynamically adjust according to real-time changes in the environment or electricity prices, resulting in low intelligence. Primary predictive control introduces basic predictions of PV power generation. It typically uses traditional statistical models such as linear regression and ARIMA, relying on a few indicators such as sunlight and temperature for prediction, achieving a certain degree of forward-looking control.
[0023] On the other hand, with the increasing popularity of distributed photovoltaic (PV) power stations, users' demand for integrated "power generation-consumption-cost optimization" is becoming increasingly urgent. Industry data shows that global distributed PV installations increased by 35% year-on-year in 2024, but over 60% of users still face problems such as "power generation waste" (e.g., excess power generation on sunny days that cannot be efficiently stored) or "power shortages" (e.g., needing to purchase electricity at high prices on cloudy days). Meanwhile, dynamic pricing policies have become common, but existing control technologies cannot incorporate electricity price fluctuations into their purchasing strategies, resulting in higher electricity costs.
[0024] Based on the above description, the current photovoltaic power plant control schemes mainly have the following problems: The accuracy of power generation and electricity consumption forecasts is insufficient. Existing models have a single input dimension and do not integrate photovoltaic power plant hardware parameters (azimuth, panel area, etc.) with multi-dimensional environmental data (weather type, humidity, etc.), making them unable to adapt to complex and ever-changing natural conditions. They also ignore influencing factors such as holidays and the number of electrical devices, resulting in large deviations between the forecast results and actual electricity demand. For example, they cannot store electricity in advance when household electricity consumption surges during holidays.
[0025] The control strategy was not integrated with electricity prices, resulting in no optimization of electricity costs. Specifically, the charging and discharging plan was not formulated in conjunction with dynamic electricity prices, making it impossible to purchase and store electricity during off-peak periods and thus unable to reduce electricity costs.
[0026] To address this technical problem, this application provides the following technical solution: A first processing model is invoked to predict environmental data and the hardware parameters of the energy storage power generation entity within a preset time period to obtain a predicted power generation value, which represents the power generation per unit time within the preset time period; a second processing model is invoked to predict holiday information, the environmental data, and load power values within the preset time period to obtain a predicted electricity consumption value, which represents the electricity consumption per unit time within the preset time period; electricity price information is obtained within the preset time period, which represents the electricity price per unit time within the preset time period; a graph structure is constructed based on the predicted power generation value, the predicted electricity consumption value, and the electricity price information, where the nodes of the graph structure represent the remaining electricity per unit time within the preset time period, and the edges of the graph structure represent the electricity cost per unit time within the preset time period; and a control strategy is calculated based on the graph structure. This approach introduces a large-scale model to predict power generation based on environmental data and the hardware parameters of the energy storage power generation system (i.e., the power generation information of the photovoltaic power station). Simultaneously, it introduces a large-scale model to predict electricity consumption based on environmental data, holiday information, and the total power consumption. This makes both power generation and consumption predictions more accurate. By combining real-time electricity price information, power generation predictions, and consumption predictions to construct a graph structure, and then calculating control strategies based on this graph structure, it enables off-peak electricity purchases and peak-hour electricity consumption, thereby reducing electricity costs.
[0027] This application provides an intelligent control method, apparatus, device, and storage medium for optimizing the control strategy of an energy storage power generation system and reducing electricity costs. The electronic device provided in this application can be implemented as various types of user terminals or as a server.
[0028] Electronic devices can optimize control strategies and reduce electricity costs by running the intelligent control method provided in the embodiments of this application.
[0029] The above methods can be applied to intelligent control methods for various charging, discharging and energy storage scenarios, such as home photovoltaic power stations, commercial photovoltaic power stations, microgrid systems (such as integrating wind power, energy storage batteries and other energy forms), and electric vehicle charging piles, etc.
[0030] In one exemplary solution, this intelligent control method can be applied to the intelligent control of a home photovoltaic power station. For example, in the intelligent control scenario of a home photovoltaic power station, the process can be as follows: acquire environmental data (such as weather type (sunny, rainy, cloudy, windy), temperature, humidity, sunlight angle, light intensity, etc.) and hardware parameters of the photovoltaic power station (azimuth angle, tilt angle, panel area, photovoltaic panel type, latitude and longitude of the photovoltaic panel location, etc.) for a preset time period (such as the next week); then input the environmental data and the hardware parameters into a first processing model for prediction to obtain the predicted power generation value per unit time in the preset time period (such as the real-time power generation per hour per day in the next week), and store it. Simultaneously, environmental data, holiday information (statutory holidays or user-defined holidays, e.g., if a user's work schedule includes Mondays and Tuesdays, then Mondays and Tuesdays can be customized as holidays), and the total power consumption of household electrical appliances are acquired for the preset time period. This data is then input into the second processing module for prediction, yielding a predicted electricity consumption value for each unit of time within the preset time period (e.g., real-time electricity consumption per hour per day for the next week), which is then stored. Simultaneously, electricity price information corresponding to the preset time period is acquired (e.g., real-time electricity price per hour per day for the next week). Finally, a graph structure is constructed based on the predicted power generation value, the predicted electricity consumption value, and the electricity price information, and a control strategy is calculated based on this graph structure. This control strategy instructs the energy storage power generation entity to charge and discharge. It should be understood that the charging process includes the energy storage power generation entity actively generating electricity and purchasing electricity from the external power grid system; the discharging process includes the energy storage power generation entity supplying electricity to the household and selling electricity to the external power grid system.
[0031] It should be understood that the above is only an exemplary application scenario of the intelligent control method. There are many other possible application scenarios, which are not limited here.
[0032] The intelligent control method provided in this application embodiment is applied to, for example, Figure 1 The system architecture diagram shown is for your reference. Figure 1 To support an intelligent control method, the terminal device 100, server 300, and energy storage and power generation unit 500 are connected via network 200. Server 300 connects to database 400. Network 200 can be a wide area network (WAN), a local area network (LAN), or a combination of both. The client for implementing the intelligent control method is deployed on the terminal device 100, or it can run on the terminal device 100 as a standalone application. The specific form of the client is not limited here.
[0033] The server 300 involved in this application can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.
[0034] Terminal equipment 100, also known as user equipment (UE), mobile station (MS), mobile terminal (MT), customer premises equipment (CPE), etc., can be a device that includes both receiving and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Examples include handheld devices with wireless connectivity, vehicle-mounted devices, and machine-type communication (MTC) terminals. Currently, terminal devices can include: mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving cars, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, and wireless terminals in smart homes. For example, wireless terminals in self-driving cars can be drones, helicopters, or airplanes. For example, wireless terminals in vehicle-to-everything (V2X) systems can be in-vehicle equipment, vehicle-mounted equipment, in-vehicle modules, vehicles, or ships. Wireless terminals in industrial control can be cameras, robots, or robotic arms. Wireless terminals in smart homes can be televisions, air conditioners, robot vacuums, speakers, or set-top boxes.
[0035] It should be noted that the terminal device may be a device or apparatus with a chip, or a device or apparatus with integrated circuitry, or a chip, module or control unit in the device or apparatus shown above. This application does not limit the specific device.
[0036] The solution provided in this application can be completed by the cooperation of terminal device 100 and server 300.
[0037] In short, a database can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, shared by multiple users, with minimal redundancy, and independent of application programs. A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or Extensible Markup Language (XML); or according to the type of computer they support, such as server clusters or mobile phones; or according to the query language used, such as Structured Query Language (SQL) or XQuery; or according to performance priorities, such as maximum scale or maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, simultaneously supporting multiple query languages. In this application, the database 400 can be used to store data such as environmental data, hardware parameters, holiday information, electricity price information, user power of household equipment, first processing model, second processing model, etc.
[0038] The energy storage and power generation unit 500 is a composite energy unit integrating energy generation and energy storage functions. In this embodiment, the energy storage and power generation unit 500 is an intelligent asset with active regulation and management capabilities. Through the coordination of its internal energy storage system (such as a battery pack), it can overcome the inherent intermittency and volatility of clean energy, thereby achieving high flexibility and economy in energy production, storage, and use. Its power generation structure can be a photovoltaic power station or a wind power station.
[0039] Those skilled in the art will understand that Figure 1 The system architecture diagram shown is one possible system architecture for this application and does not constitute a limitation on the system architecture of this application. Other system architectures may include more advanced architectures. Figure 1 The number of more or fewer terminal devices or servers shown, for example Figure 1 The diagram shows one server. It is understood that the system architecture may also include one or more other terminal devices or servers, which are not limited here.
[0040] It should be noted that, Figure 1The system architecture shown is an example. The servers and scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of servers and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0041] like Figure 2 The diagram shown is a flowchart of an embodiment of the intelligent control method in this application. The following description, using a server as the execution entity, illustrates the intelligent control method, which may include the following steps 201 to 205, as detailed below: 201. Call the first processing model to perform predictive processing on the environmental data and hardware parameters of the energy storage power generation entity within the preset time period to obtain the predicted power generation value. The predicted power generation value is used to characterize the power generation per unit time within the preset time period.
[0042] The intelligent control method provided in this embodiment relies on accurate prediction of power generation and consumption. Therefore, the server can invoke a first processing model to predict power generation. In this embodiment, the model can be a prediction engine based on deep learning. Its input data can include dynamically changing environmental data (such as sunlight, temperature, cloud cover, etc.) and hardware parameters of the energy storage power generation entity (such as photovoltaic panel capacity, efficiency, installation angle, etc.). Through in-depth analysis of these multi-dimensional data, the model can learn and master the complex nonlinear relationship between power generation and various influencing factors. Therefore, in application, the model can use the environmental data of the preset time period and the hardware parameters of the energy storage power generation entity as input data, and then the model outputs a high-precision power generation prediction value. This prediction value can be a detailed time series curve, used to characterize the expected power generation per unit time (e.g., every 15 minutes or hour) within the preset time period (e.g., the next 24 hours).
[0043] In this embodiment, the environmental data can be a series of specific, quantifiable physical indicators, mainly including: light intensity, ambient temperature (affecting photovoltaic panel conversion efficiency), cloud cover, humidity, and wind speed (affecting module heat dissipation). This data is typically obtained from meteorological service programs or on-site sensors. When applied to the model, the quantified values can be preprocessed to represent a set of timestamped numerical time-series data. Before being input into the model, this data needs to undergo cleaning (filling in missing values), alignment (unifying timestamps), and normalization (e.g., scaling to between 0 and 1) to eliminate the influence of different units and dimensions, improving the stability and efficiency of model training.
[0044] The hardware parameters of this energy storage power generation entity can be used to characterize its physical attributes or identity information, defining its inherent ability and characteristics to convert solar energy into electrical energy. In an exemplary scheme, when the energy storage power generation entity is a photovoltaic power station, it can include a series of static or slowly varying parameters describing the physical configuration of the photovoltaic power station, such as: total installed capacity, photovoltaic module efficiency, module degradation rate, installation tilt angle, azimuth angle, inverter efficiency, etc. These parameters determine the theoretical maximum power generation potential of the power station under the same illumination conditions. These parameters can serve as static feature inputs to the first processing model. They can be concatenated with the environmental data at each time step to form a richer input vector, helping the first processing model distinguish the power generation characteristics of different power stations. For example, a power station with high-efficiency modules and an optimal tilt angle, under the same environmental data, will naturally have a higher predicted power generation output when the first processing model predicts its power generation.
[0045] This power generation forecast is the future power generation prediction output by the first processing model, which is used for subsequent regulation strategy calculations. Its output can be represented as a time series. For example, a forecast for the next 24 hours, in hourly units, would be an array containing 24 elements, each representing the power generation (in kWh) for the corresponding hour.
[0046] The first processing model can be understood as a specific mathematical or algorithmic entity, typically referring to a trained machine learning or deep learning model. Its function is to receive multi-dimensional input data (environment, hardware, etc.) and, through complex internal calculations, find the mapping pattern between input and output (power generation), ultimately generating a prediction result.
[0047] Optionally, in this embodiment, the first processing model can be set as an LSTM model due to the superior performance of Long Short-Term Memory (LSTM) networks in processing time series data.
[0048] It is understood that in this embodiment, the first processing model can also be replaced by other time series processing models, such as a gated recurrent unit (GRU) network or a transformer network.
[0049] In this embodiment, when the first processing model is an LSTM model, the training and prediction process of the first processing model is described using household photovoltaic power generation as the application scenario: 1. Data preparation and preprocessing, which includes data collection and data preprocessing. These will be explained separately below.
[0050] Data Collection: In this embodiment, historical data over at least a period of time can be collected. This historical data includes: Historical environmental data: hourly or 15-minute intervals of light intensity, temperature, humidity, etc. In this embodiment, this historical environmental data can be obtained in real time by calling a third-party weather service (such as Gaode Weather), which provides the current user's home photovoltaic power station location with light intensity, temperature, and weather type (such as sunny, cloudy, rainy, encoded as numerical variables).
[0051] Hardware parameters of a home photovoltaic (PV) power station: These are the fixed parameters of the power station. In this embodiment, they can be obtained during the installation phase through the power station information form filled out by the installer. These parameters include azimuth (accuracy ±1°), tilt angle (accuracy ±0.5°), panel area (unit: m²), PV panel type (e.g., monocrystalline silicon, polycrystalline silicon), and latitude and longitude (accurate to 6 decimal places). This information is then stored in a cloud database (which can use a hybrid storage architecture of MySQL and MongoDB, with hardware parameters stored in MySQL and historical data stored in MongoDB; specific details are not limited here).
[0052] Historical power generation data of a residential photovoltaic (PV) power station: the actual power generation corresponding to the time point of historical environmental data. In this embodiment, the controller of the residential PV power station may report the power generation data to the IoT cloud periodically (every 30 minutes) via Message Queuing Telemetry Transport (MQTT). The recording format can be "timestamp-power station identifier-real-time power generation (kWh)".
[0053] Data preprocessing: In this embodiment, it may include operations such as data cleaning, feature processing, and data normalization.
[0054] This data cleaning process is used to handle missing values (such as by using linear interpolation or forward imputation) and outliers (such as removing data that is outside the physical possible range).
[0055] Feature processing is used to convert timestamps into periodic features (such as hours of the day or days of the year) or to convert latitude and longitude into solar altitude angles and to perform uniquely thermal encoding of weather types.
[0056] Data normalization is used to scale all numerical input features (such as environmental data) and output features (such as electricity generation) to the range of [0, 1] or [-1, 1]. This normalization process can accelerate model convergence and improve performance.
[0057] 2. Model Construction: The first processing model can be designed as follows: a 3-layer LSTM network is used, with 7 dimensions in the input layer (azimuth, tilt angle, panel area, photovoltaic panel type, light intensity, temperature, and weather), 64 hidden layer nodes, and 1 output layer (daily power generation for the next week); the optimizer can be an optimization algorithm to update the model weights, such as the Adam optimizer; the loss function can be a loss function suitable for regression tasks, such as mean squared error (MSE); the number of training iterations is 100 rounds; and the batch size is specified.
[0058] The input layer can also define the shape of the input data, i.e. (sequence length, number of features), for example (24, 5) represents a sequence length of 24 and 5 features at each time step.
[0059] The output layer can also have a fully connected layer added to map the LSTM output to the final prediction target. Since we are predicting a numerical value (electricity generation), this layer typically has one neuron.
[0060] When building a model, evaluation metrics can also be designed to specify metrics to be monitored during training and testing, such as Mean Absolute Error (MAE), which is more physically interpretable.
[0061] 3. Split the dataset. The prepared training samples can be divided into a training set (e.g., 80%) and a test set (e.g., 20%) in an 8:2 ratio. The test set does not participate in model weight updates; it is only used to evaluate the model's performance on unseen data to detect overfitting. In this embodiment, when the prediction error on the test set exceeds a threshold (e.g., 10%), a model update is automatically triggered. Alternatively, the first processing model can be configured to perform periodic model updates, such as retraining monthly to incorporate the latest historical data.
[0062] 4. Model Saving. Once the first processing model has been trained and the prediction error on the test set reaches its minimum or a threshold, the model's weights and structure are saved for subsequent predictions.
[0063] 5. Prediction process of the first processing model. After the first processing model is trained and saved, it can be called for prediction in practical applications.
[0064] First, prepare the real-time input sequence.
[0065] The system retrieves a segment of input data with the same length as the training sequence within the preset time period. For example, at 0:00 each day, the server automatically calls a third-party weather service application interface to obtain data such as sunlight intensity, temperature, and weather type for the next week, while also acquiring the hardware parameters of the household photovoltaic power station.
[0066] It should be understood that the hardware parameters of the home photovoltaic power station can be modified accordingly based on the operating time. For example, if the installation time is within one year, the hardware parameters can be used to take the theoretical maximum power generation of the home photovoltaic power station as the actual maximum power generation; if the installation time is between one and two years, the hardware parameters can be modified accordingly to obtain a partial value of the theoretical maximum power generation of the home photovoltaic power station (for example, setting the actual maximum power generation of the home photovoltaic power station to 90% of the theoretical maximum power generation).
[0067] The same preprocessing steps as during training are performed on the above environmental data and hardware parameters to obtain the input data.
[0068] Load the previously saved trained LSTM model, feed the input data into the model, and the model will output one or more predicted values. Perform corresponding operations on the predicted values output by the model to restore them to the power generation with actual physical units (such as kWh).
[0069] In this embodiment, after the first processing model outputs the power generation prediction value, the power generation prediction value can be stored in the corresponding database. The power generation prediction value can be stored in the format of "timestamp-power plant identifier-predicted power generation (kWh)".
[0070] 202. Call the second processing model to perform prediction processing on the holiday information, environmental data and load power value within the preset time period to obtain the predicted power consumption value, which is used to characterize the power consumption per unit time within the preset time period.
[0071] The intelligent control method provided in this embodiment relies on accurate prediction of power generation and consumption. Therefore, the server can call a second processing model to predict power consumption. In this embodiment, the model can be a prediction engine based on deep learning. The second processing model is used to predict users' electricity demand. It complements the first processing model that predicts power generation, working together to generate control decisions. This second processing model is used to deeply analyze and predict users' electricity consumption behavior. Its input data includes at least three data dimensions: first, holiday information with strong periodicity and social attributes; second, environmental data affecting physical experience and equipment operation; and finally, historical load power values reflecting users' inherent habits. Through comprehensive analysis of these data, the model can learn complex, non-linear electricity consumption patterns, such as the difference in electricity consumption between weekdays and weekends, the surge or drop in electricity consumption during holidays, and the surge in air conditioning load during hot summer weather. Finally, the second processing model outputs a high-precision electricity consumption prediction value, which can be represented in the form of a time series, representing the expected electricity consumption per unit time within a preset time period (such as the next 24 hours).
[0072] In this embodiment, the environmental data can utilize the environmental data from step 201 above. That is, the environmental data can be a series of specific, quantifiable physical indicators, mainly including: light intensity, ambient temperature (affecting photovoltaic panel conversion efficiency), cloud cover, humidity, wind speed (affecting component heat dissipation), etc. This data is typically obtained from meteorological service programs or on-site sensors. When applied to the model, its quantified values can be preprocessed to represent a set of timestamped numerical time-series data. Before being input into the model, this data needs to undergo cleaning (filling in missing values), alignment (unifying timestamps), and normalization (e.g., scaling to between 0 and 1) to eliminate the influence of different units and dimensions, improving the stability and efficiency of model training.
[0073] Holiday information reveals whether a particular day deviates from the usual weekday or weekend pattern, as changes in social rhythms directly lead to systemic changes in electricity consumption behavior. It can be a structured categorical feature used to label each day as a weekday, weekend, public holiday, or special event day. For example, for a factory, holidays mean production stoppage and a sharp drop in electricity consumption; while for a shopping mall, holidays mean peak customer traffic and a surge in electricity consumption. In this second processing model, holiday information can be quantified. For example, one-hot encoding can be used to encode the holiday information. For instance, a vector containing three elements [weekday, weekend, holiday] can be created, where a regular Wednesday is represented as [1, 0, 0], National Day as [0, 0, 1], and a normal weekend as [0, 1, 0]. This encoded vector will serve as an input feature for this second processing model.
[0074] Load power values can be used to characterize a user's historical electricity consumption behavior. It can be a time-series data record of past actual power consumption (in kW) or electricity consumption (in kWh). This data is collected at fixed time intervals (e.g., every 15 minutes) by devices such as smart meters. During the training of this second processing model, historical load power values can be part of the input sequence (as historical features) and are also the target that the second processing model needs to learn and predict.
[0075] This electricity consumption forecast is the future electricity consumption prediction output by the second processing model, which is used for subsequent regulation strategy calculations. Its output can be represented as a time series. For example, a forecast for the next 24 hours, in hourly units, would be an array containing 24 elements, each representing the electricity consumption (in kWh) for the corresponding hour.
[0076] The second processing model can be understood as a specific mathematical or algorithmic entity, typically referring to a trained machine learning or deep learning model. Its function is to receive multi-dimensional input data (environmental information, holiday information, and load power values, etc.), and through complex internal calculations, find the mapping pattern between input and output (electricity consumption), ultimately generating prediction results.
[0077] Optionally, in this embodiment, the second processing model can be set as an LSTM model due to the superior performance of Long Short-Term Memory (LSTM) networks in processing time series data.
[0078] It is understood that in this embodiment, the second processing model can also be replaced by other time series processing models, such as a gated recurrent unit (GRU) network or a transformer network.
[0079] In this embodiment, when the second processing model is an LSTM model, the training and prediction process of the second processing model is described using household electricity consumption as the application scenario: 1. Data preparation and preprocessing, which includes data collection and data preprocessing. These will be explained separately below.
[0080] Data Collection: In this embodiment, historical data over at least a period of time can be collected. This historical data includes: Historical environmental data: hourly or 15-minute intervals of light intensity, temperature, humidity, etc. In this embodiment, this historical environmental data can be obtained in real time by calling a third-party weather service (such as Gaode Weather), which provides the current user's home photovoltaic power station location with light intensity, temperature, and weather type (such as sunny, cloudy, rainy, encoded as numerical variables).
[0081] Holiday information: Obtain holiday information (such as national statutory holidays and user-defined holidays, coded as "1-holiday, 0-non-holiday") through the corresponding application.
[0082] Historical load power value: Using smart meters or corresponding applications, obtain the number of main electrical appliances in the household electricity consumption scenario and the operating status of the electrical appliances (such as refrigerators, air conditioners, washing machines, etc., converted into load power value (kW) according to power weight).
[0083] Historical electricity consumption data collection: The actual electricity consumption corresponding to the time point of historical environmental data. In this embodiment, the smart meter may report the electricity consumption data to the IoT cloud periodically (every 30 minutes) via the Message Queuing Telemetry Transport (MQTT) protocol. The recording format can be "timestamp - user identifier - real-time power generation (kWh)".
[0084] Data preprocessing: In this embodiment, it may include operations such as data cleaning, feature processing, and data normalization.
[0085] This data cleaning process is used to handle missing values (such as by using linear interpolation or forward imputation) and outliers (such as removing data that is outside the physical possible range).
[0086] Feature processing is used to convert timestamps into periodic features (such as hours of the day or days of the year) or to convert latitude and longitude into solar altitude angles and to perform uniquely thermal encoding of weather types.
[0087] Data normalization is used to scale all numerical input features (such as environmental data) and output features (such as electricity generation) to the range of [0, 1] or [-1, 1]. This normalization process can accelerate model convergence and improve performance.
[0088] 2. Model Construction: The second processing model can be designed as follows: a 3-layer LSTM network with 7 input dimensions (azimuth, tilt angle, panel area, photovoltaic panel type, light intensity, temperature, and weather), 48 hidden layer nodes, and 1 output layer (daily power generation for the next week). The optimizer can be an optimization algorithm, such as the Adam optimizer, to update the model's weights. The loss function can be a loss function suitable for regression tasks, such as Mean Squared Error (MSE). The training iterations are 100 rounds, and the batch size is [not specified]. Based on this, an attention mechanism (Attention Layer) can be added to the second processing model to focus on features that significantly affect electricity consumption, such as holidays and high / low temperature weather.
[0089] The input layer can also define the shape of the input data, i.e. (sequence length, number of features), for example (24, 5) represents a sequence length of 24 and 5 features at each time step.
[0090] The output layer can also have a fully connected layer added to map the LSTM output to the final prediction target. Since we are predicting a numerical value (electricity consumption), this layer typically has one neuron.
[0091] When building a model, evaluation metrics can also be designed to specify metrics to be monitored during training and testing, such as Mean Absolute Error (MAE), which is more physically interpretable.
[0092] 3. Split the dataset. The prepared training samples can be divided into a training set (e.g., 80%) and a test set (e.g., 20%) in an 8:2 ratio. The test set does not participate in model weight updates; it is only used to evaluate the model's performance on unseen data to detect overfitting. In this embodiment, when the prediction error on the test set exceeds a threshold (e.g., 10%), a model update is automatically triggered. Alternatively, the second processing model can be configured to perform periodic model updates, such as retraining monthly to incorporate the latest historical data.
[0093] 4. Model Saving. Once the second processing model has been trained and the prediction error on the test set reaches its minimum or a threshold, the model's weights and structure are saved for subsequent predictions.
[0094] 5. Prediction process of the second processing model. After the second processing model is trained and saved, it can be called for prediction in practical applications.
[0095] First, prepare the real-time input sequence.
[0096] The system acquires a segment of input data with the same length as the training sequence within the preset time period. For example, at 0:00 each day, the server automatically calls a third-party weather service application interface to obtain data such as light intensity, temperature, and weather type for the coming week; determines the holiday information for the coming week based on a calendar program or user-defined work schedule; and obtains the load power value for the coming week based on the holiday information and historical load power values.
[0097] The same preprocessing steps as during training were performed on the above environmental data, holiday information, and load power value to obtain the input data.
[0098] Load the previously saved trained LSTM model, feed the input data into the model, and the model will output one or more predicted values. Perform corresponding operations on the predicted values output by the model to restore them to the electricity consumption with actual physical units (such as kWh).
[0099] In this embodiment, after the second processing model outputs the electricity consumption forecast value, the electricity consumption forecast value can be stored in the corresponding database. The electricity consumption forecast value can be stored in the format of "timestamp-user identifier-predicted electricity consumption (kWh)".
[0100] 203. Obtain the electricity price information within the preset time period. This electricity price information is used to represent the electricity price per unit time within the preset time period.
[0101] In this embodiment, the server can use the application interface and local caching to obtain the electricity price information within the preset time period. That is, the server can call the target application interface to obtain the electricity price information within the preset time period; if the call to the target application interface fails, the server can obtain the historical electricity prices cached locally to determine the electricity price information within the preset time period.
[0102] For example, at a preset time (e.g., 0:00 every day), the server calls a third-party dynamic electricity price service application interface (such as the State Grid power trading platform or the open interface of local power companies) to obtain the time-of-use electricity price data for the user's city for the next week (which can be accurate to the hourly electricity price, unit: yuan / kWh); if the application interface call fails (e.g., network failure), the local cached electricity price data for the previous N (e.g., 30) days is automatically used as a temporary replacement.
[0103] Optionally, the server can send alarm information to the operations and maintenance personnel corresponding to the application interface, so that the operations and maintenance personnel can quickly fix the calling function.
[0104] 204. Construct a graph structure based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit of time within the preset time period.
[0105] In this embodiment, to facilitate the calculation of electricity costs, a corresponding graph structure can be constructed based on the power generation, power consumption, and electricity price information.
[0106] In one exemplary scheme, the construction process of this graph structure can be as follows: The graph structure is defined as a hierarchical graph, with each layer representing a point in time. Paths in the graph represent the state evolution of the batteries in the energy storage power generation system at different points in time, and the total weight of the paths represents the total electricity cost. Each node in the graph can be understood as a snapshot of the state of the batteries in the energy storage power generation system. Let's define a node as: Node = (t, s).
[0107] Where t is used to represent the time point index (e.g., 0, 1, 2, ... represent 00:00, 01:00, 02:00...).
[0108] s is used to represent the remaining battery power of the energy storage generator at the start of that time point.
[0109] It should be understood that if the preset time period is one week, then the node can also be represented as: Node=(w, t, s).
[0110] Where w is used to represent the number of days (for example, (1, 2, 3, 4, 5, 6, 7) represent (the first day, the second day, the third day, the fourth day, the fifth day, the sixth day, and the seventh day) respectively).
[0111] t is used to represent the time point index (e.g., 0, 1, 2, ... represents 00:00, 01:00, 02:00...).
[0112] s is used to represent the remaining battery power of the energy storage generator at the start of that time point.
[0113] Since the battery capacity 's' is a continuous variable, it can be discretized to represent it graphically. For example, for a 10 kWh battery, discretization can be performed in steps of 1 kWh. The possible values for 's' are: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
[0114] It should be understood that if you want to improve the computational accuracy, you can use a step size of 0.5kWh or 0.1kWh, but this will significantly increase the number of nodes and the computational complexity.
[0115] In an exemplary scheme, the node set can be represented as follows: Assume the analysis is performed over a 24-hour period, with each hour as a time interval, a battery capacity of 10 kWh, and a step size of 1 kWh.
[0116] The possible values of t are: {0, 1, ..., 23}.
[0117] The value of s is {0, 1, ..., 10}.
[0118] The total number of nodes will be approximately 24 * 11 = 264 (excluding the final virtual endpoint).
[0119] For example, node (t=8, s=5) represents "at 08:00, the battery capacity is 5kWh".
[0120] Edges in a graph structure can be used to represent state transitions that may occur within a time period, with their weights being the costs incurred during that time period.
[0121] Suppose that an edge is defined as: Edge = (Node_start, Node_end, weight); Where Node_start represents the starting node, for example (t, s_t).
[0122] Node_end represents the end node, used to indicate the node that is the next time point, for example (t+1, s_{t+1}).
[0123] weight: The weight of the edge, which is the electricity cost generated during the period from t to t+1.
[0124] Edge construction and weight calculation: Starting from any node (t, s_t), connect to all possible nodes (t+1, s_{t+1}) in the next time layer t+1. This process can be determined by the following logic: Net power consumption (Net_Load) during the calculation period; During the time interval from t to t+1: Net_Load = Electricity Consumption - Electricity Generation.
[0125] The determined battery action indicates whether the battery needs to be charged or discharged when the change from s_t to s_{t+1} occurs.
[0126] During the calculation process, it is necessary to determine whether an edge is valid, which depends on whether the battery operation meets physical constraints, such as charging and discharging power limits: battery charging and discharging power ≤ maximum charging and discharging power (e.g., 2kWh / hour).
[0127] Battery capacity limit: ≤s_{t+1}≤ upper limit of battery capacity (e.g., 10kWh).
[0128] Energy conservation: A battery cannot be created from nothing. The discharge amount cannot exceed s_t, and the charge after charging cannot exceed the upper limit of the capacity.
[0129] The process of calculating the purchased electricity volume and edge weights can be designed as follows: the purchased electricity volume depends on the net load and battery operation, for example, purchased electricity volume = net load + battery operation.
[0130] In other words, if the charging value is greater than 0, it means that electricity needs to be purchased from the external power grid to meet both electricity consumption and charging needs.
[0131] If the discharge is less than 0, it means that the battery discharge of the energy storage power generation unit can offset part of the load, reducing the need to purchase electricity from the external grid.
[0132] Calculate the cost: If the purchased electricity volume is greater than 0, the weight of this edge can be set to be equal to the product of the purchased electricity volume and the electricity price for the current period.
[0133] If the purchased electricity volume is ≤ 0 (the power generation and battery discharge are sufficient to meet the electricity consumption and charging needs, and there may even be surplus electricity), then the weight of this edge can be set to 0 (that is, assuming that the revenue from the surplus electricity fed into the grid is 0; it should be understood that it can also be set to a negative number to represent revenue).
[0134] In the computation process, the computer representation of the graph structure can be an adjacency list, which can be implemented using a dictionary (or hash table).
[0135] The graph structure can be represented as graph = {node1: [(neighbor1, weight1), (neighbor2, weight2), ...], node2: ...}; Key: A node, such as a tuple (t, s).
[0136] Value: A list containing all neighboring nodes reachable from this node and their corresponding edge weights. Each element is a tuple of (neighbor_node, weight).
[0137] 205. The control strategy is calculated based on the graph structure.
[0138] In this embodiment, after the graph structure is constructed, the server can calculate the graph structure according to the preset target and constraints and the target algorithm, and determine the control strategy based on the calculation results.
[0139] In this embodiment, the preset target can be set to the electricity cost within the preset time period being lower than a preset threshold; the constraint can be set to the remaining battery power of the energy storage power generation entity meeting a first threshold and the charging and discharging power of the energy storage power generation entity meeting a second threshold.
[0140] While there are many types of algorithms for graph structures, based on the principle that the shortest path algorithm or minimum spanning tree algorithm can be used to calculate costs, in this embodiment, the target algorithm can be either a shortest path algorithm or a minimum spanning tree algorithm. Specifically, the shortest path algorithm includes Dijkstra's algorithm, Bellmanford's algorithm, and Floyd-Worshal's algorithm; the specific implementation is not limited here.
[0141] The calculation process of the graph structure shown in step 204 is explained below using the shortest path algorithm: Assume the scenario is set as follows: Time range: 08:00-11:00 (3 time slots).
[0142] The battery parameters are as follows: Capacity: 4kWh (discretized into {0, 1, 2, 3, 4}kWh).
[0143] Maximum charging / discharging power: 2kW (i.e., a maximum charge / discharge of 2kWh per hour).
[0144] Initial state: At 08:00, the battery capacity is 2kWh. That is, the starting node is (t=8, s=2).
[0145] Objective: Find the strategy with the lowest total electricity cost from 08:00 to 11:00.
[0146] Constraints: Charge / discharge power limit: Battery charge / discharge power ≤ maximum charge / discharge power (e.g., 2 kWh / hour); Battery capacity limit: ≤ s_{t+1} ≤ upper limit of battery capacity (e.g., 10 kWh); Energy conservation: The battery cannot be created from nothing. The discharge amount cannot exceed s_t, and the amount of energy after charging cannot exceed the upper limit of capacity.
[0147] The forecast values (including electricity consumption and power generation) and electricity prices can be represented as shown in Table 1: Table 1
[0148] Based on the information indicated in Table 1 above, the construction of its graph structure can be represented as follows: The starting node (t=8, s=2) corresponds to the time period: 08:00-09:00.
[0149] Net load is expressed as Net_Load = Electricity consumption (3) - Electricity generation (1) = 2kWh; Starting node: (8, 2); Explore all possible battery operations: Maximum discharge: -2kWh; Maximum charge: +2kWh.
[0150] Therefore, s_9 (the amount of electricity at point 9) can be between 2-2=0 and 2+2=4. That is, the possible values of s_9 are {0, 1, 2, 3, 4}.
[0151] Then calculate the edge and weight from (8, 2) to every possible (9, s_9): Target node (9, 0): Battery operation = s_9(0) - s_8(2) = -2kWh (discharge 2kWh); Purchased electricity = Net load (2) + Battery operation (-2) = 0 kWh; Weight: 0 * 1.2 = 0 yuan; Edge: (8, 2) -> (9, 0), weight is 0.
[0152] Target node (9, 1): Battery operation = 1 - 2 = -1 kWh (discharging 1 kWh); Purchased electricity = Net load (2) + Battery operation (-1) = 1kWh; Weight: 1 * 1.2 = 1.2 yuan; Edge: (8, 2) -> (9, 1), weight is 1.2.
[0153] Target node (9, 2): Battery operation = 2 - 2 = 0 kWh (idle); Purchased electricity = Net load (2) + Battery operation (0) = 2kWh; Weight: 2 * 1.2 = 2.4 yuan; Edge: (8, 2) -> (9, 2), weight is 2.4.
[0154] Target node (9, 3): Battery operation = 3 - 2 = 1 kWh (charging 1 kWh); Purchased electricity = Net load (2) + Battery operation (1) = 3kWh; Weight: 3 * 1.2 = 3.6 yuan; Edge: (8, 2) -> (9, 3), weight 3.6.
[0155] Target node (9, 4): Battery operation = 4 - 2 = 2kWh (2kWh charging); Purchased electricity = Net load (2) + Battery operation (2) = 4kWh; Weight: 4 * 1.2 = 4.8 yuan; Edge: (8, 2) -> (9, 4), weight 4.8.
[0156] The above operations construct the first layer of connections in the graph structure.
[0157] Then, starting from all nodes at t=9, repeat the above operation to construct the next layer of connections in the graph structure. That is, repeat this process for all nodes (9, 0), (9, 1), ... generated in the previous stage at t=9.
[0158] Similarly, the same method is used to construct the connections of nodes at t=10, and finally the graph structure is obtained.
[0159] Then, based on this graph structure, we find the shortest path. After the graph structure is constructed, we get a directed acyclic graph from t=8 to t=11. At this point, the preset goal can be transformed into finding the shortest path from the starting node (8,2) to any node in the t=11 level.
[0160] This process can be solved using Dijkstra's algorithm or a simpler dynamic programming algorithm.
[0161] For dynamic programming, the algorithm can be summarized as follows: Create a cost table (cost table), where cost[t][s] stores the minimum cumulative cost to reach node (t, s).
[0162] Initialize cost[8][2]=0, and all other cost values are infinity.
[0163] Traverse sequentially from 8 to 10 based on time t: For each node (t, s_t), if its cost is not infinite: Calculate all reachable neighbor nodes (t+1, s_{t+1}) and their corresponding edge weights w.
[0164] The cost of updating neighbors is: cost[t+1][s_{t+1}] = min(cost[t+1][s_{t+1}], cost[t][s_t] + w).
[0165] At the same time, record the path (for example, use a parent table to record which predecessor node updated each node).
[0166] After the traversal is complete, the minimum value in cost
[11] [s] is the minimum total cost for the entire period.
[0167] By backtracking from the lowest-cost endpoint using the parent table, the optimal charging and discharging path (i.e., the control strategy) can be obtained.
[0168] Through complete calculation, it can be found that a certain path has the lowest cumulative cost. For example, assuming the lowest cost is 2.0 yuan, the path is: (8, 2) -> (9, 0) -> (10, 2) -> (11, 1).
[0169] This path corresponds to the following control strategies: 08:00-09:00: The battery discharges from 2kWh to 0kWh, offsetting the entire net load, at a cost of 0.
[0170] 09:00-10:00: Photovoltaic surplus, batteries are charged from 0kWh to 2kWh, utilizing surplus power at zero cost.
[0171] 10:00-11:00: The battery discharges from 2kWh to 1kWh, offsetting part of the net load, with an electricity purchase cost of 2.0 yuan.
[0172] In this embodiment, after the server calculates the scheduling strategy, it can send the control strategy to the energy storage power generation entity at a preset time point or preset period based on the target communication protocol, so that the energy storage power generation entity can execute the control strategy. The target communication protocol is a message queue telemetry transmission protocol, a lightweight machine-to-machine protocol, or a data distribution service protocol.
[0173] For example, the server sends the control strategy to the energy management system or converter of the energy storage power generation entity, so that the energy storage power generation entity can control the charging or discharging power of the battery according to the control strategy.
[0174] Optionally, to ensure the continuity and effectiveness of the control strategy, the server can also receive execution status information fed back by the energy storage power generation entity during the execution of the control strategy; and when the execution status information indicates that there is an abnormal situation, the server can recalculate and adjust the control strategy.
[0175] That is, the server can continuously monitor the deviation between the actual execution results of the energy storage power generation entity and the control strategy, and store this information for the next rolling optimization, forming a closed-loop control.
[0176] For example, suppose it is currently 8:00 AM. The server can sense the following data: the dynamic electricity price for the next 24 hours (detecting that peak electricity prices occur between 7:00 PM and 9:00 PM), the weather forecast (expecting ample sunshine at midday), and the current battery level of 30%. The first processing model predicts a significant amount of photovoltaic power generation between 12:00 PM and 2:00 PM. The second processing model predicts a surge in electricity consumption after 6:00 PM.
[0177] The strategy for regulating this is to fully charge the batteries when electricity prices are stable at noon and there is a surplus of photovoltaic power (low-cost charging), and then discharge the batteries to meet household electricity needs during the peak electricity price period at 7 pm (high-value discharge). This is the lowest-cost strategy.
[0178] The algorithm outputs a control strategy: charge at 0.5kW from 8:00 to 9:00, charge at 2kW from 12:00 to 14:00, and discharge at 2kW from 19:00 to 21:00.
[0179] After receiving the control strategy, the photovoltaic power station executes the above operations. Suppose that at 8:15 a.m., the weather changes abruptly, the cloud cover thickens, and the power generation becomes abnormal. At this time, after receiving the information about the abnormal power generation, the server can introduce the new weather data into the first processing model, so that the first processing model can re-predict the power generation and immediately recalculate a new control strategy that is more in line with the current situation based on the re-predicted power generation.
[0180] The following is based on Figure 3 The module flowchart shown illustrates the intelligent control method in this application: The intelligent control method provided in this application includes the following modules: Third-party platforms, cloud-based energy management systems, and local energy management systems.
[0181] The third-party platform can be a third-party weather platform and / or a third-party electricity pricing platform. The third-party weather platform can provide historical environmental data (weather type, wind speed, temperature, humidity, light intensity, etc.). The third-party electricity pricing platform can provide real-time dynamic electricity prices or historical dynamic electricity prices.
[0182] The cloud-based energy management system (which can be understood as the server or terminal in this application) includes a first processing model and a second processing model. The training methods and operation schemes for the first and second processing models can be found in [reference needed]. Figure 2 The details of the proposed solution will not be elaborated here.
[0183] The cloud-based energy management system also includes a control strategy generation module, the process of which can be found in [reference needed]. Figure 2 The specific details of the described solution will not be elaborated here. In an exemplary solution, the control strategy can be as follows: Figure 4 As shown, it demonstrates a control strategy over a 24-hour period.
[0184] The local energy management system (which can be understood as the energy storage and power generation entity in this application) comprises two parts: real-time equipment data management and control strategy execution. The real-time equipment data management reports information such as real-time power generation, remaining battery capacity, and battery temperature to the cloud-based energy management system, enabling the cloud-based energy management system to perform recalculation. The control strategy execution executes the control strategies to control charging and discharging, power output, and target equipment.
[0185] By performing the above operations, a large-scale model is introduced to predict power generation based on environmental data and the hardware parameters of the energy storage and power generation entity (such as the power generation information of a photovoltaic power station). Simultaneously, a large-scale model is introduced to predict electricity consumption based on environmental data, holiday information, and the sum of total power consumption. This makes the predicted power generation and electricity consumption values more accurate. A graph structure is constructed by combining real-time electricity price information, predicted power generation, and predicted electricity consumption values. Based on this graph structure, control strategies are calculated to achieve off-peak electricity purchases and peak-peak electricity consumption, thereby reducing electricity costs.
[0186] To better implement the intelligent control method in the embodiments of this application, an intelligent control device is also provided in the embodiments of this application, such as... Figure 5 As shown, the intelligent control device 500 includes: The processing module 501 is used to call the first processing model to perform predictive processing on the environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain a predicted power generation value, which is used to characterize the power generation per unit time within the preset time period; and to call the second processing model to perform predictive processing on the holiday information, the environmental data and the load power value within the preset time period to obtain a predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. The acquisition module 502 is used to acquire electricity price information within the preset time period, and the electricity price information is used to represent the electricity price in each unit of time within the preset time period; The processing module 501 is used to construct a graph structure based on the predicted power generation value, the predicted power consumption value and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit time within the preset time period. The control strategy is calculated based on the graph structure.
[0187] In this embodiment, a large-scale model is introduced to predict power generation based on environmental data and the hardware parameters of the energy storage power generation entity (such as the power generation information of a photovoltaic power station). Simultaneously, a large-scale model is introduced to predict electricity consumption based on environmental data, holiday information, and the total power consumption. This makes the predicted power generation and electricity consumption values more accurate. A graph structure is constructed by combining real-time electricity price information, predicted power generation, and predicted electricity consumption values. Based on this graph structure, a control strategy is calculated to achieve off-peak electricity purchases and peak-peak electricity consumption, thereby reducing electricity costs.
[0188] In some embodiments of this application, the processing module 501 is specifically used for: The target algorithm is used to calculate the control strategy based on the preset target, constraints and graph structure. The preset target is that the electricity cost within the preset time period is lower than a preset threshold. The constraints include that the remaining battery power of the energy storage power generation unit meets a first threshold and the charging and discharging power of the energy storage power generation unit meets a second threshold.
[0189] In this embodiment, the preset targets and constraints are refined, which allows for the calculation of more targeted control strategies.
[0190] In some embodiments of this application, the target algorithm is a shortest path algorithm or a minimum spanning tree algorithm; The shortest path algorithms include Dijkstra's algorithm, Bellmanford's algorithm, and Floyd-Worshal's algorithm.
[0191] In this application embodiment, multiple algorithms are provided to improve the feasibility of the solution.
[0192] In some embodiments of this application, the first processing model is a long short-term memory network; The second processing model is a long short-term memory network.
[0193] In this embodiment, providing a long short-term memory network can more effectively improve the accuracy of long-term time-series prediction, thereby improving the accuracy of subsequent control strategies.
[0194] In some embodiments of this application, the acquisition module 502 is specifically used to call the target application interface to obtain the electricity price information within the preset time period; When the call to the target application interface fails, the local cached historical electricity price is obtained to determine the electricity price information within the preset time period.
[0195] In this application embodiment, multiple electricity price acquisition methods are provided, so that the scheme can be stably executed even in the event of network failure or data anomaly, thereby improving the feasibility of the scheme.
[0196] In some embodiments of this application, such as Figure 6 As shown, the intelligent control device also includes a transceiver module 503, which is used to send the control strategy to the energy storage power generation entity based on a target communication protocol at a preset time point or a preset period, so that the energy storage power generation entity can execute the control strategy. The target communication protocol is a message queue telemetry transmission protocol, a lightweight machine-to-machine protocol, or a data distribution service protocol.
[0197] In the embodiments of this application, multiple transmission timings and transmission protocols are provided, thereby making the solution applicable to various scenarios and providing the feasibility of the solution.
[0198] In some embodiments of this application, such as Figure 6 As shown, the transceiver module 503 is also used to receive execution status information fed back by the energy storage power generation entity; The processing module 501 is used to recalculate and adjust the control strategy when the execution status information indicates that there is an abnormal situation.
[0199] In this application embodiment, a recalculation scheme is provided, so that the regulation function of the photovoltaic power station can still operate stably in the event of network failure, data anomaly, etc., thereby ensuring the continuity of regulation.
[0200] This application also provides a computer device that integrates any of the intelligent control methods and apparatus for photovoltaic power plants provided in this application. The computer device includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor from the steps of the intelligent control method in any of the embodiments described above.
[0201] This application also provides a computer device that integrates any of the intelligent control and adjustment mechanisms provided in this application. For example... Figure 7 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically: The computer device may include components such as a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will understand that... Figure 7 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 701 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 702, and by calling data stored in the memory 702, it performs various functions of the computer device and processes data, thereby providing overall monitoring of the computer device. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 701.
[0202] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0203] The computer device also includes a power supply 703 that supplies power to the various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 703 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0204] The computer device may also include an input unit 704, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0205] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 701 in the computer device loads the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application programs stored in the memory 702 to realize various functions, as follows: The first processing model is invoked to perform predictive processing on the environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain the predicted power generation value, which is used to characterize the power generation per unit time within the preset time period. The second processing model is invoked to predict the holiday information, environmental data and load power value within the preset time period to obtain the predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. Obtain electricity price information within the preset time period, which is used to represent the electricity price per unit time within the preset time period; A graph structure is constructed based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit of time within the preset time period. The control strategy is calculated based on this graph structure.
[0206] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0207] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the intelligent control methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps: The first processing model is invoked to perform predictive processing on the environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain the predicted power generation value, which is used to characterize the power generation per unit time within the preset time period. The second processing model is invoked to predict the holiday information, environmental data and load power value within the preset time period to obtain the predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. Obtain electricity price information within the preset time period, which is used to represent the electricity price per unit time within the preset time period; A graph structure is constructed based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit of time within the preset time period. The control strategy is calculated based on this graph structure.
[0208] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0209] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0210] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0211] The above provides a detailed description of an intelligent control method, apparatus, device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An intelligent control method, characterized in that, include: The first processing model is invoked to perform predictive processing on environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain a predicted power generation value, which is used to characterize the power generation per unit time within the preset time period. The second processing model is invoked to perform prediction processing on the holiday information, environmental data and load power value within the preset time period to obtain the predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. Obtain electricity price information within the preset time period, wherein the electricity price information is used to represent the electricity price per unit time within the preset time period; A graph structure is constructed based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit of time within the preset time period. The control strategy is calculated based on the graph structure.
2. The method according to claim 1, characterized in that, The control strategies calculated based on the graph structure include: The control strategy is obtained by using a target algorithm based on the preset target, constraints, and the graph structure. The preset target is that the electricity cost within the preset time period is lower than a preset threshold. The constraints include the remaining battery power of the energy storage power generation unit meeting a first threshold and the charging and discharging power of the energy storage power generation unit meeting a second threshold.
3. The method according to claim 2, characterized in that, The target algorithm is either the shortest path algorithm or the minimum spanning tree algorithm; The shortest path algorithms include Dijkstra's algorithm, Bellmanford's algorithm, and Floyd-Worshal's algorithm.
4. The method according to claim 1, characterized in that, The first processing model is a long short-term memory network; The second processing model is a long short-term memory network.
5. The method according to claim 1, characterized in that, The process of obtaining electricity price information within the preset time period includes: Call the target application interface to obtain the electricity price information within the preset time period; When the call to the target application interface fails, the local cached historical electricity price is obtained to determine the electricity price information within the preset time period.
6. The method according to claim 1, characterized in that, The method further includes: At a preset time point or preset period, the control strategy is sent to the energy storage power generation entity based on the target communication protocol, so that the energy storage power generation entity executes the control strategy. The target communication protocol is a message queue telemetry transmission protocol, a lightweight machine-to-machine protocol, or a data distribution service protocol.
7. The method according to claim 6, characterized in that, The method further includes: Receive execution status information fed back by the energy storage power generation entity; When the execution status information indicates an abnormal situation, the control strategy is recalculated and adjusted.
8. An intelligent control device, characterized in that, include: The processing module is used to call the first processing model to perform predictive processing on environmental data and hardware parameters of the energy storage power generation entity within a preset time period to obtain a predicted power generation value. The predicted power generation value is used to characterize the power generation per unit time within the preset time period. The second processing model is invoked to perform prediction processing on the holiday information, environmental data and load power value within the preset time period to obtain the predicted electricity consumption value, which is used to characterize the electricity consumption per unit time within the preset time period. The acquisition module is used to acquire electricity price information within the preset time period, wherein the electricity price information is used to represent the electricity price per unit time within the preset time period; The processing module is used to construct a graph structure based on the predicted power generation, the predicted power consumption, and the electricity price information. The nodes of the graph structure are used to represent the remaining power in each unit of time within the preset time period, and the edges of the graph structure are used to represent the electricity cost in each unit of time within the preset time period. The control strategy is calculated based on the graph structure.
9. A computer device, characterized in that, The computer device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to perform the steps of the method according to any one of claims 1 to 7.