Micro-grid load online prediction method considering time evolution characteristics and related equipment

CN122992698APending Publication Date: 2026-10-27GUANGDONG ELECTRIC POWER TRADING CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611486979.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本申请实施例的主要目的在于提出一种考虑时间演化特性的微电网负荷在线预测方法、装置、电子设备、存储介质及程序产品,旨在解决现有技术的至少一种问题

Benefits of technology

[0023]本申请实施例至少包括以下有益效果:本申请提供一种考虑时间演化特性的微电网负荷在线预测方法、装置、电子设备、存储介质及程序产品,该方案通过量测设备采集微电网集群中各节点的有功负荷时间序列,在在线运行阶段从时间变化和时间漂移两个维度检测由用电设备投运、停运或运行策略调整等物理事件引起的负荷时间演化,并构建包含双状态分量的演化状态向量,据此差异化地调用时间变化记忆库或时间漂移记忆库,读取与当前演化状态相匹配的历史特征对预测模型的输入进行修正,并更新模型参数,从而在实时追踪负荷均值和标准差变化以及峰谷时刻漂移的同时,有效避免模型因仅适应新数据而遗忘已学习的历史典型模式,解决了现有方法无法识别由物理事件引起的双维度时间演化且易发生灾难性遗忘的技术问题,提高了非平稳运行环境下微电网负荷在线预测的准确性和稳定性,为微电网集群的储能调度和购电计划提供了更可靠的决策依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122992698A_ABST
    Figure CN122992698A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of considering time evolution characteristics micro-grid load online prediction method and related equipment, belong to micro-grid load prediction field.The method includes: through the measuring equipment, the active load time series of each node in micro-grid cluster is collected, and space load prediction model is pre-trained based on historical load data;In online operation phase, from the dimension of time variation and time drift, the load time evolution caused by physical events such as power equipment commissioning, shutdown or operation strategy adjustment is detected, and evolution state vector containing double-state component is generated;According to the evolution state vector, time variation memory bank or time drift memory bank is called differently, the matching historical characteristics are read to modify model input, and model parameters are updated, and load prediction result is output, for energy storage scheduling or power purchase plan.The application improves the accuracy and stability of micro-grid load online prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microgrid load forecasting technology, and in particular to a method and related equipment for online microgrid load forecasting that takes into account time evolution characteristics. Background Technology

[0002] As microgrid clusters become an important organizational form of regional power systems, cluster energy management systems need to continuously and accurately predict the future load of each microgrid node to provide decision-making basis for energy storage charging and discharging plans, power purchase plans, and power sharing.

[0003] However, during long-term operation, microgrid loads undergo temporal evolution due to physical events such as the commissioning and shutdown of electrical equipment or adjustments to operating strategies. This manifests as continuous changes in the load mean and standard deviation (temporal variation), and shifts in the timing of peak and trough values ​​in the load cycle curve (time drift). Existing load forecasting methods typically employ a fixed operating mode of "offline training, online forecasting," assuming that historical training data and online operating data have the same distribution. This makes it difficult to identify and address the temporal evolution of loads caused by physical events, easily leading to persistent forecasting biases. Furthermore, updating the model using only the latest load data may overwrite historical typical load patterns already learned by the model. When the load condition returns to historical levels, the model struggles to quickly restore forecast accuracy due to forgetting historical patterns. These problems ultimately result in unreliable load forecasting results, consequently affecting operational decisions such as energy storage dispatch and power purchase plans for microgrid clusters. Summary of the Invention

[0004] The main objective of this application is to propose a method, apparatus, electronic device, storage medium, and program product for online prediction of microgrid load considering time evolution characteristics, aiming to solve at least one problem of the prior art.

[0005] To achieve the above objectives, one aspect of this application proposes a microgrid load online forecasting method considering time evolution characteristics, the method comprising: Active load time series of multiple microgrid nodes in a microgrid cluster are collected by measurement equipment. The active load time series includes historical load data and real-time load data. The pre-built spatiotemporal load prediction model is pre-trained based on the historical load data to obtain initial model parameters; During the online operation phase, the following steps are performed for each microgrid node: Time evolution detection steps: Based on the load data prior to the current moment, detect whether the microgrid node has experienced load time evolution caused by the commissioning, shutdown, or operation strategy adjustment of electrical equipment. The load time evolution includes time change evolution and / or time drift evolution. The time change evolution refers to a continuous change in the load mean and / or load standard deviation, and the time drift evolution refers to a shift in the timing of the peak and / or valley values ​​of the load cycle curve. Evolutionary state vector construction steps: Based on the time evolution detection results, generate the evolutionary state vector of the microgrid node. The evolutionary state vector includes a first state component indicating whether time-varying evolution has occurred and a second state component indicating whether time-drift evolution has occurred. Differential memory playback steps: When the evolutionary state vector indicates a time-varying evolution, historical time-varying features matching the current load state are read from a pre-stored time-varying memory bank. These historical time-varying features are used to correct the input of the spatiotemporal load prediction model. When the evolutionary state vector indicates a time-drift evolution, historical time-drift features matching the current phase state are read from a pre-stored time-drift memory bank. These historical time-drift features are used to perform time alignment correction on the input of the spatiotemporal load prediction model. Load forecasting steps: Based on the reading results and the load data at the current moment, generate the model input features for the current round and input them into the spatiotemporal load forecasting model to obtain the load forecasting results; Model update steps: After obtaining the actual load data, calculate the prediction error between the load prediction result and the actual load data, update the model parameters according to the prediction error, and output the load prediction results of each microgrid node. The load prediction results are used for the energy storage scheduling or power purchase plan of the microgrid cluster.

[0006] Furthermore, the following methods are used to detect whether nodes undergo temporal evolution: The load mean and load standard deviation of the microgrid nodes are updated using an exponential moving average method. Calculate the first change in the current load mean relative to the previous load mean, and the second change in the current load standard deviation relative to the previous load standard deviation. When the first change and / or the second change reach a preset time change threshold, it is determined that the microgrid node has undergone time change evolution.

[0007] Furthermore, the timing of node evolution is detected using the following methods: Extract the current periodic load curve of the microgrid node; The current cycle load curve and the reference cycle load curve are cross-correlated to obtain the phase offset, which is used to characterize the direction and distance of the current load cycle relative to the reference cycle load curve on the time axis. Calculate the phase change of the current phase offset relative to the phase offset of the previous moment; When the change reaches a preset time drift threshold, it is determined that the microgrid node has undergone time drift evolution.

[0008] Furthermore, the reference period load curve is updated in the following manner: using an exponential moving average method, the reference period load curve of the previous moment is weighted and fused with the load data of the current moment to obtain the reference period load curve of the current moment.

[0009] Furthermore, the time-varying memory bank stores multiple historical memory units, each of which stores the average load and standard deviation of the load of the microgrid node under historical operating conditions; The step of retrieving historical time-varying features that match the current load state from a pre-stored time-varying memory specifically includes: Calculate the similarity between the feature vector of the current load state and each historical memory unit in the time-varying memory bank; Select one or more historical memory units with the highest similarity; Weighted aggregation of one or more selected historical memory units yields historical time change reading features; The historical time change reading features are fused with the feature vector of the current load status to generate time change enhanced features.

[0010] Furthermore, the time drift memory bank stores multiple historical memory units, each of which stores the phase offset of the microgrid node in its historical operating state; The step of reading historical time drift features that match the current phase state from a pre-stored time drift memory specifically includes: Calculate the similarity between the feature vector of the current phase state and each historical memory unit in the time-drift memory bank; Select one or more historical memory units with the highest similarity; Weighted aggregation of one or more selected historical memory units yields historical time drift reading features; The historical time drift reading features are fused with the feature vector of the current phase state to generate time drift enhancement features.

[0011] Further, the step of generating model input features for the current round based on the reading results and the load data at the current moment, and inputting these features into the spatiotemporal load prediction model to obtain the load prediction result, specifically includes: The load data is adaptively standardized based on the current load mean and load standard deviation. The standardized load data is time-aligned based on the phase offset at the current moment. The reading results of the differentiated memory playback step are fused with the load data after the adaptive standardization and time alignment processes to form the model input features for the current round. The model input features are input into the spatiotemporal load prediction model to obtain the load prediction results.

[0012] Furthermore, when updating the model parameters based on the prediction error, an elastic weight consolidation regularization method is used to apply offset constraints to the model parameters, so that the offset of parameters with high importance in historical tasks relative to historical reference values ​​is smaller than that of parameters with low importance.

[0013] Furthermore, the importance of the model parameters is measured by the Fisher information matrix, which is cumulatively updated according to a preset decay factor during online operation.

[0014] Furthermore, the method also includes a memory writing step, which specifically includes: When a time-varying evolution is confirmed, the feature vector of the current load state is written into the time-varying memory. When a time drift evolution is confirmed, the feature vector of the current phase state is written into the time drift memory. Among them, a soft update strategy is used during writing, which integrates the current feature vector into the historical memory unit that is most similar to the current feature. Before the cumulative number of interactions in the memory module reaches the preset warm-up step count, only memory writing is performed and memory reading is not performed.

[0015] Furthermore, when the evolutionary state vector indicates that no time-varying evolution has occurred and no time-drift evolution has occurred, the differentiated memory playback step and the memory bank writing step are not executed; only the current prediction model is used for regular prediction and parameter updates.

[0016] Furthermore, the method also includes an anomaly rollback step: when the online load data is determined to be abnormal data, or when the prediction error after the model update is larger than before the update, the current round of model update is paused, and the model parameters are restored to the previous stable version.

[0017] Furthermore, the spatiotemporal load prediction model is composed of multiple layers of spatiotemporal feature extraction modules stacked together, and each layer of the spatiotemporal feature extraction module includes a temporal convolutional network and a graph convolutional network; The temporal convolutional network is used to extract the temporal dependency features of the load data of each microgrid node in the time dimension; The graph convolutional network aggregates load information of relevant nodes based on the correlation between microgrid nodes to extract spatial correlation features.

[0018] Furthermore, the association between the microgrid nodes is constructed based on the correlation coefficient of the historical load data of each microgrid node to form an adjacency matrix, and the graph convolutional network performs graph convolution operations based on the adjacency matrix.

[0019] To achieve the above objectives, another aspect of this application proposes a microgrid load online forecasting device that considers time evolution characteristics, the device comprising: The data acquisition module is used to acquire the active load time series of multiple microgrid nodes in the microgrid cluster through measurement equipment. The active load time series includes historical load data and real-time load data. The model pre-training module is used to pre-train the pre-built spatiotemporal load prediction model based on the historical load data to obtain initial model parameters; The time evolution detection module is used to detect whether the microgrid node has experienced load time evolution caused by the commissioning, shutdown or operation strategy adjustment of electrical equipment, based on the load data before the current time. The load time evolution includes time change evolution and / or time drift evolution. An evolution state vector construction module is used to generate the evolution state vector of the microgrid node based on the time evolution detection result. The evolution state vector includes a first state component indicating whether time-varying evolution has occurred and a second state component indicating whether time-drift evolution has occurred. The time memory module is used to read historical time change features that match the current load state from a pre-stored time change memory bank when the evolution state vector indicates a time change evolution; and to read historical time drift features that match the current phase state from a pre-stored time drift memory bank when the evolution state vector indicates a time drift evolution. The load forecasting module is used to generate model input features for the current round based on the reading results and the load data at the current time, and input them into the spatiotemporal load forecasting model to obtain the load forecasting results; The model update module is used to calculate the prediction error between the load prediction result and the actual load data after obtaining the actual load data, update the model parameters according to the prediction error, and output the load prediction result of each microgrid node. The load prediction result is used for the energy storage scheduling or power purchase plan of the microgrid cluster.

[0020] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0021] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0022] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0023] The embodiments of this application include at least the following beneficial effects: This application provides a method, device, electronic device, storage medium, and program product for online load forecasting of microgrids that considers time evolution characteristics. This solution collects the active load time series of each node in the microgrid cluster through measurement equipment. During the online operation phase, it detects the load time evolution caused by physical events such as the commissioning, shutdown, or adjustment of operating strategies of electrical equipment from two dimensions: time change and time drift. It constructs an evolution state vector containing dual-state components and calls the time change memory or time drift memory in a differentiated manner according to this. It reads historical features that match the current evolution state to correct the input of the prediction model and update the model parameters. Thus, while tracking the changes in load mean and standard deviation and peak-valley time drift in real time, it effectively avoids the model forgetting the learned historical typical patterns because it only adapts to new data. It solves the technical problem that existing methods cannot identify the dual-dimensional time evolution caused by physical events and are prone to catastrophic forgetting. It improves the accuracy and stability of online load forecasting of microgrids under non-stationary operating conditions and provides a more reliable decision-making basis for energy storage scheduling and power purchase planning of microgrid clusters. Attached Figure Description

[0024] Figure 1 This is a flowchart of an online load forecasting method for microgrids that considers time evolution characteristics, provided in an embodiment of this application. Figure 2 This is a schematic diagram of the structure of a microgrid load online prediction device that takes into account time evolution characteristics, provided in an embodiment of this application; Figure 3This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0027] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0028] 1) Time Evolution Characteristics: This refers to the characteristics of a microgrid load during long-term operation, where the load distribution or load pattern changes over time due to factors such as equipment commissioning, changes in user behavior, adjustments to production plans, peak-shifting electricity consumption, and holidays. It includes two dimensions: time variation characteristics and time drift characteristics.

[0029] 2) Time-varying characteristics: This refers to the continuous changes in the mean and standard deviation of the load. For example, after high-power charging piles are centrally put into operation in a microgrid for charging facilities, both the mean load and the fluctuation range increase significantly.

[0030] 3) Time drift characteristics: This refers to the characteristic that the peak and trough times of the load cycle curve shift forward or backward. For example, after implementing peak-shifting electricity consumption, the evening peak of the microgrid in the commercial complex shifted from 18:00 to 20:00.

[0031] 4) Time-varying memory: A memory module used to store historical typical load levels and fluctuation characteristics. Each memory unit stores the average load, standard deviation of load, and corresponding load pattern code of a microgrid node under a specific operating state.

[0032] 5) Time-drift memory bank: A memory module used to store typical historical periodic phase change patterns. Each memory cell stores at least the phase shift, and may also store the periodic load curve characteristics corresponding to that phase shift.

[0033] 6) Elastic Weight Consolidation (EWC): A continuous learning regularization method that prevents the model from forgetting learned knowledge when learning new tasks by imposing offset constraints on important parameters from historical tasks. In this application, EWC is used to protect parameters corresponding to historical typical load patterns when updating model parameters online.

[0034] 7) Fisher Information Matrix: A statistic used to measure the importance of model parameters to historical tasks. In this application, the Fisher Information Matrix is ​​updated cumulatively online, eliminating the need to store complete historical data.

[0035] Microgrids, as an important form of efficient integrated distributed energy resources, play a crucial role in improving energy utilization efficiency, enhancing power supply reliability, and promoting the local consumption of renewable energy. Within this framework, microgrid load forecasting, as a fundamental aspect of energy management, directly impacts the safety, stability, and economic efficiency of microgrid operation through its accuracy and adaptability.

[0036] As microgrids continue to expand in scale, single microgrids can no longer meet increasingly complex electricity demands. Microgrid clusters, which organically combine multiple microgrid nodes within a region and achieve coordinated optimization through information interconnection, have become an important development trend. Within a microgrid cluster, the load levels of each microgrid node are easily affected by factors such as fluctuations in distributed power generation output, user energy consumption behavior, and adjustments to operating strategies, resulting in significant time-evolutionary characteristics in its load data. These time-evolutionary characteristics are specifically reflected in the following two dimensions: first, time-varying characteristics, meaning that the load mean and variance change continuously over time; and second, time-drift characteristics, meaning that the occurrence times of periodic load peaks and troughs shift forward or backward.

[0037] To accurately model the aforementioned time-evolutionary characteristics, existing microgrid load forecasting methods are mainly divided into two categories: statistical learning methods and data-driven methods. Statistical learning methods rely on historical data to build mathematical models and make predictions, but they have significant limitations in handling load non-stationarity, nonlinearity, and multivariate influencing factors, resulting in limited prediction accuracy. Data-driven methods, such as convolutional neural networks, gated recurrent units, and long short-term memory networks, typically adopt a fixed operating mode of "offline training, online prediction," with the basic assumption that training data and prediction data are independent and identically distributed. However, this does not consider the rapid evolution of load data caused by various complex factors during the long-term operation of microgrids, leading to a decrease in the generalization performance of the prediction model, and thus affecting the accuracy and reliability of the prediction results.

[0038] Furthermore, while some existing online learning methods can adapt to changes in data distribution to some extent, they typically employ a uniform model update approach or update the model using only the latest load data, which can easily lead to the overwriting of historical typical load patterns. When the load condition returns to historical levels (e.g., the load drops after a short-term shutdown of a charging station for maintenance, or the evening peak resumes its original time after the end of the off-peak electricity consumption period), the model struggles to quickly restore its prediction accuracy because it has forgotten historical typical patterns, resulting in a catastrophic forgetting problem.

[0039] In view of this, this application provides a method, device, electronic device, storage medium and program product for online load prediction of microgrids that considers time evolution characteristics. This solution detects the time evolution characteristics of the load of each node in the microgrid cluster in real time from two dimensions: time change and time drift. It also adaptively fuses the current load data with the historical load pattern according to the evolution type to update the prediction model parameters, thereby effectively overcoming the prediction performance degradation problem that occurs during online learning.

[0040] The microgrid load online forecasting method provided in this application relates to the field of microgrid load forecasting technology. The microgrid load online forecasting method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing 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, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the microgrid load online forecasting method, but is not limited to the above forms.

[0041] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0042] Please see Figure 1 This embodiment provides a microgrid load online prediction method considering time evolution characteristics, specifically including the following steps: Step S1: Collect the active load time series of multiple microgrid nodes in the microgrid cluster using measurement equipment. The active load time series includes historical load data and real-time load data.

[0043] Step S2: Based on the historical load data, pre-train the pre-built spatiotemporal load prediction model to obtain initial model parameters and historical reference parameters.

[0044] During the online operation phase, the following steps are performed for each microgrid node: Step S3, Time Evolution Detection Step: Based on the load data before the current moment, detect whether the node has experienced load time evolution caused by the commissioning, shutdown, or adjustment of operating strategies of electrical equipment. The time evolution includes time change evolution and / or time drift evolution. The time change evolution refers to the continuous change of the load mean and / or load standard deviation, and the time drift evolution refers to the shift in the time when the peak and / or valley of the load cycle curve occur.

[0045] As one implementation method, the time evolution detection step, which detects whether the node has undergone time-varying evolution, specifically includes: The load mean and load standard deviation of this node are updated using an exponential moving average method. Calculate the first change in the current load mean relative to the previous load mean, and the second change in the current load standard deviation relative to the previous load standard deviation. When the first change and / or the second change reach a preset time change threshold, it is determined that the node has undergone time change evolution.

[0046] As one implementation method, the time evolution detection step, which detects whether the node has undergone time drift evolution, specifically includes: Extract the current periodic load curve for this node; The current cycle load curve and the reference cycle load curve are cross-correlated to obtain the phase offset, which is used to characterize the direction and distance of the current load cycle relative to the reference cycle load curve on the time axis. Calculate the phase change of the current phase offset relative to the phase offset of the previous moment; When the change reaches a preset time drift threshold, it is determined that the node has undergone time drift evolution.

[0047] Preferably, the reference period load curve is updated in the following manner: by using an exponential moving average method, the reference period load curve of the previous moment is weighted and fused with the load data of the current moment to obtain the reference period load curve of the current moment.

[0048] Step S4, Evolutionary State Vector Construction Step: Based on the time evolution detection results, generate the evolutionary state vector of the node. The evolutionary state vector includes a first state component indicating whether time change evolution has occurred and a second state component indicating whether time drift evolution has occurred.

[0049] Step S5, Differentiated Memory Playback Step: When the evolution state vector indicates a time change evolution, historical time change features matching the current load state are read from the pre-stored time change memory bank. The historical time change features are used to correct the input of the spatiotemporal load prediction model. When the evolution state vector indicates a time drift evolution, historical time drift features matching the current phase state are read from the pre-stored time drift memory bank. The historical time drift features are used to perform time alignment correction on the input of the spatiotemporal load prediction model.

[0050] In some embodiments, the time-varying memory bank stores multiple historical memory units, each of which stores at least the average load and standard deviation of a certain microgrid node under historical operating conditions; Retrieving historical time-varying features from the time-varying memory that match the current load state specifically includes: Calculate the similarity between the feature vector of the current load state and each historical memory unit in the time-varying memory bank; Select one or more historical memory units with the highest similarity; Weighted aggregation of one or more selected historical memory units yields historical time change reading features; The historical time change reading features are fused with the feature vector of the current load status to generate time change enhanced features.

[0051] In some embodiments, the time drift memory bank stores multiple historical memory units, and each historical memory unit stores at least the phase offset of a microgrid node in its historical operating state; Reading historical time drift features that match the current phase state from the time drift memory specifically includes: Calculate the similarity between the feature vector of the current phase state and each historical memory unit in the time-drift memory bank; Select one or more historical memory units with the highest similarity; Weighted aggregation of one or more selected historical memory units yields historical time drift reading features; The historical time drift reading features are fused with the feature vector of the current phase state to generate time drift enhancement features.

[0052] Step S6, Load Forecasting Step: Based on the reading results and the load data at the current moment, generate the model input features for the current round and input them into the spatiotemporal load forecasting model to obtain the load forecasting results.

[0053] As one implementation method, step S6 specifically includes the following steps: Step S61: Perform adaptive standardization on the load data based on the current load mean and load standard deviation; Step S62: Perform time alignment processing on the standardized load data based on the phase offset at the current moment; Step S63: The reading results of the differential memory playback step are fused with the load data after the adaptive standardization processing and the time alignment processing to form the model input features for the current round; Step S64: Input the model input features into the spatiotemporal load prediction model to obtain the load prediction result.

[0054] Step S7, Model Update Step: After obtaining the actual load data, calculate the prediction error between the load prediction result and the actual load data, update the model parameters according to the prediction error, and output the load prediction result of each microgrid node. The load prediction result is used for the energy storage scheduling or power purchase plan of the microgrid cluster.

[0055] Specifically, after obtaining the actual load data, the prediction error between the load prediction result and the actual load data is calculated. Using the historical reference parameters as anchor points, the model parameters are subjected to offset constraints using an elastic weight consolidation regularization method. The model parameters are then updated based on the prediction error, and the load prediction results for each microgrid node are output.

[0056] As an optional implementation, the method further includes a memory writing step: When a time-varying evolution is confirmed, the feature vector of the current load state is written into the time-varying memory. When a time drift evolution is confirmed, the feature vector of the current phase state is written into the time drift memory. A soft update strategy is used during writing, which integrates the current feature vector into the historical memory unit that is most similar to the current feature.

[0057] Preferably, before the cumulative number of interactions of the memory module reaches the preset number of warm-up steps, only memory writing is performed and memory reading is not performed.

[0058] The solutions of the embodiments of this application will be described in detail and explained below with reference to specific application examples.

[0059] This embodiment applies the online load forecasting method for microgrids that considers time evolution characteristics to a regional microgrid cluster energy management system. The system connects multiple microgrid nodes, including industrial park microgrids, residential community microgrids, commercial complex microgrids, and charging facility microgrids. Each node uploads real-time load data to the cluster energy management system according to a unified sampling period.

[0060] Two types of time evolution events may occur during the operation of a microgrid cluster: first, a new charging station is built and put into operation within a microgrid node, causing an overall increase in the load level and fluctuation amplitude of that node (time-varying evolution); second, peak-hour load shifts for some microgrid nodes due to staggered power consumption (time-drift evolution). The method in this application establishes a predictive model based on historical load data of the microgrid cluster during the pre-training phase, and then detects the above evolutions in real time and adaptively adjusts the model during the online operation phase. Specifically, this method includes: (1) Multi-source load data acquisition and preprocessing This embodiment addresses issues such as inconsistent data interfaces, different sampling periods, misaligned timestamps, and missing or abnormal raw data among different microgrid nodes by uniformly processing historical and real-time load data for each microgrid node.

[0061] Input data: Historical active load data uploaded by each microgrid node; real-time load data uploaded by each microgrid node; node number, sampling timestamp, and data quality identifier; time characteristics such as weekdays, holidays, seasons, and times; unified sampling period and input time length.

[0062] Processing procedure: 1) Multi-source data synchronous acquisition: Connect to the local energy management system, smart meter or load monitoring terminal of each microgrid to continuously collect load data of each node and upload the data to the microgrid cluster energy management system.

[0063] 2) Abnormal Data Identification and Handling: The collected load data is checked for completeness, continuity, and reasonableness to identify missing data, duplicate uploads, incorrect timestamps, values ​​exceeding limits, and abrupt changes. For short-term missing data, interpolation from nearby times or data from similar historical periods is used to complete the missing data; data that cannot be reliably repaired is removed or marked.

[0064] 3) Time alignment and resampling: Convert load data from different sampling periods into a unified sampling period so that each microgrid node has a corresponding load observation value at the same time point, forming a multi-node load time series arranged in chronological order.

[0065] 4) Sliding window construction: The model input window is constructed using load data from a continuous period preceding the current time, and the actual load data following the current time is used as the prediction target. During online operation, the input window scrolls forward in chronological order as new load data arrives.

[0066] 5) Load data standardization: Load data is standardized based on the statistical characteristics of the training data to reduce the impact of differences in load magnitude among different microgrid nodes on the model training process. Standardization parameters are determined during the training phase and continuously adjusted in conjunction with current online statistics during the online prediction phase.

[0067] 6) Node Association Construction: Node associations are constructed based on the correlation between the historical load change trends of each microgrid node. Associations are established for nodes with strong synchronous load changes, which are used for subsequent aggregation of load information of related nodes in the graph convolutional network; for nodes with relatively independent load patterns, associations may not be established.

[0068] Output data: A multi-node load dataset with unified timestamps and consistent sampling periods; cleaned and repaired historical load data; the load sliding window required for current online forecasting; standardized load data for each microgrid node; and the association and adjacency matrix of microgrid nodes.

[0069] (2) Construction and pre-training of microgrid load forecasting model This embodiment constructs a spatiotemporal load prediction model consisting of a time feature extraction module and a spatial correlation feature extraction module, and completes pre-training using historical load data.

[0070] 2.1) Modeling the Online Prediction Problem In microgrid online load forecasting scenarios, load data arrives continuously in a streaming manner, and the forecasting model needs to continuously learn and adaptively update as it receives data. Specifically, in the first... In each round, the prediction model Future load forecasts are generated based on historical data, followed by receiving actual observations. The model parameters are then updated online accordingly. The above process is defined as follows:

[0071] In the formula, Indicates the area Load vector of each microgrid node; This represents the load forecast value.

[0072] The dataset is composed of historical data and real-time observation data collected chronologically. Each microgrid node uploads load data once at each sampling time. Data from each node is aggregated into a multivariate load time series. The complete historical data of the microgrid cluster over a relatively long period constitutes a pre-training dataset, which is used by the prediction model to learn the load patterns of each microgrid node and the correlation between nodes. After entering online operation, each newly arrived observation data constitutes an online learning round, and the model continuously updates its parameters based on the new data while predicting the load value of each node in the next time period.

[0073] 2.2) Predictive Model Network Architecture To fully characterize the dynamic dependence of microgrid load data in the time dimension and the node correlation in the spatial dimension, this embodiment constructs a system consisting of... The prediction model is composed of stacked spatiotemporal feature extraction modules, with each module consisting of a cascaded Temporal Convolutional Network (TCN) and Graph Convolutional Network (GCN).

[0074] For the Layer input features (when hour, (That is, the load data of each microgrid node after preprocessing), firstly, local time-series dependency features are extracted in the time dimension using TCN. :

[0075] In the formula, The hidden layer features represent the effective time step size after dilated causal convolution. TCN employs a dilated causal convolution structure, which can effectively expand the temporal receptive field without revealing future information, capturing the multi-scale temporal patterns of the load at each microgrid node.

[0076] Subsequently, graph convolution operations are performed based on a predefined adjacency matrix to fuse temporal features with spatial association information between nodes:

[0077] In the formula, It is an adjacency matrix. For the first The input features of the layer This represents a graph convolutional network. Within a region, each microgrid node is identified and extracted, corresponding to a node in the graph structure, and the adjacency matrix is ​​used. The Pearson correlation coefficient, constructed based on historical load data of each node, is used to characterize the relationships between nodes. Nodes with closely linked loads, such as those in industrial park microgrids and commercial complex microgrids due to synchronized operating schedules, are connected in the graph. Nodes with relatively independent load patterns, such as those in residential community microgrids and charging facility microgrids, are not connected. Graph convolution operations aggregate the load information of each microgrid node along these connections, enabling the model to use relevant node information to assist in prediction.

[0078] through L After layer-by-layer stacking processing of the spatiotemporal feature extraction modules, the final spatiotemporal feature representation is output as the load prediction results for each microgrid node through linear mapping and activation functions:

[0079] In the formula, For activation function, This indicates a linear layer.

[0080] 2.3) Pre-training of the prediction model The goal of the pre-training phase is to enable the model to fully learn typical historical patterns in the load data. First, the historical load data is normalized based on its statistical characteristics and then divided into training and validation sets in chronological order. Second, an adjacency matrix is ​​constructed based on the Pearson correlation coefficients of the historical microgrid load data for each node. This serves as the graph structure input to the GCN; finally, it is smoothed... The loss is used as the pre-training objective function. The gradient descent method is used to iteratively optimize the model parameters, and an early stopping strategy is implemented through the validation set loss to prevent overfitting.

[0081] After pre-training, the trained model parameters are saved as historical reference parameters to provide a basis for protecting historical typical load patterns during subsequent online updates.

[0082] (3) Online detection of microgrid load time evolution In this embodiment, during the online prediction phase, the energy management system detects the time variation and time drift characteristics of the load data at each node of the microgrid cluster, and generates an evolutionary state vector based on the detection results, which serves as the trigger for subsequent updates to the prediction model parameters. The detections in the two dimensions are independent and performed in parallel.

[0083] 3.1) Time-varying characteristics detection To track the numerical evolution of microgrid load data in real time, an exponential moving average method is used to calculate the mean of the microgrid load data. and standard deviation Perform online dynamic calculations:

[0084]

[0085] In the formula, This is a decay factor used to balance the weights of historical statistical information and current observation information; and These represent the mean and standard deviation, respectively. The average load at the previous time point. These are the load standard deviations of the previous time step.

[0086] Based on the above statistics, the relative change in microgrid load values ​​can be measured in real time. Taking the centralized commissioning of high-power charging piles in a microgrid for charging facilities as an example: before commissioning, the average load of this node remained stable at a low level for a long period; after commissioning, as high-power charging piles were gradually put into use, the average load of this node increased accordingly, and the fluctuation range also increased simultaneously. Therefore, calculating the average... and standard deviation The relative change between the current moment and the previous moment, when any relative change exceeds a threshold. When, that is, to determine the time change and evolution that has occurred at the current moment:

[0087]

[0088]

[0089] In the formula, For indicator functions, This is the time-varying evolution state vector.

[0090] To avoid false triggers caused by a single abnormal sample, a continuous confirmation mechanism can be set up. When the detection results reach a preset number of consecutive times, or reach a preset proportion within a recent time window, the time-varying evolution of that node is confirmed.

[0091] 3.2) Time drift characteristic detection Using current time data and the reference period of the previous time The cross-correlation function between them is used to calculate the time drift offset. :

[0092] In the formula, Indicates cross-correlation operation; This represents the maximum allowed offset search range; These are candidate time shifts.

[0093] Reference period Continuously updated using an exponential moving average method:

[0094] In the formula, The weights are updated periodically to control the balance between the extent to which the reference period preserves historical patterns and the speed of tracking current data.

[0095] Reference period This describes the periodicity of each microgrid node. Taking the implementation of peak-shifting electricity in a commercial complex as an example: peak-shifting delays the arrival of the evening peak at this node, resulting in a stable time shift between the current load curve and the reference cycle. This change can be captured by the difference between the time drift offsets of adjacent moments. When this difference exceeds a threshold... At that time, determine the occurrence of time drift evolution:

[0096]

[0097] In the formula, This represents the change in time offset. This represents the time drift offset at the current moment. This represents the time drift offset from the previous moment. This is the time-drift evolution state vector.

[0098] Since the offset is determined by the difference between adjacent moments, normal random fluctuations will not be triggered falsely, while the continuous overall movement of peak and trough moments will be stably displayed.

[0099] 3.3) Construction of Evolutionary State Vectors For each microgrid node, the system generates an evolved state vector containing two state components based on the time change detection results and the time drift detection results. :

[0100] Based on different combinations of the two state components, the node states are divided into four categories: no significant evolution; only time change; only time drift; and both time change and time drift.

[0101] This evolutionary state vector serves as the trigger for subsequent memory retrieval, memory writing, and online model updates.

[0102] (4) Differentiated memory playback and online updating of prediction models In this embodiment, the time change memory module and the time drift memory module are invoked respectively according to the evolution state vector, and the prediction model parameters are updated in combination with the online regularization mechanism.

[0103] 4.1) Time-varying memory module The time-varying memory is used to store historical typical load levels and fluctuation characteristics. Each memory cell stores the average load, standard deviation of load, and corresponding load pattern code of a microgrid node under a specific operating condition.

[0104] When a node is detected to have undergone time-varying evolution, the system extracts the current load mean and standard deviation of that node, compares them with the historical memory units in the time-varying memory bank, and selects the most similar historical memory units for weighted reading.

[0105] Specifically, the process of retrieving memories that change over time is as follows: (a) Calculate the time-varying eigenvector With time-varying memory bank Similarity scores between historical memory units :

[0106] In the formula, This refers to the number of memory units; Elements representing time-varying memories; This is a transpose.

[0107] (b) Select the one with the highest similarity The highest score and its corresponding historical memory unit; (c) Based on similarity scores The historical memory units are weighted and aggregated to obtain the read vector of the time-varying memory module. :

[0108] In the formula, This indicates the similarity score over time. express The memory elements with the highest similarity over time.

[0109] (d) The read vector and the time-varying feature vector are weighted and fused to obtain the updated vector. :

[0110] In the formula, Update the weights for the time-varying feature vector. (Updated weights) This will replace the original time-varying feature vector Participate in subsequent calculations.

[0111] Taking the centralized commissioning of charging piles at charging facility nodes as an example: In the initial stage of commissioning, the current high load and large fluctuation feature vectors are highly similar to historical features such as the charging station operating at full load in the memory bank. After the module retrieves and aggregates these historical features, it is weighted and fused with the current feature vector, so that the model can replay the historical full load operation mode while depicting the new load level, avoiding the typical mode learned before commissioning being covered by a single direction; If the charging station is subsequently shut down for a short time due to maintenance, and the load drops back to the level before commissioning, the time change detection is triggered again. At this time, historical features such as the low load and stable operation before commissioning are retrieved, replayed and fused with the current features, and the model can quickly restore its ability to predict the load under the shutdown state.

[0112] The writing of time-varying memories employs a soft update strategy, fusing the current coefficient vector into the most relevant memory cells:

[0113] In the formula, This represents the updated time-varying memory. Update the weights of the memory for time-varying changes; It is the outer product operator. The similarity score is the score corresponding to the selected historical memory units that best match the current load state.

[0114] In addition, the time-varying memory learning steps are set. When the cumulative number of interactions of the memory module has not yet reached At this time, only write operations are performed without reading to avoid interference from random initialization noise.

[0115] 4.2) Time-drift memory module The time-drift memory bank is used to store typical historical periodic phase change patterns. Each memory cell stores at least the phase shift, and may also simultaneously store the periodic load curve characteristics corresponding to that phase shift.

[0116] When a time drift evolution is detected at a certain node, the system compares the current period phase offset with the historical phase patterns in the time drift memory bank, selects several historical memory units with the highest similarity for weighted reading, and obtains the historical time drift enhancement features.

[0117] Specifically, constructing a time-drift memory bank Each memory cell stores a time-drift feature vector. When the time-drift evolution is confirmed, the time-drift memory is retrieved to find the most similar time point to the current time. The historical time-drift patterns are analyzed, and a weighted aggregation based on scores is performed to obtain a read vector of the time-drift memory.

[0118]

[0119]

[0120]

[0121] In the formula, This indicates the time-drift similarity score; Indicates the number of memory units; express The memory element with the highest time-drift similarity; This indicates the time-drift similarity score; Update the weights for the time-drifted feature vectors; The operation is to select the time-drift pattern with the highest similarity. To select the number of historical time drift patterns; for The feature vector is obtained by weighted summation of historical time-drift patterns; This is the updated time-shifted feature vector. This will replace the original time-drift feature vector Participate in subsequent calculations.

[0122] Taking the shift in evening peak hours due to staggered electricity usage as an example: When the evening peak hours first shift, the module retrieves the historical shift pattern closest to the current phase and weights and fuses them, allowing the model to smoothly transition to the new phase based on historical experience; the current shift cycle pattern is simultaneously written into the memory. When the staggered peak hours end and the evening peak hours gradually return to their original times, time drift detection is triggered again. At this time, the historical pattern of the original phase before the staggered peak hours is retrieved, replayed, and fused with the current features, allowing the model to quickly restore its ability to predict the evening peak hours of the original time period, avoiding systematic bias caused by still predicting based on the shifted phase.

[0123] Once time-drift evolution is detected, the current periodic pattern needs to be written to the time-drift memory for future replay. The write operation uses the same soft update strategy as the time-varying memory:

[0124] In the formula, This represents the updated time-drift memory. Update the weights for the time-drift memory. The similarity score is the score corresponding to the selected historical time drift patterns that best match the current phase state.

[0125] Similarly, set the number of time-drift memory learning steps. When the cumulative number of interactions of the memory module has not yet reached At this time, only write operations are performed without reading.

[0126] 4.3) Treatment under conditions of no significant evolution when and At this time, it indicates that the load of each microgrid node only exhibits normal random fluctuations, and no significant evolution has been detected. In this case, the system does not invoke the corresponding memory module, nor write current data to the memory bank. It only uses the current prediction model for normal prediction and small-step online updates to avoid random disturbances being incorrectly identified as typical historical load patterns.

[0127] 4.4) Load data correction First, based on the mean at the current time. and standard deviation Perform adaptive standardization on microgrid load data:

[0128] Subsequently, For microgrid load data after adaptive standardization, based on the time drift offset at the current moment. A cyclic shift operation is applied to the time-corrected data to complete the time drift alignment:

[0129] In the formula, Load data after time alignment This indicates that the data will be moved cyclically along the time axis. Each time step.

[0130] The load data, after numerical correction and time alignment, is then fused with the corresponding time-varying enhancement features and time-drift enhancement features to form the online input for the prediction model.

[0131] 4.5) Online updates of the prediction model Once the actual load data for the current load cycle arrives, the system calculates the error between the predicted result and the actual load, and uses this error as the basis for online updates.

[0132] During the online learning phase, each round Received actual load Then, calculate smoothness. loss :

[0133] In the formula, For smoothing loss.

[0134] smooth The loss mechanism is robust to anomalous fluctuations in the early stages of evolution. However, when the load gradually increases and diurnal fluctuations are significant within days of the phased commissioning of charging stations, using squared loss can lead to some large deviations in observations excessively dominating the gradient direction; smoothing... The loss function can suppress the interference of such samples on parameter updates.

[0135] To prevent online models from over-adapting to the current evolutionary state and forgetting historical typical patterns, Elastic Weight Consolidation (EWC) is introduced to impose offset constraints on its parameters:

[0136] In the formula, For EWC loss; This represents the regularization strength coefficient; This is a diagonal approximation of the Fisher information matrix, used to measure the... The degree of importance of each parameter to the historical task; For rounds To be updated One parameter; For the first The reference values ​​for each parameter are generally updated after the pre-training phase or when evolution is detected.

[0137] Fisher's information matrix is ​​updated cumulatively online, avoiding the need to store complete historical data.

[0138] In the formula, This is a decay factor for Fisher information, controlling the rate at which historically important information is forgotten. For example, even if a historical high-power charging pattern of a charging facility node has not reappeared for a period of time, its importance information can still be retained through the accumulation of the Fisher information matrix, thus providing a basis for replaying the pattern later. For the previous moment The diagonal approximation of the Fisher information matrix for each model parameter.

[0139] Final overall loss function for:

[0140] The model parameters are updated online using momentum stochastic gradient descent.

[0141]

[0142]

[0143] In the formula, The total loss function at the current time with respect to the parameters The gradient; The momentum term at the current moment is used to smooth the gradient direction to suppress the high variance of single-sample gradients in online scenarios; This represents the momentum term from the previous moment. This is the momentum coefficient. For all parameters of the prediction model, These are the updated model parameters for the next time step.

[0144] If the current evolutionary state remains stable for a period of time and the prediction error is improved, the current model parameters can be gradually updated to the new reference parameters.

[0145] When online data is identified as abnormal, or when the prediction error deteriorates significantly after a model update, the current model update is paused, and the model parameters are restored to the previous stable version.

[0146] (5) Output of load forecast results This embodiment outputs the load results of each microgrid node and the total load results of the microgrid cluster obtained from online prediction to the energy management system, providing data support for energy storage scheduling, power purchase planning and operation optimization.

[0147] Processing procedure: Send the future load forecast results of each microgrid node to the energy management module of the corresponding node; By summing up the predicted values ​​of each node, an overall load prediction curve for the microgrid cluster is formed. For microgrid nodes that experience time changes or time drift, an evolution alarm is output. The alarm content includes the node number, evolution type, trigger time, and duration. The prediction results, actual load, evolution status, memory changes, and model version are recorded to form traceable online operational data.

[0148] Output data: Future load forecast curves for each microgrid node; total load forecast curve for the microgrid cluster; alarms for time-varying events; alarms for time-drift events; prediction model operating status and version information; prediction error statistics.

[0149] (6) Advantages and beneficial effects In summary, compared with the prior art, this application has at least the following advantages and beneficial effects: 1) This application proposes for the first time a microgrid load time evolution detection method based on online statistics, which can detect the evolution characteristics of load data in real time and reliably from two dimensions: time change and time drift, providing accurate and timely trigger signals for the adaptive update of subsequent prediction model parameters.

[0150] 2) This application proposes for the first time a differentiated memory playback method based on evolutionary state vectors. It selectively retrieves and fuses matching historical load patterns according to the evolution type. While adapting to current load changes, it retains the model's predictive ability for typical historical patterns, thereby improving the accuracy and stability of microgrid load forecasting under non-stationary conditions.

[0151] 3) This application combines elastic weight consolidation regularization with online learning and uses the Fisher information matrix to apply offset constraints to historically important parameters, which effectively prevents catastrophic forgetting of the model during continuous learning and enables the model to maintain balanced predictive ability for multiple load patterns in long-term operation.

[0152] Please see Figure 2 This application also provides a microgrid load online forecasting device that considers time evolution characteristics, which can implement the above method. The device includes: The data acquisition module is used to acquire the active load time series of multiple microgrid nodes in the microgrid cluster through measurement equipment. The active load time series includes historical load data and real-time load data. The model pre-training module is used to pre-train the pre-built spatiotemporal load prediction model based on the historical load data to obtain initial model parameters; The time evolution detection module is used to detect whether the node has experienced load time evolution caused by the commissioning, shutdown or operation strategy adjustment of electrical equipment, based on the load data before the current time. The load time evolution includes time change evolution and / or time drift evolution. An evolution state vector construction module is used to generate the evolution state vector of the node based on the time evolution detection results. The evolution state vector includes a first state component indicating whether time change evolution has occurred and a second state component indicating whether time drift evolution has occurred. The time memory module is used to read historical time change features that match the current load state from a pre-stored time change memory bank when the evolution state vector indicates a time change evolution; and to read historical time drift features that match the current phase state from a pre-stored time drift memory bank when the evolution state vector indicates a time drift evolution. The load forecasting module is used to generate model input features for the current round based on the reading results and the load data at the current time, and input them into the spatiotemporal load forecasting model to obtain the load forecasting results; The model update module is used to calculate the prediction error between the load prediction result and the actual load data after obtaining the actual load data, update the model parameters according to the prediction error, and output the load prediction result of each microgrid node. The load prediction result is used for the energy storage scheduling or power purchase plan of the microgrid cluster.

[0153] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0154] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0155] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0156] Please see Figure 3 , Figure 3 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 301 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 302 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 302 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 302 and is called and executed by the processor 301 using the methods described above in the embodiments of this application. Input / output interface 303 is used to implement information input and output; The communication interface 304 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 305 transmits information between various components of the device (e.g., processor 301, memory 302, input / output interface 303, and communication interface 304); The processor 301, memory 302, input / output interface 303, and communication interface 304 are connected to each other within the device via bus 305.

[0157] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0158] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0159] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0160] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0161] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented in the embodiments of this program product are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. The executable computer program code or "code" used to perform the various embodiments can be written in high-level programming languages ​​such as C, C++, Python, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0162] The embodiments described in 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 by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0163] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0165] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0166] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0167] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0168] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0169] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0170] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0171] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0172] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for online load forecasting of microgrids considering time evolution characteristics, characterized in that, The method includes the following steps: Active load time series of multiple microgrid nodes in a microgrid cluster are collected by measurement equipment. The active load time series includes historical load data and real-time load data. The pre-built spatiotemporal load prediction model is pre-trained based on the historical load data to obtain initial model parameters; During the online operation phase, the following steps are performed for each microgrid node: Based on the load data prior to the current moment, detect whether the microgrid node has experienced load time evolution caused by the commissioning, shutdown, or operation strategy adjustment of electrical equipment. The load time evolution includes time change evolution and / or time drift evolution. Based on the time evolution detection results, an evolution state vector of the microgrid node is generated. The evolution state vector includes a first state component indicating whether time-varying evolution has occurred and a second state component indicating whether time-drift evolution has occurred. When the evolution state vector indicates a time change evolution, historical time change features matching the current load state are read from the pre-stored time change memory; when the evolution state vector indicates a time drift evolution, historical time drift features matching the current phase state are read from the pre-stored time drift memory. Based on the reading results and the load data at the current moment, the model input features for the current round are generated and input into the spatiotemporal load prediction model to obtain the load prediction result; After obtaining the actual load data, the prediction error between the load prediction result and the actual load data is calculated. The model parameters are updated according to the prediction error, and the load prediction results of each microgrid node are output. The load prediction results are used for the energy storage scheduling or power purchase plan of the microgrid cluster.

2. The method according to claim 1, characterized in that, The following methods are used to detect whether the microgrid nodes undergo time-varying evolution: The load mean and load standard deviation of the microgrid nodes are updated using an exponential moving average method. Calculate the first change in the current load mean relative to the previous load mean, and the second change in the current load standard deviation relative to the previous load standard deviation. When the first change and / or the second change reach a preset time change threshold, it is determined that the microgrid node has undergone time change evolution.

3. The method according to claim 1, characterized in that, The following methods are used to detect whether the microgrid node has undergone time-drift evolution: Extract the current periodic load curve of the microgrid node; The current cycle load curve and the reference cycle load curve are cross-correlated to obtain the phase offset, which is used to characterize the direction and distance of the current load cycle relative to the reference cycle load curve on the time axis. Calculate the phase change of the current phase offset relative to the phase offset of the previous moment; When the phase change reaches a preset time drift threshold, it is determined that the node has undergone time drift evolution.

4. The method according to claim 1, characterized in that, The time-varying memory bank stores multiple historical memory units, each of which stores the average load and standard deviation of the load of the microgrid node under historical operating conditions. The step of retrieving historical time-varying features that match the current load state from a pre-stored time-varying memory specifically includes: Calculate the similarity between the feature vector of the current load state and each historical memory unit in the time-varying memory bank; Select one or more historical memory units with the highest similarity; Weighted aggregation of one or more selected historical memory units yields historical time change reading features; The historical time change reading features are fused with the feature vector of the current load status to generate time change enhanced features.

5. The method according to claim 1, characterized in that, The time drift memory bank stores multiple historical memory units, and each historical memory unit stores the phase offset of the microgrid node in its historical operating state; The step of reading historical time drift features that match the current phase state from a pre-stored time drift memory specifically includes: Calculate the similarity between the feature vector of the current phase state and each historical memory unit in the time-drift memory bank; Select one or more historical memory units with the highest similarity; Weighted aggregation of one or more selected historical memory units yields historical time drift reading features; The historical time drift reading features are fused with the feature vector of the current phase state to generate time drift enhancement features.

6. The method according to claim 1, characterized in that, The process of generating model input features for the current round based on the reading results and the load data at the current moment, and inputting these features into the spatiotemporal load prediction model to obtain the load prediction result, specifically includes: The load data is adaptively standardized based on the current load mean and load standard deviation. The standardized load data is time-aligned based on the phase offset at the current moment. The reading results are fused with the load data after the adaptive standardization and time alignment processes to form the model input features for the current round. The model input features are input into the spatiotemporal load prediction model to obtain the load prediction results.

7. The method according to claim 1, characterized in that, The method further includes a memory writing step, which specifically includes: When a time-varying evolution is confirmed, the feature vector of the current load state is written into the time-varying memory. When a time drift evolution is confirmed, the feature vector of the current phase state is written into the time drift memory. Among them, a soft update strategy is used during writing, which integrates the current feature vector into the historical memory unit that is most similar to the current feature. Before the cumulative number of interactions in the memory module reaches the preset warm-up step count, only memory writing is performed and memory reading is not performed.

8. A microgrid load online forecasting device considering time evolution characteristics, characterized in that, The device includes: The data acquisition module is used to acquire the active load time series of multiple microgrid nodes in the microgrid cluster through measurement equipment. The active load time series includes historical load data and real-time load data. The model pre-training module is used to pre-train the pre-built spatiotemporal load prediction model based on the historical load data to obtain initial model parameters; The time evolution detection module is used to detect whether the node has experienced load time evolution caused by the commissioning, shutdown or operation strategy adjustment of electrical equipment, based on the load data before the current time. The load time evolution includes time change evolution and / or time drift evolution. An evolution state vector construction module is used to generate an evolution state vector for the node based on the time evolution detection results. The evolution state vector includes a first state component indicating whether time-varying evolution has occurred and a second state component indicating whether time-drift evolution has occurred. The time memory module is used to read historical time change features that match the current load state from a pre-stored time change memory bank when the evolution state vector indicates a time change evolution; and to read historical time drift features that match the current phase state from a pre-stored time drift memory bank when the evolution state vector indicates a time drift evolution. The load forecasting module is used to generate model input features for the current round based on the reading results and the load data at the current time, and input them into the spatiotemporal load forecasting model to obtain the load forecasting results; The model update module is used to calculate the prediction error between the load prediction result and the actual load data after obtaining the actual load data, update the model parameters according to the prediction error, and output the load prediction result of each microgrid node. The load prediction result is used for the energy storage scheduling or power purchase plan of the microgrid cluster.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.