Multi-element load prediction method and device for energy system and computer equipment
Through the multi-load prediction method, multi-task learning is used to adjust the model parameters, the problem of low accuracy in traditional load prediction methods is solved, and accurate prediction of loads of various energy types is achieved, which enhances the accuracy and reliability of the prediction model.
Patent Information
- Application Number
- CN202411350732.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-24
AI Technical Summary
Traditional load prediction methods adopt single task learning, resulting in low load prediction accuracy, and the coupling relationship between multiple energy types cannot be effectively considered, affecting the accuracy of the prediction results.
A multi-load prediction method for energy system is proposed. By obtaining multi-load historical data and influencing factors, multiple training samples are constructed, model parameters are adjusted using multi-task learning method, and target multi-load prediction model is generated, and multiple energy types are comprehensively considered. Load forecast.
Improve the accuracy of load prediction, can more effectively consider the relationship between different energy types, and enhance the accuracy and reliability of the prediction model.
Smart Images

Figure CN119182127A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of load forecasting, and in particular to a method, apparatus, computer equipment, computer-readable storage medium and computer program product for multivariate load forecasting of an energy system. Background Art
[0002] With the development of computer technology, load forecasting technology has emerged. Load forecasting is an important issue in the power system. It is of great significance for power supply and demand balance, dispatching and control, and power grid planning. With the continuous expansion of the scale of the power system and the increasing complexity of the power market, accurate prediction of power load has become the key to ensure the stable operation of the power system.
[0003] In traditional technologies, load forecasting methods usually use a single-task learning approach to perform load forecasting, that is, only focusing on a single attribute or feature of the load. This may cause the load forecasting results to deviate from the actual situation and there is a problem of low load forecasting accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for multi-element load forecasting of an energy system that can improve the accuracy of load forecasting in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a method for multivariate load forecasting of an energy system, comprising:
[0006] Acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0007] Determining multiple energy types indicated by the multivariate load historical data, and constructing multiple training samples of each energy type based on the data set;
[0008] For each of the energy types, multiple training samples of the energy type are input into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0009] Obtaining a weight for each of the energy types, and determining a model prediction loss value based on the weight for each of the energy types and load prediction results corresponding to a plurality of training samples for each of the energy types;
[0010] According to the model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
[0011] In a second aspect, the present application also provides a multi-element load forecasting device for an energy system, comprising:
[0012] An acquisition module, used to acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0013] A training sample construction module, used to determine multiple energy types indicated by the multivariate load historical data, and to construct multiple training samples of each energy type based on the data set;
[0014] A model training module is used to input multiple training samples of each energy type into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0015] A loss value determination module is used to obtain the weight of each energy type, and determine the model prediction loss value based on the weight of each energy type and the load prediction results corresponding to a plurality of training samples of each energy type;
[0016] The parameter adjustment module is used to adjust the parameters of the initial multivariate load forecasting model according to the model prediction loss value to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
[0017] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0018] Acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0019] Determining multiple energy types indicated by the multivariate load historical data, and constructing multiple training samples of each energy type based on the data set;
[0020] For each of the energy types, multiple training samples of the energy type are input into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0021] Obtaining a weight for each of the energy types, and determining a model prediction loss value based on the weight for each of the energy types and load prediction results corresponding to a plurality of training samples for each of the energy types;
[0022] According to the model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0024] Acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0025] Determining multiple energy types indicated by the multivariate load historical data, and constructing multiple training samples of each energy type based on the data set;
[0026] For each of the energy types, multiple training samples of the energy type are input into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0027] Obtaining a weight for each of the energy types, and determining a model prediction loss value based on the weight for each of the energy types and load prediction results corresponding to a plurality of training samples for each of the energy types;
[0028] According to the model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
[0029] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0030] Acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0031] Determining multiple energy types indicated by the multivariate load historical data, and constructing multiple training samples of each energy type based on the data set;
[0032] For each of the energy types, multiple training samples of the energy type are input into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0033] Obtaining a weight for each of the energy types, and determining a model prediction loss value based on the weight for each of the energy types and load prediction results corresponding to a plurality of training samples for each of the energy types;
[0034] According to the model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
[0035] The above-mentioned energy system multivariate load forecasting method, device, computer equipment, computer-readable storage medium and computer program product, when obtaining a data set for multivariate load forecasting and determining the multiple energy types indicated by the multivariate load historical data, use the data set to construct multiple training samples for each energy type respectively, and can comprehensively consider the multivariate load historical data and the characteristics of the influencing factors that generate the multivariate load historical data to achieve accurate construction of the training samples. By inputting multiple training samples of the energy type into the initial multivariate load forecasting model for each energy type, the load forecast results corresponding to the multiple training samples of the energy type are obtained, and the weight of each energy type is obtained. Based on the weight of each energy type and the load forecast results corresponding to the multiple training samples of each energy type, the model prediction loss value is determined. According to the model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain the target multivariate load forecasting model. The multi-task learning method can be adopted to simultaneously use the training samples and weights of multiple energy types to achieve accurate construction of the target multivariate load forecasting model, and then the target multivariate load forecasting model can be used to achieve accurate load forecasting, which can improve the accuracy of load forecasting. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] FIG1 is an application environment diagram of a multi-element load forecasting method for an energy system in one embodiment;
[0038] FIG2 is a schematic diagram of a flow chart of a method for forecasting multiple loads in an energy system according to an embodiment;
[0039] FIG3 is a schematic diagram of a flow chart of a method for predicting multiple loads in an energy system according to another embodiment;
[0040] FIG4 is a schematic diagram of multi-task learning in one embodiment;
[0041] FIG5 is a schematic diagram of a multi-energy system in one embodiment;
[0042] FIG6 is a schematic diagram of a flow chart of a method for predicting multiple loads in an energy system in another embodiment;
[0043] FIG7 is a structural block diagram of a device for predicting multiple loads in an energy system according to an embodiment;
[0044] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] The energy system multi-element load forecasting method provided in the embodiment of the present application can be applied in the application environment shown in FIG1 . The terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other network servers.
[0047] The server 104 obtains a data set for multivariate load forecasting, the data set includes multivariate load historical data and influencing factor characteristics, determines the multiple energy types indicated by the multivariate load historical data, and constructs multiple training samples of each energy type based on the data set. For each energy type, the multiple training samples of the energy type are input into the initial multivariate load forecasting model to obtain the load forecasting results corresponding to the multiple training samples of the energy type, obtains the weight of each energy type, and determines the model prediction loss value based on the weight of each energy type and the load forecasting results corresponding to the multiple training samples of each energy type. According to the model prediction loss value, the initial multivariate load forecasting model is parameterized to obtain the target multivariate load forecasting model. When the user sends a load forecasting request carrying input data to the server 104 through the terminal 102, the server 104 inputs the input data into the target multivariate load forecasting model, obtains and outputs the load forecasting result to the terminal 102.
[0048] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0049] In an exemplary embodiment, as shown in FIG2 , a method for multi-element load forecasting of an energy system is provided. The method can be executed by a terminal or a server alone, or by a terminal and a server in collaboration. The method is applied to the server in FIG1 as an example for explanation, and includes the following steps 202 to 210. Among them:
[0050] Step 202, obtaining a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics.
[0051] Among them, multi-load historical data refers to a collection of historical data of different types of energy loads, such as electric load, heat load, cooling load, and gas load, in an integrated energy system, that is, a collection of data of different types of energy loads at multiple historical moments. For example, multi-load historical data can specifically refer to the output values of different types of energy loads, such as electric load, heat load, cooling load, and gas load, in an integrated energy system. The output value of an energy load usually refers to the amount of energy that an energy system (such as a power system, a thermal system, a cooling and heating supply system, etc.) needs to provide at a specific point in time or within a period of time.
[0052] For example, in the power system, the power load output value usually refers to the amount of electricity required by the user or the grid at a specific time point or time period, usually in kilowatts (kW) or megawatts (MW). For thermal systems, such as district heating systems, the heat load output value refers to the amount of heat energy that the system needs to generate to meet heating needs, usually in kilowatt-hours (kWh) or megawatt-hours (MWh). In the cooling and heating supply system, the cooling load output value refers to the amount of cooling that the system needs to generate to meet cooling needs, also in kilowatt-hours (kWh) or megawatt-hours (MWh).
[0053] Among them, influencing factors refer to factors that affect energy load. For example, influencing factors can specifically refer to meteorological factors, time factors, economic factors, user behavior, technical factors, etc. Among them, the impact of meteorological factors is that meteorological conditions such as temperature, humidity, wind speed, and rainfall have a significant impact on energy load. For example, an increase in temperature usually leads to an increase in air conditioning load, thereby increasing the power load. For example, the indicators of meteorological factors can be temperature index, humidity index, wind speed, atmospheric pressure, etc. The impact of time factors is that the load patterns in different time periods (such as weekdays and weekends, daytime and night) may be very different. Seasonal changes and holidays will also have an impact on the load. For example, the indicators of time factors can be weekdays, holidays, etc. The impact of economic factors is that economic factors such as regional economic development level, industrial structure, and industrial activity level will affect energy demand. For example, the indicators of economic factors can be data that represent the regional economic development level (such as regional per capita GDP (Gross Domestic Product)), electricity prices, and transaction volume. The impact of user behavior is that the electricity usage habits of residential and commercial users and the use of electrical equipment will affect energy demand. The impact of technical factors is that the technical level of the energy system, the efficiency of energy conversion equipment, etc. will affect the energy supply.
[0054] Among them, the influencing factor characteristics refer to the characteristics obtained after preprocessing the influencing factor indicators. It is understandable that the indicators of different influencing factors are not comparable due to different dimensions. Therefore, it is necessary to normalize the influencing factor indicators to obtain comparable influencing factor characteristics. For example, the following formula can be used to normalize the indicators of each influencing factor:
[0055] ;
[0056] in, , , , They are the normalized value, initial value, maximum value and minimum value of the indicator respectively.
[0057] For example, when it is necessary to perform multi-element load forecasting of an energy system, the server will obtain a data set for multi-element load forecasting, which includes multi-element load historical data and influencing factor characteristics. It can be understood that the key to multi-element load forecasting is to analyze and mine the interrelationships and influencing factors between different energy loads, such as weather conditions, time, season, etc. Through in-depth analysis of historical data, an accurate forecasting model can be established to support the planning and operation of an integrated energy system.
[0058] Step 204 , determining multiple energy types indicated by the multivariate load historical data, and constructing multiple training samples for each energy type based on the data set.
[0059] Among them, energy type refers to the type determined by classification according to the source and nature of energy. For example, energy types can specifically include electricity, gas, heat, cold, etc. Among them, electricity can be generated in many ways. Gas energy refers to energy forms related to gas energy, such as natural gas, biogas, etc. Thermal energy is a type of energy widely used in heating, hot water supply, industrial processes and power generation. Cold energy refers to energy used for refrigeration, which can come from electricity, heat or other energy forms.
[0060] The multiple energy types indicated by the multi-load historical data refer to the multiple energy types that generate the multi-load historical data. For example, the energy type that generates the electric load is electric energy, the energy type that generates the cooling load is cooling energy, the energy type that generates the heat load is heat energy, and the energy type that generates the gas load is gas energy.
[0061] The training samples of each energy type refer to samples composed of data extracted from the data set according to the energy type, and the training samples include the input features corresponding to the determined load forecast moment and the load forecast label. It can be understood that the load forecast label here corresponds to the energy type, that is, for the input features corresponding to the same load forecast moment, the load forecast labels in the training samples of different energy types are different.
[0062] Taking different energy types including electric energy, gas energy, thermal energy and cooling energy as examples, the load prediction label in the training sample of electric energy is the electric load prediction label, the load prediction label in the training sample of gas energy is the gas load prediction label, the load prediction label in the training sample of thermal energy is the thermal load prediction label, and the load prediction label in the training sample of cooling energy is the cooling load prediction label.
[0063] For example, the server determines the multiple energy types indicated by the multivariate load history data, that is, the energy type that generates each load history data. It is understandable that each load history data indicates one energy type. Based on the determination of the multiple energy types, the server can construct multiple training samples of each energy type based on the data set.
[0064] In a specific application, when constructing multiple training samples of each energy type based on a data set, for each energy type, the server determines the number of training samples of the energy type, and then determines multiple load forecasting moments corresponding to the number of training samples based on the number of training samples and the load forecasting time scale of the initial multivariate load forecasting model, and then uses the multiple load forecasting moments to obtain multiple training samples of the energy type from the data set. Each load forecasting moment corresponds to one training sample.
[0065] Among them, the load forecasting time scale refers to the time range or granularity of the future load predicted by the initial multivariate load forecasting model, which can be configured according to the actual application scenario. For example, in the case of ultra-short-term load forecasting scenarios such as real-time power grid operation, demand response, and power market bidding strategies, the load forecasting time scale can be specifically a few minutes to a few hours. For another example, in the case of short-term load forecasting scenarios such as daily power grid operation and control, power generation planning, and power market transactions, the load forecasting time scale can be specifically a few hours to a few days. For another example, in the case of medium-term load forecasting scenarios such as dimensional planning and inventory management of power generation equipment, the load forecasting time scale can be specifically a few days to a few weeks. For another example, in the case of long-term load forecasting scenarios such as power system planning, capital investment decisions, and policy formulation, the load forecasting time scale can be specifically a few months to a few years.
[0066] It should be noted that the characteristics of the influencing factors that need to be obtained may not be exactly the same depending on the load forecasting time scale. For example, for ultra-short-term load forecasting scenarios and short-term load forecasting scenarios, meteorological factors and time factors are mainly considered. For medium-term load forecasting scenarios and long-term load forecasting scenarios, economic factors are mainly considered.
[0067] The load forecasting moment refers to the time point or time period predicted by the initial multivariate load forecasting model. It can be understood that in this embodiment, what is involved is the construction of training samples, so the load forecasting moment refers to the time point or time period in the past.
[0068] Step 206 , for each energy type, multiple training samples of the energy type are input into the initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type.
[0069] The load forecast result refers to the load usage result obtained by the initial multivariate load forecasting model based on the input features in the training samples when the training samples are input into the initial multivariate load forecasting model. For example, the load forecast result may specifically refer to the output value of the predicted energy load.
[0070] Exemplarily, for each energy type, the server inputs multiple training samples of the energy type into the initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type.
[0071] In specific applications, the initial multivariate load forecasting model can be selected according to the actual application scenario, and this embodiment does not make specific limitations here. For example, the initial multivariate load forecasting model can specifically be a forecasting model constructed based on the least squares support vector machine. Among them, the least squares support vector machine is an improved standard SVM (Support Vector Machine) machine learning method, which greatly simplifies the calculation process and cost, making the support vector machine easier to train. By introducing the squared error term, the convex quadratic programming problem in the SVM algorithm is transformed into a set of linear equations to be solved, so that the inequality constraint problem in the classic SVM algorithm is transformed into an equality constraint problem, which greatly reduces the difficulty of solving the problem and shows superior performance compared to the classic SVM algorithm.
[0072] In a specific application, the least squares support vector machine is taken as an example to illustrate the prediction principle of the initial multivariate load prediction model in this embodiment. Assume that multiple training samples of energy types are , is the input feature in the training sample, is the load forecasting result output by the initial multivariate load forecasting model, and n is the number of training samples. Then in the feature space, the initial multivariate load forecasting model can be expressed as: ,in, is a nonlinear mapping function, is the weight vector in the feature space, is the bias. According to the principle of structural risk minimization, the function estimation problem of the least squares support vector machine can be described as follows: In the formula, is the error penalty parameter, represents the error variable, . Constraints, namely It can be understood that the purpose of constructing a nonlinear mapping function is to extract the original data information of the subsystems of each energy type in the energy system, map the samples in the original space to the high-dimensional space, and thus solve the linear inseparability problem in the original space.
[0073] Step 208: Obtain the weight of each energy type, and determine the model prediction loss value based on the weight of each energy type and the load prediction results corresponding to a plurality of training samples of each energy type.
[0074] Among them, the weight of the energy type reflects the importance and contribution of the energy type in meeting the total energy demand. In this embodiment, the weight of the energy type can be configured according to the actual application scenario, or it can be determined based on the market value of the energy type, the energy consumption pattern of the energy system, etc. For example, the weight of the energy type can be determined by comparing the market value of each energy type, where the energy type with a higher price may be given a higher weight. For example, the weight of the energy type can be the ratio of the market value of the energy type to the total market value of all energy types. For another example, the weight of the energy type can be determined by comparing the energy consumption (such as output value) of each energy type, where the type with more consumption may be given a higher weight. For example, the weight of the energy type can be the ratio of the energy consumption of the energy type to the total energy consumption of all energy types.
[0075] Exemplarily, the server obtains the weight of each energy type, and for each energy type, determines at least one error loss value of the energy type based on the load forecast results corresponding to multiple training samples of the energy type and the number of training samples, and then uses at least one error loss value and weight of the energy type to determine the model prediction loss value. Among them, the error loss value is an important indicator for measuring the prediction accuracy of the initial multivariate load forecasting model, and can specifically be at least one of the mean absolute relative error loss value, the root mean square error loss value, and the mean absolute error loss value. In a specific application, using at least one error loss value and weight of the energy type, the server can calculate the weighted average precision error loss value, and then obtain the model prediction loss value based on the weighted average precision error loss value.
[0076] Step 210, adjusting the parameters of the initial multivariate load forecasting model according to the model prediction loss value to obtain a target multivariate load forecasting model, which is used to output a load forecasting result according to the input data.
[0077] Exemplarily, after determining the model prediction loss value, the server will adjust the parameters of the initial multivariate load prediction model according to the model prediction loss value to obtain a target multivariate load prediction model. The obtained target multivariate load prediction model is used to output load prediction results based on input data.
[0078] In specific applications, the server can adjust the parameters of the initial multivariate load forecasting model by means of hyperparameter optimization, model structure adjustment, etc. Among them, hyperparameter optimization refers to the optimization of the hyperparameters of the initial multivariate load forecasting model, such as the learning rate, the number of neurons in the hidden layer, etc. Model structure adjustment refers to the adjustment of the number of layers and the number of neurons in the initial multivariate load forecasting model.
[0079] In a specific application, after adjusting the parameters of the initial multivariate load forecasting model, the server will further evaluate the adjusted multivariate load forecasting model. If the adjusted multivariate load forecasting model does not meet the condition for stopping model training, the server will continue to adjust until the adjusted multivariate load forecasting model meets the condition for stopping model training, thereby obtaining the target multivariate load forecasting model. The condition for stopping model training can be configured according to the actual application scenario. For example, the condition for stopping model training can specifically be that the model prediction loss value is less than the loss value threshold, or that the model prediction loss value converges. This is not specifically limited in this embodiment.
[0080] The above-mentioned multivariate load forecasting method for energy systems, when a data set for multivariate load forecasting is obtained and multiple energy types indicated by the multivariate load historical data are determined, uses the data set to construct multiple training samples for each energy type respectively, can comprehensively consider the multivariate load historical data and the characteristics of the influencing factors that generate the multivariate load historical data, and realize accurate construction of the training samples. By inputting multiple training samples of each energy type into the initial multivariate load forecasting model for each energy type, the load forecasting results corresponding to the multiple training samples of the energy type are obtained, and the weight of each energy type is obtained. Based on the weight of each energy type and the load forecasting results corresponding to the multiple training samples of each energy type, the model prediction loss value is determined. According to the model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain the target multivariate load forecasting model. The multi-task learning method can be adopted, and the training samples and weights of multiple energy types are used at the same time to realize accurate construction of the target multivariate load forecasting model, and then the target multivariate load forecasting model can be used to realize accurate load forecasting, which can improve the accuracy of load forecasting.
[0081] In an exemplary embodiment, based on the weight of each energy type and the load forecasting results corresponding to a plurality of training samples of each energy type, determining the model prediction loss value includes:
[0082] For each energy type, based on the load forecast results corresponding to each of the multiple training samples of the energy type and the number of training samples, determine the average absolute relative error loss value of the energy type;
[0083] Determine the prediction accuracy error loss value of the energy type based on the average absolute relative error loss value and weight of the energy type;
[0084] Superimpose the prediction accuracy error loss values of various energy types to obtain the weighted average accuracy error loss value;
[0085] Determine the model prediction loss value based on the weighted average precision error loss value.
[0086] Among them, the average absolute relative error loss value refers to the average value of the percentage error between the predicted value and the actual value. In this embodiment, it is the average value of the percentage error between the load prediction result corresponding to the training sample and the load prediction label in the training sample. The prediction accuracy error loss value refers to the loss value used to reflect the prediction accuracy of the model for the energy type. It can be understood that the larger the prediction accuracy error loss value, the lower the prediction accuracy for the energy type. The weighted average accuracy error loss value is a loss value obtained by comprehensively considering the average absolute relative error loss value and weight of each energy type, which reflects the prediction accuracy of the model for multiple energy types.
[0087] Exemplarily, for each energy type, the server determines the average absolute relative error loss value of the energy type based on the load prediction results corresponding to multiple training samples of the energy type and the number of training samples, and then uses the average absolute relative error loss value and weight of the energy type to calculate the prediction accuracy error loss value of the energy type, and then superimposes the prediction accuracy error loss values of multiple energy types to obtain the weighted average accuracy error loss value, and finally determines the model prediction loss value based on the weighted average accuracy error loss value.
[0088] In a specific application, for each energy type, when calculating the mean absolute relative error loss value of the energy type, for each training sample in multiple training samples of the energy type, the server calculates the predicted difference between the load prediction label in the training sample and the load prediction result corresponding to the training sample, and then calculates the percentage value of the predicted difference and the load prediction label, and then calculates the average value of the percentage value obtained based on each training sample, and uses the average value as the mean absolute relative error loss value of the energy type. In a specific application, the calculation of the mean absolute relative error loss value (MAPE (mean absolute relative error)) of the energy type can be expressed by the following formula:
[0089] ;
[0090] Where n is the number of training samples of energy type, is the load forecast label in the training sample, which can be The actual output value at the moment, is the load forecast result corresponding to the training sample, which can be The predicted output value at the time. Time refers to the load forecast time.
[0091] In a specific application, when determining the prediction accuracy error loss value of an energy type, the server calculates the difference between the preset prediction accuracy evaluation value and the average absolute relative error loss value of the energy type, and then calculates the product of the difference and the weight of the energy type, and uses the product as the prediction accuracy error loss value of the energy type. Among them, the preset prediction accuracy evaluation value refers to a fixed value that is pre-set to evaluate the prediction accuracy, which can be configured according to the actual application scenario. For example, the preset prediction accuracy evaluation value can be 1, then the prediction accuracy error loss value = 1-average absolute relative error loss value. It can be understood that by comparing the average absolute relative error loss value of the energy type with the preset prediction accuracy evaluation value, the preset prediction accuracy evaluation value can be used to achieve an accurate estimate of the prediction accuracy.
[0092] In a specific application, taking the preset prediction accuracy evaluation value as 1 as an example, the calculation formula for the weighted average accuracy error loss value can be:
[0093] ;
[0094] Among them, WMA refers to the weighted average precision error loss value, is the weight of energy type k, and MAPE refers to the mean absolute relative error loss value of energy type k.
[0095] In this embodiment, in this way, the load prediction results, the number of training samples and the weights corresponding to multiple training samples of each energy type can be used to determine the weighted average precision error loss value, so that the weighted average precision error loss value can be used to determine the model prediction loss value.
[0096] In an exemplary embodiment, determining the model prediction loss value according to the weighted average precision error loss value includes:
[0097] For each energy type, based on the load forecasting results corresponding to multiple training samples of the energy type and the number of training samples, determine the root mean square error loss value and the mean absolute error loss value of the energy type;
[0098] Based on the weighted average precision error loss value, as well as the average absolute relative error loss value, root mean square error loss value and average absolute error loss value of various energy types, the model prediction loss value is obtained.
[0099] Among them, the root mean square error loss value measures the prediction accuracy of the model by calculating the average of the squares of the differences between the predicted values and the actual values, and then taking the square root. In this embodiment, the prediction accuracy of the model is measured by calculating the average of the squares of the differences between the load prediction results corresponding to the training samples and the load prediction labels in the training samples, and then taking the square root. The mean absolute error loss value is an indicator used to measure the average absolute error between the predicted values and the actual values, that is, an indicator to measure the average absolute error between the load prediction results corresponding to the training samples and the load prediction labels in the training samples.
[0100] Exemplarily, for each energy type, the server calculates the root mean square error loss value and the mean absolute error loss value of the energy type based on the load prediction results corresponding to multiple training samples of the energy type and the number of training samples, and then obtains the model prediction loss value based on the weighted average precision error loss value, as well as the average absolute relative error loss value, root mean square error loss value and mean absolute error loss value of each of the multiple energy types.
[0101] In specific applications, the root mean square error loss value (RMSE (Root Mean Squared Error)) can be calculated by the following formula:
[0102] ;
[0103] Where n is the number of training samples of energy type, is the load forecast label in the training sample, which can be The actual output value at the moment, is the standard deviation of the load forecast results corresponding to the training samples, which can be obtained by the load forecast results corresponding to multiple training samples. Specifically, The standard deviation of the predicted output value at the time. Time refers to the load forecast time.
[0104] In specific applications, the mean absolute error loss (MAE (Mean Absolute Error)) can be calculated by the following formula:
[0105] ;
[0106] Where n is the number of training samples of energy type, is the load forecast label in the training sample, which can be The actual output value at the moment, is the standard deviation of the load forecast results corresponding to the training samples, which can be obtained by the load forecast results corresponding to multiple training samples. Specifically, The standard deviation of the predicted output value at the time. Time refers to the load forecast time.
[0107] In specific applications, the server can obtain the model prediction loss value by directly superimposing the weighted average precision error loss value, and the average absolute relative error loss value, root mean square error loss value, and average absolute error loss value of each of the multiple energy types. The server can also first weight the average absolute relative error loss value, root mean square error loss value, and average absolute error loss value of each of the multiple energy types according to their respective weights to obtain the weighted average absolute relative error loss value, the weighted root mean square error loss value, and the weighted average absolute error loss value, and then superimpose the weighted average precision error loss value, the weighted average absolute relative error loss value, the weighted root mean square error loss value, and the weighted average absolute error loss value to obtain the model prediction loss value.
[0108] In this embodiment, multiple error loss values can be integrated in this way to measure the model prediction performance from multiple aspects, accurately determine the model prediction loss value, and based on this, accurately measure the model prediction performance.
[0109] In an exemplary embodiment, constructing a plurality of training samples for each energy type based on the data set includes:
[0110] For each energy type, determine the number of training samples of the energy type, and based on the number of training samples and the load forecasting time scale of the initial multivariate load forecasting model, determine multiple load forecasting moments corresponding to the number of training samples;
[0111] For each load forecast moment, the input features and load forecast labels corresponding to the load forecast moment are obtained from the data set to obtain the training samples corresponding to the load forecast moment;
[0112] The training samples corresponding to the multiple load forecast moments are used as multiple training samples of energy types.
[0113] The load forecast time scale refers to the time range or granularity of the future load predicted by the initial multivariate load forecasting model, which can be configured according to the actual application scenario. The load forecast moment refers to the time point or time period predicted by the initial multivariate load forecasting model. It can be understood that in this embodiment, what is involved is the construction of training samples, so the load forecast moment refers to the past time point or time period.
[0114] Exemplarily, for each energy type, the server determines the number of training samples of the energy type, and then selects multiple load forecast moments corresponding to the number of training samples based on the number of training samples and the load forecast time scale of the initial multivariate load forecasting model. Then, for each load forecast moment, the server obtains the input features and load forecast labels corresponding to the load forecast moment from the data set, obtains the training samples corresponding to the load forecast moment, and uses the training samples corresponding to the multiple load forecast moments as multiple training samples of the energy type.
[0115] In a specific application, when selecting multiple load forecasting moments, the server can select randomly or at intervals based on a set selection time interval. In this embodiment, the selection method is not limited here, as long as the selected load forecasting moment meets the requirements of the load forecasting time scale and the number of selected load forecasting moments is the number of training samples. It should be noted that meeting the requirements of the load forecasting time scale here means that the time range is the same as the load forecasting time scale. For example, it can be a few minutes, a few hours, a few days, a few months, a few years, etc.
[0116] In a specific application, after determining the load forecast time, the server will obtain the energy load consumption belonging to the energy type at the load forecast time from the data set as the load forecast label. For example, the server can obtain the output value belonging to the energy type at the load forecast time as the load forecast label. The input features corresponding to the load forecast time refer to the features used to predict the load forecast label corresponding to the load forecast time, which can specifically be the multivariate load historical data and influencing factor features used to predict the load forecast label corresponding to the load forecast time.
[0117] It is understandable that in order to improve the prediction accuracy, the server will select the multivariate load historical data and influencing factor characteristics within a period of time before the predicted load moment as the input features corresponding to the load forecast moment. The period of time here refers to a preset time range, which can be configured according to the actual application scenario. Specifically, it can be a time range with the same granularity as the load forecast time scale. For example, when the granularity of the load forecast time scale is days, the server can select the multivariate load historical data and influencing factor characteristics within a few days before the predicted load moment as the input features corresponding to the load forecast moment.
[0118] In this embodiment, for each energy type, on the basis of determining the number of training samples of the energy type, the number of training samples and the load prediction time scale of the initial multivariate load prediction model can be used to select multiple load prediction moments corresponding to the number of training samples, so that the multiple load prediction moments can be used to obtain the input features and load prediction labels corresponding to the load prediction moments from the data set, and obtain the training samples corresponding to the load prediction moments, so that the training samples corresponding to the multiple load prediction moments can be used as multiple training samples of the energy type to construct multiple training samples of the energy type.
[0119] In an exemplary embodiment, for each energy type, determining the number of training samples of the energy type includes:
[0120] Obtaining the weight of each energy type and determining the number of training samples of the target energy type among the multiple energy types;
[0121] For each remaining energy type among the plurality of energy types, determining a weight ratio between a weight of the remaining energy type and a weight of the target energy type;
[0122] Based on the weight ratio and the number of training samples of the target energy type, the number of training samples of the remaining energy types is determined.
[0123] The target energy type refers to an energy type used as a benchmark among multiple energy types. For example, the target energy type may specifically refer to an energy type with the largest weight or an energy type with the smallest weight.
[0124] Exemplarily, the server obtains the weight of each energy type and determines the number of training samples of the target energy type among the multiple energy types, determines the weight ratio between the weight of the remaining energy type and the weight of the target energy type for each remaining energy type among the multiple energy types, calculates the product of the weight ratio and the number of training samples of the target energy type, and determines the product as the number of training samples of the remaining energy type.
[0125] In a specific application, the number of training samples of the target energy type may be preset or randomly generated within a given number range, which is not specifically limited in this embodiment. The given number range may be configured according to the actual application scenario.
[0126] In this embodiment, in this way, when the number of training samples of the target energy type is determined, the weight of each energy type can be used to determine the number of training samples for the remaining energy types. The number of training samples is selected by comprehensively considering the influence of the weights of the energy types. This can make the selected number of training samples more in line with the actual needs of the energy system, which is conducive to obtaining a target multivariate load forecasting model that can achieve accurate prediction.
[0127] In an exemplary embodiment, as shown in FIG3 , a flowchart is used to illustrate the energy system multi-element load forecasting method of the present application. The energy system multi-element load forecasting method specifically includes the following steps:
[0128] Step 302, obtaining a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0129] Step 304, determining multiple energy types indicated by the multi-element load historical data;
[0130] Step 306, obtaining the weight of each energy type, and determining the number of training samples of the target energy type among the multiple energy types;
[0131] Step 308, for each remaining energy type among the multiple energy types, determining a weight ratio between the weight of the remaining energy type and the weight of the target energy type;
[0132] Step 310, determining the number of training samples of the remaining energy types based on the weight ratio and the number of training samples of the target energy type;
[0133] Step 312, for each energy type, based on the number of training samples and the load forecasting time scale of the initial multivariate load forecasting model, determine a plurality of load forecasting moments corresponding to the number of training samples;
[0134] Step 314, for each load forecast moment, obtaining the input features and load forecast labels corresponding to the load forecast moment from the data set, and obtaining the training samples corresponding to the load forecast moment;
[0135] Step 316, using the training samples corresponding to the multiple load forecasting moments as multiple training samples of energy type;
[0136] Step 318, for each energy type, multiple training samples of the energy type are input into the initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0137] Step 320, for each energy type, based on the load forecasting results corresponding to each of the multiple training samples of the energy type and the number of training samples, determine the average absolute relative error loss value of the energy type;
[0138] Step 322, determining the difference between the preset prediction accuracy evaluation value and the average absolute relative error loss value of the energy type, determining the product of the difference and the weight of the energy type, and using the product as the prediction accuracy error loss value of the energy type;
[0139] Step 324, superimposing the prediction accuracy error loss values of the various energy types to obtain a weighted average accuracy error loss value;
[0140] Step 326, for each energy type, based on the load forecasting results corresponding to the multiple training samples of the energy type and the number of training samples, determine the root mean square error loss value and the mean absolute error loss value of the energy type;
[0141] Step 328, based on the weighted average precision error loss value, and the average absolute relative error loss value, the root mean square error loss value, and the average absolute error loss value of each of the multiple energy types, a model prediction loss value is obtained;
[0142] Step 330, adjusting the parameters of the initial multivariate load forecasting model according to the model prediction loss value to obtain a target multivariate load forecasting model, which is used to output a load forecasting result according to the input data.
[0143] The inventor believes that the current separate operation mode of each energy subsystem has severed the coupling relationship between them, directly causing a series of problems such as low energy utilization and weak self-healing ability. At the same time, although various types of energy use modes have developed in an orderly manner in a diversified direction at this stage, only 1 / 3 of the fossil energy in the electronic system is converted into electricity, and most of the heat is discharged into the atmosphere without being used. Although 80% of the fossil energy heat in the heating subsystem can be converted into thermal energy, the high-temperature steam generated by the fuel does not generate electricity and is wasted. Due to the large cooling load of air conditioning in summer, the cooling subsystem increases electricity production to meet the load demand, which brings about a peak in electricity, and the waste heat from power generation cannot be effectively utilized. Therefore, it is urgent to break the existing development model between the original energy subsystems, analyze the coupling relationship between the energy subsystems, and conduct accurate prediction research on the multiple loads of electricity, gas, heat, and cold in each subsystem of the comprehensive energy.
[0144] Single-task load forecasting in traditional methods only focuses on a specific forecasting target and ignores the common information that may exist between different tasks, resulting in the load forecasting model being unable to fully utilize the potential correlations in all available data, thus affecting the forecasting performance.
[0145] Based on this, this application proposes a multi-task load forecasting method for energy systems. It can be understood that compared with single-task load forecasting, this application adopts a multi-task learning method. There is complementary information between multiple related tasks, or one task can be used as a regularizer for another task. Joint forecasting can improve forecast accuracy. At the same time, due to the layer sharing of the multi-task load forecasting model, multi-task learning can reduce memory usage because there is no need to store parameters separately for each task.
[0146] The following is an introduction to the multi-task learning theory involved in the multi-task learning method in this application.
[0147] Multi-task learning method solves the problem of insufficient multi-dimensional training and is a hot method in machine learning. target tasks, all data in each task comes from a distribution space , . Each task (t) contains data as training samples, that is, , sample a distribution From the distribution space , and each task Different, but related. Therefore, the goal of multi-task learning is to learn indivual Function, that is .
[0148] In the process of one task learning, the information contained in different tasks can be regarded as different tasks in multi-task learning. In order to balance the correlation and constraint relationship between multiple tasks, it is necessary to consider the optimization objectives of different task learning at the same time and obtain better learning results. However, related tasks do not mean that the tasks are similar, but that these tasks have shared expression parts, which make the tasks interrelated. For example, as shown in Figure 4, multiple tasks share weights. Specifically applied to the multi-element load forecasting method of the energy system of this application, a multi-task learning method is adopted, which can achieve strong coupling of different energy subsystems based on the energy flow relationship of the multi-energy system.
[0149] Among them, taking the multi-energy system including electric energy, heat energy, cold energy and gas energy as an example, the energy flow relationship diagram of the multi-energy system can be shown in Figure 5. With the power subsystem as the core, with the help of various information equipment, it realizes the demand for electric load, heat load, cold load, and cold load horizontally, and the "multi-source complementarity" of heat, cold, and gas vertically realizes a high degree of coordination from the power supply end to the user end. As shown in Figure 5, the power supply side considers renewable energy such as wind power and photovoltaics, and the insufficient part is purchased from the large power grid; through internal gas boilers, boilers, and P2G equipment conversion equipment, the cold load, heat load, and gas load of the end user are met, and the gas load is supplied by the external natural gas market.
[0150] In an exemplary embodiment, as shown in FIG6 , the process of the energy system multi-energy load forecasting method in this application is described by taking the multi-energy system shown in FIG5 as an example. It can be understood that based on the strong coupling between the subsystems of the comprehensive energy, the electricity, heat, cold, and gas subsystems are regarded as single-task learning, and the complex shared information and associations between the subsystems are analyzed. With the help of multi-task learning theory, a target multi-energy load forecasting model based on multi-task learning is established, which helps to train better abstract features and further improve the prediction accuracy of each task.
[0151] In specific applications, selecting appropriate input features is an important part of training the target multi-element load forecasting model, which is directly related to the prediction performance of the target multi-element load forecasting model. The multi-energy system shown in Figure 5 includes an electric energy subsystem, a thermal energy subsystem, a cold energy subsystem, and a gas energy subsystem, and the input features should cover enough influencing factors. However, too many input features will also increase the training burden and affect the training efficiency. Therefore, by sorting out the existing research results, the input features in this embodiment mainly consider four influencing factors, namely meteorological factors, time factors, economic factors, and multi-element load historical data.
[0152] In a specific application, meteorological factors take into account the temperature index, humidity index, wind speed and atmospheric pressure in the forecast area. Among the time factors, holidays are mainly statutory holidays and weekends stipulated by the state, and other times are treated as working days, among which weekends are Saturday and Sunday. Economic factors are key indicators for multi-factor load forecasting, mainly considering regional per capita GDP, electricity prices and transaction volume. Multi-factor load historical data include historical data of electric load, heat load, cooling load and gas load. The above data are determined by investigating the actual area, the official website of the Meteorological Bureau, the data yearbook report of the Statistics Bureau, etc. It should be noted that the input features of the above four dimensions are not comparable due to different dimensions. When conducting joint forecasts, data preprocessing (i.e. normalization) is required to obtain comparable influencing factor features. For example, the following formula can be used to normalize the indicators of each influencing factor separately:
[0153] ;
[0154] in, , , , They are the normalized value, initial value, maximum value and minimum value of the indicator respectively.
[0155] In specific applications, for the performance of the multivariate load forecasting model, the mean absolute relative error (MAPE), root mean square error (RMSE), mean absolute error (MAE) and weighted average accuracy (WMA) can be used as statistical evaluation indicators to calculate the model prediction loss value, and based on the calculated model prediction loss value, the parameters of the initial multivariate load forecasting model are adjusted to obtain the target multivariate load forecasting model. It should be noted that in a multi-energy system, the importance of each type of energy is different, so it is necessary to consider the weight of each energy type to construct the target multivariate load forecasting model. As can be seen from Figure 5, electric energy occupies a dominant position compared to other energy types, followed by gas energy, and then thermal energy and cold energy. Based on this, different proportions of weights are assigned to them. Specifically, the weights of electric energy, gas energy, thermal energy, and cold energy are 0.5, 0.2, 0.15, and 0.15, respectively.
[0156] It should be noted that after the target multivariate load forecasting model is obtained through training, as shown in FIG6 , the target multivariate load forecasting model can be further verified and tested. When the target multivariate load forecasting model passes the verification and test, the target multivariate load forecasting model is applied to multivariate load forecasting. The verification and testing method is similar to the training method, and will not be further described in this embodiment.
[0157] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0158] Based on the same inventive concept, the embodiment of the present application also provides an energy system multi-load prediction device for implementing the energy system multi-load prediction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more energy system multi-load prediction device embodiments provided below can refer to the limitations of the energy system multi-load prediction method above, and will not be repeated here.
[0159] In an exemplary embodiment, as shown in FIG7 , a multivariate load forecasting device for an energy system is provided, comprising: an acquisition module 702 , a training sample construction module 704 , a model training module 706 , a loss value determination module 708 and a parameter adjustment module 710 , wherein:
[0160] An acquisition module 702 is used to acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics;
[0161] A training sample construction module 704 is used to determine multiple energy types indicated by the multivariate load historical data, and to construct multiple training samples of each energy type based on the data set;
[0162] The model training module 706 is used to input multiple training samples of each energy type into the initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type;
[0163] The loss value determination module 708 is used to obtain the weight of each energy type, and determine the model prediction loss value based on the weight of each energy type and the load prediction results corresponding to the multiple training samples of each energy type;
[0164] The parameter adjustment module 710 is used to adjust the parameters of the initial multivariate load forecasting model according to the model prediction loss value to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
[0165] The above-mentioned energy system multivariate load prediction device, when obtaining a data set for multivariate load prediction and determining the multiple energy types indicated by the multivariate load historical data, uses the data set to construct multiple training samples for each energy type respectively, and can comprehensively consider the multivariate load historical data and the characteristics of the influencing factors that generate the multivariate load historical data to achieve accurate construction of the training samples. By inputting multiple training samples of each energy type into the initial multivariate load prediction model for each energy type, the load prediction results corresponding to the multiple training samples of the energy type are obtained, and the weight of each energy type is obtained. Based on the weight of each energy type and the load prediction results corresponding to the multiple training samples of each energy type, the model prediction loss value is determined. According to the model prediction loss value, the parameters of the initial multivariate load prediction model are adjusted to obtain the target multivariate load prediction model. The multi-task learning method can be adopted, and the training samples and weights of multiple energy types are used at the same time to achieve accurate construction of the target multivariate load prediction model, and then the target multivariate load prediction model can be used to achieve accurate load prediction, which can improve the accuracy of load prediction.
[0166] In an exemplary embodiment, the loss value determination module is also used to determine, for each energy type, the average absolute relative error loss value of the energy type based on the load prediction results corresponding to multiple training samples of the energy type and the number of training samples, determine the prediction accuracy error loss value of the energy type based on the average absolute relative error loss value and weight of the energy type, superimpose the prediction accuracy error loss values of multiple energy types to obtain a weighted average accuracy error loss value, and determine the model prediction loss value based on the weighted average accuracy error loss value.
[0167] In an exemplary embodiment, the loss value determination module is also used to determine the difference between a preset prediction accuracy evaluation value and the average absolute relative error loss value of the energy type, determine the product of the difference and the weight of the energy type, and use the product as the prediction accuracy error loss value of the energy type.
[0168] In an exemplary embodiment, the loss value determination module is also used to determine the root mean square error loss value and the mean absolute error loss value of the energy type for each energy type based on the load prediction results corresponding to multiple training samples of the energy type and the number of training samples, and to obtain the model prediction loss value based on the weighted average precision error loss value, and the average absolute relative error loss value, root mean square error loss value and mean absolute error loss value of each of the multiple energy types.
[0169] In an exemplary embodiment, the training sample construction module is also used to determine the number of training samples of each energy type, and based on the number of training samples and the load forecasting time scale of the initial multivariate load forecasting model, determine multiple load forecasting moments corresponding to the number of training samples. For each load forecasting moment, the input features and load forecasting labels corresponding to the load forecasting moment are obtained from the data set to obtain the training samples corresponding to the load forecasting moment, and the training samples corresponding to the multiple load forecasting moments are used as multiple training samples of the energy type.
[0170] In an exemplary embodiment, the training sample construction module is also used to obtain the weight of each energy type and determine the number of training samples of the target energy type among multiple energy types, and for each remaining energy type among the multiple energy types, determine the weight ratio between the weight of the remaining energy type and the weight of the target energy type, and determine the number of training samples of the remaining energy types based on the weight ratio and the number of training samples of the target energy type.
[0171] Each module in the above-mentioned energy system multi-element load forecasting device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0172] In an exemplary embodiment, a computer device is provided, which can be a server or a terminal. Taking the computer device as a server as an example, its internal structure diagram can be shown in Figure 8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data sets for multivariate load forecasting. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multivariate load forecasting method for an energy system is implemented.
[0173] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0174] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0175] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0176] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0177] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0178] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0179] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0180] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A multi-element load forecasting method for an energy system, characterized in that: The method comprises: Acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics; Determining multiple energy types indicated by the multivariate load historical data, and constructing multiple training samples of each energy type based on the data set; For each of the energy types, multiple training samples of the energy type are input into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type; Obtaining a weight for each of the energy types, and determining a model prediction loss value based on the weight for each of the energy types and load prediction results corresponding to a plurality of training samples for each of the energy types; According to the model prediction loss value, the parameters of the initial multivariate load prediction model are adjusted to obtain a target multivariate load prediction model, and the target multivariate load prediction model is used to output a load prediction result according to input data.
2. The method according to claim 1, characterized in that The determining of the model prediction loss value based on the weight of each energy type and the load prediction results corresponding to the plurality of training samples of each energy type comprises: For each energy type, based on the load forecast results corresponding to each of the multiple training samples of the energy type and the number of training samples, determine the average absolute relative error loss value of the energy type; Determining a prediction accuracy error loss value of the energy type based on the average absolute relative error loss value and the weight of the energy type; Superimposing the prediction accuracy error loss values of the multiple energy types to obtain a weighted average accuracy error loss value; A model prediction loss value is determined according to the weighted average precision error loss value.
3. The method according to claim 2, characterized in that Determining the prediction accuracy error loss value of the energy type based on the average absolute relative error loss value and the weight of the energy type includes: Determine the difference between a preset prediction accuracy evaluation value and the average absolute relative error loss value of the energy type, determine the product of the difference and the weight of the energy type, and use the product as the prediction accuracy error loss value of the energy type.
4. The method according to claim 2, characterized in that: Determining the model prediction loss value according to the weighted average precision error loss value includes: For each energy type, based on the load forecasting results corresponding to each of the multiple training samples of the energy type and the number of training samples, determine the root mean square error loss value and the mean absolute error loss value of the energy type; Based on the weighted average precision error loss value, and the average absolute relative error loss value, the root mean square error loss value, and the average absolute error loss value of each of the multiple energy types, a model prediction loss value is obtained.
5. The method according to any one of claims 1 to 4, characterized in that: The step of constructing a plurality of training samples of each energy type based on the data set comprises: For each of the energy types, determining the number of training samples of the energy type, and based on the number of training samples and the load forecasting time scale of the initial multivariate load forecasting model, determining a plurality of load forecasting moments corresponding to the number of training samples; For each of the load forecast moments, obtaining input features and load forecast labels corresponding to the load forecast moments from the data set, and obtaining training samples corresponding to the load forecast moments; The training samples corresponding to the multiple load forecast moments are used as multiple training samples of the energy type.
6. The method according to claim 5, characterized in that For each energy type, determining the number of training samples of the energy type includes: Obtaining a weight for each of the energy types, and determining the number of training samples of a target energy type among the multiple energy types; For each residual energy type among the plurality of energy types, determining a weight ratio between a weight of the residual energy type and a weight of the target energy type; Based on the weight ratio and the number of training samples of the target energy type, the number of training samples of the remaining energy types is determined.
7. A multi-element load forecasting device for an energy system, characterized in that: The device comprises: An acquisition module, used to acquire a data set for multivariate load forecasting; the data set includes multivariate load historical data and influencing factor characteristics; A training sample construction module, used to determine multiple energy types indicated by the multivariate load historical data, and to construct multiple training samples of each energy type based on the data set; A model training module is used to input multiple training samples of each energy type into an initial multivariate load forecasting model to obtain load forecasting results corresponding to each of the multiple training samples of the energy type; A loss value determination module is used to obtain the weight of each energy type, and determine the model prediction loss value based on the weight of each energy type and the load prediction results corresponding to a plurality of training samples of each energy type; The parameter adjustment module is used to adjust the parameters of the initial multivariate load forecasting model according to the model prediction loss value to obtain a target multivariate load forecasting model, and the target multivariate load forecasting model is used to output a load forecasting result according to input data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Diversity load parallel simulation method and simulation device
CN120930876A
