Power load prediction method and system based on multi-dimensional feature extraction

By employing multidimensional feature extraction and weighted fusion loss function methods, and utilizing the AdaBoost model and deep neural network, the noise interference problem in power load forecasting is solved, achieving more accurate long-term power load forecasting.

CN121525949APending Publication Date: 2026-02-13XINYANG POWER SUPPLY OF HENAN ELECTRIC POWER CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511637589.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing power load forecasting methods suffer from strong noise interference in the datasets used to train deep neural networks due to harmonic interference in the power grid, unreasonable use of reactive power equipment, and uncertainty in user electricity consumption behavior, making accurate long-term forecasting impossible.

Method used

A multi-dimensional feature extraction-based approach is adopted, using the AdaBoost model for preliminary feature learning, combined with a deep neural network for power load prediction. By weighted fusion of loss function and feature constraint function, the training results are fed back to correct noise content, enhance ensemble learning ability, and avoid noise interference.

Benefits of technology

This effectively avoids the incorporation of noise characteristics, improves the accuracy of long-term power load forecasting, and ensures the reliability of the forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525949A_ABST
    Figure CN121525949A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent power grids, in particular to a power load prediction method and system based on multi-dimensional feature extraction, and the method comprises the steps: obtaining the prediction feature value and the sample noise content of each sample through an AdaBoost model, training a deep neural network through all samples, and enabling the deep neural network to be used for predicting a power load; a loss function used during deep neural network training is obtained through a prediction characteristic value and the noise content of a sample, in the deep neural network training process, a training result of the deep neural network is fed back to AdaBoost regularly, and the noise content and the prediction characteristic value of the sample are corrected by retraining an AdaBoost model. According to the method, interference of sample noise is avoided, and the model for long-term power load prediction is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid technology, and specifically to a power load forecasting method and system based on multidimensional feature extraction. Background Technology

[0002] In the field of smart grids, it is often necessary to optimize the power grid based on the power load of the low-voltage side of the substation, such as dispatching power in the grid and optimizing the allocation of new energy sources in the grid. Some energy conservation and emission reduction scenarios also require implementation based on power load. One important aspect is the long-term forecasting of power load over a period of time in the future. Only reliable long-term forecast results can provide a reliable data foundation for grid optimization or energy conservation and emission reduction.

[0003] Existing methods for predicting electricity load involve training deep neural networks (such as LSTM models and Transformer models) to make long-term predictions. However, due to problems such as harmonic interference in the power grid, unreasonable use of reactive power equipment, and uncertainty in user electricity consumption behavior, the datasets used to train deep neural networks are subject to strong noise interference, making it impossible to accurately train deep neural networks. Summary of the Invention

[0004] To address the above problems, this invention provides a power load forecasting method and system based on multidimensional feature extraction.

[0005] The power load forecasting method and system based on multidimensional feature extraction of the present invention adopts the following technical solution: One embodiment of the present invention provides a power load forecasting method based on multidimensional feature extraction, the method comprising the following steps: The sample is formed by collecting electricity consumption data from all time periods within a preset number of days. The feature values ​​of all electricity consumption data in each sample under several dimensions constitute the feature sample of each sample. The first model is trained using the feature samples of all samples. The first model is used to obtain the predicted feature value of each sample under each dimension. A second model is trained using all samples. The second model is used to predict the power load of each sample. The loss function used during the training of the second model is a weighted fusion of the mean squared error function obtained based on the power consumption of each sample and the feature constraint function obtained based on the predicted feature value under each dimension feature. The weight in the weighted fusion is the noise content of each sample, and the noise content is evaluated by the first model. During the training of the second model, the training results of the second model are periodically fed back to the first model, and the noise content of each sample and the predicted feature value of each sample under each dimension feature are corrected by retraining the first model. The first model is an AdaBoost model based on ensemble learning, and the second model is a deep neural network; the trained second model is used for power load forecasting.

[0006] Preferably, the specific steps for obtaining the noise content are as follows: When training the AdaBoost model using all feature samples, the AdaBoost model assigns sample weights to each feature sample and updates the sample weights. The initial sample weights assigned to each feature sample are the same before the sample weights are updated. When training the AdaBoost model, the sample weight of each feature sample is recorded after each update. After the AdaBoost model is trained, all the sample weights recorded for each feature sample constitute a weight sequence. Linearly normalize all sample weights in the weight sequence of all feature samples, and perform mean-shift clustering on all linearly normalized sample weights to obtain all categories. The mean of the normalized sample weights within each category is denoted as the average weight of each category. In the weight sequence of each feature sample, the sum of the sample weights outside the baseline category is obtained and denoted as the first feature of each feature sample. The linear normalization result of the first feature of all feature samples is used as the noise content of the sample corresponding to each feature sample.

[0007] Preferably, the specific steps for obtaining the loss function used during the training of the second model are as follows: The actual electricity consumption collected for each sample over all time periods in the next N2 days constitutes the label for each sample, where N2 is a preset value; After each sample is input into the second model, the second model outputs the predicted electricity consumption of each sample for each time period in the next N2 days. The mean square error of the predicted electricity consumption for all time periods in the next N2 days and the electricity consumption for all time periods in the label is denoted as the mean square error function S1. The root mean square error between the feature values ​​of all electricity consumption within the label under all dimensional features and the predicted feature values ​​of each sample under all dimensional features is denoted as the feature constraint function S2; The loss function used in the second model w represents the noise content of each sample.

[0008] Preferably, the specific steps of periodically feeding the training results of the second model back into the first model, and correcting the noise content of each sample and the predicted feature value of each sample under each dimension by retraining the first model are as follows: During the training of the second model, whenever the same sample participates in several training sessions, the mean of the loss function of that sample during those training sessions is obtained and recorded as the training error of that sample. When all samples participate in several training sessions, the training errors obtained by all samples are used as the training result of the second model. All training errors in the training result are normalized to obtain the correction coefficient for each sample. The initial sample weights of the feature samples of each sample are reset using the correction coefficient of each sample; the first model is retrained based on the initial sample weights of all feature samples; during the retraining of the first model, the sample weights of each feature sample are re-recorded after each update; after the retraining is completed, the first feature of each feature sample is re-acquired using the weight sequence formed by all the sample weights recorded for each feature sample; the noise content of each sample is corrected using the re-acquired first feature of each feature sample. The output of the retrained first model serves as the corrected predicted feature value for each sample under each dimension.

[0009] Preferably, the specific steps for resetting the initial sample weights of the feature samples of each sample using the correction coefficient of each sample are as follows: Before the second model is retrained, the updated sample weight of each feature sample is denoted as a0. The initial sample weight after the feature sample is reset is positively correlated with the sample weight a0 and positively correlated with the correction coefficient of the sample corresponding to the feature sample.

[0010] Preferably, the specific steps of correcting the noise content of each sample using the first feature of each reacquired feature sample are as follows: For each reacquired feature sample, the first feature and the initial sample weights after the feature sample are reset are used to define the ratio of the first feature to the initial sample weights as the second feature of each feature sample. The linear normalization result of the second feature of all feature samples is used as the corrected noise content of the sample corresponding to each feature.

[0011] Preferably, the specific steps for obtaining the dimensional features and the feature values ​​are as follows: PCA was performed on the electricity consumption collected for each day to obtain several principal component directions of electricity consumption. Each principal component direction is used as a dimensional feature. The projection of all electricity consumption on any day onto each principal component direction is used as the feature value of all electricity consumption on any day under each dimensional feature. The feature samples refer to the feature values ​​of the electricity consumption collected for all days in the sample under each dimension.

[0012] Preferably, each sample includes not only the electricity consumption collected over all time periods within a preset number of days, but also the average temperature and average humidity collected over all time periods.

[0013] Preferably, the initial sample weight after the feature sample is reset is a = a0 × (1 + w), where w represents the correction coefficient of the sample corresponding to the feature sample.

[0014] Another embodiment of the present invention provides a power load forecasting system based on multidimensional feature extraction. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements all the steps of the power load forecasting method based on multidimensional feature extraction described above.

[0015] The beneficial effects of the technical solution of the present invention are: This invention trains a first model using feature samples from all samples. This first model obtains the predicted feature value for each sample under each feature dimension. A second model is then trained using all samples to predict the electricity load for each sample. The loss function used during training of the second model is a weighted fusion of the mean squared error function obtained based on the electricity consumption of each sample and the feature constraint function obtained based on the predicted feature value under each feature dimension. The weight in this weighted fusion is the noise content of each sample, which is evaluated by the first model. In this process, the predicted feature value under each feature dimension is predicted by the AdaBoost model, which effectively avoids the incorporation of noise features, especially interference from deep-seated sample noise. By combining the feature constraint function obtained from the predicted feature value, the process of the second model relying solely on the long-term electricity consumption time series contained in the samples for learning or training can be intervened, preventing the second model from deeply extracting features of sample noise, which could lead to inaccurate long-term electricity load prediction results.

[0016] Furthermore, during the training process of the second model, this invention periodically feeds the training results of the second model back to the first model, and retrains the first model to correct the noise content of each sample and the predicted feature value of each sample under each dimension. This process takes into account that, to avoid the second model overlearning from sample noise during training, this invention pre-utilizes the first model for ensemble learning and feature value prediction from multiple dimensions of the sample. To avoid further interference from noisy samples, the number of weak learners used for ensemble learning in the first model is limited. However, when the number of weak learners in the first model is insufficient, the obtained noise content of the samples will be inaccurate, affecting the training process of the second model. Based on this, the training process of the second model in this invention uses feedback to intervene in the first model, enabling the first model to enhance its ensemble learning ability with a limited number of weak learners. This avoids interference from noisy samples on the first model, thereby ensuring the accuracy of the noise content of the samples, and further making the training results of the second model more accurate. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the steps of a power load forecasting method based on multidimensional feature extraction, as provided in an embodiment of the present invention. Detailed Implementation

[0019] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the power load forecasting method and system based on multidimensional feature extraction proposed by the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0021] The following description, in conjunction with the accompanying drawings, details the specific scheme of the power load prediction method and system based on multidimensional feature extraction provided by this invention.

[0022] Please see Figure 1 The diagram illustrates a flowchart of a power load forecasting method based on multidimensional feature extraction provided by an embodiment of the present invention. The method includes the following steps: Step S101: Collect electricity consumption within a preset time period, and the total electricity consumption within a preset number of days constitutes a sample.

[0023] For any substation, an energy meter is installed on its low-voltage output bus to collect the electrical energy output by the substation. In this embodiment, each hour is a time period, and there are 24 time periods in a day. The electrical energy output by the substation in each time period is recorded (that is, the reading of the energy meter at the end of each time period minus the reading of the energy meter at the beginning of each time period), and this is recorded as the electricity consumption for each time period.

[0024] In addition, temperature and humidity sensors are installed in the substation to detect the ambient temperature and humidity. The average temperature and average humidity collected within each time period are recorded as the average temperature and average humidity for each time period. Furthermore, if a day is a public holiday, all time periods on that day are assigned a holiday label with a value of 1; otherwise, all time periods on that day are assigned a holiday label with a value of 0.

[0025] The electricity consumption and other data from the substation's historical operation are divided into multiple samples and labels, specifically: During the historical operation of the substation, for each day that has elapsed, a sample is formed by the electricity consumption sequence consisting of all electricity consumption data collected in the N1 days prior to that day (including that day), the temperature sequence consisting of all average temperatures, the humidity sequence consisting of all average humidity, and the holiday sequence consisting of all holiday tags. The sample is then labeled with the electricity consumption sequence consisting of all electricity consumption data collected in the N2 days after that day (excluding that day), the temperature sequence consisting of all average temperatures, the humidity sequence consisting of all average humidity, and the holiday sequence consisting of all holiday tags.

[0026] Thus, during the historical operation of the substation, one sample and its label were obtained every other day. All samples and their labels obtained during the substation's historical operation constitute a dataset. Specifically, samples or labels less than N1 or N2 days in length are deleted.

[0027] In this embodiment, N2 is less than N1; this embodiment is described using N2=1 and N1=14 as an example.

[0028] In this embodiment, the dataset will be used to train a model for predicting long-term power load (e.g., a model for predicting power consumption for all time periods in the next day).

[0029] Step S102: The feature values ​​of all electricity consumption in each sample under several dimensional features constitute the feature sample of each sample.

[0030] First, it should be noted that, in the long run, the electricity consumption of the low-voltage side of the substation grid is not only related to the weather or holidays, but also affected by harmonics and reactive power equipment in the grid, as well as users' electricity consumption behavior. This results in the dataset containing a large amount of sample noise. This noise makes it difficult to predict the long-term power load directly. For example, when using this dataset to train deep neural networks (LSTM models, Transformer models based on self-attention, etc.) and make predictions, there is a problem of low accuracy due to overfitting to the sample noise.

[0031] In this embodiment, before performing power load prediction, the feature values ​​of all electricity consumption in each sample under several dimensional features are first obtained. The purpose is to extract the main features of electricity consumption in the power grid in advance, realize the dimensional compression of long-term electricity consumption in each sample, and initially avoid noise interference contained in the long-term electricity consumption of each sample.

[0032] In one embodiment, the plurality of dimensional features include: power consumption fluctuation features and the correlation between power consumption and weather.

[0033] As an example, methods for obtaining the feature values ​​of power fluctuation characteristics include: For any day in each sample (or label), the electricity consumption for all time periods within that day is linearly normalized (also called maximum-minimum normalization). The variance of all normalized electricity consumption is recorded as the characteristic value of all electricity consumption on any day in each sample (or label) under the electricity fluctuation characteristics.

[0034] As an example, methods for obtaining feature values ​​of the correlation between electricity consumption and weather include: Characteristic values ​​of electricity consumption related to weather, including characteristic values ​​of electricity consumption related to temperature and characteristic values ​​of electricity consumption related to humidity.

[0035] For any day in each sample (or label), the electricity consumption for all time periods within that day is linearly normalized, and the average temperature for all time periods within that day is linearly normalized. The Pearson correlation coefficient between the normalized electricity consumption and the normalized average temperature is used as the characteristic value of all electricity consumption on any day in each sample (or label) under the correlation characteristics of electricity consumption and temperature.

[0036] The average humidity for all time periods within the day is linearly normalized; the Pearson correlation coefficient between the normalized electricity consumption and the normalized average humidity is used as the characteristic value of all electricity consumption on any day in each sample (or label) under the correlation characteristics of electricity consumption and humidity.

[0037] For the two dimensions of electricity fluctuation characteristics and the correlation between electricity consumption and weather, each day in each sample or label obtained a feature value under each dimension.

[0038] In other embodiments, more other dimensional features can be set, specifically: The electricity consumption for all time periods on any day in each sample and label is recorded as an electricity consumption vector. For all electricity consumption vectors for all days in all samples and labels, the PCA algorithm is used to obtain all principal component directions of all electricity consumption vectors. Each principal component direction is essentially a unit vector, representing a distribution feature of the electricity consumption vector, and each principal component direction corresponds to an eigenvalue describing the variance of the unit vector projection (note that this eigenvalue is not the eigenvalue under each dimension feature to be obtained in this embodiment). This embodiment retains the 5 principal component directions with the largest eigenvalues, and each principal component direction is equivalent to a dimension feature described in this embodiment. The eigenvalue of all electricity consumption on any day in each sample (or label) for each dimension feature is: the projection of the electricity consumption vector for any day in each sample or label onto the principal component direction.

[0039] In other embodiments, five more dimensional features have been added, and each day in each sample or label receives a feature value for each dimensional feature.

[0040] For each sample or label, all days, the feature values ​​obtained for all days constitute the feature sample or feature label.

[0041] Step S103: Train the first model using the feature samples of all samples. The first model is used to obtain the predicted feature value of each sample under each dimension feature. The first model also outputs the noise content of each sample.

[0042] The above-mentioned acquisition of feature samples and feature labels for all samples is a pre-extraction of the main features of the samples and labels, which realizes the dimensionality compression of long-term electricity consumption in each sample and initially avoids the noise interference contained in the long-term electricity consumption in each sample.

[0043] This embodiment uses the feature samples and feature labels corresponding to all samples to train an AdaBoost model. The AdaBoost model is a prediction model based on ensemble learning. Its input is each feature sample (that is, the feature value of all electricity consumption in N1 days in each sample under all dimensional features), and its output is the feature value of all electricity consumption in the next N2 days under all dimensional features, which can be simply referred to as the predicted feature value of all electricity consumption in each dimensional feature in the next day.

[0044] The AdaBoost model works by assigning a weight to each feature sample, training all feature samples using several weak learners, updating the weight of each feature sample based on the error of the weak learners, thus assigning greater weights to features that are difficult to learn and decreasing the weights of features that are easy to learn, and finally combining the outputs of multiple weak learners for prediction. The initial weight of each feature sample is the same before the update (referred to as the initial weight), equal to 1 / n0, where n0 represents the number of feature samples.

[0045] Since the AdaBoost model is a well-known technology, its further specific principles will not be elaborated in this embodiment.

[0046] Compared to deep neural network models, AdaBoost models do not excessively learn deep-level noise in the samples (such as noise caused by harmonics in the power grid, the use of reactive power equipment, and uncertainties in user electricity consumption). Therefore, this embodiment uses the trained AdaBoost model to initially learn from the aforementioned features across several dimensions, filtering out sample noise and redundant information. It should be noted that, to further avoid the AdaBoost model overlearning sample noise, this embodiment does not require setting an excessive number of weak learners. In this embodiment, the number of weak learners is set to 30, preferably within the range of 20 to 50.

[0047] It should be further explained that, during the AdaBoost model training process, sample weights are assigned to each feature sample and updated accordingly. This increases the sample weights of features that are difficult to learn and decreases the sample weights of features that are easy to learn. In this embodiment, during AdaBoost model training, the sample weight value of each feature sample is recorded after each update. When the AdaBoost model training is complete, all the recorded sample weight values ​​for each feature sample constitute a weight sequence.

[0048] In this embodiment, the noise content of each feature sample is evaluated based on the weight sequence of all feature samples.

[0049] It should be noted that since sample noise is a major reason why feature samples are difficult to learn, the fact that the sample weights in the weight sequence are consistently large indicates that the presence of noise makes it difficult for the AdaBoost model to learn or train the feature samples.

[0050] As an example, evaluating the noise content of each feature sample based on the weight sequence of all feature samples includes the following steps: All sample weights in the weight sequence of all feature samples are linearly normalized together. Mean-shift clustering is then performed on all normalized sample weights to obtain all categories. The bandwidth for mean-shift clustering is set to 0.1. The mean of the normalized sample weights within each category is recorded as the average weight of that category. The category with the smallest average weight is designated as the baseline category. Sample weights outside the baseline category are relatively large, indicating relatively high noise levels.

[0051] Furthermore, in the weight sequence of each feature sample, the weights of samples outside the baseline class are obtained, and the sum of these sample weights is calculated (note that this is the sum of the sample weight values ​​before normalization), which is denoted as the first feature of each feature sample.

[0052] The linear normalization result of the first feature of all feature samples is used as the noise content of each feature sample, and also as the noise content of the sample corresponding to each feature sample.

[0053] Specifically, when the noise content is less than 0.1, the noise content is set to 0.1; specifically, when there are no sample weights outside the baseline class, the noise content of the sample is also set to 0.1.

[0054] Step S104: Train the second model using all samples. The second model is used to predict the power load of each sample. The loss function used by the second model is obtained from the noise content of each sample.

[0055] Furthermore, this embodiment trains a second model using all samples. The second model is a deep neural network that can deeply extract the deep features contained in the electricity consumption in the time series of the samples, thereby achieving long-term prediction of electricity load. The second model in this embodiment is an LSTM model based on time series prediction. Other embodiments may also use a Transformer model based on a self-attention mechanism. This embodiment does not make specific limitations.

[0056] The second model takes as input each sample (i.e., electricity consumption, average temperature, average time, and holiday label for all time periods within N1 days) and outputs as electricity consumption for each time period within the next N2 days.

[0057] The second model is trained using all samples. The loss function used in training the second model is a weighted fusion of the mean squared error function obtained based on the electricity consumption of each sample and the feature constraint function obtained based on the predicted feature values ​​under each dimension.

[0058] The mean squared error function for the electricity consumption of each sample specifically refers to the mean squared error between the electricity consumption in each time period of each sample's label and the electricity consumption output by the second model in each time period. The purpose of this mean squared error function is to enable the second model to fit all samples and labels, thereby enabling the second model to learn or extract deep features from the long-term electricity consumption time series contained in the samples and labels, and thus achieve long-term prediction of power load.

[0059] Based on the mean squared error function, this embodiment introduces a feature constraint function based on the predicted feature values ​​for each dimension. The purpose is to address the significant sample noise inherent in the long-term electricity consumption data contained in the samples and labels. When using the second model for deep learning, the noise features are inevitably absorbed, leading to unreliable predictions for long-term electricity load. The predicted feature values ​​for each dimension are obtained by the AdaBoost model (see step S103), effectively avoiding the incorporation of noise features, especially interference from deep-seated sample noise. By combining the feature constraint function with the predicted feature values, the process of the second model relying solely on the long-term electricity consumption time series contained in the samples and labels for learning or training can be intervened, preventing the second model from deeply extracting sample noise features and causing inaccurate long-term electricity load predictions.

[0060] Furthermore, in this embodiment, when combining the mean squared error function and the feature constraint function, a weighted fusion is performed using the noise content of each sample as the weight. This allows the second model to reasonably balance, during training, the features contained in the samples that are helpful for power load prediction and are unaffected by sample noise (including deep features that need to be extracted using the second model and shallow features learned by the first model from multiple dimensions), with the sample noise features contained in the samples that are unfavorable for power load prediction (including deep sample noise features that may be deeply extracted in the second model, and shallow sample noise features from multiple dimensions that still exist during the training of the first model); thereby improving the accuracy of long-term power load prediction by enabling the first and second models to cooperate and assist each other reasonably.

[0061] As an example, the mean squared error function is obtained as follows: The electricity consumption in the i-th time period of each sample's label is denoted as . After each sample is input into the second model, the electricity consumption output by the second model in the i-th time period is denoted as... .

[0062] Mean squared error function ; where M represents the number of time periods in the label.

[0063] As an example, the method for obtaining the feature constraint function is as follows: The electricity consumption for all time periods within N2 days output by the second model is recorded as the predicted electricity consumption; For any day in the predicted electricity consumption, obtain the feature values ​​of all electricity consumption on that day under each dimension (the specific process is the same as step S102).

[0064] Let the eigenvalue of all electricity consumption on day e in the predicted electricity consumption be denoted as the eigenvalue of the j-th dimension feature. The predicted feature value of all electricity consumption on day e under the j-th dimension, output by the first model, is denoted as... .

[0065] Feature constraint function F represents the number of dimensional features.

[0066] As an example, when combining the mean squared error function and the feature constraint function, a weighted fusion is performed using the noise content of each sample as the weight. The formula includes: The loss function used in the second model w represents the noise content of the sample.

[0067] The higher the noise content of the sample, the more attention is paid to it. This indicates that it is necessary to use the predicted feature values ​​of the first model in multiple dimensions to constrain or correct the training process of the second model, so as to avoid the second model from excessively extracting sample noise features.

[0068] Thus, the loss function S used to train the second model has been obtained. In this embodiment, the above dataset (which includes several samples and their labels, and each sample has a corresponding noise content and a predicted feature value for each sample under each dimension feature) is used to train the second model using the loss function S.

[0069] In this embodiment, during training, a sample is input into the second model each time to obtain the value of the loss function S. Then, based on this value, the neuron parameters in the second model are updated using the stochastic gradient descent algorithm, thus completing one training iteration. This process is repeated cyclically, using all samples in turn for multiple training iterations, optimizing the loss function S towards its minimum. This ensures that the second model learns features from the dataset that are helpful for long-term power load forecasting, avoiding interference from sample noise. In this embodiment, training is stopped after N3 iterations, resulting in the trained second model. In this embodiment, N3 is equal to 50 times the total number of samples.

[0070] Since the training process of neural networks is well known, this embodiment will not elaborate on the specific process of training using the loss function S and the dataset.

[0071] Step S105: During the training of the second model, the noise content of each sample is updated periodically using the training results of the second model. The updated noise content is then fed back into the first model, causing the first model to be updated and retrained.

[0072] In the above process, in order to avoid the second model from overlearning the sample noise during training, the first model is used in advance to perform ensemble learning and feature value prediction on multiple dimensions of the sample (see step S103 for details). In order to avoid the first model being further interfered with by the noisy samples, the number of weak learners used for ensemble learning in the first model is not set to be large. However, this will cause the first model to be unable to continuously update the sample weights of the feature samples more times, resulting in large errors or noise in the sample weights of the feature samples. Consequently, the noise content of the samples obtained in step S103 is inaccurate, affecting the training process in step S104.

[0073] In this embodiment, during the training process of the second model, the training results of the second model are periodically fed back to the first model, and the noise content of each sample and the predicted feature value of each sample under each dimension feature are updated by retraining the first model.

[0074] This process uses the training process of the second model to provide feedback to the first model, thereby enhancing the ensemble learning ability of the first model when the number of weak learners is limited. It also reallocates sample weights to each feature sample while avoiding interference from noisy samples, and further ensures the accuracy of the predicted feature values.

[0075] As an example, the training results of the second model are periodically fed back into the first model, and the noise content of each sample and the predicted feature value of each sample under each dimension are updated by retraining the first model. The steps include: In the training process described in step S104, after each sample participates in K training iterations, the mean of the loss function S for that sample during those K training iterations is obtained and recorded as the training error for that sample. After all samples have participated in K training iterations, the training errors obtained by all samples are used as the training result of the second model. All training errors in the training result are normalized using the softmax formula to obtain the correction coefficient for each sample. The larger the correction coefficient, the greater the learning difficulty of the sample, and the more attention needs to be paid to whether the sample has significant noise. Specifically, when the correction coefficient is less than or equal to 0.1, the correction coefficient is set to 0.1.

[0076] As described in step S103, the AdaBoost model can update the sample weights of each feature sample. After the first model is trained, the sample weight of the feature sample corresponding to each sample is denoted as a0. The sample weights are updated again using the correction coefficient of each sample, and the updated sample weights are denoted as a, where a = a0 × (1 + w), and w represents the correction coefficient of each sample. The larger the correction coefficient of each sample, the more its sample weight needs to be increased.

[0077] In a further embodiment, the updated sample weight 'a' is used as the initial sample weight for each feature sample; based on the initial sample weights of all feature samples, the first model is trained again using all feature samples and their feature labels.

[0078] In step S103, when training the first model, all feature samples have the same initial sample weights. During training, the sample weights are updated starting with the same initial weights, increasing the weights of difficult-to-learn feature samples and decreasing the weights of easy-to-learn feature samples. When retraining the first model, all feature samples have different initial sample weights, with the initial sample weights being larger for samples that are more difficult to learn in the second model. In the second model with a limited number of weak learners, if a feature sample with a larger initial sample weight experiences a significant decrease in weight during retraining, it indicates that the noise content of that feature sample is relatively low, and its difficulty in learning in the second model may be due to inaccurate noise content obtained in step S103 (i.e., misjudgment of noise content). If a feature sample with a larger initial sample weight does not experience a significant decrease in weight during retraining, it indicates that the noise content of that feature sample is relatively high.

[0079] Based on this, after the retraining process of the first model is completed, all the updated results of the sample weights of each feature sample during the retraining process are used as the weight sequence (similar to step S103). The first feature of each feature sample is re-obtained based on the weight sequence of all feature samples (as described in step S103).

[0080] The ratio of the first feature of each feature sample to the initial sample weight of each feature sample (the initial sample weight obtained in this step) is denoted as the second feature of each feature sample.

[0081] The linear normalization result of the second feature of all feature samples is used as the corrected noise content for each feature.

[0082] The smaller the second feature, the smaller the first feature of each feature sample and the larger the initial sample weight. This means that when the first model is retrained with a larger initial sample weight for each feature sample, its sample weight becomes significantly smaller after the update (i.e., the smaller the second feature). This indicates that the sample noise content corresponding to this feature sample is relatively small. The reason why it is difficult to learn in the second model may be due to the inaccuracy of the noise content obtained in step S103 (i.e., the noise content is misjudged). At this time, the corrected noise content of the sample corresponding to this feature is relatively small.

[0083] The larger the second feature, the larger the first feature of each feature sample and the smaller the initial sample weight. This means that when the first model is retrained with each feature sample with a smaller initial sample weight, the sample weight becomes significantly larger after the update (i.e., the second feature is larger). This indicates that the noise content of the sample corresponding to this feature sample is underestimated, which affects the learning and training process of the second model. At this time, the noise content of the sample corresponding to this feature is relatively large after correction.

[0084] Thus, by retraining the first model, the noise content of each sample was corrected. Furthermore, the predicted feature values ​​for each sample in each dimension output by the retrained first model are also corrected versions of the predicted feature values ​​obtained before retraining.

[0085] Using the corrected noise content and predicted feature values, the loss function S is constructed according to step S104, and the second model is trained again. The number of training iterations for each sample participating in the second model training is reset. After all samples participate in the second model training K times again, this step is repeated, and so on, until the second model training is completed. In this embodiment, K is equal to 5 as an example, and its preferred value range is [1, 10].

[0086] Step S106: Use the trained second model to predict power load.

[0087] After the second model is trained, the electricity consumption, average temperature, average time, and holiday labels for all time periods within the most recent N2 days are input into the second model. The second model then outputs the electricity consumption for each time period within the next N2 days. The electricity consumption for each time period within N2 days is used as the prediction result for long-term power load.

[0088] This concludes the example.

[0089] Other embodiments provide a power load forecasting system based on multidimensional feature extraction, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor performing all the steps in all the embodiments described above when running the computer program.

[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A power load forecasting method based on multidimensional feature extraction, characterized in that, The method includes the following steps: The sample is formed by collecting electricity consumption data from all time periods within a preset number of days. The feature values ​​of all electricity consumption data in each sample under several dimensions constitute the feature sample of each sample. The first model is trained using the feature samples of all samples. The first model is used to obtain the predicted feature value of each sample under each dimension. A second model is trained using all samples. The second model is used to predict the power load of each sample. The loss function used during the training of the second model is a weighted fusion of the mean squared error function obtained based on the power consumption of each sample and the feature constraint function obtained based on the predicted feature value under each dimension feature. The weight in the weighted fusion is the noise content of each sample, and the noise content is evaluated by the first model. During the training of the second model, the training results of the second model are periodically fed back to the first model, and the noise content of each sample and the predicted feature value of each sample under each dimension feature are corrected by retraining the first model. The first model is an AdaBoost model based on ensemble learning, and the second model is a deep neural network; the trained second model is used for power load forecasting.

2. The power load forecasting method based on multidimensional feature extraction according to claim 1, characterized in that, The specific steps for obtaining the noise content are as follows: When training the AdaBoost model using all feature samples, the AdaBoost model assigns sample weights to each feature sample and updates the sample weights. The initial sample weights assigned to each feature sample are the same before the sample weights are updated. When training the AdaBoost model, the sample weight of each feature sample is recorded after each update. After the AdaBoost model is trained, all the sample weights recorded for each feature sample constitute a weight sequence. Linearly normalize the weights of all samples in the weight sequence of all feature samples, and then perform mean-shift clustering on all the linearly normalized sample weights to obtain all categories. The mean of the normalized sample weights in each category is called the average weight of each category. In the weight sequence of each feature sample, the sum of the weights of the samples outside the baseline class is obtained and denoted as the first feature of each feature sample; The linear normalization result of the first feature of all feature samples is used as the noise content of the sample corresponding to each feature sample.

3. The power load forecasting method based on multidimensional feature extraction according to claim 2, characterized in that, The specific steps for obtaining the loss function used during the training of the second model are as follows: The actual electricity consumption collected for each sample over all time periods in the next N2 days constitutes the label for each sample, where N2 is a preset value; After each sample is input into the second model, the second model outputs the predicted electricity consumption of each sample for each time period in the next N2 days. The mean square error of the predicted electricity consumption for all time periods in the next N2 days and the electricity consumption for all time periods in the label is denoted as the mean square error function S1. The root mean square error between the feature values ​​of all electricity consumption within the label under all dimensional features and the predicted feature values ​​of each sample under all dimensional features is denoted as the feature constraint function S2; The loss function used in the second model w represents the noise content of each sample.

4. The power load forecasting method based on multidimensional feature extraction according to claim 2, characterized in that, The specific steps involved in periodically feeding the training results of the second model back into the first model, and retraining the first model to correct the noise content of each sample and the predicted feature value of each sample under each dimension, are as follows: During the training of the second model, whenever the same sample participates in several training sessions, the mean of the loss function of that sample during those training sessions is obtained and recorded as the training error of that sample. When all samples participate in several training sessions, the training errors obtained by all samples are used as the training result of the second model. All training errors in the training result are normalized to obtain the correction coefficient for each sample. The initial sample weights of the feature samples of each sample are reset using the correction coefficient of each sample; Based on the initial sample weights of all feature samples, the first model is retrained using all feature samples. When retraining the first model, the sample weights of each feature sample are recorded again after each update. After retraining, the first feature of each feature sample is obtained again using the weight sequence formed by all the sample weights recorded for each feature sample. The noise content of each sample is corrected using the first feature of each reacquired feature sample; The output of the retrained first model serves as the corrected predicted feature value for each sample under each dimension.

5. The power load forecasting method based on multidimensional feature extraction according to claim 4, characterized in that, The specific steps involved in resetting the initial sample weights of the feature samples of each sample using the correction coefficient of each sample are as follows: Before the second model is retrained, the updated sample weight of each feature sample is denoted as a0. The initial sample weight after the feature sample is reset is positively correlated with the sample weight a0 and positively correlated with the correction coefficient of the sample corresponding to the feature sample.

6. The power load forecasting method based on multidimensional feature extraction according to claim 4, characterized in that, The specific steps involved in correcting the noise content of each sample using the first feature of each re-acquired feature sample are as follows: For each reacquired feature sample, the first feature and the initial sample weights after the feature sample are reset are used to define the ratio of the first feature to the initial sample weights as the second feature of each feature sample. The linear normalization result of the second feature of all feature samples is used as the corrected noise content of the sample corresponding to each feature.

7. The power load forecasting method based on multidimensional feature extraction according to claim 1, characterized in that, The specific steps for obtaining the dimensional features and the feature values ​​are as follows: PCA was performed on the electricity consumption collected for each day to obtain several principal component directions of electricity consumption. Each principal component direction is used as a dimensional feature. The projection of all electricity consumption on any day onto each principal component direction is used as the feature value of all electricity consumption on any day under each dimensional feature. The feature samples refer to the feature values ​​of the electricity consumption collected for all days in the sample under each dimension.

8. The power load forecasting method based on multidimensional feature extraction according to claim 1, characterized in that, In addition to the electricity consumption collected for all time periods within a preset number of days, each sample also includes the average temperature and average humidity collected for all time periods.

9. The power load forecasting method based on multidimensional feature extraction according to claim 5, characterized in that, The initial sample weight after the feature sample is reset is a = a0 × (1 + w), where w represents the correction coefficient of the sample corresponding to the feature sample.

10. A power load forecasting system based on multidimensional feature extraction, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor runs the computer program, it implements all the steps of the power load forecasting method based on multidimensional feature extraction as described in any one of claims 1 to 9.