A flexible load forecasting system and method based on multi-task balanced learning

By combining multi-task balanced learning and Monte Carlo simulation with charging pile, meteorological and electricity price data, a four-dimensional parameter system is constructed, which solves the problem that a single task model cannot fully characterize the charging load characteristics and realizes high-precision load prediction for county-level communities.

CN122491565APending Publication Date: 2026-07-31STATE GRID ZHEJIANG ELECTRIC POWER CO LTD ANJI COUNTY POWER SUPPLY CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing single-task models cannot fully characterize the multi-dimensional characteristics of charging load, ignore load peaks and adjustable potential, and have poor local adaptability, making it difficult to achieve accurate prediction in county-level communities.

Method used

A multi-task balanced learning method is adopted, which combines empirical mode decomposition, multi-task learning and Monte Carlo simulation to construct a four-dimensional parameter system. Combined with charging pile data, meteorological and electricity price information, load forecasting is carried out, and the model is optimized through dynamic weight adjustment strategy.

Benefits of technology

It achieves coordinated and accurate prediction of the flexible load size, peak time and adjustable potential of community charging piles, reduces the impact of nonlinear interference and randomness of user behavior, and improves prediction accuracy and localization adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491565A_ABST
    Figure CN122491565A_ABST
Patent Text Reader

Abstract

This invention discloses a flexible load forecasting system based on multi-task balanced learning, comprising: a data acquisition and preprocessing module for acquiring charging pile operation data and performing preprocessing and mode decomposition to obtain decomposed time-series components; a probability distribution acquisition module for constructing a four-dimensional parameter system and fitting the probability distribution of key parameters; a multi-task balanced learning model training module for constructing and training the network to obtain the prediction results of each time-series component; and a Monte Carlo correction and result reconstruction module for generating random samples of user behavior for correction and reconstruction to obtain the final load forecast sequence. This invention solves the problem that existing single-task models do not fully characterize the flexible load characteristics, and achieves collaborative and accurate prediction of the flexible load of charging piles in residential areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity load forecasting technology, specifically to a flexible load forecasting system and method based on multi-task balanced learning. Background Technology

[0002] The rapid popularization of electric vehicles is driving charging load to become a core component of urban flexible load. The randomness and volatility of charging load pose significant challenges to the safe operation of distribution networks. Accurate prediction of community-level charging load characteristics is a prerequisite for optimizing charging resource allocation, peak shaving and valley filling, and flexible load dispatching. While some progress has been made in power flexible load forecasting, research on charging load forecasting is insufficient, and current methods often employ single-task modeling approaches, such as predicting only hourly load values. For example, existing technologies use models such as Long Short-Term Memory (LSTM) neural networks for time-series forecasting. Furthermore, to address the nonlinear characteristics of load data, current research has also introduced mode decomposition techniques. Meanwhile, Monte Carlo simulation, due to its ability to accurately characterize the randomness of user behavior, has also been used for load probability distribution forecasting.

[0003] However, the aforementioned existing methods have the following main drawbacks: First, traditional single-task prediction models (such as using only LSTM to predict load size) only focus on hourly load values, ignoring the coupling relationship between load peaks, charging adjustment potential, and other related characteristics, resulting in an incomplete characterization of flexible load characteristics. Second, charging load is affected by multiple factors such as user charging habits, weather conditions, and electricity pricing policies, exhibiting significant randomness and spatiotemporal fluctuations. Single-task prediction models struggle to simultaneously address the collaborative prediction requirements of load size, peak characteristics, and adjustment potential. Furthermore, for the specific application scenario of county-level residential communities, research on the localization and adaptability of existing methods is scarce, making it difficult to accurately capture the specific behavioral patterns of local users. Summary of the Invention

[0004] The purpose of this invention is to provide a flexible load forecasting system and method based on multi-task balanced learning. This invention can solve the problems of insufficient adaptation of single-task models to multi-dimensional influencing factors, incomplete characterization of load characteristics, and poor localization adaptability in the existing technology, and realize the coordinated and accurate prediction of the size, peak time, and adjustable potential of flexible load of charging piles in the community.

[0005] To achieve this objective, the present invention provides a flexible load forecasting system based on multi-task load balancing learning, comprising: The data acquisition and preprocessing module is used to collect charging pile operation data, preprocess the charging pile operation data to obtain the original load sequence, and decompose the original load sequence according to the ensemble empirical mode decomposition method to obtain the decomposed time series components. The probability distribution acquisition module is used to construct a four-dimensional parameter system based on the charging pile operation data. By fitting the probability distribution of the set key parameters of the charging pile with the four-dimensional parameter system and the localized data of the current charging pile, the localized parameter distribution of the current charging pile is obtained. The multi-task balanced learning model training module is used to construct a multi-task learning network based on a four-dimensional parameter system, and to train the multi-task learning network based on the decomposed temporal components to obtain the prediction results of each temporal modality component. The Monte Carlo correction and result reconstruction module is used to generate random samples of user behavior based on the localized parameter distribution of the current charging pile, perform Monte Carlo simulation based on the random samples of user behavior to obtain a reference sequence of user behavior, perform error correction on the prediction results of each time-series modal component based on the user behavior reference sequence, and superimpose the prediction results of each time-series modal component on the corrected prediction results to obtain the final load prediction sequence.

[0006] Preferably, the collected charging pile operation data includes historical load data of the charging pile, equipment operating parameters, meteorological data and real-time electricity price data; The four-dimensional parameter system is constructed from four dimensions: historical load data of power piles, equipment operating parameters, meteorological data, and real-time electricity price data.

[0007] Preferably, the specific method for preprocessing charging pile operation data is as follows: The 3σ criterion is used to first remove abnormal load values ​​caused by equipment failures in the charging pile operation data, and then linear interpolation is used to fill in the missing data of the charging pile operation data to obtain the original load sequence.

[0008] Preferably, the specific steps for decomposing the original load sequence into decomposed time-series components using the ensemble empirical mode decomposition method are as follows: On the original load sequence, Gaussian white noise sequences with different time limits but the same fixed amplitude are repeatedly added a set number of times to form a set of noise-added aggregate signals. For each noisy signal in the set of noisy signals, the standard EMD algorithm is used to decompose each noisy signal into a set of intrinsic mode functions and a residual term; Since each noise addition is independent, the noise will cancel each other out in the denoised aggregate signal, and the true intrinsic mode function of the signal will be preserved. Finally, the original load sequence is decomposed into a set number of intrinsic mode function components and a residual term, that is, a set number of time components and a residual term.

[0009] Preferably, in the multi-task balanced learning model training module, the multi-task learning network includes a shared feature layer and a task-specific layer. The shared feature layer consists of a set number of LSTM networks, each containing a set number of neurons, used to extract common features of the input parameters. The task-specific layer includes a main task fully connected layer, an auxiliary task one fully connected layer, and an auxiliary task two fully connected layer. The main task fully connected layer outputs the load time-series prediction value of the main task, the auxiliary task one fully connected layer outputs the peak time probability distribution of the auxiliary task one, and the auxiliary task two fully connected layer outputs the adjustable potential ratio of the auxiliary task two.

[0010] Preferably, a main task loss function, an auxiliary task one loss function, and an auxiliary task two loss function are set. Based on the main task loss function, the auxiliary task one loss function, and the auxiliary task two loss function, a dynamic weight adjustment strategy based on the gradient norm is designed, and the total dynamic weight loss function is obtained for training the multi-task balanced learning model to reduce the prediction error of the multi-task balanced learning model. The specific method for setting the main task loss function, the auxiliary task one loss function, and the auxiliary task two loss function is as follows: The primary task is to predict charging load time series, and the mean square error loss function is used to measure the prediction accuracy. L 1= ( y 1i - 1i ) 2 ; in, L 1 is the main task loss function. y 1i For the actual load used in the main task forecast, 1i For forecasting loads used for primary task forecasting, N This represents the total number of load samples used in the calculation of the mean square error of the charging load time series prediction for charging piles.

[0011] The first auxiliary task is peak load time identification, outputting the time point when the daily load peak occurs. The cross-entropy loss function is used, where n is the number of sampling points at a set minute interval each day. The specific formula is as follows: L 2= ​​- y 2i log 2i ; in, L 2 represents the loss function for the auxiliary task. y 2i To serve as the actual load for auxiliary task one, 2i For predicting the load to assist in Task 1; The second auxiliary task is to assess the load adjustability potential and output the proportion of load that can be transferred during off-peak periods. L 3. Using the Huber loss function, when | y 3i - 3i When | ≤ 0.1, execute the following formula: L 3= 0.5 ( y 3i - 3i ) 2 ; in, L 3 represents the loss function for auxiliary task two. y 3i For the actual load used to assist in Task 2, 3i For predicting the load to assist in Task 2, when | y 3i - 3i When | > 0.1, execute the following formula: L 3= | y 3i - 3i | - 0.5 2 ; δ is a hyperparameter of the Huber loss function.

[0012] Preferably, based on the loss function of the main task, the loss function of auxiliary task one, and the loss function of auxiliary task two, a dynamic weight adjustment strategy based on the gradient norm is designed, and the specific method for obtaining the total dynamic weight loss function is as follows: The total loss function, consisting of the mean squared error loss function, cross-entropy loss function, and Huber loss function, is calculated using a dynamic weight balancing mechanism. The dynamic weights are adjusted based on the gradient norm of the loss for each task. First, the gradient norm of the loss for each task is calculated. G k ,in For shared layer parameters: G k = || - k ( ) ||2 (k = 1,2,3); The meaning is to share layer parameters θ The gradient operator for the independent variable, represents the loss function for task k. L k For shared layer parameters θ The gradient of k1 represents the main task, k2 represents auxiliary task one, and k3 represents auxiliary task two. Determine dynamic weights w k Updated formula: w k = / ; j The traversal index represents the summation operation; Determine the total loss function: L total = w 1 L 1+ w 2 L 2+ w 3 L 3; in, w 1+ w 2+ w 3 = 1.

[0013] Preferably, the specific method for obtaining the final load forecast sequence is as follows: The preprocessed original load sequence is decomposed to obtain M time-series components ( C 1, C 2, C 3... C M and residual term R; The four-dimensional input parameters corresponding to each component are input into a multi-task network, and the model is trained with a dynamic weight total loss function to obtain the prediction results of each component. 1, 2, 3... M , ); The preliminary load sequence is obtained by superimposing the predicted components. mtl ; Based on localized parameter distribution, random samples of user behavior for a set group are generated, individual charging loads are simulated, and a reference sequence is obtained by superimposing these samples. Y mc Through error correction factor = corr( mtl , Y mc Adjust the preliminary results and output the final predicted sequence: = mtl + (1 - ) Y mc .

[0014] The beneficial effects of this invention are as follows: This invention proposes a flexible load forecasting system based on multi-task balanced learning. By coupling ensemble empirical mode decomposition, multi-task balanced learning, and Monte Carlo simulation correction, this method effectively reduces the impact of nonlinear interference and user behavior randomness on prediction accuracy. In empirical tests in three typical pilot communities—Dipu Street, Changshuo Street, and Tianhuangping Town—the method of this invention significantly reduces the mean absolute percentage error (MAPE) compared to the traditional single LSTM model, controls the peak load prediction deviation to within 9%, and also outperforms the comparative model in terms of root mean square error (RMSE), achieving high-precision prediction of the temporal characteristics of regional charging load. This invention constructs a multi-task balanced learning network with a shared feature layer and a task-specific layer. Charging load temporal prediction is the main task, while peak load moment identification and valley adjustment potential assessment are auxiliary tasks. A dynamic weight adjustment strategy based on gradient norm is designed to achieve multi-task collaborative optimization. This method can simultaneously output hourly load magnitude, precise peak load times, and the proportion of load that can be transferred during off-peak hours for the next 24 hours. It solves the problem of single-task models not fully characterizing load characteristics, providing complete and multi-dimensional data support for real-time dispatching and demand response strategy formulation in distribution networks. By constructing a four-dimensional input parameter system encompassing user behavior, equipment characteristics, meteorological conditions, and electricity pricing policies, and using local charging pile operation data from Anji County to fit and calibrate the probability distribution of key parameters, this parameter system based on real-world scenario data can accurately capture the load characteristics of specific communities within the county. Therefore, this method can be directly applied to flexible load forecasting scenarios in Anji County and other county-level areas, providing a reliable theoretical basis for local distribution network planning, charging resource allocation optimization, and demand response incentive mechanism design, and possessing broad engineering application value.

[0015] This invention aims to address the problems of insufficient adaptation of single-task prediction models to multi-dimensional influencing factors, incomplete characterization of load characteristics, and poor localization adaptability in existing technologies. It achieves coordinated and accurate prediction of the flexible load size, peak time, and adjustable potential of community charging piles, thereby reducing randomness errors. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the structure of the present invention; Figure 2 This is a flowchart illustrating the model of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0018] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1 A flexible load forecasting system based on multi-task load balancing learning, such as Figure 1 As shown, it includes: The data acquisition and preprocessing module is used to collect charging pile operation data, preprocess the charging pile operation data to obtain the original load sequence, and decompose the original load sequence according to the ensemble empirical mode decomposition method to obtain the decomposed time series components. The probability distribution acquisition module is used to construct a four-dimensional parameter system based on the charging pile operation data. By fitting the probability distribution of the set key parameters of the charging pile with the four-dimensional parameter system and the localized data of the current charging pile, the localized parameter distribution of the current charging pile is obtained. The multi-task balanced learning model training module is used to construct a multi-task learning network based on a four-dimensional parameter system, and to train the multi-task learning network based on the decomposed temporal components to obtain the prediction results of each temporal modality component. The Monte Carlo correction and result reconstruction module is used to generate random samples of user behavior based on the localized parameter distribution of the current charging pile, perform Monte Carlo simulation based on the random samples of user behavior to obtain a reference sequence of user behavior, perform error correction on the prediction results of each time-series modal component based on the user behavior reference sequence, and superimpose the prediction results of each time-series modal component on the corrected prediction results to obtain the final load prediction sequence.

[0019] In some preferred embodiments, the key parameters set for the charging pile include user behavior parameters, equipment characteristic parameters, meteorological condition parameters, and electricity price policy parameters. The probability distribution of these key parameters is used to characterize the statistical probability of the values ​​of the key parameters. In optional embodiments, actual historical data obtained from channels such as the Anji County Charging Infrastructure Supervision and Service Platform are used to fit the data using statistical methods (such as membership functions, kernel density estimation, etc.). That is, the probability distribution model that best describes the variation pattern of these data is found, such as normal distribution, log-normal distribution, Weibull distribution, or empirical distribution directly estimated from the data, and finally the probability density function or cumulative distribution function of each key parameter is obtained.

[0020] In an optional embodiment, the original load sequence is derived from the Anji County Charging Infrastructure Supervision and Service Platform. Specifically, it refers to the historical load data obtained from the platform, with community charging piles as the monitoring objects, and the sampling interval is 15 minutes. That is, the sequence is a long-term sequence composed of load values ​​at one point every 15 minutes.

[0021] In some preferred embodiments, each time-series modal component is a subsequence obtained by processing the original load sequence using ensemble empirical mode decomposition (EEMD). Specifically, the original charging load time series is preprocessed and decomposed into several relatively stable oscillating components with frequencies ranging from high to low, and a long-term trend term. The high-frequency components represent rapid, short-term fluctuations in the load sequence, the low-frequency components represent longer-term, periodic fluctuations, and the residual term represents the long-term trend of the load sequence.

[0022] In some preferred embodiments, the random user behavior samples refer to a set of virtual charging behavior scenarios generated in computer simulations that conform to the statistical patterns of actual user behavior in Anji County. Each sample represents a set of possible combinations of user charging behaviors composed of multiple random parameters. This is used to quantify and correct the impact of user behavior uncertainty on load forecasting results by simulating a massive number of possible random scenarios, thereby significantly improving the accuracy and reliability of the final forecast.

[0023] The aforementioned technical solution systematically addresses the problem of insufficient adaptation of existing single-task prediction models to multi-dimensional factors by constructing a closed-loop prediction process from data preprocessing, parameter modeling, multi-task learning to result correction. Through modular system design, the complex prediction task is decomposed into four logically clear and sequentially connected stages, ensuring the operability and repeatability of the prediction process. In particular, the three core technical aspects—four-dimensional parameter system construction and localized parameter calibration, multi-task balanced learning, and Monte Carlo correction—are encapsulated as system modules. This enables coordinated and accurate prediction of charging load size, peak time, and adjustable potential, effectively reducing errors caused by the randomness of user behavior and significantly improving prediction accuracy and system practicality.

[0024] In some preferred embodiments, the collected charging pile operation data includes historical load data of the charging pile, equipment operating parameters, meteorological data, and real-time electricity price data; The four-dimensional parameter system is constructed from four dimensions: historical load data of power piles, equipment operating parameters, meteorological data, and real-time electricity price data.

[0025] In some preferred embodiments, the four-dimensional parameter system refers to a set of input features systematically constructed from four dimensions—user behavior, equipment characteristics, meteorological conditions, and electricity pricing policies—to accurately predict the flexible load of charging piles in a residential community. This system consists of four dimensions: (1) User behavior dimension: This mainly refers to users' charging behavior habits. In an optional embodiment, the data comes from the historical load data of the Anji County Charging Infrastructure Supervision and Service Platform. By analyzing the data, features such as charging start time, charging duration, charging amount, and charging frequency can be extracted. This is the main source of load randomness. (2) Equipment characteristics dimension: mainly refers to the operating parameters of the charging pile itself. In the optional embodiment, the data comes from the equipment operating parameters provided by Zhejiang Anji Kuaizhuang New Energy Technology Co., Ltd., including charging pile type (DC fast charging / AC slow charging), rated power, number of equipment, charging efficiency, historical operating status, etc. (3) Meteorological conditions dimension: mainly refers to external environmental factors. In the optional embodiment, the data comes from the hourly meteorological data of Anji County Meteorological Bureau, mainly including temperature, humidity, weather conditions (such as sunny, rainy, snowy, etc.). The document points out that high temperatures in summer lead to increased use of air conditioning, which in turn increases battery energy consumption and charging frequency. (4) Electricity Price Policy Dimension: This mainly refers to the economic incentives that influence users' charging decisions. In the optional implementation, the data comes from the electricity price policy documents issued by the National Development and Reform Commission, especially the time-of-use pricing (peak, flat, and valley) and the specific prices for each time period. The document clearly states that under the incentive of time-of-use pricing, users will adjust their charging behavior, for example, the proportion of charging during valley hours (22:00-6:00 the next day) can be significantly increased; This system integrates various factors affecting charging load, including internal and external factors, subjective and objective factors, and deterministic and random factors, providing the model with comprehensive and three-dimensional input information, enabling it to more accurately understand the driving mechanism of load changes.

[0026] The aforementioned technical solution, by clearly defining the specific composition of charging pile operation data and the construction dimensions of the four-dimensional parameter system, ensures the comprehensiveness and relevance of the prediction model from the data source. By specifying that the data originates from four specific dimensions—historical load, equipment parameters, meteorological data, and real-time electricity prices—and constructing the parameter system accordingly, the model ensures that it can comprehensively consider four key factors affecting charging load: user behavior, equipment capacity, environmental impact, and economic incentives. This provides high-quality, multi-dimensional feature inputs for subsequent localized probability distribution fitting and multi-task learning, forming the data foundation for accurate prediction and good localization adaptability.

[0027] In some preferred embodiments, the specific method for preprocessing the charging pile operation data is as follows: The 3σ criterion is used to first remove abnormal load values ​​caused by equipment failures in the charging pile operation data, and then linear interpolation is used to fill in the missing data of the charging pile operation data to obtain the original load sequence.

[0028] In the above technical solutions, the 3σ criterion is a commonly used statistical method for outlier detection and removal. Assuming the data follows or approximately follows a normal distribution, it assumes that the vast majority of normal data points fall within a range of plus or minus three standard deviations of the mean. Data points outside this range are considered "outliers" or "gross errors" and should be removed. Linear interpolation is a simple data imputation method used to handle missing values ​​in a data sequence. Its principle is to assume that the data change linearly between two known data points and to estimate the value of intermediate missing points based on this linear relationship.

[0029] The aforementioned technical solution specifies a method for preprocessing charging pile operation data: using the 3σ criterion to remove outliers and then using linear interpolation to fill in missing values. This ensures the data quality of the input model. The 3σ criterion effectively identifies and removes extreme abnormal load values ​​caused by abnormal reasons such as equipment failure, solving the problem that raw data often contains anomalies and missing values ​​due to equipment failure, communication interruptions, etc., which would seriously interfere with model training if used directly. Linear interpolation, while ensuring the continuity of the time series, reasonably estimates the values ​​of missing points. It cleans and repairs the raw data, providing a clean and continuous time series for subsequent modal decomposition and training. This is a crucial preliminary step to ensure the robustness of the entire prediction process and the accuracy of the final result.

[0030] In some preferred embodiments, the specific steps for decomposing the original load sequence according to the ensemble empirical mode decomposition method to obtain the decomposed time-series components are as follows: On the original load sequence, Gaussian white noise sequences with different time limits but the same fixed amplitude are repeatedly added a set number of times to form a set of noise-added aggregate signals. For each noisy signal in the set of noisy signals, the standard EMD algorithm (Empirical Mode Decomposition) is used to decompose each noisy signal into a set of intrinsic mode functions and a residual term; Since each noise addition is independent, the noise will cancel each other out in the denoised aggregate signal, and the true intrinsic mode function of the signal will be preserved. Finally, the original load sequence is decomposed into a set number of intrinsic mode function components and a residual term, that is, a set number of time components and a residual term.

[0031] In some preferred embodiments, the standard EMD algorithm is a sieving process that continuously extracts the highest frequency oscillating components from the signal until only a monotonic trend term remains.

[0032] The above technical solution illustrates how to use the ensemble empirical mode decomposition method to decompose the original load sequence into time-series components, handling the nonlinearity and nonstationarity of the charging load sequence. By adding Gaussian white noise and performing multiple empirical mode decompositions, EEMD can effectively suppress the mode aliasing problem in the standard EMD algorithm, thereby stably decomposing the complex original load sequence into a series of relatively stable intrinsic mode functions with frequencies ranging from high to low and a residual term. This transforms a complex sequence that is difficult to model directly into multiple subsequences with stronger regularity and easier for the model to learn and predict, significantly reducing the prediction difficulty of the subsequent multi-task learning model. This is a key technical step to improve the model's ability to handle nonlinear sequences and the final prediction accuracy.

[0033] In some preferred embodiments, the multi-task balanced learning model training module includes a shared feature layer and a task-specific layer. The shared feature layer consists of a set number of LSTM networks, each containing a set number of neurons, used to extract common features of the input parameters. The task-specific layer includes a main task fully connected layer, an auxiliary task one fully connected layer, and an auxiliary task two fully connected layer. The main task fully connected layer outputs the load time-series prediction value, the auxiliary task one fully connected layer outputs the peak time probability distribution, and the auxiliary task two fully connected layer outputs the adjustable potential ratio.

[0034] The above technical solution defines a specific structure for the multi-task learning network: a two-layer architecture consisting of a shared feature layer and a task-specific layer. This architecture enables collaborative learning and feature sharing across three prediction tasks. The shared feature layer extracts common high-level features useful for all tasks from the four-dimensional input parameters; the task-specific layers make predictions based on the characteristics and output format of their respective tasks. The shared layer allows the model to learn more general and robust feature representations, avoiding computational redundancy and feature fragmentation associated with training models separately for each task. Simultaneously, the task-specific layers ensure the accuracy and correctness of the prediction output for each task, forming the core network architecture for collaborative prediction.

[0035] In some preferred embodiments, a main task loss function, an auxiliary task one loss function, and an auxiliary task two loss function are set. Based on the main task loss function, the auxiliary task one loss function, and the auxiliary task two loss function, a dynamic weight adjustment strategy based on the gradient norm is designed, and the total dynamic weight loss function is obtained for training the multi-task balanced learning model to reduce the prediction error of the multi-task balanced learning model. The specific method for setting the main task loss function, the auxiliary task one loss function, and the auxiliary task two loss function is as follows: The primary task is to predict charging load time series, and the mean square error loss function is used to measure the prediction accuracy. L 1= ( y 1i - 1i ) 2 ; in, L 1 is the main task loss function. y 1i For the actual load used in the main task forecast, 1i For forecasting loads used for primary task forecasting, N This represents the total number of load samples used in the calculation of the mean square error of the charging load time series prediction for charging piles.

[0036] The first auxiliary task is peak load time identification, outputting the time point when the daily load peak occurs. The cross-entropy loss function is used, where n is the number of sampling points at a set minute interval each day. The specific formula is as follows: L 2= ​​- y 2i log 2i ; in, L 2 represents the loss function for the auxiliary task. y 2i To serve as the actual load for auxiliary task one, 2i For predicting the load to assist in Task 1; The second auxiliary task is to assess the load adjustability potential and output the proportion of load that can be transferred during off-peak periods. L 3. Using the Huber loss function, when | y 3i - 3i When | ≤ 0.1, execute the following formula: L 3= 0.5 ( y 3i - 3i ) 2 ; in, L 3 represents the loss function for auxiliary task two. y 3i For the actual load used to assist in Task 2, 3i For predicting the load to assist in Task 2, when | y 3i - 3i When | > 0.1, execute the following formula: L 3= | y 3i - 3i | - 0.5 2 ; δ is a hyperparameter of the Huber loss function.

[0037] In the above technical solution, specific loss functions are set for the three prediction tasks: mean squared error (MSE) for the main task, cross-entropy for auxiliary task one, and Huber loss for auxiliary task two. The design aims to tailor the most suitable optimization objective for each task. MSE is suitable for regression tasks and can effectively measure the overall error of the loading value; cross-entropy is suitable for classification tasks and can accurately assess the differences in probability distributions; Huber loss is insensitive to outliers and is suitable for evaluating indicators such as adjustable proportions that may be affected by anomalies. This allows the model to optimize the three tasks separately along their respective optimal paths during training, providing a reasonable and comparable loss basis for subsequent dynamic weight balancing, thereby ensuring that each sub-task achieves high predictive performance.

[0038] In some preferred embodiments, a dynamic weight adjustment strategy based on the gradient norm is designed according to the main task loss function, the auxiliary task one loss function, and the auxiliary task two loss function. The specific method for obtaining the dynamic weight total loss function is as follows: The total loss function, consisting of the mean squared error loss function, cross-entropy loss function, and Huber loss function, is calculated using a dynamic weight balancing mechanism. The dynamic weights are adjusted based on the gradient norm of the loss for each task. First, the gradient norm of the loss for each task is calculated. G k ,in For shared layer parameters: G k = || - k ( ) ||2 (k = 1,2,3); The meaning is to share layer parameters θ The gradient operator for the independent variable, represents the loss function for task k. L k For shared layer parameters θ The gradient of k1 represents the main task, k2 represents auxiliary task one, and k3 represents auxiliary task two. Determine dynamic weights w k Updated formula: w k = / ; j The traversal index represents the summation operation; Determine the total loss function: L total = w 1L 1+ w 2 L 2+ w 3 L 3; in, w 1+ w 2+ w 3 = 1.

[0039] The above technical solution addresses common task conflicts or optimization imbalances in multi-task learning by introducing a dynamic weight adjustment strategy based on gradient norm to calculate a dynamically weighted total loss function. Since the learning difficulty and gradient magnitude of the three tasks may differ, fixed weights can lead to over-optimization of one task while neglecting others. This mechanism calculates the gradient norm of each task's loss with respect to shared parameters and dynamically adjusts its weight in the total loss, thus balancing the impact of each task on model parameter updates. It automatically and adaptively coordinates the learning processes of the three tasks, ensuring the model learns all tasks evenly and avoids any single task dominating the training process. This is the key mechanism for achieving balanced learning and ultimately obtaining a single model capable of simultaneously and effectively completing three prediction tasks.

[0040] In some preferred embodiments, the specific method for obtaining the final load forecast sequence is as follows: The preprocessed original load sequence is decomposed to obtain M time-series components ( C 1, C 2, C 3... C M and residual term R; The four-dimensional input parameters corresponding to each component are input into a multi-task network, and the model is trained with a dynamic weight total loss function to obtain the prediction results of each component. 1, 2, 3... M , ); The preliminary load sequence is obtained by superimposing the predicted components. mtl ; Based on localized parameter distribution, random samples of user behavior for a set group are generated, and Monte Carlo simulations are performed to simulate individual charging loads and superimpose them to obtain a reference sequence. Y mc Through error correction factor = corr( mtl , Y mc Perform error correction and adjust the preliminary results. mtl For the corrected prediction results mtl Prediction results of superimposed temporal modal components Y mc The final load forecast sequence is obtained. = mtl + (1 - ) Y mc .

[0041] The above technical solution describes a complete algorithm flow from mode decomposition, multi-task prediction to Monte Carlo correction, ultimately yielding the prediction result. All the aforementioned modules and technologies are linked together to form specific executable operational steps. It clarifies how to input the decomposed components into the multi-task network for prediction, how to superimpose the prediction results to obtain a preliminary sequence, and how to use the reference sequence generated by Monte Carlo simulation and the correlation correction factor to correct the preliminary result. It fully realizes the coupled prediction concept of mode decomposition-multi-task balanced learning-Monte Carlo correction. EEMD handles nonlinearity, the multi-task model performs preliminary collaborative prediction, and Monte Carlo correction provides the final correction for the randomness of user behavior. These three steps are interconnected and work together to achieve the high-precision and robust final prediction result sought by the invention.

[0042] Example 2 A flexible load forecasting method based on multi-task load balancing learning, such as Figure 2 As shown, it includes: Collect charging pile operation data, preprocess the charging pile operation data to obtain the original load sequence, and decompose the original load sequence according to the ensemble empirical mode decomposition method to obtain the decomposed time series components; A four-dimensional parameter system is constructed based on the charging pile operation data. The probability distribution of the set key parameters of the charging pile is fitted by the four-dimensional parameter system and the current localized data of the charging pile to obtain the current localized parameter distribution of the charging pile. A multi-task learning network is constructed based on a four-dimensional parameter system. The multi-task learning network is trained based on the decomposed temporal components to obtain the prediction results of each temporal modality component. Random samples of user behavior are generated by the localized parameter distribution of the current charging piles. Monte Carlo simulation is performed on the random samples of user behavior to obtain a reference sequence of user behavior. The prediction results of each time-series modal component are corrected according to the user behavior reference sequence. Finally, the prediction results of each time-series modal component are superimposed on the corrected prediction results to obtain the final load prediction sequence.

[0043] In some preferred implementation schemes, the specific experimental procedures are as follows: Pilot projects will be conducted in the following areas: newly built residential communities in Dipu Subdistrict, and residential communities surrounding the scenic area in Tianhuangping Town.

[0044] Comparison models: Single LSTM model (predicts only load size); Fixed weight MTL model (weight ratio 1:0.3:0.3); EEMD-LSTM model (no multi-task balancing).

[0045] Evaluation metrics: Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), Peak Load Deviation Rate (PE).

[0046] Based on the pilot data, comparison models, and evaluation indicators, the prediction accuracy of different models in the pilot communities is compared as shown in Table 1 below: Table 1. Comparison of prediction accuracy of different models in pilot communities As shown in the table above, the method of this invention achieved the best accuracy in all three types of pilot cells, with MAPE reduced by 34.4%-41.4% compared to the single LSTM model. The multi-task balancing mechanism enables the model to simultaneously capture load magnitude and feature information, and Monte Carlo correction effectively reduces the error caused by the randomness of user behavior.

[0047] Taking the typical weekday forecast of newly built commercial residential communities in Dipu Street as an example: Time-series characteristics: The load curve predicted by the method of this invention has a 92% overlap with the actual curve, accurately capturing the load peak from 19:30 to 21:00, and reducing the peak period identification deviation from 45 minutes to 15 minutes compared with the fixed weight MTL model.

[0048] Peak characteristics: The actual peak load was 186kW, the predicted value of the method of this invention was 172kW, and the PE = 7.5%; while the predicted value of the single LSTM model was 158kW, and the PE = 15.1%.

[0049] Flexibility characteristics: The predicted adjustable load ratio during the valley period is 32.7%, which deviates from the actual control result (34.2%) by only 1.5 percentage points, providing an accurate reference for demand response scheduling.

[0050] Example 3 A computer program product includes a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the method described in Embodiment 2.

[0051] The contents not described in detail in this specification are existing technologies known to those skilled in the art.

Claims

1. A flexible load forecasting system based on multi-task balanced learning, characterized in that, It includes: The data acquisition and preprocessing module is used to collect charging pile operation data, preprocess the charging pile operation data to obtain the original load sequence, and decompose the original load sequence according to the ensemble empirical mode decomposition method to obtain the decomposed time series components. The probability distribution acquisition module is used to construct a four-dimensional parameter system based on the charging pile operation data. By fitting the probability distribution of the set key parameters of the charging pile with the four-dimensional parameter system and the localized data of the current charging pile, the localized parameter distribution of the current charging pile is obtained. The multi-task balanced learning model training module is used to construct a multi-task learning network based on a four-dimensional parameter system, and to train the multi-task learning network based on the decomposed temporal components to obtain the prediction results of each temporal modality component. The Monte Carlo correction and result reconstruction module is used to generate random samples of user behavior based on the localized parameter distribution of the current charging piles, perform Monte Carlo simulation based on the random samples of user behavior to obtain a reference sequence of user behavior, perform error correction on the prediction results of each time-series modal component based on the user behavior reference sequence, and superimpose the prediction results of each time-series modal component on the corrected prediction results to obtain the final load prediction sequence.

2. The flexible load forecasting system based on multi-task balanced learning according to claim 1, characterized in that: The collected charging pile operation data includes historical load data of charging piles, equipment operating parameters, meteorological data and real-time electricity price data; The four-dimensional parameter system is constructed from four dimensions: historical load data of power piles, equipment operating parameters, meteorological data, and real-time electricity price data.

3. The flexible load forecasting system based on multi-task balanced learning according to claim 1, characterized in that: The specific method for preprocessing charging pile operation data is as follows: The 3σ criterion is used to first remove abnormal load values ​​caused by equipment failures in the charging pile operation data, and then linear interpolation is used to fill in the missing data of the charging pile operation data to obtain the original load sequence.

4. The flexible load forecasting system based on multi-task balanced learning according to claim 1, characterized in that: The specific steps for decomposing the original load sequence into decomposed time-series components using the ensemble empirical mode decomposition method are as follows: On the original load sequence, Gaussian white noise sequences with different time limits but the same fixed amplitude are repeatedly added a set number of times to form a set of noise-added aggregate signals. For each noisy signal in the set of noisy signals, the standard EMD algorithm is used to decompose each noisy signal into a set of intrinsic mode functions and a residual term; Since each noise addition is independent, the noise will cancel each other out in the denoised aggregate signal, and the true intrinsic mode function of the signal will be preserved. Finally, the original load sequence is decomposed into a set number of intrinsic mode function components and a residual term, that is, a set number of time components and a residual term.

5. A flexible load forecasting system based on multi-task balanced learning according to claim 1, characterized in that: In the multi-task balanced learning model training module, the multi-task learning network includes a shared feature layer and task-specific layers. The shared feature layer consists of a set number of LSTM networks, each containing a set number of neurons, used to extract common features of the input parameters. The task-specific layers include a main task fully connected layer, an auxiliary task one fully connected layer, and an auxiliary task two fully connected layer. The main task fully connected layer outputs the load time-series prediction value of the main task, the auxiliary task one fully connected layer outputs the peak time probability distribution of the auxiliary task one, and the auxiliary task two fully connected layer outputs the adjustable potential ratio of the auxiliary task two.

6. A flexible load forecasting system based on multi-task balanced learning according to claim 5, characterized in that: We set up loss functions for the main task, auxiliary task 1, and auxiliary task 2. Based on these functions, we designed a dynamic weight adjustment strategy based on the gradient norm. We then obtained the total dynamic weight loss function to train the multi-task balanced learning model, aiming to reduce its prediction error. The specific methods for setting the main task loss function, auxiliary task 1 loss function, and auxiliary task 2 loss function are as follows: The primary task is to predict charging load time series, and the mean square error loss function is used to measure the prediction accuracy. L 1= ( y 1i - 1i ) 2 ; in, L 1 is the main task loss function. y 1i For the actual load used in the main task forecast, 1i For forecasting loads used for primary task forecasting, N This represents the total number of load samples used in the calculation of the mean square error of the charging load time series prediction for charging piles. The first auxiliary task is peak load time identification, outputting the time point when the daily load peak occurs. The cross-entropy loss function is used, where n is the number of sampling points at a set minute interval each day. The specific formula is as follows: L 2= - y 2i log 2i ; in, L 2 represents the loss function for the auxiliary task. y 2i To serve as the actual load for assisting Task 1, 2i For predicting the load to assist in Task 1; The second auxiliary task is to assess the load adjustability potential and output the proportion of load that can be transferred during off-peak periods. L 3. Using the Huber loss function, when | y 3i - 3i When | ≤ 0.1, execute the following formula: L 3= 0.5 ( y 3i - 3i ) 2 ; in, L 3 represents the loss function for auxiliary task two. y 3i For the actual load used to assist in Task 2, 3i For predicting the load to assist in Task 2, when | y 3i - 3i When | > 0.1, execute the following formula: L 3= | y 3i - 3i |- 0.5 2 ; δ is a hyperparameter of the Huber loss function.

7. A flexible load forecasting system based on multi-task balanced learning according to claim 6, characterized in that: Based on the loss functions of the main task, auxiliary task one, and auxiliary task two, a dynamic weight adjustment strategy based on the gradient norm is designed. The specific method for obtaining the total dynamic weight loss function is as follows: The total loss function, consisting of the mean squared error loss function, cross-entropy loss function, and Huber loss function, is calculated using a dynamic weight balancing mechanism. The dynamic weights are adjusted based on the gradient norm of the loss for each task. First, the gradient norm of the loss for each task is calculated. G k ,in For shared layer parameters: G k = || - k ( ) ||2(k = 1,2,3); The meaning is to share layer parameters θ The gradient operator for the independent variable, represents the loss function for task k. L k For shared layer parameters θ The gradient, where k1 represents the main task, k2 represents auxiliary task one, and k3 represents auxiliary task two; Determine dynamic weights w k Updated formula: w k = / ; j The traversal index represents the summation operation; Determine the total loss function: L total = w 1 L 1+ w 2 L 2+ w 3 L 3; in, w 1+ w 2+ w 3 = 1.

8. A flexible load forecasting system based on multi-task balanced learning according to claim 7, characterized in that: The specific method for obtaining the final load forecast sequence is as follows: The preprocessed original load sequence is decomposed to obtain M time-series components ( C 1, C 2, C 3... C M and the residual term R; The four-dimensional input parameters corresponding to each component are input into a multi-task network, and the model is trained with a dynamic weight total loss function to obtain the prediction results of each component. 1, 2, 3... M , ); The preliminary load sequence is obtained by superimposing the predicted components. mtl ; Based on localized parameter distribution, random samples of user behavior for a set group are generated, individual charging loads are simulated, and a reference sequence is obtained by superimposing these samples. Y mc Through error correction factor = corr( mtl , Y mc Adjust the preliminary results and output the final predicted sequence: = mtl + (1 - ) Y mc 。 9. A flexible load forecasting method based on multi-task balanced learning, characterized in that, It includes: Collect charging pile operation data, preprocess the charging pile operation data to obtain the original load sequence, and decompose the original load sequence according to the ensemble empirical mode decomposition method to obtain the decomposed time series components; A four-dimensional parameter system is constructed based on the charging pile operation data. The probability distribution of the set key parameters of the charging pile is fitted by the four-dimensional parameter system and the current localized data of the charging pile to obtain the current localized parameter distribution of the charging pile. A multi-task learning network is constructed based on a four-dimensional parameter system. The multi-task learning network is trained based on the decomposed temporal components to obtain the prediction results of each temporal modality component. Random samples of user behavior are generated by the localized parameter distribution of the current charging piles. Monte Carlo simulation is performed on the random samples of user behavior to obtain a reference sequence of user behavior. The prediction results of each time-series modal component are corrected according to the user behavior reference sequence. Finally, the prediction results of each time-series modal component are superimposed on the corrected prediction results to obtain the final load prediction sequence.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 9.