A method for predicting electricity consumption
By separating date-based electricity consumption data, extracting load fluctuations and weather-load coupling characteristics at temperature mutation points, and combining multi-scale time series and cross-modal fusion technology, a power consumption forecasting model is constructed. This solves the problems of insufficient model adaptability and inability to correct prediction errors in existing technologies, and achieves high-precision power consumption forecasting.
Patent Information
- Application Number
- CN202510969077.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-15
AI Technical Summary
Existing electricity consumption forecasting technology fails to fully consider the coupled impact of multi-dimensional factors such as weather changes and date types, resulting in insufficient adaptability of the forecasting model to complex electricity consumption scenarios, difficulty in accurately capturing load fluctuation patterns, and a lack of dynamic feedback optimization mechanism, making it impossible to correct forecast errors in a timely manner.
By separating historical electricity consumption data according to date type to generate regular data sets and holiday data sets, the load fluctuation rate at the temperature mutation point is extracted and a weather-load coupling feature set is generated. By combining multi-scale time series feature subsequences and cross-modal fusion technology, a targeted prediction model is constructed, and feedback is provided to the optimization model when the prediction error exceeds the limit.
The model's adaptability and prediction accuracy to complex electricity consumption scenarios have been improved, forming a dynamic iteration mechanism to ensure that the prediction results are closer to actual electricity consumption, providing a reliable basis for power system scheduling and energy management decision-making.
Smart Images

Figure CN120471237B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data inference technology, and in particular to a method for predicting electricity consumption. Background Art
[0002] In the operation and management of power systems, existing electricity consumption forecasting technologies are mostly based on statistical analysis of historical electricity consumption data or single-factor modeling. Since they do not fully consider the coupled effects of multi-dimensional factors such as weather changes and date types on electricity load, the forecasting model is not adaptable enough to complex electricity consumption scenarios and it is difficult to accurately capture the load fluctuation patterns, which in turn causes a large deviation between the forecast results and actual electricity consumption.
[0003] At the same time, traditional prediction methods lack a dynamic feedback optimization mechanism for prediction errors. When encountering special scenarios such as sudden temperature changes and holidays, it is impossible to promptly incorporate deviation data into the model training process to optimize the prediction logic. As a result, when the model faces nonlinear and non-stationary electricity consumption data, the prediction accuracy is difficult to meet the actual needs of smart grid scheduling and energy management. Summary of the Invention
[0004] The present invention provides a method for predicting power consumption, the main purpose of which is to solve the problem of low efficiency in power consumption prediction.
[0005] To achieve the above objectives, the present invention provides a method for predicting power consumption, comprising:
[0006] S1: Separate historical electricity consumption data according to date type to generate regular data sets and holiday data sets;
[0007] S2: extracting the load fluctuation rate of the historical electricity consumption data according to the temperature mutation point, and generating a weather-load coupling feature set of the historical electricity consumption data according to the temperature mutation point and the load fluctuation rate;
[0008] S3: extracting a multi-scale time series feature subsequence of the conventional data set, and adding the normalized multi-scale time series feature subsequence element by element to obtain a conventional prediction model for electricity consumption;
[0009] S4: performing cross-modal fusion on the date features of the holiday dataset and the load features of the electricity consumption based on the date key-value pairs to obtain a holiday prediction model for the electricity consumption;
[0010] S5: Select a forecast model based on the target date type and output the electricity consumption forecast value of the target area in combination with the weather-load coupling feature set;
[0011] S6: When the deviation between the predicted value and the actual power consumption of the target area exceeds the limit, the power consumption data with the exceeded deviation value is fed back to the historical power consumption data in S1, and the prediction model is optimized to obtain the final power consumption prediction value of the target area.
[0012] In a preferred embodiment, separating the historical electricity consumption data according to date type to generate a regular data set and a holiday data set includes:
[0013] Extract date type labels from historical electricity consumption data;
[0014] When the date type tag belongs to a statutory holiday, the corresponding load data in the historical electricity consumption data is allocated to a holiday data set;
[0015] When the date type tag belongs to a working day, the corresponding load data in the historical power consumption data is allocated to a regular data set;
[0016] Check whether the separated historical electricity usage data covers a historical period.
[0017] In a preferred embodiment, extracting the load fluctuation rate of the historical power consumption data according to the temperature mutation point includes:
[0018] The period where the temperature difference between adjacent periods is greater than the preset safety value is regarded as the temperature mutation point;
[0019] Extracting a load slice for the period near the temperature mutation point;
[0020] The fluctuation rates of the load slices are aggregated into the load fluctuation rate of the historical power consumption data.
[0021] In a preferred embodiment, generating the weather-load coupling feature set of the historical electricity consumption data based on the temperature mutation point and the load fluctuation rate includes:
[0022] Combining the position of the temperature mutation point, the load fluctuation rate, and the temperature difference between adjacent time periods into a triplet of the historical electricity consumption data;
[0023] The triples are aggregated into a weather-load coupling feature set of the historical electricity consumption data.
[0024] In a preferred embodiment, extracting a multi-scale time series feature subsequence of the conventional data set and adding the normalized multi-scale time series feature subsequence element by element to obtain a conventional prediction model for electricity consumption includes:
[0025] extracting a primary feature sequence of the conventional data set;
[0026] Capturing the load cycle law of the expanded primary feature sequence, and constructing a multi-scale time series feature map of the conventional data set according to the load cycle law;
[0027] The multi-scale time series feature graph is divided into subsequences of equal length, and the subsequences are added element by element to the corresponding original data in the conventional data set to obtain a conventional prediction model for electricity consumption.
[0028] In a preferred embodiment, cross-modal fusion of the date features of the holiday dataset and the load features of the electricity consumption based on date key-value pairs to obtain the holiday electricity consumption prediction model includes:
[0029] Mapping the date type label to a feature vector, and generating a date key-value pair of the date type according to the feature vector;
[0030] Normalizing the similarity between the date key vector in the date key-value pair and the corresponding load fluctuation feature in the holiday dataset to obtain a time step attention weight vector of the holiday dataset;
[0031] Concatenating the time step attention weight vector with the date value vector in the date key-value pair to obtain a date-aware feature vector of the electricity consumption;
[0032] The initial load forecasting model of the power consumption is updated based on the date-aware feature vector to obtain the holiday forecasting model of the power consumption.
[0033] In a preferred embodiment, the method of selecting a prediction model according to the target date type and outputting a power consumption prediction value for the target area in combination with a weather-load coupling feature set includes:
[0034] When the target date type is a weekday, the triplet is concatenated with the date and encoded as a weekday feature vector of the power consumption;
[0035] Inputting the working day feature vector into the conventional prediction model to obtain the optimized feature block of the power consumption;
[0036] The optimized feature block is mapped to a power consumption prediction value of a target area.
[0037] In a preferred embodiment, the method of selecting a prediction model according to the target date type and outputting a power consumption prediction value for the target area in combination with a weather-load coupling feature set includes:
[0038] When the target date type is a holiday, extracting the synergistic features of the load fluctuation rate and date features in the weather-load coupling feature set;
[0039] The collaborative feature is input into the holiday prediction model, the output gate of the holiday prediction model is updated, and the power consumption prediction value of the target area is obtained.
[0040] In a preferred embodiment, the collaborative feature is input into the holiday prediction model, the output gate of the holiday prediction model is updated, and the power consumption prediction value of the target area is obtained, wherein the calculation formula of the power consumption prediction value is as follows:
[0041] ;
[0042] Where, is the predicted value of power consumption, is the coding carrier of the date-weather feature in the weather-load coupling feature set, To map the code carrier to a load scalar, is the deviation compensation coefficient under different holiday conditions.
[0043] In a preferred embodiment, when the deviation between the predicted value and the actual power consumption of the target area exceeds a limit, the power consumption data with the exceeded deviation value is fed back to the historical power consumption data in S1, and the prediction model is optimized to obtain the final power consumption prediction value of the target area, including:
[0044] Obtaining a deviation value between the predicted value and the actual power consumption of the target area;
[0045] When the deviation value exceeds the limit, the excess power consumption data is fed back to the historical power consumption data in S1;
[0046] updating the prediction model based on the excessive electricity consumption data;
[0047] A secondary prediction is performed on the power consumption of the target area based on the updated prediction model. When the secondary predicted power consumption does not exceed the limit, the secondary predicted power consumption is output as the final power consumption prediction value of the target area.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The electricity consumption forecasting method provided by this invention separates historical electricity consumption data by date type to generate regular and holiday datasets, constructs different targeted forecasting models, and combines weather-load coupling feature sets generated by temperature mutation points and load fluctuations with multi-scale time series feature subsequence fusion and cross-modal fusion technologies to more accurately capture the correlation between electricity load and weather factors on different date types, improving the model's adaptability to complex electricity consumption scenarios.
[0050] 2. When the deviation between the predicted value and actual electricity consumption exceeds the limit, the deviation data is fed back to the historical data and the prediction model is optimized to form a dynamic iterative mechanism to further correct the prediction error, ultimately achieving high-precision prediction of electricity consumption and providing a more reliable decision-making basis for power system scheduling and energy management. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a flow chart of a method for predicting power consumption provided by one embodiment of the present invention;
[0052] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0054] An embodiment of the present application provides a method for predicting electricity consumption. The execution subject of the electricity consumption prediction method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the electricity consumption prediction method can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0055] Reference Figure 1 FIG. 1 is a flow chart of a method for predicting power consumption according to an embodiment of the present invention. In this embodiment, the method for predicting power consumption includes:
[0056] S1: Separate historical electricity consumption data according to date type to generate regular data sets and holiday data sets;
[0057] In an embodiment of the present invention, separating the historical electricity consumption data according to date type to generate a regular data set and a holiday data set includes:
[0058] Extract date type labels from historical electricity consumption data;
[0059] When the date type tag belongs to a statutory holiday, the corresponding load data in the historical electricity consumption data is allocated to a holiday data set;
[0060] When the date type tag belongs to a working day, the corresponding load data in the historical power consumption data is allocated to a regular data set;
[0061] Check whether the separated historical electricity usage data covers a historical period.
[0062] Specifically, the date information in the historical electricity consumption data is identified and classified, and converted into a date type label.
[0063] Furthermore, the specific operation is to check each date in the historical electricity consumption data one by one and compare it with the pre-set date type determination rules. These rules clearly define which dates are statutory holidays and which dates are working days, thereby determining the date type label corresponding to each date.
[0064] Furthermore, when it is determined that the date type tag belongs to a statutory holiday, the load data corresponding to the statutory holiday date is found in the historical electricity consumption data, and these load data are completely selected and included in the holiday data set, thereby completing the classified storage of the load data corresponding to the statutory holidays.
[0065] Furthermore, when it is determined that the date type tag belongs to a working day, the load data corresponding to the working day date is also found in the historical electricity consumption data, these load data are selected and uniformly allocated to the regular data set to achieve classified storage of the load data corresponding to the working day.
[0066] The separated historical electricity consumption data is then checked to see if it covers the required historical period. This is done by examining the date ranges in the holiday and regular data sets and comparing them against the set historical period to see if there are any missing date intervals.
[0067] Furthermore, if the electricity consumption data corresponding to all dates within the historical period have been accurately allocated to the corresponding data sets, it is considered that the separated historical electricity consumption data successfully covers the historical period; otherwise, it means that there is a uncovered situation.
[0068] In general, there are significant differences in electricity consumption patterns between weekdays and holidays. By separating the data, we can model the electricity consumption characteristics of regular scenarios and holiday scenarios respectively.
[0069] For example, the electricity load on weekdays usually shows a stable cyclical pattern, while holidays may cause the electricity load to show unique changing trends due to changes in people's activity patterns (such as travel, rest, etc.).
[0070] In general, processing the two types of data separately can enable the model to more accurately learn and capture the electricity consumption patterns under different date types, avoid mixing data from different scenarios that may cause the model to learn incorrect features, and thus improve the accuracy of the prediction.
[0071] In general, different date types correspond to different data features. The regular data sets and holiday data sets generated after separation can be used to build targeted prediction models respectively.
[0072] In general, conventional prediction models focus on learning electricity consumption patterns on weekdays, while holiday prediction models focus on analyzing electricity consumption characteristics unique to holidays, such as the correlation between date characteristics and load characteristics.
[0073] In general, this targeted modeling approach enables the model to better adapt to electricity consumption scenarios of different date types. When facing a target date, the appropriate model can be selected for prediction based on its type, reducing the prediction error caused by the model's inability to adapt to scenario differences, thereby improving the accuracy of the prediction results.
[0074] S2: extracting the load fluctuation rate of the historical electricity consumption data according to the temperature mutation point, and generating a weather-load coupling feature set of the historical electricity consumption data according to the temperature mutation point and the load fluctuation rate;
[0075] In an embodiment of the present invention, extracting the load fluctuation rate of the historical power consumption data according to the temperature mutation point includes:
[0076] The period where the temperature difference between adjacent periods is greater than the preset safety value is regarded as the temperature mutation point;
[0077] Extracting a load slice for the period near the temperature mutation point;
[0078] The fluctuation rates of the load slices are aggregated into the load fluctuation rate of the historical power consumption data.
[0079] Generating the weather-load coupling feature set of the historical electricity consumption data according to the temperature mutation point and the load fluctuation rate includes:
[0080] Combining the position of the temperature mutation point, the load fluctuation rate, and the temperature difference between adjacent time periods into a triplet of the historical electricity consumption data;
[0081] The triples are aggregated into a weather-load coupling feature set of the historical electricity consumption data.
[0082] Specifically, the temperature data of all time periods are processed in sequence, and the temperature of each time period is compared with the temperature of adjacent time periods.
[0083] Furthermore, by calculating the temperature difference between two adjacent time periods and comparing it with a pre-set fixed safety value, if the temperature difference between two adjacent time periods is found to be greater than the preset safety value, the time period is identified as a temperature mutation point, thereby finding all temperature mutation points that meet the conditions.
[0084] Furthermore, after the temperature mutation point is determined, a specific range of time periods around each temperature mutation point is selected.
[0085] Furthermore, this specific range is specified in advance. Within these selected time periods, the corresponding load data are extracted and arranged in chronological order to form a data segment. This data segment is the load slice, thereby obtaining the load slice of the time period near each temperature mutation point.
[0086] Furthermore, all acquired load slices are analyzed, and for each load slice, the changes in the load data within the entire slice period are observed.
[0087] Furthermore, the fluctuation rate of the load slice is measured by calculating the change in load data from the beginning to the end of the slice. The fluctuation rates of all load slices are collected and summarized in a certain order to form the load fluctuation rate of historical electricity consumption data.
[0088] Specifically, the temperature data of all time periods are processed one by one, and the temperature of each time period is compared with the temperature of its adjacent time periods.
[0089] Furthermore, by calculating the temperature difference between two adjacent time periods and comparing this difference with a pre-set fixed value (preset safety value), when the temperature difference between adjacent time periods is greater than the fixed value, this time period is determined as a temperature mutation point, and the specific position of the temperature mutation point in the entire temperature data sequence is recorded.
[0090] Furthermore, after obtaining the location of the temperature mutation point, the load slice of the time period near the temperature mutation point is found, and the changes in the load data in the load slice during the period are analyzed. By observing the change amplitude of the load data from the beginning to the end of the slice, the volatility of the load slice is measured, and the load volatility corresponding to each temperature mutation point is obtained.
[0091] Furthermore, the position of each temperature mutation point, the corresponding load fluctuation rate, and the temperature difference between adjacent time periods where the temperature mutation point is located are combined together in a fixed order to form a combination of three elements. This combination is the triplet of historical electricity consumption data.
[0092] Furthermore, all the generated triplets are collected, summarized and integrated in a certain way, and these triplets are aggregated together to form a set. This set is the weather-load coupling feature set of historical electricity consumption data, which is used to reflect the correlation characteristics between weather factors (temperature changes) and electricity load.
[0093] Generally speaking, temperature fluctuations are often accompanied by a sudden change in the electricity load of equipment such as air conditioners and heaters. By extracting load slices and fluctuations near the temperature fluctuation points, we can quantify the immediate impact of weather factors (such as sudden temperature rises or drops) on electricity load.
[0094] For example, when high temperatures suddenly change in the summer, a surge in air-conditioning load will cause a significant increase in load fluctuation. This feature can directly reflect the causal relationship between weather changes and electricity consumption behavior, avoiding the defects of traditional methods that only use static indicators such as average temperature and ignore instantaneous fluctuations, allowing the model to more accurately capture the dynamic correlation between weather and load.
[0095] In general, the temperature mutation point location, load fluctuation rate and adjacent temperature difference are combined into a triplet and then aggregated into a coupled feature set to form a multidimensional feature including "weather mutation moment-load fluctuation amplitude-temperature change intensity".
[0096] In general, this type of feature can not only reflect the time nodes of temperature changes, but also quantify the degree of load response through fluctuation rate.
[0097] For example, when the temperature difference at a certain mutation point is 5°C, the load fluctuation rate reaches 15%. This triplet can be directly used as model input, allowing the model to learn the "specific amplitude of load fluctuation under a specific temperature difference" rather than relying solely on a single temperature or load data.
[0098] In general, compared with the traditional method of independently processing weather and load data, the coupling feature can more comprehensively characterize the nonlinear relationship between the two and improve the prediction accuracy of the model in extreme weather or abnormal temperature change scenarios.
[0099] In general, during the forecasting stage, the weather-load coupling feature set can be combined with the forecasting model (such as inputting a regular model or a holiday model) to directly participate in the calculation of the load forecast value.
[0100] For example, when there is a sudden temperature change on the target date, the model can dynamically adjust the forecast results based on the historical volatility patterns in the coupled features to avoid forecast bias caused by ignoring sudden weather changes.
[0101] In general, if the deviation between the predicted value and the actual value exceeds the limit, the feature set can also be used as feedback data to optimize the model, enabling the model to continuously learn new weather-load correlation patterns, further enhancing the predictive adaptability to complex weather scenarios, and forming a closed-loop mechanism of "feature extraction-model optimization-accurate prediction".
[0102] S3: extracting a multi-scale time series feature subsequence of the conventional data set, and adding the normalized multi-scale time series feature subsequence element by element to obtain a conventional prediction model for electricity consumption;
[0103] In an embodiment of the present invention, extracting a multi-scale time series feature subsequence of the conventional data set, and adding the normalized multi-scale time series feature subsequence element by element to obtain a conventional prediction model for power consumption includes:
[0104] extracting a primary feature sequence of the conventional data set;
[0105] Capturing the load cycle law of the expanded primary feature sequence, and constructing a multi-scale time series feature map of the conventional data set according to the load cycle law;
[0106] The multi-scale time series feature graph is divided into subsequences of equal length, and the subsequences are added element by element to the corresponding original data in the conventional data set to obtain a conventional prediction model for electricity consumption.
[0107] Specifically, in a conventional data set, the data is arranged in chronological order, and data information that can reflect the characteristics of the power load is selected to form an ordered data sequence. This sequence is the primary feature sequence, completing the operation of extracting the primary feature sequence from the conventional data set.
[0108] Furthermore, the primary feature sequence is expanded, that is, the number of data points in the sequence is increased in a certain way, and then the expanded primary feature sequence is observed and analyzed.
[0109] Furthermore, during the analysis process, we look for the periodic variation pattern of load data in different time spans, that is, the load cycle law.
[0110] Furthermore, based on the load cycle patterns of different time spans found, the load data change characteristics at different scales are displayed in a graphical manner to construct a multi-scale time series feature diagram of the conventional data set.
[0111] Furthermore, the constructed multi-scale time series feature graph is divided into multiple data subsequences of equal length according to a fixed length standard.
[0112] Furthermore, for each subsequence, the original electricity consumption data corresponding to the time range is found in the regular data set, and each data element in the subsequence is added to the data element at the corresponding position in the original data. All the added results are integrated to form a new model structure. This model structure is the regular prediction model for electricity consumption, which is used to predict future electricity consumption.
[0113] In general, by extracting the primary feature sequences of conventional data sets and constructing multi-scale time series feature graphs, it is possible to analyze the periodicity and trend of electricity load from multiple time dimensions (such as hours, days, weeks, etc.).
[0114] For example, the primary feature sequence can capture intraday load fluctuations (such as morning peak and evening peak), and the feature map after expansion processing can further reveal weekly cycle patterns (such as repetitive power consumption patterns on weekdays).
[0115] In general, adding subsequences of different scales element by element allows the model to learn both short-term fluctuation characteristics and long-term trend characteristics, avoiding information omissions caused by single-scale modeling (such as only focusing on intraday fluctuations and ignoring cyclical patterns), thereby more comprehensively characterizing the dynamics of electricity load in conventional scenarios and improving the prediction model's ability to fit complex time series patterns.
[0116] In general, normalizing the multi-scale time series feature subsequences can eliminate the dimensional differences of different feature dimensions and enable features of each scale to participate in model calculations at the same dimension.
[0117] For example, if one subsequence represents the “daily load mean” and another subsequence represents the “hourly load fluctuation”, the two can be fused at the same scale after normalization, avoiding the large-scale features dominating the model weights and masking the key information of the small-scale features.
[0118] In general, this processing method can ensure that the contribution of features at each scale to the prediction results is balanced, improve the model's sensitivity to subtle load changes, and reduce prediction bias caused by differences in feature scales.
[0119] In general, the essence of adding the normalized multi-scale subsequences element by element is to achieve information complementarity through feature fusion.
[0120] For example, a subsequence may capture the upward trend in load during the third week of the working day, while another subsequence may capture the peak load at 6 p.m. on the same day. Adding these together can generate a composite feature that includes both the trend and the instantaneous peak.
[0121] In general, this fusion method enables the model to learn the statistical laws in historical data (such as long-term trends) while retaining the detailed characteristics of short-term fluctuations, avoiding the prediction distortion caused by one-sided information of single-scale features.
[0122] In general, when faced with new forecasting scenarios, the model can more accurately infer load change trends based on the comprehensive representation of multi-scale features, especially when processing regular electricity consumption data containing seasonal, cyclical and sudden fluctuations, which can significantly improve the stability and accuracy of the forecast results.
[0123] S4: performing cross-modal fusion on the date features of the holiday dataset and the load features of the electricity consumption based on the date key-value pairs to obtain a holiday prediction model for the electricity consumption;
[0124] In an embodiment of the present invention, cross-modal fusion of the date features of the holiday dataset and the load features of the power consumption based on date key-value pairs to obtain the holiday power consumption prediction model includes:
[0125] Mapping the date type label to a feature vector, and generating a date key-value pair of the date type according to the feature vector;
[0126] Normalizing the similarity between the date key vector in the date key-value pair and the corresponding load fluctuation feature in the holiday dataset to obtain a time step attention weight vector of the holiday dataset;
[0127] Concatenating the time step attention weight vector with the date value vector in the date key-value pair to obtain a date-aware feature vector of the electricity consumption;
[0128] The initial load forecasting model of the power consumption is updated based on the date-aware feature vector to obtain the holiday forecasting model of the power consumption.
[0129] Specifically, a fixed mapping rule is established to convert each date type label, whether it is a statutory holiday label or a working day label, into a set of feature vectors with specific dimensions and values according to the rule.
[0130] Furthermore, after obtaining the feature vector, the date type is combined with the corresponding feature vector to form a date key-value pair including the date type information and the corresponding feature vector, thereby completing the conversion from the date type label to the date key-value pair.
[0131] Furthermore, for the date key vector in the date key-value pair, the load fluctuation characteristics corresponding to each date are found in the holiday dataset.
[0132] Furthermore, for each date, the date key vector is compared with the load fluctuation characteristics corresponding to the date in the holiday dataset to determine the similarity between them.
[0133] Furthermore, a fixed normalization method is used to adjust the similarity values of all dates to a unified numerical range, so that these values can reflect the relative importance of different dates in the whole. Finally, a set of values is obtained, which constitutes the time step attention weight vector of the holiday dataset.
[0134] Furthermore, the obtained time-step attention weight vector and the date value vector in the date key-value pair are concatenated in order, with the time-step attention weight vector first and the date value vector last, to form a new, longer vector. This new vector incorporates the importance of the date and its own characteristic information, becoming the date-aware feature vector of electricity consumption.
[0135] Furthermore, based on the initial load forecasting model of electricity consumption, the date-aware feature vector is input into the model as new information.
[0136] Furthermore, the model adjusts and optimizes the various parts of the model used to predict electricity consumption based on the date-related information carried by the date-aware feature vector, and rebuilds the parameters and structure of the model. Through this updating process, a new prediction model is obtained, namely the holiday prediction model for electricity consumption, which is used to more accurately predict electricity consumption during holidays.
[0137] In general, by mapping date type labels into feature vectors and generating date key-value pairs, abstract date attributes can be converted into computable numerical features.
[0138] For example, mapping the "Spring Festival" label into a vector containing dimensions such as holiday days and folk activities, and cross-modally fusing it with load fluctuation characteristics can directly model the causal relationship between holiday date characteristics and electricity consumption behavior.
[0139] In general, this fusion method avoids the crude treatment of traditional methods that only use dates as classification labels, enabling the model to learn the "specific patterns of load changes under specific holiday types" (such as peak electricity consumption before holidays and low load during holidays), thereby accurately capturing the unique electricity consumption patterns of holidays and reducing prediction bias caused by insufficient date feature representation.
[0140] In general, normalizing the similarity between the date key vector and the load fluctuation feature and generating the time step attention weight vector can enable the model to automatically focus on the date features that have a greater impact on the load.
[0141] For example, during the National Day holiday, the load characteristics of the "first day of the holiday" and the "last day of the holiday" are significantly different. The attention mechanism will assign higher weights to these two time steps, allowing the model to pay more attention to the feature fusion of such key time points.
[0142] In general, compared with the traditional method of treating all date features equally, this mechanism can effectively highlight periods with special electricity consumption patterns during holidays (such as the beginning and end of holidays, adjusted holidays, etc.), avoid the interference of non-critical features on the prediction results, and improve the model's ability to capture complex load fluctuations during holidays.
[0143] In general, the attention weight vector and the date value vector are concatenated to form a date-aware feature vector, which is then used to update the initial load forecasting model, enabling the model to "understand" the semantics of holiday dates.
[0144] In general, for example, this feature vector can simultaneously represent the date attribute of the "New Year's Day holiday" and the corresponding load characteristics, so that the model can dynamically adjust the load forecasting logic according to the date characteristics during prediction.
[0145] In general, when faced with different types of holidays, the model can automatically adapt to the corresponding load pattern based on date-aware features, avoiding the problem of insufficient scenario adaptation caused by using a unified model to handle all holidays. In particular, when dealing with special date combinations such as adjusted holidays and consecutive holidays, the accuracy of the prediction results can be significantly improved.
[0146] In general, the cross-modal fusion mechanism realizes the nonlinear interaction of date features and load features through deep neural networks rather than simple feature splicing.
[0147] In general, for example, the model can learn complex associations such as "the sudden change in temperature during the Spring Festival holiday and the double drop in load caused by visiting relatives." This deep fusion can explore the hidden high-order relationship between date and load, breaking through the limitations of traditional linear fusion methods.
[0148] In general, the holiday prediction model constructed through this mechanism can more comprehensively characterize the coupled effects of multiple factors such as date, weather, and load in holiday scenarios. Especially when dealing with complex scenarios such as "holidays superimposed on extreme weather", it can accurately infer load change trends through deep interaction of features, thereby further improving the accuracy of the prediction results.
[0149] S5: Select a forecast model based on the target date type and output the electricity consumption forecast value of the target area in combination with the weather-load coupling feature set;
[0150] In an embodiment of the present invention, selecting a prediction model according to the target date type and outputting a power consumption prediction value for the target area in combination with a weather-load coupling feature set includes:
[0151] When the target date type is a weekday, the triplet is concatenated with the date and encoded as a weekday feature vector of the power consumption;
[0152] Inputting the working day feature vector into the conventional prediction model to obtain the optimized feature block of the power consumption;
[0153] The optimized feature block is mapped to a power consumption prediction value of a target area.
[0154] The method of selecting a prediction model according to the target date type and outputting the power consumption prediction value of the target area in combination with the weather-load coupling feature set includes:
[0155] When the target date type is a holiday, extracting the synergistic features of the load fluctuation rate and date features in the weather-load coupling feature set;
[0156] The collaborative feature is input into the holiday prediction model, the output gate of the holiday prediction model is updated, and the power consumption prediction value of the target area is obtained.
[0157] The collaborative feature is input into the holiday prediction model, the output gate of the holiday prediction model is updated, and the power consumption prediction value of the target area is obtained, wherein the calculation formula of the power consumption prediction value is as follows:
[0158] ;
[0159] Where, is the predicted value of power consumption, is the coding carrier of the date-weather feature in the weather-load coupling feature set, To map the code carrier to a load scalar, is the deviation compensation coefficient under different holiday conditions.
[0160] Specifically, when it is determined that the target date type is a working day, a triplet corresponding to the working day is found, where the triplet includes the location of the temperature mutation point, the load fluctuation rate, and the temperature difference between adjacent time periods.
[0161] Furthermore, all elements in the triplet are arranged in a certain order, and the specific date information of the weekday is added to the arranged triplet data to form a new data sequence.
[0162] Furthermore, through a fixed encoding rule, this new data sequence is converted into a vector with specific dimensions and values. This vector is the weekday feature vector of electricity consumption.
[0163] Furthermore, the generated working day feature vector is used as input data and input into the conventional prediction model according to the input method preset by the conventional prediction model.
[0164] Furthermore, after receiving the working day feature vector, the conventional prediction model calculates and processes the input working day feature vector according to the existing processing logic and structure within the model. After a series of calculations and conversions, a new data block is output. This data block is the optimized feature block of electricity consumption.
[0165] Furthermore, a fixed mapping rule is established, which clarifies the corresponding relationship between the data in the optimized feature block and the electricity consumption in the target area.
[0166] Furthermore, the data in the optimized feature block is converted according to this mapping rule, and the numerical information in the optimized feature block is converted into a numerical value that can directly represent the electricity consumption of the target area. This converted numerical value is the predicted electricity consumption value of the target area, thereby completing the prediction of the electricity consumption of the target area.
[0167] Specifically, the calculation formula for the power consumption forecast value, parameters It is the predicted value of electricity consumption in the target area to be obtained, which is obtained through calculation.
[0168] Furthermore, the parameter It comes from the weather-load coupling feature set and is the carrier formed by encoding the date-weather features, recording weather and date related information.
[0169] Furthermore, the parameter It is used to encode the carrier The amount of mapping is a pre-set fixed mapping relationship, which is used to map the encoding carrier Converted into load scalar.
[0170] Furthermore, the parameter It is the deviation compensation coefficient under different holiday conditions. The corresponding value is determined in advance according to different holidays and is used to correct the prediction results.
[0171] Furthermore, the significance of this formula is to use the encoding carrier of date-weather characteristics in the weather-load coupling characteristics concentration Processing, using the pre-set mapping relationship Convert it into a load scalar and add the deviation compensation coefficient set for different holidays , and finally get the power consumption forecast value of the target area , which takes into account weather, date and holiday characteristics to predict electricity consumption.
[0172] Furthermore, when the encoding carrier When the weather-load coupling characteristics are stronger, the mapping relationship Under the action of , the load scalar will increase accordingly. If the deviation compensation coefficient Unchanged, power consumption forecast value It will increase.
[0173] Furthermore, if the encoding vector The included features become weaker, and the power consumption prediction value Different holidays correspond to different deviation compensation coefficients , The larger the value, the higher the power consumption forecast value under the same other conditions. The bigger; The smaller the value, the higher the power consumption forecast value. The smaller.
[0174] In general, by distinguishing between weekdays and holidays and matching the corresponding prediction models (regular model / holiday model), scenario adaptation deviations caused by "one-size-fits-all" modeling can be avoided.
[0175] For example, electricity load on weekdays has a stable periodicity (such as the daily cycle of industrial electricity consumption), while holiday loads fluctuate non-periodically due to the influence of travel, leisure and other behaviors (such as shopping mall electricity consumption peaks during holidays).
[0176] In general, when selecting the corresponding model, the conventional model can use multi-scale time series features to capture the load cycle of weekdays, while the holiday model processes the date-related characteristics unique to holidays through date-load trans-membrane fusion, so that the model input is highly consistent with the electricity consumption pattern of the target scenario, reducing the prediction error caused by scenario mismatch from the modeling logic.
[0177] In general, inputting the weather-load coupling feature set (such as the triplet of temperature mutation point and load fluctuation rate) into the corresponding model can correct the impact of weather factors in the forecast results in real time.
[0178] For example, when the target date is a weekday and there is a sudden temperature rise, the conventional model can dynamically adjust the forecast value by combining the historical volatility in the coupling characteristics to avoid relying solely on historical weekday data and ignoring the impact of current weather changes.
[0179] In general, for holiday scenarios, the coordinated input of coupling features and date features can further enhance the model's capture of the triple correlation of "date-weather-load", making the predicted value closer to the actual electricity consumption fluctuations.
[0180] In general, the triples and dates are concatenated and encoded into a weekday feature vector, so that the model can simultaneously obtain multi-dimensional information of “temperature mutation moment + load fluctuation amplitude + date attribute”.
[0181] For example, if a sudden temperature change of 5°C occurs at 2:00 PM on a certain working day, the eigenvector can represent the "temperature difference at that moment, the corresponding historical volatility, and the working day attributes." Based on this, the model can more accurately infer the load response at the current moment, avoiding the one-sided information caused by a single weather or date feature.
[0182] In general, extracting collaborative features to update the model output gate can dynamically adjust the load forecasting logic specific to holidays.
[0183] For example, by inputting the collaborative feature of "the sudden change in temperature on the third day of the Spring Festival holiday and the double drop in load caused by the peak of returning home", the model updates the output gate weights, giving priority to the coupled impact of the holiday date and weather, rather than relying solely on historical load statistics, thereby improving the prediction accuracy in complex scenarios.
[0184] In general, the mechanism of switching models according to date type enables the system to have "scene perception" capabilities.
[0185] In general, when the target date is a weekday or a holiday, the model can call the corresponding trained parameters and feature processing logic respectively to avoid interference of different scenario data in model judgment.
[0186] For example, when processing weekday data, the conventional model will not be affected by abnormal holiday loads and misjudge trends; the holiday model focuses on learning the date characteristics unique to holidays to avoid incorrectly applying the cyclical patterns of weekdays to holiday forecasts.
[0187] In general, this "scenario-based modeling + dynamic call" model enables the model to maintain a high level of feature representation capabilities when dealing with various date types. Especially when dealing with special scenarios such as adjusted holidays and temporary holidays, it can significantly improve the accuracy and stability of the prediction results by matching the corresponding model and dynamically correcting the coupled features.
[0188] S6: When the deviation between the predicted value and the actual power consumption of the target area exceeds the limit, the power consumption data with the exceeded deviation value is fed back to the historical power consumption data in S1, and the prediction model is optimized to obtain the final power consumption prediction value of the target area.
[0189] In an embodiment of the present invention, when the deviation between the predicted value and the actual power consumption of the target area exceeds a limit, the power consumption data with the exceeded deviation value is fed back to the historical power consumption data in S1, and the prediction model is optimized to obtain the final power consumption prediction value of the target area, including:
[0190] Obtaining a deviation value between the predicted value and the actual power consumption of the target area;
[0191] When the deviation value exceeds the limit, the excess power consumption data is fed back to the historical power consumption data in S1;
[0192] updating the prediction model based on the excessive electricity consumption data;
[0193] A secondary prediction is performed on the power consumption of the target area based on the updated prediction model. When the secondary predicted power consumption does not exceed the limit, the secondary predicted power consumption is output as the final power consumption prediction value of the target area.
[0194] Specifically, the predicted electricity consumption value of the target area obtained by the prediction model is compared with the actual electricity consumption in the target area.
[0195] Furthermore, the predicted value is subtracted from the actual power consumption to obtain a numerical value, which is the deviation between the predicted value and the actual power consumption, so as to clarify the degree of difference between the predicted result and the actual situation.
[0196] Furthermore, a fixed deviation limit is set, and the calculated deviation value is compared with the limit.
[0197] Furthermore, when the deviation value is greater than the set limit, the prediction result is deemed inaccurate and is an over-limit situation.
[0198] Furthermore, the electricity consumption data corresponding to the over-limit situation, including the date, load data and other relevant information corresponding to the data, are all fed back into the historical electricity consumption data initially obtained, so that the historical electricity consumption data is supplemented.
[0199] Furthermore, the over-limit electricity consumption data fed back into the historical electricity consumption data is selected out, combined with the original historical electricity consumption data, and updated according to the pre-set rules and methods of the prediction model.
[0200] Furthermore, the internal structure and processing logic of the prediction model are adjusted. By reanalyzing data features, optimizing data processing procedures, and other operations, the prediction model can better adapt to the newly added over-limit electricity consumption data and complete the update of the prediction model.
[0201] Furthermore, the updated prediction model is used to predict the electricity consumption of the target area again to obtain a secondary prediction result of electricity consumption.
[0202] Furthermore, the second predicted power consumption is compared with the set limit to check whether there is any over-limit situation.
[0203] Furthermore, if the second predicted power consumption does not exceed the limit, it means that the prediction result is relatively accurate. The second predicted power consumption is determined as the final power consumption prediction value of the target area and output as the final prediction result.
[0204] In general, deviation-exceeding-limit data (such as load anomalies caused by extreme weather and special events) are directly fed back into S1’s historical data, enabling the model to learn “abnormal power consumption patterns” that are not covered in traditional historical data.
[0205] For example, a sudden high temperature change caused the actual load to be 20% higher than the predicted value. After this data is added to the historical dataset, the model will focus on learning the relationship between "high temperature changes and high load fluctuations" in subsequent training to avoid prediction bias in similar scenarios.
[0206] In general, this closed-loop mechanism of "prediction-error feedback-model update" allows the model to continuously evolve with new data. In particular, for nonlinear and non-stationary electricity consumption data (such as sudden extreme weather and temporary large-scale events), it can continuously correct the prediction logic and improve the adaptability to complex scenarios.
[0207] In general, over-limit electricity consumption data usually corresponds to special scenarios such as extreme weather and holiday adjustments. The supplement of such data can fill the "feature gaps" in historical data.
[0208] For example, if historical data lacks examples of sudden load drops caused by heavy rain during the Spring Festival holiday, the model's initial prediction may exhibit significant bias due to this missing feature. However, after receiving feedback on this excessive data, the model will generate corresponding "date-weather-load" coupling features during subsequent training. When encountering a similar scenario again, the model can adjust the prediction logic based on these newly added features, reducing systematic errors caused by insufficient data samples. This mechanism enables the model to "learn from its mistakes," gradually refining its prediction logic for various extreme situations by accumulating data from unusual scenarios.
[0209] In general, when updating a model based on excess data, not only is the historical dataset supplemented, but model parameters (such as the multi-scale feature weights of conventional models and the attention mechanism parameters of holiday models) are also adjusted in a targeted manner.
[0210] For example, when it is found that the holiday model has a large prediction deviation on the May Day holiday, the feedback data will prompt the model to recalculate the time step attention weight of this date type, and strengthen the focus on the special load characteristics of the holiday.
[0211] In general, this parameter optimization allows the model to generate prediction values that are closer to reality under the same input conditions. Especially when dealing with the "alternation between old and new electricity consumption patterns" (such as changes in electricity consumption patterns caused by the access of new industrial loads), by continuously feeding back deviation data, the model can accelerate the learning of new features, avoid prediction errors caused by model iteration lags, and ultimately achieve a dynamic improvement in prediction accuracy.
[0212] In general, the load characteristics of the power system will evolve dynamically with factors such as user structure and policy changes (such as changes in electricity consumption patterns caused by the popularization of new energy), and the deviation feedback mechanism can enable the prediction model to evolve synchronously with actual electricity consumption data.
[0213] For example, if a large number of new electric vehicle charging stations are added to a region, leading to a new peak in summer evening load, the model may be biased in the initial forecast due to the lack of this feature. When this excessive data is fed back into the historical dataset, the model will extract new time series features of "charging station load + evening period" during subsequent training, accurately capturing this type of load fluctuation in future forecasts. This data-driven iterative mechanism enables the model to adapt to the long-term evolution of grid load, avoiding the decline in forecast accuracy caused by static modeling, and providing more reliable dynamic forecasting support for power dispatch.
[0214] In the several embodiments provided by the present invention, it should be understood that the disclosed methods can be implemented in other ways.
[0215] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0216] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method and technology of using digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to achieve optimal results.
[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for predicting electricity consumption, characterized in that: The method comprises: S1: Separate historical electricity consumption data according to date type to generate regular data sets and holiday data sets; S2: extracting the load fluctuation rate of the historical electricity consumption data according to the temperature mutation point, and generating a weather-load coupling feature set of the historical electricity consumption data according to the temperature mutation point and the load fluctuation rate; S3: extracting a multi-scale time series feature subsequence of the conventional data set, and adding the normalized multi-scale time series feature subsequence element by element to obtain a conventional prediction model for electricity consumption; S4: performing cross-modal fusion on the date features of the holiday dataset and the load features of the electricity consumption based on the date key-value pairs to obtain a holiday prediction model for the electricity consumption; S5: Select a forecast model based on the target date type and output the electricity consumption forecast value of the target area in combination with the weather-load coupling feature set; S6: When the deviation between the predicted value and the actual power consumption of the target area exceeds the limit, the power consumption data with the exceeded deviation value is fed back to the historical power consumption data in S1, and the prediction model is optimized to obtain the final power consumption prediction value of the target area.
2. The power consumption prediction method according to claim 1, wherein: The method of separating historical electricity consumption data according to date type to generate regular data sets and holiday data sets includes: Extract date type labels from historical electricity consumption data; When the date type tag belongs to a statutory holiday, the corresponding load data in the historical electricity consumption data is allocated to a holiday data set; When the date type tag belongs to a working day, the corresponding load data in the historical power consumption data is allocated to a regular data set; Check whether the separated historical electricity usage data covers a historical period.
3. The power consumption prediction method according to claim 1, wherein: The step of extracting the load fluctuation rate of the historical power consumption data according to the temperature mutation point includes: The period where the temperature difference between adjacent periods is greater than the preset safety value is regarded as the temperature mutation point; Extracting a load slice for the period near the temperature mutation point; The fluctuation rates of the load slices are aggregated into the load fluctuation rate of the historical power consumption data.
4. The power consumption prediction method according to claim 3, wherein: Generating the weather-load coupling feature set of the historical electricity consumption data according to the temperature mutation point and the load fluctuation rate includes: Combining the position of the temperature mutation point, the load fluctuation rate, and the temperature difference between adjacent time periods into a triplet of the historical electricity consumption data; The triples are aggregated into a weather-load coupling feature set of the historical electricity consumption data.
5. The power consumption prediction method according to claim 1, wherein: The step of extracting a multi-scale time series feature subsequence from the conventional data set and adding the normalized multi-scale time series feature subsequences element by element to obtain a conventional prediction model for power consumption includes: extracting a primary feature sequence of the conventional data set; Capturing the load cycle law of the expanded primary feature sequence, and constructing a multi-scale time series feature map of the conventional data set according to the load cycle law; The multi-scale time series feature graph is divided into subsequences of equal length, and the subsequences are added element by element to the corresponding original data in the conventional data set to obtain a conventional prediction model for electricity consumption.
6. The power consumption prediction method according to claim 2, wherein: The cross-modal fusion of the date features of the holiday dataset and the load features of the power consumption based on the date key-value pairs to obtain the holiday prediction model of the power consumption includes: Mapping a date type label into a feature vector, and generating a date key-value pair of the date type according to the feature vector; Normalizing the similarity between the date key vector in the date key-value pair and the corresponding load fluctuation feature in the holiday dataset to obtain a time step attention weight vector of the holiday dataset; Concatenating the time step attention weight vector with the date value vector in the date key-value pair to obtain a date-aware feature vector of the electricity consumption; The initial load forecasting model of the power consumption is updated based on the date-aware feature vector to obtain the holiday forecasting model of the power consumption.
7. The power consumption prediction method according to claim 4, wherein: The method of selecting a prediction model according to the target date type and outputting the power consumption prediction value of the target area in combination with the weather-load coupling feature set includes: When the target date type is a weekday, the triplet is concatenated with the date and encoded as a weekday feature vector of the power consumption; Inputting the working day feature vector into the conventional prediction model to obtain the optimized feature block of the power consumption; The optimized feature block is mapped to a power consumption prediction value of a target area.
8. The power consumption prediction method according to claim 4, wherein: The method of selecting a prediction model according to the target date type and outputting the power consumption prediction value of the target area in combination with the weather-load coupling feature set includes: When the target date type is a holiday, extracting the synergistic features of the load fluctuation rate and date features in the weather-load coupling feature set; The collaborative feature is input into the holiday prediction model, the output gate of the holiday prediction model is updated, and the power consumption prediction value of the target area is obtained.
9. The power consumption prediction method according to claim 8, characterized in that: The collaborative feature is input into the holiday prediction model, the output gate of the holiday prediction model is updated, and the power consumption prediction value of the target area is obtained, wherein the calculation formula of the power consumption prediction value is as follows: ; Where, is the predicted value of power consumption, is the coding carrier of the date-weather feature in the weather-load coupling feature set, To map the code carrier to a load scalar, is the deviation compensation coefficient under different holiday conditions.
10. The power consumption prediction method according to claim 1, wherein: When the deviation between the predicted value and the actual power consumption of the target area exceeds a limit, the power consumption data with the exceeded deviation value is fed back to the historical power consumption data in S1, and the prediction model is optimized to obtain the final power consumption prediction value of the target area, including: Obtaining a deviation value between the predicted value and the actual power consumption of the target area; When the deviation value exceeds the limit, the excess power consumption data is fed back to the historical power consumption data in S1; updating the prediction model based on the excessive electricity consumption data; A secondary prediction is performed on the power consumption of the target area based on the updated prediction model. When the secondary predicted power consumption does not exceed the limit, the secondary predicted power consumption is output as the final power consumption prediction value of the target area.
Citation Information
Patent Citations
Short-term load prediction method and device
CN113326985A
Power load prediction method and device based on multi-factor influence
CN120046066A