Power load prediction method, device, equipment, medium and program product

By acquiring date and weather characteristics, the data blocked time series converter model is trained, which solves the problem of missing features caused by load data delay, and improves the accuracy and robustness of power load prediction, especially during holidays and extreme weather scenarios Down.

CN119154288AInactive Publication Date: 2024-12-17ZHEJIANG XIAOJU GREEN ENERGY TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411629112.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the power load prediction, the latest period characteristics are missing due to the delay of load data, resulting in low accuracy of prediction results. Especially in non-periodic scenarios such as holidays and extreme weather, the prediction results are inaccurate.

Method used

By obtaining the date characteristics and weather characteristics of the time period to be predicted, the time series converter model based on data blocks is trained to the target load prediction model, and the association relationship between power load and time, weather and other factors are learned to avoid the problem of missing features and improve the model Robustness in non-periodic scenarios.

Benefits of technology

It effectively improves the accuracy of the power load prediction results, reduces the adverse impact of holidays and extreme weather on the prediction results, and improves the robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119154288A_ABST
    Figure CN119154288A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a power load prediction method and device, equipment, a medium and a program product, and the method comprises the steps: determining first time sequence feature data corresponding to a preset time period based on date features and weather features corresponding to each day in the to-be-predicted preset time period; on the basis of the first time sequence characteristic data, through a target load prediction model, a load prediction result corresponding to a preset time period is obtained through prediction; the target load prediction model is a time sequence converter model based on data blocks; the target load prediction model is obtained by training the initial load prediction model based on second time sequence characteristic data corresponding to a historical time period and corresponding load label data; and the second time sequence characteristic data is determined based on the date characteristic and the weather characteristic corresponding to each day in the historical time period, so that the adverse effects of data time delay, holidays, extreme weather and the like can be avoided or reduced, and the accuracy of a load prediction result is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to electric power technology and artificial intelligence technology, and in particular to an electric power load forecasting method, device, equipment, medium and program product. Background Art

[0002] With the rapid development of the global economy and the acceleration of urbanization, the power system is facing increasing challenges. Accurate prediction of power demand is crucial for the stable operation of the power grid, the effective management of energy, and the integration of renewable energy. In related technologies, the power load required for a certain period of time in the future is usually predicted based on the periodicity of historical load data. However, due to the large delay in obtaining load data, the load data for the most recent period is missing, that is, the characteristics of the most recent period used for prediction are missing, resulting in low accuracy of the prediction results. Summary of the invention

[0003] Embodiments of the present disclosure provide a method, apparatus, device, medium, and program product for predicting power load to improve the accuracy of power load prediction results.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a method for predicting electric load, comprising: obtaining date characteristics and weather characteristics corresponding to each day in a preset time period to be predicted; determining first time series characteristic data corresponding to the preset time period based on the date characteristics and weather characteristics corresponding to each day in the preset time period; predicting and obtaining a load prediction result corresponding to the preset time period through a target load prediction model based on the first time series characteristic data; the target load prediction model is a time series transformer model based on data block; the target load prediction model is obtained by training an initial load prediction model based on second time series characteristic data corresponding to a historical time period and load label data corresponding to the second time series characteristic data; the second time series characteristic data is determined based on the date characteristics and weather characteristics corresponding to each day in the historical time period; wherein the date characteristics corresponding to each day include the position information of the day in a year, the position information of the day in a week, the status information of whether the day is a rest day, the total number of rest days of the day in the case of a rest day, and the position information of the day in the rest day; the weather characteristics include the temperature, precipitation, and wind force corresponding to the day.

[0005] According to a second aspect of an embodiment of the present disclosure, there is provided an electric load prediction device, comprising: an acquisition module, for acquiring date characteristics and weather characteristics corresponding to each day in a preset time period to be predicted; determining first time series characteristic data corresponding to the preset time period based on the date characteristics and weather characteristics corresponding to each day in the preset time period; a first processing module, for predicting and obtaining a load prediction result corresponding to the preset time period through a target load prediction model based on the first time series characteristic data; the target load prediction model is a time series transformer model based on data block; the target load prediction model is obtained by training an initial load prediction model based on second time series characteristic data corresponding to a historical time period and load label data corresponding to the second time series characteristic data; the second time series characteristic data is determined based on the date characteristics and weather characteristics corresponding to each day in the historical time period; wherein the date characteristics corresponding to each day include the position information of the day in a year, the position information of the day in a week, the status information of whether the day is a rest day, the total number of rest days of the day in the case of a rest day, and the position information of the day in the rest day; the weather characteristics include the temperature, precipitation, and wind force corresponding to the day.

[0006] According to a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the power load forecasting method described in any of the above embodiments of the present disclosure.

[0007] According to a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the power load forecasting method described in any of the above embodiments of the present disclosure; or, the electronic device comprises: the power load forecasting device provided in any of the above embodiments.

[0008] A fifth aspect of the embodiments of the present disclosure provides a computer program product. When the instructions in the computer program product are executed by a processor, the power load forecasting method provided by any of the above embodiments of the present disclosure is executed.

[0009] Based on the power load forecasting method, device, equipment, medium and program product provided by the above-mentioned embodiments of the present disclosure, the load forecasting result of the preset time period can be obtained based on the target load forecasting model and the first time series feature data of the specified preset time period. Since the second time series feature data of the training phase of the target load forecasting model is determined based on the date features and weather features corresponding to each day in the historical time period, the model can learn the correlation between power load and time, weather and other factors. In the prediction phase, the date features and weather features of the preset time period to be predicted are both available, which can avoid the problem of missing input features for prediction. Therefore, the model can be provided with external environmental input features such as date and weather related to the power load, avoiding or reducing the problem of missing features caused by the time delay of load data. In addition, the date features include multidimensional features of the correlation between each day and holidays, and the weather features include multidimensional features such as temperature, precipitation, wind force, etc. of each day. Combined with the time series transformer (Patch Time) of data segmentation The PATCHTST model has a high focus on global features and is good at capturing long-distance dependencies. It can effectively improve the robustness of the model in non-periodic scenarios such as holidays and extreme weather, avoid or reduce the adverse effects of holidays, extreme weather and other factors on load forecasting results, thereby effectively improving the accuracy of load forecasting results. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is an exemplary application scenario of the power load forecasting method provided by the embodiment of the present disclosure; Figure 2 is a flowchart of a method for predicting power load provided by an exemplary embodiment of the present disclosure; Figure 3 is a flow chart of a power load forecasting method provided by another exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of a training process of a target load prediction model provided by an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram of a training process of a target load prediction model provided by another exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram of a training process of a target load prediction model provided by another exemplary embodiment of the present disclosure; Figure 7 is a flow chart of a power load forecasting method provided by another exemplary embodiment of the present disclosure; Figure 8 is a flowchart of a power load forecasting method provided by yet another exemplary embodiment of the present disclosure; Fig. 9is a flowchart of determining a time-sharing proportion prediction result provided by an exemplary embodiment of the present disclosure; Fig.10 is a flowchart of determining a time-sharing proportion prediction result provided by another exemplary embodiment of the present disclosure; Fig.11 is a schematic diagram of the principle of a bidirectional sliding window provided by an exemplary embodiment of the present disclosure; Fig.12 is a schematic diagram of the network structure of a time-sharing proportion prediction model provided by an exemplary embodiment of the present disclosure; Fig.13 is a schematic diagram of the structure of a residual sub-network provided by an exemplary embodiment of the present disclosure; Fig.14 is a schematic diagram of a network structure of a load forecasting model provided by an exemplary embodiment of the present disclosure; Fig.15 is a structural schematic diagram of a power load prediction device provided by an exemplary embodiment of the present disclosure; Fig.16 is a structural schematic diagram of a power load prediction device provided by another exemplary embodiment of the present disclosure; Fig.17 is a structural schematic diagram of a second processing module provided by an exemplary embodiment of the present disclosure; Fig.18 is a structural schematic diagram of a third processing module provided by an exemplary embodiment of the present disclosure; Fig.19 is a structural schematic diagram of a power load prediction device provided by another exemplary embodiment of the present disclosure; Fig. 20 is a structural schematic diagram of a power load prediction device provided by another exemplary embodiment of the present disclosure; Fig.21 is a structural diagram of a fifth processing module provided by an exemplary embodiment of the present disclosure; Fig. 22 is a structural schematic diagram of a power load prediction device provided by an exemplary embodiment of the present disclosure; Fig.23 is a structural schematic diagram of a power load forecasting system provided by an exemplary embodiment of the present disclosure; Fig.24 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0011] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0012] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0013] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.

[0014] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0015] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.

[0016] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0017] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0018] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0019] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0020] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0021] SUMMARY OF THE DISCLOSURE In the process of realizing the present disclosure, the inventors found that in the related technologies of power load forecasting, the power load required for a certain period of time in the future is usually predicted based on the periodicity of historical load data, for example, the power load of the time period to be predicted is predicted based on the historical load data of one or more days before the time period to be predicted. However, due to the large delay in obtaining load data, for example, only the real load data of n (n is a positive integer, such as n=4) days ago can be obtained on the same day, resulting in the lack of historical load data for the most recent period (n days). The periodicity and regularity of the historical load data of these n days are unknown, resulting in the lack of features of the most recent time period used for prediction, making the prediction result less accurate.

[0022] Exemplary Overview Figure 1 This is an exemplary application scenario of the power load forecasting method provided by the embodiment of the present disclosure. Figure 1As shown, the power load forecasting method provided by the embodiment of the present disclosure can be executed by the power load forecasting device 10 provided by the embodiment of the present disclosure. The preset time period can be any time period after the historical time period in which the real load data can be obtained at present. For example, the historical time period in which the real load data can be obtained is the time period n days before the current date. The preset time period can include the latest n days and the future m days. The first time series feature data includes at least one of the time feature and the weather feature corresponding to the preset time period. The first time series feature data can be data based on any time granularity. For example, the time granularity can be day (or day), hour or other granularity (such as M day, J hour, etc., M and J are both positive integers). The time granularity is the basic unit for managing the power load (or power load value). For example, if the time granularity is day (i.e. 1 day), the first time series feature data includes the feature data corresponding to each day in the preset time period. Using the power load forecasting method provided by the embodiment of the present disclosure, the first time series feature data corresponding to the preset time period can be obtained, and based on the first time series feature data, the load forecast result corresponding to the preset time period is predicted by the target load forecasting model. The target load forecasting model is obtained by training the initial load forecasting model based on the second time series feature data corresponding to the historical time period and the load label data corresponding to the second time series feature data; the second time series feature data includes at least one of the time features and weather features corresponding to the historical time period. The historical time period can be all time periods or the most recent time period in which real load data can be obtained. The time granularity of the first time series feature data is consistent with that of the second time series feature data. The initial load forecasting model can be an initialized model or a pre-trained model, for example, the initial load forecasting model can be the model used in the previous forecast. The training of the initial load forecasting model can include training the initialized model and fine-tuning the pre-trained model, without specific limitation. Since the second time series feature data in the training stage includes at least one of the time features and weather features of the historical time period, the model can learn the correlation between power load and time, weather and other factors. In the prediction stage, the time features and weather characteristics of the preset time period to be predicted are both available, which can avoid the problem of missing input features for prediction. Therefore, effective input features can be provided for the model, thereby avoiding or reducing the feature missing problem caused by the time delay of load data, and can effectively improve the robustness of the model in non-periodic scenarios such as holidays and extreme weather, avoid or reduce the adverse effects of factors such as holidays and extreme weather on the accuracy of load forecasting results, thereby effectively improving the accuracy of load forecasting results.

[0023] Exemplary Methods Figure 2is a flowchart of a power load forecasting method provided by an exemplary embodiment of the present disclosure. The embodiments of the present disclosure can be applied to electronic devices, such as servers, terminal devices, etc. Figure 2 As shown, the power load forecasting method provided by the embodiment of the present disclosure may include the following steps: Step 210: Acquire first time series characteristic data corresponding to a preset time period to be predicted.

[0024] The first time series characteristic data includes at least one of a time characteristic and a weather characteristic corresponding to a preset time period.

[0025] In some optional embodiments, the preset time period may be any time period after the historical time period in which the real load data can be obtained. For example, the historical time period in which the real load data can be obtained is the time period before and including date A, such as the time period from date B to date A, and the preset time period may include a time period of a certain length after date A, such as the time period from the day after date A (date C) to date D. In practical applications, date D is a future date after the current date. For example, the current date is year a, month b, day c, date A is year a, month b, day (c-4), and date D is year a, month b, day (c+7).

[0026] In some optional embodiments, the time feature corresponding to the preset time period is an attribute representing the time corresponding to each power load value in the first time series feature data, such as the date attribute (or date feature) of the date corresponding to the power load value. The date attribute may include but is not limited to the day of the year that the day (date) belongs to, the day of the week that the day belongs to (i.e., the day of the week), whether the day belongs to a rest day (e.g., weekends, holidays, etc.), the day of the rest day that the day belongs to (in the case of a rest day), the total number of rest days (in the case of the day belonging to a rest day), etc. The weather feature corresponding to the preset time period is a weather attribute representing the time based on a certain time granularity in the preset time period. According to the time granularity of the first time series feature data (expressed as the first time granularity), the weather attribute may be an attribute based on the first time granularity. For example, when the time granularity of the first time series feature data is day (day), the weather attribute is an attribute of the day dimension, that is, the weather feature corresponding to the preset time period includes the weather feature corresponding to each day in the preset time period. When the time granularity based on the first time series feature data is hourly, the weather attribute is an attribute of the hourly dimension, that is, the weather characteristics corresponding to the preset time period include the weather characteristics of each time point (such as 0 o'clock, 1 o'clock, ..., 23 o'clock) in the preset time period. Weather characteristics include but are not limited to temperature, precipitation, wind speed, etc. If the preset time period includes a future time period, the weather characteristics corresponding to the future time period can be obtained from the predicted meteorological data.

[0027] Step 220: Based on the first time series characteristic data, a load forecast result corresponding to a preset time period is predicted by a target load forecasting model.

[0028] Among them, the target load prediction model is obtained by training the initial load prediction model based on the second time series feature data corresponding to the historical time period and the load label data corresponding to the second time series feature data; the second time series feature data includes at least one of the time characteristics and weather characteristics corresponding to the historical time period.

[0029] In some optional embodiments, the historical time period may be a time period consisting of all or part of the time during which real load data can be obtained, or the historical time period may be the most recent time period during which the latest load data can be obtained. For example, the time period during which new load data is obtained after the previous training model. For example, if the latest date on which real load data can be obtained is a date A n days before the current date, then the historical time period may be a time period of a certain length of time including date A and before. The types of specific feature contents of the time features and weather features included in the second time series feature data corresponding to the historical time period are similar to those of the first time series feature data corresponding to the preset time period, except that the second time series feature data includes at least one of the time features and weather features corresponding to the historical time period. For specific time features and weather features, please refer to the aforementioned content and will not be elaborated here.

[0030] In some optional embodiments, the load label data corresponding to the second time series feature data is a real power load value (referred to as load value) of the same time granularity as the second time series feature data. For example, the load label corresponding to the characteristics (including time characteristics and weather characteristics) of the i-th day is the load value of the i-th day. The load label data can be obtained based on historical load data of a historical time period.

[0031] In some optional embodiments, the initial load prediction model may be a pre-acquired model, for example, the initial load prediction model may be a pre-established initialization model with initialized network parameters. Alternatively, the initial load prediction model may be a pre-trained model with pre-trained network parameters. Alternatively, the initial load prediction model may be a model used in the previous prediction of power load. No specific limitation is given.

[0032] In some optional embodiments, the initial load forecasting model may be any time series forecasting model, such as various types of time series forecasting models based on Transformer, time series forecasting models based on other time series networks, and so on.

[0033] In some optional embodiments, the initial load forecasting model may adopt a PATCHTST (Patch TimeSeries Transformer) model to improve the global feature attention of the model, help capture long-distance dependencies, and further improve the accuracy of the load forecasting results.

[0034] In some optional embodiments, the second time series characteristic data can be processed based on the initial load forecasting model to obtain a forecasting result; based on the forecasting result and the load label data, the network parameters of the initial load forecasting model are updated to obtain an updated load forecasting model; and based on the updated load forecasting model, a trained target load forecasting model is determined.

[0035] In some optional embodiments, after obtaining the trained target load forecasting model, the target load forecasting model can be used to infer the first time series feature data to obtain the load forecasting result corresponding to the preset time period. The time granularity of the load forecasting result is consistent with the forecasting result of the training phase. For example, if the forecasting result of the training phase is the forecasting result of the day dimension, then the load forecasting result of the reasoning phase is the forecasting result of the day dimension. If the forecasting result of the training phase is the forecasting result of the hour dimension, then the load forecasting result of the reasoning phase is the forecasting result of the hour dimension. For example, taking the day dimension as an example, the load forecasting results for the above-mentioned date C to date D, a total of m days, are predicted. The load forecasting results include the power load forecast value corresponding to each day in the time period from date C to date D.

[0036] In some optional embodiments, the time granularity of the first time series feature data may be any time granularity, not limited to day (i.e., 1 day) or hour (i.e., 1 hour). For example, it may also be M (M is greater than 1) day, J (J is greater than 1) hour, etc.

[0037] In some optional embodiments, the first time series feature data includes time features corresponding to a preset time period.

[0038] In some optional embodiments, the first time series characteristic data includes weather characteristics corresponding to a preset time period.

[0039] In some optional embodiments, the first time series characteristic data includes time characteristics and weather characteristics corresponding to a preset time period.

[0040] In some optional embodiments, based on the fact that the first time series feature data includes at least one of the time feature and weather feature corresponding to a preset time period, the first time series feature data may also include position information, which is information characterizing the ordinal position between the features in the time series feature data.

[0041] It should be noted that the feature types included in the first time series feature data in the prediction phase are consistent with the second time series feature data in the training phase. For example, if the second time series feature data includes time features corresponding to a historical time period, the first time series feature data includes time features corresponding to a preset time period. If the second time series feature data includes weather features corresponding to a historical time period, the first time series feature data includes weather features corresponding to a preset time period. If the second time series feature data includes time features and weather features corresponding to a historical time period, the first time series feature data includes time features and weather features corresponding to a preset time period.

[0042] In some optional embodiments of the present disclosure, during each prediction, the initial load forecasting model can be trained or fine-tuned online based on the second time series characteristic data of the historical time period and the corresponding load label data to obtain a target load forecasting model, and then the load forecasting result corresponding to the preset time period can be obtained based on steps 210 to 220.

[0043] The power load forecasting method provided by the embodiments of the present disclosure can enable the model to learn the correlation between power load and time, weather and other factors because the second time series feature data in the training stage includes at least one of the time features and weather features of the historical time period. In the prediction stage, the time features and weather features of the preset time period to be predicted are both available, which can avoid the problem of missing input features for prediction. Therefore, effective input features can be provided for the model, thereby avoiding or reducing the problem of missing features caused by the time delay of load data, and can effectively improve the robustness of the model in non-periodic scenarios such as holidays and extreme weather, avoid or reduce the adverse effects of factors such as holidays and extreme weather on the accuracy of load forecasting results, thereby effectively improving the accuracy of load forecasting results.

[0044] Figure 3 It is a flowchart of a power load forecasting method provided by another exemplary embodiment of the present disclosure.

[0045] In some optional embodiments, such as Figure 3 As shown, the method may include the following steps: Step 2110, obtaining date characteristics and weather characteristics corresponding to each day in the preset time period to be predicted.

[0046] Step 2120, based on the date characteristics and weather characteristics corresponding to each day in the preset time period, determine the first time series characteristic data corresponding to the preset time period.

[0047] Step 220: Based on the first time series characteristic data, a load forecast result corresponding to a preset time period is predicted by a target load forecasting model.

[0048] Among them, the target load forecasting model is a PATCHTST model. The target load forecasting model is obtained by training the initial load forecasting model based on the second time series feature data corresponding to the historical time period and the load label data corresponding to the second time series feature data; the second time series feature data is determined based on the date characteristics and weather characteristics corresponding to each day in the historical time period; wherein, the date characteristics corresponding to each day include the location information of the day in the year, the location information of the day in the week, the status information of whether the day is a rest day, the total number of rest days of the day in the case of a rest day, and the location information of the day in the rest day; the weather characteristics include the temperature, precipitation, and wind force corresponding to the day.

[0049] The specific operations of the above steps 2110 and 2120 can be found in the above embodiments and will not be described in detail here.

[0050] The power load forecasting method provided by the embodiment of the present disclosure, since the second time series feature data in the training stage of the target load forecasting model is determined based on the date features and weather features corresponding to each day in the historical time period, the model can learn the correlation between the power load and factors such as time and weather, and in the prediction stage, the date features and weather features of the preset time period to be predicted are all available, which can avoid the problem of missing input features for prediction, so that the model can be provided with external environmental input features such as date and weather related to the power load, avoiding or reducing the problem of missing features caused by the time delay of load data, and the date features include multidimensional features of the correlation between each day and holidays, and the weather features include multidimensional features such as temperature, precipitation, wind force, etc. of each day, combined with the characteristics of the Patch Time Series Transformer (PATCHTST) model with data segmentation, channel independence, high global feature attention, and good at capturing long-distance dependencies, the robustness of the model in non-periodic scenarios such as holidays and extreme weather can be effectively improved, and the adverse effects of factors such as holidays and extreme weather on load forecasting results can be avoided or reduced, thereby effectively improving the accuracy of load forecasting results.

[0051] Figure 4 It is a schematic diagram of the training process of the target load prediction model provided by an exemplary embodiment of the present disclosure.

[0052] In some optional embodiments of the present disclosure, based on any of the above embodiments, Figure 4 As shown, the target load forecasting model can be obtained through the following steps: Step 230, obtaining historical load data for a historical time period.

[0053] Among them, the historical load data of the historical time period is the real load data of the historical time period that can be obtained. For example, the real load data for the time period from the specified date B to the most recent date A can be obtained. The time granularity of the historical load data can be day (or day), hour or other granularity (such as M day, J hour, etc., M and J are both positive integers). The time granularity is the basic unit for managing the power load (or power load value). For example, if the time granularity is day (i.e. 1 day), the historical load data includes the power load value corresponding to each day in the historical time period. If the time granularity is hour, the historical load data includes the power load value corresponding to each hour in the historical time period, which can be expressed as the power load values ​​corresponding to 0 o'clock, 1 o'clock,..., 23 o'clock of each day, respectively, or expressed as 0, 1,..., l common l +1 hour point (or data point, or point for short) corresponds to the power load value. The specific representation method of historical load data is not limited.

[0054] For example, taking the hour as an example, historical load data It can be expressed as: Formula (1) In formula (1), Indicates The power load value corresponding to each point is: Is a positive integer. X 0~ X 23 It is the time-sharing load data from 0:00 to 23:00 on the first day. X 24 ~ X 47 is the time-sharing load data from 0:00 to 23:00 on the second day, and so on. Daily load data.

[0055] Step 240: determine the second time series feature data corresponding to the historical time period.

[0056] The second time series feature data corresponding to the historical time period can be determined according to the time information of the historical time period. For example, the time feature (called the first time feature) and the weather feature (called the first weather feature) of the historical time period can be obtained from the time application and the weather application according to the time information of the historical time period.

[0057] In some optional embodiments, the second time series feature data includes time features corresponding to a historical time period.

[0058] In some optional embodiments, the second time series feature data includes weather characteristics corresponding to a historical time period.

[0059] In some optional embodiments, the second time series feature data includes time features and weather features corresponding to a historical time period.

[0060] In some optional embodiments, on the basis that the second time series feature data includes at least one of the time feature and the weather feature corresponding to the historical time period, the second time series feature data may also include location information, which is information representing the order position of the power load value corresponding to the feature in the historical load data. For example, taking the time granularity of the second time series feature data as hours as an example, the location information may be the historical load data. Each power load value The subscript of is 0, 1, ..., If the time granularity of the second time series feature data is day, the location information can be 0, 1, ..., .

[0061] Step 250: Determine the load label data corresponding to the second time series characteristic data based on the historical load data.

[0062] Among them, if the time granularity of the second time series feature data is the same as the time granularity of the historical load data, each load value in the historical load data is used as the load label of the corresponding feature. If the time granularity of the second time series feature data is different from the time granularity of the historical load data, the load label data corresponding to the second time series feature data is obtained by converting the time granularity of the historical load data. For example, if the historical load data is load data of the hour dimension (i.e., the time granularity is hour), and the second time series feature data is data of the day dimension, the historical load data is converted according to the correspondence between one day and 24 hours to obtain the load data of the day dimension, which is used as the load label data.

[0063] Step 260: Based on the second time series feature data and the load label data, the initial load forecasting model is trained to obtain a target load forecasting model.

[0064] Among them, the second time series characteristic data can be processed based on the initial load forecasting model to obtain a forecast result; based on the forecast result and the load label data, the network parameters of the initial load forecasting model are updated to obtain an updated load forecasting model; and the trained target load forecasting model is determined based on the updated load forecasting model. Specifically, if the updated load forecasting model meets the training end condition, the updated load forecasting model can be used as the target load forecasting model. If the updated load forecasting model does not meet the training end condition, the updated load forecasting model can be used as the initial load forecasting model, and the initial load forecasting model is iteratively updated based on the second time series characteristic data and the load label data until the updated load forecasting model meets the training end condition, and the updated load forecasting model is used as the target load forecasting model. Among them, the training end condition may include the number of iterations reaching a preset number threshold, model convergence, etc., and the specific training end condition can be set according to actual needs. For the update of network parameters, the model loss can be calculated based on the forecast result and the load label data, and based on the model loss, the preconfigured optimization algorithm is used to determine the iteration step of the network parameters, and the network parameters are updated based on the iteration step to obtain the updated network parameters, and the updated load forecasting model is obtained based on the updated network parameters. The optimization algorithm may include any gradient descent algorithm, for example, without specific limitation. Optionally, the initial load forecasting model may be further fine-tuned based on the pre-obtained initial load forecasting model and combined with the latest obtained real load data, which may further improve the model performance and ensure the accuracy of the load forecasting results obtained in this prediction.

[0065] The embodiments of the present disclosure obtain load label data corresponding to the second time series feature data through historical load data of a historical time period, which is used to guide the load forecasting model to learn the correlation between load data and external environmental characteristics such as time and weather, so that the model can have better tolerance for non-periodic fluctuations such as holidays and extreme weather, improve the robustness of the model prediction results, avoid or reduce the adverse effects of factors such as holidays and extreme weather on load forecasting results, and improve the accuracy of load forecasting results.

[0066] In some optional embodiments of the present disclosure, each time a load forecast is performed, a target load forecast model can be obtained through online training or fine-tuning through steps 230 to 260, and then a load forecast result for a preset time period can be obtained through steps 210 to 220.

[0067] Figure 5 It is a schematic diagram of the training process of the target load prediction model provided by another exemplary embodiment of the present disclosure.

[0068] In some optional embodiments of the present disclosure, the second time series characteristic data and the load label data are respectively data based on the first time granularity; and the historical load data are data based on the second time granularity.

[0069] The duration corresponding to the first time granularity is greater than the duration corresponding to the second time granularity. Alternatively, the duration corresponding to the first time granularity is a preset multiple of the duration corresponding to the second time granularity. For example, the first time granularity is M days, and the second time granularity is J hours, where M and J are both positive integers. Greater than J, or is a preset multiple of J. The specific first time granularity and the second time granularity are not limited. In practical applications, M=1 and J=1 are optional.

[0070] In some optional embodiments of the present disclosure, based on any of the above embodiments, Figure 5 As shown, step 250 of determining the load label data corresponding to the second time series characteristic data based on the historical load data may include: Step 2510: Based on the historical load data, determine first load data based on a first time granularity in a historical time period.

[0071] The historical load data may be converted into first load data of the first time granularity according to the corresponding relationship between the first time granularity and the second time granularity. For example, if the historical load data is load data of the hour dimension (i.e., the second time granularity is hour), and the first load data is load data of the day dimension (i.e., the first time granularity is day), then according to the corresponding relationship that each day includes 24 hours, the historical load data is converted into the first load data of the first time granularity.

[0072] For example, the first load data XT It can be expressed as follows: Formula (2) In formula (2), , , 1, …, , Indicates historical load data X Middle j The power load value corresponding to each point.

[0073] Step 2520: Determine the load label data corresponding to the second time series characteristic data based on the first load data.

[0074] The second time series characteristic data is characteristic data corresponding to the first load data, so the first load data can be used as load label data corresponding to the second time series characteristic data. For example, the load label data can be expressed as the above XT .

[0075] The embodiments of the present disclosure obtain load label data corresponding to the second time series feature data through historical load data of historical time periods, which is used to guide the load forecasting model to learn the correlation between load data and external environmental characteristics such as time and weather, so that the model can have better tolerance for holidays, extreme weather, etc., avoid or reduce the adverse effects of factors such as holidays and extreme weather on load forecasting results, and improve the accuracy of load forecasting results.

[0076] In some optional embodiments of the present disclosure, at least one of the first time feature and the first weather feature corresponding to the historical time period can be determined based on the time information corresponding to the historical time period and the first time granularity to construct the second time series feature data.

[0077] According to the time information corresponding to the historical time period and the first time granularity, the time information corresponding to each load value in the first load data can be determined. For example, if the first time granularity is a day, the date information corresponding to each load value in the first load data can be determined. For example, XT The date information corresponding to 0 is (a-1) year b month c day. According to the date information corresponding to each load value in the first load data, the time characteristics corresponding to each date can be obtained from the time application program, and the first time characteristics corresponding to the first load data can be obtained based on the time characteristics corresponding to each date. According to the date information corresponding to each load value in the first load data, the weather characteristics corresponding to each date can be obtained from the historical meteorological data, and the first weather characteristics corresponding to the first load data can be obtained based on the weather characteristics corresponding to each date.

[0078] In some optional embodiments, the first time feature may be represented as a time feature sequence consistent with the time sequence of the first load data. The first weather feature may be represented as a weather feature sequence consistent with the time sequence of the first load data.

[0079] Exemplary, first time features DT It can be expressed as follows: Formula (3) In formula (3), The size of is (1, s1), s1 is a positive integer, that is, the time feature corresponding to each day includes s1 feature values. For example, if the time feature includes the day number of the corresponding year, the day number of the corresponding week, whether the day is a rest day, the day number of the rest day, and the number of consecutive rest days corresponding to the day, then s1 = 5. In practical applications, s1 is not limited to 5.

[0080] First weather features WT It can be expressed as follows: Formula (4) In formula (4), The size of is (1, s2), s2 is a positive integer, that is, the weather characteristics corresponding to each day include s2 characteristic values. For example, if the weather characteristics include the temperature corresponding to the day, the precipitation corresponding to the day, and the wind force corresponding to the day, then s2 = 3. In practical applications, s2 is not limited to being equal to 3.

[0081] In some optional embodiments, the second time series feature data may be determined based on at least one of the first time feature and the first weather feature.

[0082] In some optional embodiments, the first time feature may be used as the second time series feature data.

[0083] In some optional embodiments, the first weather characteristic may be used as the second time series characteristic data.

[0084] In some optional embodiments, the first time feature and the first weather feature may be concatenated to obtain second time series feature data.

[0085] In some optional embodiments, the first time feature, the first weather feature, and the location information feature may be (can be referred to as position features) to obtain the second time series feature data. The second time series feature data ET(train) can be expressed as follows: Formula (5) In formula (5), Indicates Characteristics corresponding to the day (including at least one of time characteristics and weather characteristics, and may also include location characteristics).

[0086] In an embodiment of the present disclosure, at least one of a first time feature and a first weather feature based on the first time granularity in the historical time period is determined based on the time information of the historical time period and the first time granularity to constitute second time series feature data, and real load data is used as load label data for training a load forecasting model, so that the model can learn the correlation between the power load and the time and weather conditions, thereby making the model more tolerant to holidays, extreme weather, etc., avoiding or reducing the adverse effects of factors such as holidays and extreme weather on load forecasting results, and improving the accuracy of load forecasting results.

[0087] In some optional embodiments of the present disclosure, the first time series characteristic data and the second time series characteristic data are respectively data based on a first time granularity; the first time granularity is a day, that is, the load value in the first load data is a load value in units of 1 day.

[0088] In some optional embodiments of the present disclosure, the time feature corresponding to the historical time period (ie, the first time feature) includes a date feature corresponding to each day in the historical time period.

[0089] In some optional embodiments of the present disclosure, the time feature corresponding to the preset time period includes a date feature corresponding to each day in the preset time period.

[0090] In some optional embodiments of the present disclosure, the date features corresponding to each day include at least one of the following: the position information of the day in the year (i.e., the day is the number of the corresponding year); the position information of the day in the week (i.e., the day is the number of the corresponding week, that is, the day of the week); status information of whether the day is a rest day (for example, 1 indicates that the day is a rest day, and 0 indicates that the day is not a rest day); the total number of rest days (or holidays) in the case of a rest day (i.e., the number of consecutive rest days); the position information of the day in the rest day (i.e., the day is the number of the corresponding holiday).

[0091] In some optional embodiments of the present disclosure, the weather characteristics corresponding to the historical time period (ie, the first weather characteristics) include weather characteristics corresponding to each day in the historical time period.

[0092] In some optional embodiments of the present disclosure, the weather characteristics corresponding to the preset time period include weather characteristics corresponding to each day in the preset time period.

[0093] In some optional embodiments of the present disclosure, the weather characteristics corresponding to each day include at least one of the following: the temperature of the day; the precipitation of the day; the wind force of the day.

[0094] The embodiments of the present disclosure describe the real correlation between each date and holidays through time features, and describe the effective weather conditions of each date through weather features. This allows the model to learn the impact of non-periodic fluctuations such as holidays and extreme weather on load data, thereby improving the robustness of the model under non-periodic fluctuations such as holidays and extreme weather, and ensuring the accuracy of load forecasting results.

[0095] Figure 6 It is a schematic diagram of the training process of the target load prediction model provided by yet another exemplary embodiment of the present disclosure.

[0096] In some optional embodiments of the present disclosure, based on any of the above embodiments, Figure 6 As shown, step 260 of training the initial load forecasting model based on the second time series feature data and the load label data to obtain the target load forecasting model may include: Step 2610, divide the second time series feature data into blocks to obtain at least one block of data.

[0097] The second time series feature data may be patched according to the patch parameters in the network parameters of the load forecasting model (ie, the initial load forecasting model). The patch parameters may include a patch length and a step length.

[0098] In some optional embodiments, the second time series feature data may be divided into data blocks using a sliding window method.

[0099] In some optional examples, the length of the second time series feature data is , the patch length is P, the step length is S1, then the second time series feature data can be divided into N patches, and N is calculated as follows: N=(L1-P) / S1+1 Formula (6) In practical applications, the patch length P can be set according to the length of the preset time period to be predicted. For example, if the preset time period includes T1 days, P can be set to T1, such as P=T1=12, and the specific P value is not limited to 12. The step length S1 can be set according to actual needs. If it is necessary to make the data of N patches have no intersection, S1 can be greater than or equal to P. If it is necessary to make the data of N patches have intersection, S1 can be less than P, and there is no specific limitation.

[0100] Step 2620, mapping processing is performed on at least one block of data to obtain a first processing result.

[0101] Among them, at least one block data can be mapped according to the mapping parameters in the load forecasting model to obtain a first processing result. The mapping parameters may include space conversion parameters (or feature projection parameters), position encoding parameters, etc. The space conversion parameters are used to convert the block data into a preset dimensional space, and the position encoding parameters are used to mark the time sequence between the block data.

[0102] Step 2630, transform the first processing result to obtain a second processing result.

[0103] In some optional embodiments, the first processing result may be processed based on the processing logic and network parameters of the transformation processing layer in the initial load prediction model to obtain the second processing result.

[0104] In some optional embodiments, the transformation processing layer can be implemented based on a Transformer layer or other network layers with corresponding functions.

[0105] In some optional embodiments, the Transformer layer can be implemented based on a multi-head attention mechanism.

[0106] In some optional embodiments, based on the multi-head attention mechanism, the Transformer layer may also include residual connection, layer normalization, feedforward neural network and other network layers.

[0107] In some optional embodiments, the Transformer layer may include at least one sub-network, each of which includes a multi-head attention layer (a network layer that implements a multi-head attention mechanism), a first residual connection & layer normalization layer, a feedforward network layer, and a second residual connection & layer normalization layer. If multiple sub-networks are included, the sub-networks are stacked, that is, the input of the first sub-network is the first processing result, the input of the second sub-network is the output of the first sub-network, the input of the third sub-network is the output of the second sub-network, and so on, and the output of the last sub-network is the second processing result.

[0108] Step 2640, determine the first prediction result based on the second processing result.

[0109] The second processing result can be processed according to the prediction head network in the load forecasting model to obtain the first prediction result. The prediction head network can be any one of a fully connected network, a multilayer perceptron (MLP), a convolutional network, etc., without specific limitation. The fully connected network can include at least one fully connected layer. The convolutional network can include at least one convolutional layer.

[0110] Step 2650: Based on the first prediction result and the load label data, update the network parameters of the initial load prediction model to obtain an updated load prediction model.

[0111] The updating process of the network parameters can be found in the above content and will not be elaborated here.

[0112] Step 2660: Determine a target load forecasting model based on the updated load forecasting model.

[0113] Among them, after obtaining the updated load prediction model, it can be determined whether the training end condition is met based on the model loss situation. If the training end condition is not met, the updated load prediction model is used as the load prediction model, and steps 2610 to 2650 are iterated until the updated load prediction model obtained after the iteration meets the training end condition, and the updated load prediction model is used as the trained target load prediction model.

[0114] The embodiments of the present disclosure can effectively shorten the sequence length by dividing the second time series feature data into blocks to obtain multiple patches. Each patch can represent local features and reduce the number of tokens input to the Transformer layer, thereby effectively reducing the space and time complexity of the model and making it easier for the model to process longer input sequences, thereby learning more long-distance dependencies and further improving the accuracy of load forecasting results.

[0115] In some optional embodiments of the present disclosure, step 2610 of performing data segmentation on the second time series characteristic data to obtain at least one block data may include: performing data segmentation on the second time series characteristic data based on the segmentation parameters in the initial load forecasting model to obtain at least one block data; the segmentation parameters include the block length and the step size.

[0116] In some optional embodiments of the present disclosure, step 2620 of mapping at least one block data to obtain a first processing result may include: mapping at least one block data to a preset dimensional space based on a mapping matrix to obtain a first mapping result; and determining the first processing result based on the first mapping result and the position coding matrix.

[0117] The mapping matrix is ​​a spatial conversion parameter used to convert the block data from the current dimension to a higher preset dimensional space. The preset dimensional space can be set to any dimensional space according to actual needs, such as a 64-dimensional space or other dimensional space. The position encoding matrix is ​​a position encoding parameter used to add a time sequence mark to the block data (patch).

[0118] In some optional examples, the mapping matrix can be expressed as W p , , the position encoding matrix can be expressed as W pos , , D Represents the preset dimensional space, The block data is represented as , the sequence of N block data is expressed as , , F Indicates the feature length (or feature dimension), that is, the number of feature values ​​included in the feature corresponding to each load value. Taking the second time series feature data including time feature, weather feature and location feature as an example, if the time feature includes 5 feature values, the weather feature includes 3 feature values, and the location feature includes 1 feature value, then F=9. The feature channel of each dimension is independent. Then the first processing result can be expressed as follows:

[0119] In formula (7) and formula (8), Indicates the mapping result corresponding to the i-th patch in the first processing result. .

[0120] The embodiments of the present disclosure use a learnable mapping matrix to map each patch to a higher D-dimensional space, which is the latent semantic space of the Transformer, so that the Transformer can better capture the high-level features and interaction relationships of the time series. And through the learnable position encoding matrix, time order information can be added to the patch sequence, which is convenient for enhancing the expressiveness of the model and further improving the accuracy of the prediction results.

[0121] In some optional embodiments of the present disclosure, the first processing result is transformed to obtain the second processing result in step 2630, including: Based on the first processing result, determine the first attention result through the multi-head attention layer; based on the first attention result, obtain the first normalized result through residual connection and layer normalization processing; based on the first normalized result, determine the second processing result.

[0122] Among them, the first processing result can be converted into a query tensor (Query, abbreviated as: Q), a key tensor (Key, abbreviated as: K) and a value tensor (Value, abbreviated as: V) by each head in the multi-head attention layer. Then, an attention operation is performed based on Q, K, and V to obtain a first attention result. Then, the first attention result is processed by a residual connection and a layer normalization layer to obtain a first normalized result. The first normalized result is processed by subsequent network layers (such as a feedforward neural network layer, a residual connection, and a layer normalization layer) to obtain a second processing result. If the Transformer layer (i.e., the transformation processing layer) includes multiple stacked sub-networks, each of which includes a multi-head attention layer, a first residual connection and a layer normalization layer, a feedforward neural network layer, a second residual connection and a layer normalization layer, then after obtaining the first normalization result, the first normalization result is processed by the subsequent network layer (i.e., the feedforward neural network layer and the second residual connection and the layer normalization layer) of the current sub-network (the first sub-network) to obtain an intermediate result, and then the intermediate result is processed based on the subsequent sub-network of the current sub-network to obtain the second processing result of the Transformer layer. The processing process of the subsequent sub-network of the current sub-network is similar to that of the current sub-network, and will not be repeated here.

[0123] In some optional examples, the multi-head attention layer process is as follows: Step S1, transforming the first processing result Xd Converted into query tensor, key tensor and value tensor as follows:

[0124] In formula (9) to formula (10), Indicates , H represents the number of heads) The query tensor corresponding to the heads, K h Indicates h The key tensor corresponding to the heads, V h Indicates h A tensor of values ​​corresponding to each head. T Indicates transpose. Respectively represent h The Q transformation matrix, K transformation matrix and V transformation matrix corresponding to each head. . Indicates the scaling factor. The scaling factor can be set to any value according to actual needs. For example, the appropriate scaling factor can be determined based on experimental verification. For example, the scaling factor can be set to 8, 9, 10, etc.

[0125] Step S2: Perform attention operation based on query tensor, key tensor and value tensor, and obtain the first attention result through Softmax normalization. O h , which is expressed as follows: Formula (12) In formula (12), T represents transpose, and other symbols refer to the above content.

[0126] Getting first attention results O h Afterwards, the residual connection and layer normalization layer are used to perform residual connection and normalization processing on the first attention result to obtain the first normalized result. Then, based on the first normalized result, the subsequent network layers in the Transformer are used to obtain the final output of the Transformer layer (i.e., the second processing result). .

[0127] After obtaining the second processing result, the first prediction result is obtained based on the second processing result and the prediction head network. Taking the fully connected layer as the prediction head network as an example, the second processing result After flattening, it is input into the fully connected layer to obtain the first prediction result.

[0128] Exemplarily, the first prediction result Y1 may include the load prediction value corresponding to each day in the historical time period, expressed as follows: Formula (13) In formula (13), Indicates The load forecast value corresponding to the day.

[0129] The embodiments of the present disclosure process multiple heads in parallel through a multi-head attention layer, where each head focuses on different aspects of the input data, thereby improving the learning ability of the model, helping the model to better capture the complex features in the input data, improving the generalization ability of the model, and reducing computational complexity and improving processing efficiency.

[0130] Figure 7 It is a flowchart of a power load forecasting method provided by another exemplary embodiment of the present disclosure.

[0131] In some optional embodiments of the present disclosure, based on any of the above embodiments, Figure 7 As shown, step 220 of predicting and obtaining a load forecast result corresponding to a preset time period based on the first time series characteristic data through a target load forecasting model may include: Step 2210, divide the first time series feature data into blocks to obtain at least one block of data.

[0132] Step 2220, mapping processing is performed on at least one block of data to obtain a third processing result.

[0133] Step 2230, transform the third processing result to obtain a fourth processing result.

[0134] Step 2240: Based on the fourth processing result, determine the load forecast result for the preset time period through the prediction head network.

[0135] Among them, steps 2210 to 2240 are the processing process of the model reasoning stage (or prediction stage), which can be implemented based on the network parameters of the trained target load prediction model. The specific execution process can refer to steps 2610 to 2640 of the training stage, which will not be repeated here. Different from the training stage, the number of block data (patch) in the reasoning stage can be different from that in the training stage.

[0136] Exemplarily, when the second time series feature data is data of the day dimension, the first time series feature data ET(test) can be expressed as:

[0137] In formula (14), T1 represents the number of days included in the preset time period to be predicted. Indicates The feature corresponding to the day may include at least one of a time feature and a weather feature, and optionally, may also include a location feature.

[0138] The first time series feature data is divided into data blocks, and the number of patches obtained is (L2-P) / S1+1, where L2 represents the length of the first time series feature data, that is, L2=T1.

[0139] The load forecast result obtained for the preset time period includes the load value corresponding to each day in the preset time period T1 day. The load forecast result can be expressed as Y2=[y21, y22, …, y2 T1 ].

[0140] In the embodiments of the present disclosure, the target load prediction model obtained through training performs data segmentation, mapping processing, Transformer layer processing, and prediction head network processing on the first time series feature data to obtain the load prediction result for the preset time period to be predicted. Since the target load prediction model effectively learns the correlation between the power load value and time, weather, etc., the accuracy of the prediction result can be ensured.

[0141] Figure 8 It is a flowchart of a power load forecasting method provided by yet another exemplary embodiment of the present disclosure.

[0142] In some optional embodiments of the present disclosure, based on any of the above embodiments, Figure 8 As shown, the method of the embodiment of the present disclosure may also include: Step 310: Based on the historical load data, determine the third time series characteristic data of the second time granularity and the load time-sharing proportion label data corresponding to the third time series characteristic data.

[0143] The third time series feature data includes at least one of the time feature and weather feature of the second time granularity corresponding to the historical time period; the load time-sharing proportion refers to the proportion of the power load value of each second time granularity in the power load value of the corresponding first time granularity. The first time granularity can be a preset multiple of the second time granularity. For example, the first time granularity is day (i.e. 24 hours) and the second time granularity is hour (i.e. 1 hour).

[0144] In some optional embodiments, the second load data of the second time granularity can be determined based on the historical load data, and then the third time series characteristic data can be determined based on the time information of the second load data. For example, if the time granularity of the historical load data is the second time granularity, the historical load data can be used as the second load data, and then the third time series characteristic data of the second time granularity can be determined based on the time information of the second load data. The specific principle of determining the third time series characteristic data based on the time information of the second load data is similar to the second time series characteristic data, except that the time characteristics and / or weather characteristics in the third time series characteristic data are characteristics of the second time granularity (i.e., time-sharing characteristics). For example, if the second time granularity is hours, the third time series characteristic data includes the characteristics corresponding to each hour in the historical time period, and the characteristics corresponding to each hour include the time characteristics and weather characteristics of the hour. Weather characteristics may include the temperature, precipitation, wind force, etc. of the hour.

[0145] In some optional embodiments, the time feature corresponding to each hour may adopt the time feature of the date in which the hour occurs (ie, the date feature). For the date feature, reference may be made to the aforementioned embodiments.

[0146] In some optional embodiments, based on the date feature, the time feature corresponding to each hour may also include an hour feature, such as the hour number of the hour in the day, which is not specifically limited.

[0147] In some optional embodiments, the third time series feature data includes time features of a second time granularity corresponding to a historical time period.

[0148] In some optional embodiments, the third time series feature data includes weather characteristics of a second time granularity corresponding to a historical time period.

[0149] In some optional embodiments, the third time series feature data includes time features and weather features of the second time granularity corresponding to the historical time period.

[0150] In some optional embodiments, on the basis that the third time series feature data includes at least one of the time feature and the weather feature of the second time granularity corresponding to the historical time period, the third time series feature data may also include a location information feature, such as: .

[0151] For example, in the above historical load data Based on this, the third time series feature data can be expressed as Indicates The feature corresponding to the hour. The feature may include at least one of a time feature and a weather feature, and may also include a location feature (ie, a location information feature).

[0152] In some optional embodiments, the load time-sharing proportion label data corresponding to the third characteristic data can be obtained by calculating the ratio between each load value in the third time series characteristic data and the total load value of the corresponding first time granularity.

[0153] Step 320: Based on the third time series feature data and the load time-sharing proportion label data, the time-sharing proportion prediction model is trained to obtain a trained target time-sharing proportion prediction model.

[0154] Among them, the time-sharing share prediction model (which may be called the initial time-sharing share prediction model) may be a pre-acquired model. For example, the time-sharing share prediction model may be a pre-established initialization model with initialized network parameters. Alternatively, the time-sharing share prediction model may be a pre-trained model with pre-trained network parameters. Alternatively, the time-sharing share prediction model may be a model used in the previous prediction, and the network parameters are the parameters after the previous prediction training. The training method for the time-sharing share prediction model may include two methods: training and fine-tuning. For details, please refer to the initial load forecasting model, which will not be described here.

[0155] In some optional embodiments, the time-sharing proportion prediction model can be implemented using any feasible network structure, such as various prediction models based on bidirectional time convolutional neural network (BITCN) and other types of models.

[0156] In some optional embodiments, the third time series feature data can be processed based on the time-sharing proportion prediction model to obtain a second prediction result. Then, based on the second prediction result and the load time-sharing proportion label data, the network parameters of the time-sharing proportion prediction model are updated to obtain an updated time-sharing proportion prediction model. Based on the updated time-sharing proportion prediction model, the trained target time-sharing proportion prediction model is determined. Specifically, if the updated time-sharing proportion prediction model meets the training end condition, the updated time-sharing proportion prediction model is used as the target time-sharing proportion prediction model. If the updated time-sharing proportion prediction model does not meet the training end condition, the updated time-sharing proportion prediction model continues to be used as the time-sharing proportion prediction model to be trained, and the time-sharing proportion prediction model is iteratively trained based on the third time series feature data and the load time-sharing proportion label data, and so on, until the updated time-sharing proportion prediction model meets the training end condition, and the target time-sharing proportion prediction model is obtained.

[0157] Step 330 , based on the fourth time series feature data of the second time granularity corresponding to the preset time period, a time-sharing proportion prediction result corresponding to the preset time period is determined through a target time-sharing proportion prediction model.

[0158] The fourth time series feature data includes at least one of a time feature of a second time granularity corresponding to a preset time period and a weather feature. The feature type included in the fourth time series feature data is consistent with the third time series feature data, and will not be described in detail.

[0159] After the target time-sharing proportion prediction model is obtained through training, the target time-sharing proportion prediction model can be used to infer the fourth time series feature data to obtain the time-sharing proportion prediction result corresponding to the preset time period.

[0160] Exemplarily, the fourth time series characteristic data can be expressed as T1 represents the number of days included in the preset time period. Indicates Features corresponding to the hour.

[0161] The prediction result of the time-sharing proportion corresponding to the preset time period can be expressed as .

[0162] It should be noted that the process of determining the time-sharing proportion prediction result (steps 310 to 330 ) and the process of determining the load prediction result (steps 210 to 220 ) may be performed in any order.

[0163] In the embodiments of the present disclosure, a target time-sharing share prediction model is obtained through training with historical third time series feature data, and is used to predict the time-sharing share of the load at a second time granularity in a preset time period. Accurate and effective time-sharing share data can be provided for further obtaining time-sharing load data. In addition, during the training phase, the features of the input model include at least one of the time features and weather features of the second time granularity, so that the model can learn the correlation between the time-sharing share and factors such as time and weather, thereby avoiding or reducing the adverse effects of non-stationary stages such as time delays, holidays, and extreme weather of historical load data on the time-sharing share prediction results, and effectively improving the accuracy of the time-sharing share prediction results.

[0164] In some optional embodiments of the present disclosure, Figure 8 As shown, the method of the embodiment of the present disclosure may also include: Step 340, based on the load forecast result of the preset time period and the time-sharing proportion forecast result, determine the time-sharing load forecast result of the preset time period.

[0165] Among them, the load forecast result for the preset time period is the load data of the first time granularity, and the time-sharing proportion prediction result is the proportion of the time-sharing load data of the second time granularity relative to the load data of the first time granularity. According to the relationship between the time-sharing load data, the time-sharing proportion and the load data of the first time granularity, the time-sharing load forecast result for the preset time period can be determined.

[0166] In some optional embodiments, Perform Softmax operation according to the day dimension to obtain the normalized time-sharing proportion prediction result, ensure that the proportion value of each hour is in the range of 0 to 1, and the total proportion of each day is 1. The normalized time-sharing proportion prediction result is expressed as Y3.

[0167] For example, the load forecast result for the preset time period is Y2=[y21, y22, ..., y2 T1 ], the normalized time-sharing proportion prediction result of the preset time period is , then the time-sharing load forecast result of the preset time period can be expressed as:

[0168] In formula (15) and formula (16), , 2, …, , floor Indicates rounding down.

[0169] The embodiments of the present disclosure can effectively obtain the time-sharing load forecast result for the preset time period by predicting the load forecast result for the preset time period and the time-sharing proportion forecast result, thereby achieving accurate prediction of the time-sharing load.

[0170] Fig. 9 It is a flowchart of determining a time-sharing proportion prediction result provided by an exemplary embodiment of the present disclosure.

[0171] In some optional embodiments of the present disclosure, based on any of the above embodiments, Fig. 9 As shown, step 310 of determining the third time series characteristic data of the second time granularity and the load time-sharing proportion label data corresponding to the third time series characteristic data based on the historical load data may include: Step 3110: Determine second load data of a second time granularity based on historical load data.

[0172] If the time granularity of the historical load data is the second time granularity, the historical load data can be used as the second load data. If the time granularity of the historical load data is smaller than the second time granularity, the historical load data can be converted into the second load data of the second time granularity. For example, the time granularity of the historical load data is the third time granularity (such as 1 hour), the second time granularity is J hours, and J is an integer greater than 1. Then the total load value of every J hours in the historical load data (the sum of the load values ​​corresponding to J hours) can be used as the second load data.

[0173] Step 3120: Determine at least one of a second time characteristic and a second weather characteristic corresponding to the second load data based on the time information corresponding to the second load data.

[0174] Among them, the second time feature and the second weather feature are features of the second time granularity.

[0175] In some optional examples, the second time granularity is taken as an example of an hour, and the second time feature includes the time feature corresponding to the load value of each hour in the second load data, and the time feature may include at least one of the date feature, hour feature, etc. corresponding to the hour. The date feature can refer to the aforementioned embodiment. The hour feature may include the number of hours in the day corresponding to the hour, for example, it can be expressed as 0, 1, ..., 23. The second weather feature includes the weather attributes corresponding to each hour, such as temperature, precipitation, wind force, etc. The method for obtaining the time feature and the weather feature can refer to the aforementioned embodiment, which will not be repeated here.

[0176] In some optional embodiments, the time information corresponding to the second load data can be determined based on the time information of the historical time period and the second time granularity of the second load data, that is, the time information based on the second time granularity in the historical time period is the time information corresponding to the second load data.

[0177] Step 3130, determining third time series feature data based on at least one of the second time feature and the second weather feature.

[0178] In some optional embodiments, the second time feature or the second weather feature may be used as the third time series feature data.

[0179] In some optional embodiments, the second time feature and the second weather feature may be fused, and the fusion result may be used as the third time series feature data. The fusion method may be, but is not limited to, splicing.

[0180] In some optional embodiments, based on at least one of the second time feature and the second weather feature, the third time series feature data may further include a location information feature.

[0181] In some optional examples, the second time feature may be expressed as follows: Formula (17) In formula (17), The size of is (1, s3), s3 is a positive integer, that is, the time feature corresponding to each hour can include s3 feature values. The date feature in The date characteristics of the day to which the hour belongs. The hour feature is also included in the Hour by hour features.

[0182] The second weather characteristic can be expressed as: Formula (18) In formula (18), The size of is (1, s2), where s2 is a positive integer. Indicates The weather characteristics corresponding to the hour, such as Hourly temperature, precipitation, wind speed, etc.

[0183] The second time feature and the second weather feature are combined into the third time series feature data. Or the second time feature, the second weather feature and the location information feature are combined into the third time series feature data. Spliced ​​into the third time series feature data (size is (s3+s2+1)×( l +1)).

[0184] Step 3140: Based on the second load data, determine the load time-sharing proportion label data corresponding to the third time series characteristic data.

[0185] The ratio of each time-sharing load value to the total load value of the corresponding first time granularity can be calculated based on the second load data to obtain the load time-sharing ratio label data corresponding to the third time series feature data.

[0186] In an embodiment of the present disclosure, at least one of the second time feature and the second weather feature of the second time granularity corresponding to the second load data is obtained based on the time information of the second load data of the second time granularity, to constitute third time series feature data for training a time-sharing proportion prediction model, so that the time-sharing proportion prediction model can learn the correlation between the time-sharing proportion and time, weather, etc., reduce the adverse effects of non-stationary conditions such as holidays and extreme weather on the time-sharing proportion prediction results, and effectively improve the accuracy of the time-sharing proportion prediction results.

[0187] In some optional embodiments of the present disclosure, determining the load time-sharing proportion label data corresponding to the third time series feature data based on the second load data in step 3140 includes: Based on the second load data, determine the first load data of the first time granularity; based on the second load data and the first load data, determine the time-sharing proportion value corresponding to each load value in the second load data; based on the time-sharing proportion value corresponding to each load value in the second load data, determine the load time-sharing proportion label data.

[0188] The time-sharing proportion value corresponding to each load value in the second load data may be determined according to the time correspondence between the second load data and the first load data.

[0189] For example, if the first time granularity is day and the second time granularity is hour, the load time-sharing proportion label data can be expressed as follows: Formula (19) In formula (19), , 1, …, , Indicates The proportion of hours corresponding to Indicates The power load value corresponding to one hour. floor Indicates rounding down. Indicates The total daily load value of the date to which the hour belongs, see the first load data mentioned above XT .

[0190] The disclosed embodiment uses the real time-sharing share value of the historical time period as the load time-sharing share label data to guide the model to learn the correlation between the time-sharing share and time and weather, so as to improve the performance of the model and ensure the accuracy of the time-sharing share prediction results.

[0191] Fig.10 It is a flowchart of determining a time-sharing proportion prediction result provided by another exemplary embodiment of the present disclosure.

[0192] In some optional embodiments of the present disclosure, the second time granularity is hours.

[0193] In some optional embodiments of the present disclosure, based on any of the above embodiments, Fig.10 As shown, step 320 of training the time-sharing proportion prediction model based on the third time series feature data and the load time-sharing proportion label data to obtain the trained target time-sharing proportion prediction model may include: Step 3210, performing time-division processing on the third time series feature data by hour to obtain sub-time series feature data corresponding to each time point.

[0194] The sub-time series feature data corresponding to each time point includes the feature data corresponding to the time point in the third time series feature data. Specifically, the time point refers to time 0 (or time point 0), time 1, ..., time 23 in a day. The sub-time series feature data corresponding to each time point refers to the time series feature data formed by the features belonging to the time point in the third time series feature data.

[0195] For example, All the features belonging to time 0 form the sub-series feature data corresponding to time 0, all the features belonging to time 1 form the sub-series feature data corresponding to time 1, ..., all the features belonging to time 23 form the sub-series feature data corresponding to time 23, and the 24 sub-series feature data can be expressed as a sequence express The sub-time series feature data corresponding to the moment.

[0196] Step 3220: Based on each sub-time series feature data, determine a forward sequence and a reverse sequence of a first length corresponding to the sub-time series feature data.

[0197] Among them, each sub-time series feature data can be processed into a forward sequence and a reverse sequence of the first length according to the processing logic and related parameters of the bidirectional serialization layer in the time-sharing proportion prediction model. The bidirectional serialization layer can be implemented based on a bidirectional sliding window mechanism, for example.

[0198] Step 3230, based on the forward sequence corresponding to each sub-time series feature data, determine the first sequence feature through the first residual network.

[0199] The first residual network may include at least one residual sub-network, and the network structure of each residual sub-network may be set according to actual needs. For example, each residual sub-network may be implemented based on a convolutional network and a residual connection. The convolutional network may include, for example, causal convolution, dilated convolution, and the like.

[0200] Step 3240, based on the reverse sequence corresponding to each sub-time series feature data, determine the second sequence feature through the second residual network.

[0201] Among them, the second residual network is similar to the first residual network, the difference is that the network parameters of the second residual network can be the same as or different from those of the first residual network, which will not be repeated here.

[0202] It should be noted that step 3230 and step 3240 may be performed in any order.

[0203] Step 3250, determining a bidirectional fusion result based on the first sequence feature and the second sequence feature.

[0204] The first sequence features and the second sequence features can be fused based on the fusion method of the time-sharing proportion prediction model to obtain a bidirectional fusion result. The fusion method may include but is not limited to addition, concatenation, convolution, etc., which are not specifically limited.

[0205] Step 3260: Determine the first time-sharing proportion prediction result based on the two-way fusion result.

[0206] Among them, the bidirectional fusion result can be predicted based on the prediction head network in the time-sharing proportion prediction model to obtain a first time-sharing proportion prediction result (also referred to as a second prediction result). The prediction head network can be any one of a fully connected network, a multilayer perceptron (Multilayer Perceptron, abbreviated as: MLP), a convolutional network, etc., without specific limitation. The fully connected network may include at least one fully connected layer. The convolutional network may include at least one convolutional layer.

[0207] Step 3270: Based on the first time-sharing share prediction result and the load time-sharing share label data, the network parameters of the time-sharing share prediction model are updated to obtain an updated time-sharing share prediction model.

[0208] Among them, the network parameter updating principle of the time-sharing proportion prediction model is similar to that of the load prediction model, which will not be elaborated here.

[0209] Step 3280, based on the updated time-sharing proportion prediction model, determine the target time-sharing proportion prediction model.

[0210] The process of training and obtaining the target time-sharing proportion prediction model may refer to the aforementioned embodiment.

[0211] The embodiments of the present disclosure obtain sub-time series feature data at each time point by performing time-sharing processing on the third time series feature data, so as to enable the model to learn the correlation between the time-sharing proportion at each time point and the time characteristics, weather characteristics, etc., thereby improving the accuracy of the time-sharing proportion prediction results.

[0212] In some optional embodiments of the present disclosure, step 3220 of determining the forward sequence and reverse sequence of the first length corresponding to each sub-time series feature data based on the sub-time series feature data may include: performing bidirectional sliding window processing on each sub-time series feature data to obtain the forward sequence and reverse sequence corresponding to the sub-time series feature data.

[0213] The bidirectional sliding window processing may include forward sliding (or forward sliding) and reverse sliding processes. According to the sliding window parameters of the time-sharing proportion prediction model, the forward sequence is obtained by forward sliding, and the reverse sequence is obtained by reverse sliding. The sliding window parameters may include the sliding step size and the window length (i.e., the sliding window length).

[0214] In some optional embodiments of the present disclosure, Fig.11 FIG. 1 is a schematic diagram of the principle of a bidirectional sliding window provided by an exemplary embodiment of the present disclosure. Fig.11 As shown, taking the training stage as an example, the sub-time series feature data can be the sub-time series feature data corresponding to any time point , the length of the sub-series feature data is denoted as d, optional, in When d is an integer, it can be the number of days in the historical time period (d is the number of days in the preset time period in the forecast stage), that is, The sliding step length is r, the sliding window length is w, and a forward sequence of length T2 is obtained by forward sliding. A reverse sequence of length T2 is obtained by reverse sliding. T2 is determined according to the length d of the sub-time series feature data, the sliding window length w, and the sliding step length r.

[0215] For example, Expressed as x, a forward sequence of length T2 and a reverse sequence of length T2 It can be expressed as follows:

[0216] In formula (20) to formula (22), Indicates the sub-series feature data x The For example, ,by t =1 as an example, , . Similarly, I will not elaborate on it.

[0217] In the embodiment of the present disclosure, each sub-time series feature data is processed into a bidirectional sequence through a bidirectional sliding window, and then the forward sequence and the reverse sequence are processed respectively through the first residual network and the second residual network, so that the model can effectively capture the bidirectional time dependency, which helps to improve the model's modeling ability for time series and further improve the accuracy and reliability of the time-sharing proportion prediction results. And by repeating part of the sequence data to completely extract the time series information between sequence units, the prediction effect of the model can be further improved.

[0218] In some optional embodiments, before performing bidirectional sliding window processing on the sub-time series feature data, the sub-time series feature data may be normalized, and the result after normalization is used as the sub-time series feature data, and the forward sequence and reverse sequence of the first length corresponding to the sub-time series feature data are obtained through bidirectional sliding window processing. The bidirectional correlation of the feature data can be improved through normalization processing, further improving the prediction effect of the model.

[0219] In some optional embodiments of the present disclosure, any one of the first residual network and the second residual network includes at least one residual subnetwork; each residual subnetwork includes at least one of a causal dilation convolution layer, a linear correction unit layer, a weight normalization layer, and a random dropout layer (Dropout). That is, the first residual network may include at least one residual subnetwork; the second residual network may include at least one residual subnetwork. Among them, the causal dilation convolution may include a causal convolution and a dilated convolution. The introduction of causal convolution can enable the model to process time series data more efficiently. The dilated convolution expands the receptive field by interval sampling, and the expansion of the receptive field increases exponentially with the dilation coefficient. It can use fewer network layers to obtain a larger receptive field, making the model receptive field more flexible to learn more comprehensive time series information features. The linear correction unit is a residual connection, which fuses the features before the causal dilation convolution with the causal dilation convolution result through a residual connection, which can avoid problems such as gradient disappearance and overfitting on the basis of retaining important original features in the information extraction process, and improve the stability and depth of the model. The weight normalization layer is used to rewrite the weight parameters, which helps to improve the conditional optimality problem and make the gradient update more stable and efficient. The Dropout layer can randomly ignore the activation values ​​of some neurons during the training process, thereby increasing the diversity of the model and reducing the risk of overfitting.

[0220] In some optional embodiments of the present disclosure, in the above Figure 2 or Figure 3 On the basis of the illustrated embodiment, the method of the disclosed embodiment may include obtaining the fourth time series feature data of the second time granularity corresponding to the preset time period; the fourth time series feature data includes at least one of the time feature and weather feature based on the second time granularity corresponding to the preset time period; based on the fourth time series feature data, the time-sharing share prediction result corresponding to the preset time period is determined through the target time-sharing share prediction model; the target time-sharing share prediction model is obtained by training the initial time-sharing share prediction model based on the third time series feature data of the historical time period and the corresponding load time-sharing share label data; the third time series feature data includes at least one of the time feature and weather feature based on the second time granularity corresponding to the historical time period; the load time-sharing share refers to the proportion of the power load value of each second time granularity in the corresponding power load value of the first time granularity. The training process and prediction process of the target score share prediction model can refer to the aforementioned embodiment. It will not be repeated here.

[0221] In some optional embodiments of the present disclosure, the target time-sharing proportion prediction model is obtained by: obtaining historical load data and third time series feature data corresponding to the historical time period; determining the load time-sharing proportion label data corresponding to the third time series feature data based on the historical load data; training the initial time-sharing proportion prediction model based on the third time series feature data and the load time-sharing proportion label data to obtain the target time-sharing proportion prediction model. The execution of the specific steps can refer to the relevant content in the aforementioned embodiments.

[0222] In some optional embodiments of the present disclosure, based on any of the above embodiments, the method further includes determining the time-sharing load forecast result for the preset time period based on the load forecast result for the preset time period and the time-sharing proportion forecast result. The execution of the specific steps can refer to the relevant content of the above embodiments.

[0223] In some optional embodiments of the present disclosure, based on the historical load data, determining the load time-sharing proportion label data corresponding to the third time series characteristic data includes: determining the second load data based on the second time granularity in the historical time period based on the historical load data; determining the load time-sharing proportion label data corresponding to the third time series characteristic data based on the second load data. The execution of the specific steps can refer to the relevant content in the aforementioned embodiments.

[0224] In some optional embodiments of the present disclosure, based on the second load data, determining the load time-sharing proportion label data corresponding to the third time series characteristic data includes: determining the first load data based on the first time granularity in the historical time period based on the second load data; determining the time-sharing proportion value corresponding to each load value in the second load data based on the second load data and the first load data; determining the load time-sharing proportion label data based on the time-sharing proportion value corresponding to each load value in the second load data. The execution of the specific steps can refer to the relevant content in the aforementioned embodiments.

[0225] In some optional embodiments of the present disclosure, the second time granularity is hours; based on the third time series feature data and the load time-sharing ratio label data, the initial time-sharing ratio prediction model is trained to obtain the target time-sharing ratio prediction model, including: performing time-sharing processing on the third time series feature data by hour to obtain sub-time series feature data corresponding to each time point; the sub-time series feature data corresponding to each time point includes the feature data corresponding to the time point in the third time series feature data; based on each sub-time series feature data, a forward sequence and a reverse sequence of a first length corresponding to the sub-time series feature data are determined; based on each sub-time series feature data, The forward sequence corresponding to the feature data is determined through the first residual network to determine the first sequence feature; based on the reverse sequence corresponding to each sub-time series feature data, the second sequence feature is determined through the second residual network; based on the first sequence feature and the second sequence feature, the bidirectional fusion result is determined; based on the bidirectional fusion result, the first time-sharing proportion prediction result is determined; based on the first time-sharing proportion prediction result and the load time-sharing proportion label data, the network parameters of the initial time-sharing proportion prediction model are updated to obtain the updated time-sharing proportion prediction model; based on the updated time-sharing proportion prediction model, the target time-sharing proportion prediction model is determined. The execution of the specific steps can refer to the relevant content in the aforementioned embodiment.

[0226] In some optional embodiments of the present disclosure, based on each sub-time series feature data, determining a forward sequence and a reverse sequence of a first length corresponding to the sub-time series feature data includes: performing a bidirectional sliding window process on each sub-time series feature data to obtain a forward sequence and a reverse sequence corresponding to the sub-time series feature data. The execution of the specific steps can refer to the relevant content in the aforementioned embodiments.

[0227] In some optional embodiments of the present disclosure, based on the fourth time series feature data, the time-sharing share prediction result corresponding to the preset time period is determined through the target time-sharing share prediction model, including: performing time-sharing processing on the fourth time series feature data by hour to obtain sub-time series feature data corresponding to each time point; the sub-time series feature data corresponding to each time point includes the feature data corresponding to the time point in the fourth time series feature data; based on each sub-time series feature data, determining the forward sequence and reverse sequence of the second length corresponding to the sub-time series feature data; based on the forward sequence corresponding to each sub-time series feature data, determining the third sequence feature through the first residual network; based on the reverse sequence corresponding to each sub-time series feature data, determining the fourth sequence feature through the second residual network; based on the third sequence feature and the fourth sequence feature, determining the bidirectional fusion result; based on the bidirectional fusion result, determining the time-sharing share prediction result corresponding to the preset time period. The specific processing process of the prediction stage of the time-sharing share prediction model is consistent with the training stage, and can refer to the aforementioned training stage, which will not be repeated here.

[0228] In some optional embodiments of the present disclosure, Fig.12 Schematic diagram of the network structure of the time-sharing proportion prediction model provided by an exemplary embodiment of the present disclosure. Fig.12 As shown, the time-sharing proportion prediction model can include a bidirectional sliding window layer, a first residual network, a second residual network, a bidirectional fusion layer and a fully connected layer. Taking the training stage as an example, the sub-time series feature data corresponding to each time point is input into the bidirectional sliding window layer. Through the bidirectional sliding window processing, the forward sequence and reverse sequence of the first length (the length of the prediction stage can be different from that of the training stage) corresponding to each sub-time series feature data are obtained. The forward sequence corresponding to each time point is input into the first residual network. The first residual network includes at least one residual sub-network. Taking three residual sub-networks as an example in the figure, the first sequence feature is obtained through the first residual network, which can be expressed as y (p) Similarly, the reverse sequence corresponding to each time point is input into the second residual network, and the second sequence feature is obtained through the second residual network, which can be expressed as y (r) The first sequence feature and the second sequence feature are fused through the bidirectional fusion layer to obtain the bidirectional fusion result (or fusion feature), which can be expressed as z=fusion(y (p) ,y (r) ), fusion represents the fusion function. The fusion function can be fused in the form of concatenation, addition, convolution, etc. Then, the bidirectional fusion result is input into the prediction head network (the fully connected layer is taken as an example in the figure, but it is not limited to the fully connected layer in actual applications) to obtain the first time-sharing proportion prediction result (training stage).

[0229] It should be noted that Fig.12 This is only an exemplary network structure and not a limitation of the embodiments of the present disclosure. In actual applications, the number of residual sub-networks included in the first residual network and the second residual network, the network type of the prediction head, etc. can be set to other numbers and other network types.

[0230] In some optional embodiments of the present disclosure, Fig.13 is a schematic diagram of the structure of a residual sub-network provided by an exemplary embodiment of the present disclosure. Fig.13As shown, the residual subnetwork in any residual network of the first residual network and the second residual network can adopt the network structure shown in the figure. If the residual network only includes one residual subnetwork, the input sequence of the residual subnetwork is the forward sequence (or reverse sequence) at each time point. If the residual network includes multiple residual subnetworks, the input sequence of the first residual subnetwork is the forward sequence (or reverse sequence) at each time point, the input sequence of the second residual subnetwork is the output sequence of the first residual subnetwork, the input sequence of the third residual subnetwork is the output sequence of the second residual subnetwork, and so on. The output sequence of the last residual subnetwork is the output sequence of the residual network (i.e., the first sequence feature or the second sequence feature). Each residual subnetwork includes a first causal dilation convolution layer, a first linear correction unit, a first weight normalization layer, a first Dropout layer, a second causal dilation convolution layer, a second linear correction unit, a second weight normalization layer, a second Dropout layer, Convolutional layer (residual connection) and fusion layer. Taking the first residual subnetwork as an example, the input sequence includes a forward sequence (or reverse sequence) of length T2 corresponding to each time point. When the causal expansion convolution processes each forward sequence, each forward sequence is represented as [s1, s2, ..., s T2 ], the output value of the hidden layer of the causal dilated convolution (the first causal dilated convolution layer) at time t is as follows: Formula (23) In formula (23), Indicates location The corresponding convolution kernel element, s is the size of the convolution kernel, represents the expansion coefficient, represents the sequence index, Represents the elements after interval sampling. It can be understood that the causal expansion convolution is The calculation is performed only when it is greater than or equal to 0. 24 sets of forward sequences generate 24 sets h ( t ).

[0231] For the first linear correction unit, the input data x 24 groups of outputs of the first causal dilation convolution h ( t ), the output of the first linear correction unit can be expressed as follows: y=Activation(F( x )+ x ) Formula (24) In formula (24), Activation() represents the activation function. F() represents the nonlinear transformation.

[0232] The output result of the first linear correction unit passes through the first weight normalization layer, the first Dropout layer, and the subsequent second causal expansion convolution layer, the second linear correction unit, the second weight normalization layer, and the second Dropout layer. The results of the convolutional layer are fused to obtain the output result of the residual sub-network. The output result of the residual network is obtained through each residual sub-network, such as the first sequence feature and the second sequence feature mentioned above. It should be noted that Fig.13 This is only an exemplary structure of the residual subnetwork and is not a limitation of the embodiments of the present disclosure. In practical applications, the number of causal expansion convolutional layers, linear correction units, etc. included in each residual subnetwork is not limited to the two shown in the figure.

[0233] In some optional embodiments of the present disclosure, the processing process of the time-sharing ratio prediction model in the prediction stage (inference stage) is consistent with that in the training stage. The difference is that the reasoning stage is a trained target time-sharing ratio prediction model, that is, the trained network parameters are used for the time-sharing ratio prediction of the preset time period, and the details are not repeated one by one.

[0234] In some optional embodiments of the present disclosure, Fig.14 FIG. 1 is a schematic diagram of a network structure of a load forecasting model provided by an exemplary embodiment of the present disclosure. Fig.14 As shown, the network structure of the load forecasting model includes a data segmentation layer, a feature mapping and position encoding layer, a Transformer layer, and a prediction head network (the figure takes the fully connected layer as an example, and is not limited to the fully connected layer in actual applications). The Transformer layer includes N1 (N1 is a positive integer) stacked sub-networks, each of which includes a multi-head attention layer, a residual connection & layer normalization layer (which can be called the first residual connection and layer normalization layer), a feedforward neural network layer (which can be referred to as the feedforward network layer) and a residual connection & layer normalization layer (which can be called the second residual connection and layer normalization layer). It should be noted that Fig.14 It is only an exemplary network structure of the load forecasting model and is not a limitation of the embodiments of the present disclosure.

[0235] In the related art, the future power load is predicted based on the periodicity and regularity of historical load data, but there are the following problems: 1. Difficulty in prediction during non-stationary phases. Although power load is cyclical and regular under normal circumstances, it is prone to large fluctuations due to factors such as holidays and extreme weather, resulting in low prediction accuracy of related technologies when facing such non-stationary phases.

[0236] 2. Data delay leads to interval prediction problems. That is, due to the delay in obtaining load data, the power service provider cannot obtain the historical data of the total power grid load in real time. At the same time, it is also necessary to determine the power purchase demand in advance. The relevant technology is mainly based on the historical load data of the previous day to predict the load of the next day. However, since the delay of power grid load data is usually greater than 1 day, for example, it is usually 4 days, that is, today can only obtain the real load data of 4 days ago, and the load pattern of the 4 days in the middle is unknown, that is, the characteristics (load data) of the most recent time period used for prediction are missing, resulting in poor prediction results.

[0237] 3. Challenges of long-term forecasting. Because grid load data is delayed for several days, power service providers usually need to forecast load data for a certain period of time in the future (e.g., one week) at a time. Adding the delayed four days and the current day, 12 days of load data need to be forecasted at one time, and the load data for the last seven days is what really needs to be forecasted. For hourly load data, this means that forecasting is required. The load at a certain point in time is a great test for the long-term prediction ability of the model. The prediction methods of related technologies are difficult to accurately predict the power load at a distant point in time.

[0238] In response to the above problems, the power load forecasting method provided by the embodiment of the present disclosure constructs a training data set by extracting environmental feature (including time features, weather features, etc.) variables related to the user's electricity consumption behavior, combines the performance advantages of the PATCHTST model and the BITCN model, constructs a load forecasting model based on the PATCHTST model for predicting the daily total load data, and constructs a time-sharing proportion forecasting model based on the BITCN model for predicting the time-sharing proportion data, and then combines the two parts of the forecast results to obtain the time-sharing load forecasting result. Since the load forecasting model can effectively learn the correlation between the daily total load data and the constructed time-series external environmental features, the time-sharing proportion forecasting model can effectively learn the correlation between the time-sharing proportion and the constructed time-series external environmental features, so that the load forecasting results and the time-sharing proportion forecasting results have stronger robustness in special scenarios such as extreme weather and holidays. Combined with the characteristics of the PATCHTST model with high global feature attention and good at capturing long-distance dependencies, the accuracy of the load forecasting results can be effectively improved. The BITCN model can capture both past and future time series information, and can better understand the dynamic characteristics of local time series, thus effectively improving the robustness and accuracy of the time-sharing proportion forecast results. Combining the characteristics of the load forecasting model and the time-sharing proportion forecasting model, the forecast results of the two models are fused through the fusion algorithm to ensure the accuracy and robustness of the time-sharing load forecast results.

[0239] The above-mentioned embodiments of the present disclosure may be implemented separately or in any combination without conflict. The specific configuration may be based on actual needs and the present disclosure does not limit this.

[0240] Any power load forecasting method provided in the embodiments of the present disclosure may be executed by any appropriate electronic device with data processing capability, including but not limited to: electronic devices such as terminal devices and servers. Alternatively, any power load forecasting method provided in the embodiments of the present disclosure may be executed by a processor, such as a processor executing any power load forecasting method mentioned in the embodiments of the present disclosure by calling corresponding instructions stored in a memory. This will not be described in detail below.

[0241] Exemplary Devices Fig.15 is a schematic diagram of the structure of an electric load prediction device provided by an exemplary embodiment of the present disclosure. The electric load prediction device of this embodiment can be used to implement the corresponding electric load prediction method embodiment of the present disclosure, such as Fig.15 The device shown may include: an acquisition module 51 , a first processing module 52 , a second processing module 53 and a third processing module 54 .

[0242] The acquisition module 51 is used to acquire historical load data of a historical time period.

[0243] The first processing module 52 is used to determine the second time series characteristic data and the load label data corresponding to the second time series characteristic data based on the historical load data. The second time series characteristic data includes at least one of the time characteristic and the weather characteristic corresponding to the historical time period.

[0244] The second processing module 53 is used to train the load forecasting model based on the second time series feature data and the load label data to obtain a trained target load forecasting model.

[0245] The third processing module 54 is used to predict the load forecast result of the preset time period through the target load forecast model based on the first time series characteristic data corresponding to the preset time period. The first time series characteristic data includes at least one of the time characteristic and the weather characteristic corresponding to the preset time period.

[0246] Fig.15 The device shown can train or fine-tune the initial load prediction model online each time the power load in a preset time period is predicted to obtain a target load prediction model, and then make predictions based on the target load prediction model to obtain the load prediction results for the preset time period.

[0247] Fig.16 It is a structural diagram of an electric power load prediction device provided by another exemplary embodiment of the present disclosure.

[0248] In some optional embodiments of the present disclosure, Fig.16 As shown, the apparatus of the embodiment of the present disclosure may include an acquisition module 51 and a third processing module 54 .

[0249] The acquisition module 51 is used to acquire the first time series characteristic data corresponding to the preset time period to be predicted; the first time series characteristic data includes at least one of the time characteristics and weather characteristics corresponding to the preset time period. The third processing module 54 is used to predict the load prediction result corresponding to the preset time period through the target load prediction model based on the first time series characteristic data; the target load prediction model is obtained by training the initial load prediction model based on the second time series characteristic data corresponding to the historical time period and the load label data corresponding to the second time series characteristic data; the second time series characteristic data includes at least one of the time characteristics and weather characteristics corresponding to the historical time period.

[0250] In some optional embodiments of the present disclosure, the acquisition module 51 is used to obtain the date characteristics and weather characteristics corresponding to each day in the preset time period to be predicted; based on the date characteristics and weather characteristics corresponding to each day in the preset time period, the first time series characteristic data corresponding to the preset time period is determined. The first processing module 54 is used to predict the load prediction result corresponding to the preset time period through the target load prediction model based on the first time series characteristic data; the target load prediction model is a time series transformer model based on data block. The target load prediction model is obtained by training the initial load prediction model based on the second time series characteristic data corresponding to the historical time period and the load label data corresponding to the second time series characteristic data; the second time series characteristic data is determined based on the date characteristics and weather characteristics corresponding to each day in the historical time period. Among them, the date characteristics corresponding to each day include the location information of the day in a year, the location information of the day in a week, the status information of whether the day is a rest day, the total number of rest days of the day in the case of a rest day, and the location information of the day in the rest day; the weather characteristics corresponding to each day include the temperature, precipitation, and wind force corresponding to the day.

[0251] In some optional embodiments of the present disclosure, on the basis of the acquisition module 51 and the third processing module 54, the device of the embodiment of the present disclosure further includes a first processing module 52 and a second processing module 53. The acquisition module 51 can be used to acquire historical load data of a historical time period; the first processing module 52 is used to determine the second time series feature data corresponding to the historical time period; based on the historical load data, determine the load label data corresponding to the second time series feature data. The second processing module 53 is used to train the initial load forecasting model based on the second time series feature data and the load label data to obtain the target load forecasting model.

[0252] In some optional embodiments of the present disclosure, the second time series characteristic data and the load label data are data based on the first time granularity, and the historical load data is data based on the second time granularity. The duration corresponding to the first time granularity is greater than the duration corresponding to the second time granularity.

[0253] In some optional embodiments of the present disclosure, based on any of the above embodiments, the first processing module 52 is specifically used to: determine first load data based on a first time granularity in a historical time period based on historical load data; and determine load label data corresponding to second time series characteristic data based on the first load data.

[0254] In some optional embodiments of the present disclosure, the first time series feature data and the second time series feature data are respectively data based on a first time granularity; the first time granularity is a day.

[0255] In some optional embodiments of the present disclosure, the time features corresponding to the historical time period include the date features corresponding to each day in the historical time period; the time features corresponding to the preset time period include the date features corresponding to each day in the preset time period.

[0256] In some optional embodiments of the present disclosure, the date features corresponding to each day include at least one of the following: location information of the day in a year; location information of the day in a week; status information of whether the day is a rest day; the total number of rest days if the day is a rest day; and location information of the day on rest days.

[0257] In some optional embodiments of the present disclosure, the weather characteristics corresponding to the historical time period include the weather characteristics corresponding to each day in the historical time period; the weather characteristics corresponding to the preset time period include the weather characteristics corresponding to each day in the preset time period.

[0258] In some optional embodiments of the present disclosure, the weather characteristics corresponding to each day include at least one of the following: the temperature of the day; the precipitation of the day; the wind force of the day.

[0259] Fig.17 It is a structural diagram of a second processing module provided by an exemplary embodiment of the present disclosure.

[0260] In some optional embodiments of the present disclosure, based on any of the above embodiments, Fig.17 As shown, the second processing module 53 may include: a block processing unit 521 , a mapping processing unit 522 , a transformation processing unit 523 , a first prediction unit 524 and a first update unit 525 .

[0261] The block processing unit 521 is used to perform data block processing on the second time series feature data to obtain at least one block of data.

[0262] The mapping processing unit 522 is used to perform mapping processing on at least one block of data to obtain a first processing result.

[0263] The transformation processing unit 523 is used to perform transformation processing on the first processing result to obtain a second processing result.

[0264] The first prediction unit 524 is configured to determine a first prediction result based on the second processing result.

[0265] The first updating unit 525 is used to update the network parameters of the initial load prediction model based on the first prediction result and the load tag data to obtain an updated load prediction model; and determine the target load prediction model based on the updated load prediction model.

[0266] In some optional embodiments of the present disclosure, the block processing unit 521 is specifically used to: block the second time series feature data based on block parameters to obtain at least one block data; the block parameters include block length and step size.

[0267] In some optional embodiments of the present disclosure, the mapping processing unit 522 is specifically used to: map at least one block data to a preset dimensional space based on a mapping matrix to obtain a first mapping result; and determine a first processing result based on the first mapping result and the position coding matrix.

[0268] In some optional embodiments of the present disclosure, the transformation processing unit 523 is specifically used to: determine a first attention result based on the first processing result through a multi-head attention layer; obtain a first normalized result based on the first attention result through residual connection and layer normalization processing; and determine a second processing result based on the first normalized result.

[0269] Fig.18 It is a structural diagram of a third processing module provided by an exemplary embodiment of the present disclosure.

[0270] In some optional embodiments of the present disclosure, based on any of the above embodiments, Fig.18 As shown, the third processing module 54 may include: a first processing unit 541 , a second processing unit 542 , a third processing unit 543 and a fourth processing unit 544 .

[0271] The first processing unit 541 is used to perform data block division on the first time series feature data to obtain at least one block of data.

[0272] In some optional embodiments of the present disclosure, the first processing unit 541 and the block processing unit 521 may be the same processing unit or different processing units.

[0273] The second processing unit 542 is used to perform mapping processing on at least one block of data to obtain a third processing result.

[0274] In some optional embodiments of the present disclosure, the second processing unit 542 and the mapping processing unit 522 may be the same processing unit or different processing units.

[0275] The third processing unit 543 is used to perform transformation processing on the third processing result to obtain a fourth processing result.

[0276] In some optional embodiments of the present disclosure, the third processing unit 543 and the transformation processing unit 523 may be the same processing unit or different processing units.

[0277] The fourth processing unit 544 is used to determine the load forecast result of the preset time period through the prediction head network based on the fourth processing result.

[0278] In some optional embodiments of the present disclosure, the fourth processing unit 544 and the first prediction unit 424 may be the same processing unit or different processing units.

[0279] Fig.19 It is a structural diagram of an electric power load prediction device provided by another exemplary embodiment of the present disclosure.

[0280] In some optional embodiments of the present disclosure, based on any of the above embodiments, Fig.19 As shown, the device of the embodiment of the present disclosure may further include: a fourth processing module 61 , a fifth processing module 62 and a sixth processing module 63 .

[0281] The fourth processing module 61 is used to determine the third time series characteristic data of the second time granularity and the load time-sharing proportion label data corresponding to the third time series characteristic data based on the historical load data.

[0282] Among them, the third time series characteristic data includes at least one of the time characteristics and weather characteristics of the second time granularity corresponding to the historical time period; the load time-sharing proportion refers to the proportion of the power load value of each second time granularity in the corresponding power load value of the first time granularity.

[0283] The fifth processing module 62 is used to train the load time-sharing proportion prediction model based on the third time series feature data and the load time-sharing proportion label data to obtain a trained target time-sharing proportion prediction model.

[0284] The sixth processing module 63 is used to determine the time-sharing proportion prediction result corresponding to the preset time period through the target time-sharing proportion prediction model based on the fourth time series feature data of the second time granularity corresponding to the preset time period.

[0285] The fourth time series feature data includes at least one of a time feature and a weather feature of a second time granularity corresponding to a preset time period.

[0286] Fig. 20 It is a structural diagram of a power load prediction device provided by yet another exemplary embodiment of the present disclosure.

[0287] In some optional embodiments of the present disclosure, Fig. 20 As shown, on the basis of the acquisition module 51 and the third processing module 54, the device of the embodiment of the present disclosure may include a sixth processing module 63. The acquisition module 51 can also be used to obtain the fourth time series feature data of the second time granularity corresponding to the preset time period; the fourth time series feature data includes at least one of the time feature and the weather feature based on the second time granularity corresponding to the preset time period. The sixth processing module 63 is used to determine the time-sharing share prediction result corresponding to the preset time period based on the fourth time series feature data through the target time-sharing share prediction model; the target time-sharing share prediction model is obtained by training the initial time-sharing share prediction model based on the third time series feature data of the historical time period and the corresponding load time-sharing share label data; the third time series feature data includes at least one of the time feature and the weather feature based on the second time granularity corresponding to the historical time period; the load time-sharing share refers to the proportion of the power load value of each second time granularity in the corresponding power load value of the first time granularity.

[0288] In some optional embodiments of the present disclosure, Fig.19 As shown, the apparatus of the embodiment of the present disclosure may further include: a seventh processing module 64, configured to determine a time-sharing load forecast result for a preset time period based on the load forecast result for the preset time period and the time-sharing proportion forecast result.

[0289] In some optional embodiments of the present disclosure, the apparatus of the embodiments of the present disclosure may include the above-mentioned acquisition module 51, third processing module 54, sixth processing module 63 and seventh processing module 64.

[0290] In some optional embodiments of the present disclosure, the apparatus of the embodiment of the present disclosure may include the above-mentioned acquisition module 51, third processing module 54, fourth processing module 61, fifth processing module 62 and sixth processing module 63. The acquisition module 51 is also used to acquire the third time series feature data corresponding to the historical time period; the fourth processing module 61 is used to determine the load time-sharing proportion label data corresponding to the third time series feature data based on the historical load data; the fifth processing module 62 is used to train the initial time-sharing proportion prediction model based on the third time series feature data and the load time-sharing proportion label data to obtain the target time-sharing proportion prediction model.

[0291] In some optional embodiments of the present disclosure, based on any of the above embodiments, the fourth processing module 61 is specifically used to: determine second load data based on a second time granularity in a historical time period based on historical load data; determine load time-sharing proportion label data corresponding to the third time series characteristic data based on the second load data.

[0292] In some optional embodiments of the present disclosure, the fourth processing module 61 is specifically used for: Based on the second load data, determine the first load data based on the first time granularity in the historical time period; based on the second load data and the first load data, determine the time-sharing proportion value corresponding to each load value in the second load data; based on the time-sharing proportion value corresponding to each load value in the second load data, determine the load time-sharing proportion label data.

[0293] Fig.21 It is a structural diagram of a fifth processing module provided by an exemplary embodiment of the present disclosure.

[0294] In some optional embodiments of the present disclosure, the second time granularity is hours.

[0295] In some optional embodiments of the present disclosure, based on any of the above embodiments, Fig.21 As shown, the fifth processing module 62 may include: a time-sharing processing unit 621, a bidirectional processing unit 622, a first residual unit 623, a second residual unit 624, a fusion unit 625, a second prediction unit 626 and a second updating unit 627.

[0296] The time-sharing processing unit 621 is used to perform time-sharing processing on the third time series feature data by hour to obtain sub-time series feature data corresponding to each time point.

[0297] The sub-time series feature data corresponding to each time point includes the feature data corresponding to the time point in the third time series feature data; The bidirectional processing unit 622 is used to determine, based on each sub-time series feature data, a forward sequence and a reverse sequence of a first length corresponding to the sub-time series feature data.

[0298] The first residual unit 623 is used to determine the first sequence feature through a first residual network based on the forward sequence corresponding to each sub-time series feature data.

[0299] The second residual unit 624 is used to determine the second sequence feature through a second residual network based on the reverse sequence corresponding to each sub-time series feature data.

[0300] The fusion unit 625 is used to determine a bidirectional fusion result based on the first sequence feature and the second sequence feature.

[0301] The second prediction unit 626 is used to determine the first time-sharing proportion prediction result based on the bidirectional fusion result.

[0302] The second updating unit 627 is used to update the network parameters of the initial time-sharing proportion prediction model based on the first time-sharing proportion prediction result and the load time-sharing proportion label data to obtain an updated time-sharing proportion prediction model; based on the updated time-sharing proportion prediction model, determine the target time-sharing proportion prediction model.

[0303] In some optional embodiments of the present disclosure, the bidirectional processing unit 622 is specifically used to: perform bidirectional sliding window processing on each sub-time series feature data to obtain a forward sequence and a reverse sequence corresponding to the sub-time series feature data.

[0304] In some optional embodiments of the present disclosure, any one of the first residual network and the second residual network includes at least one residual sub-network; each residual sub-network includes at least one of a causal dilation convolution layer, a linear correction unit layer, a weight normalization layer, and a random dropout layer. That is, the first residual network may include at least one residual sub-network; the second residual network may include at least one residual sub-network.

[0305] In some optional embodiments of the present disclosure, the sixth processing module 63 is specifically used to: perform time-sharing processing on the fourth time series feature data by hour to obtain sub-time series feature data corresponding to each time point; the sub-time series feature data corresponding to each time point includes the feature data corresponding to the time point in the fourth time series feature data; based on each sub-time series feature data, determine the forward sequence and reverse sequence of the second length corresponding to the sub-time series feature data; based on the forward sequence corresponding to each sub-time series feature data, determine the third sequence feature through the first residual network; based on the reverse sequence corresponding to each sub-time series feature data, determine the fourth sequence feature through the second residual network; based on the third sequence feature and the fourth sequence feature, determine the bidirectional fusion result; based on the bidirectional fusion result, determine the time-sharing proportion prediction result corresponding to the preset time period.

[0306] The above-mentioned embodiments of the present disclosure may be implemented separately or in any combination without conflict. The specific configuration may be based on actual needs and the present disclosure does not limit this.

[0307] The beneficial technical effects corresponding to the exemplary embodiment of the present device can be found in the corresponding beneficial technical effects of the above exemplary method section, which will not be repeated here.

[0308] The embodiment of the present disclosure also provides a power load prediction device, Fig. 22 is a schematic diagram of the structure of a power load prediction device provided by an exemplary embodiment of the present disclosure, such as Fig. 22As shown, the power load prediction device of the embodiment of the present disclosure may include: a data acquisition device 65, a power load prediction device 66 and a data output device 67. The data acquisition device 65 is used to collect time data and meteorological data; the power load prediction device 66 may be configured with a time-sharing load prediction model; the power load prediction device 66 is used to obtain the first time series characteristic data corresponding to the preset time period to be predicted based on the collected time data and meteorological data, and predict the load prediction result corresponding to the preset time period based on the first time series characteristic data through the time-sharing load model. The data output device 67 is used to output the load prediction result corresponding to the preset time period obtained by prediction.

[0309] In some optional embodiments of the present disclosure, the data acquisition device 65 may also be used to collect historical load data.

[0310] In some optional embodiments of the present disclosure, the power load prediction device 66 may also be configured with a time-sharing share prediction model to obtain a time-sharing share prediction result.

[0311] In some optional embodiments of the present disclosure, the power load prediction device 66 may be the power load prediction device provided by any of the above embodiments to implement the power load prediction method provided by any of the above embodiments. For details, please refer to the above corresponding device embodiments, which will not be described in detail here.

[0312] In some optional embodiments of the present disclosure, the data output device 67 can also be used to output the time-sharing proportion prediction result.

[0313] In some optional embodiments of the present disclosure, the data output device 67 may also be used to output time-sharing load forecasting results.

[0314] The embodiments of the present disclosure also provide a power load prediction model, which may include a load prediction model. The load prediction model is used to obtain a load prediction result corresponding to a preset time period according to the first time series characteristic data of the preset time period, wherein the first time series characteristic data of the preset time period includes at least one of a time characteristic and a weather characteristic corresponding to the preset time period. The load prediction model may be the target load prediction model provided by any of the above embodiments, and specific details are referred to the above embodiments, which will not be described in detail here.

[0315] In some optional embodiments of the present disclosure, the power load forecasting model may also include a time-sharing share forecasting model and a fusion unit. The time-sharing share forecasting model is used to obtain the time-sharing share forecasting result corresponding to the preset time period according to the fourth time series feature data of the preset time period; the first time series feature data and the load forecasting result corresponding to the preset time period are data based on the first time granularity respectively; the fourth time series feature data and the time-sharing share forecasting result are data based on the second time granularity respectively. The time-sharing share forecasting model can be the target time-sharing share forecasting model provided by any of the above-mentioned embodiments, please refer to the above-mentioned corresponding embodiments for details, which will not be described in detail here. The fusion unit is used to fuse the load forecasting result and the time-sharing share forecasting result to obtain the time-sharing load forecasting result. The specific functions of the fusion unit refer to the above-mentioned embodiments, which will not be described in detail here.

[0316] In some optional embodiments of the present disclosure, a power load forecasting system may be provided, which may include the power load forecasting device provided in any of the above embodiments.

[0317] In some optional embodiments, Fig.23 FIG. 1 is a schematic diagram of the structure of a power load forecasting system provided by an exemplary embodiment of the present disclosure. Fig.23As shown, the power load forecasting system (referred to as the system) provided by the embodiment of the present disclosure may specifically include a data acquisition unit 71, a data processing unit 72, a feature extraction unit 73, a model building unit 74, a post-processing unit 75 and a system output unit 76. Among them, the data acquisition unit 71 is the input unit of the system, which is used to collect the original load data of the power grid to obtain the historical load data of the historical time period. The data acquisition unit 71 can also collect original meteorological data for constructing weather features. The original meteorological data may include historical meteorological data and the latest forecast data in the hour dimension, and historical meteorological data and the latest forecast data in the day dimension. The data processing unit 72 is used to process the original load data to obtain the load data set and time-sharing proportion data set of the required time granularity, such as the first load data, the second load data, and the load time-sharing proportion label data in the above embodiment. The feature extraction unit 73 is used to construct date features, weather features, etc. to obtain the above-mentioned second time series feature data, first time series feature data, third time series feature data, fourth time series feature data, etc. The model building unit 74 is used to build and train the load forecasting model and the time-sharing proportion forecasting model to obtain the trained target load forecasting model and the target time-sharing proportion forecasting model, and to predict based on the trained target load forecasting model to obtain the load forecasting result of the preset time period, and to predict based on the target time-sharing proportion forecasting model to obtain the time-sharing proportion forecasting result of the preset time period. The post-processing unit 75 is used to perform post-processing such as normalization processing on the time-sharing proportion forecasting result of the preset time period, and then merge it with the load forecasting result of the preset time period to obtain the time-sharing load forecasting result of the preset time period. The system output unit 76 can output at least one of the load forecasting result, time-sharing proportion forecasting result, and time-sharing load forecasting result of the preset time period. For example, the forecasting result is output in a preset format. Specifically, it can be exported in Excel or other forms. The data acquisition unit 71 can be the above-mentioned data acquisition device 65. The data processing unit 72, the feature extraction unit 73, the model building unit 74 and the post-processing unit 75 can correspond to the above-mentioned power load forecasting device 66, and the system output unit 76 can correspond to the above-mentioned data output device 67.

[0318] The above-mentioned embodiments of the present disclosure may be implemented separately or in any combination without conflict. The specific configuration may be based on actual needs and the present disclosure does not limit this.

[0319] The beneficial technical effects corresponding to the exemplary embodiments of the device, system, model, etc. can be found in the corresponding beneficial technical effects of the above exemplary method part, which will not be repeated here.

[0320] Exemplary Electronic Devices Fig.24It is a structural diagram of an electronic device provided by an embodiment of the present disclosure, including at least one processor 91 and a memory 92.

[0321] The processor 91 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 90 to perform desired functions.

[0322] The memory 92 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 91 may execute one or more computer program instructions to implement the methods and / or other desired functions of the various embodiments of the present disclosure described above.

[0323] In one example, the electronic device 90 may further include: an input device 93 and an output device 94 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0324] The input device 93 may also include, for example, a keyboard, a mouse, a touch screen, a microphone, various sensors, and the like. Sensors may include, for example, image sensors (such as cameras, cameras, etc.), laser radars, millimeter-wave radars, ultrasonic radars, positioning sensors, pressure sensors, air quality sensors, temperature sensors, and the like. Image sensors, laser radars, millimeter-wave radars, ultrasonic radars, and the like may be used to sense the surrounding environment, that is, to detect dynamic and static objects in the surrounding environment. Dynamic and static objects may include, for example, static objects such as lane lines, curbs, arrows, signs, trees, and buildings, as well as dynamic objects such as surrounding vehicles, pedestrians, and cyclists. Positioning sensors are used to realize the positioning of movable devices (such as self-vehicles, robots, and the like) where electronic devices are located. Positioning sensors may include, for example, inertial measurement units (IMUs), global positioning systems (GPSs), and the like. Pressure sensors may be used to detect seat pressure. Temperature sensors may be used to detect the temperature in the vehicle cabin. Air quality sensors may be used to detect the air quality in the vehicle cabin.

[0325] The output device 94 can output various information to the outside, and may include, for example, a display, a speaker, a communication network and a remote output device connected thereto, and the like.

[0326] Of course, to simplify, Fig.24 Only some of the components related to the present disclosure in the electronic device 90 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 90 may also include any other appropriate components.

[0327] Exemplary computer program products and computer-readable storage media In addition to the above methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the methods of various embodiments of the present disclosure described in the above “Exemplary Methods” section.

[0328] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0329] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps in the method of various embodiments of the present disclosure described in the above “Exemplary Method” section.

[0330] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium is, for example, but not limited to, a system, device or device including electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0331] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and cannot be considered as necessary for each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to being implemented by adopting the above specific details.

[0332] Those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present disclosure claims and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A method for predicting power load, comprising: Obtain the date characteristics and weather characteristics corresponding to each day in the preset time period to be predicted; Determine first time series feature data corresponding to the preset time period based on date features and weather features corresponding to each day in the preset time period; Based on the first time series characteristic data, a load forecast result corresponding to the preset time period is predicted through a target load forecasting model; the target load forecasting model is a time series transformer model based on data blocks; The target load forecasting model is obtained by training the initial load forecasting model based on the second time series feature data corresponding to the historical time period and the load label data corresponding to the second time series feature data; the second time series feature data is determined based on the date characteristics and weather characteristics corresponding to each day in the historical time period; Among them, the date characteristics corresponding to each day include the location information of the day in the year, the location information of the day in the week, the status information of whether the day is a rest day, the total number of rest days if the day is a rest day, and the location information of the day on rest days; the weather characteristics corresponding to each day include the temperature, precipitation, and wind speed corresponding to the day.

2. The method according to claim 1, wherein: The target load prediction model is obtained in the following way: Obtaining historical load data for the historical time period; Determine the second time series feature data corresponding to the historical time period; Based on the historical load data, determining the load label data corresponding to the second time series characteristic data; Based on the second time series feature data and the load label data, an initial load forecasting model is trained to obtain the target load forecasting model.

3. The method according to claim 2, wherein: The training of the initial load forecasting model based on the second time series feature data and the load label data to obtain the target load forecasting model includes: Blocking the second time series feature data to obtain at least one block of data; Performing mapping processing on the at least one block data to obtain a first processing result; Performing transformation processing on the first processing result to obtain a second processing result; Determining a first prediction result based on the second processing result; Based on the first prediction result and the load tag data, updating the network parameters of the initial load prediction model to obtain an updated load prediction model; Based on the updated load forecasting model, the target load forecasting model is determined.

4. The method according to claim 1, wherein: The step of predicting and obtaining a load forecast result corresponding to the preset time period based on the first time series characteristic data by using the target load forecasting model includes: Performing data block division on the first time series feature data to obtain at least one block of data; Performing mapping processing on the at least one block data to obtain a third processing result; Performing transformation processing on the third processing result to obtain a fourth processing result; Based on the fourth processing result, the load forecast result for the preset time period is determined through a prediction head network.

5. The method according to any one of claims 1 to 4, further comprising: Acquire fourth time series feature data of a second time granularity corresponding to the preset time period; The fourth time series feature data includes time features and weather features based on the second time granularity corresponding to the preset time period; The duration corresponding to the second time granularity is less than 1 day; Based on the fourth time series feature data, the time-sharing share prediction result corresponding to the preset time period is determined through the target time-sharing share prediction model; the target time-sharing share prediction model is obtained by training the initial time-sharing share prediction model based on the third time series feature data of the historical time period and the corresponding load time-sharing share label data; the third time series feature data includes the time characteristics and weather characteristics based on the second time granularity corresponding to the historical time period; The load time-sharing proportion refers to the proportion of the power load value of each second time granularity in the corresponding power load value of one day; Based on the load forecast result and the time-sharing proportion forecast result of the preset time period, the time-sharing load forecast result of the preset time period is determined.

6. The method according to claim 5, wherein: The target time-sharing proportion prediction model is obtained by: Acquire the historical load data corresponding to the historical time period and the third time series characteristic data; Based on the historical load data, determining the load time-sharing proportion label data corresponding to the third time series characteristic data; Based on the third time series feature data and the load time-sharing proportion label data, the initial time-sharing proportion prediction model is trained to obtain the target time-sharing proportion prediction model.

7. The method according to claim 6, wherein: The step of determining the load time-sharing proportion label data corresponding to the third time series characteristic data based on the historical load data includes: Based on the historical load data, determining second load data based on a second time granularity in the historical time period; Based on the second load data, determining first load data based on a first time granularity in the historical time period; the first time granularity is a day; Based on the second load data and the first load data, determining a time-sharing proportion value corresponding to each load value in the second load data; The load time-sharing proportion label data is determined based on the time-sharing proportion value corresponding to each load value in the second load data.

8. The method according to claim 6, wherein: The second time granularity is hours; The training of the initial time-sharing proportion prediction model based on the third time series feature data and the load time-sharing proportion label data to obtain the target time-sharing proportion prediction model includes: Perform time-division processing on the third time series feature data by hour to obtain sub-time series feature data corresponding to each time point; the sub-time series feature data corresponding to each time point includes the feature data corresponding to the time point in the third time series feature data; Based on each of the sub-time series feature data, determine a forward sequence and a reverse sequence of a first length corresponding to the sub-time series feature data; Based on the forward sequence corresponding to each of the sub-time series feature data, determine a first sequence feature through a first residual network; Based on the reverse sequence corresponding to each of the sub-time series feature data, determine a second sequence feature through a second residual network; Determining a bidirectional fusion result based on the first sequence feature and the second sequence feature; Based on the two-way fusion result, determining a first time-sharing proportion prediction result; Based on the first time-sharing proportion prediction result and the load time-sharing proportion label data, the network parameters of the initial time-sharing proportion prediction model are updated to obtain an updated time-sharing proportion prediction model; Based on the updated time-sharing proportion prediction model, the target time-sharing proportion prediction model is determined.

9. A power load forecasting device, comprising: An acquisition module, used to acquire date characteristics and weather characteristics corresponding to each day in a preset time period to be predicted; Determine first time series feature data corresponding to the preset time period based on date features and weather features corresponding to each day in the preset time period; A first processing module is used to predict and obtain the load prediction result corresponding to the preset time period through a target load prediction model based on the first time series characteristic data; the target load prediction model is a time series transformer model based on data block; The target load forecasting model is obtained by training the initial load forecasting model based on the second time series feature data corresponding to the historical time period and the load label data corresponding to the second time series feature data; the second time series feature data is determined based on the date characteristics and weather characteristics corresponding to each day in the historical time period; Among them, the date characteristics corresponding to each day include the location information of the day in the year, the location information of the day in the week, the status information of whether the day is a rest day, the total number of rest days if the day is a rest day, and the location information of the day on rest days; the weather characteristics corresponding to each day include the temperature, precipitation, and wind speed corresponding to the day.

10. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1 to 8; or, The electronic equipment comprises: the power load prediction device as described in claim 9 above.

11. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method according to any one of claims 1 to 8.

12. A computer program product, when instructions in the computer program product are executed by a processor, performs the method described in any one of claims 1 to 8 of the present disclosure.

Citation Information

Patent Citations

  • Power load prediction method and device, computer equipment and storage medium

    CN111160625A

  • Regional centralized terminal load prediction method

    CN112526888A

  • Short-term power load prediction method and device based on Stacking algorithm

    CN112991091A

  • Method for predicting short-term power load of power system

    CN113469396A

  • Power distribution network edge side load identification method and device and terminal equipment

    CN113919542A

Cited By

  • Regional meteorological model error control method based on neural network

    CN121327748A

  • Power load intelligent prediction method and system for industrial and commercial users

    CN122495340A

  • Intelligent Power Load Forecasting Methods and Systems for Industrial and Commercial Users

    CN122495340B