A method for predicting single-day load of expressway service area based on data mining

By cleaning data, extracting features, and optimizing models, and combining similar day models and spectral clustering techniques, the problem of insufficient accuracy and robustness in existing load forecasting methods has been solved. This has enabled accurate forecasting of daily load in highway service areas, thereby improving energy management and operational efficiency.

CN119340985BActive Publication Date: 2025-11-04SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411457431.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-11-04
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing load forecasting methods struggle to accurately account for factors such as weather conditions and traffic flow, resulting in limited forecast accuracy and poor model robustness, especially prone to overfitting when dealing with high-dimensional data.

Method used

By collecting electricity consumption, time, weather, and traffic data from highway service areas, data cleaning and feature extraction are performed. A prediction model based on random forest and XGBoost is constructed. By combining similar day model and spectral clustering technology, feature selection and model parameters are optimized to improve prediction accuracy and applicability.

Benefits of technology

It enables accurate prediction of daily load in highway service areas, reduces overfitting problems, improves the relevance and reliability of prediction results, and supports energy management and operational efficiency optimization in service areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119340985B_ABST
    Figure CN119340985B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on data mining's expressway service area single-day load prediction method, comprising, reading the time, meteorology, flow and load data of target expressway service area, constructs original data set;Data cleaning and integration are carried out to original data, and structured historical data set is generated;The importance of each characteristic variable is calculated and is sorted accordingly, and the key feature set is screened out;Based on the determination value or predicted value of each variable under the key feature set of the day to be tested, data samples with similar characteristic performance as the day to be tested are screened from the historical data set to form a reorganized data set for the day to be tested;An expressway service area single-day load prediction model is constructed to obtain the predicted value of the single-day load of the day to be tested.The method enhances the robustness of the expressway service area load prediction method, improves the prediction accuracy, and provides effective technical support for the zero-carbon construction, power resource management and operation efficiency optimization of the service area.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power consumption prediction, in particular to a highway service area single-day load prediction method based on data mining. BACKGROUND

[0002] With the rapid development of highway network, the energy consumption management and energy saving reconstruction of highway service area as an important part of transportation hub are increasingly concerned. With the increasing diversification of functions of highway service area, the demand for electricity is more complex and variable. Accurate load prediction can not only help the service area management to reasonably arrange power resources and avoid waste of resources, but also improve the overall operation efficiency of the service area and ensure the stability of service quality.

[0003] The existing load prediction methods include statistical regression model, time series model and machine learning model, each of which has its own advantages and disadvantages. The statistical regression model and time series model are difficult to consider meteorological conditions, traffic flow and other factors, and the prediction accuracy is limited. The model has high requirements for the stationarity of the original sequence, and the existence of missing values and outliers will affect the robustness of the method. Machine learning model has good prediction performance when dealing with high-dimensional data, but the model is difficult to avoid overfitting problem and has poor generalization ability. In view of the above problems, the present application proposes a highway service area single-day load prediction method based on data mining, which aims to improve the prediction accuracy and applicability under different scenarios, and then optimize the energy management of service area and improve the operation efficiency. SUMMARY

[0004] The purpose of the present application is to provide a highway service area single-day load prediction method based on data mining, which collects the multi-dimensional data of electricity consumption, time, weather and flow of the service area, establishes a complete system covering data collection, preprocessing, feature extraction, data reorganization, prediction and parameter optimization, and realizes the accurate prediction of the single-day load of highway service area, providing scientific decision support for the zero-carbon construction and energy management of service area.

[0005] In order to achieve the above purpose, the solution of the present application is:

[0006] A highway service area single-day load prediction method based on data mining is used to predict the single-day load of the target highway service area; comprising the following steps:

[0007] Step 1, based on the detection equipment deployed in the target highway service area, reading time, weather, flow and load data, and constructing an original data set;

[0008] Step 2, data cleaning and integration of the original data in the original data set to generate a structured historical data set;

[0009] Step 3, based on the historical data set, calculate the importance of each feature variable and sort according to the importance, screen out the key feature set for the single-day load prediction of the highway service area;

[0010] Step 4, based on the determined value or predicted value of each feature variable of the key feature set under the to-be-tested day, screen out the data samples with similar feature performance from the historical data set, and fuse to form a reorganized data set for the to-be-tested day;

[0011] Step 5, based on the reorganized data set, fit the mapping of the key feature variable to the load, construct the single-day load prediction model of the highway service area, and obtain the predicted value of the single-day load of the to-be-tested day.

[0012] In the above step 1, the detection equipment includes intelligent electric meters, backup power meters, weather monitors, and flow counters installed in the highway service area; the time period for reading data is not less than one year, and the collection frequency is once a day;

[0013] The load data is the total daily electricity consumption of the highway service area; the time data includes the season, month, week, and whether it is a public holiday; the weather data includes the highest and lowest temperature, average humidity, rainfall, average atmospheric pressure, atmospheric visibility, and wind speed in the range of the highway service area on the day; and the flow data is the number of vehicles entering and leaving the highway service area on the day.

[0014] The specific process of the above step 2 is,

[0015] Step 2.1, identify the missing values of the original data under different attribute fields, delete the attribute field when a field exceeds the acceptable missing threshold range, otherwise complete the null values;

[0016] Step 2.2, based on the completed data set, detect the abnormal values in the numerical variables of the load, weather, and flow data, and verify the identified abnormal values, and if it cannot be verified, it is modified;

[0017] Step 2.3, based on the modified data set, encode the classification variables in the data set to obtain a structured historical data set.

[0018] In the above step 2.1, when completing the null values, query the external data source for completion; if it cannot be completed by querying the external data source, use linear interpolation to fill in.

[0019] In step 3, the time attribute, weather attribute and flow attribute are taken as the candidate feature set, and the load data is taken as the result set to be fitted. The random forest algorithm is used to obtain the contribution degree of each feature variable to the electricity consumption prediction, and the feature variables with a contribution degree sum reaching 90% in descending order are selected as the key feature set for the single-day load prediction of the highway service area.

[0020] The specific process in step 4 is as follows.

[0021] In step 4.1, a 1xN f row vector X p is obtained, where N H is the number of key feature variables, and each element in X d represents the determined value or predicted value of the corresponding key feature variable on the day to be tested. d H hi ;

[0022] X p = [x p1 , x p2 , …, x pNf ]

[0023]

[0024] X p is vertically spliced with X H to obtain a data reorganization original set D c0 , and each row in D c0 represents a data sample. The numerical variables in the key features are normalized one by one.

[0025] In step 4.2, the similarity of the sample to be predicted and each historical sample in the key features is calculated, and the historical samples are arranged in ascending order of similarity Simi(X p , X hi ). The 30 samples with the smallest similarity values are selected to form a similar day data subset D c1 .

[0026] In step 4.3, the similarity Simi(X i , X j ) between any two samples in the data reorganization original set is calculated, and a similarity matrix S is constructed. Based on the similarity matrix S, a degree matrix D and a Laplacian matrix L are constructed. The degree matrix D is a diagonal matrix, and the diagonal elements d ii are the sum of the elements of the corresponding row of the similarity matrix S. The related calculation formula is as follows: ​​

[0027] s ij = Simi(X i , X j )

[0028] d ii = ∑ j s ij

[0029] L = D - S

[0030] Eigen decomposition is performed on the Laplacian matrix L to obtain an ascending order of all eigenvalues λ1≤λ2≤…, difference is made to the sequence to determine the maximum value max(|Δλ i |) of the difference sequence, k eigenvectors corresponding to all eigenvalues before this are stacked into an eigenvector matrix U, and a k-means clustering algorithm is performed on the eigenvector matrix U to divide the historical samples and the to-be-predicted into k classes; a class containing the to-be-predicted sample is extracted, and the historical samples in the class constitute a spectral clustering data subset D c2 ;

[0031] Step 4.4, the similar day data subset D c1 is fused with the spectral clustering data subset D c2 , and after deduplication processing, a reorganized data set D c for the to-be-tested sample is obtained. c1 ∪ D c2 .

[0032] In the above step 5, an XGBoost algorithm is used to construct a prediction model.

[0033] The prediction method further includes step 6, based on the obtained expressway service area single-day load prediction value and the measured value, hyperparameter optimization is performed on the prediction model.

[0034] In the above step 6, a Bayesian optimization method is used to perform hyperparameter optimization on the prediction model; the combination of hyperparameters to be optimized is defined as para={depth_max,sample_min,tree_max,η}, and the tuning range of each hyperparameter is defined as: the maximum depth threshold of the regression tree depth_max∈[3,10], the minimum sample number threshold in the node sample_min∈[1,10], the number threshold of the regression tree tree_max∈[10,100], and the learning rate threshold η∈[0.01,3].

[0035] The prediction method further includes integrating the actual data of the to-be-tested day into the historical data set to support subsequent prediction.

[0036] After the above scheme is used, the present application has the following advantages compared with the prior art:

[0037] (1) The present application fully considers the influence of time, weather, flow and other factors on the power consumption of the highway service area by fusing multiple data sources, adopts advanced data processing technology for data cleaning and feature engineering, and ensures the integrity of the data and the efficiency of the model operation.

[0038] (2) By constructing a similar day model and a spectral clustering model, the present application can accurately identify and screen historical data similar to the characteristics of the to-be-tested day, thereby optimizing the prediction data set, reducing the overfitting problem caused by excessive learning of irrelevant features by the machine learning prediction model, and ensuring the pertinence and reliability of the prediction results.

[0039] (3) The present application adopts XGBoost fusion Bayesian optimization to construct a prediction model, which can automatically adjust the built-in parameters according to the error between the predicted value and the measured value, continuously optimize the prediction performance, and ensure the adaptability of the model in different scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 is the thought framework diagram of the method of the present application;

[0041] Figure 2 is the importance column chart of the key features obtained by the feature engineering module in the example of the present application;

[0042] Figure 3 is the thought framework diagram of the data reorganization module of the method of the present application;

[0043] Figure 4 is the comparison chart of part of the prediction results and the actual data in the example of the present application. DETAILED DESCRIPTION

[0044] The technical solutions and beneficial effects of the present application will be described in detail below in combination with the drawings and specific embodiments.

[0045] First, the basic idea of the method of the present application is explained: the present application proposes a highway service area single-day load prediction method based on data mining, including six core modules of data collection, data processing, feature engineering, data reorganization, load prediction and parameter tuning. By collecting the power load, weather, flow and other data of the historical days of the service area, a prediction framework combining clustering algorithm, machine learning and parameter tuning is constructed to obtain the estimation of the power consumption of the to-be-tested day, which is used to guide the zero-carbon construction and transformation of the service area.

[0046] The data used in the examples of the present application are the power load, meteorological and flow record data of a service area of a Nanjing ring expressway provided by Nanjing Transportation Industry Group Co., Ltd. Among them, the power load data and flow data are from the intelligent electric meter and flow monitor installed in the service area, and the meteorological data are from the meteorological monitor installed in the service area and are checked and calibrated with the meteorological information published by the local meteorological station.

[0047] As Figure 1 The idea framework of a single-day load prediction method for expressway service area based on data mining proposed by the present application is shown, and the following will be combined with Figure 1 Further description of the method implementation of the present application, the method of the present application comprises the following steps:

[0048] Step 1: Based on the target expressway service area, execute the data acquisition module to read data from the high-precision detection equipment such as intelligent electric meter, backup power electric meter, meteorological monitor, flow counter, etc. deployed, and construct the original data set D0;

[0049] In the examples of the present application, the data information in the original data set covers load data, time data, meteorological data and flow data; the time period of the original data set collection is preferably not less than one year, and the collection frequency is once a day;

[0050] In the examples of the present application, the collection field of the load data is the total daily power consumption of the expressway service area, including the daily power consumption of each necessary power consumption facility such as gas station, charging pile, communication, lighting, air conditioning, heating, catering and backup power supply.

[0051] In the examples of the present application, the time data record time attributes, and the collection fields include the season, month, week and whether it is a public holiday of the day; the meteorological data record key meteorological parameters, and the collection fields include the highest and lowest temperature, average humidity, rainfall, average atmospheric pressure, atmospheric visibility and wind speed of the day; the flow data specifically refers to the number of vehicles in and out of the service area obtained by the service area flow counter.

[0052] Step 2: Based on the original data set D0 constructed in step 1, execute the data processing module to clean and integrate the original data, and obtain the structured historical data set D s after processing.

[0053] In this embodiment, the data processing module of step 2 comprises the following steps:

[0054] Step 2.1: Identify missing values of original data under different attribute fields, delete the attribute field when the proportion of missing values under a field exceeds 30%, and do not use it for subsequent analysis. For null values within the acceptable missing threshold range, if it is time or weather data, it is completed by querying external data sources such as national meteorological bureau, historical weather database, calendar library, etc.; if it is power consumption or flow data, it is filled by linear interpolation method, and the calculation formula of linear interpolation method is:

[0055] x i =0.5×(x i+1 +x i-1 )

[0056] In the formula, x i is the filling result of the missing value, x i+1 and x i-1 are adjacent data points before and after the missing value.

[0057] Step 2.2: Based on the completed data set, the numerical variables in the power consumption, weather and flow data are detected for outliers using the box plot method, and if the data point is outside the range [Q1-1.5*IQR, Q3+1.5*IQR], it is determined to be an outlier. Wherein, Q1 and Q3 are the first quartile and the third quartile of the data respectively, and the interquartile range IQR is the difference between Q1 and Q3. For the identified outliers, the external database is preferred for verification, and if this method is difficult to achieve, the linear interpolation method described in step 2.1 is used for correction.

[0058] Step 2.3: Based on the completed and corrected data set, the classification variables in the data are encoded, and the information under the season, month and week fields is converted into a binary vector using one-hot encoding.

[0059] The data structure after preprocessing in the examples of the present application is shown in Table 1:

[0060] Table 1: Data structure after preprocessing

[0061]

[0062]

[0063] Step 3: Based on the historical data set D s obtained in step 2, a feature engineering module is executed to obtain time attribute F T , weather attribute F W , flow attribute F QAs the feature set F to be selected, the load data E is taken as the result set to be fitted, and a random forest model is established in the feature engineering module to obtain the ranking of the contribution of each feature variable to the prediction of electricity consumption, and the feature variables whose contribution sum reaches 90% in descending order are selected as the key feature set CF for the single-day load prediction of the highway service area;

[0064] In the embodiment, the feature engineering module in step 3 comprises the following specific steps:

[0065] Step 3.1: Bootstrap sampling is performed on the historical data set D s to obtain m feature engineering data subsets {Df1, Df2, …, Df m}, each of which contains n structured data samples; in the example of the present application, m = 100 and n = 400;

[0066] Step 3.2: For each feature engineering data subset Df i , which has a feature set F i to be selected and a result set e i to be fitted, a regression tree model is constructed. The initial root node of the tree contains all data samples in Df i , and by selecting a certain condition feature f i from the feature set F i1 to be selected, the samples are divided into two parts and stored in the two leaf nodes under the root node, and this process is called a branch of the regression tree. The arithmetic mean of the electricity consumption of the samples in each leaf node is taken as the result fitting value of the node, and the condition feature is reasonably selected so that the residual sum of squares MSE of the samples in the leaf node is minimized each time the branch is made, and the calculation formula is as follows:

[0067]

[0068] Where |node| represents the number of samples in the current node, y k is the actual value of the single-day load of the samples in the current node, is the fitting value of the single-day load of the samples in the current node; node p is the parent node before branching, node l and node r are the left and right two child nodes after branching;

[0069] The above branching process is repeated for a single regression tree until one of the following stopping thresholds is met: ① The maximum depth threshold of the regression tree, depth_max, is reached; ② The number of samples in the leaf node after branching is less than the minimum number of samples in the node, sample_min; ③ The decrease in the sum of squared residuals of the samples in the node before and after branching is less than the branch condition threshold, Δmse_min. In this invention example, depth max =10, sample min =5, Δmse min =0.01;

[0070] For each feature engineering data subset Df i Construct parallel regression tree models one by one;

[0071] Step 3.3: Calculate the importance of each feature in the feature set F in the model, using the following formula:

[0072]

[0073] Where nodes(t) represent all branch nodes in the t-th regression tree, Π(S node =F i ) is an indicator function; if the current node uses feature F i The value is 1 if a branch is performed, and 0 otherwise; ΔMSE(node) is the reduction in the sum of squared residuals after branching at that node. Features are sorted in descending order of importance, and the top N features with a cumulative importance of 90% are selected. f These features constitute the key feature set CF.

[0074] In this invention, the importance ranking of key features selected through feature engineering is as follows: Figure 2 As shown, there are 15 key features with a cumulative importance of 90%, namely, daily traffic in the service area, holidays, July, highest temperature, January, Friday, August, lowest temperature, spring, rainfall, visibility, Saturday, average humidity, winter, and February.

[0075] Step 4: Obtain the definite or predicted values ​​of each feature variable for the day to be tested under the key feature set. Construct a similar day model and a spectral clustering model in the data reconstruction module, from the historical dataset D. s Select data samples with similar features and fuse them to obtain a reconstructed dataset D for the sample to be tested. c ;

[0076] In this embodiment, the data reconstruction module in step 4 includes the following specific steps, combined with Figure 3 To explain further:

[0077] Step 4.1: Obtain the definite or predicted values ​​of each feature variable under the key feature set for the test day, X.p The shape formed by the values ​​of the key characteristic variables on the day to be measured is 1×N. f The row vector, in this embodiment of the invention, is N. f =15. The value of the day to be measured under the time attribute characteristics is fixed, such as whether it is a holiday, whether it is January, whether it is spring, etc. The values ​​under the meteorological and flow attribute characteristics require the use of weather forecast data and estimated flow rates. X H The shape of the values ​​of each sample in the historical dataset on the key feature variables is N. d A nested matrix of size ×1, N d N represents the number of samples in the historical dataset, in this invention example. d =400, X H Each row in the vector X is a row vector formed by the values ​​of key feature variables of a historical day sample. hi .

[0078] X p =[x p 1,x p 2,…,x p Nf]

[0079]

[0080] X p With X H Vertical splicing yields the original data set D, which is then reassembled. c0 D c0 Each row in the table represents a data sample. The numerical variables in the key features are normalized one by one to eliminate differences between units. The formula for variable normalization is as follows:

[0081]

[0082] Where x′ is the normalized variable value, x is the original variable value, and max(x) and min(x) are the maximum and minimum values ​​of the current feature variable of the sample;

[0083] Step 4.2: Calculate the similarity of the sample to be predicted with each historical sample in terms of key features. Euclidean distance is used to measure the similarity between numerical variables, and an indicator function is used to measure the similarity between categorical variables and 0-1 variables. The calculation formula is as follows:

[0084]

[0085] Where n1 and n2 are the number of numerical and categorical variables in the key features, respectively, x′ pj and x′ hijis the normalized value of the jth numerical variable of the ith historical sample, I(x pk ≠x hik ) is an indicator function, which is 0 if the value of the kth categorical variable of the sample to be predicted and the historical sample are the same, and 1 otherwise;

[0086] The historical samples are arranged in ascending order of similarity Simi(x p ,X hi ), and the 30 samples with the smallest similarity values are selected, and the original samples corresponding to the historical data set D s are extracted to form a similar day data subset D c1 ;

[0087] Step 4.3: Based on the similarity calculation formula in step 4.2, the similarity Simi(x i ,X j ) between any two samples X i ,X j in the data reorganization original set D c0 is obtained, and a similarity matrix S is constructed; based on the similarity matrix S, a degree matrix D and a Laplacian matrix L are constructed, the degree matrix is a diagonal matrix, and the diagonal elements d ii are the sum of the elements of the corresponding row of the similarity matrix S, and the related calculation formula is as follows:

[0088] s ij =Simi(x i ,X j )

[0089] d ii =∑ j s ij

[0090] L=D-S

[0091] The eigenvalue decomposition of the Laplacian matrix L is performed to obtain the ascending order of all eigenvalues λ1≤λ2≤…, and the difference sequence is determined by the maximum value max(|Δλ i |) of the difference sequence, and the k eigenvectors corresponding to all previous eigenvalues are stacked into an eigenvector matrix U, and k defines the number of clusters of the k-means clustering algorithm to be performed thereafter. Each row in the eigenvector matrix U is an embedding representation of the original sample in a low-dimensional space, and the k-means clustering algorithm is performed on it, that is, k samples are randomly selected as cluster centers, and the distance d(x,c i ) of the remaining samples to each cluster center is calculated, and the calculation formula is as follows:

[0092]

[0093] where ci is the i-th cluster center, x j is the value of the sample on the j-th feature in the low-dimensional space, x cij is the cluster center c i is the value on the j-th feature;

[0094] Each sample is assigned to a class with the nearest cluster center, and after clustering all samples, the mean of the samples in the same class on each feature variable is recalculated as the new cluster center; repeat the operation until the position changes before and after the update of the cluster center are less than the set threshold d0, then the clustering ends;

[0095] For the k data clusters obtained, extract the data cluster containing the to-be-predicted sample, and obtain the original data corresponding to the historical samples in the historical data set D s ; c2

[0096] Step 4.4: Fuse the similar day data subset D c1 and the spectral clustering data subset D c2 , and obtain the reorganized data set D c for the to-be-tested sample after de-duplication processing:

[0097] D c = D c1 ∪ D c2

[0098] Step 5: Based on the reorganized data set D c for the to-be-tested sample features obtained in step 4, execute the prediction module, build an XGBoost model to fit the mapping of key features to load data, and obtain the to-be-tested daily electricity consumption prediction value

[0099] The prediction module in step 5 performs the following specific steps:

[0100] Step 5.1: Take the measured load mean of each sample in the reorganized data set D c as the initial prediction value of the model Calculate the residual error between the predicted value and the true value of each sample The formula is as follows:

[0101]

[0102] Where n c is the number of samples in the reorganized data set D c , E ci is the measured load of sample i;

[0103] Step 5.2: Take the residual error of each sample obtained after the initial prediction ​As the target value for the construction of the regression tree, the root node contains all data samples in the reorganized dataset D c The attributes in the key feature set CF are traversed to attempt to branch the root node; the branching process divides the samples in the parent node into two parts and places them in two leaf nodes, calculates the gain under each branching mode, and selects the feature with the largest gain to complete the branching. The branching gain Gain is calculated as follows:

[0104]

[0105] G I =(∑ i∈I g i ) 2 ,H I =(∑ i∈I h i ) 2

[0106]

[0107] where the loss function is used to measure the difference between the predicted value and the true value after the kth prediction, g i is the first-order derivative of the loss function , h i is the second-order derivative of the loss function , I L and I R are the sample sets contained in the left and right child nodes after branching, γ is the regularization coefficient of the total number of current regression tree nodes, generally taking values in the interval [0, 10], and λ is the regularization parameter of the predicted value of the bottom leaf node of the current regression tree, generally taking values in the interval [1, 10];

[0108] The branching operation is repeated until one of the following termination conditions of the regression tree growth is reached: ① the maximum depth threshold depth_max of the regression tree is reached; ② the number of samples in the leaf node after branching is less than the minimum sample number threshold sample_min in the node; ③ the branching gain is less than the minimum gain threshold gain_min;

[0109] The predicted value of the model is updated and a new round of residual error is calculated as follows:

[0110]

[0111] where η is the learning rate indicating the contribution degree of each tree, commonly taking values in the interval [0.01, 3], X c is the value of each sample in the key feature attribute in the reorganized dataset D c , and f1(X c) is the prediction value of the first regression tree for the first round residual of each sample;

[0112] Step 5.3: According to the residual obtained after the first regression tree A new regression tree is generated according to step 5.2, and the prediction value of the model is updated And a new round of residual Repeat the process until the forest tree threshold tree_max is reached, and the final prediction value of the daily load of the test day is the weighted sum result of all regression tree prediction results

[0113]

[0114] The value range of the hyperparameters involved in the model in the example of the application is as follows: the maximum depth threshold of the regression tree depth_max∈[3,10], the minimum sample number threshold in the node sample_min∈[1,10], the number threshold of the regression tree tree_max∈[10,100], the learning rate threshold η∈[0.01,3], and the hyperparameter selection for each model is realized through the GridSearchCV function in the sklearn.model_selection module in the python environment; The comparison results of the predicted value and the true value of part of the samples in the example of the application and the residual are shown in Figure 4

[0115] Step 6: Obtain the measured load value E p of the test day, adjust the hyperparameters of the prediction model using the Bayesian optimization method, record the optimized hyperparameter combination, and integrate the actual data of the test day into the structured historical data set D s to support subsequent prediction;

[0116] The parameter tuning module in step 6 performs the following specific steps:

[0117] Step 6.1: Integrate the key feature variables X p of the test day and the single-day load measured value E p into the reorganized data set D c for the test sample, to obtain the prediction model correction data set D m ;

[0118] ​​Step 6.2: Define the combination of hyperparameters to be tuned and their value ranges. In this example, the combination of hyperparameters to be tuned is defined as para={depth_max,sample_min,tree_max,η}. The tuning ranges of each hyperparameter are defined as follows: the maximum depth threshold of the regression tree depth_max∈[3,10], the minimum number of samples in a node threshold sample_min∈[1,10], the number of regression trees threshold tree_max∈[10,100], and the learning rate threshold η∈[0.01,3].

[0119] Define the objective function for parameter tuning. In this example, the objective function is defined as minimizing the mean square error of the daily load forecast for highway service areas. The calculation formula is as follows:

[0120]

[0121] Where n m To correct dataset D m The number of data samples in the data. Let E be the daily load forecast value for the service area on day i. i This represents the actual daily load measured for the service area.

[0122] Ten hyperparameter combinations are randomly selected and the corresponding objective function values ​​are calculated, resulting in a set D of pairs of hyperparameter combinations and objective function values. g ={(para1,m1),(para2,m2),…,(para 10 ,m 10 )};

[0123] Step 6.3: Use radial basis functions (RBF) as the kernel function κ(para) i ,para j Construct the kernel matrix K, k ij For the elements in the kernel matrix K:

[0124]

[0125] Both and l are hyperparameters in the kernel function. The method of maximizing the following log-likelihood function is used to select the one that best fits the data. and l:

[0126]

[0127] Where M is the objective function value vector, Para is the parameter combination matrix, and |K| is the determinant of the covariance matrix;

[0128] Step 6.4: Randomly select 10 candidate hyperparameter combinations, and calculate their prediction mean μ(para * ), prediction standard deviation σ(para * ) and expected improvement EI(para * ) respectively, as follows:

[0129] k * =(k(para * ,para1),κ(para * ,para2),…,κ(para * ,para 10 )) T

[0130]

[0131] where τ is the minimum value in the current objective function value vector, Φ is the cumulative distribution function of the standard normal distribution, and φ is the probability density function of the standard normal distribution;

[0132] Select the hyperparameter combination with the maximum expected improvement as the next sampling point, calculate the corresponding objective function value, and update the set of pairs of hyperparameter combinations and objective function values D g .

[0133] Step 6.5: Repeat Step 6.3 and Step 6.4 until the maximum number of iterations is reached; retain the hyperparameter combination with the minimum objective function value and record it; integrate the key features of the day to be tested and the actual load data of the day into the structured historical data set D s to support subsequent prediction.

[0134] In summary, the present application discloses a method for predicting the daily load of a highway service area based on data mining, which includes data collection, data processing, feature engineering, data reorganization, load prediction and parameter tuning. Through intelligent electric meters, weather monitors, flow counters and other devices, electricity consumption, weather, time and flow data are collected, and the original data is cleaned and integrated. The random forest method is used to calculate the feature importance to select the key features for load prediction, and the similar day model and spectral clustering model are combined to extract a historical data subset similar to the features of the day to be tested for constructing a prediction model. Based on the XGBoost algorithm, the daily load of the service area is predicted, and the model parameters are adjusted using the Bayesian optimization method according to the difference between the predicted value and the actual value. This method improves the accuracy of load prediction of highway service areas and the robustness of the prediction method, providing effective technical support for zero-carbon construction, power resource management and operation efficiency optimization of service areas.

[0135] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, it is intended that the appended claims include all such modifications and variations as fall within the scope of the present application.

[0136] It is apparent that those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. It is therefore intended that the present application cover all such changes and modifications that are within its scope.

Claims

1. A method for predicting daily load at highway service areas based on data mining, characterized in that... Includes the following steps: Step 1: Based on the detection equipment deployed in the target highway service area, read the time, weather, traffic flow and load data to construct the original dataset; Step 2: Clean and integrate the raw data in the original dataset to generate a structured historical dataset; Step 3: Based on the historical dataset, calculate the importance of each feature variable and sort them according to the importance to select the key feature set for daily load prediction of highway service areas; Step 4: Based on the determined or predicted values ​​of each feature variable under the key feature set for the test day, select data samples with similar feature performance to the test day from the historical dataset and merge them to form a recombined dataset for the test day. Step 5: Based on the recombined dataset, fit the mapping of key feature variables to load, construct a daily load prediction model for highway service areas, and obtain the predicted value of the daily load for the test day. The specific process in step 4 is as follows: Step 4.1: Obtain the definite or predicted values ​​of each feature variable under the key feature set for the test date. row vector , The shape formed by the values ​​of each feature variable of each sample in the historical dataset under the key feature set is as follows: Nested matrices, The number of samples in the historical dataset. Each row in the vector represents a row vector consisting of the values ​​of key feature variables for a historical day sample. ; , Will and Vertical splicing yields the original data set for reconstruction. , Each row in the table represents a data sample, and the numerical variables in the key features are normalized one by one. Step 4.2: Calculate the similarity of the sample to be predicted with each historical sample in terms of key features, and sort the historical samples according to their similarity. Sort the data in ascending order and select the 30 samples with the lowest similarity values ​​to form a subset of similar day data. ; Step 4.3: Calculate the similarity between any two samples in the original data reconstruction set. Construct a similarity matrix Based on similarity matrix Construct the degree matrix and Laplace matrix degree matrix It is a diagonal matrix, whose diagonal elements Similarity matrix The formula for calculating the sum of elements in a corresponding row is as follows: , Laplace matrix Perform eigenvalue decomposition to obtain an ascending order of all eigenvalues. Perform a difference operation on the sequence to determine the maximum value of the difference sequence. , corresponding to all previous eigenvalues The eigenvectors are stacked to form an eigenvector matrix. For the eigenvector matrix Perform k-means clustering to divide historical samples and samples to be predicted into two groups. Classification; extract the classes containing the samples to be predicted, and construct a subset of spectral clustering data from the historical samples within these classes. ; Step 4.4, subset of similar day data With spectral clustering data subset After fusion and deduplication, a reconstructed dataset for the test samples is obtained. .

2. The method for predicting daily load of highway service areas based on data mining as described in claim 1, characterized in that: In step 1, the detection equipment includes smart meters, backup power meters, weather monitors, and traffic flow counters installed inside highway service areas; the data reading period is no less than one year, and the data collection frequency is once a day; The load data is the total daily electricity consumption of the highway service area; the time data includes the season, month, day of the week, and whether it is a public holiday; the meteorological data includes the highest and lowest temperatures, average humidity, rainfall, average atmospheric pressure, atmospheric visibility, and wind speed within the highway service area on that day; and the traffic flow data is the number of vehicles entering and leaving the highway service area on that day.

3. The method for predicting daily load of highway service areas based on data mining as described in claim 1, characterized in that: The specific process of step 2 is as follows: Step 2.1: Identify missing values ​​in different attribute fields of the original data. If a field exceeds the acceptable missing value threshold, delete that attribute field; otherwise, fill in the missing values. Step 2.2: Based on the completed dataset, outlier detection is performed on the numerical variables in the load, meteorological, and flow data. The identified outliers are verified, and if they cannot be verified, they are corrected. Step 2.3: Based on the corrected dataset, encode the categorical variables in the dataset to obtain a structured historical dataset.

4. The method for predicting daily load of highway service areas based on data mining as described in claim 3, characterized in that: In step 2.1, when filling in null values, the null values ​​are filled by querying an external data source; if the null values ​​cannot be filled by querying an external data source, linear interpolation is used to fill them in.

5. The method for predicting daily load of highway service areas based on data mining as described in claim 1, characterized in that: In step 3, time attributes, meteorological attributes, and flow attributes are selected as the feature set, and load data is selected as the result set to be fitted. The random forest algorithm is used to obtain the ranking of the contribution of each feature variable to the electricity consumption prediction. The feature variables with a sum of contributions of 90% in descending order are selected as the key feature set for the daily load prediction of highway service areas.

6. The method for predicting daily load of highway service areas based on data mining as described in claim 1, characterized in that: In step 5, the XGBoost algorithm is used to construct the prediction model.

7. The method for predicting daily load of highway service areas based on data mining as described in claim 1, characterized in that: It also includes step 6, which optimizes the hyperparameters of the prediction model based on the obtained daily load forecast and measured values ​​of the highway service area.

8. The method for predicting daily load of highway service areas based on data mining as described in claim 7, characterized in that: In step 6, the Bayesian optimization method is used to optimize the hyperparameters of the prediction model; the combination of hyperparameters to be optimized is defined as follows: The tuning range of each hyperparameter is defined as: the maximum depth threshold of the regression tree. Minimum number of samples within a node threshold The threshold for the number of regression trees Learning rate threshold .

9. The method for predicting daily load of highway service areas based on data mining as described in claim 1, characterized in that: It also includes integrating the actual data of the day to be tested into the historical dataset to support subsequent predictions.

Citation Information

Patent Citations

  • Short-term Load Forecasting Method Based on TCN and IPSO-LSSVM Combined Model

    AU2020104000A4

  • Power load prediction method

    CN107016469A