Deep learning-based electricity sales package revenue evaluation method and system

By using deep learning's LSTM temporal modeling and multi-head attention mechanism, combined with a dual-channel architecture and Monte Carlo sampling, the problem of multi-source heterogeneous feature fusion and uncertainty quantification in the revenue assessment of electricity sales packages is solved, achieving high-precision revenue prediction and interpretable analysis.

CN123160216APending Publication Date: 2026-11-24GUANGDONG YUEFA ENERGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611469625.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing methods for assessing the revenue of electricity sales packages cannot accurately capture the complex nonlinear relationship between electricity price fluctuations and load changes. They lack the integration of multi-source heterogeneous features, the quantification of revenue uncertainty, and the joint representation of package rules and customer load characteristics, resulting in insufficient assessment accuracy and poor interpretability.

Method used

We employ a deep learning-based approach, utilizing LSTM time-series modeling, multi-head attention mechanism, and dual-channel architecture, combined with Monte Carlo sampling and CVaR risk measurement, to achieve effective fusion of multi-source data and multi-scenario extrapolation of benefits. We also construct counterfactual scenario comparisons to quantify the causal effects of various factors.

Benefits of technology

It effectively captures the long-term dependencies of power load sequences, achieves precise matching between packages and customers, accurately portrays revenue uncertainty, improves the accuracy and interpretability of assessments, and reduces forecast errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160216A_ABST
    Figure CN123160216A_ABST
Patent Text Reader

Abstract

This application provides a method and system for evaluating the profitability of electricity sales packages based on deep learning, belonging to the field of electricity market technology. This invention integrates multi-source data acquisition, LSTM time-series networks, attention mechanisms, joint representation of package rules and load characteristics, multi-scenario extrapolation, and counterfactual comparison for profitability evaluation. It collects multi-source customer data, extracts deep time-series features using an LSTM network, dynamically focuses on key factors using a multi-head attention mechanism, constructs a multi-scenario extrapolation engine through dual-channel joint representation to calculate scenario-by-scenario profitability, calculates loss probability and CVaR based on probability distribution, and quantifies the marginal impact of each factor through counterfactual analysis. This invention achieves accurate prediction of package profitability and risk quantification, solving the problems of existing methods that struggle to capture the complexity of electricity price fluctuations and load changes, insufficient fusion of multi-source features, inability to quantify profitability uncertainty, and lack of assessment of package suitability for customers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity market technology, specifically to a method and system for evaluating the revenue of electricity sales packages based on deep learning. Background Technology

[0002] With the deepening of power system reform and the gradual opening up of the electricity sales market, more than 10,000 electricity sales companies have been registered nationwide, and the market-based electricity trading volume accounts for more than 60% of the total electricity consumption of the society. Electricity sales packages are the core products connecting electricity sales companies and end customers, and the accuracy of their revenue forecasts directly affects the operating efficiency of electricity sales companies.

[0003] The main types of revenue assessments for existing electricity sales packages are as follows: The first type of method is a static evaluation method based on a simple arithmetic model. It calculates the package revenue by multiplying the fixed electricity price by the predicted electricity volume minus the electricity purchase cost using a linear formula. However, this method does not consider factors such as real-time fluctuations in electricity prices, changes in the shape of the load curve, and differences in time-of-use electricity prices. In scenarios with drastic fluctuations in electricity prices, the prediction error can reach more than 20%.

[0004] The second category of methods consists of time series forecasting methods based on traditional statistics, including the Autoregressive Integral Moving Average (ARIMA) model and exponential smoothing. These methods assume that the time series satisfies linear relationships and stationarity assumptions. However, electricity load series exhibit significant nonlinearity, nonstationarity, and multi-period characteristics. The MAPE of the ARIMA model in short-term load forecasting is typically higher than 8%, making it difficult to meet the needs of refined revenue assessment.

[0005] The third type of approach is a machine learning-based separate modeling method. Some existing technologies treat load forecasting and package revenue calculation as independent modules. They first predict the load using support vector machines (SVM) or shallow neural networks, and then substitute the prediction results into the package rules to calculate revenue. This separate architecture ignores the deep coupling between load characteristics and package rules, and cannot achieve joint optimization and evaluation of package rule parameters and customer load characteristics.

[0006] In summary, existing technologies suffer from several drawbacks: they cannot accurately capture the complex nonlinear relationship between electricity price fluctuations and load changes; they lack an effective fusion mechanism for multi-source heterogeneous characteristics; they lack quantitative assessment methods for revenue uncertainty; they lack a joint characterization mechanism for package rules and customer load characteristics; and they lack interpretable analysis methods, making it impossible to clearly define the marginal contribution of each factor to package revenue.

[0007] Therefore, there is an urgent need for a method and system for evaluating the revenue of electricity sales packages that integrates deep learning time-series modeling, multi-source feature fusion, multi-scenario extrapolation, and uncertainty quantification. Summary of the Invention

[0008] The purpose of this invention is to provide a method and system for evaluating the revenue of electricity sales packages based on deep learning, so as to solve the technical problems in the prior art, such as insufficient accuracy in evaluating the revenue of electricity sales packages, insufficient fusion of multi-source heterogeneous features, inability to quantify revenue uncertainty, and lack of assessment of the adaptability of package rules to customer characteristics.

[0009] To achieve the above objectives, this invention provides a deep learning-based method for evaluating the revenue of electricity sales packages, comprising the following steps: S1. Multi-source data acquisition and preprocessing Seven types of data are collected: historical load, time-of-use electricity price, electricity purchase cost, package pricing rules, deviation assessment clauses, meteorological and electricity consumption behavior characteristics. After cleaning, normalization and feature engineering, a preprocessed time series feature sequence is obtained. S2, LSTM timing modeling The time-series feature sequence is input into the LSTM network, and the load depth time-series feature is extracted through a gating mechanism. S3, Dynamically Weighted Attention Mechanism Based on deep temporal features, attention weights at each time step are calculated through a multi-head attention mechanism to generate a weighted context representation; S4. Combined Characterization of Package Rules and Load Characteristics Construct a dual-channel architecture that integrates time-series load characteristics and package rule parameters, and output a joint representation vector; S5. Multi-scenario simulation benefit calculation A three-dimensional scenario space is constructed, and a representative set of scenarios is generated through Monte Carlo sampling and scenario reduction. The revenue is calculated for each scenario. S6. Uncertainty Prediction and Loss Probability Estimation Construct a profit probability distribution, calculate the loss probability, VaR and CVaR, and output the confidence interval; S7. Counterfactual scenario comparison and interpretability output Construct counterfactual scenarios, calculate and rank the causal effects of each factor, and output a complete evaluation report.

[0010] Secondly, this invention proposes a deep learning-based electricity sales package revenue evaluation system, comprising the following modules: The data acquisition and preprocessing module is used to collect multi-source customer data and perform cleaning, normalization, and feature engineering. The LSTM time series network module is connected to the data acquisition and preprocessing module and is used to extract load depth time series features through a gating mechanism. The attention mechanism module, connected to the LSTM temporal network module, is used to calculate the attention weights at each time step through a multi-head attention mechanism. The joint representation module is connected to the LSTM time-series network module and the external package rule parameter interface, respectively, and is used to fuse time-series load features and package rule parameters through a dual-channel architecture to obtain a joint representation vector; The multi-scenario simulation module, connected to the joint representation module, is used to construct a three-dimensional scenario space and calculate the benefits scene by scene after Monte Carlo sampling and scenario reduction. The uncertainty prediction module, connected to the multi-scenario simulation module, is used to construct the profit probability distribution, calculate the loss probability, VaR and CVaR, and output the confidence interval. The counterfactual comparison module is connected to the multi-scenario deduction module and the uncertainty prediction module, respectively, and is used to construct counterfactual scenarios, calculate the causal effects of each factor, and output an evaluation report.

[0011] Compared with the prior art, the present invention has the following beneficial effects: 1. LSTM cell states retain long-term memory across time steps, and the attention mechanism automatically identifies the historical moment that contributes most to the current prediction through learnable weights. This invention effectively captures the long-term dependencies of power load sequences and the feature importance of key time nodes through the synergistic effect of LSTM temporal deep networks and multi-head attention mechanisms. The LSTM gating mechanism solves the gradient vanishing problem and can model load periodic patterns spanning several weeks; the multi-head attention mechanism dynamically focuses on key features from multiple subspaces, greatly reducing the prediction MAPE.

[0012] 2. The package rule parameters of this invention, such as segmented electricity price thresholds and revenue sharing ratios, have a complex coupling relationship with load characteristics such as peak-to-valley ratios and load factors. The same rule has drastically different impacts on the revenue of customers with different load patterns. The dual-channel joint representation automatically learns the interaction mode between rule parameters and load characteristics, achieving accurate matching between packages and customers. This invention achieves effective fusion of multi-source heterogeneous features through multi-source data acquisition and a dual-channel joint representation architecture. In the dual-channel architecture, the first channel uses an LSTM to process time-series load data, and the second channel uses a fully connected network to encode package rule parameters. The fusion layer achieves nonlinear interaction between the two types of features through vector concatenation and deep fully connected layers.

[0013] 3. This invention combines Monte Carlo multi-scenario simulation with CVaR risk measurement to accurately quantify the uncertainty of package revenue. Monte Carlo sampling generates a large number of possible scenarios based on the joint probability distribution of electricity price fluctuations and load demand. The scenarios are then reduced using Kantorovich distance to retain a representative set. CVaR measures the average loss under tail risk conditions, reflecting the severity of extreme losses better than VaR. Electricity package revenue is a non-linear function of electricity price, electricity volume, and rules. The statistical distribution under numerous random scenarios comprehensively reflects the characteristics of revenue uncertainty. CVaR, as a consistent risk measure, satisfies subadditivity and positive homogeneity, accurately characterizing the expected loss under the most unfavorable scenario.

[0014] 4. This invention quantifies the marginal contribution of each factor to the benefit through counterfactual scenario comparison, solving the "black box" problem of deep learning models. Controlled experimental designs that keep other conditions constant and only change a single variable can isolate the purely causal effects of each factor. The dynamic visualization of attention weights intuitively demonstrates the distribution of importance among factors, further enhancing interpretability.

[0015] 5. The joint representation model of this invention automatically learns the adaptation mode of package rules and load characteristics through dual-channel deep interaction. The fully connected network of the fusion layer learns high-order feature interactions through nonlinear activation functions, achieving accurate matching that surpasses human experience. Attached Figure Description

[0016] Figure 1 A flowchart illustrating the deep learning-based electricity sales package revenue evaluation method provided by this invention; Figure 2 A schematic diagram of the system structure of the deep learning-based electricity sales package revenue evaluation system provided by the present invention; Figure 3 This is a probability distribution diagram of the returns in an embodiment of the present invention; Figure 4 This is a comparison chart of the prediction accuracy of various models in this invention embodiment; Figure 5 This is a dynamic attention weight allocation diagram according to an embodiment of the present invention. Detailed Implementation

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

[0018] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0019] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.

[0020] Example 1 As attached Figure 1 , 2 As shown in Figure 3, a large manufacturing enterprise (hereinafter referred to as Customer A) consumes approximately 50 million kilowatt-hours of electricity annually. Its load characteristics exhibit a clear peak-on-weekday and off-peak-on-weekday pattern, with a significant increase in air conditioning load during the summer due to high temperatures. This customer intends to sign a fixed-price electricity sales package contract with an electricity sales company for the next year. The power trading center needs to conduct a comprehensive assessment of the package's profitability and risks.

[0021] A deep learning-based method for evaluating the revenue of electricity sales packages includes the following steps: Step S1: Multi-source data acquisition and preprocessing Through the smart meter interface of the power Internet of Things, historical load data of customer A for the past 12 months is collected. Time-of-use electricity price data is obtained by connecting to the provincial power trading center: 0.85 yuan / kWh during peak hours, 0.35 yuan / kWh during off-peak hours, and 0.60 yuan / kWh during normal hours, with an average purchase cost of 0.52 yuan / kWh.

[0022] Fixed-price package entry rules: Contracted electricity price 0.65 yuan / kWh, contracted electricity volume 50 million kWh; Deviation assessment clause: Deviation rate. Exemption from assessment is granted for amounts within the specified limits; amounts exceeding the limit will be charged at 0.15 yuan per kilowatt-hour.

[0023] Access the meteorological service platform to obtain temperature, humidity, and wind data.

[0024] Electricity consumption behavior characteristics: The industry attribute is manufacturing (C34), the business scale is large, the production is carried out in two shifts, and the main equipment includes CNC machine tools, air compressors and central air conditioning.

[0025] Data cleaning: Missing values ​​are filled using cubic spline interpolation, which involves taking three valid data points before and after each missing value to construct a piecewise cubic polynomial. To ensure the continuity of function values, first and second derivatives at the nodes, solve the three-moment equations to obtain the interpolation function and calculate the missing values. Using 3 The criterion is to remove 15 outliers, that is, if Then it is judged as abnormal.

[0026] Normalization: The Min-Max standardization method is used to normalize various feature data. The formula is as follows: , in, These are the original eigenvalues. and These are the minimum and maximum values ​​of the feature in the training set, respectively. The range of the normalized feature values ​​is unified to... Interval.

[0027] Feature engineering: Key variables were screened using Pearson correlation analysis, with a screening threshold of [value missing]. The features most strongly correlated with load include: hourly temperature ( ),Hour( ), Weekday / Weekend sign ( ), the load at the same time the previous day ( ).

[0028] The constructed derived features include: Daily load factor: , in, The average daily load This is the maximum daily load.

[0029] Peak-to-valley ratio: , in, The average load during peak hours This represents the average load during the valley period.

[0030] Load volatility: , in, This represents the standard deviation of daily load.

[0031] After feature engineering, the input model has 15 feature dimensions, including original features and derived features.

[0032] Step S2, LSTM timing modeling The preprocessed temporal feature sequence is input into the Long Short-Term Memory (LSTM) network. In this embodiment, the specific architecture parameters of the LSTM network are as follows: the input layer receives a 15-dimensional feature vector, and the length of the input sequence is set to 168, which is the number of hours in a week; the hidden layer is a 3-layer LSTM with 128 units per layer; the output layer is a fully connected layer with an output dimension of 24, predicting the load for the next 24 hours.

[0033] The LSTM gating mechanism at each time step The calculation process is as follows: The forget gate determines which historical information is discarded from the cell state: , The input gate determines which new information is stored in the cell state: , Candidate cell status: , Cell status update: , The output gate determines what information is output: , Hidden output: , in, For a moment The input feature vector, These are the hidden state vectors from the previous time step and the current time step, respectively. These are the cell state vectors from the previous time step and the current time step, respectively. Candidate cell state, For each gate's weight matrix, For each gate bias vector It is the Sigmoid activation function. The hyperbolic tangent activation function is used. For element-wise multiplication, This is a vector concatenation operation.

[0034] Training Strategy: Backpropagation Time Trial (BPTT) is used for gradient calculation and parameter updates. The Adam optimizer is employed, with an initial learning rate of 0.001 and a batch size of 64. Early stopping is used during training to prevent overfitting. The validation set loss is monitored; if the validation loss does not decrease after 10 consecutive epochs, training is stopped, and the optimal model parameters are restored. The training, validation, and test sets are divided in an 8:1:1 ratio.

[0035] In this embodiment, the input to the LSTM network is the temporal feature tensor formed after preprocessing in step S10. ,in 168 represents the sample size, 168 represents the time step, and 15 represents the feature dimension; the output is the load forecast for the next 24 hours. The deep temporal features extracted by the above LSTM network are the hidden state sequences of the last LSTM layer. ,in .

[0036] Step S3: Dynamic weighting of attention mechanism Deep temporal features extracted based on LSTM Attention weights at each time step are calculated using a multi-head attention mechanism. This embodiment employs an 8-head attention mechanism, with each attention head having a dimension of [missing information]. .

[0037] For a single attention head, the calculation process for attention weights is as follows: , , in, The first output of LSTM The hidden state at any given moment. The feature mean vector of the current input sequence is used as the query context reference. and The weight matrix is ​​a linear transformation matrix. For context vectors, Attention energy value Attention weights and satisfying .

[0038] The weighted context representation vector is: , Multi-head attention mechanism: Eight attention heads calculate attention weights from different feature subspaces. The size is calculated as follows: , in, For the first Linear projection of the head onto the hidden state. The outputs of each head are concatenated to obtain a multi-head attention representation: , in, To output the linear transformation matrix, This indicates a vector concatenation operation.

[0039] Dynamic Focusing Feature: The multi-head attention mechanism enables automatic focusing on different key factors at different times. For example, meteorological factors have the highest weight during the 2-4 PM period on typical summer days, with an average of 0.38, due to the surge in air conditioning load caused by high afternoon temperatures; while electricity price factors have a consistently high weight on typical winter days, with an average of 0.31, as stable heating loads in winter make electricity price fluctuations the main source of revenue uncertainty.

[0040] Step S4: Joint Characterization of Package Rules and Load Characteristics A dual-channel joint representation model is constructed to deeply integrate the load time-series features extracted by LSTM with the rule parameters of the fixed-price package.

[0041] The first channel is the timing feature channel: it receives the preprocessed timing feature sequence output from step S1. Using the 3-layer LSTM network described in step S2, with 128 units per layer, and the 8-head attention mechanism described in step S3, the temporal feature representation of the load depth is extracted. .

[0042] The second channel is the rule parameter channel: It receives the rule parameter vector for fixed-price packages, including: the normalized value of the contracted fixed electricity price. Yuan / kWh, Contracted Electricity Ten thousand kilowatt-hours, upper limit threshold for deviation assessment Deviation assessment lower limit threshold Deviation assessment fee rate Yuan / kWh. The above 5-dimensional rule parameter vector. The input is a two-layer fully connected network, with 64 neurons in the first layer and 128 neurons in the second layer activated by ReLU. The output is a feature vector representing the package rules. .

[0043] Fusion layer: Represents the load depth timing characteristics of the first channel output. Feature vector of package rules output by the second channel By concatenating the vectors, we obtain the fused vector: , The concatenated fusion vector is input into two fully connected layers for deep nonlinear interaction: ReLU activation is used, the dropout rate is set to 0.2, the first layer has 256 neurons, and the second layer has 128 neurons, outputting a joint representation vector. .

[0044] The technical principle of this dual-channel joint representation model lies in the following: load characteristics encode customer electricity consumption behavior patterns, rule characteristics encode package pricing structure characteristics, and the fusion layer automatically learns the high-order interaction patterns of the two types of features through nonlinear transformation. For example, under a fixed-price package, customers with large peak-valley ratios will significantly increase the electricity purchase cost for the electricity sales company; this complex interaction effect is effectively captured through joint representation.

[0045] Step S5: Calculate the benefits of multi-scenario simulation Based on joint characterization vector A three-dimensional scenario space is constructed to perform multi-scenario deduction and benefit calculation.

[0046] 3D scene space construction: Battery scenario: Battery range Ten thousand kilowatt-hours are divided into equal intervals. Sub-intervals; Price Scenario: Based on historical fluctuations in electricity purchase costs, this example uses a mean of 0.52 yuan / kWh and a standard deviation of 0.04 yuan / kWh, generated through Monte Carlo sampling. Group pricing scenarios, , ; Performance conditions scenario: set strict ( ),standard( ) and loose ( Three sets of deviation assessment parameters.

[0047] Scene generation and reduction: Generated through Monte Carlo sampling The initial scenarios (each containing three-dimensional variables: battery level, price, and assessment parameters) were used to reduce and filter scenarios using the Kantorovich distance method. A representative scenario. The Kantorovich distance is defined as: , in, and There are two probability distributions. The marginal distributions are respectively and The set of all joint distributions, The distance is Euclidean. Scene reduction uses a greedy algorithm to iteratively select a subset of scenes that minimizes the Kantorovich distance, until 500 representative scenes are retained, and each scene is assigned a probability weight. ,satisfy .

[0048] Scenario-by-scenario revenue calculation: For each representative scenario Calculate the profitability indicator using the following formula: Expected Revenue: , Electricity purchase cost: , Deviation assessment penalties: , profit: , Profit margin: , in, For the first Battery consumption values ​​for each scenario. For the first Electricity purchase costs for each scenario This is the threshold for deviation assessment.

[0049] Step S6: Uncertainty Prediction and Loss Probability Estimation Profit calculation results based on 500 representative scenarios and corresponding probability weights Construct the probability distribution function of returns .

[0050] The probability distribution function of returns is defined as: , in, It is a random profit variable. Figure 3 The histogram and probability density estimation curve of the payoff distribution are shown.

[0051] Calculation of the probability of loss: , Based on calculations, the probability of customer A incurring a loss on their package in this embodiment is: .

[0052] Value at Risk (VaR) calculation: , Calculated: 10,000 yuan (meaning there is a 95% probability that the profit will be no less than 651,000 yuan). Ten thousand yuan.

[0053] Conditional Value at Risk (CVaR) Calculation: , Calculated: The average profit is 601,000 yuan (meaning the average profit in the worst 5% scenario is 601,000 yuan).

[0054] 95% confidence interval output: Ten thousand yuan.

[0055] Step S7: Counterfactual scenario comparison and interpretability output Six counterfactual scenarios are constructed, keeping the actual load characteristics, electricity price characteristics, weather characteristics, and standard assessment parameters of customer A unchanged, and setting deviation thresholds. By changing only a single target variable, the causal effects of each factor can be calculated.

[0056] Baseline scenario benefits: Ten thousand yuan.

[0057] Counterfactual scenario 1 is a package type switch: the fixed-price package is counterfactually switched to a time-of-use pricing package (the peak-valley electricity price structure remains unchanged), only the package pricing rule variable is changed, and all other conditions are fixed.

[0058]

[0059] The results indicate that, for customer A's load characteristics, the fixed-price package generates 68,000 yuan more revenue than the time-of-use package.

[0060] Counterfactual Scenario 2 involves adjusting the profit-sharing ratio: The fixed-price package is counterfactually changed to a profit-sharing package, with a base electricity price of 0.55 yuan / kWh, and the profit-sharing ratio is adjusted from... Adjusted to :

[0061] Counterfactual scenario 3 involves adjusting the third tier of tiered pricing: The fixed-price counterfactual pricing is switched to a tiered pricing package, and the price for the portion of the third tier exceeding 120% of the contracted electricity volume is adjusted from RMB 0.85 / kWh to RMB 0.95 / kWh.

[0062] Counterfactual scenario 4 involves replacing the user's load characteristics: replacing customer A's load characteristics with the load curve of another company in the same region with significantly higher load volatility.

[0063] The results indicate that load volatility is one of the most important factors affecting package revenue, and high-volatility loads significantly compress profit margins under fixed-price packages.

[0064] Counterfactual scenario 5 involves improved weather forecast accuracy: Meteorological data accuracy is upgraded from ordinary weather forecasts to high-precision numerical weather forecasts, reducing the MAPE (Marginal Effect Per Expectation) of temperature forecasts from 8% to 3%, while the accuracy of load forecasts is correspondingly improved.

[0065] Counterfactual Scenario 6 – Adjustment of Deviation Assessment Threshold: Adjust the deviation assessment threshold from... Relaxed to :

[0066] Key influencing factors ranked by the absolute value of the causal effect. Sort by largest to smallest:

[0067] The assessment report output includes: expected revenue of RMB 32.5 million, electricity purchase cost of RMB 26 million, deviation assessment penalty of RMB 565,000, gross profit of RMB 850,000, profit margin of 2.62%, probability of loss of 12.3%, VaR of 5% of RMB 651,000, CVaR of 5% of RMB 601,000, and 95% confidence interval of RMB [613,000, 1,075,000].

[0068] Example 2 This embodiment simulates the revenue of a commercial complex's time-sharing pricing package, highlighting the technical effects of model accuracy comparison, multi-scenario extrapolation results, counterfactual analysis, and dynamic allocation of attention weights.

[0069] A commercial complex (hereinafter referred to as Customer B) consumes approximately 30 million kilowatt-hours of electricity annually. Its load characteristics exhibit a clear daytime peak and nighttime off-peak pattern. Air conditioning load accounts for over 40% in summer, while heating load remains relatively stable in winter. Increased customer traffic on weekends leads to a load increase of approximately 15% compared to weekdays. Customer B intends to sign a time-of-use electricity sales package contract with an electricity sales company for the next year. The electricity sales company needs to conduct a comprehensive assessment of the revenue and risks of this package.

[0070] A deep learning-based method for evaluating the revenue of electricity sales packages includes the following steps: Step S1: Multi-source data acquisition and preprocessing: Historical load data for customer B over the past 12 months was collected via a power IoT interface. Time-of-use electricity price data was obtained by connecting to the power trading center: 0.92 yuan / kWh during peak hours, 0.65 yuan / kWh during normal hours, and 0.30 yuan / kWh during off-peak hours, as well as the average purchase cost of 0.48 yuan / kWh.

[0071] Enter the time-of-use pricing package rules: Peak hour contract price 0.78 yuan / kWh, normal hour 0.58 yuan / kWh, off-peak hour 0.28 yuan / kWh, contracted electricity volume 30 million kWh, deviation assessment threshold. .

[0072] Electricity consumption behavior characteristics were collected from a commercial complex with a building area of ​​120,000 square meters. Major equipment included central air conditioning, lighting, elevators, and cold chain equipment. Data cleaning, normalization, and feature engineering were performed as in Example 1, with 15 input feature dimensions.

[0073] Step S2: Comparison of LSTM time series modeling and model accuracy The preprocessed time series feature sequence of customer B was input into the following 8 models to conduct a load forecasting accuracy comparison experiment: (1) ARIMA ); (2) SVM (RBF core, ); (3) LSTM (3 layers, 128 units per layer); (4) CNN-LSTM (1-layer CNN + 2-layer LSTM); (5) GRU-Att (3-layer GRU + single-head attention); (6) VMD-CLSTM (Variational Mode Decomposition + CNN-LSTM); (7) TFT (Temporal Fusion Transformer); (8) The present invention uses a 3-layer LSTM, an 8-head attention and dual-channel joint characterization.

[0074] A comparison of the prediction accuracy of each model on the same training, validation, and test sets is shown in the appendix. Figure 4 As shown in Table 1: Table 1

[0075] The above results verify the technical advantages of the present invention in co-modeling LSTM temporal networks and multi-head attention mechanisms.

[0076] Step S3: Dynamic weighted analysis of attention mechanism: Attention weighting analysis on a typical summer day: Figure 5 The chart shows the changes in attention weights for meteorological factors, electricity price factors, and load characteristics for each hour of the day. During the period from 2 PM to 4 PM, the attention weights for meteorological factors reached their highest values ​​of 0.42, 0.45, and 0.39, respectively, due to the outdoor temperature reaching 38 degrees Celsius during this period. During peak C hours, the central air conditioning system operates at full load, and the model automatically increases the weight of meteorological factors. The weight of electricity price factors is relatively high during peak hours (9-12, 14-17, and 19-22), ranging from 0.25 to 0.32, because the price difference of time-of-use packages during peak hours has the most sensitive impact on revenue.

[0077] Attention weighting analysis on typical days in winter: Figure 5 The attention weighting of electricity price factors on a typical winter day remains consistently high, averaging 0.31. This is because heating load is relatively stable in winter, the impact of meteorological factors is reduced, and electricity price fluctuations become the main source of revenue uncertainty. Load characteristics have higher weightings during morning and evening peak hours (8-10 am and 6-9 pm), ranging from 0.28 to 0.35, reflecting the impact of changes in customer flow on the load of commercial complexes during business hours.

[0078] Step S4: Joint characterization of package rules and load characteristics: Dual-channel joint representation model configuration: The first channel processes the 15-dimensional temporal feature sequence through a 3-layer 128-unit LSTM and an 8-head attention mechanism, outputting... The second channel will include the following time-of-use pricing package parameters: peak / stable / valley electricity prices, contracted electricity volume of 30 million kWh, and deviation assessment. Encoded via a 2-layer fully connected network as After the fusion layer is stitched together, it is output through two fully connected layers. .

[0079] Step S5: Calculate the benefits of multi-scenario simulation: Constructing a three-dimensional scenario space: Battery range Tens of thousands of kilowatt-hours are divided into 100 sub-intervals; Based on historical fluctuations in electricity purchase costs, 10,000 price scenarios were generated using Monte Carlo sampling. Three sets of deviation assessment parameter scenarios were set. After scenario reduction using Kantorovich distance, 500 representative scenarios were retained and assigned probability weights.

[0080] Scenario-by-scenario revenue calculation: For time-sharing pricing packages, the first... The formula for calculating the expected revenue for each scenario is as follows: , in, For the first Contracted electricity price for the specified time period For the first The first scene Electricity consumption during a given time period.

[0081] Electricity purchase cost: , Deviation assessment penalties, profits, and profit margins are calculated using the same formulas as in Example 1.

[0082] Step S6, Uncertainty Prediction Results: Based on the scenario-by-scenario profit calculation results of 500 representative scenarios, a profit probability distribution is constructed. Figure 3 The histogram and probability density estimation curve of the payoff distribution are shown.

[0083] Based on calculations, the expected revenue for Customer B's time-sharing pricing package is as follows: 10,000 yuan, probability of loss The VaR 5% is RMB 467,000, the VaR 95% is RMB 779,000, the CVaR 5% is RMB 423,000, and the 95% confidence interval is [RMB 448,000, 806,000].

[0084] Compared to the fixed-price package in Example 1, Customer B's time-sharing package has a lower expected return but also a lower probability of loss, with a relatively higher CVaR of 5%, reflecting the risk-return differences between different package types and customer load characteristics.

[0085] Step S7: Counterfactual scenario comparison: Based on baseline scenario benefits Using 10,000 yuan as a reference, six counterfactual scenarios were constructed:

[0086] The counterfactual analysis above shows that user load characteristics, especially the peak-to-valley ratio, are the most critical factors affecting the revenue of time-of-use pricing packages, followed by peak-hour electricity price adjustments and deviation assessment threshold adjustments.

[0087] Through comprehensive verification, this invention achieves the best MAPE among eight comparative models, with a 25.6% improvement over TFT; it provides a complete profit probability distribution, loss probability, and VaR / CVaR risk measurement; counterfactual analysis and dynamic allocation of attention weights enhance the model's interpretability.

[0088] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0089] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0090] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0091] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0092] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0093] Although preferred embodiments of the invention have been described, those skilled in the art, once they have learned the basic inventive concept, can make other changes and modifications to these embodiments.

[0094] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of this invention and its equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for evaluating the revenue of electricity sales packages based on deep learning, characterized in that, Includes the following steps: S1. Collect multi-source customer data and customer electricity consumption behavior characteristics, clean and normalize the collected multi-source data, and construct derived features through feature engineering to obtain the preprocessed time series feature sequence. S2. Input the time-series feature sequence into a long short-term memory network, and extract the customer load depth time-series features through the forget gate, input gate, output gate and cell state gating mechanism; S3. Based on the aforementioned deep temporal features, the attention weights at each time step are calculated using a multi-head attention mechanism to generate a weighted context representation vector, thereby enabling automatic focus on different key factors at different times. S4. The time-series load features are processed by the LSTM, the package rule parameters are encoded by the fully connected network, and the outputs of the LSTM and the fully connected network are concatenated in the fusion layer and then deeply mined by the fully connected layer to obtain the joint representation vector of the package rules and load features. S5. Construct a three-dimensional scenario space consisting of electricity range, price scenario and performance conditions. Generate multiple initial scenarios through Monte Carlo sampling. After scenario reduction and selection, a representative scenario set is selected. Assign probability weights to each scenario and calculate expected revenue, electricity purchase cost, deviation assessment penalty and profit for each scenario. S6. Based on the scenario-by-scenario profit calculation results, construct the profit probability distribution function, calculate the loss probability, value at risk and conditional value at risk, and output the confidence interval. S7. Construct a counterfactual scenario, calculate the causal effect of each factor on the benefit and rank them according to their marginal impact, and output an evaluation report.

2. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The multi-source data includes historical load data, time-of-use electricity price data, electricity purchase cost data, package pricing rules, deviation assessment clauses, and meteorological data. The multi-source data acquisition and preprocessing specifically includes: Access the power trading center to obtain time-of-use electricity pricing and electricity purchase cost data; Enter the package pricing rules and deviation assessment clauses, wherein the package pricing rules include fixed price packages, time-of-use price packages, tiered price packages and price difference sharing packages; Access the meteorological service platform to obtain temperature, humidity, and wind speed meteorological data; Collect data on customer industry attributes, business scale, and electricity consumption behavior characteristics; The data cleaning process uses cubic spline interpolation to fill in missing values, uses statistical methods to identify and remove outliers, and uses Min-Max standardization to perform normalization. The feature engineering includes screening key variables through correlation analysis and constructing derived features, including daily load factor, peak-to-valley ratio, and load fluctuation rate.

3. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The specific steps of LSTM timing modeling in step S2 are as follows: The Long Short-Term Memory network includes an input layer, two to three hidden layers, and an output layer. Each hidden layer contains 64 to 256 LSTM units, and the output layer is connected to a fully connected layer. The gating mechanism algorithm is expressed as follows: , , , , , , in, These are the forget gate, input gate, and output gate, respectively. In cellular state, In hidden state, For the Sigmoid function, For element-wise multiplication, This is the weight matrix. It is the bias vector; The training process employs the BPTT algorithm and the Adam optimizer, and early stopping is used to prevent overfitting.

4. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The dynamic weighting of the attention mechanism in step S3 includes the following steps: The formula for calculating attention weights is: , , , in, Attention energy value For context vectors, , This is the weight matrix. For attention weights, For weighted context representation vectors, The sequence length; The multi-head attention mechanism includes multiple attention heads, each of which independently calculates attention weights from different subspaces and focuses on different dimensions of time-series features, electricity price features, meteorological features, and load features. The outputs of each head are spliced ​​or weighted averaged to obtain the final multi-head attention representation. The dynamic focusing adaptively adjusts the weights of each factor based on the season and electricity price fluctuations, increasing the weight of meteorological factors in summer and increasing the weight of electricity price factors during periods of electricity price fluctuations.

5. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The joint characterization in step S4 includes the following steps: A dual-channel architecture is constructed, with the first channel extracting the temporal feature representation of load depth using the LSTM; The second channel receives the package rule parameters and encodes them into rule feature vectors through a 2-3 layer fully connected network. The package rule parameters include key parameters such as fixed price, time-of-use price, tiered price, and price difference sharing of the package. The fusion layer concatenates the outputs of the two channels and inputs them into two fully connected layers for deep nonlinear interaction, outputting a joint representation vector.

6. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The multi-scenario simulation benefit calculation in step S5 includes the following steps: The method for constructing the three-dimensional scenario space is as follows: [The method involves] dividing the power range... Divide into equal intervals Sub-intervals; Generated by Monte Carlo sampling based on historical electricity price fluctuation characteristics. Group pricing scenarios; Different deviation assessment thresholds are set to create performance condition scenarios; The scene reduction method utilizes the Kantorovich distance to filter from the initial scene set sampled in Monte Carlo. A representative scenario is assigned a probability weight to each scenario. ,satisfy ; The formula for calculating revenue per scenario is: , , , , , in, For the first Expected revenue for each scenario This is a function for the pricing rules of the package. For electricity purchase costs, For deviation assessment penalties, For the penalty function, For deviation assessment parameters, For profit, Profit margin.

7. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 6, characterized in that, The uncertainty prediction in step S6 specifically includes: Construct a profit probability distribution function based on the scenario-by-scenario profit calculation results. ,in , It is a random profit variable; The formula for calculating the probability of loss is: , in, Let be the probability density function of the returns; Value at Risk Defined as the payoff distribution Quantiles: , The formula for calculating conditional value at risk is: , Output the 95% confidence interval for the return assessment .

8. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The counterfactual scenario comparison in step S7 specifically includes: When constructing counterfactual scenarios, all other conditions in the fixed load characteristics, electricity price characteristics, meteorological characteristics, and deviation assessment parameters remain unchanged. Only a single objective variable is changed to generate a counterfactual benchmark dataset. The formula for calculating causal effect is: , in, For the first The causal effect value of each factor To only change the first Counterfactual gains after considering factors The baseline scenario return; According to the absolute value of the causal effect value Sort the key influencing factors from largest to smallest to obtain the ranking of their marginal impact.

9. The method for evaluating the revenue of electricity sales packages based on deep learning according to claim 1, characterized in that, The evaluation report output in step S7 includes: expected revenue, electricity purchase cost, gross profit, profit margin, probability of loss, value at risk (VaR), conditional value at risk (CVaR), 95% confidence interval for returns, ranking of the marginal effects of each key influencing factor, and causal effect value.

10. A deep learning-based electricity sales package revenue evaluation system, characterized in that, include: The data acquisition and preprocessing module is used to collect multi-source customer data and perform cleaning, normalization, and feature engineering. The LSTM time series network module is connected to the data acquisition and preprocessing module and is used to extract load depth time series features through a gating mechanism. The attention mechanism module, connected to the LSTM temporal network module, is used to calculate the attention weights at each time step through a multi-head attention mechanism. The joint representation module is connected to the LSTM time-series network module and the external package rule parameter interface, respectively, and is used to fuse time-series load features and package rule parameters through a dual-channel architecture to obtain a joint representation vector; The multi-scenario simulation module, connected to the joint representation module, is used to construct a three-dimensional scenario space and calculate the benefits scene by scene after Monte Carlo sampling and scenario reduction. The uncertainty prediction module, connected to the multi-scenario simulation module, is used to construct the profit probability distribution, calculate the loss probability, VaR and CVaR, and output the confidence interval. The counterfactual comparison module is connected to the multi-scenario deduction module and the uncertainty prediction module, respectively, and is used to construct counterfactual scenarios, calculate the causal effects of each factor, and output an evaluation report.