A user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III

CN122931926APending Publication Date: 2026-10-16STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0007]有鉴于此,本发明提供一种基于Transformer-NSGA-III的用户侧储能多场景自适应优化配置方法,以解决上述提及的问题

Benefits of technology

[0015] The beneficial effects of this invention are as follows: This invention solves the technical problems of insufficient load prediction accuracy, overly simplified battery aging models, poor convergence of traditional multi-objective algorithms in high-dimensional objective spaces, and uneven distribution of Pareto fronts in existing user-side energy storage configurations. By deeply integrating Transformer multi-scenario prediction with NSGA-III reference point-driven search, and combining time-series stress integration, SOH state recursion, and multi-scenario aging cost weighted evaluation, it can provide a multi-dimensional balanced energy storage configuration solution in complex load scenarios such as industrial parks, commercial complexes, and charging stations, and has significant engineering application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122931926A_ABST
    Figure CN122931926A_ABST
Patent Text Reader

Abstract

The application provides a user-side energy storage multi-scene self-adaptive optimization configuration method based on a Transformer-NSGA-III, relates to the technical field of power energy storage system optimization, and comprises the following steps: collecting multi-source scene data of a target user side, generating multiple groups of load scenes covering different weather conditions and time period characteristics; calculating a multi-scene weighted battery aging cost; constructing a multi-objective optimization model considering multi-scene probability distribution, and solving a candidate scheme; screening out a candidate scheme with the largest relative closeness as a final recommended user-side energy storage configuration scheme; and performing multi-scene playback verification on the final recommended user-side energy storage configuration scheme, and if the playback verification meets preset economic and operation performance requirements, the final recommended user-side energy storage configuration scheme is taken as a final recommended user-side energy storage configuration scheme. The application provides a multi-dimensional balanced energy storage configuration scheme, and has significant engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power energy storage system optimization technology, and more specifically, to a multi-scenario adaptive optimization configuration method for user-side energy storage based on Transformer-NSGA-III. Background Technology

[0002] User-side energy storage has received widespread attention as an important means to reduce electricity costs, participate in demand response, and improve power supply reliability. In typical user-side scenarios such as industrial parks, commercial complexes, and electric vehicle charging stations, the rational configuration of energy storage systems directly affects investment return and operational safety. However, existing user-side energy storage optimization technologies face the following technical challenges.

[0003] First, in terms of load forecasting, traditional methods are mostly based on static data from a single "typical day" or simple time-series statistical models, failing to fully consider the strong randomness and nonlinearity of loads and their complex coupling relationship with meteorological conditions. This configuration paradigm based on a static representative day is unable to reflect the complex situation where multiple extreme and normal scenarios coexist in actual operation, resulting in a serious lack of adaptability of the configuration scheme to future changing operating conditions, and facing the risk of significantly lower-than-expected returns after actual operation.

[0004] Secondly, in terms of battery aging modeling, existing technologies mostly employ simplified linear aging models, neglecting the nonlinear damage effect of depth of charge / discharge (DoD) on battery life. In reality, there is a significant nonlinear exponential decay relationship between the cycle life of lithium batteries and DoD: the loss to battery life from deep discharge cycles is far greater than the proportional accumulation from shallow cycles. The simplification of linear models leads to a 10%-15% systematic bias in the economic assessment of the entire energy storage lifecycle, resulting in the risk that the actual battery life will be far lower than expected and maintenance and replacement costs will surge in the later stages of operation.

[0005] Finally, at the level of multi-objective optimization algorithms, traditional genetic algorithms (GA) or standard NSGA-II perform reasonably well when dealing with optimization problems with two objectives. However, when the objective dimension increases to three or more (such as simultaneously optimizing NPV, PBP and peak shaving and valley filling rates), the algorithm is prone to problems such as convergence direction shift, severe uneven distribution of Pareto front, and significantly reduced search efficiency due to the sharp decrease in the discriminative power of the crowding distance mechanism in high-dimensional space.

[0006] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention

[0007] In view of this, the present invention provides a user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III to solve the aforementioned problems.

[0008] To solve the above problems, the specific technical solution adopted by the present invention is as follows:

[0009] A user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III includes the following steps:

[0010] S1. Collect multi-source scene data from the target user side, and perform multi-scene probability load prediction based on the Transformer model with self-attention mechanism to generate multiple sets of load scenarios covering different meteorological conditions and time period characteristics; wherein, after the multi-source scene data is collected, it is preprocessed using a sample screening method based on graph association strength.

[0011] S2. Obtain the energy storage charging and discharging power sequence, SOC sequence, operating temperature sequence and charging and discharging direction change formed under each load scenario, and construct the time-series operating condition stress factor. Combine the multi-scenario probability load prediction results to calculate the multi-scenario weighted battery aging cost.

[0012] S3. Based on the weighted battery aging cost in multiple scenarios, a multi-objective optimization model considering the probability distribution of multiple scenarios is constructed, and the candidate solutions are solved based on the capacity and policy joint solution method of the NSGA-III algorithm.

[0013] S4. An improved TOPSIS integrated decision-making method based on density correction and combined weight fusion is used to select the candidate scheme with the highest relative proximity as the final recommended user-side energy storage configuration scheme by calculating the relative proximity of each candidate scheme.

[0014] S5. Perform multi-scenario playback verification on the final recommended user-side energy storage configuration scheme. If the playback verification meets the preset economic and operational performance requirements, then use it as the final recommended user-side energy storage configuration scheme. Otherwise, return to step S4 to reselect a candidate scheme with the second-best approximation but higher robustness.

[0015] The beneficial effects of this invention are as follows: This invention solves the technical problems of insufficient load prediction accuracy, overly simplified battery aging models, poor convergence of traditional multi-objective algorithms in high-dimensional objective spaces, and uneven distribution of Pareto fronts in existing user-side energy storage configurations. By deeply integrating Transformer multi-scenario prediction with NSGA-III reference point-driven search, and combining time-series stress integration, SOH state recursion, and multi-scenario aging cost weighted evaluation, it can provide a multi-dimensional balanced energy storage configuration solution in complex load scenarios such as industrial parks, commercial complexes, and charging stations, and has significant engineering application value. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0017] Figure 1 This is an overall logical framework diagram of the method according to an embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of the Transformer model hierarchy and self-attention mechanism according to an embodiment of the present invention;

[0019] Figure 3 This is a flowchart of the multi-scenario weighted battery aging cost calculation according to an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0021] According to an embodiment of the present invention, a multi-scenario adaptive optimization configuration method for user-side energy storage based on Transformer-NSGA-III is provided.

[0022] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, according to a first embodiment of the present invention, a user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III is provided, including the following steps:

[0023] S1. Collect multi-source scene data from the target user side, and perform multi-scene probability load prediction based on the Transformer model with self-attention mechanism to generate multiple sets of load scenarios covering different meteorological conditions and time period characteristics; wherein, after the multi-source scene data is collected, it is preprocessed using a sample screening method based on graph association strength.

[0024] It should be noted that, in response to the problems of insufficient load forecasting accuracy, limited scenario coverage, and difficulty in reflecting future uncertainties in traditional energy storage configurations, this invention introduces the Transformer deep learning model for multi-scenario probabilistic load forecasting. The Transformer model is used to model the long-range temporal dependencies in historical load sequences and integrates exogenous features such as temperature, humidity, irradiance, time period labels, date type labels, and time-of-use electricity prices to output the probability distribution parameters of the load for each predicted time period in the future, thereby providing scenario-based input for subsequent energy storage configuration.

[0025] In a preferred embodiment, S1 includes the following steps:

[0026] S11. For the pre-collected target user-side multi-source scene data, perform preprocessing sequentially, including dynamic reconstruction of missing values, adaptive replacement of outliers, and robust quantile normalization.

[0027] In a preferred embodiment, S11 includes the following steps:

[0028] S111. For any multi-source scene data at any time to be preprocessed, identify missing load points based on the validity of load acquisition values, the continuity of acquisition timestamps, and communication anomaly identifiers, and construct scene feature vectors for subsequent similar sample screening and graph association strength calculation.

[0029] It should be noted that before training the Transformer model, the multi-source input data is first jointly preprocessed for energy storage configuration scenarios. For any time t to be processed, its scenario feature vector is constructed as follows: ;

[0030] In the formula, Let be the scene feature vector at time t, and type t For date type tags, h t For time period labels, T t H t G t These are temperature, humidity, and irradiance, respectively. t For time-of-use pricing, L t-1 ,L t-2 ,...,L t-w This is a historical load segment of length w prior to the time to be processed.

[0031] For any time t to be preprocessed, first determine whether there is a valid load sample value at that time. If any of the following conditions are met: the load sample value is empty, the load sample value is invalid, the sampling timestamp is missing, the sampling timestamp is not continuous with adjacent times, or the data acquisition terminal returns a communication error flag, then that time is determined to be a missing load point. The set of missing load points is represented as follows:

[0032] ;

[0033] In the formula, For the set of missing load points, Let be the load value collected at time t. This is a communication anomaly identifier. The time interval between adjacent samplings. The preset sampling time interval threshold is used. The scene feature vector is not used directly to determine whether the load is missing, but is used to filter candidate similar samples and calculate the graph association strength after the missing load point is determined, in combination with date type, time period label, meteorological factor, electricity price status and previous load segments.

[0034] S112. For the missing load values ​​of missing load points, preliminary candidate similar samples are screened by calculating the graph association strength, and the preliminary candidate similar samples are filtered a second time according to the anomaly label. Combined with the normalized attention weight after the second filtering, the missing load values ​​are dynamically reconstructed.

[0035] For missing load points, a historical running day correlation graph is first constructed using dates as nodes. The date d corresponding to the time t to be filled is then determined. t and any historical candidate date d r The date node feature vector is constructed by extracting the day type, time period label, temperature, humidity, irradiance, time-of-use electricity price, preceding load segment, load ramp rate and peak-valley characteristics.

[0036] Specifically, the graph association strength between the date to be filled and candidate dates is calculated. This graph association strength considers day type consistency, load pattern similarity, meteorological condition similarity, electricity price structure similarity, and load continuity between adjacent time periods. This strength is then used to dynamically select a set of candidate similar days from historical samples. Compared to methods that rely solely on Euclidean distance or fixed similar day rules, this invention can dynamically adjust the similar day selection results based on the load status of different missing time periods, improving the adaptability of missing value reconstruction.

[0037] The formula for calculating the graph association strength between the date to be filled and the candidate date is:

[0038] ;

[0039] In the formula, A t,r The date d to which the time t to be filled belongs. t With the r-th historical candidate date d r The strength of the graph association between them Date to be filled d t Node feature vectors; For the r-th historical candidate date d rThe node feature vectors, where ⊙ represents element-wise multiplication, and σ(·) is the Sigmoid function. These are learnable weight parameters.

[0040] Filter similar dates: ;

[0041] In the formula, This is the set of candidate similar days corresponding to the time t to be filled. This is a preset set of historical candidate dates; This sets a threshold for filtering graph association strength. If the number of candidate dates that meet the threshold is less than a preset minimum, then the graph association strength is used as the selection criterion. Select a preset number of historical candidate dates from largest to smallest.

[0042] In obtaining the candidate similar date set Then, historical load samples matching the time period corresponding to the time t to be filled are extracted from the candidate similar days to form a preliminary candidate similar sample set. For any initial candidate similar sample The corresponding historical candidate date number is denoted as That is, the candidate similar sample s comes from the first... One historical candidate date.

[0043] Based on graph association strength, comprehensive similarity distance, and multidimensional feature matching relationships of candidate samples, the dynamic attention weights of preliminary candidate similar samples at the time step to be filled are calculated:

[0044] ;

[0045] In the formula, The dynamic attention weights for the initial candidate similar samples s to be filled at time t; The query feature vector corresponding to the time t to be filled; d represents the key feature vector corresponding to the initial candidate similar sample s; d is the dimension of the feature vector. The historical candidate date number from which the candidate similar sample s originates; Date to be filled The strength of the graph association between the candidate similar sample s and the historical candidate date from which it originated; The comprehensive similarity distance between the time t to be filled and the candidate similar sample s; This is a date correlation strength adjustment factor; To incorporate the similarity distance penalty coefficient; This is the set of preliminary candidate similar samples corresponding to the time t to be filled. This is the sample index used when summing the initial set of candidate similar samples.

[0046] The preliminary reconstruction result of the missing load values ​​is as follows: ;

[0047] In the formula, The initial load reconstruction value at time t to be filled; The dynamic attention weights for the initial candidate similar samples s to be filled at time t; The historical load values ​​of the preliminary candidate similar samples s in the corresponding time period; This is the initial set of candidate similar samples.

[0048] To avoid contaminating the missing load value reconstruction results due to abnormal fluctuations in the preliminary candidate similar samples themselves, this invention further filters the set of preliminary candidate similar samples a second time before performing missing value reconstruction. Specifically, anomaly markers are generated for the load residuals, load ramp-up rates, meteorological deviations, and electricity price changes around the time period corresponding to the time to be filled in for the preliminary candidate similar samples, and preliminary candidate similar samples with abnormal states are removed from the set of preliminary candidate similar samples. This processing method avoids abnormal historical samples from participating in attention weight allocation, thereby reducing the risk of secondary contamination of the missing value reconstruction results by abnormal samples.

[0049] Based on the residual anomaly markers, ramp anomaly markers, meteorological deviation anomaly markers, and electricity price status anomaly markers of the preliminary candidate similar samples, the set of preliminary candidate similar samples is further filtered:

[0050] ;

[0051] In the formula, This is the set of candidate similar samples after secondary filtering; This is a preliminary set of candidate similar samples; Used as a residual anomaly marker for candidate similar samples s in the corresponding time period; This serves as an anomaly marker for the load ramp-up of candidate similar samples s during the corresponding time period. This serves as an identifier for meteorological deviations in candidate similar samples s during the corresponding time period. This serves as an anomaly marker for the electricity price status of the candidate similar sample s within the corresponding time period. When all of the above anomaly markers are 0, it indicates that the preliminary candidate similar sample does not exhibit any significant anomalies in the vicinity of the corresponding time period and can participate in the reconstruction of missing load values.

[0052] After obtaining the candidate similarity sample set after secondary filtering, since some candidate samples are removed, the original dynamic attention weights need to be renormalized on the new candidate set. Based on the candidate similarity sample set after secondary filtering, the attention weights of the candidate samples are redistributed. The normalization formula for the attention weights after secondary filtering is as follows: ;

[0053] In the formula, The normalized attention weights for candidate similar samples s after secondary filtering to be filled at time t. These are the original attention weights calculated by the dynamic attention mechanism before secondary filtering; This is the set of candidate similar samples after secondary filtering; This is the sample index used when summing the candidate similar sample set after secondary filtering.

[0054] The result of the missing load reconstruction after secondary filtering is: ;

[0055] In the formula, The missing load reconstruction value at time t to be filled; The normalized attention weights for candidate similar samples s after secondary filtering to be filled at time t. The historical load value of candidate similar samples s in the corresponding time period; This is the set of candidate similar samples after secondary filtering.

[0056] When the candidate similar sample set after secondary filtering When the set is empty, a comprehensive score is constructed based on the graph association strength and the comprehensive similarity distance, and the preliminary candidate similar sample set is selected. At least one candidate similar sample with the highest score is selected to participate in the reconstruction; if the initial candidate similar sample set is also empty, the median of the historical load under the same date type and the same time period is used as the missing load reconstruction value to avoid the denominator being zero when the attention weight is normalized.

[0057] In a preferred embodiment, S112 includes the following steps: S1121, determining the date to be filled and historical candidate dates based on the missing load value of the missing load point, and constructing a date node feature vector; S1122, calculating the graph association strength between the date to be filled and the candidate dates based on the date node feature vector, and dynamically filtering a set of candidate similar days from a preset historical sample based on the graph association strength to form preliminary candidate similar samples; S1123, calculating the dynamic attention weight of the preliminary candidate similar samples for the time to be filled based on the graph association strength, the comprehensive similarity distance, and the multidimensional feature matching relationship of the preliminary candidate similar samples; S1124, performing secondary filtering on the preliminary candidate similar samples based on the residual anomaly identifier, ramp anomaly identifier, meteorological deviation anomaly identifier, and electricity price status anomaly identifier to obtain the secondary filtered candidate similar samples; S1125, redistributing the dynamic attention weight based on the secondary filtered candidate similar samples to obtain the secondary filtered normalized attention weight; S1126, performing dynamic missing load reconstruction processing on the missing load value of the missing load point based on the secondary filtered normalized attention weight and in combination with the candidate similar samples.

[0058] S113. Calculate the abnormal threshold dynamically using the candidate similar samples after secondary filtering, identify abnormal points in the multi-source scene data after missing dynamic reconstruction processing based on the abnormal threshold, and perform adaptive replacement processing of abnormal points.

[0059] Specifically, for outlier data points, a baseline load estimate is first constructed using historical candidate samples of the same date type, time period, and similar meteorological conditions, and then the load residual between the actual load value and the baseline load estimate is calculated: ;

[0060] In the formula, Let be the load residual at time t; The actual load value collected at time t (can be obtained from multi-source scene data after missing dynamic reconstruction processing); This is the baseline load estimate obtained from the candidate similar sample set after secondary filtering.

[0061] To adapt to the differences in data fluctuations under different seasons, date types, and load levels, this invention constructs a dynamic anomaly threshold. The dynamic anomaly threshold is not a fixed threshold, but rather adaptively adjusted based on the residual distribution of candidate similar samples after secondary filtering, the intensity of local load ramp fluctuations, the degree of meteorological deviation, and the date type.

[0062] Calculate the dynamic anomaly threshold based on the residual distribution of candidate similar samples after secondary filtering:

[0063] ;

[0064] In the formula, Let t be the dynamic anomaly threshold at time t; This is the residual sequence corresponding to the candidate similar sample set after secondary filtering; It is a median function; This represents the absolute median of the residuals. This is the dynamic threshold adjustment coefficient.

[0065] The dynamic threshold adjustment coefficient is determined by the intensity of load ramp fluctuations, the degree of meteorological deviation, and the date type. ;

[0066] In the formula, The dynamic threshold adjustment coefficient at time t; The basic threshold coefficient; The intensity of load ramp-up fluctuations within a time window around time t; Meteorological deviation; For holiday signage; , , These are the adjustment weights for load ramp fluctuation intensity, meteorological deviation, and holiday factors, respectively.

[0067] The load ramp fluctuation intensity, meteorological deviation degree, and date type were all obtained from multi-source scenario data after missing dynamic reconstruction processing. Specifically, the load sequence obtained after missing dynamic reconstruction processing is denoted as... Then, the load ramp-up fluctuation intensity within the time window around time t is: ;

[0068] In the formula, Calculate the window length for slope fluctuations. The load value after dynamic reconstruction is missing. The user's historical maximum load, To prevent extremely small positive numbers with a denominator of zero.

[0069] The degree of meteorological deviation is:

[0070] ;

[0071] In the formula, The degree of weather deviation at time t. , , These represent the temperature, humidity, and irradiance at time t, respectively. , , These represent the mean values ​​of temperature, humidity, and irradiance for the candidate similar samples after secondary filtering, respectively, at the corresponding time periods. , , The deviation weights are temperature, humidity, and irradiance, respectively.

[0072] The date type is determined by the scene feature vector. get, This can include types such as weekdays, weekends, holidays, and special production days; when using a binary identifier for holidays, if... If it is a public holiday or a special non-working day, then ,otherwise .

[0073] In one embodiment, The preferred value is 2.5-3.5. , , The preferred value is 0.1-0.5. When user-side load fluctuates drastically or weather conditions change significantly, the value can be increased. Raise the anomaly threshold to avoid misjudging normal fluctuations as abnormal; when user-side load changes are relatively stable, reduce... Improve the sensitivity of anomaly detection.

[0074] Based on the comparison between the load residual and the dynamic anomaly threshold, the residual anomaly state is determined. The residual anomaly determination formula is as follows: ;

[0075] In the formula, Used as the residual anomaly identifier at time t; This is an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise. Let be the load residual at time t; This is the dynamic anomaly threshold.

[0076] Simultaneously, to identify load spikes, sudden drops, and metering anomalies, a load ramp rate constraint is introduced. The abnormal load ramp state is determined based on the load change amplitude between adjacent time points. ;

[0077] In the formula, This is an indicator of abnormal load ramping at time t; The actual load value at time t; This represents the actual load value at the previous moment; The maximum permissible gradient; The user's historical maximum load. In one embodiment, The preferred value is 0.15-0.30.

[0078] The meteorological deviation is as follows: ;

[0079] In the formula, This serves as an indicator of meteorological deviations at time t. For the degree of weather deviation, For meteorological deviations from the threshold, This is an indicator function.

[0080] Electricity price fluctuations during different time periods:

[0081] ;

[0082] In the formula, This represents the time-of-use electricity price change between adjacent time points. and These are the time-of-use electricity prices for the current moment and the previous moment, respectively. The threshold for electricity price changes, This is used to identify sudden changes in electricity prices during specific time periods. When the time-of-use electricity price changes from a valley period to a flat period, from a flat period to a peak period, or when the price change exceeds a preset threshold, a sudden change in electricity prices during a specific time period is identified.

[0083] To further improve the reliability of anomaly identification, residual anomalies, load ramping anomalies, meteorological deviation anomalies, and electricity price time-period abrupt changes are collectively converted into an anomaly state feature matrix: ;

[0084] In the formula, Let be the feature matrix of the abnormal state at time t; For disability markers; This is an indicator of abnormal load ramping. This is an indicator of abnormal weather patterns. This serves as an indicator of sudden changes in electricity price during certain periods.

[0085] The final anomaly point is determined based on the number of anomaly components in the anomaly feature matrix:

[0086] ;

[0087] In the formula, Abnormal state feature matrix The Middle One abnormal state component Index for abnormal state components; This is a threshold for the number of abnormal states. In one embodiment, The preferred value is 2. When the number of abnormal states is greater than or equal to 2. If the time is not specified, then that moment is considered an outlier.

[0088] For the identified outliers, the dynamically reconstructed values ​​from candidate similar samples after secondary filtering are used for replacement. ;

[0089] In the formula, This is the load value after anomaly handling; These are the dynamically reconstructed values ​​of candidate similar samples after secondary filtering; This is a comprehensive anomaly identifier; This is the original load value. When... When the value is 'outlier', it indicates that the point is an anomaly and is replaced with a reconstructed value; when the value is 'outlier', it indicates that the point is an anomaly and is replaced with a reconstructed value. When the value is zero, it indicates that the point is a normal point and the original value is retained.

[0090] In a preferred embodiment, S113 includes the following steps: S1131, calculating the actual load value and the baseline load estimate for the multi-source scene data after missing dynamic reconstruction processing and the candidate similar samples after secondary filtering, and calculating the load residual between the actual load value and the baseline load estimate; S1132, calculating the dynamic anomaly threshold based on the residual distribution of the candidate similar samples after secondary filtering, and comparing it with the load residual to determine the residual anomaly state; S1133, determining the load ramping anomaly, meteorological deviation anomaly, and electricity price time-period change state based on the multi-source scene data after missing dynamic reconstruction processing by judging the numerical change amplitude at adjacent times; S1134, converting the residual anomaly, load ramping anomaly, meteorological deviation anomaly, and electricity price time-period change state into an anomaly state feature matrix; S1135, determining the final anomaly point based on the number of anomaly state components in the anomaly state feature matrix; S1136, replacing the identified anomaly point with the dynamically reconstructed value of the candidate similar samples after secondary filtering, thereby realizing the adaptive replacement processing of the anomaly point.

[0091] S114 After completing the missing dynamic reconstruction and outlier adaptive replacement, an initial sample is generated, and the initial sample is normalized using the quantile robust normalization method to obtain preprocessed multi-source scene data.

[0092] Specifically, after completing the reconstruction of missing values ​​and replacement of outliers, a quantile-robust normalization method is used to perform dimensionless processing on the input features of each dimension, such as historical load, temperature, humidity, irradiance, and time-of-use electricity price. Unlike directly using the maximum and minimum values ​​for normalization, quantile-robust normalization first calculates the low and high quantiles of each input feature based on the training samples, truncates extreme values ​​below the low quantile or above the high quantile, and then maps the truncated feature values ​​to the [0,1] interval. This method can reduce the impact of peak outliers or extreme weather samples on the normalization scale and improve the stability of the Transformer model training process.

[0093] The input features are truncated based on the lower and higher quantiles of the training samples:

[0094] ;

[0095] In the formula, Let t be the original value of a certain input feature at time t; This is the low quantile of the input feature in the training samples; This is the high quantile of the input feature in the training samples; These are the eigenvalues ​​after quantile truncation.

[0096] The quantile robust normalization result is: ;

[0097] In the formula, These are the normalized eigenvalues; These are the eigenvalues ​​after quantile truncation; and These are the lower and higher quantiles of the input feature in the training samples, respectively. To prevent extremely small positive numbers with a denominator of zero.

[0098] In one embodiment, The preferred value is 0.01-0.05. The preferred value is 0.95-0.99. When there are many peaks, sudden drops, or extreme weather samples in the user-side load data, the preferred value can be selected. , When data fluctuations are relatively stable, the preferred option can be selected. , .

[0099] Through the above processing, the data preprocessing process of this invention can sequentially complete dynamic reconstruction of missing values, adaptive identification and replacement of outliers, and robust quantile normalization. This process not only improves the integrity and consistency of the input data, but also reduces the impact of outliers and extreme values ​​on subsequent Transformer multi-scenario probability load prediction.

[0100] S12. Based on the preprocessed multi-source scene data, combined with the mean squared error loss function, construct and train a Transformer model based on the self-attention mechanism.

[0101] S13. Using a Transformer model based on a self-attention mechanism, predict the probability distribution parameters of the load forecast values ​​for a preset time period in the future. Based on the probability distribution parameters, use the Monte Carlo sampling method to generate multiple load scenarios covering different meteorological conditions and time period characteristics.

[0102] In one embodiment, such as Figure 2As shown, the Transformer model includes an input embedding layer, a position encoding layer, an encoder module, a decoder module, and an output layer. The encoder module consists of 2-4 stacked layers, each including a multi-head self-attention sublayer, a feedforward neural network sublayer, a residual connection structure, and a layer normalization structure. The decoder module outputs the probability distribution parameters of the load for each predicted period based on the encoded features. In addition to historical load sequences, the model input includes exogenous features such as temperature, humidity, irradiance, time period labels, date type labels, and time-of-use electricity prices. Preferably, the mean squared error loss function is used to train the model, and the Adam optimization algorithm is used to update the model parameters.

[0103] The Transformer model does not contain a recurrent structure and requires explicit injection of temporal positional information through Positional Encoding (PE). PE represents the positional order of each time step in the input sequence. For the pos-th position and the i-th feature dimension in the input sequence, the positional encoding is defined as:

[0104] ;

[0105] ;

[0106] In the formula, pos is the time step position index; i is the dimension index; d model This represents the feature dimension of the model.

[0107] The Transformer encoder establishes global dependencies between positions within a sequence by calculating the similarity between the query, key, and value matrices. First, it generates the Q, K, V matrices through linear projection: ;

[0108] In the formula, X is the input feature matrix, where rows represent different time steps and columns represent different input feature dimensions; the input features include at least historical load values, ambient temperature, relative humidity, solar irradiance, time-of-use electricity prices, and time period coding information; W Q W K W V These are the learnable projective weights corresponding to the query matrix, key matrix, and value matrix, respectively.

[0109] Secondly, the weight distribution is calculated using Scaled Dot-Product Attention: ;

[0110] To capture features from different subspaces, multi-head attention is used for parallel computation. For the i-th attention head, its output is defined as:

[0111] ;

[0112] The multi-head attention output is: ;

[0113] In the formula, , , These are the query, key, and value projection matrices corresponding to the i-th attention head, respectively; Output projection matrix for multi-head attention; The dimension of the key vector; This is the output of the h-th attention head, where h is the number of attention heads.

[0114] The output layer of the Transformer decoder outputs probability distribution parameters (such as the mean) of the load forecast for future time periods through linear transformation and activation functions. and variance Based on the probability distribution parameters, a probability distribution of future loads is constructed. Monte Carlo sampling is then used to perform multiple random samplings within the probability distribution, generating N sets of load scenario sequences covering different fluctuation characteristics.

[0115] ;

[0116] This scenario set includes various load characteristics such as normal, peak, low, and extreme fluctuations, which can serve as a scenario-based input basis for subsequent energy storage capacity configuration and scheduling optimization.

[0117] Specifically, the Transformer multi-scenario load prediction includes the following steps: the preprocessed historical load time series is embedded with temporal location information through positional encoding and then input into the Transformer encoder; the encoder internally uses a multi-head self-attention mechanism to calculate the global dependency weights between each time step in parallel, capturing the long-range temporal correlation features of the load sequence; the encoder output is connected to the residual through a feedforward neural network, and the decoder generates the load probability distribution prediction value for future periods; through Monte Carlo sampling, multiple sets of probability load curves covering typical normal scenarios and extreme scenarios are generated from the prediction distribution.

[0118] S2. Obtain the energy storage charging and discharging power sequence, SOC sequence, operating temperature sequence and charging and discharging direction change formed under each load scenario, and construct the time-series operating condition stress factor. Combine the multi-scenario probability load prediction results to calculate the multi-scenario weighted battery aging cost.

[0119] It should be noted that, addressing the problem that existing battery aging models in energy storage configuration technologies are overly simplified and fail to reflect the cumulative impact of continuous scheduling processes on battery life loss, this invention constructs a nonlinear battery aging cost model based on time-series stress integrals and SOH state recursion. Unlike aging assessment methods based on fixed cycle identification rules, this invention directly uses scheduling periods as calculation units, taking the changes in charging and discharging power, SOC, operating temperature, and charging / discharging direction of the energy storage system under various probabilistic load scenarios as time-series inputs. It calculates the aging increment hourly and recursively infers the battery health state based on the cumulative life loss status. This avoids the information loss caused by forcibly breaking down complex continuous operation processes into several charge-discharge cycles and more accurately reflects the impact of frequent shallow charging and discharging, high SOC dwell times, high-temperature operation, and rapid charge-discharge switching on battery life.

[0120] As a preferred embodiment, such as Figure 3 As shown, step S2 includes the following steps:

[0121] S21. Obtain the energy storage charging and discharging power sequence under each load scenario, calculate the net energy storage power, and calculate the equivalent charging and discharging rate in combination with the preset rated energy storage capacity.

[0122] It should be noted that, for the m-th load scenario and the t-th scheduling period, the net power of the energy storage system is defined as: ;

[0123] In the formula, Let be the net energy storage power during the t-th scheduling period under the m-th load scenario; This refers to the energy storage discharge power; Power for charging energy storage. When When the energy storage is in a discharge state, This indicates that the energy storage is in a charging state.

[0124] Calculate the equivalent charge / discharge rate based on the net energy storage power and rated capacity: ;

[0125] In the formula, The equivalent charge / discharge rate for the m-th load scenario during the t-th scheduling period; This refers to the rated capacity of the energy storage. To prevent extremely small positive numbers with a denominator of zero.

[0126] S22. Obtain the SOC sequence, operating temperature sequence, and charge / discharge direction changes under various load scenarios, and construct the time-series stress factor by combining the equivalent charge / discharge rate.

[0127] Specifically, to comprehensively describe the impact of different operating factors on battery aging rate, this invention constructs a time-series operating condition stress factor. The time-series operating condition stress factor is jointly determined by the SOC deviation stress factor, temperature stress factor, rate stress factor, and charge / discharge direction switching stress factor.

[0128] ;

[0129] In the formula, Let be the comprehensive operating stress factor for the m-th load scenario during the t-th scheduling period; This is the SOC deviation stress factor; This refers to the temperature stress factor. This is the magnification stress factor; The stress factor is used to switch the charging and discharging directions.

[0130] Among them, the SOC deviation stress factor is used to characterize the aging acceleration effect of the battery when it deviates from the suitable SOC range for a long time:

[0131] ;

[0132] In the formula, This represents the state of charge during the t-th scheduling period in the m-th load scenario; The reference state of charge; High SOC threshold; Weights for SOC deviation; Weighting for high SOC (State of Charge) retention; This is an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise.

[0133] The temperature stress factor is used to characterize the nonlinear amplification effect of increased operating temperature on battery aging rate. ;

[0134] In the formula, This refers to the temperature stress factor. Let be the operating temperature during the t-th scheduling period under the m-th load scenario; Reference temperature; This is the temperature sensitivity coefficient. When the operating temperature is higher than the reference temperature, the temperature stress factor increases, thereby increasing the aging increment during the corresponding period.

[0135] Rate stress factor is used to characterize the accelerating effect of high-rate charge and discharge on battery aging:

[0136] ;

[0137] In the formula, This is the magnification stress factor; This is the equivalent charge / discharge rate; This is the rate sensitivity coefficient.

[0138] The charge / discharge direction switching stress factor is used to characterize the impact of frequent charge / discharge switching on battery internal polarization and lifespan loss. ;

[0139] In the formula, The stress factor is switched for charging and discharging directions; and These represent the net energy storage power for the current time period and the previous time period, respectively. Penalty coefficient for switching charging / discharging directions; This is an indicator function; it returns 1 if the condition within the parentheses is true, and 0 otherwise. This aligns with the meaning of the indicator function in the SOC deviation stress factor and abnormal state identification formula mentioned earlier. When the net power directions of two adjacent scheduling periods are opposite, it indicates that the energy storage has switched charging and discharging directions, and the aging stress increases in the corresponding period.

[0140] In a preferred embodiment, S22 includes the following steps: S221, calculating the SOC deviation stress factor to characterize the aging acceleration effect of the battery when it deviates from the preset SOC range based on the SOC sequence under each load scenario; S222, calculating the temperature stress factor to characterize the nonlinear amplification effect of the increase in operating temperature on the battery aging rate based on the operating temperature sequence under each load scenario; S223, calculating the rate stress factor to characterize the acceleration effect of charging and discharging on battery aging based on the equivalent charge and discharge rate under each load scenario; S224, calculating the charge and discharge direction switching stress factor to characterize the impact of frequent charge and discharge switching on the battery's internal polarization and lifespan loss based on the change in charge and discharge direction under each load scenario; S225, constructing the time-series operating condition stress factor based on the SOC deviation stress factor, temperature stress factor, rate stress factor, and charge and discharge direction switching stress factor.

[0141] S23. Calculate the aging increment for a single time period based on the time-series stress factor and in combination with energy throughput, SOC change magnitude and cumulative life loss status.

[0142] S24. Based on the single-period aging increment, combined with the preset scheduling cycle and multi-scenario probability load prediction results, calculate the multi-scenario weighted battery aging cost.

[0143] As a preferred embodiment, S24 includes the following steps: S241, recursively calculate the cumulative lifespan loss status based on the single-period aging increment, and calculate the battery health status based on the cumulative lifespan loss status; S242, accumulate the aging increments of each period based on a preset scheduling cycle, and calculate the scenario battery aging cost in combination with battery purchase and installation costs; S243, weight the battery aging cost under different scenarios based on the multi-scenario probability load prediction results to obtain the multi-scenario weighted battery aging cost.

[0144] Specifically, after obtaining the comprehensive operating stress factor, the aging increment for a single time period is calculated based on the energy throughput, SOC change magnitude, and cumulative lifespan loss status:

[0145] ;

[0146] In the formula, This represents the aging increment for the t-th scheduling period under the m-th load scenario; Energy throughput aging coefficient; The scheduling time interval; SOC fluctuation aging coefficient; The stress factor is the comprehensive working condition stress factor; This represents the cumulative lifetime loss status at the start of the t-th scheduling period. Accelerated aging factor in the later stages of life; To prevent extremely small positive numbers with a denominator of zero.

[0147] in, This describes the characteristics of a battery that are more sensitive to the same operating stress in the later stages of its lifespan. It refers to the cumulative lifespan degradation state. When the value is low, this effect is weak; as the battery approaches the end of its lifespan, this effect increases, thus amplifying the aging increment caused by subsequent operating conditions.

[0148] Based on the aging increment in a single time period, the cumulative lifespan loss status is recursively calculated: ;

[0149] In the formula, This represents the cumulative lifetime loss status at the start of the (t+1)th scheduling period. This represents the cumulative lifetime loss status at the start of the t-th scheduling period. This represents the aging increment generated during the t-th scheduling period.

[0150] Calculate battery health status based on cumulative lifespan degradation: ;

[0151] In the formula, The battery health status is given in the m-th load scenario during the t-th scheduling period. This represents the cumulative lifespan loss status.

[0152] Within a scheduling cycle, the aging increments of each time period are accumulated, and the battery aging cost for the scenario is calculated by combining the battery purchase and installation costs: ;

[0153] In the formula, Let $ be the battery aging cost under the m-th load scenario. The cost of purchasing and installing energy storage batteries; T is the total number of time periods within the scheduling cycle; This represents the aging increment for the t-th scheduling period.

[0154] Furthermore, based on the occurrence probability of each load scenario generated in step S1, the battery aging cost under different scenarios is weighted to obtain the multi-scenario weighted battery aging cost: ;

[0155] Wherein, the battery aging cost under the m-th load scenario is denoted as The multi-scenario weighted average battery aging cost is denoted as Both conditions are met: ;

[0156] In the formula, Let M be the probability weight of the m-th load scenario, and M be the total number of load scenarios. Let m be the battery aging cost under the m-th load scenario. Weighted battery aging cost for multiple scenarios.

[0157] Therefore, this invention no longer relies on fixed cycle identification rules to break down the energy storage operation process, but directly performs time-period incremental aging calculations based on scheduling time sequences. This model can simultaneously reflect the coupled effects of energy throughput, SOC deviation, high-temperature operation, high-rate charging and discharging, frequent charging and discharging switching, and changes in lifespan stage on battery aging. This invention is applicable to the continuous operation aging cost assessment of user-side energy storage under multi-scenario, short-cycle, and frequent scheduling conditions, and can provide more granular lifespan loss constraints for subsequent multi-objective optimization.

[0158] S3. Based on the weighted battery aging cost in multiple scenarios, a multi-objective optimization model considering the probability distribution of multiple scenarios is constructed, and the candidate solutions are solved based on the capacity and policy joint solution method of the NSGA-III algorithm.

[0159] As a preferred implementation, S3 includes the following steps: S31, calculating the net present value of the energy storage system throughout its entire life cycle based on the multi-scenario weighted battery aging cost, and constructing a multi-objective function that maximizes the net present value throughout its entire life cycle, minimizes the dynamic investment payback period, and maximizes the peak shaving and valley filling rate; S32, constructing a constraint adjustment that includes power balance constraints, energy storage state of charge constraints, and power and capacity configuration constraints, and combining it with the multi-objective function to form a multi-objective optimization model that takes into account the probability distribution of multiple scenarios; S33, based on the multi-objective optimization model that takes into account the probability distribution of multiple scenarios, using the third-generation non-dominated sorting genetic algorithm NSGA-III based on the reference point mechanism for global collaborative search, generating uniformly distributed reference points in the normalized objective space, and combining non-dominated sorting and reference point association mechanisms to obtain candidate solutions.

[0160] It should be noted that, to address the need for balancing economic benefits, investment security, and improved load characteristics in user-side energy storage systems, this invention constructs a three-objective optimization model that considers the probability distribution of multiple scenarios. This model uses the rated energy storage power P... rated Rated capacity E rated The charging and discharging power sequences under each scenario are used as decision variables. Among them, economic-related indicators are calculated by weighting multiple probabilistic load scenarios generated in step S1. The battery aging cost for each scenario, obtained in step S2 based on the stress integral of the time-series operating conditions and the recursive derivation of the SOH state, is embedded as part of the operating cost in the objective function. This ensures that the optimization results can simultaneously reflect the impact of future load uncertainty, scheduling timing characteristics, and battery life state evolution on the configuration scheme. The specific steps are as follows:

[0161] (1) Objective function one: Maximize the net present value (NPV) over the entire life cycle;

[0162] This indicator measures the overall economic benefits of an energy storage system over its entire lifespan, taking into account initial investment, annual operating revenue, and the time value of money. A higher net present value (NPV) indicates better lifecycle economics for the energy storage configuration. The formula is as follows: ;

[0163] Where: Y is the design service life; r is the discount rate; C inv This represents the initial investment cost. The annual net income R is included. net,y Let be the expected net profit for year y. The expected net profit for year y is obtained by weighting the peak-valley arbitrage profit, demand cost savings, and demand response subsidies according to scenario probability under each probabilistic load scenario, then subtracting fixed maintenance costs and the multi-scenario weighted battery aging cost obtained in step S2. The formula is as follows:

[0164] ;

[0165] In the formula, M represents the total number of load scenarios; Let be the probability weight for the m-th load scenario; This refers to the peak-valley arbitrage profit under the m-th load scenario; To save revenue on demand electricity costs for the m-th load scenario; This refers to the demand response subsidy for the m-th load scenario; To cover fixed operation and maintenance costs; For step S2, based on the battery aging cost for each scenario Multi-scenario weighted battery aging cost obtained by weighting according to scenario probability.

[0166] (2) Objective function two: Minimize the dynamic payback period (PBP);

[0167] This indicator is used to assess the investment recovery speed and risk resistance of energy storage projects. It is obtained by calculating the point in time when the cumulative discounted net cash flow first turns positive. Compared to the static investment recovery period, the dynamic investment recovery period reflects the impact of the time value of money on the project's recovery speed. The formula is as follows: The constraints are satisfied: ;

[0168] In the formula, CF y Let PBP be the net cash flow in year y, preferably the net cash flow after deducting operating costs, aging costs, and necessary replacement costs from the operating revenue of that year; PBP represents the payback period corresponding to the first time the cumulative discounted net cash flow turns positive. If the cumulative discounted net cash flow in year n-1 is still negative, but the cumulative discounted net cash flow in year n is greater than or equal to zero, the project is considered to have achieved dynamic investment recovery in year n.

[0169] (3) Objective function three: Maximize the peak shaving and valley filling rate;

[0170] To measure the contribution of energy storage systems to the operational flexibility of the distribution network, a peak shaving and valley filling index is introduced:

[0171] ;

[0172] In the formula, The average peak shaving and valley filling rate after weighting across multiple scenarios; Let M be the probability weight of the m-th load scenario; M is the total number of load scenarios. and These represent the peak load and the valley load, respectively, in the m-th scenario without energy storage. and These represent the peak and valley load values ​​in the m-th scenario after configuring energy storage, respectively. A higher value indicates a more significant peak-shaving and valley-filling effect of energy storage on the load curve. In one embodiment, the time-of-use tariff, demand tariff, and demand response subsidy standards can be determined based on the current electricity pricing policies and demand response rules in the target user's location; the discount rate, design service life, and operation and maintenance cost parameters can be determined based on project feasibility study data or industry-standard values; and the battery purchase cost and replacement cost parameters can be determined based on the manufacturer's parameters or engineering quotation for the target model of energy storage equipment.

[0173] (4) Constraints;

[0174] 1) Power balance constraints; ensuring that user load, energy storage output, and grid power supply are perfectly matched at every moment: ;

[0175] In the formula: P load,t P represents the user's initial load demand power at time t; ch,t and P dis,t These represent the charging power and discharging power of the energy storage system at time t, respectively; P grid,t Let P be the power supplied by the external power grid at time t, and it must satisfy P. grid,t ≥0.

[0176] 2) Energy storage state of charge (SOC) constraints; ; ;

[0177] In the formula, SOC t SOC represents the percentage of remaining energy in the energy storage system at time t. min and SOC max These are the minimum and maximum state-of-charge (SOC) thresholds that allow the battery to operate, typically taken as [10%, 90%]; SOC0 and SOC... T These figures represent the power status at the start and end of a 24-hour scheduling cycle. This ensures the energy storage system has the ability to self-balance its power during "cross-day operation," preventing over-discharge.

[0178] 3) Power and capacity configuration constraints: ; ; ;

[0179] In the formula, P rated The rated power of the energy storage to be optimized; u ch,t and u dis,t It is a 0-1 auxiliary variable used to ensure that the energy storage system does not exhibit mutually exclusive charging and discharging behavior at the same time.

[0180] It should be noted that, for the multi-scenario, multi-constraint, and multi-objective nonlinear optimization problem constructed in this invention, the third-generation non-dominated sorting genetic algorithm NSGA-III based on the reference point mechanism is used for global collaborative search. The algorithm generates uniformly distributed reference points in the normalized objective space, combining non-dominated sorting and reference point association mechanisms to improve the uniform coverage of the Pareto front while maintaining convergence. Compared to methods that optimize only the benefits of a single scenario, the fitness of each candidate individual in this invention is jointly determined by multi-scenario weighted economic indicators, investment recovery indicators, and peak shaving and valley filling indicators, thus more realistically reflecting the comprehensive performance of the energy storage configuration scheme under different operating conditions. The specific execution process is as follows:

[0181] 1) Hybrid encoding and population initialization; constructing a composite decision variable set that considers both energy storage configuration parameters and operation scheduling strategies. Each individual is encoded as a real-valued vector X:

[0182] ;

[0183] In the formula, P rated The rated power of the energy storage to be optimized ranges from [0, Pmax]; E rated The rated energy storage capacity to be optimized ranges from [0, E]. max ]; P sch,t Let N be the energy storage command power for the t-th scheduling period (t=1,…,24). The initial population size is set to N. pop By checking for constraint violations, it is ensured that the initial individuals all fall within the feasible domain space consisting of power balance and SOC range.

[0184] In one embodiment, the initial population size N pop The range can be 80-150, with a maximum number of iterations G. max The value can be between 100 and 300, simulating the binary crossover probability P. c The preferred value is 0.8-0.9, and the polynomial mutation probability P m Preferably 1 / n v , where n v This represents the total number of decision variables. To ensure that the initial individuals in the population meet the operational constraints, constraint violation checking or repair strategies can be used to adjust infeasible individuals after population initialization.

[0185] 2) Parallel evaluation of fitness across multiple scenarios; individuals in the population are mapped to the M probabilistic load scenarios generated in step S1. For each individual, its multidimensional target vector F(X) over its entire lifecycle is calculated: ;

[0186] Each objective value is expressed in the form of a weighted expectation: ;

[0187] In the formula: w m f represents the probability of scenario m occurring; j,m This represents the j-th objective function value (i.e., NPV, PBP, or peak shaving and valley filling rate) for an individual in scenario m.

[0188] 3) Ideal point update and target space normalization: To eliminate the influence of different dimensions on the search direction, the target space needs to be dynamically normalized in each generation of evolution. First, ideal point identification is performed, identifying the minimum value of each dimension of the target in the current population, and constructing ideal points. Next, a pole search is performed, finding extreme individuals along each target axis by minimizing the Achievement Scalarization Function (ASF). Finally, a hyperplane is constructed, and a linear hyperplane is fitted using the extreme individuals to calculate the target f. i intercept a i Thus, the normalized target value is obtained: Through the above mapping, all target values ​​are scaled to the [0,1] range.

[0189] After obtaining the normalized target value, each individual is represented as a point in the normalized target space, and the perpendicular distance between this point and each reference point is calculated. Subsequently, an environment selection operation is performed based on the individual's non-dominated layer, the number of currently associated individuals of the reference point, and the perpendicular distance. For individuals located in the last non-dominated layer to be selected, individuals with the fewest currently associated reference points and the smallest perpendicular distance are preferentially retained, thereby maintaining the uniform distribution of the Pareto front solution set in each target direction.

[0190] Furthermore, when using the third-generation non-dominated sorting genetic algorithm NSGA-III based on a reference point mechanism for global collaborative search, and generating uniformly distributed reference points in the normalized objective space, combined with non-dominated sorting and reference point association mechanisms to obtain candidate solutions, the Das-Dennis method is first used to generate H uniformly distributed reference points Z in the three-dimensional objective space. The Das-Dennis reference point generation method specifically includes the following steps: The objective function in the three-objective optimization problem is uniformly converted into a minimization form. For benefit-type indicators such as Net Present Value (NPV) and peak shaving / valley filling rate, their inverses are taken as optimization objectives; for dynamic payback period (PBP), it is directly used as a cost-type objective. Thus, a unified objective vector is constructed: ;

[0191] In the formula, To achieve peak shaving and valley filling rate; To construct a unified target vector; The transformation target corresponding to the goal of maximizing net present value over the entire life cycle; The objective is to minimize the dynamic payback period; The conversion target is the one that maximizes the peak-shaving and valley-filling rate. To facilitate a unified minimization solution in NSGA-III, we can set: ;

[0192] in, The payback period is dynamic. It is the net present value over the entire life cycle.

[0193] Then, set the reference point to have p layers. For the three-objective problem, enumerate all non-negative integer triplets that satisfy the following conditions: For each integer triple (h1, h2, h3), generate a standard reference point: All reference points constitute the reference point set: ; q is the index value of the standard reference point; H is the number of standard reference points; where the number of reference points is: ;

[0194] In the formula, The number of reference points generated by NSGA-III in the normalized target space; is the number of objective functions; p is the reference point division parameter, used to control the number of equal divisions in each objective axis direction; This is a combinatorial operator. In this embodiment, the objective function includes the net present value over the entire life cycle, the dynamic payback period, and the peak shaving and valley filling rate. For example, when p=4, 15 reference points can be generated, covering the three target directions of net present value, dynamic payback period, and peak shaving and valley filling rate, as well as their different compromise directions.

[0195] After generating the reference point, the normalized target vector for each individual is... Associat with the set of reference points Z. For any individual s and reference points Z... q Calculate its perpendicular distance to the reference direction:

[0196] ;

[0197] Individual s is associated with the reference point with the smallest vertical distance. When selecting the environment, the reference point with the fewest currently associated individuals is preferred; if multiple candidate individuals are associated with the same reference point, the individuals with smaller vertical distances are preferred to maintain the uniform distribution of the Pareto front in different target preference directions.

[0198] In addition, a simulated binary crossover (SBX) operator and a polynomial mutation (PM) operator are used for gene recombination to generate a progeny population. The crossover operation results in progeny individuals c1 and c2 inheriting the superior configuration ratios and scheduling logic of their parents; the mutation operation uses a probability P... m Fine-tune the power for specific time periods in the scheduling sequence to escape local optima. Repeat the above steps until the maximum number of iterations G is reached. max The final output is determined by N. pop The Pareto optimal front consists of several non-dominated solutions. Each non-dominated solution in the Pareto optimal front corresponds to a set of energy storage rated power, rated capacity, and 24-hour charge and discharge scheduling strategies, which can be used as input for subsequent comprehensive evaluation and decision screening of candidate schemes.

[0199] S4. An improved TOPSIS integrated decision-making method based on density correction and combined weight fusion is used to select the candidate scheme with the highest relative proximity as the final recommended user-side energy storage configuration scheme by calculating the relative proximity of each candidate scheme.

[0200] As a preferred embodiment, S4 includes the following steps: S41, performing a three-dimensional target space local density analysis on each candidate scheme, and constructing a density-corrected evaluation index as the fourth evaluation dimension to form a four-dimensional corrected decision matrix; S42, based on the four-dimensional corrected decision matrix, calculating the weight of the candidate scheme under each evaluation index using the fusion entropy weight method, the coefficient of variation method, and the deviation maximization method; S43, correcting the weight of the candidate scheme based on the synergy, conflict, and correlation among the evaluation indicators to obtain the final comprehensive weight, and constructing a weighted corrected decision matrix based on the final comprehensive weight; S44, calculating the relative proximity of the candidate schemes using the improved TOPSIS method based on the weighted corrected decision matrix, and selecting the candidate scheme with the largest relative proximity as the final recommended user-side energy storage configuration scheme.

[0201] It should be noted that, addressing the issues of numerous candidate solutions in the high-dimensional Pareto optimal front, making direct manual decision-making difficult, and the inability of traditional entropy-weighted TOPSIS to reflect the spatial distribution characteristics of Pareto candidate solutions and the synergistic and conflicting relationships among evaluation indicators, this invention constructs an improved TOPSIS comprehensive decision-making model based on density correction and combined weight fusion. This model first performs a three-dimensional local density analysis of the candidate solutions in the Pareto optimal front, constructing a density-corrected evaluation indicator as the fourth evaluation dimension; then, it fuses the weights obtained from the entropy weight method, the coefficient of variation method, and the deviation maximization method, and corrects the weights by considering the synergy, conflict, and correlation among evaluation indicators; finally, it uses the improved TOPSIS method to calculate the relative proximity of candidate solutions, achieving objective and automatic selection of the optimal configuration. The specific steps are as follows:

[0202] 1) Extract from the candidate solutions of the obtained Pareto optimal frontier There are 1 non-dominated candidate solutions, each with three original evaluation indicators: net present value over the entire life cycle, dynamic payback period, and peak shaving and valley filling rate. An original decision matrix is ​​constructed as follows: ;

[0203] In the formula, D is the original decision matrix; Let be the original index value of the i-th candidate solution under the j-th evaluation index; This represents the number of Pareto candidate solutions. This represents the number of original evaluation indicators.

[0204] The original evaluation indicators are normalized and oriented to obtain the normalized matrix:

[0205] ; ;

[0206] In the formula, The index value is the normalized value after homogenization. Represents the net present value (NPV) indicator over the entire life cycle. This indicates a dynamic investment payback period indicator. This represents the peak shaving and valley filling rate. To prevent extremely small positive numbers with a denominator of zero.

[0207] In the , , In the constructed three-dimensional target space, calculate the Euclidean distance between the i-th candidate solution and the l-th candidate solution: ;

[0208] In the formula, Let be the distance between the i-th candidate solution and the l-th candidate solution in the three-dimensional target space.

[0209] Based on the k nearest neighbor set of the i-th candidate solution Calculate its local density:

[0210] ;

[0211] In the formula, Let be the local density of the i-th candidate solution in the three-dimensional target space; Let k be the set of k nearest neighbors of the i-th candidate solution; k is the number of neighbors. To prevent extremely small positive numbers with a denominator of zero.

[0212] Normalize the local density: ;

[0213] In the formula, This represents the normalized local density.

[0214] Based on local density and the first three evaluation indicators, a density-corrected evaluation index is constructed:

[0215] ;

[0216] In the formula, Let be the density correction evaluation index for the i-th candidate solution. When the candidate solution is located in an overcrowded area, The larger the density correction index, the lower the evaluation index; when the candidate scheme has both a better index value and a lower degree of crowding, the density correction evaluation index is higher.

[0217] The first three homogenization evaluation indicators and the density correction evaluation indicator together constitute the four-dimensional positive decision matrix: ;

[0218] In the formula, The four-way maintenance positive decision matrix; Let J be the normalized index value of the i-th candidate solution under the j-th modified evaluation index; N is the number of Pareto candidate solutions; and J is the number of modified evaluation indices. In this embodiment, the modified evaluation indices include net present value over the entire life cycle, dynamic payback period, peak shaving and valley filling rate, and local density correction index, therefore J=4.

[0219] 2) Based on the four-dimensional positive decision matrix Z, calculate the feature weight of the i-th candidate scheme under the j-th evaluation index: ;

[0220] In the formula, Let represent the feature weight of the i-th candidate scheme under the j-th evaluation index.

[0221] The information entropy of the j-th evaluation index is: ;

[0222] In the formula, Let be the information entropy of the j-th evaluation index.

[0223] The initial weights obtained by the entropy weight method are: ;

[0224] In the formula, Let be the entropy weight of the j-th evaluation index.

[0225] Calculate the average value of the j-th evaluation indicator: ;

[0226] Calculate the coefficient of variation for the j-th evaluation index: ;

[0227] In the formula, Let be the coefficient of variation of the j-th evaluation index; is the average value of the j-th evaluation index.

[0228] Determine the weight of the coefficient of variation based on the coefficient of variation: ;

[0229] In the formula, Let be the coefficient of variation weight of the j-th evaluation index.

[0230] Calculate the deviation maximization coefficient for the j-th evaluation index: ;

[0231] In the formula, Let be the deviation maximization coefficient of the j-th evaluation index.

[0232] Determine the deviation maximization weights based on the deviation maximization coefficient: ;

[0233] In the formula, The weight is the deviation maximization weight for the j-th evaluation index.

[0234] 3) Calculate the correlation coefficient between the j-th evaluation indicator and the q-th evaluation indicator:

[0235] ;

[0236] In the formula, Let be the correlation coefficient between the j-th evaluation index and the q-th evaluation index; when When, it indicates that the two indicators are synergistic; when When this occurs, it indicates that the two indicators are conflicting; The larger the value, the stronger the correlation between the two indicators.

[0237] Calculate the degree of conflict of the j-th evaluation index based on the correlation coefficient: ;

[0238] In the formula, Let be the degree of conflict between the j-th evaluation indicator and other evaluation indicators.

[0239] Calculate the correlation degree of the j-th evaluation index: ;

[0240] In the formula, Let be the correlation between the j-th evaluation indicator and other evaluation indicators.

[0241] Construct weight correction coefficients based on conflict level and correlation level: ;

[0242] In the formula, Let be the weight adjustment coefficient for the j-th evaluation indicator; This is the conflict adjustment coefficient; This is the correlation adjustment coefficient.

[0243] Adjust the weights of the entropy weight method: ;

[0244] In the formula, The entropy weights are adjusted for conflict and correlation.

[0245] The final overall weight is: ;

[0246] In the formula, The final comprehensive weight of the j-th evaluation indicator; , , These are the fusion coefficients for the modified entropy weight method, the coefficient of variation method, and the deviation maximization method, respectively, and they satisfy: ;in, , , The settings can be configured according to the user's preferences for economy, payback period sensitivity, and peak shaving and valley filling performance, or they can be set using an equal weighting method.

[0247] 4) Construct a weighted adjusted decision matrix based on the final comprehensive weights: ;

[0248] In the formula, This is the weighted adjustment index value of the i-th candidate solution under the j-th evaluation index.

[0249] Since all evaluation indicators have been homogenized, the positive ideal solution and the negative ideal solution are as follows:

[0250] ; ;

[0251] In the formula, This represents the positive ideal value of the j-th evaluation index; It represents the negative ideal value of the j-th evaluation index.

[0252] Calculate the distance from the i-th candidate solution to the positive ideal solution: ;

[0253] Calculate the distance from the i-th candidate solution to the negative ideal solution: ;

[0254] Calculate the relative proximity of the i-th candidate solution: ;

[0255] In the formula, Let be the relative similarity of the i-th candidate solution. According to... Sort the candidate solutions from largest to smallest and select... The largest candidate solution will be the final recommended user-side energy storage configuration.

[0256] The improved TOPSIS comprehensive decision-making model based on density correction and combined weight fusion can be used to select the optimal candidate configuration scheme from the Pareto optimal frontier that takes into account economy, payback period, peak shaving and valley filling performance and solution set distribution stability. To further verify the stability and adaptability of the optimal candidate configuration scheme under multiple operating conditions, subsequent scenario replay verification is performed.

[0257] S5. Perform multi-scenario playback verification on the final recommended user-side energy storage configuration scheme. If the playback verification meets the preset economic and operational performance requirements, then use it as the final recommended user-side energy storage configuration scheme. Otherwise, return to step S4 to reselect a candidate scheme with the second-best approximation but higher robustness.

[0258] Specifically, the optimal energy storage configuration scheme is selected and simulated using historical test scenarios and extreme disturbance scenarios. The net present value (NPV), dynamic payback period, peak shaving and valley filling rate, and battery aging cost are calculated for each scheme under different scenarios. These are then compared with a scheme without energy storage and a scheme based solely on NPV. If the optimal energy storage configuration scheme meets the preset economic and operational performance requirements in most scenarios, it is selected as the final recommended user-side energy storage configuration scheme; otherwise, the process returns to step S4 to reselect a candidate scheme that is less optimal but more robust.

[0259] In one embodiment, the extreme disturbance scenario includes at least one of the following: high temperature and high load scenario, low temperature and low load scenario, and load surge scenario, used to verify the adaptability of the selected scheme under atypical operating conditions.

[0260] The method provided by this invention is applicable to user-side energy storage configurations in various scenarios with complex load characteristics, such as industrial parks, commercial complexes, and charging stations. The probability scenario set generated by the Transformer model covers the load fluctuation range under different seasons and weather conditions, enabling the configuration scheme to have adaptive adjustment capabilities in different scenarios.

[0261] According to a second embodiment of the present invention, a user-side energy storage multi-scenario adaptive optimization configuration system based on Transformer-NSGA-III is provided, the system comprising:

[0262] The data module is used to collect multi-source scene data from the target user side and perform multi-scene probability load prediction based on the Transformer model with self-attention mechanism to generate multiple sets of load scenarios covering different meteorological conditions and time period characteristics; wherein, after the multi-source scene data is collected, it is preprocessed using a sample screening method based on graph association strength.

[0263] The aging calculation module is used to obtain the energy storage charge and discharge power sequence, SOC sequence, operating temperature sequence and charge and discharge direction change formed under various load scenarios, and construct the time-series operating condition stress factor. Combined with the multi-scenario probability load prediction results, the multi-scenario weighted battery aging cost is calculated.

[0264] The solution-solving module is used to construct a multi-objective optimization model that takes into account the probability distribution of multiple scenarios based on the multi-scenario weighted battery aging cost, and solve candidate solutions based on the capacity and policy joint solution method of the NSGA-III algorithm.

[0265] The scheme selection module is used to improve the TOPSIS comprehensive decision-making method based on density correction and combined weight fusion. By calculating the relative closeness of each candidate scheme, the candidate scheme with the highest relative closeness is selected as the final recommended user-side energy storage configuration scheme.

[0266] The scheme verification module is used to perform multi-scenario playback verification of the final recommended user-side energy storage configuration scheme. If the playback verification meets the preset economic and operational performance requirements, it is adopted as the final recommended user-side energy storage configuration scheme. Otherwise, it returns to step S4 to reselect a candidate scheme with the second-best approximation but higher robustness.

[0267] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III, characterized in that, Includes the following steps: S1. Collect multi-source scene data from the target user side, and perform multi-scene probability load prediction based on the Transformer model with self-attention mechanism to generate multiple sets of load scenarios covering different meteorological conditions and time period characteristics; wherein, after the multi-source scene data is collected, it is preprocessed using a sample screening method based on graph association strength. S2. Obtain the energy storage charging and discharging power sequence, SOC sequence, operating temperature sequence and charging and discharging direction change formed under each load scenario, and construct the time-series operating condition stress factor. Combine the multi-scenario probability load prediction results to calculate the multi-scenario weighted battery aging cost. S3. Based on the weighted battery aging cost in multiple scenarios, a multi-objective optimization model considering the probability distribution of multiple scenarios is constructed, and the candidate solutions are solved based on the capacity and policy joint solution method of the NSGA-III algorithm. S4. An improved TOPSIS integrated decision-making method based on density correction and combined weight fusion is used to select the candidate scheme with the highest relative proximity as the final recommended user-side energy storage configuration scheme by calculating the relative proximity of each candidate scheme. S5. Perform multi-scenario playback verification on the final recommended user-side energy storage configuration scheme. If the playback verification meets the preset economic and operational performance requirements, then use it as the final recommended user-side energy storage configuration scheme. Otherwise, return to step S4 to reselect a candidate scheme with the second-best approximation but higher robustness.

2. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 1, characterized in that, S1 includes the following steps: S11. For the pre-collected target user-side multi-source scene data, perform preprocessing sequentially, including dynamic reconstruction of missing values, adaptive replacement of outliers, and robust quantile normalization. S12. Based on the preprocessed multi-source scene data, combined with the mean squared error loss function, construct and train a Transformer model based on the self-attention mechanism. S13. Using a Transformer model based on a self-attention mechanism, predict the probability distribution parameters of the load forecast values ​​for a preset time period in the future. Based on the probability distribution parameters, use the Monte Carlo sampling method to generate multiple load scenarios covering different meteorological conditions and time period characteristics.

3. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 2, characterized in that, S11 includes the following steps: S111. For any multi-source scene data at any time to be preprocessed, identify missing load points based on the validity of load acquisition values, the continuity of acquisition timestamps, and communication anomaly identifiers, and construct scene feature vectors for subsequent similar sample screening and graph association strength calculation. S112. For the missing load values ​​of missing load points, preliminary candidate similar samples are screened by calculating the graph association strength, and the preliminary candidate similar samples are filtered a second time according to the anomaly label. Combined with the normalized attention weight after the second filtering, the missing load values ​​are dynamically reconstructed. S113. Calculate the abnormal threshold dynamically using the candidate similar samples after secondary filtering, identify abnormal points in the multi-source scene data after missing dynamic reconstruction processing based on the abnormal threshold, and perform adaptive replacement processing of abnormal points. S114 After completing the missing dynamic reconstruction and outlier adaptive replacement, an initial sample is generated, and the initial sample is normalized using the quantile robust normalization method to obtain preprocessed multi-source scene data.

4. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 3, characterized in that, S112 includes the following steps: S1121. Based on the collection timestamp, date, and time period information corresponding to the missing load points, determine the dates to be filled and historical candidate dates, and construct date node feature vectors; S1122. Based on the feature vector of the date node, calculate the graph association strength between the date to be filled and the candidate date, and dynamically select the candidate similar date set from the preset historical samples according to the graph association strength to form a preliminary candidate similar sample. S1123. Based on the graph association strength, comprehensive similarity distance, and multidimensional feature matching relationship of preliminary candidate similar samples, calculate the dynamic attention weight of preliminary candidate similar samples at the time to be filled. S1124. Based on the residual anomaly marker, slope anomaly marker, meteorological deviation anomaly marker, and electricity price status anomaly marker of the preliminary candidate similar samples, the preliminary candidate similar samples are filtered a second time to obtain the candidate similar samples after secondary filtering. S1125. Based on the candidate similar samples after secondary filtering, the dynamic attention weights are redistributed to obtain the normalized attention weights after secondary filtering. S1126. Based on the normalized attention weights after secondary filtering and combined with candidate similar samples, perform dynamic missing load reconstruction processing on the missing load values ​​of missing load points.

5. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 3, characterized in that, S113 includes the following steps: S1131. For the missing dynamic reconstruction processed multi-source scene data and the candidate similar samples after secondary filtering, calculate the actual load value and the baseline load estimate respectively, and calculate the load residual between the actual load value and the baseline load estimate. S1132. Based on the residual distribution of the candidate similar samples after secondary filtering, calculate the dynamic anomaly threshold and compare it with the load residual to determine the residual anomaly state. S1133. Based on the multi-source scenario data after missing dynamic reconstruction processing, determine the load ramping anomaly, meteorological deviation anomaly, and electricity price time-period change status by judging the magnitude of numerical changes at adjacent times. S1134. Convert residual anomalies, load ramping anomalies, meteorological deviation anomalies, and electricity price time-period abrupt changes into anomaly state feature matrix; S1135. Determine the final anomaly point based on the number of anomaly components in the anomaly state feature matrix; S1136. For the identified outliers, use the dynamically reconstructed values ​​of candidate similar samples after secondary filtering to replace them, thereby achieving adaptive replacement processing of outliers.

6. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 1, characterized in that, S2 includes the following steps: S21. Obtain the energy storage charging and discharging power sequence under each load scenario, calculate the net energy storage power, and calculate the equivalent charging and discharging rate in combination with the preset rated energy storage capacity. S22. Obtain the SOC sequence, operating temperature sequence, and charge / discharge direction changes under various load scenarios, and construct the time-series stress factor by combining the equivalent charge / discharge rate. S23. Calculate the aging increment for a single time period based on the time-series stress factor and in combination with energy throughput, SOC change magnitude and cumulative life loss status. S24. Based on the single-period aging increment, combined with the preset scheduling cycle and multi-scenario probability load prediction results, calculate the multi-scenario weighted battery aging cost.

7. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 6, characterized in that, S22 includes the following steps: S221. Based on the SOC sequence under each load scenario, calculate the SOC deviation stress factor to characterize the aging acceleration effect when the battery deviates from the preset SOC range. S222. Based on the operating temperature sequence under various load scenarios, calculate the temperature stress factor to characterize the nonlinear amplification effect of the increase in operating temperature on the battery aging rate. S223. Based on the equivalent charge / discharge rate under various load scenarios, calculate the rate stress factor used to characterize the accelerating effect of charge / discharge on battery aging. S224. Based on the changes in charging and discharging directions under various load scenarios, calculate the charging and discharging direction switching stress factor to characterize the impact of frequent charging and discharging switching on the internal polarization and life loss of the battery. S225, based on SOC deviation stress factor, temperature stress factor, rate stress factor and charge / discharge direction switching stress factor, constitutes the timing condition stress factor.

8. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 7, characterized in that, S24 includes the following steps: S241. Based on the aging increment of a single time period, the cumulative lifespan loss status is recursively calculated, and the battery health status is calculated based on the cumulative lifespan loss status. S242. Based on the preset scheduling cycle, the aging increment of each time period is accumulated, and the battery aging cost of the scenario is calculated in combination with the battery purchase and installation costs. S243. Based on the multi-scenario probability load prediction results, the battery aging cost under different scenarios is weighted to obtain the multi-scenario weighted battery aging cost.

9. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 1, characterized in that, S3 includes the following steps: S31. Based on the multi-scenario weighted battery aging cost, calculate the net present value of the energy storage system throughout its entire life cycle, and construct a multi-objective function that maximizes the net present value throughout its entire life cycle, minimizes the dynamic investment payback period, and maximizes the peak shaving and valley filling rate. S32. Construct constraints including power balance constraints, energy storage state of charge constraints, and power and capacity configuration constraints, and combine them with multi-objective functions to form a multi-objective optimization model that takes into account the probability distribution of multiple scenarios. S33. Based on the multi-objective optimization model that takes into account the probability distribution of multiple scenarios, the third-generation non-dominated sorting genetic algorithm NSGA-III based on the reference point mechanism is used for global collaborative search. By generating uniformly distributed reference points in the normalized objective space and combining non-dominated sorting and reference point association mechanisms, candidate solutions are obtained.

10. The user-side energy storage multi-scenario adaptive optimization configuration method based on Transformer-NSGA-III according to claim 1, characterized in that, S4 includes the following steps: S41. Perform local density analysis of the three-dimensional target space for each candidate solution, and construct a density correction evaluation index as the fourth evaluation dimension to form a four-dimensional correction decision matrix. S42. Based on the four-dimensional positive decision matrix, and using the fusion entropy weight method, the coefficient of variation method, and the deviation maximization method, calculate the weight of the candidate scheme under each evaluation index. S43. Based on the synergy, conflict and correlation among the evaluation indicators, the weights of the candidate solutions are modified to obtain the final comprehensive weight, and a weighted modified decision matrix is ​​constructed based on the final comprehensive weight. S44. Based on the weighted modified decision matrix, the improved TOPSIS method is used to calculate the relative proximity of candidate schemes, and the candidate scheme with the largest relative proximity is selected as the final recommended user-side energy storage configuration scheme.