Electricity consumption prediction method and device, storage medium and program product
By extracting time series features and analyzing feature importance of the time series data of charging stations, and using the regression tree model to select important features for power consumption prediction, the problem of inaccurate prediction in existing methods is solved, and more accurate power consumption prediction is achieved.
Patent Information
- Application Number
- CN202410381653.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-09-30
AI Technical Summary
Existing electricity consumption forecasting methods fail to effectively consider the temporal randomness, intermittency and volatility of charging station operation data, resulting in insufficient prediction accuracy.
By extracting time series features from the time series data of charging stations and using the regression tree model to perform feature importance analysis, important feature information is selected to predict power consumption.
The accuracy and precision of power consumption forecasts have been improved, and the power demand of charging stations in the future can be more accurately predicted.
Smart Images

Figure CN120728545A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to a method, device, storage medium, and program product for predicting power consumption. Background Art
[0002] With the increasing popularity of electric vehicles, the number of charging stations is increasing. Accurately predicting charging station power demand is crucial for improving the quality of charging station operations and services. Current power demand forecasting methods, such as probabilistic statistical models and neural network models, are based on limited charging station power demand data. However, these methods fail to account for the temporal randomness, intermittency, and volatility of charging station operational data, making effective power demand forecasting ineffective. Summary of the Invention
[0003] The embodiments of the present application provide a method, device, storage medium, and program product for predicting power consumption, which can improve the accuracy of power consumption prediction.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for predicting power consumption, the method comprising:
[0006] Get time series data of charging stations;
[0007] Performing time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data;
[0008] Performing feature importance analysis on the time series feature information to obtain an analysis result;
[0009] Target characteristic information is determined according to the analysis result, and power consumption prediction is performed based on the target characteristic information to obtain a power consumption prediction result of the charging station.
[0010] In this embodiment, when predicting the power consumption of a charging station, by performing time series feature extraction processing on the time series data of the charging station, the temporal characteristics of the charging station-related data can be taken into account, and then the time series feature information is used to perform feature importance analysis, and the importance of each feature information of the time series feature information can be obtained. Based on the analysis results of the feature importance, more important feature information can be selected from the feature information as target feature information, and finally the target feature information is used to predict power consumption, which can improve the accuracy of the power consumption prediction and thus effectively improve the accuracy of the power consumption prediction results.
[0011] In some embodiments of the present application, the performing of time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data includes at least one of the following:
[0012] Performing statistical processing on feature information of the time series data based on a sliding window to obtain statistical features of the time series data;
[0013] Extracting time index features based on timestamp information corresponding to the time series data and trigonometric functions;
[0014] Extracting lag features and / or exponential moving average features of the time series data.
[0015] In this embodiment, when extracting time series features, you can choose to use a sliding window to obtain statistical features, use timestamp information to extract time index features, and extract at least one of lag features and / or exponential moving average features. This can obtain various types of time series features, enrich the types of time series features, and thus improve the accuracy of subsequent power consumption predictions.
[0016] In some embodiments of the present application, performing feature importance analysis on the time series feature information to obtain analysis results includes:
[0017] Building a regression tree model based on the time series feature information, and calculating split gain information of each feature information in the time series feature information during the process of building the regression tree model;
[0018] The feature importance information of each feature information is calculated according to the splitting gain information of each feature information to obtain the analysis result.
[0019] In this embodiment, when performing importance analysis on time series feature information, the time series feature information can be used to construct a regression tree model, that is, to train the regression tree model. In the process of constructing and training the regression tree model, the feature importance of each type of feature information is obtained according to the split gain information of each feature information, thereby realizing effective analysis of feature importance.
[0020] In some embodiments of the present application, determining target feature information according to the analysis result includes:
[0021] Sort the feature importance information corresponding to each feature information in the analysis result in descending order to obtain a sorting result;
[0022] A first proportion of feature importance information is determined in the ranking result, and feature information corresponding to each piece of feature importance information in the first proportion is determined as the target feature information.
[0023] In this embodiment, when determining the target characteristic information, the electronic device can first arrange the characteristic importance information corresponding to each characteristic information in the analysis result in descending order, thereby determining the characteristic information corresponding to the first proportion of characteristic importance information ranked in front in the sorting result as the target characteristic information, and obtain the most important part of the characteristic information, thereby improving the accuracy and effect of subsequent power consumption prediction.
[0024] In some embodiments of the present application, performing power consumption prediction based on the target characteristic information to obtain the power consumption prediction result of the charging station includes:
[0025] The target feature information is input into the regression tree model to perform the power consumption prediction to obtain the power consumption prediction result; wherein the power consumption prediction result represents the predicted power consumption of the charging station over a period of time.
[0026] In this embodiment, after obtaining the target feature information, the target feature information can be input into the regression tree model. At this time, the regression tree model is a trained regression tree model, which can obtain accurate power consumption prediction results based on the target feature information with a higher degree of importance, thereby improving the prediction effect.
[0027] In some embodiments of the present application, performing statistical processing on the feature information of the time series data based on a sliding window to obtain statistical features of the time series data includes:
[0028] Determining first time series data of the time series data under the sliding windows of different scales;
[0029] The mean, variance, and quantile are calculated based on the first time series data to obtain the statistical features.
[0030] In this embodiment, sliding windows of different scales can be used to slide on the time series data, so as to extract the first time series data of the time series data at different sliding window scales, and then calculate the mean, variance and quantile of the first time series data captured each time, thereby obtaining statistical features, which can realize the effective extraction of statistical features.
[0031] In some embodiments of the present application, the method further comprises:
[0032] Based on the observation values at each time node in the time series data and a preset smoothing factor, the exponential moving average characteristics corresponding to the observation values at each time node are obtained;
[0033] The exponential moving average feature of the time series data is obtained according to the exponential moving average features corresponding to the observation values at each time node.
[0034] In this embodiment, the exponential moving average feature can be obtained by using the observation value at each time node in the time series data and the preset smoothing factor, which can effectively obtain the exponential moving average feature of the time series data.
[0035] In some embodiments of the present application, obtaining time series data of the charging station includes:
[0036] Obtaining operation data of the charging station within a first time period; wherein the operation data includes at least one of electricity consumption data, electricity price information, and income data corresponding to time information;
[0037] performing data preprocessing on the operation data to obtain preprocessed data;
[0038] The preprocessed data is normalized to obtain the time series data.
[0039] In this embodiment, after obtaining the operation data of the charging station in the first time period, the electronic device can first preprocess the operation data and then perform normalization on the preprocessed data, thereby effectively acquiring the time series data of the charging station operation.
[0040] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device including an acquisition unit, an extraction unit, an analysis unit, and a prediction unit.
[0041] The acquisition unit is used to acquire time series data of the charging station;
[0042] The extraction unit is configured to perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data;
[0043] The analysis unit is used to perform feature importance analysis on the time series feature information to obtain an analysis result;
[0044] The prediction unit is configured to determine target characteristic information according to the analysis result, perform power consumption prediction based on the target characteristic information, and obtain a power consumption prediction result of the charging station.
[0045] In this embodiment, when predicting the power consumption of a charging station, by performing time series feature extraction processing on the time series data of the charging station, the temporal characteristics of the charging station-related data can be taken into account, and then the time series feature information is used to perform feature importance analysis, and the importance of each feature information of the time series feature information can be obtained. Based on the analysis results of the feature importance, more important feature information can be selected from the feature information as target feature information, and finally the target feature information is used to predict power consumption, which can improve the accuracy of the power consumption prediction and thus effectively improve the accuracy of the power consumption prediction results.
[0046] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory storing instructions executable by the processor; when the executable instructions are executed by the processor, the above-mentioned power consumption prediction method is implemented.
[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned power consumption prediction method when executed by a processor.
[0048] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in the above-mentioned power consumption prediction method. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiment below.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present application.
[0050] Figure 1 Schematic diagram of the implementation process of the power consumption prediction method proposed in this application embodiment Figure 1 ;
[0051] Figure 2 This is a schematic diagram of the implementation of the sliding window proposed in the embodiment of the present application;
[0052] Figure 3 Schematic diagram of the sorting results proposed in the embodiment of this application Figure 1 ;
[0053] Figure 4 Schematic diagram of the sorting results proposed in the embodiment of this application Figure 2 ;
[0054] Figure 5 Schematic diagram of the implementation process of the power consumption prediction method proposed in this application embodiment Figure 2 ;
[0055] Figure 6Schematic diagram of the electronic device structure proposed in this application embodiment Figure 1 ;
[0056] Figure 7 Schematic diagram of the electronic device structure proposed in this application embodiment Figure 2 . DETAILED DESCRIPTION
[0057] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to explain the related applications and are not intended to limit the applications. It should also be noted that for ease of description, only the portions relevant to the related applications are shown in the drawings.
[0058] New energy batteries are increasingly being used in everyday life and industry. For example, battery-powered new energy vehicles are already widely used, and batteries are also increasingly being applied to energy storage. New energy batteries are not only used in energy storage power systems such as hydropower, thermal power, wind power, and solar power stations, but are also widely used in electric vehicles such as electric bicycles, electric motorcycles, and electric vehicles, as well as in aerospace and other fields. As the application areas of power batteries continue to expand, their market demand is also growing.
[0059] With the increasing popularity of electric vehicles, the number of charging stations is increasing to meet the charging needs of vehicle owners, making their operation and management extremely urgent. Accurately predicting the power demand of charging stations is crucial for improving the operational service level of charging stations. Furthermore, accurate power demand prediction is a prerequisite for charging station planning and power dispatch, which will ensure the orderly development of the electric vehicle industry.
[0060] Current electricity consumption forecasting methods rely on limited power station electricity consumption data to build various models, such as probabilistic statistical models, neural network models, and models based on transportation networks. However, with the widespread adoption of electric vehicles in the future, a large number of charging stations will be built, generating a large amount of charging station operation data. The distribution of this data is characterized by temporal and spatial randomness, intermittency, and volatility. Traditional electricity consumption forecasting methods are limited in this regard, as they fail to account for these characteristics and thus fail to achieve effective electricity consumption forecasting. For example, neural network models are unable to capture the temporal order of time series data, and therefore the extracted features are not effective for predicting future electricity consumption. Furthermore, neural networks are black-box models with complex structures and parameters, making the extracted features difficult to interpret and understand. Their automatic feature extraction process is based on probabilistic statistical models, so when data distribution is inconsistent or noisy, neural networks will produce uncertain features. Furthermore, while neural networks can automatically learn features, they cannot guarantee that the learned features are optimal and relevant. Therefore, improving the accuracy and effectiveness of electricity consumption forecasting is a pressing technical issue that needs to be addressed.
[0061] In order to solve the problems existing in the current electricity consumption prediction methods, the embodiments of the present application provide an electricity consumption prediction method, device, storage medium and program product, which can take into account the temporal nature of charging station operation data, extract time series features from a large amount of charging station operation data, and then accurately predict the electricity consumption demand of the charging station in the future.
[0062] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0063] The description of the system in the embodiment of the present application is similar to the description of the method embodiment below, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiment of the system, please refer to the description of the method embodiment of the present application for understanding.
[0064] An embodiment of the present application provides a method for predicting power consumption, such as Figure 1 As shown, the method for predicting the power consumption of an electronic device may include the following steps:
[0065] Step 101: Obtain time series data of charging stations.
[0066] In an embodiment of the present application, the electronic device may obtain time series data of the charging station.
[0067] It should be noted that in the embodiments of the present application, the charging station can be used to charge electric vehicles, that is, to charge the batteries in the electric vehicles; the charging station can generally include multiple charging piles, equipped with charging equipment and a charging management system, and can provide the charging needs of different types of electric vehicles, such as AC charging and DC fast charging; the charging station can be set up in public places such as city streets, parking lots, gas stations, or private buildings.
[0068] It should also be noted that in the embodiments of the present application, the battery can be assembled from one or more battery cells; the battery can be a battery cell. A battery cell refers to a basic unit that can realize the mutual conversion of chemical energy and electrical energy, and can be used to make a battery module or battery pack, thereby being used to supply power to electrical devices. The battery cell can be a secondary battery, which refers to a battery cell that can be activated by charging the active material after the battery cell is discharged and can continue to be used. The battery cell can be a lithium-ion battery, a sodium-ion battery, a sodium-lithium-ion battery, a lithium metal battery, a sodium metal battery, a lithium-sulfur battery, a magnesium-ion battery, a nickel-hydrogen battery, a nickel-cadmium battery, a lead-acid battery, etc., and the embodiments of the present application are not limited to this.
[0069] In an embodiment of the present application, the battery may also be a single physical module including one or more battery cells to provide higher voltage and capacity. When there are multiple battery cells, the multiple battery cells are connected in series, in parallel or in hybrid via a busbar.
[0070] In some embodiments of the present application, when an electronic device obtains time series data of a charging station, it can obtain operating data of the charging station within a first time period; wherein the operating data includes at least one of electricity consumption data, electricity price information, and income data corresponding to time information; the operating data is then preprocessed to obtain preprocessed data; and the preprocessed data is then normalized to obtain time series data.
[0071] It should be noted that in an embodiment of the present application, the operating data may be multidimensional data related to time, and different dimensions correspond to different data categories. For example, the operating data may be the operating data of a charging station in a certain quarter, and presented in a table form. The table may include the number and location information of the charging station. In addition, it may also include various types of data corresponding to time information, such as electricity consumption data, electricity price information, passenger flow, electricity price discount information, and income data and other multi-dimensional data; these data can be displayed according to unit time, for example, presented per hour, so that the table of the operating data may include electricity consumption data, electricity price information, number of users, electricity price discount information, and income data for each hour of each day in this quarter; wherein the electricity consumption data is the electricity consumption corresponding to the current time period, and the electricity consumption data may include information such as the charging amount, charging time, and charging power of each charging pile; the electricity price information is the electricity price of the current time period, the number of users is the number of users in the current time period, the electricity price discount information is the electricity price discount information in the current time period, and the income data is the income of the charging station in the current time period.
[0072] It should be noted that in the embodiments of the present application, since the operational data itself is also data recorded in chronological order, that is, the data at each time point can be regarded as an item in the sequence, the data type of the operational data also belongs to time series data.
[0073] In an embodiment of the present application, data preprocessing may include operations to clean operational data. For example, data cleaning may include specific operations such as deduplication, missing value processing, outlier processing, and erroneous data processing.
[0074] In some embodiments of the present application, when the electronic device performs normal normalization on the preprocessed data to obtain time series data, it can calculate mean information and variance information based on the preprocessed data, and then complete the normal normalization based on the mean information and variance information to obtain time series data.
[0075] For example, the normalization method can be expressed as the following formula:
[0076]
[0077] Among them, x i represents any sequence in the preprocessed data, represents the mean information of this sequence, and σ represents the variance information of this sequence.
[0078] Step 102: Perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data.
[0079] In an embodiment of the present application, after acquiring the time series data of the charging station, the electronic device may perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data.
[0080] It should be noted that in the embodiments of the present application, since the time series data of the charging station has a strong time series nature, these data will show some periodic characteristics as time changes, which is of great help in predicting the power consumption of the charging station. Therefore, the present application can extract multi-dimensional time series features in the time series data through time series feature extraction processing. For example, through experiments, more than 100 dimensions of time series feature information can be extracted, which greatly improves the subsequent power consumption prediction effect.
[0081] In some embodiments of the present application, when an electronic device performs time series feature extraction processing on time series data to obtain time series feature information corresponding to the time series data, it can be achieved through at least one of the following methods: performing statistical processing of feature information on the time series data based on a sliding window to obtain statistical features of the time series data; extracting time index features based on timestamp information and trigonometric functions corresponding to the time series data; and extracting lag features and / or exponential moving average (EMA) features of the time series data.
[0082] That is, in some embodiments of the present application, the time series feature information may include at least one of a statistical feature, a time index feature, a lag feature, and an exponential moving average feature.
[0083] In some embodiments of the present application, when an electronic device performs statistical processing on feature information of time series data based on a sliding window to obtain statistical features of the time series data, it can determine the first time series data of the time series data under sliding windows of different scales; and then calculate the mean, variance and quantile based on the first time series data to obtain statistical features.
[0084] In the embodiments of the present application, the sliding window is based on the idea of two pointers, and a window is formed between the elements pointed to by the two pointers; time series data often contains rich local patterns and changes. The present application uses a sliding window to capture the trend of data changes over time. As the window slides, the local change trends of the entire sequence can be captured.
[0085] For example, Figure 2 As shown in FIG, for time series data on the time axis, the sliding of the sliding window can be used to capture different sequence data on the time series data.
[0086] In an embodiment of the present application, the first time series data refers to the sequence data within a sliding window. The present application calculates statistical quantities such as mean, variance, and quantile for the first time series data within each sliding window to obtain the statistical characteristics corresponding to each first time series, thereby obtaining the statistical characteristics of the entire time series data based on the statistical characteristics of all the first time series.
[0087] For example, the first time series can be expressed as x i Represents the elements or samples in the sequence, parameter x i-H and x i+J Respectively represent x i By adjusting H and J, the scale of the sliding window can be changed to capture the first time series data under sliding windows of different scales. The mean, variance and quantile of each Statistical characteristics of each The statistical characteristics of the entire time series data are obtained.
[0088] In some embodiments of the present application, when an electronic device extracts time index features based on timestamp information and trigonometric functions corresponding to time series data, the timestamp information can be obtained from preprocessed data. That is, the timestamp information can be obtained not based on the time series data after normal normalization, but directly extracted from the preprocessed data before normal normalization processing, thereby being used for the calculation of time index features.
[0089] It should be noted that in the embodiments of the present application, since the electricity consumption data of the charging station presents a repetitive feature within a certain time range, for example, the daily electricity consumption presents a similar trend, and the weekly electricity consumption presents an almost consistent electricity consumption pattern, therefore, for the timestamp containing time information, different time index features such as year, month, quarter and day of the week can be extracted therefrom; in addition, there is also a difference between electricity consumption on holidays and daily electricity consumption, therefore, the time index feature of whether it is a holiday can also be extracted from the timestamp information.
[0090] In the embodiment of the present application, considering that the time index feature has periodicity, the present application uses trigonometric functions to model it to maintain its periodic characteristics, which can avoid the problem of discontinuity caused by some linear encoding methods and better maintain the continuity of the time index feature. The trigonometric function model proposed in the embodiment of the present application can be expressed as the following formula:
[0091]
[0092]
[0093] Among them, f(t) represents the time index feature, T represents the time index, and can also be understood as the length of the period. For example, when the time index is year, T can be 365, when the time index is month, T can be 30, and when the time index is week, T can be 7.
[0094] It should be noted that, in the embodiment of the present application, each periodic time index in the time index feature can be determined by the above two formulas to have two sub-features, namely, the first sub-feature and the second sub-feature. The first sub-feature can be determined by formula (2), and the second sub-feature can be determined by formula (3).
[0095] In some embodiments of the present application, when extracting the lag features of time series data, the electronic device may use the observation value of the second time node located before the first time node in the time series data as the lag feature of each first time node; thereby obtaining the lag features of the time series data based on the lag features of each first time node.
[0096] It should be noted that, in the embodiments of the present application, the features based on historical data can help the electricity consumption prediction model capture the trends and characteristics in the data. By introducing the features of historical data, the electricity consumption prediction model can take into account the dependencies between past observations and the characteristics of the time series itself, while reflecting the changing trends of the data, which helps the model to better predict future trends and behaviors; the features of historical data may include lag features and / or exponential moving average features.
[0097] In the embodiments of the present application, since the data of the charging station exhibits a certain periodicity, for example, the power consumption at the current moment is highly correlated with the power consumption at the same time of the previous day, the same day last week, or the same day last month, the lagged data is very important for power consumption prediction.
[0098] Exemplarily, when determining the lag feature of the t time node (the first time node), the observation value at the t-t0 time node (the second time node) can be used as the lag feature of the t time node.
[0099] In some embodiments of the present application, when extracting exponential moving average features, the electronic device can obtain the exponential moving average features corresponding to the observation values at each time node in the time series data based on the observation values at each time node and a preset smoothing factor; and then obtain the exponential moving average features of the time series data based on the exponential moving average features corresponding to the observation values at each time node.
[0100] It should be noted that, in the embodiment of the present application, the exponential moving average is a method for smoothing time series data, which can filter out high-frequency noise, reflect medium- and long-term low-frequency trends, and better assist in prediction; the exponential moving average pays more attention to the most recent observations and assigns them higher weights; in the exponential moving average feature, no matter how far apart the data are, they will play a certain role in calculating the current exponential moving average feature. The weight of data that is too far away will be very low and can be ignored, while the weight of data that is closer will be large. Therefore, the exponential moving average is more sensitive to the analysis of predictions and change trends, which is beneficial to subsequent power consumption predictions; in this embodiment, the exponential moving average feature can be obtained by the following formula:
[0101]
[0102] Where α is the preset smoothing factor, 0<α<1, which can be used to control the weight of the most recent observation. The larger α is, the higher the weight of the most recent observation and the lower the degree of smoothing. y1 represents the observation at time node t=1, and X(t) represents the observation at time node t.
[0103] Step 103: Perform feature importance analysis on the time series feature information to obtain analysis results.
[0104] In an embodiment of the present application, after the electronic device performs time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data, it can perform feature importance analysis on the time series feature information to obtain an analysis result.
[0105] It should be noted that, in the embodiment of the present application, the analysis result represents the result of the feature importance of each feature information in the time series feature information.
[0106] It should be noted that, in the embodiments of the present application, feature importance analysis can be performed based on the regression tree model. The regression tree model can process various types of features, such as continuous, discrete and categorical features. For continuous features, the regression tree model can divide them into different intervals by selecting appropriate thresholds. For discrete and categorical features, the regression tree model can process each possible value by creating different branches. In addition, a model can be constructed based on the regression tree model in combination with a gradient boosting tree for feature importance (Variable Importance Measures, VIM) analysis. The present application does not limit the type of regression tree model.
[0107] Exemplarily, the present application may adopt the LightGBM model; the LightGBM model is a machine learning algorithm that is improved and optimized based on the regression tree model. It draws on the idea of the regression tree model and combines the technology of the gradient boosting tree to achieve more efficient model training and more accurate prediction results.
[0108] In some embodiments of the present application, when the electronic device performs feature importance analysis on time series feature information and obtains the analysis results, it can construct a regression tree model based on the time series feature information, and in the process of constructing the regression tree model, calculate the splitting gain information of each feature information in the time series feature information; and then calculate the feature importance information of each feature information based on the splitting gain information of each feature information to obtain the analysis results.
[0109] It should be noted that, in the embodiments of the present application, the process of constructing a regression tree model is also the process of training a regression tree model. That is to say, the present application can complete the feature importance analysis of time series feature information in the process of training a regression tree model using time series feature information.
[0110] It should be noted that, in the embodiment of the present application, the regression tree model constructs the branches of the tree according to the splitting gain of the feature. The splitting gain process measures the importance of the feature, thereby completing the feature importance analysis.
[0111] Exemplarily, the method for calculating the splitting gain information can be expressed as the following formula:
[0112] IG m =MSE m -MSE l -MSE r (5)
[0113]
[0114] Among them, IG m represents the information gain (IG) of a single regression tree m, and MSE represents the mean-square error (MSE); the above formula (5) represents the calculation method of the information gain of a single regression tree m split into l and r sub-regression trees, and MSE m That is, the mean square error of a single regression tree m, MSE l That is, the mean square error of the l-child regression tree, MSE r That is, it represents the mean square error of the r sub-regression tree; y i represents the actual power consumption at time node i, Represents the predicted electricity consumption at time node i.
[0115] For example, the method for calculating feature importance information can be expressed as the following formula:
[0116] VIM i =∑ m∈M IG m (7)
[0117] Among them, VIM i Represents feature information i, and the nodes where feature information i appears in the regression tree are recorded as set M.
[0118] Step 104: Determine target characteristic information according to the analysis result, perform power consumption prediction based on the target characteristic information, and obtain a power consumption prediction result of the charging station.
[0119] In an embodiment of the present application, after the electronic device performs feature importance analysis on the time series feature information and obtains the analysis results, it can determine the target feature information according to the analysis results, perform power consumption prediction based on the target feature information, and obtain the power consumption prediction result of the charging station.
[0120] It should be noted that, in the embodiment of the present application, the target feature information represents feature information with higher feature importance in the time series feature information.
[0121] It should also be noted that, in the embodiments of the present application, the electronic device can use the regression tree model and target feature information to complete the power consumption prediction and obtain the power consumption prediction result.
[0122] It should be noted that, in the embodiment of the present application, the regression tree model used in power consumption prediction is a trained regression tree model, that is, a regression tree model trained based on time series feature information.
[0123] It should also be noted that, in the embodiment of the present application, the power consumption prediction result represents the predicted power consumption of the charging station in the future period of time.
[0124] In some embodiments of the present application, when the electronic device determines the target feature information based on the analysis results, it can sort the feature importance information corresponding to each feature information in the analysis results in descending order to obtain a sorting result; then determine the feature importance information of the first proportion in the sorting result, and determine the feature information corresponding to each of the feature importance information of the first proportion as the target feature information.
[0125] It should be noted that, in the embodiments of the present application, the specific value of the first ratio is not limited in the present application. For example, the first ratio may be 30%. Moreover, the feature importance information of the first ratio is the feature importance information of the higher part in the sorting result.
[0126] Exemplarily, the first ratio is 30%; the 100 feature importance information are sorted in descending order, that is, the feature importance information is arranged in order from high to low to obtain a sorting result, and then the top 30% of the feature importance information is taken from the sorting result, that is, starting from the feature importance information that ranks first among the 100 feature importance information, 30 feature importance information are selected backward, and the feature information corresponding to each of the 30 feature importance information is determined as the target feature information, so that the target feature information obtained is some feature information with relatively high importance.
[0127] For example, Figure 3 and Figure 4 As shown in the figure, in the experiment, the feature importance of the time series feature information is analyzed, and the analysis results are arranged in descending order. It can be seen that the feature importance corresponding to different types of feature information is different. The vertical axis represents different feature information, and the horizontal axis represents the feature importance. For example, Figure 3 The highest feature importance information is 31604. Figure 4 Among them, the highest feature importance information is 40041.
[0128] In some embodiments of the present application, when an electronic device performs power consumption prediction based on target feature information and obtains a power consumption prediction result of a charging station, the target feature information can be input into a regression tree model to perform power consumption prediction and obtain a power consumption prediction result; wherein the power consumption prediction result represents the predicted power consumption of the charging station over a period of time.
[0129] For example, after selecting the top 50% of feature importance information from 100 feature importance information, the feature information corresponding to each of these 50 feature importance information can be determined as the target feature information, and the feature information corresponding to the bottom 50% of feature importance information can be deleted; thereby, the feature information corresponding to each of the top 50 feature importance information is input as the target feature information into the regression tree model for electricity consumption prediction, without inputting the feature information corresponding to each of the bottom 50 feature importance information.
[0130] In some embodiments of the present application, the electronic device may further perform time series feature extraction processing on the time series feature information after determining the target feature information to obtain first feature information corresponding to the target feature information, wherein the first feature information is of the same type as the target feature information, so that the target feature information and the first feature information can be input into the regression tree model for power consumption prediction to obtain the power consumption prediction result.
[0131] For example, after selecting the top 40% feature importance information from 100 feature importance information, the feature information corresponding to each of these 40 feature importance information can be determined as the target feature information, and the feature information corresponding to the feature importance information ranking in the bottom 60% can be deleted. At the same time, feature information of the same type as the target feature information is extracted from the time series feature information as the first feature information, and the target feature information and the first feature information are input into the trained regression tree model to perform power consumption prediction to obtain the power consumption prediction result.
[0132] In summary, for example, Figure 5 As shown, when the electronic device makes a power consumption prediction, it can first obtain the operating data of the charging station (step 201), then clean and normalize the operating data (step 202), and then extract the time series feature information (step 203), and then determine whether it has undergone feature importance analysis (step 204). If so, it performs a prediction based on the regression tree model to obtain the power consumption prediction result (step 205). If not, it performs feature importance analysis (step 206), and then uses the regression tree model to make a prediction (step 207).
[0133] In an embodiment of the present application, an electronic device can obtain time series data of a charging station; perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data; perform feature importance analysis on the time series feature information to obtain analysis results; determine target feature information based on the analysis results, perform power consumption prediction based on the target feature information, and obtain power consumption prediction results of the charging station. It can be seen that when the present application predicts power consumption of a charging station, by performing time series feature extraction processing on the time series data of the charging station, it can take into account the temporal characteristics of the data related to the charging station, and then use the time series feature information to perform feature importance analysis, and can obtain the importance of each feature information of the time series feature information, so as to select more important feature information from the feature information as target feature information according to the feature importance analysis results, and finally use the target feature information to perform power consumption prediction, which can improve the accuracy of the power consumption prediction, thereby effectively improving the accuracy of the power consumption prediction results.
[0134] Based on the above embodiment, in another embodiment of the present application, an electronic device is provided, such as Figure 6 As shown, the electronic device 1 may include an acquisition unit 11 , an extraction unit 12 , an analysis unit 13 and a prediction unit 14 .
[0135] An acquisition unit 11 is used to acquire time series data of a charging station;
[0136] The extraction unit 12 is used to perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data;
[0137] An analysis unit 13 is used to perform feature importance analysis on the time series feature information to obtain an analysis result;
[0138] The prediction unit 14 is configured to determine target characteristic information according to the analysis result, perform power consumption prediction based on the target characteristic information, and obtain a power consumption prediction result of the charging station.
[0139] In some embodiments, the extraction unit 12 is further used to perform statistical processing of feature information on the time series data based on a sliding window to obtain statistical features of the time series data; and to extract time index features based on the timestamp information and trigonometric functions corresponding to the time series data; and to extract at least one of the lag features and / or exponential moving average features of the time series data.
[0140] In some embodiments, the analysis unit 13 is also used to construct a regression tree model based on the time series feature information, and in the process of constructing the regression tree model, calculate the splitting gain information of each feature information in the time series feature information; and calculate the feature importance information of each feature information based on the splitting gain information of each feature information to obtain the analysis result.
[0141] In some embodiments, the prediction unit 14 is further used to sort the feature importance information corresponding to each feature information in the analysis result in descending order to obtain a sorting result; and determine a first proportion of feature importance information in the sorting result, and determine the feature information corresponding to each of the feature importance information of the first proportion as the target feature information.
[0142] In some embodiments, the prediction unit 14 is further configured to input the target feature information into the regression tree model to perform power consumption prediction to obtain the power consumption prediction result; wherein the power consumption prediction result represents the predicted power consumption of the charging station over a period of time.
[0143] In some embodiments, the extraction unit 12 is further used to perform time series feature extraction processing on the time series feature information after the prediction unit 14 determines the feature importance information of the first proportion in the sorting result, and determines the feature information corresponding to each of the feature importance information of the first proportion as the target feature information, so as to obtain first feature information corresponding to the target feature information; wherein the first feature information is of the same type as the target feature information.
[0144] In some embodiments, the prediction unit 14 is further configured to input the target feature information and the first feature information into the regression tree model to perform power consumption prediction to obtain the power consumption prediction result.
[0145] In some embodiments, the extraction unit 12 is further used to determine the first time series data of the time series data under the sliding windows of different scales; and calculate the mean, variance and quantile based on the first time series data to obtain the statistical features.
[0146] In some embodiments, the extraction unit 12 is also used to obtain the exponential moving average characteristics corresponding to the observation values at each time node in the time series data based on the observation values at each time node and the preset smoothing factor; and to obtain the exponential moving average characteristics of the time series data based on the exponential moving average characteristics corresponding to the observation values at each time node.
[0147] In some embodiments, the acquisition unit 11 is also used to obtain the operating data of the charging station within a first time period; wherein the operating data includes at least one of electricity consumption data, electricity price information, and income data corresponding to time information; and performing data preprocessing on the operating data to obtain preprocessed data; and performing normal normalization on the preprocessed data to obtain the time series data.
[0148] Based on the above embodiment, in another embodiment of the present application, Figure 7 Schematic diagram of the electronic device structure proposed in this application embodiment Figure 2 ,like Figure 7 As shown, the electronic device 10 proposed in the embodiment of the present application may further include a processor 15 and a memory 16 storing instructions executable by the processor 15; further, the electronic device 10 may further include a communication interface 17 and a bus 18 for connecting the processor 15, the memory 16 and the communication interface 17.
[0149] In an embodiment of the present application, the processor 15 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present application is not specifically limited. The electronic device 10 may further include a memory 16, which may be connected to the processor 15, wherein the memory 16 is used to store executable program code, the program code including computer operating instructions, and the memory 16 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.
[0150] In the embodiment of the present application, the bus 18 is used to connect the communication interface 17, the processor 15, and the memory 16, as well as to facilitate mutual communication between these devices.
[0151] In the embodiment of the present application, the memory 16 is used to store instructions and data.
[0152] Furthermore, in an embodiment of the present application, the processor 15 is configured to obtain time series data of the charging station;
[0153] Performing time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data;
[0154] Performing feature importance analysis on the time series feature information to obtain an analysis result;
[0155] Target characteristic information is determined according to the analysis result, and power consumption prediction is performed based on the target characteristic information to obtain a power consumption prediction result of the charging station.
[0156] In practical applications, the memory 16 may be a volatile memory, such as a random-access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 15.
[0157] In addition, the functional modules in this embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional modules.
[0158] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0159] An embodiment of the present application provides an electronic device, including an acquisition unit, an extraction unit, an analysis unit and a prediction unit, wherein the acquisition unit is used to acquire time series data of a charging station; the extraction unit is used to perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data; the analysis unit is used to perform feature importance analysis on the time series feature information to obtain an analysis result; the prediction unit is used to determine target feature information according to the analysis result, perform power consumption prediction based on the target feature information, and obtain a power consumption prediction result of the charging station; it can be seen that when the present application predicts the power consumption of a charging station, by performing time series feature extraction processing on the time series data of the charging station, it is possible to take into account the temporal characteristics of the charging station-related data, and then use the time series feature information to perform feature importance analysis, and obtain the importance of each feature information of the time series feature information, so as to select more important feature information from the feature information as the target feature information according to the feature importance analysis result, and finally use the target feature information to perform power consumption prediction, which can improve the accuracy of the power consumption prediction, thereby effectively improving the accuracy of the power consumption prediction result.
[0160] Specifically, the program instructions corresponding to a power consumption prediction method in this embodiment can be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instructions corresponding to a power consumption prediction method in the storage medium are read or executed by an electronic device, the following steps are included:
[0161] Get time series data of charging stations;
[0162] Performing time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data;
[0163] Performing feature importance analysis on the time series feature information to obtain an analysis result;
[0164] Target characteristic information is determined according to the analysis result, and power consumption prediction is performed based on the target characteristic information to obtain a power consumption prediction result of the charging station.
[0165] An embodiment of the present application provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, the steps of the method provided in the above method embodiment are implemented.
[0166] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware.
[0167] The present application is described with reference to the implementation flow charts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flow charts and / or block diagrams, as well as the combination of processes and / or boxes in the flow charts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the implementation flow charts. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0168] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which is implemented in the implementation flow diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process described in the flowchart. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0170] The above description is merely a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application.
Claims
1. A method for predicting electricity consumption, characterized in that: The method comprises: Obtain time series data of charging stations; Performing time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data; Performing feature importance analysis on the time series feature information to obtain analysis results; Target characteristic information is determined according to the analysis result, and power consumption prediction is performed based on the target characteristic information to obtain a power consumption prediction result of the charging station.
2. The power consumption prediction method according to claim 1, characterized in that: The performing time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data includes at least one of the following: Performing statistical processing on feature information of the time series data based on a sliding window to obtain statistical features of the time series data; Extracting time index features based on timestamp information corresponding to the time series data and trigonometric functions; Extracting lag features and / or exponential moving average features of the time series data.
3. The power consumption prediction method according to claim 2, characterized in that: The performing feature importance analysis on the time series feature information to obtain analysis results includes: Building a regression tree model based on the time series feature information, and calculating split gain information of each feature information in the time series feature information during the process of building the regression tree model; The feature importance information of each feature information is calculated according to the splitting gain information of each feature information to obtain the analysis result.
4. The power consumption prediction method according to claim 3, characterized in that: Determining target feature information according to the analysis result includes: Sort the feature importance information corresponding to each feature information in the analysis result in descending order to obtain a sorting result; A first proportion of feature importance information is determined in the ranking result, and feature information corresponding to each piece of feature importance information in the first proportion is determined as the target feature information.
5. The power consumption prediction method according to claim 4, characterized in that: The performing power consumption prediction based on the target characteristic information to obtain the power consumption prediction result of the charging station includes: The target feature information is input into the regression tree model to perform power consumption prediction to obtain the power consumption prediction result; wherein the power consumption prediction result represents the predicted power consumption of the charging station over a period of time.
6. The power consumption prediction method according to claim 5, characterized in that: After determining a first proportion of feature importance information in the ranking result and determining feature information corresponding to each of the first proportion of feature importance information as the target feature information, the method further includes: Performing time series feature extraction processing on the time series feature information to obtain first feature information corresponding to the target feature information; wherein the first feature information is of the same type as the target feature information; The target feature information and the first feature information are input into the regression tree model to perform power consumption prediction to obtain the power consumption prediction result.
7. The power consumption prediction method according to claim 2, characterized in that: The performing statistical processing of feature information on the time series data based on the sliding window to obtain statistical features of the time series data includes: Determining first time series data of the time series data under the sliding windows of different scales; The mean, variance, and quantile are calculated based on the first time series data to obtain the statistical features.
8. The power consumption prediction method according to claim 2, characterized in that: The method further comprises: Based on the observation values at each time node in the time series data and a preset smoothing factor, the exponential moving average characteristics corresponding to the observation values at each time node are obtained; The exponential moving average feature of the time series data is obtained according to the exponential moving average features corresponding to the observation values at each time node.
9. The power consumption prediction method according to any one of claims 1 to 8, characterized in that: The obtaining of time series data of the charging station includes: Obtaining operation data of the charging station within a first time period; wherein the operation data includes at least one of electricity consumption data, electricity price information, and income data corresponding to time information; performing data preprocessing on the operation data to obtain preprocessed data; The preprocessed data is normalized to obtain the time series data.
10. An electronic device, characterized in that: The electronic device includes an acquisition unit, an extraction unit, an analysis unit and a prediction unit. The acquisition unit is used to acquire time series data of the charging station; The extraction unit is configured to perform time series feature extraction processing on the time series data to obtain time series feature information corresponding to the time series data; The analysis unit is used to perform feature importance analysis on the time series feature information to obtain an analysis result; The prediction unit is configured to determine target characteristic information according to the analysis result, perform power consumption prediction based on the target characteristic information, and obtain a power consumption prediction result of the charging station.
11. An electronic device, characterized in that: The electronic device includes a processor and a memory storing instructions executable by the processor; when the executable instructions are executed by the processor, the method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps in the power consumption prediction method according to any one of claims 1 to 9 are implemented.