Power load prediction method, system and equipment based on time sequence

By classifying date types into multiple levels and introducing load pattern features, combined with a gated cyclic unit model, the problems of insufficient expression of date features and sample sparsity in power load forecasting are solved, thereby improving the accuracy of load forecasting for key nodes of the power grid and the adaptability of the model.

CN121566418APending Publication Date: 2026-02-24THREE GORGES HI TECH INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511565559.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing power load forecasting methods suffer from insufficient feature representation and uneven sample distribution when dealing with date-type features, making it difficult to accurately predict load changes at specific time points.

Method used

By classifying date types into multi-level labels and combining load pattern features with a gated cyclic unit model, a time series prediction model is constructed. The mean vector and covariance matrix are used to characterize the inherent temporal correlation of date types, and key dates are given higher weights.

Benefits of technology

It improves the accuracy of power load forecasting and the adaptability of the model, can accurately identify load pattern differences on key dates, and enhances the reliability of decision-making basis for power grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention discloses a prediction method, system and equipment named as a power load prediction method based on a time sequence, relates to the technical field of power prediction, and aims to solve the problems of insufficient date feature expression, non-uniform sample distribution and insufficient description of a model on date sequential logic and semantic association in an existing method. The method comprises the steps of obtaining date type labels of multi-level date types according to historical power loads of dates; obtaining a mean vector and a covariance matrix of each date type as load mode characteristics according to historical loads and date type labels; according to the load mode characteristics, a time sequence prediction model is obtained based on a gating circulation unit, so that rich multi-level date type characteristics and load mode characteristics can be combined; and finally, updating the time sequence prediction model in a rolling manner after the actual power load of one day is newly added every time. Through the scheme, the adaptability and accuracy of power load prediction in a complex and variable load scene are further enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power forecasting technology, and in particular to time series-based power load forecasting methods, systems and equipment. Background Technology

[0002] With the deepening development of smart grids and the energy internet, power load forecasting, as a core component for ensuring the safe and stable operation of the power grid and optimizing dispatch decisions, is receiving increasing attention for its reliability. Power load forecasting aims to construct mathematical models that characterize load evolution patterns based on historical load sequences and relevant external factors, thereby scientifically predicting future electricity demand. Current mainstream methods widely employ statistical models, machine learning, and deep learning techniques, typically using historical load data, meteorological information, and date type as basic input features. The date type is often simplified into two categories: weekdays and holidays, used to distinguish basic load patterns.

[0003] Existing technologies for handling date type features generally suffer from a dual contradiction: unclear feature representation and uneven sample distribution. However, excessive subdivision of specific date types leads to sparse historical samples, making it impossible to train stable and reliable sub-models. On the other hand, maintaining coarse-grained classification fails to capture load fluctuation patterns at key time points. Furthermore, existing methods typically input date types directly into the model as discrete labels, lacking a mathematical characterization of their inherent temporal and semantic aspects, making it difficult for the model to generalize to unseen holiday combinations or work schedule adjustments. Therefore, there is an urgent need for a power load forecasting method that can accommodate both refined date type features and improved accuracy in predicting load changes at specific time points. Summary of the Invention

[0004] In order to at least overcome the above-mentioned shortcomings in the prior art, the purpose of this application is to provide a time series-based power load forecasting method, system and equipment to solve the above problems.

[0005] In the first aspect, this application provides a time-series-based power load forecasting method, including obtaining historical power load sequences, as well as corresponding date information and meteorological data, according to a preset time resolution; Based on the relative position of the date in the historical power load sequence and its relationship with date information, and based on preset judgment rules, date type labels of multi-level date types are obtained through encoding. Based on historical power load sequences and date type labels, the load pattern characteristics for each date type are obtained; Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units; this also includes adding weights to specific data points. Based on the date type label of the day to be predicted, the historical load sequence of the past time window, and the corresponding meteorological forecast data, the load prediction value for each preset time resolution within the set future time window is obtained based on the time series prediction model.

[0006] In one possible implementation, the step of encoding based on the relative position of the date in the historical power load sequence and its relationship with date information, according to a preset determination rule, to obtain a multi-level date type label, including: Based on the relative position of the date in the historical power load sequence and its relationship with holidays in the date information, each date is divided into at least 8 date type labels, which include at least: ordinary working day, last day of working day, workday with adjustment, first day of holiday, middle period of holiday, last day of holiday, ordinary Saturday, and ordinary Sunday. Based on the preset determination rules, each date is traversed to obtain the date type label for each date; wherein the preset determination rules include: If a certain day is a statutory working day and the following day is a statutory public holiday, then it is marked as the last working day; If a certain day is a statutory holiday and the previous day is a working day, then it is marked as the first day of the holiday; If a certain day is a statutory holiday and the following day is a working day, then it is marked as the last day of the holiday; If a day is a weekend workday due to a work-off arrangement, it is marked as a workday with work-off due to work-off arrangements. The remaining weekdays are marked as ordinary weekdays, and Saturdays and Sundays that are not adjusted workdays or holidays are marked as ordinary Saturdays and ordinary Sundays, respectively. The date type label for each date also includes a holiday duration feature; the holiday duration feature is configured such that if the number of consecutive statutory holidays is greater than 3 days, the dates within the statutory holidays are marked as long holidays, otherwise they are short holidays.

[0007] In one possible implementation, obtaining the load pattern characteristics for each date type based on historical power load sequences and date type labels includes: Based on the historical power load sequence and date type label, obtain the historical load subsequence for each date type; Based on the historical load subsequences of each date type, the mean vector and covariance matrix of each date type are obtained by calculating the daily load curve of each date subsequence; Based on the mean vector and covariance matrix of the date type, the load pattern characteristics of the corresponding date type are obtained.

[0008] In one possible implementation, obtaining the load pattern characteristics for each date type based on historical power load sequences and date type labels includes: Based on the historical power load sequence and date type labels, the historical load data is divided into 8 independent historical load subsequences according to 8 date type labels, and the historical load subsequence for each date type is obtained; The step of obtaining the mean vector and covariance matrix for each date type by calculating the daily load curve of each date type's historical load subsequence includes: Based on the historical load subsequences of each date type, obtain the daily load curves on the historical load subsequences of each date type; For the first historical load subsequence of the first date type, obtain the first day load curve; based on the first day load curve, calculate the average load value within each preset time resolution, and obtain the first-order feature of the first day load curve as the mean vector; For the first historical load subsequence of the first date type, obtain the load curve of the first day; based on the load curve of the first day, calculate the covariance of the load values ​​within one preset time resolution and another preset time resolution, and obtain the second-order feature of the load curve of the first day as the covariance matrix. When the date type is the historical load subsequence during the middle of a holiday, based on whether the label is a long holiday or a short holiday, the historical load subsequence during the middle of a long holiday and the historical load subsequence during the middle of a short holiday are obtained. Based on the historical load subsequences of the long holiday and the short holiday, a mean vector is obtained. Based on the mean vector and covariance matrix obtained for each date type, the load pattern characteristics of each date type are obtained after time alignment.

[0009] In one possible implementation, a time series forecasting model is obtained based on a gated cyclic unit, using historical power load sequences, meteorological data, date type labels, and load pattern characteristics. This model includes: Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units. Based on the date type label, obtain its historical load subsequence; In the second historical load subsequence of the second date type label: Based on the historical power load sequence of the first time window, and based on the meteorological data in the corresponding time window, the second historical power load sequence is time-aligned with the meteorological data in the corresponding time window of the historical power load sequence, and the encoding of the second date type label is marked as the first feature; Based on the mean vector and covariance matrix corresponding to the second date type, this load pattern feature is taken as the second feature; The third feature is the historical power load sequence of the next past time window with a set length of time window following the first past time window of a given past ringing. The time series prediction model is formed by training a gated recurrent unit layer using the first or second feature matrix as the input feature vector and the third feature as the output feature vector.

[0010] In one possible implementation, the gated loop unit layer includes one or more stacked gated loop units; Each gated recurrent unit receives the current input feature vector and the hidden state of the previous time step at each time step, and outputs the hidden state of the current time step. Each gated loop unit includes an update gate and a reset gate connected in sequence; The reset gate is configured to control the degree of influence of the hidden state of the previous time step on the current candidate hidden state; The update gate is configured to control the degree of influence of the previous hidden state being brought to the current time step, and the degree of influence of the new candidate hidden state on updating the current time step; The candidate hidden state is configured to calculate new state information by combining the current input and the previous hidden state that has been weighted by the reset gate.

[0011] In one possible implementation, the training gated recurrent unit layer forms the time series prediction model, and further includes: Based on the first and second features, the predicted power load is obtained using a time series prediction model; Based on the actual power load and predicted power load of the third feature, and using the preset normal weights of prediction errors for each date type, a weighted mean square error is obtained as the loss function. Determine the current date type. If the current date type is any one of the first day of a holiday, the last day of a holiday, or the last day of a workday, then based on the actual power load and predicted power load of the third feature, and using the high value weight of the prediction error for each date type as a preset, the weighted mean square error is obtained and used as the loss function.

[0012] One possible implementation also includes: after each additional day of actual electricity load, recalculating the mean vector and covariance matrix of each type of date subsequence to obtain the load pattern characteristics and the time series prediction model after rolling updates.

[0013] Secondly, this application provides a time-series-based power load forecasting system, including a data acquisition unit with sequential electrical connections, a multi-level date tagging unit, a load pattern feature extraction unit, a forecasting model construction unit, and a load forecasting unit; The data acquisition unit is configured to acquire historical power load sequences, as well as corresponding date information and meteorological data, according to a preset time resolution. The multi-level date tag construction unit is configured to: based on the relative position of the date in the historical power load sequence and its relationship with the date information, and based on a preset determination rule, encode the date type tags of the multi-level date type; The load pattern feature extraction unit is configured to: obtain load pattern features for each date type based on historical power load sequences and date type labels; The predictive model building unit is configured to: obtain a time series predictive model based on a gated cyclic unit, using historical power load sequences, meteorological data, and date type labels; The load forecasting unit is configured to: obtain the load forecast value for each preset time resolution within a set future time window based on the date type label of the day to be forecasted, the historical load sequence of a set past time window, and the corresponding meteorological forecast data, according to the time series forecasting model.

[0014] Thirdly, this application provides a computer apparatus, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the time-series-based power load forecasting methods.

[0015] In summary, the beneficial effects that this application can achieve are: The time-series-based power load forecasting method, system, and equipment proposed in this application resolve the contradictions of insufficient date feature representation and sample sparsity in existing methods by classifying date types into multiple levels. By introducing mean vectors and covariance matrices as load pattern features, it achieves an understanding of the inherent load patterns and temporal correlations of different date types. Through gated cyclic units modeling complex time-series data and assigning higher weights to key date types using a weighted loss function, it achieves accurate load forecasting at critical nodes in power grid operation. A rolling update mechanism ensures the long-term adaptability of the time-series forecasting model. The method in this application represents a significant technological advancement and has beneficial effects in improving power load forecasting accuracy and enhancing model adaptability. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the method steps in an embodiment of this application; Figure 2 This is a schematic diagram of the method flow of an embodiment of this application; Figure 3 This is a schematic diagram of the system structure according to an embodiment of this application.

[0017] Xx processing diagram and waveform diagram Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0018] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] Example 1 Please refer to the following: Figure 1 The diagram below illustrates the steps of the time-series-based power load forecasting method provided in this application embodiment. Further, the time-series-based power load forecasting method may specifically include the content described in steps S1-S5.

[0020] Step S1: Obtain historical power load sequences, as well as corresponding date information and meteorological data, according to the preset time resolution.

[0021] Step S2: Based on the relative position of the date in the historical power load sequence and its relationship with the date information, and according to the preset judgment rules, encode the date type to obtain a multi-level date type label.

[0022] Step S3: Obtain the load pattern characteristics for each date type based on the historical power load sequence and date type label.

[0023] Step S4: Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series prediction model is obtained using a gated cyclic unit; this also includes adding weights to special data.

[0024] Step S5: Based on the date type label of the day to be predicted, the historical load sequence of the past time window and the corresponding meteorological forecast data, obtain the load prediction value for each preset time resolution within the set future time window based on the time series prediction model.

[0025] In existing technologies, power load forecasting methods typically simplify date types into two categories: weekdays and holidays, making it difficult to capture load variation patterns at specific time points. For example, in scenarios involving adjustments to statutory holidays or alternating long and short holidays, existing methods cannot effectively distinguish the characteristics of sudden load changes before and after holidays. Furthermore, coarse-grained date classification prevents models from recognizing key date types such as the last day of a workday or adjusted workdays, leading to prediction bias. In addition, directly inputting discrete date labels into the model lacks a mathematical expression of the inherent temporal correlations of date types, affecting the model's ability to generalize to complex date combinations.

[0026] When implementing the embodiments of this application, the inventors noticed that there is a strong correlation between load patterns and date types. However, excessive subdivision of date types can lead to insufficient historical samples. Through analysis, it was found that the relative position of the date on the time axis reflects the load change pattern better than the specific holiday name. Therefore, the inventors proposed to divide the date type into multi-level labels and then combine the load pattern features with the time series model. This can ensure the sample size and at the same time improve the feature expression ability.

[0027] This application proposes a time series-based power load forecasting method, which includes: obtaining historical power load sequences based on a preset time resolution; finding the corresponding associated date information and meteorological data while finding the power load sequences; generating multi-level date type labels based on the relative position of the dates and judgment rules; extracting load pattern features for each date type based on the power load sequences under the same date type label; and finally constructing a time series forecasting model by combining a gated cyclic unit. The model is then used to predict the load value for future time windows, and weight adjustments are applied to special data.

[0028] The preset time resolution refers to the minimum time unit for data collection, such as 15 minutes or 1 hour. This is chosen by the user to balance prediction accuracy and computational complexity; higher accuracy leads to greater computational complexity. Multi-level date type labels categorize dates into at least eight types using decision rules, such as ordinary working days, last day of working days, adjusted working days, first day of holidays, middle of holidays, last day of holidays, ordinary Saturdays, and ordinary Sundays, avoiding reliance on specific holiday names and ensuring sufficient historical samples. Load pattern features are obtained by calculating the mean vector and covariance matrix of the same date type label, used to characterize the overall shape of the load curve and its time-related correlation. Then there is the gated recurrent unit model, which uses reset and update gate mechanisms to capture long-term dependencies in time series, combining meteorological data and date labels to improve prediction stability. Special data weighting refers to assigning higher error weights to key dates such as the first and last days of holidays during model training, allowing the model to be more accurate in detecting sudden load changes.

[0029] In the implementation of this application, historical load data is first collected at a preset time resolution, and corresponding date information and meteorological parameters such as temperature and humidity are recorded simultaneously. Then, based on the relative position of the date on the time axis and the arrangement of statutory holidays, multi-level date labels are generated through judgment rules. For example, a certain workday with adjusted work hours is marked as a workday with adjusted work hours rather than a regular workday, and its load pattern will be modeled independently. Then, the mean vector and covariance matrix of the daily load curve are calculated for the historical load data of each date type to form mathematical features that characterize the load fluctuation pattern of that type. These features and meteorological data are input into the gated recurrent unit model, and the future load value is predicted through time window sliding training. In addition, during the training process, higher loss weights are applied to special dates such as the first and last days of holidays, so that the model learns the load change situation at these special locations first. Finally, our model can output the load prediction value at each time point within the future time window based on the date type label of the day to be predicted, the historical load sequence, and the meteorological forecast data.

[0030] Compared with existing technologies, current methods only use two types of labels: weekdays and holidays, which cannot distinguish key date types such as adjusted workdays and the middle of long holidays. This application, however, combines multi-level date labels with load pattern features, which not only avoids the problem of sample sparsity but also improves the semantic expressiveness of date types. Furthermore, existing models directly use date labels as discrete inputs, while this application transforms date types into mathematical features through mean vectors and covariance matrices, enhancing the ability to capture the load fluctuation patterns of similar dates.

[0031] Through the aforementioned technical application, this application can accurately identify load pattern differences for key date types such as the last day of a workday and the middle of a holiday, effectively predict load fluctuations caused by work schedule adjustments, and then make the model focus more on periods of significant load fluctuations based on the covariance matrix, thereby improving the rationality of predictions. While ensuring sufficient historical samples, we have achieved more refined modeling of date type characteristics, providing a more reliable decision-making basis for power system dispatch.

[0032] Example 2 Based on Example 1, please refer to the following: Figure 2 The diagram below illustrates the process of a time-series-based power load forecasting method provided in this application. Specifically, the time-series-based power load forecasting method may include the following: Step S1: Obtain historical power load sequences, corresponding date information, and meteorological data according to the preset time resolution; Step S2: Based on the relative position of the date in the historical power load sequence and its relationship with the date information, and according to the preset judgment rules, encode the date type to obtain a multi-level date type label; Step S3: Obtain the load pattern characteristics for each date type based on the historical power load sequence and date type label; Step S4: Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units; this also includes adding weights to specific data points. Step S5: Based on the date type label of the day to be predicted, the historical load sequence of the past time window and the corresponding meteorological forecast data, obtain the load prediction value for each preset time resolution within the set future time window based on the time series prediction model.

[0033] In the specific implementation of this embodiment, in step S1, historical power load sequences, as well as corresponding date information and meteorological data, are obtained according to a preset time resolution.

[0034] The preset time resolution is configured to be 15 minutes, 30 minutes, or 60 minutes. This can be designed according to the specific total sample size. If the total sample time span is only 3 years, the preset time resolution can be configured to be 15 minutes. It can be set according to the specific usage. The historical power load sequence includes, but is not limited to, actual power load data recorded at the preset time resolution over the past 3 years. The actual power load data is recorded at every preset time resolution to form a historical power load sequence that records actual power load data according to time sequence. Date information includes, but is not limited to, Gregorian calendar date, day of the week, whether it is a statutory holiday, whether it is a weekend, and whether it is a special working day or rest day caused by the adjustment of work schedule. The meteorological data includes, but is not limited to, historical temperature, humidity, wind speed, rainfall, light intensity, and other meteorological observation data.

[0035] The acquisition of historical power load sequences, as well as corresponding date information and meteorological data, is achieved through the existing data acquisition system, which is configured to obtain raw data from the power grid dispatching system, meteorological monitoring stations, and calendars. Then, based on the raw data, preprocessing is performed, and timestamps are aligned to ensure that all data points correspond on the same timeline, thus obtaining the historical power load sequence. The historical power load sequence is in the form of a numerical sequence, where each element in the vector corresponds to an average load value within a preset time resolution; date information is stored in the form of structured data, for example, the day of the week is encoded as an integer from 0 to 6, and whether it is a statutory holiday is encoded as a binary flag; the meteorological data is sampled and stored at the same time resolution as the power load sequence, and each meteorological variable is an independent numerical sequence.

[0036] The preprocessing includes data cleaning, missing value imputation, outlier detection and correction; wherein, missing values ​​are imputed by interpolation based on load data of similar historical dates or time periods, for example by linear interpolation or spline interpolation methods. Outliers are detected based on statistical principles and corrected by mean replacement, median replacement, or smoothing based on loads at adjacent time points.

[0037] In step S2, based on the relative position of the date in the historical power load sequence and its relationship with the date information, and according to a preset determination rule, the date type is encoded to obtain a multi-level date type label; In one possible implementation, the step of encoding based on the relative position of the date in the historical power load sequence and its relationship with date information, according to a preset determination rule, to obtain a multi-level date type label, including: Based on the relative position of the date in the historical power load sequence and its relationship with holidays in the date information, each date is divided into at least 8 date type labels, which include at least: ordinary working day, last day of working day, workday with adjustment, first day of holiday, middle period of holiday, last day of holiday, ordinary Saturday, and ordinary Sunday. Based on the preset determination rules, each date is traversed to obtain the date type label for each date; wherein the preset determination rules include: If a certain day is a statutory working day and the following day is a statutory public holiday, then it is marked as the last working day; If a certain day is a statutory holiday and the previous day is a working day, then it is marked as the first day of the holiday; If a certain day is a statutory holiday and the following day is a working day, then it is marked as the last day of the holiday; If a day is a weekend workday due to a work-off arrangement, it is marked as a workday with work-off due to work-off arrangements. The remaining weekdays are marked as ordinary weekdays, and Saturdays and Sundays that are not adjusted workdays or holidays are marked as ordinary Saturdays and ordinary Sundays, respectively. The date type label for each date also includes a holiday duration feature; the holiday duration feature is configured such that if the number of consecutive statutory holidays is greater than 3 days, the dates within the statutory holidays are labeled as long holidays, otherwise they are labeled as short holidays.

[0038] In the implementation of this application, the feature of the duration of holidays is combined with the label of the period in between holidays for subsequent load pattern segmentation. Based on preset judgment rules, the feature of the duration of holidays is marked on the date type label, which completely avoids the dependence on specific holiday names such as Spring Festival and National Day, and only focuses on the position of the date on the time axis. This not only significantly improves the segmentation of date features, but also ensures that each type of label has a sufficient number of samples in historical data. For example, the last day of a holiday usually occurs 5 to 8 times a year, which effectively alleviates the problem of insufficient samples caused by over-segmentation and provides a stable data foundation for model training.

[0039] In the implementation of this application embodiment, the date type label of a multi-level date type is obtained by encoding based on the relative position of the date in the historical power load sequence and its relationship with the date information, according to a preset determination rule.

[0040] Based on the relative position of the date in the historical power load sequence and its relationship with holidays in the date information, each date is divided into at least 8 date type labels. The date type labels include at least: ordinary workday, last day of workday, workday with adjusted rest day, first day of holiday, middle period of holiday, last day of holiday, ordinary Saturday, and ordinary Sunday.

[0041] The preset determination rules are implemented through the following logical sequence: Rule 1: If a certain day is determined to be a statutory working day according to the list of statutory holidays and the work schedule adjustment, and its next day in the Gregorian calendar is determined to be a statutory holiday, then that day is marked as the last working day. The last working day is usually accompanied by the early end of production activities or the load characteristics of home preparation.

[0042] Rule 2: If a day is determined to be a statutory holiday according to the list of statutory holidays, and the day before it is determined to be a statutory working day, then that day is marked as the first day of the holiday. The first day of a holiday often sees a sharp drop in electricity load or a significant change in load patterns.

[0043] Rule 3: If a certain day is determined to be a statutory holiday according to the list of statutory holidays, and its next day is determined to be a statutory working day, then that day is marked as the last day of the holiday. The last day of the holiday usually sees a return peak or a rebound in production activities that resume earlier.

[0044] Rule 4: If a day is determined to be a weekend workday due to the national work-day adjustment arrangement, then that day shall be marked as a work-day work ...

[0045] Rule 5: For dates that do not meet any of the above rules: If the day is a Saturday according to the Gregorian calendar and is not a statutory holiday or a workday that can be adjusted for working overtime, it will be marked as an ordinary Saturday; If the day is a Sunday according to the Gregorian calendar and is not a statutory holiday or a workday that can be adjusted for workdays, it will be marked as an ordinary Sunday; If a day does not meet any of the above rules, and is Monday through Friday according to the Gregorian calendar and is not a statutory holiday or a workday for adjusting work hours, then it is marked as a regular workday.

[0046] Furthermore, the date type label for each date also includes a holiday duration feature, which is configured such that: if the number of consecutive statutory holidays is greater than 3 days, all dates within the consecutive statutory holidays are marked as long holidays; otherwise, if the number of consecutive statutory holidays is less than or equal to 3 days, all dates within the consecutive statutory holidays are marked as short holidays.

[0047] The duration of holidays further subdivides the load patterns during holidays, classifying the middle period of a holiday into the middle period of a long holiday and the middle period of a short holiday based on the length of the holiday. For example, a certain day in the middle of the National Day holiday will be marked as the middle period of a holiday and also has the characteristics of a long holiday; while a certain day in the middle of the New Year's Day holiday will be marked as the middle period of a holiday and has the characteristics of a short holiday. This detailed distinction is crucial for capturing the subtle differences in load patterns between long and short holidays. For example, during a long holiday, residents may travel, resulting in a relatively low and more stable load level, while during a short holiday, residents may be more active locally, leading to potentially stronger load fluctuations.

[0048] The encoding method for the multi-level date type tags is as follows: the eight core date type tags are represented by independent one-hot encoded vectors. For example, a regular weekday corresponds to [1,0,0,0,0,0,0,0,0], a regular Sunday corresponds to [0,1,0,0,0,0,0,0], a regular Saturday corresponds to [0,0,1,0,0,0,0,0], and so on. The duration feature of holidays, i.e., long holidays or short holidays, uses an independent one-hot encoded vector [1,0] to represent a long holiday and [0,1] to represent a short holiday. These encoded vectors or values ​​will serve as the input features of the model.

[0049] By employing the pre-defined judgment rules to meticulously classify dates into multiple levels, this application effectively avoids the problem of insufficient feature representation caused by simply and crudely dividing dates into weekdays and holidays. Furthermore, the meticulously divided date types, such as the last day of a weekday and the first day of a holiday, capture the unique social activity patterns at key time nodes and the resulting changes in electricity load. Simultaneously, the classification focuses on the temporal relationship and inherent date attributes of dates, rather than specific holiday names, ensuring that each sub-date type has a sufficient sample size in historical data. This avoids the problem of insufficient samples caused by over-segmentation, such as setting independent labels for each specific holiday, effectively alleviating the technical problem of uneven sample distribution and providing a stable and reliable data foundation for subsequent model training.

[0050] In step S3, based on the historical power load sequence and date type label, the historical load subsequence for each date type is obtained, so as to obtain the mean vector and covariance matrix of the daily load curve of each subsequence, which serve as the load pattern feature of that date type; In one possible implementation, obtaining the load pattern characteristics for each date type based on historical power load sequences and date type labels includes: Based on the historical power load sequence and date type label, obtain the historical load subsequence for each date type; Based on the historical load subsequences of each date type, the mean vector and covariance matrix of each date type are obtained by calculating the daily load curve of each date subsequence; Based on the mean vector and covariance matrix of the date type, the load pattern characteristics of the corresponding date type are obtained.

[0051] In one possible implementation, obtaining the load pattern characteristics for each date type based on historical power load sequences and date type labels includes: Based on the historical power load sequence and date type labels, the historical load data is divided into 8 independent historical load subsequences according to 8 date type labels, and the historical load subsequence for each date type is obtained; The step of obtaining the mean vector and covariance matrix for each date type by calculating the daily load curve of each date type's historical load subsequence includes: Based on the historical load subsequences of each date type, obtain the daily load curves on the historical load subsequences of each date type; For the first historical load subsequence of the first date type, obtain the first day load curve; based on the first day load curve, calculate the average load value within each preset time resolution to obtain the first-order feature of the first day load curve, which is used as the mean vector to obtain the load level profile of the first date type. For the first historical load subsequence of the first date type, obtain the first day load curve; based on the first day load curve, calculate the covariance of the load values ​​within one preset time resolution and another preset time resolution, obtain the second-order feature of the first day load curve as the covariance matrix, and obtain the joint change and intrinsic correlation structure of load fluctuations in different time periods within the first date type. Furthermore, when the date type is the historical load subsequence during the middle of a holiday, it is split into two subsets, the middle of a long holiday and the middle of a short holiday, based on whether the label is a long holiday or a short holiday, to obtain the historical load subsequence of the middle of a long holiday and the historical load subsequence of the middle of a short holiday; Based on the historical load subsequences of the long holiday mid-term and the short holiday mid-term, the mean vectors of these two subsets are obtained and calculated independently. Based on the mean vector and covariance matrix obtained for each date type, the load pattern characteristics of each date type are obtained after time alignment.

[0052] In the implementation of this application embodiment, based on the historical power load sequence and the date type label obtained in step S2, the historical load data is divided into multiple independent historical load subsequences, each subsequence corresponding to a specific date type. For example, all historical daily load curves marked as ordinary weekdays are aggregated into one subsequence, all historical daily load curves marked as ordinary Sundays are aggregated into another subsequence, and so on. In this way, dates within the same subsequence all belong to the same date load pattern.

[0053] For each historical load subsequence of date type, the mean vector and covariance matrix of that date type are obtained by calculating the statistical characteristics of the daily load curve of each date subsequence, which serve as the load pattern characteristics of that date type.

[0054] For each date type, taking any date type as an example, let's denote this date type as date type k, where k represents any of the above-mentioned sub-date types. Extract all daily load curves from its corresponding historical load subsequence. Each daily load curve... It is a vector whose dimension is equal to the number of sampling points M at the preset daily time resolution. M is obtained by the ratio of daily time to the preset time resolution. For example, if the preset resolution is 15 minutes, then... There are 96 sampling points every day, and each daily load curve ,in This represents the load value of the j-th daily load curve at the m-th time resolution.

[0055] Then, the first and second-order features of the daily load curve are calculated, and the mean vector and covariance matrix are obtained. After aligning the time, the load pattern features of each date type are obtained.

[0056] Calculate the mean vector for each date type k. The mean vector This is obtained by averaging the historical daily load curves under date type k at each preset time resolution, and each arithmetic mean is denoted as... , is represented as:

[0057] in, If the number of historical daily load curves is under date type k, then the mean vector is represented as: = The mean vector It characterizes the average level profile and typical trend of daily load under this date type, and provides the basic pattern of electricity demand during the day for this type of date. For example, it can reflect the correlation strength between morning peak load and evening peak load. For instance, the mean vector of a normal weekday will show a clear morning and evening peak pattern, while the mean vector of a normal Sunday may show a single peak or a relatively flat pattern.

[0058] Calculate the covariance matrix for each date type k. The covariance matrix It is an M×M symmetric matrix whose elements Let represent the covariance between the load value at the p-th time resolution and the load value at the q-th time resolution in the daily load curve for date type k, denoted as .

[0059] The covariance matrix It characterizes the joint changes and intrinsic correlation structure of load fluctuations in different time periods within this date type, reflecting the dynamic dependence of the daily load curve in the time dimension. For example, it can show whether there is a strong positive correlation between the morning peak load and the evening peak load. If the morning load is high, the evening load also tends to be high. A high covariance value indicates a period with more coordinated load fluctuations, so as to understand the intrinsic relationship of load patterns.

[0060] Furthermore, when the date type is the middle period of a holiday, based on the holiday duration characteristic obtained in step S2, it is split into two subsets: the middle period of a long holiday and the middle period of a short holiday. Then, the mean vectors are calculated independently for the middle period subset of the long holiday and the middle period subset of the short holiday. and and covariance matrix and For example, for a 7-day Spring Festival holiday, the 3rd, 4th, and 5th days are classified as the middle of the holiday; while for a 3-day Qingming Festival holiday, the 2nd day is classified as the middle of the holiday. This segmentation can more accurately capture the differences in load patterns between the middle of long and short holidays. For example, the middle of a long holiday may show a lower overall load level and a flatter load curve, which can reflect the prevalence of residents' travel or leisure activities; while the load in the middle of a short holiday may be closer to that of a normal weekend, but there are still obvious household load characteristics at certain times.

[0061] Obtain the mean vector Covariance Matrix Then, time alignment is performed to ensure the accurate correspondence of daily load curves for different date types or different years on the time axis, unifying all load curves to the standard time. The mean vector and covariance matrix of each date type are stored as their corresponding load pattern features for subsequent model calls.

[0062] During the model training phase, the acquisition of the load pattern features effectively overcomes the shortcomings of existing methods that ignore the temporal correlation and pattern differences within the same date range. The mean vector... The shape of the daily load curve for this date type is provided, which can be used for subsequent verification of the reasonableness of the forecast results. The covariance matrix... This reveals the correlation between different time periods within the daily load. Its high covariance value indicates periods where load fluctuations are more coordinated, which can be used in more advanced models to guide attention mechanisms or feature weighting, thereby enhancing the model's ability to capture load changes during key periods and thus making predictions more accurate.

[0063] In step S4, a time series prediction model is obtained based on historical power load sequences, meteorological data, and date type labels, using a gated cyclic unit. In one possible implementation, a time series forecasting model is obtained based on a gated cyclic unit, using historical power load sequences, meteorological data, date type labels, and load pattern characteristics. This model includes: Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units. Based on the date type label, obtain its historical load subsequence; In the second historical load subsequence of the second date type label: Based on the historical power load sequence of the first time window, and based on the meteorological data in the corresponding time window, the second historical power load sequence is time-aligned with the meteorological data in the corresponding time window of the historical power load sequence, and the encoding of the second date type label is marked as the first feature; Based on the mean vector and covariance matrix corresponding to the second date type, this load pattern feature is taken as the second feature; The third feature is the historical power load sequence of the next set-length time window following the first time window of the past ringing. The time series prediction model is formed by training a gated recurrent unit layer using the first or second feature matrix as the input feature vector and the third feature as the output feature vector.

[0064] In one possible implementation, the gated loop unit layer includes one or more stacked gated loop units; Each gated recurrent unit receives the current input feature vector and the hidden state of the previous time step at each time step, and outputs the hidden state of the current time step. Each gated loop unit includes an update gate and a reset gate connected in sequence; The reset gate is configured to control the degree of influence of the hidden state of the previous time step on the current candidate hidden state; The update gate is configured to control the degree of influence of the previous hidden state being brought to the current time step, and the degree of influence of the new candidate hidden state on updating the current time step; The candidate hidden state is configured to calculate new state information by combining the current input and the previous hidden state that has been weighted by the reset gate.

[0065] Then we define a loss function to serve as a scoring criterion, allowing us to intuitively understand how far the model's predicted values ​​are from the true values.

[0066] In one possible implementation, the training gated recurrent unit layer forms the time series prediction model, and further includes: Based on the first and second features, the predicted power load is obtained using a time series prediction model. Based on the actual power load and predicted power load of the third feature, and using the preset normal weights of the prediction errors for each date type, a weighted mean square error is obtained as the loss function. Determine the current date type. If the date type is any one of the first day of a holiday, the last day of a holiday, or the last day of a workday, then based on the actual power load and predicted power load of the third feature, and using the high-value weight of the prediction error for each date type as a preset weight, obtain the weighted mean square error as the loss function.

[0067] Historical power load sequences, meteorological data, date type labels, and load pattern characteristics. In the implementation of this application embodiment, during the model construction process, the corresponding historical load subsequence is first found based on the date type label. For a specific date type, the historical power load sequence within a time window of a set length is selected, and meteorological data within that time window is obtained. A multi-dimensional time series is formed by aligning the timestamps. The date type label is also encoded as a discrete feature vector. For example, the eight date types are converted into eight-dimensional one-hot codes. The encoding of the date type label is concatenated with the historical power load sequence and meteorological data to form the first feature. At the same time, the mean vector and covariance matrix corresponding to the date type label are obtained, and this load pattern feature is used as the second feature input to the model.

[0068] However, the output of the time series prediction model is the future power load sequence of a set length immediately following the time window. Therefore, we select the historical power load sequence of the next set length immediately following the time window of the past as the third feature. Then, based on the power load sequence predicted by the time model and the actual power load sequence of the third feature, we find the loss function, score the time series prediction model, and then adjust the model's weights and parameters through the optimizer. We then input the first or second feature again to make predictions, and so on, in a training cycle.

[0069] The gated recurrent unit (GRU) arranges the input features in time steps, controls the retention ratio of historical states through update gates, adjusts the impact of the current input on state updates through reset gates, passes the hidden state layer by layer, and finally outputs the predicted value. During training, for prediction errors of special date types such as the first and last days of holidays, higher weights can be given in the loss function to improve the ability to capture load changes at special time nodes.

[0070] In the implementation of the application, based on historical power load sequences and meteorological data, as well as date type labels, a time series prediction model is constructed by stacking one or more gated recurrent units. Compared with traditional recurrent neural networks and long short-term memory networks, gated recurrent units have a simpler structure and fewer parameters, but they exhibit comparable or even better performance in many sequence modeling tasks.

[0071] The time series forecasting model consists of an input layer, a gated recurrent unit layer consisting of one or more gated recurrent units, and an output layer.

[0072] Then, based on the first or second feature, it is input to the input layer, which receives and processes the multidimensional time series features. This multidimensional time series feature is then the input feature vector for each time step t. Each input feature vector These all integrate multiple pieces of information, including at least historical power load characteristics, meteorological data characteristics, date type label characteristics, and load pattern characteristics, among which: Historical power load characteristics include at least the actual power load sequence within a set past time window prior to the current time step t. Within the set past time window, such as the past 24 hours, 48 ​​hours, or longer, typically set to 2–7 days, the periodicity of load within a day and week can be captured. These raw historical load data can then be further extracted into moving averages, trend features such as load change rate, and volatility features such as standard deviation. This increases the input, enriches the input information, and helps the model understand the dynamic evolution of the load.

[0073] Meteorological data features include at least the meteorological forecast data corresponding to the current time step t and several future time steps, such as temperature, humidity, wind speed, and light intensity. These meteorological forecast data are obtained through meteorological forecast services and are synchronized with the current forecast time based on their relative positions. For example, if the load is predicted for the next 24 hours, hourly or 15-minute meteorological forecast data for the next 24 hours must be entered.

[0074] The date type label features are the multi-level date type labels obtained through one-hot encoding in step S2, which are used as discrete feature inputs. For example, for the date type k corresponding to the current time step t, its one-hot encoded vector is directly appended to the input feature vector. In this way, the model can distinguish the unique load patterns of different date types.

[0075] The load pattern feature is the mean vector corresponding to the current date type k obtained in step S3. Configured as additional auxiliary input features, where: The mean vector It can be copied and used with the input at each time step. The mean vector can be concatenated or fed as an independent auxiliary input to a gated recurrent unit layer or a subsequent fully connected layer. It provides the model with a typical pattern reference of daily load under the current date type, which helps the model to be calibrated during the forecasting process and avoids the forecast values ​​deviating significantly from the historical load profile of this date type.

[0076] A gated recurrent unit layer is composed of one or more gated recurrent units stacked together. Its depth is usually set to 1-4 layers because this best balances the learning ability of the model with the computational cost.

[0077] Each gated loop unit receives the current input feature vector at time step t. The hidden state of the previous time step Output the hidden state at the current time step. The gated recurrent unit (ROU) includes a gating mechanism, consisting of update gates and reset gates. This gating mechanism effectively mitigates the vanishing or exploding gradient problems in traditional recurrent neural networks by selectively memorizing and forgetting information. Because our electricity load exhibits multiple periodicities, including complex time series spanning at least daily, weekly, quarterly, and yearly periods, the use of a gated ROU enables the model to learn and capture long-term temporal dependencies. The computation process of the gated ROU includes sequentially connected update and reset gates, wherein: Update Gate Represented as:

[0078] The update gate Control the previous hidden state How much information is transmitted to the current hidden state? In this context, a value closer to 1 indicates that more historical information is retained, while a value closer to 0 indicates that more historical information is forgotten. This represents the Sigmoid activation function, whose output range is [0,1], and is used to generate gated signals; It updates the weight matrix of the gate. It is the bias vector.

[0079] Reset door Represented as:

[0080] The reset door RTRT control is in the previous hidden state. How much information is used to compute the current candidate hidden state? A value close to 0 indicates that most historical information is ignored, so it focuses only on the current input and can better handle abrupt changes in time series. It is the weight matrix of the reset gate. It is the bias vector.

[0081] Then, the candidate hidden states Represented as:

[0082] The candidate hidden state Includes the current input And the previous hidden state after selective filtering via the reset gate Information; It is the hyperbolic tangent activation function, with an output range of [-1, 1], used to capture non-linear relationships in features; It is the weight matrix of the candidate hidden states. It is the bias vector; It is element-wise multiplication, which enables gating to selectively apply information.

[0083] Hidden state Represented as:

[0084] The current hidden state It is the previous hidden state With the current candidate hidden state The weighted combination, whose weights are determined by the update gate This mechanism enables the gated loop unit to dynamically adjust the degree of historical information retention based on the importance of the input data, effectively balancing the preservation of historical patterns with the response to the current input.

[0085] The output layer is configured to receive the final hidden states from the gated recurrent unit layer. This is for predicting only the last time step, or for predicting the hidden states of all time steps, which is for sequence-to-sequence prediction tasks, such as predicting the load curve for the next 24 hours. The output layer is designed to consist of one or more fully connected layers that map these hidden states to load forecasts within future time windows.

[0086] In this embodiment, because electrical load is a continuous physical quantity, the output layer uses a linear activation function to output continuous load prediction values. For example, if the load is predicted for the next 24 hours, and 24 hours is 96 15-minute time resolutions, then the output layer will have 96 neurons, each corresponding to the predicted load value for one time step.

[0087] The training process of the time series prediction model minimizes the prediction error by optimizing the loss function and using the backpropagation algorithm and optimizer to update the weights.

[0088] First, historical data is organized into a sequence of input-output pairs. For each training sample, the input sequence includes historical load data, meteorological data, date type labels, and load pattern features over a past period, while the output sequence is the actual load value for a future period. A training dataset is constructed using a sliding window on the historical electricity load sequence to generate a large number of samples with temporal context. For example, using historical data from the past 7 days as input (672 15-minute time steps), the model predicts data for the next day (96 15-minute time steps). The size and step size of the sliding window affect the model's learning efficiency and generalization ability and need to be adjusted through repeated experiments.

[0089] To improve the stability and convergence speed of model training, all input features, including historical load, meteorological data, and mean vector, are standardized before being input into the model. In this embodiment, Min-Max normalization is used to scale the data to the [0,1] interval. The output target, i.e., the actual power load value, is also standardized in the same way, and an inverse transformation is performed when predicting the output to restore the original dimensions.

[0090] This application employs a weighted loss function for optimization during the model training phase to address the issues of large load fluctuations and high prediction difficulty on specific date types, such as holidays. This significantly improves the model's prediction accuracy at these critical time points. The weighted loss function assigns higher weights to the prediction errors corresponding to the first and last days of holidays and the last working day. These critical dates often exhibit significantly different load curves from ordinary working days or weekends due to substantial changes in social activity patterns, thus requiring greater attention from the model.

[0091] In this embodiment, the loss function L is defined as the weighted mean square error, expressed as:

[0092] in: This is the number of samples in each training batch; It is the total number of time steps within the predicted time window, for example, 96 15-minute time steps corresponding to the next 24 hours; It is the actual power load value of the i-th sample at time step t; It is the model prediction value of the i-th sample at time step t; It is a weighting factor assigned to the prediction error of the i-th sample at time step t, the weighting factor The setting rules are as follows: If the date type label corresponding to the i-th sample at time step t belongs to any of the following categories: the first day of a holiday, the last day of a holiday, or the last day of a workday, then , It is a preset weight value that is significantly greater than 1, such as 1.5, 2.0, 2.5 or higher.

[0093] If the date type label corresponding to the i-th sample at time step t is any of the other date types besides the dates mentioned above, then , It is a preset baseline weight value, usually equal to 1.

[0094] By employing the weighted loss function, the model will pay more attention to date types with variable load patterns that have a significant impact on grid operation stability and dispatch optimization during training. This enables more accurate predictions at these critical time points, solving the problem that existing methods treat all date types equally in terms of prediction error, resulting in insufficient prediction accuracy on special dates.

[0095] The parameters of the time series forecasting model include the weight matrix of the gated recurrent unit layer. The bias vector b can be updated using an existing optimizer such as Adam through a gradient descent optimization algorithm. The optimizer can dynamically adjust the learning rate of each parameter based on the historical first and second moments of the gradient, thereby accelerating convergence and improving training stability, and avoiding manual adjustment of the global learning rate.

[0096] The time series forecasting model is based on gated recurrent units, which can combine rich multi-level date type features and load pattern features. It also uses a weighted loss function to give higher learning priority to key dates during training. Most importantly, the gated recurrent units are good at handling long-term dependencies in time series data, which can further enhance the adaptability and accuracy of power load forecasting in complex and volatile load scenarios.

[0097] In step S5, based on the date type label of the day to be predicted, the historical load sequence of the set past time window, and the corresponding meteorological forecast data, the load prediction value for each preset time resolution within the set future time window is obtained based on the time series prediction model.

[0098] For the upcoming forecast date, firstly, according to the determination rules in step S2, accurately determine the multi-level date type label of the forecast date, such as the first day of a holiday and having the attribute of a long holiday, and obtain its corresponding load pattern characteristics, that is, the mean vector calculated in step S3. Then, the actual historical power load sequence within the set past time window is obtained, such as the actual historical power load sequence within the past 7 days or 24 hours consistent with the model training. These historical load data need to undergo the same preprocessing and standardization steps as the training data. Then, the weather forecast data corresponding to the day to be predicted and the set future time window, such as the next 24 hours, is obtained. The weather forecast data is obtained through official weather forecasts, and its time resolution matches the preset time resolution to ensure the timeliness and accuracy of the prediction input.

[0099] The prepared input data is used to construct a multi-dimensional feature vector sequence for model inference, following the same order and format as during model training. This feature vector sequence includes: a standardized historical power load sequence, a weather forecast data sequence, a date type label encoding for the forecast date, and a standardized mean vector for the forecast date. The date type label encoding for the forecast date is repeated in the feature vector at each time step to ensure that this date type information can be utilized throughout the entire forecast period. The mean vector for the forecast date... It serves as an auxiliary input, providing the model with baseline load profile information for that date type, further guiding the rationality of the model's prediction results.

[0100] The constructed feature vector sequence is input into the time series prediction model of the gated recurrent unit trained and obtained in step S4. This time series prediction model processes the input sequence step by step. Through the complex time series rules and feature mapping relationships learned internally, it finally generates standardized load prediction values ​​for each preset time resolution within a set future time window at the output layer.

[0101] The standardized load forecast values ​​output by the time series forecast model are inversely standardized to restore them to the original power load dimensions. The inverse standardization method must correspond to the standardization method used during training. Since we are using Min-Max normalization, the inverse standardization is expressed as follows:

[0102] Ultimately, the load forecast values, expressed in raw physical units, are obtained for each preset time resolution within the set future time window. Through the above steps, this application can efficiently and accurately utilize the learned complex time series patterns and date patterns to quantitatively assess the power load in a specific future time period, providing key data support for power grid dispatching decisions, such as formulating power generation plans, optimizing power grid operation modes, and conducting power market transactions.

[0103] In order to continuously adapt to seasonal changes, long-term trends, and fluctuations in power load caused by socio-economic activities or policy adjustments, this application introduces a dynamic update mechanism: when the actual power load is added for each day, the mean vector and covariance matrix of each type of date subsequence are recalculated to obtain the rolled-up load pattern characteristics and the rolled-up time series prediction model, so as to adapt to seasonal changes or changes caused by long-term trends in the load pattern.

[0104] In one possible implementation, specifically in this embodiment, step S6 is also included.

[0105] Step S6: After each additional day of actual power load, recalculate the mean vector and covariance matrix of each type of date subsequence to obtain the load pattern characteristics and the time series prediction model after rolling updates, so as to adapt to the seasonal changes in load patterns.

[0106] In the implementation of this application embodiment, after the daily actual power load data is acquired, cleaned, and aligned, the newly added data is integrated into the corresponding historical power load sequence. Simultaneously, the date type label for that date is determined by step S2, and the corresponding meteorological observation data is also added to the corresponding historical database. This process is typically automated and executed daily. Then, for each date type k obtained in step S3, the mean vector... Covariance Matrix It is updated on a rolling basis as new data is added.

[0107] In the implementation of this application embodiment, when a new date is added and the date type is k, the daily load curve is then... The data will be incorporated into the historical load subsequence of date type k, and then the mean vector of date type k will be updated using an incremental update algorithm or by recalculation. Covariance Matrix .

[0108] When the covariance matrix is ​​updated incrementally, it is represented as

[0109] in, It represents the number of historical samples of date type k before the update, allowing new samples to be incorporated into the mean calculation without recalculating all historical data.

[0110] Incremental updates of the covariance matrix involve more complex matrix operations, but the core idea is to use the old mean, covariance, and new sample to calculate new statistics, avoiding re-traversing all historical data. In this embodiment, the incremental update of the covariance matrix is ​​represented as follows:

[0111] To reduce computational complexity, in practice, we recalculate the mean vector of all historical daily load curves for date type k after accumulating a certain number of new samples, for example, after accumulating 5-10 additional samples of the same date type, or periodically, such as weekly or monthly. Covariance Matrix The update operations are typically performed periodically, such as fine-tuning the mean vector daily and updating the covariance matrix weekly.

[0112] After updating the mean vector and covariance matrix, our load pattern characteristics are updated, and the time series prediction model obtained in step S4 is also updated on a rolling basis.

[0113] However, at this point, our time series forecasting model can be updated periodically, such as monthly or quarterly. This involves using all the latest historical data, including new data and updated load pattern features, to completely retrain the time series forecasting model. This method requires high computational resources, but it can ensure that the model learns the latest load patterns and fully adapts to long-term changes in data distribution. For example, if the amount of data is in the millions, a full retraining may take a long time.

[0114] We can also fine-tune the weights of an existing trained time series prediction model more frequently, such as weekly or daily, using newly added historical data from a recent period, such as the past month or quarter, along with updated load pattern features. This allows for the use of a smaller learning rate and fewer training cycles, enabling the model to quickly adapt to the latest changes without excessively forgetting old, stable patterns. This method is computationally efficient and suitable for scenarios that require frequent updates.

[0115] The rolling update mechanism ensures that the forecasting model can continuously adapt to load fluctuations in power load patterns, including seasonal changes such as summer air conditioning load and winter heating load, or long-term trends such as load growth brought about by the popularization of electric vehicles, as well as other situations caused by socio-economic activities or policy adjustments, such as industrial restructuring and the implementation of energy-saving policies, thereby effectively maintaining and improving the forecasting adaptability of the time series forecasting model.

[0116] Example 3 This is the third embodiment of this application. Based on embodiments 1 and 2, please refer to the following references. Figure 3 This embodiment provides a time-series-based power load forecasting system, including a data acquisition unit for sequential electrical connections, a multi-level date tagging unit, a load pattern feature extraction unit, a forecasting model construction unit, and a load forecasting unit; The data acquisition unit is configured to acquire historical power load sequences, as well as corresponding date information and meteorological data, according to a preset time resolution. The multi-level date tag construction unit is configured to: based on the relative position of the date in the historical power load sequence and its relationship with the date information, and based on a preset determination rule, encode the date type tags of the multi-level date type; The load pattern feature extraction unit is configured to: obtain load pattern features for each date type based on historical power load sequences and date type labels; The predictive model building unit is configured to: obtain a time series predictive model based on a gated cyclic unit, using historical power load sequences, meteorological data, and date type labels; The load forecasting unit is configured to: obtain the load forecast value for each preset time resolution within a set future time window based on the date type label of the day to be forecasted, the historical load sequence of a set past time window, and the corresponding meteorological forecast data, according to the time series forecasting model.

[0117] In the implementation of the application embodiments, this application further proposes a time-series-based power load forecasting system, including a data acquisition unit with sequential electrical connections, a multi-level date tagging unit, a load pattern feature extraction unit, a forecasting model construction unit, and a load forecasting unit. The data acquisition unit is configured to acquire historical power load sequences and corresponding date information and meteorological data according to a preset time resolution. The multi-level date tagging unit is configured to generate multi-level date type tags by encoding them according to preset judgment rules based on the relative position of dates in historical power load sequences and their correlation with date information. The load pattern feature extraction unit is configured to extract load pattern features of each date type according to historical power load sequences and date type tags. The forecasting model construction unit is configured to combine historical power load sequences, meteorological data, date type tags, and load pattern features to construct a time-series forecasting model using a gated loop unit. The load forecasting unit is configured to generate load forecast values ​​within future time windows based on the date type tags of the day to be predicted, historical load sequences, and meteorological forecast data through the time-series forecasting model.

[0118] The data acquisition unit refers to the hardware or software module used to acquire raw data, which can be implemented using smart meters, weather sensors, and time synchronization devices. Its function is to provide a complete input data foundation for subsequent processing. The multi-level date tagging unit is a processor that performs structured encoding of date features, which can be implemented using a preset date determination rule algorithm. Its function is to transform date information into time-series-related classification labels to solve coarse-grained classification problems. The load pattern feature extraction unit is a computational module that calculates load statistical features, which can be implemented using mean vector and covariance matrix calculation methods. Its function is to extract stable load change patterns from similar date data. The prediction model building unit is the computational engine that trains the prediction algorithm, which can be implemented using a gated recurrent unit neural network architecture. Its function is to capture the time-series dependencies of load through sequence modeling. The load prediction unit is the output interface that generates prediction results, which can be implemented using time series inference algorithms. Its function is to transform input features into load prediction values ​​for future periods.

[0119] In the implementation of the application embodiment, the data acquisition unit uses a preset time resolution, which can be set to 15 minutes, to continuously collect historical power load data, and at the same time associate and store the corresponding date attributes and meteorological data such as temperature and humidity.

[0120] Then, a multi-level date tag unit is constructed. Based on the positional relationship of the date in the weekday chain and the holiday chain, a combined tag including 8 date types and holiday duration features is generated through traversal judgment rules.

[0121] The load pattern feature unit is extracted to perform statistical analysis on the historical load subsequence for each date type. For example, the 24-hour mean vector of the load curve for a normal working day is calculated, and the covariance matrix between different time periods is calculated to characterize the fluctuation correlation.

[0122] Then, a prediction model unit can be constructed, taking date type labels, meteorological data, and load pattern characteristics as inputs. The mapping relationship between historical sequences and future loads can be learned through a gated recurrent unit. For example, the load sequence of the past 7 days can be used to model the prediction target of the next day.

[0123] Finally, the load forecasting unit integrates real-time data and weather forecast information during the application phase, and outputs the predicted values ​​for each time resolution within the future time window through the trained model.

[0124] Compared to existing technologies, traditional systems typically use only binary classification labels for weekdays and holidays. This system, however, effectively distinguishes load patterns at different time points by constructing multi-level labels with eight subcategories, including the first and last days of holidays and adjusted workdays. Existing systems often use historical full data to calculate load characteristics, while this system uses a dynamic update mechanism to recalculate the mean and covariance matrix when new data arrives, enabling load pattern characteristics to adapt to seasonal changes. Traditional methods directly use date names as input features, while this system generates universal labels independent of specific holidays through location coding rules, avoiding model failure caused by fluctuations in holiday dates.

[0125] Through the aforementioned technical application, this application solves the problem of excessive prediction errors for special dates caused by the ambiguity of date feature expression in traditional power load forecasting systems. By using multi-level date labels and a dynamic feature update mechanism, the load forecasting accuracy for key time nodes such as the first and last days of holidays and adjusted workdays is significantly improved. By combining the characteristics of the duration of holidays with the correlation of load fluctuations, the system effectively identifies different electricity consumption patterns during long and short holidays, avoiding prediction deviations caused by differences in holiday length. The dual modeling approach combining gated cyclic units and statistical features not only captures the temporal dependence of load sequences but also strengthens the common patterns of similar dates, enhancing the model's generalization ability for date combinations.

[0126] Example 4 The fourth embodiment of the present invention differs from the previous embodiments in that: Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.

[0128] The units described as separate components may or may not be physically separate. As will be apparent to those skilled in the art, the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0129] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0130] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or grid device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

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

Claims

1. A time-series-based power load forecasting method, characterized in that, include: Based on the preset time resolution, historical power load sequences, along with corresponding date information and meteorological data, are obtained. Based on the relative position of the date in the historical power load sequence and its relationship with date information, and based on preset judgment rules, date type labels of multi-level date types are obtained through encoding. Based on historical power load sequences and date type labels, the load pattern characteristics for each date type are obtained; Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units; this also includes adding weights to specific data points. Based on the date type label of the day to be predicted, the historical load sequence of the past time window, and the corresponding meteorological forecast data, the load prediction value for each preset time resolution within the set future time window is obtained based on the time series prediction model.

2. The power load forecasting method based on time series data according to claim 1, characterized in that, The process involves encoding the date based on its relative position in the historical power load sequence and its relationship with date information, according to preset determination rules, to obtain multi-level date type labels, including: Based on the relative position of the date in the historical power load sequence and its relationship with holidays in the date information, each date is divided into at least 8 date type labels, which include at least: ordinary working day, last day of working day, workday with adjustment, first day of holiday, middle period of holiday, last day of holiday, ordinary Saturday, and ordinary Sunday. Based on the preset determination rules, each date is traversed to obtain the date type label for each date; wherein the preset determination rules include: If a certain day is a statutory working day and the following day is a statutory public holiday, then it is marked as the last working day; If a certain day is a statutory holiday and the previous day is a working day, then it is marked as the first day of the holiday; If a certain day is a statutory holiday and the following day is a working day, then it is marked as the last day of the holiday; If a day is a weekend workday due to a work-off arrangement, it is marked as a workday with work-off due to work-off arrangements. The remaining weekdays are marked as ordinary weekdays, and Saturdays and Sundays that are not adjusted workdays or holidays are marked as ordinary Saturdays and ordinary Sundays, respectively. The date type label for each date also includes a holiday duration feature; the holiday duration feature is configured such that if the number of consecutive statutory holidays is greater than 3 days, the dates within the statutory holidays are marked as long holidays, otherwise they are short holidays.

3. The power load forecasting method based on time series data according to claim 1, characterized in that, The process of obtaining load pattern characteristics for each date type based on historical power load sequences and date type labels includes: Based on the historical power load sequence and date type label, obtain the historical load subsequence for each date type; Based on the historical load subsequences of each date type, the mean vector and covariance matrix of each date type are obtained by calculating the daily load curve of each date subsequence; Based on the mean vector and covariance matrix of the date type, the load pattern characteristics of the corresponding date type are obtained.

4. The time-series-based power load forecasting method according to any one of claims 2 and 3, characterized in that, The process of obtaining load pattern characteristics for each date type based on historical power load sequences and date type labels includes: Based on the historical power load sequence and date type labels, the historical load data is divided into 8 independent historical load subsequences according to 8 date type labels, and the historical load subsequence for each date type is obtained; The step of obtaining the mean vector and covariance matrix for each date type by calculating the daily load curve of each date type's historical load subsequence includes: Based on the historical load subsequences of each date type, obtain the daily load curves on the historical load subsequences of each date type; For the first historical load subsequence of the first date type, obtain the first day load curve; based on the first day load curve, calculate the average load value within each preset time resolution, and obtain the first-order feature of the first day load curve as the mean vector; For the first historical load subsequence of the first date type, obtain the load curve of the first day; based on the load curve of the first day, calculate the covariance of the load values ​​within one preset time resolution and another preset time resolution, and obtain the second-order feature of the load curve of the first day as the covariance matrix. When the date type is the historical load subsequence during the middle of a holiday, based on whether the label is a long holiday or a short holiday, the historical load subsequence during the middle of a long holiday and the historical load subsequence during the middle of a short holiday are obtained. Based on the historical load subsequences of the long holiday and the short holiday, a mean vector is obtained. Based on the mean vector and covariance matrix obtained for each date type, the load pattern characteristics of each date type are obtained after time alignment.

5. The power load forecasting method based on time series data according to claim 1, characterized in that, Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units, including: Based on historical power load sequences, meteorological data, date type labels, and load pattern characteristics, a time series forecasting model is obtained using gated cyclic units. Based on the date type label, obtain its historical load subsequence; In the second historical load subsequence of the second date type label: Based on the historical power load sequence of the first time window, and based on the meteorological data in the corresponding time window, the second historical power load sequence is time-aligned with the meteorological data in the corresponding time window of the historical power load sequence, and the encoding of the second date type label is marked as the first feature; Based on the mean vector and covariance matrix corresponding to the second date type, this load pattern feature is taken as the second feature; The third feature is the historical power load sequence of the next past time window of a set length adjacent to the first past time window; The time series prediction model is formed by training a gated recurrent unit layer using the first or second feature matrix as the input feature vector and the third feature as the output feature vector.

6. The time-series-based power load forecasting method according to claim 5, characterized in that, The gated loop unit layer includes one or more stacked gated loop units; Each gated recurrent unit receives the current input feature vector and the hidden state of the previous time step at each time step, and outputs the hidden state of the current time step. Each gated loop unit includes an update gate and a reset gate connected in sequence; The reset gate is configured to control the degree of influence of the hidden state of the previous time step on the current candidate hidden state; The update gate is configured to control the degree of influence of the previous hidden state being brought to the current time step, and the degree of influence of the new candidate hidden state on updating the current time step; The candidate hidden state is configured to calculate new state information by combining the current input and the previous hidden state that has been weighted by the reset gate.

7. The time-series-based power load forecasting method according to claim 5, characterized in that, The training gated recurrent unit layer forms the time series prediction model, and also includes: Based on the first and second features, the predicted power load is obtained using a time series prediction model; Based on the actual power load and predicted power load of the third feature, and using the preset normal weights of prediction errors for each date type, a weighted mean square error is obtained as the loss function. Determine the current date type. If the current date type is any of the three date types: the first day of a holiday, the last day of a holiday, or the last day of a workday, then based on the actual power load and the predicted power load of the third feature, and using the high-value weight of the prediction error for each date type as a preset weight, obtain the weighted mean square error as the loss function.

8. The power load forecasting method based on time series data according to claim 1, characterized in that, Also includes: After each additional day of actual electricity load, the mean vector and covariance matrix of each type of date subsequence are recalculated to obtain the load pattern characteristics and the time series prediction model after rolling updates.

9. A time-series-based power load forecasting system, characterized in that, It includes a data acquisition unit with sequential electrical connections, a multi-level date tagging unit, a load pattern feature extraction unit, a prediction model construction unit, and a load prediction unit; The data acquisition unit is configured to acquire historical power load sequences, as well as corresponding date information and meteorological data, according to a preset time resolution. The multi-level date tag construction unit is configured to: based on the relative position of the date in the historical power load sequence and its relationship with the date information, and based on a preset determination rule, encode the date type tags of the multi-level date type; The load pattern feature extraction unit is configured to: obtain load pattern features for each date type based on historical power load sequences and date type labels; The predictive model building unit is configured to: obtain a time series predictive model based on a gated cyclic unit, using historical power load sequences, meteorological data, and date type labels; The load forecasting unit is configured to: obtain the load forecast value for each preset time resolution within a set future time window based on the date type label of the day to be forecasted, the historical load sequence of a set past time window, and the corresponding meteorological forecast data, according to the time series forecasting model.

10. A computer system device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.