Household energy storage scheduling method and system based on spatiotemporal graph clustering and electricity price pre-caching

By adopting a three-layer collaborative architecture based on spatiotemporal graph clustering and electricity price pre-caching, cross-household surplus power mutual assistance and resource optimization of residential energy storage systems are realized, solving the problems of resource mismatch and high grid dispatching costs under independent control, and improving the overall efficiency and adaptability of energy storage systems.

CN122639232APending Publication Date: 2026-08-25JIANGSU WOTAIRUI CHU NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610861067.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing residential energy storage systems cannot achieve cross-household surplus power sharing under independent control, resulting in high grid dispatch costs and severe resource mismatch. Furthermore, existing clustering methods fail to effectively utilize the spatial complementarity and behavioral similarity among users, leading to unsuitable control strategies.

Method used

A three-layer collaborative architecture based on spatiotemporal graph clustering and electricity price pre-caching is adopted. Through user spatiotemporal graph clustering, electricity price-load joint prediction and deep reinforcement learning, charging and discharging instructions for each household's energy storage device are generated, and continuous evolution of cross-community models is achieved through federated learning.

Benefits of technology

It enables collaborative scheduling of community-level energy storage devices, reduces grid dispatching costs, improves resource utilization efficiency, avoids resource mismatch, provides differentiated control strategies, and improves peak-valley arbitrage efficiency and system robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122639232A_ABST
    Figure CN122639232A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of distributed household energy storage scheduling, in particular to a household energy storage scheduling method and system based on space-time graph clustering and electricity price pre-caching, which adopts a cloud-edge-end three-layer collaborative architecture, identifies electricity consumption behavior clusters through the space-time graph clustering of geographic coordinates, social tags and load curves, predicts electricity price-load peaks based on a DLinear model and generates energy storage pre-caching target SOC, realizes the pre-deployment of energy storage SOC, aggregates physically dispersed household energy storage devices into a community virtual energy storage pool for collaborative scheduling by using an A3C algorithm with cluster-level action mask, and realizes the continuous evolution of cross-community models through federated learning; the present application solves the problems of low independent operation efficiency, lagging charge-discharge strategy and poor adaptation to user heterogeneity of household energy storage in the prior art, improves the peak-valley arbitrage efficiency, reduces the power flow impact of the distribution network and the battery attenuation loss, and effectively protects the user electricity privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed residential energy storage scheduling technology, specifically a residential energy storage scheduling method and system based on spatiotemporal graph clustering and electricity price pre-caching. Background Technology

[0002] With the rapid growth of the residential energy storage market in Europe and Australia, a typical residential energy storage system architecture includes a hardware layer, a control layer, and an interaction layer. The hardware layer consists of photovoltaic modules, energy storage batteries, hybrid inverters, and smart meters. The control layer is a local energy management system (EMS) used to run charge and discharge optimization algorithms. The interaction layer communicates bidirectionally with the grid through an advanced metering system (AMI) to receive real-time electricity price (RTP) or time-of-use (TOU) signals. Existing residential energy storage systems generally adopt an independent control architecture. Each household's energy storage device makes local decisions based solely on its own photovoltaic output, load curve, and real-time electricity price. This island-like operation mode leads to the underutilization of spatial complementarity. Within the same community, when household A has a photovoltaic surplus, household B may be experiencing peak load, but current technology cannot achieve cross-household surplus power sharing. Furthermore, when multiple households simultaneously purchase or sell electricity to the grid, it can cause power flow impacts on the distribution network, increasing grid dispatch costs, which are ultimately passed on to users as surcharges on electricity prices. Moreover, the battery capacity of a single household is typically 5-20 kWh, which is limited and cannot cover the entire peak electricity price period, resulting in resource mismatch where charged electricity is either unused or insufficient. When multiple households in a community simultaneously perform independent optimization, individual optimal solutions can accumulate into globally suboptimal or even infeasible solutions. For example, multiple households simultaneously selling electricity to the grid may cause transformer reverse overload, triggering grid protective tripping.

[0003] In recent years, user allocation and cache optimization technologies in mobile edge computing (MEC) have provided cross-domain inspiration for energy systems, including user geographic aggregation for spatial correlation modeling of application electrical load, edge cache preloading corresponding to energy storage SOC pre-deployment, and A3C asynchronous training corresponding to multi-agent collaborative optimization. However, existing energy field research has not systematically transferred the ideas of geographic-behavioral aggregation and cache preloading from the field of communications to residential energy storage scenarios.

[0004] Current mainstream technologies use rule-driven or model predictive control (MPC) to optimize charging and discharging strategies. Rule-driven methods rigidly cope with dynamic electricity prices and cannot capture the randomness and suddenness of price spikes. Although MPC methods introduce prediction, the optimization window is usually only 4-24 hours, and the battery is treated as a passive response resource. The reference SOC in the optimization target is usually set to a fixed value (such as 50%), which is not dynamically adjusted according to the future electricity price distribution. There is no explicit mapping between predicting high price periods and increasing SOC in advance. The battery charging and discharging is still following rather than leading.

[0005] Furthermore, existing user clustering methods only utilize the temporal characteristics of load curves, neglecting spatial and social characteristics. They fail to identify geographically adjacent user groups with similar behaviors, missing structural opportunities for collaborative optimization within communities. Moreover, the clustering results are uninterpretable, making it difficult to guide the design of differentiated control strategies. They also confuse highly resilient users with inelastic users, resulting in control strategies that are too conservative for the former and too aggressive for the latter. Therefore, in response to the above situation, there is an urgent need to develop a residential energy storage scheduling method and system based on spatiotemporal graph clustering and electricity price pre-caching to overcome the shortcomings in current practical applications. Summary of the Invention

[0006] The purpose of this invention is to provide a method and system for scheduling residential energy storage based on spatiotemporal graph clustering and electricity price pre-caching, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching adopts a three-layer collaborative architecture of cloud-edge-device, including the following steps: S1. Perform spatiotemporal clustering of electricity consumption behavior of users in the community to obtain multiple electricity consumption behavior clusters; S2. Perform joint time-series forecasting of electricity price and load, and generate target SOC for energy storage pre-buffering based on the forecast results; S3. Based on the electricity consumption behavior cluster and the pre-cached target SOC, a deep reinforcement learning algorithm is used to coordinate the scheduling of the community virtual energy storage pool and generate charging and discharging power instructions for each household's energy storage device. S4. Convert the charging and discharging power command into a real-time charging and discharging power setting value and send it to the household energy storage terminal for execution. S5. Achieve continuous evolution of cross-community models through federated learning.

[0008] As a further aspect of the present invention: step S1 specifically includes: S11. Collect the user's geographic coordinates, social tag vectors, and historical load curves as input data; S12. Construct a user spatiotemporal graph, where nodes represent users and edge weights are determined based on geographical distance, social tag similarity, and load curve correlation between users. S13. A graph neural network is used to learn node embeddings, and the node embeddings are clustered to obtain multiple electricity consumption behavior clusters and cluster-level representative load curves.

[0009] As a further aspect of the present invention: step S2 specifically includes: S21. Collect historical electricity price sequences, community aggregated load sequences, meteorological data, and event markers as input data; S22. A linear time-series forecasting model is used to perform multivariate multi-step forecasting to obtain electricity price forecasting sequences and load forecasting sequences for multiple future time periods. S23. Based on the electricity price forecast, forecast uncertainty and contextual characteristics, predict the probability of electricity price peaks occurring at each time point; S24. Based on the peak electricity price probability and load forecast, dynamically generate the target SOC for energy storage pre-buffering for each time period. The target SOC is calculated using the following formula: in: Basic SOC level; Pre-buffering increments for peak electricity prices; Pre-cache incremental load spikes; This is a limiting function that restricts the target SOC within the safe operating range of the battery.

[0010] As a further aspect of the present invention: step S3 specifically includes: S31. The community energy storage collaborative scheduling problem is modeled as a Markov decision process, defining a state space, an action space, and a multi-objective reward function. The reward function includes grid interaction cost, battery degradation cost, power supply quality deviation, carbon emission reduction benefit, and collaborative consistency reward. S32. The Asynchronous Advantageous Actor-Critic (A3C) algorithm is used for training and decision-making. A cluster-level action mask is introduced at the output layer of the policy network to filter invalid actions and ensure that user actions within the same cluster are coordinated. The cluster-level action mask is implemented by the following formula: in, Based on the current cluster state The generated set of valid actions, The action probabilities output by the original policy network. (·) is an indicator function; S33, outputs the optimal charging and discharging power command for each household's energy storage device and the community power grid interaction power.

[0011] As a further aspect of the present invention: step S4 specifically includes: S41. Model predictive control (MPC) is used to refine the hourly target SOC into minute-level charging and discharging trajectories; S42. Real-time monitoring of system operation status; when the deviation between real-time measurement and prediction exceeds a preset threshold or a power grid event occurs, trigger re-optimization. S43. Generate and distribute the real-time charging and discharging power settings for each household's energy storage terminal.

[0012] As a further aspect of the present invention: step S5 specifically includes: S51. Each community edge controller independently trains its local model based on local data; S52. Add Gaussian noise to the local model parameters, perform differential privacy encryption, and then upload them to the cloud; S53. The cloud uses the FedAvg algorithm to aggregate the encrypted local model parameters to obtain the global model parameters; S54. Distribute the global model parameters to each community edge controller to replace the local model parameters.

[0013] The residential energy storage dispatch system based on spatiotemporal graph clustering and electricity price pre-caching includes a cloud platform, a community edge collaborative controller, and residential energy storage terminals, forming a three-layer collaborative architecture of cloud-edge-device. The cloud platform is used to realize federated learning and global aggregation of cross-community models; The community edge collaborative controller is used to perform spatiotemporal graph clustering of user electricity consumption behavior, joint prediction of electricity price and load, collaborative scheduling decision-making, and decomposition of pre-cached instructions. The household energy storage terminal is used to receive the charging and discharging power setting value and perform local charging and discharging operations, while uploading real-time operating data.

[0014] As a further aspect of the present invention: the community edge collaborative controller integrates: The user spatiotemporal clustering module is used to perform spatiotemporal graph clustering of user electricity consumption behavior and generate user cluster labels and cluster-level representative load curves. The electricity price-load joint forecasting engine is used to perform joint time-series forecasting of electricity price and load and electricity price peak probability modeling, generating electricity price forecasting sequences, load forecasting sequences, and peak probability sequences. The A3C collaborative decision engine is used to execute collaborative scheduling of community virtual energy storage pools based on A3C, and generate optimal charging and discharging power instructions for each household's energy storage. The SOC pre-cache actuator is used to perform pre-cache trajectory generation and event-triggered correction, generating real-time charging and discharging power settings for each household's energy storage terminal.

[0015] As a further aspect of the present invention: the cloud platform includes: The federated training module is used to coordinate local model training across communities; The model aggregation module is used to aggregate encrypted local model parameters using the FedAvg algorithm; The parameter distribution module is used to distribute the aggregated global model parameters to each community edge controller.

[0016] As a further aspect of the present invention: the household energy storage terminal includes photovoltaic modules, energy storage batteries, hybrid inverters, smart meters, and local control units; The local control unit communicates with the community edge collaborative controller, receives the charging and discharging power setting value, controls the hybrid inverter to perform charging and discharging operations, and uploads real-time operating data to the community edge collaborative controller.

[0017] Compared with the prior art, the beneficial effects of the present invention are: It realizes the collaborative scheduling of multi-household energy storage devices at the community level, transforms physically dispersed household energy storage devices into logically unified community virtual energy storage pools, makes full use of the spatial complementarity between users, realizes cross-household surplus power mutual assistance, avoids the power flow impact of multiple households interacting with the grid at the same time, reduces grid dispatching costs and user-side electricity price surcharges, improves peak-valley arbitrage efficiency, and solves the resource mismatch problem caused by the limited battery capacity of a single household; It enables the pre-deployment of energy storage SOC. By using DLinear-based electricity price-load joint time-series forecasting and peak probability modeling, it can accurately predict future electricity price peaks and load peak periods. It also constructs an explicit pre-buffering objective function to dynamically adjust the energy storage pre-charge target SOC. This solves the problems of post-event response of charging and discharging strategies and inability to capture the randomness and suddenness of electricity price peaks in existing technologies, and significantly improves the utilization efficiency of energy storage resources and peak-valley arbitrage benefits. A differentiated user control strategy was implemented. By using a spatiotemporal graph clustering method that integrates the three features of geographic coordinates, social tags and load curves, the clusters of users that are geographically adjacent and have similar electricity consumption behaviors within the community were accurately identified. This avoided the adaptation failure problem caused by a one-size-fits-all strategy, provided a reasonable grouping basis for cluster-level collaborative scheduling, and reduced control complexity. It maximizes the overall benefits of the community by using the A3C reinforcement learning algorithm with cluster-level action mask for collaborative scheduling. It constructs a multi-objective reward function that includes grid interaction cost, battery degradation cost, power quality deviation, carbon emission reduction benefits, and collaborative consistency reward. At the same time, the cluster-level action mask mechanism ensures the charging and discharging coordination of users within the same cluster, avoids internal circulating current loss, and solves the action conflict problem in multi-agent reinforcement learning. The robustness and reliability of the scheduling system have been improved. Through the event-triggered MPC correction mechanism, it can quickly respond to prediction deviations and sudden power grid events, ensuring that the battery status accurately tracks the pre-cached target. At the same time, through the cross-community model evolution framework of federated learning and differential privacy, the collaborative utilization of cross-community data has been achieved while protecting the user's electricity privacy, which has improved the model's generalization ability and enabled it to adapt to long-term changes in electricity consumption behavior, electricity pricing mechanisms and power grid environment. Attached Figure Description

[0018] Figure 1 This is an architecture diagram of a cloud-edge-device-based collaborative scheduling system for residential energy storage, as described in an embodiment of the present invention.

[0019] Figure 2 This is a flowchart of the residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching in an embodiment of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0022] Please see Figure 1 and Figure 2 The residential energy storage scheduling method and system based on spatiotemporal graph clustering and electricity price pre-caching provided in this invention realizes the collaborative optimization scheduling of community-level distributed residential energy storage by constructing a three-layer collaborative architecture of "cloud-edge-device". This solves the problems of low independent operation efficiency, lagging charging and discharging strategies and poor user heterogeneity adaptation in the existing technology.

[0023] I. Overall Technical Architecture This invention adopts a three-layer collaborative architecture of "cloud-edge-device", and the functions and interaction relationships of each layer are as follows: 1. Cloud-based: Deploys a federated learning collaborative training module and a global model aggregation module, including a large-scale electricity price prediction model, a federated A3C policy network, and a global electricity consumption behavior graph neural network. The cloud receives encrypted local model parameters uploaded by each community edge controller, performs federated aggregation to obtain the global model, and then distributes the encrypted global model parameters to each community edge controller. The cloud-based federated learning architecture enables collaborative utilization of cross-community data while protecting user electricity consumption privacy, thereby improving model generalization capabilities.

[0024] 2. Edge Layer: Each community deploys one community edge collaborative controller, integrating a user spatiotemporal clustering module, an electricity price-load joint forecasting engine, an A3C collaborative decision-making engine, and an energy storage SOC pre-caching actuator. The community edge collaborative controller is responsible for collecting information such as the geographic coordinates, social tags, historical load curves, real-time electricity prices, and meteorological data of users in its community, executing user clustering, forecasting, decision-making, and pre-caching instruction decomposition, and sending control instructions to household energy storage terminals.

[0025] 3. End Layer: Each household is equipped with one household energy storage terminal, including photovoltaic modules, energy storage batteries, hybrid inverters, smart meters, and local control units. The household energy storage terminal receives the charging and discharging power settings issued by the community edge collaborative controller, performs local charging and discharging operations, and uploads real-time operating data (current SOC, photovoltaic output, household load, and grid interaction power) to the community edge collaborative controller.

[0026] The above architecture aggregates physically dispersed residential energy storage devices into a logically unified community virtual energy storage pool, enables rapid local decision-making through edge computing, and achieves continuous model evolution through cloud-based federated learning, thus balancing real-time scheduling with global optimization.

[0027] II. Specific Implementation Steps of the Household Energy Storage Collaborative Dispatch Method Step 1: Spatiotemporal graph clustering of user electricity consumption behavior The purpose of this step is to identify user clusters within the community that are "geographically adjacent and have similar electricity consumption behaviors," providing a structural foundation for subsequent coordinated scheduling.

[0028] 1. Input data: User geographic coordinates: , , For community users; User social tag vector: This includes factors such as occupation type, number of family members, building area, and whether there are EV charging stations. Historical load curve: 2. Processing procedure: (1) Constructing a spatiotemporal graph : Node: Each user ; Edge set If the geographical distance between two users Then there exists an edge. ; Adjacency matrix Elements: in, This refers to social label similarity (cosine similarity). The Pearson correlation coefficient is the load curve.

[0029] (2) Graph convolution clustering: Node embeddings are learned using a Graph Attention Network (GAT). Graph Attention Networks are well-known neural network models for feature extraction from graph-structured data, capable of adaptively learning the importance of neighboring nodes through an attention mechanism. The node embedding update formula is as follows: in, Attention coefficient For learnable parameters, For users The set of neighbors.

[0030] (3) Clustering output: Clustering of node embeddings using K-means++ yields the following results: User clusters .

[0031] Output: Each user Cluster tags and cluster-level representative load curves .

[0032] This step integrates geographic coordinates, social tags, and load curves to construct a spatiotemporal map, which can accurately identify user groups with geographic clustering and behavioral similarities. It overcomes the shortcomings of traditional K-means clustering, which only utilizes temporal features, and provides a reasonable grouping basis for subsequent cluster-level collaborative scheduling, avoiding the increased communication costs and control complexity caused by cross-cluster scheduling.

[0033] Step 2: Joint Time-Series Forecasting of Electricity Price and Load and Peak Pre-buffering Decision The purpose of this step is to predict future peak electricity prices and peak load periods, generate the pre-charge target SOC of the energy storage battery, and realize the pre-deployment of energy storage resources.

[0034] 1. Input data: Historical electricity price series: Community aggregated load sequence: Meteorological data: temperature, irradiance, and humidity, etc.; Holiday markers and event markers (such as sports events and extreme weather warnings).

[0035] 2. Processing procedure: (1) DLinear multivariate time series prediction: Multi-step forecasting is performed using the DLinear model. DLinear is a well-known linear time series forecasting model in this field. It decomposes the time series into trend and seasonal components for linear forecasting, offering advantages such as high computational efficiency and good accuracy in long-series forecasts. The forecasting formula is as follows: in: The input is a multivariate sequence (including features such as electricity price, load, and weather). These are the seasonal and trend terms obtained through moving average decomposition. It is a learnable linear projection matrix. To predict the step size (e.g., the next 24 hours). For forecast output (including electricity price forecast and load forecast).

[0036] (2) Electricity price peak probability modeling: Based on electricity price forecasts, forecast uncertainties, and contextual characteristics, predict the probability of electricity price spikes occurring at each time point: in: for Forecasted electricity price at any time To predict uncertainty (calculated by integrating the output standard deviation of multiple linear heads via DLinear). For contextual features (including time period type, day-ahead market clearing price, etc.). For the Sigmoid function, (3) Peak pre-caching decision: Define the energy storage pre-buffering objective function and dynamically adjust the target SOC at each time step: in: Set the baseline SOC level (usually set to 40%-60%). Pre-buffering incremental increases for peak electricity prices This is the pre-caching strength coefficient; Pre-caching increments for load spikes To predict peak loads, The rated power of the inverter, The load pre-buffering factor; This is a limiting function that restricts the target SOC within the safe operating range of the battery (typically...). =20%, =90%.

[0037] When high electricity prices or high loads are predicted in the future, the battery SOC is increased in advance to ensure sufficient power for arbitrage or supply guarantee during peak periods.

[0038] 3. Output results: future Electricity price forecast series for different time periods ; future Load forecast sequence for different time periods ; Pre-cached target SOC for each time period: ; Electricity price peak probability sequence: ; This step employs the DLinear model to achieve high-precision joint forecasting of electricity price and load, and innovatively introduces peak probability modeling, upgrading the traditional "point forecasting" to "probabilistic forecasting," which can quantify forecast uncertainty. At the same time, an explicit pre-caching objective function is constructed, establishing a mapping relationship of "predicting high price / high load periods → increasing battery SOC in advance," realizing the pre-deployment of energy storage resources and solving the problems of lagging charging and discharging strategies and low peak-valley arbitrage efficiency in existing technologies.

[0039] Step 3: Collaborative Scheduling of Community Virtual Energy Storage Pools Based on A3C The purpose of this step is to achieve dynamic optimization of community-level multi-repository collaboration through deep reinforcement learning, based on the user cluster structure and pre-caching objectives, so as to maximize the overall benefits of the community.

[0040] 1. MDP modeling: The community energy storage coordinated scheduling problem is modeled as a Markov decision process (MDP), with the elements defined as follows: Detailed definitions of each component of the reward function: Grid interaction costs: ,in, The electricity purchase price from the grid, The price of electricity supplied to the power grid; Battery degradation cost: ;in, Cost of capacity decay per unit charge / discharge. This is the deep discharge correction factor based on the current SOC; Power quality deviation: This is used to penalize situations where loads are not met. Benefits of carbon emission reduction: ;in, For carbon trading prices, Real-time carbon emission intensity of the power grid; Coordination and Consistency Rewards: ;in, The collaboration coefficient is a reward item that encourages users within the same cluster to maintain collaboration in their SOC (System of Common Origin). The smaller the variance, the higher the reward.

[0041] 2. A3C Training and Execution: (1) Global-local network architecture: Global Policy Network and value network Deployed in the cloud, The A3C algorithm, a well-known asynchronous deep reinforcement learning algorithm in the field, uses multiple local workers (each corresponding to a typical community scenario) to asynchronously and in parallel collect experience. By training multiple workers in parallel, it can significantly improve training efficiency and model stability.

[0042] (2) Calculation of the dominance function: The advantage function is calculated using an n-step return calculation: in, This is the discount factor.

[0043] (3) Policy gradient update: Update global policy network parameters based on the advantage function: (4) Cluster-aware action mask Cluster-level action masks are introduced at the policy network output layer to filter invalid actions and ensure coordinated user actions within the same cluster. The set of valid actions... Based on the current cluster state Dynamically generated, the specific generation logic is as follows: 1. Cluster-level state variable calculation Define cluster Net load status: in: :cluster At any moment The net load power, usually in kW; if This indicates that the total photovoltaic output within the cluster exceeds the total load, resulting in a power surplus; if This indicates that there is a power shortage within the cluster; :cluster Inner Index for each user ; :cluster The set of users included; : No. At any time The household load power, in kW, is obtained from real-time measurement by the smart meter. : No. At any time The photovoltaic output power, in kW, is reported by the inverter or photovoltaic monitoring equipment.

[0044] Define cluster Pre-caching target deviation: in: :cluster At any moment The pre-cached target bias is dimensionless; if This indicates that the overall cluster power is lower than the pre-buffered target and requires additional power; if This indicates that the total power of the cluster is higher than the pre-cached target, and power can be released; :cluster At any moment The pre-cached target SOC is dimensionless and has a range of values. This is generated by step S24 (peak pre-caching decision); :cluster At any moment The average SOC, dimensionless, is calculated using the following formula: ; : No. Home energy storage batteries at all times The state of charge, dimensionless, range of values. This information is reported in real time by the Battery Management System (BMS). :cluster Total number of users within the platform.

[0045] 2. Rules for generating valid action sets Rule 1 (Forced Charging): If and (If the total photovoltaic output within the cluster exceeds the total load, resulting in a photovoltaic surplus), then the effective set of actions for this cluster is limited to: At this time, all users within the cluster are prohibited from performing discharge actions, i.e. Prioritize utilizing surplus photovoltaic power to increase the SOC of energy storage in order to track pre-cached targets.

[0046] Rule 2 (Forced Discharge Supply / Arbitrage): If and (If the total load within the cluster exceeds the total photovoltaic output, and the cluster faces a power shortage or peak electricity prices), then the effective action set for that cluster is limited to: At this time, all users within the cluster are prohibited from performing charging actions, i.e. The released energy from the storage system can be used to meet load demand or participate in high-price arbitrage.

[0047] Rule 3 (Constraint Dimensionality Reduction, Avoiding Internal Circulation): When the system does not satisfy Rule 1 or Rule 2, combinations of actions where some users charge and some users discharge within the same cluster are prohibited. Specifically, the following action pairs are prohibited from existing simultaneously: At this point, the set of valid actions is limited to all users within the cluster executing the same actions. Or implement uniformly Specifically, the output of the policy network is determined after being filtered by the cluster-level action mask.

[0048] in: : No. Home energy storage devices at all times Charging power, in kW This indicates that the user is performing a charging action; : No. Home energy storage devices at all times The discharge power, in kW. This indicates that the user is performing a discharge action; :cluster Indexes for any two users.

[0049] 3. Mask Formula Based on the above rules, the probability distribution of the masked strategy is as follows: in: : The conditional action probability distribution after cluster-level action masking, i.e., in state Select action The probability of; The unmasked action probability distribution output by the original Policy Network. These are the learnable parameters of the policy network; :time The joint action vector includes the charging and discharging power of all users in the community and the power exchange with the grid; :time The system state vector contains information such as each household's SOC, current electricity price, prediction sequence, and cluster label; Indicator function: When an action... The value is 1 if the constraints of the valid action set of all clusters are satisfied at the same time, and 0 otherwise. :cluster At any moment Based on cluster state The generated set of valid actions; :cluster At any moment The cluster state vector, as described above and Composed of equal variables; The total number of user clusters within the community; : Intermediate action variables used for normalization summation, traversing all valid actions that satisfy the constraints; The intersection operator represents an action. All must be satisfied simultaneously Effective action constraints for each cluster.

[0050] 4. Output results: Optimal charge and discharge power commands for each household's energy storage devices and community power grid interaction power .

[0051] This step constructs a multi-objective reward function that includes grid cost, battery degradation, power quality, carbon emission reduction, and collaborative consistency, which can maximize the overall benefits of the community. It innovatively introduces a cluster-level action masking mechanism to solve the action conflict problem that is prone to occur in multi-agent reinforcement learning, ensuring that users within the same cluster charge and discharge in coordination and avoiding internal circulating current losses. At the same time, it adopts the A3C asynchronous training architecture, which can quickly adapt to the power consumption characteristics of different communities and improve the generalization ability of the scheduling strategy.

[0052] Step 4: Energy Storage SOC Pre-Cache Execution and Real-Time Correction The purpose of this step is to translate the target SOC of the A3C decision into an executable minute-level charge and discharge trajectory, and to address prediction biases and unexpected grid events.

[0053] 1. Input data: A3C output target SOC: ; Real-time measurements: current SOC, PV output, household load, and grid frequency.

[0054] 2. Processing procedure: (1) Pre-buffered trajectory generation: Model predictive control (MPC) is used to refine the hourly target SOC into a minute-level charge / discharge plan, with the optimization objective being: Constraints: in, Optimize the MPC window (usually set to 15-60 minutes). , These refer to the battery charge and discharge efficiency. Let be the energy storage battery capacity of the j-th household, Δt be the control step size (usually set to 1 minute), and Q and R be the weight matrix.

[0055] (2) Event-triggered correction mechanism: When the deviation between real-time measurement and prediction exceeds a preset threshold, or when a power grid event occurs, re-optimization is triggered. 3. Output results: Real-time charging and discharging power settings for each household's energy storage terminal.

[0056] This step uses MPC to transform the macroscopic target SOC into a microscopic executable charge and discharge trajectory, ensuring that the battery state can accurately track the pre-cached target; at the same time, it introduces an event-triggered correction mechanism, which can quickly respond to prediction deviations and sudden power grid events, improving the robustness and reliability of the scheduling system.

[0057] Step 5: Federated learning-driven continuous model evolution The purpose of this step is to achieve collaborative evolution of cross-community models while protecting user privacy, thereby continuously improving the performance of scheduling strategies.

[0058] 1. Input data: Encrypted local model parameters uploaded by each community edge controller.

[0059] 2. Processing procedure: (1) Local training: Each community edge controller independently trains the user spatiotemporal clustering model, the electricity price-load joint prediction model, and the A3C policy network based on the user data collected locally; (2) Differential privacy encryption: Before uploading model parameters, each community adds Gaussian noise to the parameters: in, For noise variance, differential privacy is a well-known privacy protection technique in the field, which can prevent the leakage of user privacy information from model parameters while ensuring model availability; (3) Federated Aggregation: The FedAvg algorithm is used in the cloud to aggregate the encrypted model parameters uploaded by each community to obtain the global model parameters: Where r represents the number of federal training rounds, Let n be the number of samples in the m-th community, and n be the total number of samples in all communities. (4) Parameter distribution: The cloud distributes the aggregated global model parameters to the edge controllers of each community to replace the local model parameters.

[0060] 3. Output results: Continuously evolving global model parameters.

[0061] This step employs a federated learning + differential privacy architecture, achieving "usable but not visible" cross-community data. This not only solves the problem of poor model generalization ability caused by insufficient data in a single community, but also effectively protects users' electricity privacy. At the same time, through continuous model updates, it can adapt to long-term changes in electricity consumption behavior, electricity pricing mechanisms, and the power grid environment, maintaining the optimality of the scheduling strategy.

[0062] The present invention also provides a distributed residential energy storage collaborative scheduling system for implementing the above method, comprising: 1. Community Edge Collaboration Controller: Deployed in each community, integrating the following modules: User spatiotemporal clustering module: used to perform spatiotemporal graph clustering of user electricity consumption behavior as described in step 1, and generate user cluster labels and cluster-level representative load curves; Electricity price-load joint forecasting engine: used to perform DLinear multivariate time series forecasting and electricity price peak probability modeling as described in step 2, generating electricity price forecasting sequence, load forecasting sequence and peak probability sequence; A3C Collaborative Decision Engine: Used to execute the collaborative scheduling of the community virtual energy storage pool based on A3C as described in step 3, and generate the optimal charging and discharging power instructions for each household's energy storage. SOC pre-cache actuator: used to perform the pre-cache trajectory generation and event trigger correction described in step 4, and generate the real-time charging and discharging power setting value for each household energy storage terminal.

[0063] 2. Household energy storage terminal: Deployed in each household, including photovoltaic modules, lithium iron phosphate energy storage batteries, hybrid inverters, smart meters and local control units; the local control unit communicates with the community edge collaborative controller, receives charging and discharging power settings, controls the hybrid inverter to perform charging and discharging operations, and uploads real-time operating data to the community edge collaborative controller.

[0064] 3. Cloud-based Federated Learning Platform: Deployed on a cloud server, including a federated training module, a model aggregation module, and a parameter distribution module; used to execute the federated learning process described in step 5, and to achieve collaborative evolution of cross-community models.

[0065] The aforementioned system achieves centralized management and decentralized control of distributed household energy storage through a three-layer collaboration of "cloud-edge-device," which can effectively improve the energy utilization efficiency of the community, reduce the electricity cost for users, and alleviate the dispatching pressure on the power distribution network.

[0066] It should be noted that, in this invention, although the specification describes the embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching, characterized in that, The cloud-edge-device three-layer collaborative architecture is adopted, including the following steps: S1. Perform spatiotemporal clustering of electricity consumption behavior of users in the community to obtain multiple electricity consumption behavior clusters; S2. Perform joint time-series forecasting of electricity price and load, and generate target SOC for energy storage pre-buffering based on the forecast results; S3. Based on the electricity consumption behavior cluster and the pre-cached target SOC, a deep reinforcement learning algorithm is used to coordinate the scheduling of the community virtual energy storage pool and generate charging and discharging power instructions for each household's energy storage device. S4. Convert the charging and discharging power command into a real-time charging and discharging power setting value and send it to the household energy storage terminal for execution. S5. Achieve continuous evolution of cross-community models through federated learning.

2. The residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching according to claim 1, characterized in that, Step S1 specifically includes: S11. Collect the user's geographic coordinates, social tag vectors, and historical load curves as input data; S12. Construct a user spatiotemporal graph, where nodes represent users and edge weights are determined based on geographical distance, social tag similarity, and load curve correlation between users. S13. A graph neural network is used to learn node embeddings, and the node embeddings are clustered to obtain multiple electricity consumption behavior clusters and cluster-level representative load curves.

3. The residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching according to claim 1, characterized in that, Step S2 specifically includes: S21. Collect historical electricity price sequences, community aggregated load sequences, meteorological data, and event markers as input data; S22. A linear time series forecasting model is used to perform multivariate multi-step forecasting to obtain electricity price forecasting sequences and load forecasting sequences for multiple future time periods. S23. Based on the electricity price forecast, forecast uncertainty and contextual characteristics, predict the probability of electricity price peaks occurring at each time point; S24. Based on the peak electricity price probability and load forecast, dynamically generate the target SOC for energy storage pre-buffering for each time period. The target SOC is calculated using the following formula: in: Basic SOC level; Pre-buffering increments for peak electricity prices; Pre-cache increments for load spikes; This is a limiting function that restricts the target SOC within the safe operating range of the battery.

4. The residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching according to claim 1, characterized in that, Step S3 specifically includes: S31. The community energy storage collaborative scheduling problem is modeled as a Markov decision process, defining a state space, an action space, and a multi-objective reward function. The reward function includes grid interaction cost, battery degradation cost, power supply quality deviation, carbon emission reduction benefit, and collaborative consistency reward. S32. The Asynchronous Advantageous Actor-Critic (A3C) algorithm is used for training and decision-making. A cluster-level action mask is introduced at the output layer of the policy network to filter invalid actions and ensure that user actions within the same cluster are coordinated. The cluster-level action mask is implemented by the following formula: in, Based on the current cluster state The generated set of valid actions, The action probabilities output by the original policy network. (·) is an indicator function; S33, outputs the optimal charging and discharging power command for each household's energy storage device and the community power grid interaction power.

5. The residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching according to claim 1, characterized in that, Step S4 specifically includes: S41. Model predictive control (MPC) is used to refine the hourly target SOC into minute-level charging and discharging trajectories; S42. Real-time monitoring of system operation status; when the deviation between real-time measurement and prediction exceeds a preset threshold or a power grid event occurs, trigger re-optimization. S43. Generate and distribute the real-time charging and discharging power settings for each household's energy storage terminal.

6. The residential energy storage scheduling method based on spatiotemporal graph clustering and electricity price pre-caching according to claim 1, characterized in that, Step S5 specifically includes: S51. Each community edge controller independently trains its local model based on local data; S52. Add Gaussian noise to the local model parameters, perform differential privacy encryption, and then upload them to the cloud; S53. The cloud uses the FedAvg algorithm to aggregate the encrypted local model parameters to obtain the global model parameters; S54. Distribute the global model parameters to each community edge controller to replace the local model parameters.

7. A residential energy storage dispatch system based on spatiotemporal graph clustering and electricity price pre-caching, characterized in that, It includes a cloud platform, a community edge collaborative controller, and a household energy storage terminal, forming a three-layer collaborative architecture of cloud-edge-device; The cloud platform is used to realize federated learning and global aggregation of cross-community models; The community edge collaborative controller is used to perform spatiotemporal graph clustering of user electricity consumption behavior, joint prediction of electricity price and load, collaborative scheduling decision-making, and decomposition of pre-cached instructions. The household energy storage terminal is used to receive the charging and discharging power setting value and perform local charging and discharging operations, while uploading real-time operating data.

8. The residential energy storage dispatching system based on spatiotemporal graph clustering and electricity price pre-caching according to claim 7, characterized in that, The community edge collaborative controller integrates: The user spatiotemporal clustering module is used to perform spatiotemporal graph clustering of user electricity consumption behavior and generate user cluster labels and cluster-level representative load curves. The electricity price-load joint forecasting engine is used to perform joint time-series forecasting of electricity price and load and electricity price peak probability modeling, generating electricity price forecasting sequences, load forecasting sequences, and peak probability sequences. The A3C collaborative decision engine is used to execute collaborative scheduling of community virtual energy storage pools based on A3C, and generate optimal charging and discharging power instructions for each household's energy storage. The SOC pre-cache actuator is used to perform pre-cache trajectory generation and event-triggered correction, generating real-time charging and discharging power settings for each household's energy storage terminal.

9. The residential energy storage dispatching system based on spatiotemporal graph clustering and electricity price pre-caching according to claim 7, characterized in that, The cloud platform includes: The federated training module is used to coordinate local model training across communities; The model aggregation module is used to aggregate encrypted local model parameters using the FedAvg algorithm; The parameter distribution module is used to distribute the aggregated global model parameters to each community edge controller.

10. The residential energy storage dispatching system based on spatiotemporal graph clustering and electricity price pre-caching according to claim 7, characterized in that, The residential energy storage terminal includes photovoltaic modules, energy storage batteries, hybrid inverters, smart meters, and local control units; The local control unit communicates with the community edge collaborative controller, receives the charging and discharging power setting value, controls the hybrid inverter to perform charging and discharging operations, and uploads real-time operating data to the community edge collaborative controller.