A user-side power load prediction method and device
By constructing a user-side power load forecasting model trained with time series data and machine learning, the problem of inaccurate power load forecasting in existing technologies has been solved, thereby improving power resource allocation and system stability.
Patent Information
- Application Number
- CN202510394315.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-03-31
AI Technical Summary
Existing technologies are insufficient for effectively forecasting user-side power load, which affects power resource allocation and system stability.
By constructing time-series data, combining meteorological and power load data, and training the model using a machine learning architecture, a comprehensive user-side power forecasting model is established.
It enables more accurate user-side power load forecasting, optimizes power resource allocation, improves system stability, and reduces operating costs.
Smart Images

Figure CN120387691B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric power, and particularly relates to a user-side electric power load prediction method and device. BACKGROUND
[0002] In the technical field of electric power, user-side electric power load, i.e. power consumption load, refers to the total power consumption of power consumption devices in a certain range at a certain time, which is a constantly changing quantity and varies with time and season.
[0003] At present, with the construction of new power systems and the development of intelligent technology, user-side electric power load management is developing towards more intelligent and refined directions. If effective user-side electric power load prediction can be performed, it will bring great benefits to optimizing power resource allocation, improving power system stability and reducing operating costs, and therefore how to propose an effective user-side electric power load prediction scheme is a technical problem to be solved urgently. SUMMARY
[0004] Therefore, the present application provides a user-side electric power load prediction method and device, and the main purpose is to construct time series data in two dimensions of weather and electric power load, and then train by using machine learning, so as to construct a more comprehensive user-side electric power prediction model by comprehensively considering three factors of time, weather and historical electric power load, thereby providing an effective user-side electric power load prediction scheme.
[0005] In order to achieve the above purpose, the present application mainly provides the following technical scheme:
[0006] The first aspect of the present application provides a user-side electric power load prediction method, which comprises:
[0007] acquiring historical weather record data, the historical weather record data being daily weather record data in a preset time range, the daily weather record data including weather data in each preset unit time, and the weather data including at least temperature, humidity, light radiation and wind speed; wherein the daily weather record data corresponds to a relevant date and season;
[0008] acquiring historical electric power load data, the historical electric power load data being daily electric power load data in the preset time range, the daily electric power load data including electric power load data in each preset unit time;
[0009] correlate the historical meteorological record data and the historical power load data according to the same time characteristics to obtain time series data sorted by date, the time series data including sequence sorting between a plurality of combined data, each of the combined data including data of two dimensions of meteorology and power load;
[0010] train and process the time series data by using a preset machine learning architecture to construct a target prediction model applied to predict user-side power load;
[0011] process the obtained current meteorological record data and current power load data by using the target prediction model, and output prediction results of user-side power load in a future time range.
[0012] The second aspect of the application provides a user-side power load prediction device, which comprises:
[0013] a first obtaining unit configured to obtain historical meteorological record data, the historical meteorological record data being daily meteorological record data in a preset time range, the daily meteorological record data including meteorological data in each preset unit time, the meteorological data at least including temperature, humidity, light radiation, and wind speed; wherein the daily meteorological record data corresponds to a relevant date and a season;
[0014] a second obtaining unit configured to obtain historical power load data, the historical power load data being daily power load data in the preset time range, the daily power load data including power load data in each preset unit time;
[0015] a third obtaining unit configured to correlate the historical meteorological record data and the historical power load data according to the same time characteristics to obtain time series data sorted by date, the time series data including sequence sorting between a plurality of combined data, each of the combined data including data of two dimensions of meteorology and power load;
[0016] a processing unit configured to train and process the time series data by using a preset machine learning architecture to construct a target prediction model applied to predict user-side power load;
[0017] a prediction unit configured to process the obtained current meteorological record data and current power load data by using the target prediction model, and output prediction results of user-side power load in a future time range.
[0018] The third aspect of the application provides a storage medium, which comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the user-side power load prediction method as described above.
[0019] The fourth aspect of the present application provides an electronic device, the device comprising at least one processor, and at least one memory connected with the processor, a bus;
[0020] Wherein, the processor, the memory complete mutual communication through the bus;
[0021] The processor is used to call the program instruction in the memory, to execute the user side power load prediction method as described above.
[0022] By the above technical solution, the technical solution provided by the present application has at least the following advantages:
[0023] The present application provides a user side power load prediction method and device, the present application is to use the correlation existing in the time characteristics of historical meteorological record data and historical power load data to establish the correlation between the two dimensional data, so as to obtain the time series data sorted by date, and the time series data includes the sequence sorting between a plurality of combination data, each combination data includes meteorological and power load data of two dimensions; Then the present application adopts the preset machine learning architecture to train and process the time series data, so as to perform supervised learning training on the time series to obtain a target prediction model with strong prediction ability, so as to be applied to the application scene of user side power prediction.
[0024] Compared with the existing demand for predicting user side power load, the present application constructs time series data in two dimensions of meteorology and power load, and then adopts machine learning for training, so as to comprehensively consider the three factors of time, meteorology and historical power load to construct a more comprehensive user side power prediction model, thereby providing an effective user side power load prediction scheme.
[0025] The above description is only a summary of the technical solution of the present application, in order to more clearly understand the technical means of the present application, which can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0026] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of illustrating the preferred embodiments and are not considered to be limiting on the present application. Moreover, the same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0027] Figure 1 A user side power load prediction method flowchart provided by the embodiment of the present application;
[0028] Figure 2 Another user-side power load prediction method flow chart provided by the embodiment of the application;
[0029] Figure 3 The ROC curve obtained by the embodiment of the application taking whether it is a rainy day as an example;
[0030] Figure 4 The cluster number determined by the embodiment of the application for all data;
[0031] Figure 5a The cluster number determined by the embodiment of the application for light data;
[0032] Figure 5b The cluster number determined by the embodiment of the application for no-light data;
[0033] Figure 6 The photovoltaic output result predicted by the embodiment of the application for a sub-modal prediction model;
[0034] Figure 7 The composition block diagram of a user-side power load prediction device provided by the embodiment of the application;
[0035] Figure 8 The composition block diagram of another user-side power load prediction device provided by the embodiment of the application. DETAILED DESCRIPTION
[0036] Exemplary embodiments of the present application will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be accurately conveyed to those skilled in the art.
[0037] The embodiment of the present application provides a user-side power load prediction method, as shown in Figure 1 The embodiment of the present application provides the following specific steps for this purpose:
[0038] 101, obtain historical meteorological record data, the historical meteorological record data is daily meteorological record data within a preset time range, the daily meteorological record data includes meteorological data in each interval of a preset unit time, and the meteorological data at least includes temperature, humidity, light radiation, and wind speed; wherein the daily meteorological record data corresponds to an associated date and a season.
[0039] Meteorological changes will have a certain impact on user-side power load, and exemplary examples include:
[0040] (1) Temperature influence. Summer cooling load: High temperature weather can cause the electricity consumption of cooling devices such as air conditioners and fans to increase sharply, thereby increasing the user-side power load; with the improvement of living standards, the popularity rate of cooling devices such as air conditioners in families is increasing, which further aggravates the growth of summer cooling load.
[0041] Winter heating load: Low temperature weather can cause the electricity consumption of heating devices such as electric heaters and floor heating to increase, which can also increase the user-side power load; in some areas, the winter heating load can even exceed the summer cooling load, becoming the main factor affecting the user-side power load.
[0042] (2) Influence of humidity: Especially in high-temperature and high-humidity or low-temperature and high-humidity environments, humidity changes can affect human comfort and equipment efficiency, thereby indirectly affecting power load;
[0043] High-temperature and high-humidity environment: In this environment, people feel more hot and humid, so more cooling devices are needed to maintain comfort, resulting in an increase in power load; Low-temperature and high-humidity environment: Although the direct influence of humidity on power load is small in low-temperature environment, high humidity can cause the insulation performance of equipment to decrease, increasing the equipment failure rate, thereby indirectly affecting the power load.
[0044] (3) Influence of other meteorological factors
[0045] In addition to temperature and humidity, other meteorological factors such as air pressure, wind speed, cloud cover, or solar radiation intensity can also affect the user-side power load. For example:
[0046] Air pressure changes: Changes in air pressure can affect air circulation and human comfort, thereby indirectly affecting power load; Wind speed changes: Changes in wind speed can affect the output of wind power generation equipment, thereby affecting the power supply capacity of the power grid and the user-side power load; Cloud cover or solar radiation intensity: Changes in cloud cover and solar radiation intensity can affect the output of solar power generation equipment, which can also affect the power supply capacity of the power grid and the user-side power load.
[0047] Therefore, considering the influence of different meteorological characteristics, the historical meteorological record data obtained by the embodiments of the present application requires at least to include these meteorological characteristics, and in order to improve the accuracy of the subsequent training of the target prediction model, and also to manage these large and complex and diverse meteorological data, the embodiments of the present application can but not limited to record in units of days, and include meteorological data in each interval preset unit time (such as 1 hour as the time interval) in each day record, and at least require that these meteorological data contain meteorological characteristics such as temperature, humidity, solar radiation, and wind speed.
[0048] 102. Obtain historical power load data. Historical power load data is daily power load data within a preset time range. Daily power load data includes power load data for each preset unit of time interval.
[0049] In order to establish a correlation with the historical meteorological record data obtained in 101, the embodiments of this application may, but are not limited to, obtain daily power load data within the same preset time range and with the same time unit (e.g., 1 day), and further divide the daily data into finer-grained segments at each preset time interval (e.g., 1 hour as the time interval) to obtain the changes in historical power load at each preset time interval.
[0050] 103. Based on the same time characteristics, establish a correlation between historical meteorological records and historical power load data to obtain time series data sorted by date. The time series data includes the sequence sorting between multiple combined data, and each combined data includes data in two dimensions: meteorology and power load.
[0051] As in 101 and 102, the embodiments of this application establish the correlation between historical meteorological records and historical power load data based on the similarities in time characteristics. For example, a combination of historical meteorological records and historical power load data is obtained on a daily basis, and then sorted by date to obtain time series data with 1 day as the unit of time.
[0052] 104. Use a pre-built machine learning architecture to train and process time series data to build a target prediction model for predicting user-side power load.
[0053] 105. Process the acquired current meteorological records and current power load data using the target prediction model, and output the prediction results of the user-side power load over a future time range.
[0054] In this embodiment, the time series data obtained as shown in 103 is used as a sample for model training, and a pre-built machine learning architecture (such as the XGBoost framework) is used to convert the time series training into supervised learning model training, so as to increase the model's ability to predict power load based on comprehensive meteorological factors.
[0055] It should be noted that the time series data obtained by 103 is sorted by date, and the time series data includes the sequence order of multiple combined data. Each combined data includes data in two dimensions: meteorological and power load. However, the two are actually related by time features. Therefore, each combined data actually contains three dimensions (such as meteorological, time, and historical power load).
[0056] Exemplarily, in the model training process, the key steps include extracting useful features from the original data, i.e., the time series data obtained in 103, which includes two dimensions, such as weather and time.
[0057] Firstly, for each combination data, since the data in the weather dimension can include some weather description information, in the feature extraction in the embodiment of the present application, each combination data needs to be converted into numerical data, and then the representation of the weather feature is extracted, for example: the numerical representation of the key indicators such as the highest temperature, the lowest temperature, the average temperature, the light radiation, the wind speed, etc. is extracted from each combination data, which directly reflects the influence of the weather condition on the power load.
[0058] Exemplarily, the following can be included but are not limited to:
[0059] 1. According to the sunset and sunrise time string, the light time feature is obtained by extracting the time difference, which is in minutes (min).
[0060] 2. According to the temperature range string, the daily minimum and maximum temperature features are obtained by text extraction, which are in degrees Celsius (℃).
[0061] 3. According to the wind direction and wind scale string, the wind direction and wind scale features are obtained by text extraction.
[0062] 4. The wind direction description information is extracted to construct a discrete event feature.
[0063] 5. The wind scale description information is extracted to construct the minimum and maximum wind scale features.
[0064] 6. The weather condition description information is extracted to construct a discrete event feature.
[0065] Secondly, for each combination data, in addition to the above-mentioned weather feature extraction, time features are also extracted, such as the time period features including date, day of the week, hour, etc. These features help the model to capture the influence of seasonal changes and time trends on the power load.
[0066] By performing the feature extraction operation on the time series data, the feature data including the two dimensions of weather and time in each combination data is obtained, and the two dimensions (such as weather and time) are associated with the historical power data contained in the combination data.
[0067] After the feature extraction operation, for the processed time series data, the embodiments of the present application convert the time series data into supervised learning, which can utilize the powerful prediction ability of the supervised learning algorithm to analyze and predict the trend and pattern in the time series, so as to comprehensively consider the three factors of time, weather and historical power load to build a more comprehensive user-side power prediction model, thereby providing an effective user-side power load prediction scheme.
[0068] In order to make a more detailed description of the above embodiments, the embodiments of the present application also provide another user-side power load prediction method, as shown in Figure 2 The embodiments of the present application provide the following specific steps for this purpose:
[0069] 201, obtain historical weather record data, the historical weather record data being daily weather record data in a preset time range, the daily weather record data including weather data at each preset unit time interval, the weather data at least including temperature, light radiation, and wind speed; wherein the daily weather record data corresponds to an associated date and season.
[0070] 202, obtain historical power load data, the historical power load data being daily power load data in a preset time range, the daily power load data including power load data at each preset unit time interval.
[0071] 203, according to the same time feature, associate the historical weather record data and the historical power load data to obtain time series data sorted by date, the time series data including sequence sorting between a plurality of combination data, each combination data including data of two dimensions of weather and power load.
[0072] In the embodiments of the present application, the above 201-203 are explained and described, please refer to 101-103, which will not be repeated here. The following 204-208 are used to train a target prediction model for predicting user-side power load.
[0073] 204, perform feature processing on the time series data to obtain feature data corresponding to each combination data in the time series data, the feature data at least including: converting the description information in the weather data into numerical representation.
[0074] It should be noted that the time series data obtained by 203 is sorted by date, and the time series data includes sequence sorting between a plurality of combination data, and each combination data includes data of two dimensions of weather and power load, but the two are actually associated with time features, so each combination data actually contains three dimensions (such as weather, time, and historical power load).
[0075] For each combined data, since the data in the meteorological dimension can include some meteorological description information, in the feature extraction in the embodiments of the present application, each combined data needs to be converted into numerical data, and then the representation of the meteorological features is extracted, for example, the numerical representation of the key indicators such as the highest temperature, the lowest temperature, the average temperature, the light radiation, the wind speed, etc. is extracted from each combined data. These numerical representations (corresponding to meteorological features) directly reflect the influence of meteorological conditions on the power load.
[0076] Secondly, for each combined data, in addition to the extraction of meteorological features as above, time features are also extracted, such as the extraction of time period features including date, day of the week, hour, etc. These features help the model to capture the influence of seasonal changes and time trends on the power load.
[0077] Through the feature extraction operation on the time series data, the feature data in the two dimensions of meteorology and time included in each combined data is obtained, and the two dimensions (such as meteorology and time) are associated with the historical power data contained in the combined data.
[0078] In some modified embodiments, in the last stage of feature extraction, feature selection and dimension reduction operations can also be performed to remove redundant features and reduce computational complexity, and the features that most contribute to the prediction of the power load are retained, thereby improving the generalization ability and prediction accuracy of the model obtained by subsequent training.
[0079] 205、According to the order corresponding to different combined data in the time series data, an order number is added to the feature data corresponding to different combined data respectively, to obtain a unique order number corresponding to each feature data.
[0080] After the feature extraction operation, for the processed time series data, the embodiments of the present application convert the time series data into a form that can be used by a supervised learning algorithm to analyze and predict the trends and patterns in the time series by using the powerful prediction ability of the supervised learning algorithm.
[0081] 206、According to the order of the order numbers, a data sequence composed of the feature data is determined.
[0082] 207、By using a preset sliding window to continuously slide according to a preset interval on the data sequence, a plurality of groups of input features and output labels are determined, the input features being the feature data currently framed by the preset sliding window, and the output labels being the next adjacent feature data of the feature data currently framed by the preset sliding window.
[0083] 208、The plurality of groups of input features and output labels are trained and processed by using a preset XGBoost framework, to construct a prediction model applied to predict the user-side power load.
[0084] 209. Processing the obtained current meteorological record data and current power load data by using the target prediction model, and outputting a prediction result of the user-side power load in a future time range.
[0085] As explained in 205-209. In the embodiments of the present application, time series are converted into supervised learning participation, such as using sliding window technology.
[0086] For example, by setting a fixed size window, sliding on the time series data, thereby generating a plurality of time window samples. Each window sample contains a series of continuous time step data (i.e. input features), and the data point after the window as the target value (i.e. input label), so as to obtain a plurality of groups of data (including input features and output labels) based on the movement of the sliding window, so as to adapt to the training of the supervised learning model.
[0087] For example, on a time series containing daily meteorological data, the time window sample uses the data of the past 7 days as the input feature, and the target value of the 8th day after the window as the prediction result, i.e. the output label. By adjusting the window size and sliding window, patterns and trends on different time scales can be flexibly captured, i.e. a plurality of groups of data (including input features and output labels). Apply these groups of data to the supervised learning model for training. Thus, by comprehensively considering time, meteorology and historical power load, a more comprehensive user-side power prediction model is constructed, thereby providing an effective user-side power load prediction scheme.
[0088] As a supplementary optimization of the embodiments 201-208 of the present application, after obtaining the historical meteorological record data, the embodiments of the present application can also train a meteorological prediction model, so as to predict future meteorological data based on the historical meteorological record data, and apply it to the target prediction model for predicting power load as described above, so as to improve the accuracy of the target prediction model. Next, for training a meteorological prediction model, the following steps can be included but are not limited to:
[0089] A1 extracts first meteorological record data corresponding to meteorological adverse features by performing feature analysis and processing on historical meteorological record data.
[0090] A2 determines other data except the first meteorological record data in the historical meteorological record data as second meteorological record data.
[0091] A3 trains a meteorological prediction model using a vector autoregression framework, with the first meteorological record data as positive samples and the second meteorological record data as negative samples.
[0092] If the difference in data volume between the first meteorological record data and the second meteorological record data is greater than a preset threshold value; in the process of training the meteorological prediction model, the recognition threshold of the classifier for the smaller number of samples in the first meteorological record data and the second meteorological record data is adjusted
[0093] A4 will apply the meteorological prediction data output by the meteorological prediction model to the target prediction model to predict future user-side power load.
[0094] As A1-A4, the embodiments of the present application can but not limited to adopt the vector autoregressive (VAR) model, which is an advanced multivariate time series analysis method to predict the short-term trends of a series of key meteorological variables. The core advantage of the VAR model lies in its ability to handle multiple interrelated meteorological indicators simultaneously, including temperature, dew point, relative humidity, atmospheric pressure, visibility, and wind speed. By constructing a comprehensive prediction framework, the model created by the embodiments of the present application can capture the complex dynamics and interactions between these variables, thus providing more accurate and comprehensive meteorological predictions.
[0095] The purpose of the embodiments of the present application is to use the VAR model to predict meteorological conditions for the next year. The training of the model is based on historical meteorological data, including continuous records of temperature, dew point, humidity, pressure, visibility, and wind speed, and other multi-dimensional time series. Through the VAR model, the joint probability distribution of these meteorological variables can be simulated, and their evolution in the future time period can be predicted.
[0096] During the model building process, the data is first preprocessed to ensure data quality and consistency, such as obtaining the numerical data structure of the meteorological data after data normalization. Then, the optimal lag order of the model is identified and set, which is achieved by analyzing the autocorrelation function and partial autocorrelation function of each variable, and according to the Akaike Information Criterion (AIC criterion) or Bayesian Information Criterion (BIC criterion).
[0097] Further, the embodiments of the present application use the VAR model to estimate the data, thereby obtaining the coefficient matrix of each variable, which captures the immediate and lagged effects between variables, and the predicted future data is compared with the true future data.
[0098] In some modified embodiments, the meteorological prediction model constructed by the embodiments of the present application can be a meteorological multi-modal classification model. Exemplary explanations include the following:
[0099] In the process of handling the classification task of positive and negative sample imbalance, adjusting the classification threshold is one of the key steps. Since severe weather events are usually rare, the model may tend to predict as negative class (i.e. normal weather) during the training process, resulting in the imbalance of prediction performance and the decline of the effect in practical application. Therefore, adjusting the threshold can help balance the classification results of positive and negative class samples and optimize the actual performance of the model.
[0100] Specifically, the purpose of adjusting the threshold is to improve the recognition ability of the classifier for the minority class (i.e. severe weather) by changing the decision boundary. In the standard binary classification model, 0.5 is usually used as the default threshold, which means that the prediction probability greater than 0.5 is classified as positive class and less than 0.5 is classified as negative class. However, in the case of serious imbalance between positive and negative samples, the default threshold may lead to the prediction of severe weather biased to the negative class. By adjusting the threshold, the probability of predicting as positive class can be increased, thereby improving the recognition rate of the model for severe weather.
[0101] The method of adjusting the threshold includes optimization based on performance indicators, such as adjusting the threshold to maximize the F1 score, precision or recall. In addition, the receiver operating characteristic curve (ROC curve) or precision-recall curve (PR curve) can also be used to select the best threshold. These methods can ensure that the model can better capture severe weather events when facing imbalanced data, improving the accuracy and reliability of the prediction.
[0102] In the embodiments of the present application, the ROC-AUC curve is used to find the balance point that maximizes the true positive rate (TPR) and minimizes the false positive rate (FPR), which is usually achieved by evaluating the difference between TPR and FPR. This value is sometimes referred to as "Youden's J statistic", which measures the ability of the classifier to reduce false negatives and false positives. The greater the value of tpr-fpr, the better the classification performance of the model.
[0103] The decision threshold determination formula is as follows:
[0104] optimal_idx=argmax i (TPR i -FPR i ) Formula (1);
[0105] Where TPR i is the true positive rate (recall rate) at the i-th threshold, FPR i is the false positive rate at the i-th threshold, and argmax i represents finding the index i that maximizes the given expression.
[0106] For example, whether it is a rainy day, use the random forest classifier to build the model, and the ROC curve is as follows Figure 3 .
[0107] According to the curve in the above figure, the decision boundary is 0.284, that is:
[0108]
[0109] The classification results of the model on the test set are as follows, and the confusion matrix and recall rate of the model on the test set.
[0110]
[0111] The classification effect of the model on the future numerical weather data predicted by the VAR model is as follows, and the confusion matrix and recall rate of the model on the future prediction set.
[0112]
[0113] Through reasonable adjustment of the threshold, the model can more effectively identify the minority class events when dealing with unbalanced classification tasks, and improve the prediction performance in practical applications.
[0114] As a supplementary optimization of the embodiments 201-208 of the present application, after obtaining the historical power load data, the embodiments of the present application can also train a new energy output prediction model to utilize the future new energy output data obtained by prediction to the target prediction model for predicting power load as above, so as to improve the accuracy of the target prediction model. Next, for training a new energy output prediction model, it can include but is not limited to the following steps:
[0115] B1 extracts the target historical data affected by the new energy output from the historical power load data by analyzing and processing the historical power load data.
[0116] New energy output refers to the power generated by new energy generators in a power system at a certain time or period. These new energy generators usually use renewable energy (such as solar energy, wind energy, etc.) for power generation, and the pollution generated in the power generation process is less, which belongs to clean energy. New energy output at least includes wind power output and photovoltaic output.
[0117] B2 uses the pre-set LightGBM framework to train and process the target historical data to build a new energy output prediction model.
[0118] The LightGBM framework is based on the gradient boosting algorithm, which improves the accuracy of the model by building multiple weak learners (usually decision trees). Each new tree is fitted to the residual (i.e., the difference between the predicted value and the actual value) based on the previous tree. The goal is to iteratively train weak learners and combine them into a strong learner to achieve accurate prediction of the data.
[0119] B3 will apply the output prediction data output by the new energy output prediction model to the target prediction model to predict future user-side power load.
[0120] As B1-B3 above, the embodiments of the present application include the following:
[0121] By analyzing and processing historical power load data, the corresponding target historical data affected by new energy output is extracted, thereby obtaining historical new energy output data. The resulting new energy output prediction model is a new energy output multi-modal classification model, which is explained and described by taking photovoltaic output as an example.
[0122] To further improve the accuracy of the prediction, the embodiments of the present application introduce a sub-modal classification model as a new feature added to the training process of the LightGBM model. Specifically, a sub-modal classification model is first trained to classify meteorological data and photovoltaic output power into several modalities. These modal information reflects the response characteristics of photovoltaic systems under different weather conditions. Then, the classification results are used as new features, combined with the original meteorological data, to train the LightGBM model again. In this way, the modal information extracted by the classification model can enhance the adaptability of the prediction model to photovoltaic output power.
[0123] In the embodiments of the present application, clustering algorithms are mainly used to discover the potential rules of the data and divide them into different modalities. However, the clustering algorithm usually needs to determine the number of clusters in advance. In this study, the elbow rule and silhouette coefficient are used to determine the number of classifiable modalities.
[0124] The elbow rule is a heuristic method used to select the best number of clusters in K-means clustering. It is based on the concept of Within-Cluster Sum of Squares (WCSS). WCSS is the sum of the squared distances of all points in a cluster to the cluster center, and the calculation formula (3) is as follows:
[0125]
[0126] where k is the number of clusters, C i is the set of points in the i-th cluster, x is a point in C i , and μ i is the cluster Ci the center point (centroid) of the cluster, ||x - μ i is the Euclidean distance of point x to centroid μ. i
[0127] The elbow method is realized by plotting WCSS against the number of clusters k. The optimal number of clusters k is the point where the rate of WCSS decrease suddenly slows down, i.e. the "elbow".
[0128] The silhouette coefficient is a value between -1 and 1 that evaluates the reasonableness of clustering for each data point. The silhouette coefficient s i for each point x i is calculated as follows (4):
[0129]
[0130] where a i is the average distance of point x i to the nearest points in the same cluster, and b i is the average distance of point x i to the nearest points in the nearest cluster (not the one it belongs to).
[0131] The average of silhouette coefficients for all points can be used to evaluate the quality of clustering. A silhouette coefficient close to 1 indicates good clustering, close to -1 indicates poor clustering, and close to 0 indicates that the point may be on the boundary between two clusters. In determining the optimal number of clusters, the average of silhouette coefficients for all points is usually calculated for different k values, and the k value that maximizes the average silhouette coefficient is selected.
[0132] Both methods are used to assist in determining the number of clusters in clustering analysis, but they focus on different aspects: the elbow method focuses on the change of intra-cluster cohesion, while the silhouette coefficient considers both intra-cluster cohesion and inter-cluster separation. Therefore, in the embodiments of the present application, the number of clusters is determined by comprehensively considering both methods, as shown in FIG. 1. Figure 4 The number of clustering clusters is determined for all data.
[0133] Considering that photovoltaic output can be divided into two categories with the largest difference according to whether there is sunlight, the data is divided into two parts according to whether the 'total irradiance (W / ㎡)' is equal to 0, and the number of classification clusters is determined for the two parts by the above method, as shown in FIG. 2. Figure 5a The number of clustering clusters is determined for the light data, as shown in FIG. 3. Figure 5b The number of clustering clusters is determined for the light data, as shown in FIG. 3.
[0134] According to the above Figure 4 , Figure 5a , Figure 5b , the number of classification clusters is mainly based on the number of clustering clusters for all data, and the light and dark data are used as evidence. Finally, the number of classification clusters in the present research is determined to be 5.
[0135] The KMeans clustering algorithm is used to cluster the prediction data with the parameter 'n_clusters' set to 5. The clustering results are added as new features to the prediction set. The LightGBM algorithm in the above study is called without adjusting the parameters for prediction. The prediction results are shown in Figure 6 The results of the photovoltaic output prediction model are shown in
[0136] The experimental results show that the prediction accuracy of the LightGBM model is significantly improved after adding the modality classification model as new features. This shows that the additional information provided by the modality classification can effectively supplement the original features and improve the prediction performance of the model for photovoltaic output under complex weather conditions. This improvement strategy demonstrates the potential of combining modality classification with the main prediction model and provides a better solution for photovoltaic output prediction tasks.
[0137] In summary, the weather prediction model and the new energy output prediction model trained by the embodiments of the present application can serve as evidence compared to the target prediction model trained by 201-208 for predicting power load. The two models can provide input and auxiliary information in the later model training. The ultimate goal is to improve the accuracy of the target prediction model for predicting power load.
[0138] Further, as an implementation of the method shown in Figure 1 , Figure 2 The embodiments of the present application provide a user-side power load prediction device. The device embodiments correspond to the aforementioned method embodiments. For ease of reading, the details of the aforementioned method embodiments will not be repeated one by one in the device embodiments. However, it should be clear that the device in the present embodiment can correspondingly implement all the contents in the aforementioned method embodiments. The device applies to the three factors of comprehensive time, weather and historical power load to construct a more comprehensive user-side power prediction model, as shown in Figure 7 The device includes:
[0139] The first acquisition unit 31 is configured to acquire historical weather record data, the historical weather record data being daily weather record data within a preset time range, the daily weather record data including weather data at each interval of a preset unit time, the weather data at least including temperature, solar radiation, and wind speed; wherein the daily weather record data corresponds to an associated date and a season.
[0140] The second acquisition unit 32 is configured to acquire historical power load data, the historical power load data being daily power load data within the preset time range, the daily power load data including power load data at each interval of the preset unit time.
[0141] The third acquisition unit 33 is configured to associate the historical meteorological record data and the historical power load data according to the same time characteristics, to obtain time series data sorted by date, wherein the time series data comprises sequence sorting between a plurality of combined data, and each of the combined data comprises data in two dimensions of meteorology and power load;
[0142] The processing unit 34 is configured to train and process the time series data by using a preset machine learning framework, to construct a target prediction model applied to predict the user-side power load;
[0143] The prediction unit 35 is configured to process the obtained current meteorological record data and current power load data by using the target prediction model, to output a prediction result of the user-side power load in a future time range.
[0144] Further, as shown in Figure 8 The preset machine learning framework is an XGBoost framework, and the processing unit 34 comprises:
[0145] The processing module 341 is configured to perform feature processing on the time series data, to obtain feature data corresponding to each of the combined data in the time series data, wherein the feature data at least comprises: converting description information in the meteorological data into numerical representation;
[0146] The adding module 342 is configured to add a sorting serial number to the feature data corresponding to each of the combined data, according to the sorting corresponding to different combined data in the time series data, to obtain a unique sorting serial number corresponding to each of the feature data;
[0147] The first determining module 343 is configured to determine a data sequence composed of the feature data, according to the sorting of the sorting serial numbers;
[0148] The second determining module 344 is configured to determine a plurality of input features and output labels by constantly sliding a preset sliding window on the data sequence according to a preset interval, wherein the input feature is the feature data currently framed by the preset sliding window, and the output label is the next adjacent feature data of the feature data currently framed by the preset sliding window;
[0149] The constructing module 345 is configured to train and process the plurality of input features and output labels by using a preset XGBoost framework, to construct a prediction model applied to predict the user-side power load.
[0150] Further, as shown in Figure 8 After the historical meteorological record data is acquired, the apparatus further comprises:
[0151] The division unit 36 is configured to extract first meteorological record data corresponding to a meteorological adverse feature by performing feature analysis processing on the historical meteorological record data.
[0152] The division unit 36 is further configured to determine, in the historical meteorological record data, data other than the first meteorological record data as second meteorological record data.
[0153] The first training unit 37 is configured to train a meteorological prediction model by using a vector autoregressive framework, taking the first meteorological record data as positive samples and the second meteorological record data as negative samples.
[0154] The first execution unit 38 is configured to apply meteorological prediction data output by the meteorological prediction model to the target prediction model to predict future user-side power load.
[0155] Further, as shown in Figure 8 The first training unit 37 is further configured to:
[0156] If the data quantity difference between the first meteorological record data and the second meteorological record data is greater than a preset threshold value;
[0157] In the process of training the meteorological prediction model, the recognition threshold of the classifier for the smaller number of samples in the first meteorological record data and the second meteorological record data is adjusted.
[0158] Further, as shown in Figure 8 After obtaining the historical power load data, the device further includes:
[0159] The extraction unit 39 is further configured to extract target historical data corresponding to new energy output, including wind energy output and photovoltaic output, by performing analysis processing on the historical power load data.
[0160] The second training unit 310 is configured to train the target historical data by using a preset LightGBM framework to construct a new energy output prediction model.
[0161] The second execution unit 311 is configured to apply output prediction data output by the new energy output prediction model to the target prediction model to predict future user-side power load.
[0162] The user-side power load prediction device includes a processor and a memory, and the above-mentioned first acquisition unit, second acquisition unit, third acquisition unit, processing unit and prediction unit are stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0163] The processor includes a core, and the core retrieves corresponding program units in the memory. The core can be set to one or more, and by adjusting the core parameters, time series data is constructed in two dimensions of weather and power load, and machine learning is used for training, so as to comprehensively consider three factors of time, weather and historical power load, to construct a more comprehensive user-side power prediction model, thereby providing an effective user-side power load prediction scheme.
[0164] Embodiments of the present application provide a storage medium having a program stored thereon, the program being executed by a processor to implement the user-side power load prediction method.
[0165] Embodiments of the present application provide a processor for running a program, wherein the program is executed to implement the user-side power load prediction method.
[0166] The present application also provides a computer program product adapted to execute a program initialized with the steps of the user-side power load prediction method when executed on a data processing device.
[0167] The present application is described with reference to flowcharts and / or block diagrams according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure One The functions specified in one or more flows and / or blocks Figure One The functions specified in one or more flows and / or blocks
[0168] In a typical configuration, the device includes one or more processors (CPU), memory, and a bus. The device can also include an input / output interface, a network interface, and the like.
[0169] The memory can include non-persistent memory in a computer readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer readable medium.
[0170] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0171] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0172] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.
[0173] The above merely provides embodiments of the present application and is not intended to limit the present application. Various modifications and changes can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of the claims of the present application.
Claims
1. A user-side power load prediction method characterized by, The method comprises: obtaining historical meteorological record data, the historical meteorological record data being daily meteorological record data in a preset time range, the daily meteorological record data comprising meteorological data in each preset unit time, the meteorological data at least comprising temperature, humidity, light radiation, and wind speed; wherein the daily meteorological record data corresponds to a relevant date and season; obtaining historical power load data, the historical power load data being daily power load data in the preset time range, the daily power load data comprising power load data in each preset unit time; according to the same time characteristics, associating the historical meteorological record data and the historical power load data to obtain time series data sorted by date, the time series data comprising sequence sorting between a plurality of combined data, each combined data comprising meteorological and power load data in two dimensions; training and processing the time series data by using a preset machine learning architecture to construct a target prediction model applied to predict user-side power load, the preset machine learning architecture being an XGBoost framework; wherein the training and processing of the time series data by using the preset machine learning architecture to construct the target prediction model applied to predict user-side power load comprises: performing feature processing on the time series data to obtain feature data corresponding to each combined data in the time series data, the feature data at least comprising: converting description information in meteorological data into numerical representation; adding a sequence number to the feature data corresponding to each combined data according to the sequence corresponding to different combined data in the time series data, to obtain a unique sequence number corresponding to each feature data; determining a data sequence composed of the feature data according to the sequence of the sequence numbers; determining a plurality of input features and output labels by continuously sliding a preset sliding window on the data sequence according to a preset interval, the input feature being the feature data currently framed by the preset sliding window, and the output label being the next adjacent feature data of the feature data currently framed by the preset sliding window; training and processing the plurality of input features and output labels by using a preset XGBoost framework to construct a prediction model applied to predict user-side power load; processing current meteorological record data and current power load data obtained by using the target prediction model to output a prediction result of user-side power load in a future time range.
2. The method of claim 1, wherein, After obtaining the historical meteorological record data, the method further comprises: extracting first meteorological record data corresponding to a meteorological adverse feature by performing feature analysis processing on the historical meteorological record data; determining, in the historical meteorological record data, other data except the first meteorological record data as second meteorological record data; training a meteorological prediction model by using a vector autoregression framework, taking the first meteorological record data as positive samples and the second meteorological record data as negative samples. The meteorological prediction data output by the meteorological prediction model is applied to the target prediction model to predict future user-side power load.
3. The method of claim 2, wherein, In the process of training the meteorological prediction model, the method further comprises: If the difference between the data amount of the first meteorological record data and the second meteorological record data is greater than a preset threshold value; In the process of training the meteorological prediction model, the recognition threshold of the classifier for the smaller number of samples in the first meteorological record data and the second meteorological record data is adjusted.
4. The method of claim 1, wherein, After obtaining the historical power load data, the method further comprises: By analyzing and processing the historical power load data, target historical data affected by new energy output, at least including wind power output and photovoltaic power output, are extracted therefrom; The target historical data are trained and processed by using a preset LightGBM framework to construct a new energy output prediction model; The output prediction data output by the new energy output prediction model are applied to the target prediction model to predict future user-side power load.
5. A user-side power load prediction device characterized by comprising: The device comprises: A first obtaining unit is configured to obtain historical meteorological record data, the historical meteorological record data being daily meteorological record data within a preset time range, the daily meteorological record data including meteorological data at each preset unit time, the meteorological data at least including temperature, humidity, light radiation, and wind speed; wherein the daily meteorological record data is associated with a date and a season; A second obtaining unit is configured to obtain historical power load data, the historical power load data being daily power load data within the preset time range, the daily power load data including power load data at each preset unit time; A third obtaining unit is configured to associate the historical meteorological record data and the historical power load data according to the same time characteristics to obtain time series data sorted by date, the time series data including sequence sorting between a plurality of combination data, each combination data including meteorological and power load data in two dimensions; A processing unit is configured to train and process the time series data by using a preset machine learning architecture to construct a target prediction model for predicting user-side power load, the preset machine learning architecture being an XGBoost framework; The processing unit comprises: A processing module is configured to perform feature processing on the time series data to obtain feature data corresponding to each combination data in the time series data, the feature data at least including: converting description information in meteorological data into numerical representation; An adding module is configured to add a sorting serial number to the feature data corresponding to different combination data according to the sorting of the sorting serial numbers corresponding to different combination data in the time series data to obtain a unique sorting serial number corresponding to each feature data; A first determining module is configured to determine a data sequence composed of the feature data according to the sorting order of the sorting serial numbers. The second determination module is configured to determine a plurality of groups of input features and output labels by adopting a preset sliding window to slide on the data sequence at a preset interval, wherein the input feature is feature data currently framed by the preset sliding window, and the output label is next adjacent feature data of the feature data currently framed by the preset sliding window. The construction module is configured to train and process the plurality of groups of input features and output labels by using a preset XGBoost framework, so as to construct a prediction model applied to predict the user-side power load. The prediction unit is configured to process the obtained current meteorological record data and current power load data by using the target prediction model, and output a prediction result of the user-side power load in a future time range.
6. The apparatus of claim 5, wherein, After the historical meteorological record data is obtained, the device further comprises: The division unit is configured to extract first meteorological record data corresponding to a meteorological adverse feature by performing feature analysis and processing on the historical meteorological record data. The division unit is further configured to determine, in the historical meteorological record data, data other than the first meteorological record data as second meteorological record data. The first training unit is configured to train a meteorological prediction model by using a vector autoregression framework, taking the first meteorological record data as positive samples and the second meteorological record data as negative samples. The first execution unit is configured to apply meteorological prediction data output by the meteorological prediction model to the target prediction model, so as to predict the future user-side power load.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the user-side power load prediction method in any one of claims 1-4.
8. An electronic device, comprising: The device comprises at least one processor and at least one memory connected to the processor via a bus; The processor, the memory and the bus complete mutual communication through the bus; The processor is configured to call program instructions in the memory to execute the user-side power load prediction method in any one of claims 1-4.
Citation Information
Patent Citations
Power load prediction method and device, electronic equipment and medium
CN118249348A