An integrated energy real-time energy management method based on online transfer learning
By using online transfer learning to process data and update models in integrated energy systems, the problem of asynchronous model adaptation and constraint feasibility was solved, achieving continuity and stability of scheduling results and improving the robustness and reliability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZAOZHUANG POWER SUPPLY COMPANY OF STATE GRID SHANDONG ELECTRIC POWER
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-16
AI Technical Summary
The existing integrated energy system is not synchronized with the model adaptation status and constraint feasibility under dynamic operating conditions, resulting in a mismatch between scheduling results and operational constraints, which affects the continuity of scheduling and the stability of energy supply to critical loads.
An online transfer learning-based approach is adopted. Data is collected and preprocessed in each scheduling cycle to form a unified time window sample for scenario matching and model updating. The model update status is determined by the transfer judgment index, and incremental transfer training is performed through online sample buffer and prototype sample buffer to generate executable scheduling instructions or guaranteed scheduling instructions, ensuring that the model parameters are continuously corrected as the operating conditions change.
It improves the scheduling continuity and execution consistency of the integrated energy system under dynamic operating conditions, reduces the risk of fixed model mismatch, and enhances the robustness and scheduling reliability of the system.
Smart Images

Figure CN122222262A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of integrated energy system operation and control technology, specifically a real-time energy management method for integrated energy systems based on online transfer learning. Background Technology
[0002] Integrated energy systems typically include distribution network interfaces, heat source equipment, cold source equipment, energy storage equipment, and controllable loads. During system operation, multiple energy forms, such as electricity, heat, and cold, change in a coupled manner within the same scheduling cycle. The energy management platform needs to continuously collect data on tie-line switching power, output of various equipment, energy storage state of charge, environmental parameters, and load parameters, and perform real-time scheduling and control accordingly. As load fluctuations, equipment start-ups and shutdowns, and changes in operating boundaries intensify in the park, the requirements for model timeliness, data consistency, and constraint executability in the scheduling process have significantly increased.
[0003] In existing projects, a common practice is to build an offline model based on historical operating conditions. During the online phase, the model is updated according to a fixed model or a preset period before outputting scheduling instructions. For multi-source heterogeneous data, timestamp alignment, missing value completion, outlier removal, and resampling are usually performed first before entering the prediction and optimization stage. This type of method can maintain operation when the operating conditions are stable, but in scenarios such as changes in topology connections, sudden changes in equipment availability, and changes in the proportion of load types, the model is prone to deviating from the current operating conditions. At the same time, candidate scheduling instructions must also meet constraints such as multi-energy supply and demand balance, upper and lower limits of equipment output, ramping constraints, energy storage charge state boundaries, tie line switching power limits, and graded load protection. The constraint coupling relationship is complex, and the feasibility of scheduling results under a single fixed update rhythm decreases in some periods.
[0004] Existing integrated energy real-time dispatching technologies generally suffer from a lack of synchronization between model adaptation status and constraint feasibility status within the same dispatching cycle under dynamic operating conditions. This means that there is a lack of consistent coordination between model update rhythm, scenario change identification, and feasible domain verification. Consequently, in some cycles, candidate dispatching instructions may not match the set of operating constraints, resulting in insufficient executability or frequent triggering of backup dispatching, which in turn affects the continuity of dispatching and the stability of energy supply to critical loads. Summary of the Invention
[0005] The purpose of this invention is to provide a comprehensive real-time energy management method based on online transfer learning to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a comprehensive real-time energy management method based on online transfer learning. This method is applied to an integrated energy system consisting of distribution network interfaces, heat source equipment, cold source equipment, energy storage equipment, and controllable loads. It takes the scheduling cycle as the operating unit and forms a closed-loop process of data acquisition, model matching, state determination, model update, constraint verification, and execution feedback.
[0007] Within each scheduling cycle, operational data is collected from distribution network metering terminals, heat source controllers, cold source controllers, energy storage management systems, and load monitoring terminals. Timestamp alignment, missing value completion, outlier removal, and normalization are then performed sequentially to obtain the current time window sample. Scene features, including network topology status, equipment availability status, and load structure status, are extracted based on this sample. These features are then matched with scene identifiers in the source domain model library to determine the current operating model. Finally, the current time window sample is input into the current operating model to obtain candidate scheduling instructions and status prediction results.
[0008] Based on the current time window sample, state prediction results, and source domain reference samples corresponding to the currently running model, migration judgment indicators are calculated. The migration judgment indicators include domain offset indicators, physical consistency indicators, and constraint violation rate indicators. The model update state is determined according to migration triggering rules and migration stopping rules: the model update state in the first scheduling cycle is set to the update state; in subsequent scheduling cycles, the model update state is set to the update state when the migration triggering rules are met, and the model update state is set to the non-updating state when the migration triggering rules are not met but the migration stopping rules are met. When neither of the two rules is met, the model update state of the previous scheduling cycle is maintained.
[0009] When the model update state is "updated," incremental transfer training is performed using the online sample buffer and prototype sample buffer to obtain the updated current running model. Candidate scheduling instructions are then regenerated based on the updated current running model. The online sample buffer stores recent execution feedback samples, and the prototype sample buffer stores historical stable operating condition samples. When the model update state is "not updated," the current running model remains unchanged. Subsequently, the candidate scheduling instructions are input into the running constraint set to perform feasible region projection. If a feasible solution exists, an executable scheduling instruction is output. If no feasible solution exists, a safety net scheduling instruction is generated according to the safety net rule. Finally, an executable scheduling instruction or a safety net scheduling instruction is issued to the controlled equipment, execution feedback data is collected and written to the online sample buffer, and the current running model and model update state determined in this scheduling cycle are used as the initial conditions for the next scheduling cycle.
[0010] Through the above technical process, model selection, model update and scheduling execution are carried out in a coordinated manner within the same technical link, enabling model parameters to be continuously corrected as the operating conditions change, and ensuring that the scheduling results are always checked by the set of operating constraints. In infeasible scenarios, the system can still output a backup scheduling instruction that meets the boundary conditions, thus improving the scheduling continuity and execution consistency of the integrated energy system under dynamic operating conditions.
[0011] This invention addresses the challenges of integrated energy systems comprising distribution network interfaces, heat source equipment, cold source equipment, energy storage equipment, and controllable loads. To resolve the issues of insufficient adaptability of fixed models and deviations between scheduling results and field constraints when operating conditions continuously change, this invention proposes a real-time energy management method based on online transfer learning. This method uses the scheduling cycle as the operating unit, forming a closed loop of data processing, model updating, and scheduling execution.
[0012] Within each scheduling cycle, the system collects operational data from distribution network metering terminals, heat source controllers, cold source controllers, energy storage management systems, and load monitoring terminals. This operational data includes tie-line switching power, distributed generation output, heat source output, cold source output, energy storage state of charge, controllable load power, outdoor temperature, outdoor humidity, and irradiance. Data from each channel is first resampled and aligned according to a unified scheduling timescale, then sequentially undergoes timestamp alignment, missing value completion, outlier removal, and normalization processing to obtain the current time window sample. Through this processing sequence, data from different sources can form a consistent input within the same cycle.
[0013] Each pre-trained model in the source domain model library is bound to a scene identifier and a source domain reference sample set. The scene identifier consists of a topology connection matrix, a device rated capacity vector, and a load type proportion vector. The system calculates the weighted Euclidean distance with each scene identifier based on the current time window sample, determines the current running model according to the minimum distance, and the weighting coefficient is a preset constant and satisfies that the weight sum is one. This step ensures that the model selection corresponds to the changes in system topology and device capacity.
[0014] After obtaining the current operating model, the system inputs the current time window sample into the current operating model to obtain candidate scheduling instructions and state prediction results, and calculates migration judgment indicators accordingly. The migration judgment indicators include domain offset, physical consistency, and constraint violation rate. The domain offset indicator is obtained by weighting the differences between the current time window sample and the source domain reference sample set in the mean vector, variance vector, and mean of the prediction residuals. The physical consistency indicator is obtained by weighting the absolute values of the power balance residual, thermal balance residual, and cold balance residual. The constraint violation rate indicator is obtained by the ratio of the number of constraint entries that violate the operating constraint set to the total number of constraint entries. By jointly judging these three types of indicators, the system can simultaneously reflect distribution changes, physical consistency, and the degree of constraint satisfaction.
[0015] The model update state is determined by the migration triggering rule and the migration stopping rule. In the first scheduling cycle, the model update state is set to the update state. In subsequent cycles, the model enters the update state when the migration triggering rule is met; it enters the hold state when the migration triggering rule is not met but the migration stopping rule is met; if neither rule is met, the model update state of the previous scheduling cycle is maintained. The migration triggering rule is that the domain offset index is higher than the first upper threshold and the physical consistency index is higher than the second upper threshold, or the constraint violation rate index is higher than the third upper threshold. The migration stopping rule is that the domain offset index is lower than the first lower threshold, the physical consistency index is lower than the second lower threshold, and the constraint violation rate index is lower than the third lower threshold, and each upper threshold is higher than the corresponding lower threshold. This state mechanism is used to avoid frequent model switching.
[0016] When the model is in the update state, the system uses the online sample buffer and the prototype sample buffer to perform incremental transfer training. The online sample buffer stores the execution feedback data of the most recent sample window period and several scheduling cycles, while the prototype sample buffer stores historical stable operating condition samples. During the training process, the model adaptation layer parameters are updated first, and then the model decision layer parameters are updated when the constraint violation rate index is not higher than the third lower threshold and the change rate of the candidate scheduling instruction is not higher than the change rate threshold after several consecutive stable decision periods.
[0017] The rate of change of candidate scheduling instructions is defined as the ratio of the norm of the difference between candidate scheduling instructions in two adjacent scheduling cycles to the norm of candidate scheduling instructions in the previous scheduling cycle. When the norm of candidate scheduling instructions in the previous scheduling cycle is zero, the rate of change is taken as the norm of the difference between candidate scheduling instructions in two adjacent scheduling cycles. This definition eliminates the calculation ambiguity caused by zero denominator.
[0018] Before being issued, candidate scheduling instructions are projected into the feasible region by entering the set of operational constraints. The set of operational constraints includes multi-energy supply and demand balance constraints, upper and lower limits of equipment output constraints, ramping constraints, energy storage charge state boundary constraints, tie line switching power limit constraints, and graded load guarantee constraints.
[0019] The feasible region projection aims to minimize the Euclidean distance between the projected scheduling instruction and the candidate scheduling instruction. If a feasible solution exists in the feasible region projection, an executable scheduling instruction is output. If no feasible solution exists, a minimum scheduling instruction is generated according to the minimum guarantee rule.
[0020] When a historical feasible dispatch instruction exists, the most recent historical feasible dispatch instruction is used as the benchmark, and constraints on the minimum energy supply ratio of critical loads, the safe range of energy storage charge status, and the limit of tie-line switching power are applied. When the system is started and no historical feasible dispatch instruction exists, a backup dispatch instruction is generated using the start-up baseline dispatch table generated by the day-ahead dispatch plan and written into the controller before system start-up.
[0021] In terms of cycle organization, the scheduling execution cycle is set as the first cycle, and the incremental transfer training cycle is set as the second cycle. The second cycle is an integer multiple of the first cycle and is greater than the first cycle.
[0022] When a change in the topology connectivity matrix or a change in the device availability status from available to unavailable is detected, the system immediately triggers a model update and performs feasible region projection after the update.
[0023] In terms of model iteration, the system sets up candidate models that run in parallel with the currently running model. The candidate models are obtained by incremental transfer training of the currently running model based on the online sample buffer, and are computed in parallel with the currently running model under the same current time window samples and the same set of running constraints.
[0024] If a candidate model simultaneously meets the following conditions within several scheduling periods of a continuous replacement evaluation cycle: operating cost not higher than the current operating model before replacement, constraint violation rate not higher than the current operating model before replacement, and critical load power shortage is zero, then model replacement is performed. If the aforementioned conditions are not met within several scheduling periods of a continuous rollback observation cycle after replacement, then rollback is performed to the current operating model before replacement. Critical load power shortage is defined as the sum of the non-negative parts of the difference between the critical load demand power and the critical load actual power supply.
[0025] Through the above technical process, model matching, model updating and scheduling execution are carried out in a unified closed loop. This method can continuously correct the model input and model parameters when the operating conditions change, and ensure that the scheduling instructions are executable within the set of operating constraints. Even in infeasible scenarios, it can still output a guaranteed scheduling instruction that meets the boundary conditions. Therefore, it can be used for real-time stable scheduling of integrated energy systems.
[0026] The beneficial effects of this invention are as follows: 1. This invention collects and preprocesses multi-source operational data in each scheduling cycle to form a unified time window sample. Then, it completes scenario matching based on the topology connection matrix, equipment rated capacity vector, and load type proportion vector, ensuring that the current operating model corresponds to the real-time operating conditions. Secondly, it jointly determines the model update status through domain offset index, physical consistency index, and constraint violation rate index, and adopts triggering and stopping rules with upper and lower threshold pairing to ensure that model updates have clear boundaries. In addition, it performs incremental transfer training through online sample buffer and prototype sample buffer, and updates parameters in the order of adaptation layer first and then decision layer, thereby reducing the risk of fixed model mismatch when operating conditions continuously change, reducing control jitter caused by frequent switching, and improving the consistency, real-time performance, and stability of prediction results and scheduling decisions.
[0027] 2. This invention introduces a set of operational constraints to perform feasible domain projection after candidate scheduling instructions are generated, enabling the executability verification of the scheduling results before issuance. This verification first checks the supply and demand balance of multiple energy sources, then checks the upper and lower limits of equipment output, ramp constraints, and energy storage charge state boundaries. Additionally, it checks the tie-line switching power limits and graded load protection requirements, ensuring that the output instructions always remain within the executable boundaries. Thus, when a feasible solution exists, the executable scheduling instruction with the smallest distance from the candidate instruction is output. When no feasible solution exists, a backup scheduling instruction is generated according to the backup rule, continuing to satisfy critical load, energy storage safety range, and tie-line limit constraints, avoiding execution failures due to exceeding limits or violations, and improving continuous power supply capability and system operational safety under extreme conditions.
[0028] 3. This invention decouples the scheduling execution cycle from the incremental migration training cycle, enabling online control and model training to operate in a layered manner within a unified framework. First, it ensures continuous scheduling execution within the normal cycle. Second, it immediately triggers model updates when topology connection changes or sudden changes in equipment availability are detected, giving the system a rapid response capability to sudden operating conditions. Furthermore, by setting up candidate models that run in parallel with the current operating model and employing a mechanism of continuous periodic evaluation followed by replacement, and rollback if the replacement fails to meet the conditions, the model iteration process is made verifiable and rollbackable. Thus, without sacrificing operational continuity, it continuously improves operating costs and constraint violation performance, suppresses the propagation of model degradation to the execution layer, and enhances the long-term robustness, engineering availability, and scheduling reliability of the integrated energy system. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating the overall process of real-time energy management based on online transfer learning in this invention. Figure 2 This is a flowchart of the model update state determination and incremental transfer training process of the present invention. Detailed Implementation
[0030] 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.
[0031] like Figures 1 to 2 As shown, this embodiment of the invention provides a comprehensive real-time energy management method based on online transfer learning. This method is applied to integrated energy systems that include distribution network interfaces, heat source equipment, cold source equipment, energy storage equipment, and controllable loads, and is executed cyclically according to a scheduling cycle. The specific process is as follows: Data Acquisition and Preprocessing Within each scheduling cycle, operational data is collected from the distribution network metering terminal, heat source controller, cold source controller, energy storage management system, and load monitoring terminal. The operational data includes tie-line switching power, distributed power output, heat source output, cold source output, energy storage state of charge, controllable load power, outdoor temperature, outdoor humidity, and irradiance. After collection, the data from each channel is first resampled to a unified scheduling time scale, and then timestamp alignment, missing value completion, outlier removal, and normalization are performed sequentially to obtain the current time window sample.
[0032] Running model matching Scene features are extracted based on the current time window samples. These features include topology connection matrix features, equipment rated capacity features, and load type proportion features. The scene features are then compared with the scene identifiers corresponding to each pre-trained model in the source domain model library using a weighted Euclidean distance calculation. The pre-trained model with the smallest distance is selected as the current running model. Each pre-trained model is bound to a corresponding source domain reference sample.
[0033] Candidate scheduling generation Input the current time window sample into the currently running model, and output candidate scheduling instructions and state prediction results.
[0034] Migration determination index calculation Based on the current time window samples, state prediction results, and source domain reference samples bound to the current operating model, migration judgment indicators are calculated. The migration judgment indicators include domain offset indicators, physical consistency indicators, and constraint violation rate indicators. Among them, the domain offset indicator is used to measure the degree of sample distribution offset, the physical consistency indicator is used to measure the deviation of power balance, heat balance, and cold balance, and the constraint violation rate indicator is used to measure the degree of violation of the candidate scheduling instruction on the set of operating constraints.
[0035] Model update state determined The model update state is determined based on the migration triggering rule and the migration stopping rule. In the first scheduling cycle, the model update state is set to the update state. In subsequent scheduling cycles, the model update state is set to the update state when the migration triggering rule is met; the model update state is set to the non-updating state when the migration triggering rule is not met but the migration stopping rule is met; when neither rule is met, the model update state of the previous scheduling cycle is maintained; when both rules are met, the migration triggering rule is given priority. This rule can avoid frequent switching caused by state jitter.
[0036] Incremental transfer training and candidate scheduling recalculation When the model update state is in the update state, incremental transfer training is performed by calling the online sample buffer and the prototype sample buffer to obtain the updated current running model. Candidate scheduling instructions are regenerated based on the updated current running model. The online sample buffer stores the execution feedback data of the most recent scheduling cycles, and the prototype sample buffer stores historical stable operating condition samples. When the model update state is in the non-update state, the current running model remains unchanged, and the candidate scheduling instructions generated by the candidate scheduling are used.
[0037] Feasible region projection and guaranteed scheduling Candidate scheduling instructions are input into the set of operational constraints and the feasible region is projected to obtain executable scheduling instructions. The set of operational constraints includes at least multi-energy supply and demand balance constraints, upper and lower limits of equipment output constraints, ramping constraints, energy storage charge state boundary constraints, and tie-line switching power limit constraints.
[0038] When a feasible solution exists in the feasible region projection, an executable scheduling instruction is output; when no feasible solution exists in the feasible region projection, a backup scheduling instruction is generated according to the backup rule. The backup rule is as follows: when a historical feasible scheduling instruction exists, the most recent historical feasible scheduling instruction is used as the benchmark and the minimum energy supply ratio constraint of the critical load is applied; when the system starts and no historical feasible scheduling instruction exists, a backup scheduling instruction is generated according to the startup baseline scheduling table.
[0039] Command issuance and closed-loop update Executable scheduling instructions or backup scheduling instructions are issued to the controlled equipment, execution feedback data is collected and written to the online sample buffer, and the current running model and model update status determined in this scheduling cycle are used as the initial conditions for the next scheduling cycle to enter the next round of scheduling.
[0040] Through the above steps, data processing, model updating and scheduling execution form a closed-loop collaboration. This process maintains the consistency between candidate scheduling instructions and the set of operating constraints on the one hand, and continuously corrects the current operating model as the operating conditions change on the other hand, thereby improving the scheduling stability and execution consistency of the integrated energy system under dynamic operating conditions.
[0041] In this embodiment, the data acquisition and preprocessing are performed according to the following process: The system collects operational data in each scheduling cycle. Data sources include distribution network metering terminals, distributed power source control units, heat source controllers, cold source controllers, energy storage management systems, load monitoring terminals, and environmental monitoring terminals. The operational data includes tie-line switching power, distributed power source output, heat source output, cold source output, energy storage state of charge, controllable load power, outdoor temperature, outdoor humidity, and irradiance. Each data record includes a collection timestamp and data source identifier.
[0042] After data collection, clock reference unification is performed first, followed by resampling according to the scheduling cycle. The scheduling cycle is a fixed and configurable period, which is 5 minutes in this embodiment. Data within each scheduling cycle time window is processed according to variable type: tie-line switching power, distributed power output, heat source output, cold source output, and controllable load power are averaged over the time window; energy storage charge status is the latest valid value at the end of the time window; outdoor temperature, outdoor humidity, and irradiance are averaged over the time window. After resampling, the cycle label is checked for consistency to ensure that the same cycle record corresponds to the same scheduling cycle number.
[0043] The preprocessing sequence is missing value completion, anomaly identification and replacement, and normalization. Missing value completion adopts a hierarchical strategy: for single-point missing values, linear interpolation of adjacent valid values is used; for continuous missing values and the missing duration does not exceed the preset upper limit, historical statistical values of the same scheduling cycle number within the same day are used and combined with the most recent valid value for correction; for continuous missing values exceeding the preset upper limit, the most recent valid value is used for conservative replacement and a low confidence flag is written.
[0044] Anomaly identification and replacement includes three types of criteria: physical upper and lower limits criteria, rate of change criteria, and energy consistency criteria. If any criterion is not met, the field is judged as an anomaly and replaced with the most recent valid value. At the same time, an anomaly flag is written. The energy consistency criteria are based on threshold comparison of electrical energy balance residuals, thermal energy balance residuals, and cold energy balance residuals.
[0045] The normalization process uses a normalized parameter set corresponding to the model version. The normalized parameters remain unchanged within the same model version. When the model version is updated, the corresponding parameter set is switched synchronously. After normalization, the current time window sample is output. The current time window sample contains at least nine types of running data fields, quality label fields, scheduling cycle numbers, and time labels, and is directly input into the subsequent model matching and state prediction stages.
[0046] The quality tag field is used to record the field status, including at least normal tags, missing completion tags, and abnormal replacement tags. Through this process, it can be ensured that data from different sources form comparable, traceable, and directly usable input data for scheduling calculations under a unified time benchmark.
[0047] In this embodiment, the currently running model matching module is implemented according to the following process: Source Domain Model Library Construction The source domain model library is built offline during the historical operation phase. The historical data comes from distribution network metering terminals, distributed power control units, heat source controllers, cold source controllers, energy storage management systems, load monitoring terminals, and environmental monitoring terminals. The historical data is first processed into historical time window samples according to the aforementioned preprocessing process, and then training samples are organized in segments according to stable operating conditions.
[0048] The following criteria are used to determine the stable operating condition segment: Within a consecutive preset window period, if the topology connection matrix remains unchanged, the equipment availability status remains unchanged, and the fluctuation ranges of tie line switching power, heat source output, cold source output, and controllable load power do not exceed their respective preset thresholds, a continuous sample segment that meets the above conditions is defined as a stable operating condition sample segment.
[0049] For each stable operating condition sample segment, a pre-trained model is trained, and the sample set of that sample segment is saved as the source domain reference sample set bound to the pre-trained model.
[0050] Therefore, each entry in the source domain model library should include at least: pre-trained model parameters, scene identifier, source domain reference sample set, model version number, and library creation time label.
[0051] Scene identification composition and unified standards The scene identifier for each pre-trained model consists of a topology connection matrix, a device rated capacity vector, and a load type percentage vector.
[0052] The topology connection matrix is constructed using a fixed node order. The node order is determined once during the database construction phase and remains unchanged during the online phase. The matrix elements use binary values: 1 for connected elements and 0 for disconnected elements.
[0053] The equipment rated capacity vector records the rated capacity of distributed power sources, rated capacity of heat sources, rated capacity of cold sources, rated capacity of energy storage, and adjustable capacity of controllable loads in the order of fixed equipment.
[0054] The load type proportion vector is calculated according to the preset load category set to show the proportion of each type of load power to the total load power. All components are non-negative and the sum of the components is one. The load category set is fixed during the database construction phase and remains unchanged during the online phase.
[0055] To eliminate the difference in units, the three parts of the scene identifier use the same set of normalization parameters during database construction and online matching, and the same model version corresponds to the same set of normalization parameters.
[0056] Current running model matching During online operation, each scheduling cycle first generates the current scene identifier from the current time window sample, and then calculates the weighted Euclidean distance with each pre-trained model scene identifier in the source domain model library.
[0057] To standardize the calculation, the topological connectivity matrix is flattened into matrix vectors in a fixed order, and then Euclidean distances are calculated between the matrix and the remaining vectors. For any candidate pre-trained model, the distance value is defined as: The first weight is multiplied by the topological connectivity matrix vector distance. Add the second weight multiplied by the device's rated capacity vector distance. Add a third weight and multiply by the load type percentage vector distance.
[0058] The first, second, and third weights are preset constants, all of which are not less than zero, and their sum is one. These weights are determined by historical validation samples before system deployment and remain unchanged within the same model version. The candidate pre-trained model with the smallest distance value is used as the current running model. If there are ties in the minimum distance, or if the difference in the minimum distance is not greater than the tie resolution threshold, then it is handled according to the tie resolution rules: First, compare the average prediction residuals of each candidate model within a preset window period, and select the one with the smaller average prediction residual. If they are still tied, the one with the newest database creation time tag will be used; This rule ensures that a unique currently running model is output for each scheduling cycle.
[0059] Data integration with subsequent steps After the current running model is matched, the current time window sample input generates the state prediction result and candidate scheduling instructions for the current running model; at the same time, the source domain reference sample set bound to the matched model is directly used as the reference data for calculating the migration judgment index.
[0060] Therefore, model matching and migration decisions maintain consistency in data sources, and there is no break in the reference.
[0061] Feasibility Statement The data required in this embodiment all come from the system's regular operation records and equipment parameter ledgers, and the data sources are clear and available. The required calculations only include matrix construction, vector normalization, Euclidean distance calculation, and rule determination, all of which are conventional engineering implementation methods in this field. The structure of the model library entries, the composition of scene identifiers, the distance calculation rules, the parallel resolution rules, and the subsequent connection relationships are all clearly defined, and those skilled in the art can implement the current running model matching module accordingly.
[0062] Explanation of technical implementation differences The model matching in this embodiment is not a single feature matching, but a joint matching using a unified scenario identifier of topology connection matrix, equipment rated capacity vector and load type proportion vector, and requires that the pre-trained model be bound one-to-one with the source domain reference sample set. This implementation allows the model selection result to directly enter the migration decision link, forming a continuous data reference relationship, and avoiding the decision bias caused by the inconsistency between the model selection and the source of the reference sample.
[0063] In this embodiment, the migration determination index consists of a domain offset index, a physical consistency index, and a constraint violation rate index. These three indexes are calculated in parallel within the same scheduling cycle and output uniformly to the model update status determination module. This calculation process is deployed within the energy management main control system and is linked with the data preprocessing module, model matching module, and scheduling solution module according to a unified scheduling timescale.
[0064] In the nth scheduling cycle, the migration decision index calculation module receives the following inputs: the current time window sample output by the data preprocessing module; the current running model and its bound source domain reference sample set determined by the model matching module; the state prediction result output by the current running model for the current time window sample; the candidate scheduling instructions output by the current running model; and the set of running constraints for this cycle. The above inputs use the same scheduling cycle number and the same time label to avoid mixing data across cycles.
[0065] The domain offset metric measures the distribution difference between the current time window sample and the source domain reference sample set, and, combined with the prediction residuals, reflects the degree of scene migration. During calculation, firstly, feature fields consistent with the input of the currently running model are selected to form a statistical vector. These feature fields include tie-line switching power, distributed power output, heat source output, cold source output, energy storage state of charge, controllable load power, outdoor temperature, outdoor humidity, and irradiance. The current time window sample and the source domain reference sample set use the same normalized parameter set. Subsequently, the mean vector difference, variance vector difference, and the mean of the prediction residuals are calculated separately and normalized. The normalization benchmark for the mean of the prediction residuals is statistically obtained from the source domain reference sample set during the database construction phase and is fixed with each model version. The domain offset metric is obtained by weighting the above three normalized quantities with fixed weights, where the weights are preset constants and the sum of the weights is one. If the normalization denominator is zero, a preset positive lower limit is used to replace the denominator to ensure the calculation is defined.
[0066] The physical consistency index measures the degree of consistency between candidate scheduling commands and the physical balance of multiple energy sources. First, the absolute values of the residuals for power balance, thermal balance, and cold energy balance are calculated. Power balance is calculated based on tie-line switching power, distributed generation output, energy storage charging and discharging power, controllable load power, and estimated power losses. Thermal balance is calculated based on heat source output, heat load, and estimated heat losses. Cold energy balance is calculated based on cold source output, cold load, and estimated cold losses. When the system is equipped with thermal or cold storage devices, the corresponding thermal or cold storage power items are included in the balance calculation; otherwise, the corresponding items are set to zero. Then, each item is normalized according to its corresponding rated capacity and weighted by fixed weights to obtain the physical consistency index. These three weights are preset constants, and their sum is one, and they are managed in conjunction with the model version.
[0067] The constraint violation rate metric measures the degree to which candidate scheduling instructions violate the set of operational constraints. The set of operational constraints is expanded into verifiable constraint entries based on the solution dimension for the current cycle, including at least multi-energy supply and demand balance constraints, equipment output upper and lower limit constraints, ramping constraints, energy storage state of charge boundary constraints, tie-line switching power limit constraints, and tiered load guarantee constraints. Each constraint entry undergoes a feasibility test; entries exceeding the tolerance upper limit are marked as violations. The tolerance upper limit is determined by the equipment measurement error range and control error range before system deployment and is fixed in the parameter file. The constraint violation rate metric is defined as the ratio of the number of violation entries to the total number of constraint entries. The operational constraint set is initialized to include at least supply and demand balance constraints and equipment boundary constraints to ensure that the total number of constraint entries is greater than zero.
[0068] After the three indicators are calculated, a set of migration judgment indicators for this cycle is formed and output to the model update status judgment module along with the scheduling cycle number, model version number, and data quality tag. The model update status judgment module executes the migration triggering rules and migration stopping rules based on this set of indicators to determine whether to start incremental migration training. Thus, the calculation of migration judgment indicators and model update decisions are consistent in terms of data source, time order, and version management.
[0069] Parameter management employs a version-binding mechanism. Fixed weights, normalized parameters, upper tolerance limits, and lower denominator limits are all determined offline from historical runtime validation data and bound to the model version. When switching model versions, the corresponding parameter versions are switched synchronously. During online operation, the above parameters are not recalibrated online to maintain consistency in calculation methods within the same model version.
[0070] This embodiment uses three types of information—statistical distribution difference, physical balance consistency, and constraint feasibility—to determine migration within the same scheduling cycle, and all three indicators maintain a one-to-one correspondence with the current running model and its bound source domain reference sample set. This implementation can directly drive model update state determination and form a closed-loop collaboration with subsequent scheduling execution.
[0071] In this embodiment, the model update status is jointly determined by the domain offset index, the physical consistency index, and the constraint violation rate index.
[0072] In the nth scheduling cycle, the model update status determination unit receives three indicators output by the migration determination index calculation unit and reads the first upper threshold, the first lower threshold, the second upper threshold, the second lower threshold, the third upper threshold, and the third lower threshold from the parameter file. The parameter file is configured before system deployment and is bound to the model version for management. When the system starts, the threshold validity is checked first. The check conditions are that the first upper threshold is greater than the first lower threshold, the second upper threshold is greater than the second lower threshold, and the third upper threshold is greater than the third lower threshold. After the check passes, the online determination process begins.
[0073] The input for the decision includes the domain offset index, physical consistency index, constraint violation rate index, and the model update status of the previous scheduling cycle. The output is the model update status of the current scheduling cycle, which can be either updated or not updated.
[0074] The migration trigger rule is that it is valid if any of the following conditions are met: The domain offset index is greater than the first upper threshold and the physical consistency index is greater than the second upper threshold; the constraint violation rate index is greater than the third upper threshold.
[0075] The migration stop rule is valid if the following conditions are met simultaneously: The domain offset index is less than the first lower threshold; The physical consistency index is less than the second lower threshold; The violation rate indicator is less than the third lower threshold.
[0076] The model update status is determined in the following order: The first scheduling cycle is directly set to update state; If the migration trigger rule is met in a non-first scheduling cycle, the state is set to update. If the migration trigger rule is not met and the migration stop rule is met in a non-first scheduling cycle, then the state is set to no update. If neither the migration trigger rule nor the migration stop rule is met, then the model update state of the previous scheduling cycle is maintained.
[0077] Threshold boundaries are treated as not exceeding the threshold; that is, the indicator value is not triggered when it equals the upper threshold and does not stop when it equals the lower threshold.
[0078] When indicators for the current period are missing or invalid, the following rules apply: The first scheduling cycle will still be executed according to the updated status; If, during a non-first scheduling cycle, the constraint violation rate is valid and greater than the third upper threshold, a trigger judgment is executed and the status is set to update. In all other cases, the model update status of the previous scheduling cycle is maintained.
[0079] The number of consecutive decision cycles is configurable. When the configured value is greater than one, the rule must be satisfied for the corresponding number of consecutive cycles before the model update state can be changed; when not configured, the number of consecutive decision cycles is one.
[0080] The thresholds are determined during the offline verification phase, with data sourced from system historical operation records and equipment parameter ledgers. During offline verification, candidate threshold groups are replayed, and false trigger rate, missed trigger rate, and constraint violation recovery time are calculated according to a unified statistical standard. The threshold group that satisfies the condition that the upper threshold is greater than the lower threshold and has the best overall performance is selected, written into the parameter file, and bound to the model version. During online operation, online threshold recalibration is not performed within the same model version; the corresponding threshold group is loaded synchronously when the model version is switched.
[0081] The judgment result in this section directly drives the incremental transfer training process. When the model update state is in the update state, incremental transfer training is executed. When the model update state is in the non-update state, the currently running model is maintained and scheduling continues. Thus, the transfer judgment index, threshold rules and model update actions form a closed loop within the same scheduling cycle, with consistent input sources, judgment logic and output destination.
[0082] In this embodiment, incremental transfer training is driven by the model update status determination result. Parameter updates are only performed when the model update status of the current scheduling period is in the update state; when the model update status is in the non-update state, parameter updates are not performed, but execution feedback samples are still written.
[0083] The online sample buffer is used to store execution feedback samples from the most recent N scheduling cycles, where N is an integer not less than two. Each execution feedback sample contains at least the current time window sample, candidate scheduling instructions, actual issued scheduling instructions, state prediction results, measured state quantities, domain offset indicators, physical consistency indicators, constraint violation rate indicators, scheduling cycle number, and timestamp. The online sample buffer is managed using a first-in-first-out queue.
[0084] The prototype sample buffer is used to store historical stable operating condition samples; before historical samples are entered into the database, data preprocessing is performed in the same way as online samples; the selection criteria for stable operating condition samples are: the topological connection relationship remains unchanged within a continuous preset period, the equipment availability status remains unchanged, the constraint violation rate index does not exceed the third lower threshold and the data quality mark is valid.
[0085] In the update state, a training batch is constructed once per scheduling cycle. The training batch is obtained by mixing online samples and prototype samples in a fixed ratio. The ratio of online samples and the ratio of prototype samples are both greater than zero and their sum is one. The minimum number of training samples is not less than the size of the training batch. When the effective number of online samples is lower than the minimum number of training samples, only samples are written in this cycle and no parameter update is performed.
[0086] Parameter updates are performed in a hierarchical order. First, the model adaptation layer parameters are updated, with the update target being the weighted sum of the state prediction error term and the physical consistency deviation term, where the weight sum is one. After the model adaptation layer update is completed, the candidate scheduling instructions for the current period are recalculated and take effect in the current period. Then, the model decision layer parameters are updated, employing a continuous gating mechanism. A continuous counter is set with an initial value of zero. The continuous counter is incremented only when the constraint violation rate is not greater than the third lower threshold and the change rate of the candidate scheduling instructions is not greater than the change rate threshold. If any condition is not met or any input is invalid, the continuous counter is reset to zero. When the continuous counter reaches K, a model decision layer parameter update is performed once, where K is an integer not less than two. This update takes effect in the next scheduling period, and the continuous counter is reset to zero after the update.
[0087] The rate of change of candidate scheduling instructions is calculated using a fixed vector caliber. The dimension, field order, and normalization caliber of the candidate scheduling vector remain unchanged within the model version. When the norm of the candidate scheduling vector in the previous scheduling cycle is greater than zero, the rate of change is defined as the ratio of the norm of the difference between the candidate scheduling vectors in two adjacent scheduling cycles to the norm of the candidate scheduling vector in the previous scheduling cycle. When the norm of the candidate scheduling vector in the previous scheduling cycle is equal to zero, the rate of change is defined as the norm of the difference between the candidate scheduling vectors in two adjacent scheduling cycles. When both candidate scheduling vectors in two adjacent scheduling cycles are zero vectors, the rate of change is zero.
[0088] When the model update state switches from non-updating to updating, the continuous counter is reset to zero and then starts counting again; when the model update state switches from updating to non-updating, parameter updates are stopped and the continuous counter is reset to zero.
[0089] N, K, rate of change threshold, third lower threshold, training step size, batch size, and mixing ratio are determined during the offline validation phase and are bound to the model version. When switching model versions, the corresponding parameter group is loaded synchronously, and the effective period number is recorded. Online recalibration is not performed during the online operation of the same model version.
[0090] The inputs to this section are the model update status, three migration decision indicators, candidate scheduling instructions, and execution feedback data output from the preceding module. The output of this section is the updated current running model and its parameter version number, which is used for subsequent candidate scheduling generation and feasible region projection, thus forming a closed-loop process of data acquisition, migration decision, parameter update, and scheduling solution.
[0091] In this embodiment, the feasible region projection module receives candidate scheduling instructions in each scheduling cycle and solves for the executable scheduling instruction that is closest to the candidate scheduling instruction within the set of operating constraints. The input of this module includes candidate scheduling instructions, scheduling instructions executed in the previous scheduling cycle, current equipment status, current load demand, and operating constraint parameters; the output includes executable scheduling instructions and feasibility flags.
[0092] The definition and order of decision quantities are fixed. To ensure consistency in calculation methods, candidate scheduling instructions and projected scheduling instructions use the same set of decision quantities and the same field order. The decision quantities include at least: tie-line switching power, distributed power output, heat source output, cold source output, energy storage charging power, energy storage discharging power, and energy allocation for graded controllable loads.
[0093] The field order is fixed during system deployment and remains unchanged during online operation; feasible domain projection is always performed in this fixed order.
[0094] Construction and implementation of the set of operational constraints The set of operational constraints consists of the following six types of constraints, and each constraint is in effect simultaneously during the current scheduling period; Multiple energy supply and demand balance constraints Within the current scheduling cycle, the balance of electrical energy, thermal energy, and cold energy shall be satisfied respectively.
[0095] Power balance is based on the condition that the total power available on the power supply side is equal to the total power demanded on the power supply side. Thermal energy balance is conditional upon the total available power on the heat side being equal to the total demand power on the heat side. The condition for cold energy balance is that the total power available on the cold side is equal to the total power demanded on the cold side.
[0096] When the system is not equipped with energy storage or conversion equipment on a certain side, the power item corresponding to that equipment is treated as zero.
[0097] Equipment output upper and lower limit constraints The power of distributed power sources, heat sources, cold sources, energy storage power ports, and tie line switching are all subject to their respective minimum and maximum allowable values.
[0098] The upper and lower limit parameters are derived from the equipment's rated parameter ledger and operating strategy parameter file, and are linked to the equipment's availability status. When the equipment is unavailable, both its upper and lower output limits are set to zero.
[0099] Climbing constraints For equipment with ramping characteristics, the change between the output of the current scheduling cycle and the output executed in the previous scheduling cycle shall not exceed the corresponding ramping limit and ramping limit of the equipment.
[0100] The ramp limit is configured separately for each equipment type and is converted to the current cycle according to the length of the scheduling cycle.
[0101] Energy storage charge state boundary constraints At the end of the current scheduling cycle, the energy storage state of charge must be between the preset lower and upper boundaries.
[0102] The energy storage state of charge is calculated from the energy storage state of charge at the end of the previous scheduling cycle, the charging power of the current cycle, the discharging power of the current cycle, the charging and discharging efficiency, and the rated capacity; the charging power and the discharging power are not allowed to be positive at the same time within the same scheduling cycle.
[0103] Tie line switching power limit constraints The switching power of tie lines must meet the bidirectional power boundary and the dispatch protocol boundary, with restrictions imposed in both the forward and reverse directions. When the upper-level distribution network issues a temporary switching power limit, the temporary limit shall be used as the effective boundary for this cycle.
[0104] Tiered load protection constraints Controllable loads are divided into at least two levels according to load class, and the energy supply ratio of critical load class shall not be lower than the corresponding minimum guarantee ratio.
[0105] Non-critical loads may be reduced or transferred within a preset range, but this must not cause the critical load level protection constraints to fail.
[0106] The tiered load protection ratio is given by the operation strategy parameter file, and strategy changes take effect at the scheduling cycle boundary.
[0107] Feasible region projection objectives and solution process Projected target With the objective of minimizing the Euclidean distance between the projected scheduling instruction and the candidate scheduling instruction, the executable scheduling instruction is solved under the condition of satisfying the above set of operational constraints. This objective ensures that the projection result retains the structural characteristics of the candidate scheduling instruction as much as possible, while eliminating infeasible components.
[0108] Solution steps The first step is to read the candidate scheduling instructions and all constraint parameters for the current cycle; The second step is to construct a constraint optimization problem according to a unified field order; The third step is to call the constraint optimization solver to solve for the projection results; The fourth step is to perform constraint residual verification on the solution results. If the constraint residual does not exceed the upper tolerance limit, it is marked as feasible. The fifth step is to output the feasible results as executable scheduling instructions and pass them to the dispatch module.
[0109] No feasible solution branch If the solver returns no feasible solution or the residual check fails, an infeasibility flag is output, and a safety net rule is triggered to generate a safety net scheduling instruction.
[0110] After the minimum dispatch instruction is generated, it still needs to be reviewed for critical load guarantee constraints, energy storage charge state boundary constraints, and tie line switching power limit constraints. It can only be issued after the review is passed.
[0111] Boundary conditions and exception handling missing parameter handling When a certain type of constraint parameter is missing, the constraint is not relaxed directly, but is executed according to the most recent valid parameter; if there is no historical valid parameter, the current cycle directly enters the minimum guarantee rule.
[0112] Measurement Anomaly Handling When a device status variable is marked as invalid, the upper and lower limits of the relevant device output are contracted according to conservative boundaries to avoid amplifying the feasible region due to abnormal measurements.
[0113] Cycle switching consistency The scheduling instructions executed in the previous scheduling cycle used for projection solving must be consistent with the actual issued records. Candidate scheduling instructions are not allowed to replace the executed values of the previous cycle.
[0114] Collaboration with preceding and following modules The inputs in this section correspond one-to-one with the outputs of the preceding modules: candidate scheduling instructions come from the current running model, running constraint parameters come from the device parameter ledger and strategy parameter file, and the executed values from the previous cycle come from execution feedback data.
[0115] The executable scheduling instructions output in this section directly enter the instruction issuance module and are written back to the online sample buffer along with the execution feedback data after the cycle ends. Therefore, candidate generation, feasible region projection, and execution feedback form a closed loop, with a clear reference basis and consistent time order.
[0116] This embodiment does not first correct the electric side, hot side, and cold side separately and then stitch the results together, but performs multi-energy joint feasible domain projection under a unified decision vector; It does not reconstruct scheduling with a single economic objective, but rather with minimizing the Euclidean distance to candidate scheduling instructions as the primary objective, and completes the projection under the premise of satisfying the set of operational constraints.
[0117] This implementation ensures that the projection results maintain a balance between feasibility and instruction continuity, and can directly connect to the candidate scheduling instructions generated by the aforementioned online transfer learning.
[0118] In this embodiment, the backup rule is executed by the backup scheduling module. The backup scheduling module is triggered when the feasible domain projection module outputs an infeasibility marker, and is used to generate a backup scheduling instruction that can be directly issued. The backup scheduling module inputs include candidate scheduling instructions, scheduling instructions executed in the previous scheduling cycle, historical feasible scheduling instruction library, start baseline scheduling table, current load demand, current equipment availability status, current energy storage charge status, and tie-line switching power boundary parameters. The outputs include backup scheduling instructions, backup source markers, and constraint verification results. Candidate scheduling instructions are only used as reference information in the backup process and are not used as directly issued instructions.
[0119] Triggering conditions and execution priority The minimum guarantee scheduling process will be initiated when any of the following situations occur: The feasible region projection solution returned no feasible solution; Although the feasible region projection has a solution, the constraint residual verification fails. The key input parameters are missing and cannot be recovered using the most recent valid parameters.
[0120] Once the backup scheduling process is initiated, no more candidate scheduling instructions will be issued in this cycle. The backup scheduling process has a higher priority than the regular candidate scheduling execution process.
[0121] Path selection rules The backup scheduling module selects the backup path in the following order: If the historical feasible scheduling instruction library is not empty, execute the historical feasible scheduling instruction path; When the system is in the startup phase and the historical feasible scheduling instruction library is empty, execute the startup baseline scheduling table path; If the system is not in the startup phase and the historical feasible scheduling instruction library is empty, it will directly enter the fault-safe policy path.
[0122] Historical feasible scheduling instruction paths When a historical feasible scheduling instruction exists, a backup scheduling instruction is generated based on the most recent historical feasible scheduling instruction. The most recent instruction is determined by reverse retrieval of the scheduling cycle number. The historical feasible scheduling instruction should simultaneously satisfy the following: The corresponding periodic feasibility is marked as feasible; The constraint residual must not exceed the upper tolerance limit; The execution feedback data quality is marked as valid; The instructions have been actually issued and execution records have been retained.
[0123] If the available status of the equipment corresponding to the baseline command is inconsistent with the current period, equipment availability remapping is performed first: the output of unavailable equipment in the current period is set to zero, and available equipment is reallocated within the allowable range. After the remapping is completed, the following hard constraints are applied and verified in sequence: Minimum power supply ratio constraints for critical loads; safe range constraints for energy storage state of charge; limits on tie-line switching power.
[0124] After the review is approved, a backup scheduling instruction is output, and the backup source is marked as a historical feasible scheduling instruction path.
[0125] Start Baseline Scheduling Path When the system starts up and there are no historical feasible scheduling instructions, a backup scheduling instruction is generated according to the startup baseline scheduling table. The startup baseline scheduling table is generated by the day-ahead scheduling plan and written into the controller before the system starts up. The startup baseline scheduling table includes at least the time period index, equipment baseline output, critical load guarantee ratio, energy storage charge status target range and tie line exchange power boundary.
[0126] After the system starts, the backup scheduling module reads the baseline instruction according to the corresponding time period of the current scheduling cycle as the backup benchmark for this cycle. If the current equipment availability status is inconsistent with the baseline record, the equipment availability remapping is performed first, and then the minimum power supply ratio constraint of critical load, the safe range constraint of energy storage charge status and the tie line switching power limit constraint are applied in sequence. After the verification is passed, the backup scheduling instruction is output and the backup source is marked as the path to start the baseline scheduling table.
[0127] Review failure handling and fault-safe strategy path After the minimum load dispatch instruction is generated, it is reviewed in a fixed order: first, the safety range constraints of the energy storage charge state are reviewed; then, the limit constraints of the tie line switching power are reviewed; and finally, the minimum power supply ratio constraints of the critical loads are reviewed. The instruction can only be issued after all of them have passed.
[0128] If the review fails, a conservative backup plan will be implemented, with the following processing order: Components of the scheduling instructions that meet the safety boundary in the previous scheduling cycle are preferentially retained; Non-critical loads are reduced in stages according to preset levels; Increase the energy supply to critical loads to the minimum guaranteed level; Boundary clamping is performed on energy storage power and tie-line switching power.
[0129] If the safety boundary cannot be met even after conservative minimum protection, the fail-safe strategy path is entered. The fail-safe strategy is preset in the controller and is consistent with the equipment protection logic, including at least tie-line switching power limit, energy storage power limit, and priority power supply for critical loads.
[0130] Command issuance and closed-loop update After the approved backup scheduling instruction is issued to the controlled equipment, the system records the execution feedback data for this cycle, including actual output, load satisfaction, changes in energy storage state of charge, and tie-line exchange power. The execution feedback data is written back to the online sample buffer and used as data input for feasibility determination and model update in subsequent scheduling cycles. In subsequent cycles, when the feasible domain projection becomes feasible again, the system exits the backup path and returns to the regular candidate scheduling execution path.
[0131] Parameter source and version management The minimum energy supply ratio for critical loads, the safe range of energy storage charge status, the limit of tie-line switching power, the upper limit of tolerance, and the boundary clamping parameters are determined by the offline verification stage based on historical operating data and equipment parameter ledgers, and written into the parameter file; the parameter file is bound to the model version and the control strategy version, and the version switch only takes effect at the boundary of the scheduling cycle; no online recalibration is performed during the operation of the same version to ensure that the baseline rules are consistent and reproducible.
[0132] Technical Implementation Description This embodiment employs a dual-path backup mechanism and a fixed review order to ensure that executable instructions that meet hard constraints can still be output even when feasible region projection fails, and forms a closed-loop collaboration with the preceding feasible region projection module and the subsequent execution feedback write-back module.
[0133] In this embodiment, the integrated energy real-time energy management adopts a decoupled operation mechanism between the scheduling execution cycle and the incremental migration training cycle. The scheduling execution cycle is defined as the first cycle, and the incremental migration training cycle is defined as the second cycle. The second cycle is an integer multiple of the first cycle and is greater than the first cycle. Let the second cycle be equal to the first cycle multiplied by an integer multiple, where the integer multiple is an integer not less than two. The system performs data acquisition, candidate scheduling generation, feasible region projection, and instruction issuance according to the first cycle; it performs regular incremental migration training according to the boundary of the second cycle; event-triggered updates belong to the instant update path and are not restricted by the boundary of the second cycle.
[0134] Cyclical relationships and routine execution processes Within each first cycle, the system executes the following process: collect samples from the current time window, call the current running model to generate candidate scheduling instructions, perform feasible region projection based on the set of running constraints, and obtain executable scheduling instructions; when there is no feasible solution in the feasible region projection, it switches to the backup rule.
[0135] When the second cycle boundary is reached, if the model update state is in the update state, then regular incremental transfer training is performed and the currently running model is updated; if the model update state is in the no-update state, then the currently running model remains unchanged. Through the above cycle configuration, scheduling execution is kept at a high frequency, and model training is kept at a low frequency.
[0136] Event types and detection rules The system performs event detection within each first cycle. Event types include topology connection matrix change events and device availability status changes from available to unavailable events.
[0137] A change in the topology connectivity matrix is valid if any of the following conditions are met: The current period's topology connectivity matrix has a different dimension than the previous period's topology connectivity matrix; Under the condition of consistent dimensions, any corresponding element may change; device access or exit will cause changes in node mapping relationships.
[0138] An event that changes a device's available status from available to unavailable is valid if the following conditions are met: Any device participating in the scheduling process was available in the previous cycle but is unavailable in the current cycle. Devices participating in the scheduling process include distributed power supply devices, heat source devices, cold source devices, energy storage devices, and critical controllable load execution units.
[0139] To avoid false triggering caused by sampling jitter, event detection employs dual verification: The first layer is the state sampling consistency check, which means that the continuous sampling results are consistent within the same first cycle; The second layer is data validity verification, which means that the quality of the status data involved in the judgment is marked as valid.
[0140] If both checks pass, the event is considered valid and written to the event log queue.
[0141] Immediate trigger rules and priorities When a topology connection matrix change event or a device availability event changes from available to unavailable is detected, the model update state is immediately set to update state.
[0142] This rule takes precedence over regular migration trigger rules and migration stop rules. The stop rule is not executed during the current period when the event is triggered, and it does not wait for the next second cycle.
[0143] If multiple events occur within the same first cycle, they are handled according to the event merging strategy, and only one model update state switch is performed. The constraint boundary for this cycle is generated based on the most unfavorable equipment availability state.
[0144] Execution sequence after event triggering Once the event is triggered, it will execute in the following order, which is fixed: The first step is to save the rollback model and record the event type and event timestamp. The rollback model is the currently running model that was running before the event was triggered. If the system is in the startup phase and there is no previous cycle model, the current running model obtained by the first match after startup is used as the rollback model.
[0145] The second step is to set the model update state to update state and start event-driven incremental transfer training.
[0146] The third step involves constructing training batches based on the online sample buffer and the prototype sample buffer, updating the model parameters, and obtaining the updated current running model.
[0147] The fourth step is to regenerate candidate scheduling instructions using the updated current running model.
[0148] The fifth step is to perform feasible region projection using the latest set of running constraints after the event, and output executable scheduling instructions.
[0149] Step 6: If no feasible solution is found in the feasible region projection, then proceed to the backup rule to generate backup scheduling instructions.
[0150] The above timing guarantees that the model is updated before the feasible region projection is executed, and that the constraint set after the event and the candidate scheduling instructions belong to the same state caliber.
[0151] Synergy with hierarchical update mechanism The update mechanism following the event trigger is consistent with the hierarchical update mechanism: At least one update of the model adaptation layer parameters is performed during the current period of the event; whether the model decision layer parameters are updated is still determined by the continuous periodic stability condition.
[0152] If the decision-level update conditions are not met in the current period, the decision-level parameters remain unchanged, and only the updated adaptation layer parameters are used to generate candidate scheduling instructions; this mechanism maintains consistency between rapid adaptation and update stability.
[0153] Co-processing of the second cycle and event updates When the event is triggered at the boundary of the second cycle, the event update and the boundary regular update are merged into a single update execution.
[0154] Even if the event is triggered at a time that is not at the boundary of the second cycle, an immediate update is still performed without waiting for the boundary moment.
[0155] After the event is processed, the second cycle count continues to use the original cycle reference and the scheduling clock is not reset. If the policy requires the cycle count to be reset, it is only allowed to be executed at the first cycle boundary and the version change flag is recorded.
[0156] Exceptional branches and rollback strategies If training fails due to invalid input data or insufficient sample quantity after the event is triggered, the system loads the rollback model and continues to execute the feasible region projection; if the feasible region projection under the rollback model still has no feasible solution, the backup rule is entered; if the updated model does not meet the preset running conditions in subsequent consecutive cycles, the system switches to the rollback model according to the rollback conditions and continues to execute the scheduling according to the first cycle.
[0157] Parameter source and version management The duration of the first cycle, the duration of the second cycle, integer multiples, the event detection sampling interval, the event merging time window, and the rollback trigger threshold are determined by the offline verification stage based on historical operation records and equipment parameter ledgers. The above parameters are written into the controller parameter file and bound to the model version. The parameter version switch only takes effect at the boundary of the first cycle. No online recalibration is performed during the operation of the same version to ensure that the cycle logic and the event triggering logic are consistent.
[0158] Technical Implementation Description This embodiment introduces an event-driven instant update mechanism on the basis of the fixed dual-cycle mechanism, so that the model immediately enters the update state when the topology or equipment availability changes suddenly, and performs feasible domain projection after the model is updated. This execution path can shorten the duration of model mismatch and reduce the probability of infeasible scheduling instructions appearing under sudden operating conditions.
[0159] In this embodiment, the system sets up a candidate model to run in parallel outside the current running model. The candidate model is obtained by incremental transfer training of the current running model based on the online sample buffer. The candidate model does not participate in the issuance of current control instructions and is only used for parallel evaluation. The candidate model and the current running model are computed in parallel under the same current time window sample and the same set of running constraints, and the system determines whether to replace the current running model through continuous periodic judgment.
[0160] Model object and data object definition The current operating model is used to generate actual scheduling instructions for the current cycle. Candidate models are used for parallel evaluation and are not directly deployed. The rollback baseline model is the currently running model version that is frozen and saved at the start of the candidate model evaluation window. It is used to replace the decision comparison and the rollback comparison after replacement. The online sample buffer stores execution feedback samples, which include at least the current time window sample, the actual dispatch instructions issued, the measured status variables, the constraint violation rate indicators, and the power supply records of key loads.
[0161] Candidate model creation and training process A candidate model is created when the following conditions are met simultaneously: The model is in the update state. The number of valid samples in the online sample buffer is not less than the minimum number of training samples; The creation process is executed in the following order: The first step is to freeze and save the current running model as the rollback baseline model; The second step is to copy the parameters of the rollback baseline model to obtain the initial version of the candidate model. The third step is to extract the most recent consecutive valid execution feedback samples from the online sample buffer and construct the training batch. The fourth step is to perform incremental transfer training on the candidate model while keeping the input and output field definitions and field order unchanged, to obtain the evaluation version of the candidate model. Fifth step, enter the parallel evaluation window; Within the parallel evaluation window, the rollback baseline model remains unchanged to ensure consistent comparison benchmarks.
[0162] Parallel evaluation and unified comparison criteria In each scheduling cycle, the candidate model and the rollback baseline model receive the same current time window sample and generate candidate scheduling instructions under the same set of running constraints. Both models execute the same feasible region projection process; if there is no feasible solution, they both execute the same safety net rule.
[0163] Calculate the following indicators under a unified standard: Operating costs Operating costs are calculated using a unified cost model. The cost model parameters are configured uniformly by the controller parameter file, and the two models use the same parameter set. Constraint violation rate The constraint violation rate is calculated based on the same set of constraint items, and the two models use the same violation judgment rule; critical load energy deficit The critical load power deficit is calculated by summing the non-negative parts of the difference between the critical load power demand and the critical load power supply obtained from the corresponding scheduling results of the model. For each critical load unit, if the demand power minus the supply power is less than zero, it is counted as zero; if it is greater than zero, it is counted as the difference. The sum of all critical load units is the critical load power supply deficit. When the sum is zero, the critical load power supply deficit for that period is determined to be zero.
[0164] Continuous M-cycle replacement determination A continuous replacement counter is set up, and the continuous replacement counter is incremented by one when the following conditions are met simultaneously in a certain scheduling period: The running cost of the candidate model is no higher than the running cost of the rollback baseline model.
[0165] The constraint violation rate of the candidate model is not higher than that of the constraint violation rate of the rollback baseline model.
[0166] The critical load energy deficit in the candidate model is zero.
[0167] If any condition is not met, the continuous replacement counter is reset to zero.
[0168] When the continuous replacement counter reaches M, the model replacement is performed. M is an integer not less than two. The replacement action is performed at the boundary of the scheduling cycle. After the replacement, the candidate model is converted into the new current running model, and the rollback baseline model is retained as the rollback comparison baseline.
[0169] Continuous R-cycle rollback determination after replacement After the model is replaced, the rollback monitoring window is entered. In the rollback monitoring window, the new current running model and the rollback baseline model continue to be compared in parallel according to the aforementioned unified criteria.
[0170] If the three replacement conditions mentioned above are not met in a certain cycle, the continuous rollback counter is incremented by one; if they are met, the continuous rollback counter is reset to zero.
[0171] When the continuous rollback counter reaches R, the model rollback is executed. R is an integer not less than two. The rollback operation is executed at the boundary of the scheduling cycle. After execution, the current running model is restored to the rollback baseline model.
[0172] After the rollback is complete, the continuous replacement counter and continuous rollback counter are cleared, and the candidate model creation process is restarted.
[0173] Boundary and Exception Handling Data Validity If the key input required for this period's evaluation is invalid, the continuous replacement counter and continuous rollback counter will not be counted in this period, and both counters will remain unchanged.
[0174] Equivalence determination In the comparison between operating costs and constraint violation rates, those equal to the benchmark value are treated as meeting the conditions.
[0175] Feasibility Consistency Handling When any model has no feasible projective solution, the minimum scheduling result must be obtained first according to the same minimum guarantee rule before participating in the index comparison.
[0176] Candidate model distribution restrictions Candidate models must not participate in the issuance of control commands before the replacement action is completed.
[0177] Collaboration with preceding and following modules This section takes input from the current time window sample, the set of running constraints, and the online sample buffer data output by the preceding module.
[0178] This section's output includes the current running model version identifier, model replacement flag, and model rollback flag. The output enters the subsequent scheduling and execution chain, forming a closed loop with the execution feedback write-back process, ensuring that candidate model training, parallel evaluation, version switching, and online scheduling are consistent in timing.
[0179] Parameters and Version Management M, R, minimum number of training samples, cost model parameters, violation statistics items, and critical load list are determined by the offline verification phase based on historical operating data and equipment parameter ledgers, and written into the controller parameter file; the parameter file is bound to the model version, and parameter changes only take effect at the scheduling cycle boundary. Online recalibration is not performed during the operation of the same model version to ensure that the replacement and rollback judgment criteria are consistent.
[0180] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0181] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A comprehensive real-time energy management method based on online transfer learning. Applied to integrated energy systems including distribution network interfaces, heat source equipment, cold source equipment, energy storage equipment, and controllable loads, characterized in that... include: In each scheduling cycle, operational data is collected and preprocessed to obtain the current time window sample; Scene features are extracted based on the current time window sample, and the currently running model is matched from the source domain model library based on the scene features; Input the current time window sample into the currently running model to generate candidate scheduling instructions; The migration judgment index is calculated based on the current time window samples and model output, and the model update status is determined according to the migration triggering rules and migration stopping rules. When the model update state is in the update state, incremental transfer training is performed on the currently running model based on the sample buffer to obtain the updated current running model, and candidate scheduling instructions are regenerated based on the updated current running model; when the model update state is in the non-update state, the current running model remains unchanged. Candidate scheduling instructions are input into the set of running constraints and the feasible region is projected to obtain executable scheduling instructions; when there is no feasible solution in the feasible region projection, a backup scheduling instruction is generated according to the backup rule. Executable scheduling instructions or backup scheduling instructions are issued to the controlled equipment, execution feedback data is collected and written into the sample buffer, and the current running model of the current scheduling cycle is used as the initial model for the next scheduling cycle.
2. The integrated real-time energy management method based on online transfer learning according to claim 1, characterized in that: The operational data includes tie-line switching power, distributed power output, heat source output, cold source output, energy storage state of charge, controllable load power, outdoor temperature, outdoor humidity, and irradiance; the preprocessing includes timestamp alignment, missing value completion, outlier removal, and normalization; the sampled data of each data channel is resampled and aligned with the scheduling cycle.
3. The integrated real-time energy management method based on online transfer learning according to claim 2, characterized in that: Each pre-trained model in the source domain model library is bound to a scene identifier and a source domain reference sample set; the scene identifier consists of a topology connection matrix, a device rated capacity vector, and a load type proportion vector; when matching the currently running model, the principle of minimum weighted Euclidean distance is adopted, and each weight is a preset constant and satisfies that the sum of the weights is 1.
4. The integrated real-time energy management method based on online transfer learning according to claim 3, characterized in that: The migration determination indicators include domain offset indicator, physical consistency indicator, and constraint violation rate indicator; The domain offset index is calculated by weighting the difference in mean vector, difference in variance vector, and mean of prediction residual between the current time window sample and the source domain reference sample with fixed weights. The physical consistency index is calculated by weighting the absolute values of the residuals of electrical energy balance, thermal energy balance, and cold energy balance according to fixed weights. The constraint violation rate is the ratio of the number of constraint entries in the running constraint set that a candidate scheduling instruction violates to the total number of entries in the running constraint set.
5. The integrated real-time energy management method based on online transfer learning according to claim 4, characterized in that: The migration triggering rule is: the domain offset index is greater than the first upper threshold and the physical consistency index is greater than the second upper threshold, or the constraint violation rate index is greater than the third upper threshold; the migration stopping rule is: the domain offset index is less than the first lower threshold and the physical consistency index is less than the second lower threshold and the constraint violation rate index is less than the third lower threshold; where the first upper threshold is greater than the first lower threshold, the second upper threshold is greater than the second lower threshold, and the third upper threshold is greater than the third lower threshold.
6. The integrated real-time energy management method based on online transfer learning according to claim 5, characterized in that: The online sample buffer stores execution feedback samples from the most recent N scheduling cycles, and the prototype sample buffer stores historical stable operating condition samples, where N is an integer not less than 2. Incremental transfer training first updates the model adaptation layer parameters, and then updates the model decision layer parameters when the constraint violation rate index is not greater than the third lower threshold and the candidate scheduling instruction change rate is not greater than the change rate threshold for K consecutive scheduling cycles, where K is an integer not less than 2. The candidate scheduling instruction change rate is defined as the ratio of the norm of the difference between candidate scheduling instructions in two adjacent scheduling cycles to the norm of the candidate scheduling instructions in the previous scheduling cycle. When the norm of the candidate scheduling instructions in the previous scheduling cycle is zero, the candidate scheduling instruction change rate is defined as the norm of the difference between candidate scheduling instructions in two adjacent scheduling cycles.
7. The integrated real-time energy management method based on online transfer learning according to claim 6, characterized in that: The set of operational constraints includes multi-energy supply and demand balance constraints, upper and lower limits of equipment output constraints, ramping constraints, energy storage charge state boundary constraints, tie line switching power limit constraints, and graded load guarantee constraints. The feasible region projection is solved by constraint optimization, with the objective of minimizing the Euclidean distance between the projected scheduling command and the candidate scheduling command.
8. The integrated real-time energy management method based on online transfer learning according to claim 7, characterized in that: The backup rule is as follows: when there is a historical feasible dispatch instruction, the most recent historical feasible dispatch instruction is used as the benchmark, and the minimum energy supply ratio constraint of critical load, the safe range constraint of energy storage charge state, and the tie line switching power limit constraint are applied; when the system starts up and there is no historical feasible dispatch instruction, a backup dispatch instruction is generated according to the start-up baseline dispatch table, which is generated by the day-ahead dispatch plan and written into the controller before the system starts up.
9. A comprehensive real-time energy management method based on online transfer learning according to claim 8, characterized in that: The scheduling execution cycle is the first cycle, and the incremental transfer training cycle is the second cycle. The second cycle is an integer multiple of the first cycle and is greater than the first cycle. When a topology connection matrix change event or a device availability event changes from available to unavailable is detected, the model update state is immediately triggered to the update state, and feasible region projection is performed after the model update.
10. A comprehensive real-time energy management method based on online transfer learning according to claim 9, characterized in that: Set up a candidate model to run in parallel with the current running model. The candidate model is obtained by the current running model through incremental transfer training based on an online sample buffer. The candidate model and the current operating model are computed in parallel under the same current time window sample and the same set of operating constraints. When the candidate model simultaneously meets the following conditions within M consecutive scheduling cycles: operating cost is not higher than the current operating model before replacement, constraint violation rate is not higher than the current operating model before replacement, and critical load power supply deficit is zero, the candidate model is used to replace the current operating model, where M is an integer not less than 2. When the replaced model does not meet the aforementioned replacement conditions within R consecutive scheduling cycles, it is rolled back to the current operating model before replacement, where R is an integer not less than 2. The critical load power supply deficit is the sum of the non-negative parts of the difference between the critical load demand power and the critical load actual power supply.