Highway service area single-day load prediction method based on data mining

Through data mining-based methods, combined with a variety of data processing and machine learning technologies, the shortcomings in accuracy and robustness of existing load forecasting methods are solved, and more accurate and reliable single-day load forecasting in highway service areas is achieved. , optimizing energy management and operational efficiency.

CN119340985AActive Publication Date: 2025-01-21SOUTHEAST UNIV

Patent Information

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

AI Technical Summary

Technical Problem

The existing load prediction methods have shortcomings in terms of accuracy and robustness, and it is difficult to effectively consider multiple factors such as meteorological conditions and traffic flow, and are prone to overfitting problems.

Method used

Using methods based on data mining, by collecting multi-dimensional data in highway service areas, a complete system of data collection, preprocessing, feature extraction, data reorganization, prediction and parameter tuning is established to build similar day models and spectral clustering models, combined with XGBoost algorithm and Bayesian optimization method for load forecasting.

Benefits of technology

It improves the accuracy and applicability of load forecasting, alleviates over-fitting problems, ensures the pertinence and reliability of forecast results, and optimizes the energy management and operational efficiency of the service area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119340985A_ABST
    Figure CN119340985A_ABST
Patent Text Reader

Abstract

The invention discloses an expressway service area single-day load prediction method based on data mining, and the method comprises the steps: reading the time, weather, flow and load data of a target expressway service area, and constructing an original data set; performing data cleaning and integration on the original data to generate a structured historical data set; calculating the importance of each feature variable, sorting the importance, and screening out a key feature set; based on the determined value or the predicted value of each variable of the day to be tested under the key feature set, screening data samples having similar feature expressions with the day to be tested from the historical data set, and forming a recombined data set for the day to be tested; and constructing a highway service area single-day load prediction model, and obtaining a predicted value of the single-day load of the to-be-predicted day. According to the method, the robustness of the highway service area load prediction method is enhanced, the prediction precision is improved, and effective technical support is provided for 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 invention relates to the technical field of electricity consumption prediction, and in particular to a method for predicting a single-day load in a highway service area based on data mining. Background Art

[0002] With the rapid development of the expressway network, expressway service areas, as an important part of transportation hubs, have received more and more attention for their energy consumption management and energy-saving transformation. As the functions of expressway service areas become increasingly diversified, electricity demand becomes more complex and changeable. Accurate load forecasting can not only help service area managers to reasonably arrange power resources and avoid resource waste, but also improve the overall operational efficiency of service areas and ensure the stability of service quality.

[0003] Existing load forecasting methods include statistical regression models, time series models, and machine learning models, each of which has its own advantages and disadvantages. It is difficult for statistical regression models and time series models to take factors such as meteorological conditions and traffic flow into consideration, and the prediction accuracy is limited. In addition, the models have high requirements for the stationarity of the original sequence, and the presence of missing values ​​and outliers will affect the robustness of the method. Machine learning models have good prediction performance when processing high-dimensional data, but the models are difficult to avoid overfitting problems and have poor generalization capabilities. In response to the above problems, the present invention proposes a single-day load forecasting method for highway service areas based on data mining, which aims to improve the accuracy of the prediction and the applicability under different scenarios, thereby optimizing the energy management of the service area and improving operational efficiency. Summary of the invention

[0004] The purpose of the present invention is to provide a method for predicting the daily load of a highway service area based on data mining. By collecting multi-dimensional data on electricity consumption, time, weather and flow in the service area, a complete system covering data collection, preprocessing, feature extraction, data reorganization, prediction and parameter tuning is established to achieve accurate prediction of the daily load of the highway service area, and provide scientific decision-making support for the zero-carbon construction and energy management of the service area.

[0005] In order to achieve the above object, the solution of the present invention is:

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

[0007] Step 1: construct the original data set based on the time, weather, flow and load data read by the detection equipment deployed in the target highway service area;

[0008] Step 2: Clean and integrate the original data in the original data set to generate a structured historical data set;

[0009] Step 3, based on the historical data set, calculating the importance of each feature variable and sorting them according to the importance, and screening out a key feature set for single-day load forecasting of highway service areas;

[0010] Step 4: Based on the determined values ​​or predicted values ​​of each characteristic variable under the key characteristic set of the day to be tested, data samples with similar characteristic performance to the day to be tested are selected from the historical data set, and merged to form a recombined data set for the day to be tested;

[0011] Step 5: Based on the reorganized data set, fit the mapping of key characteristic variables to load, build a single-day load forecasting model for the expressway service area, and obtain the predicted value of the single-day load on the test day.

[0012] In the above step 1, the detection equipment includes a smart meter, a backup power meter, a weather monitor, and a flow counter installed inside the expressway 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 electricity consumption of the highway service area in a single day; the time data includes the season, month, 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; the traffic data is the number of vehicles entering and leaving the highway service area on that day.

[0014] The specific process of step 2 above is:

[0015] Step 2.1, identify the missing values ​​of the original data in different attribute fields, delete the attribute field when it exceeds the acceptable missing threshold range, otherwise fill in the empty values;

[0016] Step 2.2, based on the completed data set, perform outlier detection on the numerical variables in the load, meteorological and flow data, verify the identified outliers, and correct them if they cannot be verified;

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

[0018] In the above step 2.1, when filling in the empty values, the filling is performed by querying the external data source; if the filling cannot be performed by querying the external data source, the linear interpolation method is used to fill in the empty values.

[0019] In the above step 3, time attributes, meteorological attributes, and flow attributes are taken as the feature sets to be selected, and load data is taken 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, and the feature variables whose sum of contribution in descending order reaches 90% 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 above is,

[0021] Step 4.1: Obtain the 1×N matrix consisting of the determined values ​​or predicted values ​​of each characteristic variable under the key characteristic set on the test day. f Row vector X p , X H The shape of each sample in the historical data set under the key feature set is N d ×1 nested matrix, N d is the number of samples in the historical data set, X H Each line in is a row vector X consisting of the values ​​of each key feature variable of a historical daily sample hi ;

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

[0023]

[0024] X p With X H Vertical splicing to obtain the original data set D c0 , D c0 Each row in represents a data sample, and the numerical variables in the key features are normalized one by one;

[0025] Step 4.2: Calculate the similarity between the sample to be predicted and each historical sample in terms of key features, and calculate the similarity between the historical samples according to the similarity Simi(X p ,X hi ) are arranged in ascending order, and the 30 samples with the smallest similarity values ​​are selected to form the similar day data subset D c1 ;

[0026] Step 4.3, calculate the similarity Simi(X i ,X j ), construct the similarity matrix S; based on the similarity matrix S, construct the degree matrix D and the Laplace matrix L, the degree matrix D is a diagonal matrix, and its diagonal elements d ii is the sum of the elements of the corresponding row of the similarity matrix S. The relevant calculation formula is as follows:

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

[0028] d ii =∑ j s ij

[0029] L=DS

[0030] Perform eigenvalue decomposition on the Laplace matrix L to obtain the ascending order of all eigenvalues ​​λ1≤λ2≤…, make a difference on the sequence, and determine the maximum value max(|Δλ i |), stack the k eigenvectors corresponding to all previous eigenvalues ​​into an eigenvector matrix U, perform the k-means clustering algorithm on the eigenvector matrix U, divide the historical samples and samples to be predicted into k categories; extract the class containing the samples to be predicted, and use the historical samples in it to form a spectral clustering data subset D c2 ;

[0031] Step 4.4: Subset D of similar day data c1 With the spectral clustering data subset D c2 After fusion and deduplication, the reorganized data set D for the sample to be tested is obtained c =D c1 ∪D c2 .

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

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

[0034] In step 6 above, the Bayesian optimization method is used to optimize the hyperparameters of the prediction model; the hyperparameter combination 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 depth_max∈[3,10] of the regression tree, the minimum number of samples in the node threshold 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 also includes integrating the actual data of the day to be tested into the historical data set to support subsequent predictions.

[0036] After adopting the above scheme, the present invention has the following significant advantages compared with the prior art:

[0037] (1) The present invention fully considers the impact of multiple factors such as time, weather, and traffic on the electricity consumption of highway service areas by integrating multiple data sources, and uses advanced data processing technology for data cleaning and feature engineering to ensure data integrity and the efficiency of model operation.

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

[0039] (3) The present invention 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 THE DRAWINGS

[0040] Figure 1 It is a conceptual framework diagram of the method of the present invention;

[0041] Figure 2 is a histogram of the importance of key features obtained by the feature engineering module in the example of the present invention;

[0042] Figure 3 It is a conceptual framework diagram of the data reorganization module of the method of the present invention;

[0043] Figure 4 It is a comparison chart of some prediction results and actual data in the examples of the present invention. DETAILED DESCRIPTION

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

[0045] First, the basic idea of ​​the invention method is explained: the present invention proposes a single-day load forecasting method for highway service areas based on data mining, including six core modules: data collection, data processing, feature engineering, data reorganization, load forecasting and parameter tuning. By collecting historical daily power load, meteorological, flow and other data of the service area, a prediction framework integrating clustering algorithm, machine learning and parameter tuning is constructed to obtain an estimate of the daily power consumption to be tested, 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 invention are the power load, weather and flow record data of a service area of ​​Nanjing Ring Expressway provided by Nanjing Transportation Industry Group Co., Ltd. The power load data and flow data are respectively derived from the smart meter and flow monitor installed in the service area, and the weather data is derived from the weather monitor installed in the service area, and is checked and calibrated with the weather information published by the local weather station.

[0047] like Figure 1 The framework of the idea of ​​a highway service area daily load forecasting method based on data mining proposed by the present invention is presented below. Figure 1 The method of the present invention is further described. The method of the present invention comprises the following steps:

[0048] Step 1: Based on the target highway service area, execute the data acquisition module to read data from the deployed smart meters, backup power meters, meteorological monitors, traffic counters and other high-precision detection equipment to construct the original data set D0;

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

[0050] In the example of the present invention, the collection field of the load data is the total daily electricity consumption of the highway service area, including the daily electricity consumption summary of various necessary power-consuming facilities such as gas stations, charging piles, communications, lighting, air conditioning, HVAC, catering, backup power supplies, etc.;

[0051] In the example of the present invention, the time data records time attributes, and the collection fields include the season, month, week, and whether it is a public holiday; the meteorological data records key meteorological parameters, and the collection fields include the highest and lowest temperatures, average humidity, rainfall, average atmospheric pressure, atmospheric visibility, and wind speed of the day; the traffic data specifically refers to the statistics of the number of vehicles entering and leaving the service area on the day obtained through the service area traffic 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 to obtain the structured historical data set D s ;

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

[0054] Step 2.1: Identify the missing values ​​of the original data in different attribute fields. When the proportion of missing values ​​in a field exceeds 30%, delete the attribute field and do not use it for subsequent analysis. For null values ​​within the acceptable missing threshold range, if it is time or meteorological data, it is supplemented by querying external data sources such as the National Meteorological Administration, historical weather database, and calendar library; if it is electricity consumption or flow data, it is filled by linear interpolation. The calculation formula of linear interpolation is:

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

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

[0057] Step 2.2: Based on the completed data set, the numerical variables in the electricity consumption, meteorological and flow data are detected for outliers using the box plot method. If the data point exceeds the range [Q1-1.5×IQR, Q3+1.5×IQR], it is determined to be an outlier. Among them, 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, it is preferred to verify them through an external database. If this method is difficult to implement, 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, encode the categorical variables in the data, and convert the information under the season, month, and week fields into binary vectors using one-hot encoding.

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

[0060] Table 1: Data structure after preprocessing

[0061]

[0062]

[0063] Step 3: Based on the historical data set D obtained in step 2 s Execute the feature engineering module and convert the time attribute F T 、Meteorological attributes F W , flow attribute F QAs the candidate feature set F, 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 power consumption prediction. The feature variables whose sum of contribution 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 this embodiment, the feature engineering module in step 3 includes the following specific steps:

[0065] Step 3.1: For the historical dataset D s Perform random sampling with replacement (Bootstrap) to obtain m feature engineering data subsets {Df1, Df2, …, Df m}, each subset contains n structured data samples; in the example of the present invention, m=100, n=400;

[0066] Step 3.2: For each feature engineering data subset Df i , which has a feature set f to be selected i and the result set to be fitted e i , in order to build a regression tree model. The initial root node of the tree contains Df i All data samples in the selected feature set f i Select a conditional feature f i1 , the samples are divided into two parts and stored in two leaf nodes under the root node respectively. This process is called a branch of the regression tree. The arithmetic mean of the sample power consumption in each leaf node is calculated as the result fitting value of the node. Reasonable conditional features are selected to minimize the residual square sum MSE of the samples in the leaf node at each branch. The calculation formula is as follows:

[0067]

[0068] Among them, |node| represents the number of samples in the current node, y k is the actual value of the daily load of the sample in the current node, is the current node's sample single-day load fitting value; node p is the parent node before the branch, node l and node r The left and right child nodes after the branch;

[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 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 reduction in the residual sum of squares of the samples in the node before and after branching is less than the branch condition threshold Δmse_min; In the example of the present invention, depth max =10, sample min =5, Δmse min =0.01;

[0070] For each feature engineering data subset Df i Build 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. The formula is as follows:

[0072]

[0073] where nodes(t) is all the branch nodes in the t-th regression tree, Π(S node =F i ) is the indicator function. If the current node uses feature F i If a branch is made, the value is 1, otherwise it is 0; ΔMSE(node) is the reduction in the residual sum of squares after the node branch. Arrange each feature in descending order of importance, and select the top N features with cumulative importance reaching 90%. f The features constitute the key feature set CF.

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

[0075] Step 4: Obtain the determined value or predicted value of each characteristic variable under the key feature set on the test day, build a similar day model and a spectral clustering model in the data reorganization module, and s Select data samples with similar features from the dataset and fuse them to obtain a reorganized dataset D for the sample to be tested. c ;

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

[0077] Step 4.1: Obtain the confirmed or predicted values ​​of each characteristic variable under the key characteristic set on the test day, Xp The shape of the key characteristic variables on the day to be tested is 1×N f In the present embodiment, N f =15. Among them, the value of the time attribute of the day to be measured is fixed, such as whether it is a holiday, whether it is January, whether it is spring, etc. The value of the meteorological and flow attribute characteristics needs to use weather forecast data and flow estimation. H The shape of N is the value of each sample in the historical data set on the key feature variable d ×1 nested matrix, N d is the number of samples in the historical data set. In the example of the present invention, N d =400,X H Each line in is a row vector X consisting of the values ​​of each key feature variable of a historical daily sample hi .

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

[0079]

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

[0081]

[0082] Among them, x′ is the normalized variable value, x is the original value of the variable, 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 between the sample to be predicted and each historical sample in terms of key features. Use Euclidean distance to measure the similarity between numerical variables, and use indicator function to measure the similarity between categorical variables and 0-1 variables. The calculation formula is as follows:

[0084]

[0085] Among them, n1 and n2 are the number of numerical variables and categorical variables in the key features, respectively, and x′ pj and x′ hijis the value of the test day and the i-th historical sample after normalization on the j-th numerical variable, I(x pk ≠x hik ) is an indicator function, which is 0 when the sample to be predicted and the historical sample have the same value on the kth classification variable, and 1 when they are different;

[0086] According to the similarity Simi(X p ,X hi ) in ascending order, select the 30 samples with the smallest similarity value, and extract their s The original samples corresponding to the similar day data subset D c1 ;

[0087] Step 4.3: Based on the similarity calculation formula in step 4.2, obtain the data reorganization original set D c0 Any two samples X i ,X j The similarity between Simi(X i ,X j ), construct the similarity matrix S; based on the similarity matrix S, construct the degree matrix D and the Laplace matrix L. The degree matrix is ​​a diagonal matrix, and its diagonal elements d ii is the sum of the elements of the corresponding row of the similarity matrix S. The relevant calculation formula is as follows:

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

[0089] d ii =∑ j s ij

[0090] L=DS

[0091] Perform eigenvalue decomposition on the Laplace matrix L to obtain the ascending order of all eigenvalues ​​λ1≤λ2≤…, make a difference on the sequence, and determine the maximum value max(|Δλ i |), stack the k eigenvectors corresponding to all previous eigenvalues ​​into an eigenvector matrix U, and k defines the number of clusters to be clustered in the subsequent k-means clustering algorithm. Each row in the eigenvector matrix U is an embedded representation of the original sample in a low-dimensional space, and the k-means clustering algorithm is executed on it, that is, k samples are randomly selected as cluster centers, and the distance d(x,c i ), the calculation formula is as follows:

[0092]

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

[0094] Classify each sample and the nearest cluster center into one category. After completing the clustering of all samples, recalculate the mean of samples in the same category on each feature variable as the new cluster center. Repeat this operation until the position change before and after the cluster center is updated is less than the set threshold d0, then the clustering ends.

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

[0096] Step 4.4: Subset D of similar day data c1 With the spectral clustering data subset D c2 After fusion and deduplication, the reorganized data set D for the sample to be tested is obtained c :

[0097] D c =D c1 ∪D c2

[0098] Step 5: Reorganize the dataset D based on the characteristics of the sample to be tested obtained in step 4 c , execute the prediction module, build the XGBoost model to fit the mapping of key features to load data, and obtain the predicted value of daily electricity consumption to be tested after model training

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

[0100] Step 5.1: Reorganize the dataset D c The measured load mean of each sample is used as the initial prediction value of the model Calculate the residual between the predicted value and the true value of each sample The formula is as follows:

[0101]

[0102] Among them, n c is the reorganized dataset D c The number of samples in E ci is the measured load of sample i;

[0103] Step 5.2: Take the residuals of each sample obtained after the initial prediction As the target value, the regression tree is constructed, and the root node contains the reorganized data set D c All data samples in , traverse each attribute in the key feature set CF and try to branch the root node; the branching process divides the samples in the parent node into two parts and puts them into two leaf nodes, calculates the gain Gain under each branching method, and selects the feature with the largest gain to complete this branch. The calculation formula of the branch gain Gain is as follows:

[0104]

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

[0106]

[0107] Among them, the loss function It is used to measure the gap between the predicted value and the true value after the kth round of prediction, g i is the loss function The first derivative of i is the loss function The second derivative of L and I R are the sample sets contained in the left and right child nodes after the branch, γ is the regularization coefficient of the total number of nodes in the current regression tree, and its value is generally in the interval [0,10]. λ is the regularization parameter of the predicted value of the bottom leaf node of the current regression tree, and its value is generally in the interval [1,10].

[0108] Repeat the branching operation until one of the following termination conditions for regression tree growth is met: ① 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 branch gain is less than the minimum gain threshold gain_min;

[0109] Update the model's predictions And calculate the new round of residuals The formula is as follows:

[0110]

[0111] Among them, η is the learning rate that represents the contribution of each tree, and the commonly used value range is [0.01, 3], X c is the reorganized dataset D c The value of each sample in the key feature attribute, f1(X c) is the first regression tree for each sample first round residual The predicted value of

[0112] Step 5.3: Based on the residuals obtained after the first regression tree Generate a new regression tree according to step 5.2 and update the model prediction value With the new round of residuals Repeat this process until the forest tree threshold tree_max is reached. The final predicted value of the daily load on the test day is the weighted sum of the prediction results of all regression trees.

[0113]

[0114] The value ranges of the hyperparameters involved in the model in the example of the present invention are as follows: the maximum depth threshold depth_max∈[3,10] of the regression tree, the minimum sample number threshold sample_min∈[1,10] in the node, the number threshold tree_max∈[10,100] of the regression tree, the learning rate threshold η∈[0.01,3], and the hyperparameter selection for each model is implemented by the GridSearchCV function in the sklearn.model_selection module in the Python environment; the comparison results and residuals of the predicted values ​​and true values ​​of some samples in the example of the present invention are as follows Figure 4 shown.

[0115] Step 6: Obtain the actual load value E on the day to be tested p , use the Bayesian optimization method to adjust the hyperparameters of the prediction model, 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 forecasts;

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

[0117] Step 6.1: Set the key characteristic variable X p Compared with the measured value of single-day load E p Integrate into the reorganized dataset D for the sample to be tested c , get the prediction model correction data set D m ;

[0118] Step 6.2: Define the hyperparameter combination to be tuned and its value range. In this example, the hyperparameter combination to be tuned is defined as para={depth_max, sample_min, tree_max, η}. The tuning range of each hyperparameter is 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 threshold of the regression tree 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 the highway service area. The calculation formula is as follows:

[0120]

[0121] Where n m To correct the data set D m The number of data samples in , is the daily load forecast value of the service area on the i-th day, E i It is the measured value of the service area's daily load;

[0122] Randomly select 10 sets of hyperparameter combinations and calculate the corresponding objective function values ​​to obtain the 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 function (RBF) as kernel function κ (para i ,para j ) Construct the kernel matrix K, k ij is the element in the kernel matrix K:

[0124]

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

[0126]

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

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

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

[0130]

[0131] Among them, τ 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 largest expected improvement as the next sampling point, calculate the corresponding objective function value, and update the set of pairs D of hyperparameter combinations and objective function values g .

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

[0134] In summary, the present invention discloses a method for predicting the daily load of a highway service area based on data mining, and the steps include data collection, data processing, feature engineering, data reorganization, load prediction and parameter tuning. The power consumption, weather, time and flow data are collected by smart meters, meteorological monitors, flow counters and other equipment, and the original data are cleaned and integrated. The feature importance is calculated using the random forest method to screen the key features for load prediction, and the historical data subset similar to the characteristics of the day to be measured is extracted in combination with the similar day model and the spectral clustering model for constructing a prediction model. The daily load of the service area is predicted based on the XGBoost algorithm, 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 the load prediction of the highway service area and the robustness of the prediction method, and provides effective technical support for the zero-carbon construction, power resource management and operation efficiency optimization of the service area.

[0135] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0136] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for predicting daily load in highway service areas based on data mining, characterized in that The steps include: Step 1: construct the original data set based on the time, weather, flow and load data read by the detection equipment deployed in the target highway service area; Step 2: Clean and integrate the original data in the original data set to generate a structured historical data set; Step 3, based on the historical data set, calculating the importance of each feature variable and sorting them according to the importance, and screening out a key feature set for single-day load forecasting of highway service areas; Step 4: Based on the determined values ​​or predicted values ​​of each characteristic variable under the key characteristic set of the day to be tested, data samples with similar characteristic performance to the day to be tested are selected from the historical data set, and merged to form a recombined data set for the day to be tested; Step 5: Based on the reorganized data set, fit the mapping of key characteristic variables to load, build a single-day load forecasting model for the expressway service area, and obtain the predicted value of the single-day load on the test day.

2. A method for predicting a highway service area's daily load based on data mining as claimed in claim 1, characterized in that: In step 1, the detection equipment includes a smart meter, a backup power meter, a weather monitor, and a flow counter installed inside the highway service area; the time period for reading data is not less than one year, and the collection frequency is once a day; The load data is the total electricity consumption of the highway service area in a single day; the time data includes the season, month, 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; the traffic data is the number of vehicles entering and leaving the highway service area on that day.

3. A method for predicting a highway service area's daily load based on data mining as claimed in claim 1, characterized in that: The specific process of step 2 is: Step 2.1, identify the missing values ​​of the original data in different attribute fields, delete the attribute field when it exceeds the acceptable missing threshold range, otherwise fill in the empty values; Step 2.2, based on the completed data set, perform outlier detection on the numerical variables in the load, meteorological and flow data, verify the identified outliers, and correct them if they cannot be verified; Step 2.3, based on the corrected data set, encode the categorical variables in the data set to obtain a structured historical data set.

4. A method for predicting a highway service area's daily load based on data mining as claimed in claim 3, characterized in that: In the step 2.1, when the empty value is completed, it is completed by querying the external data source; if it cannot be completed by querying the external data source, linear interpolation is used to fill it.

5. A method for predicting a highway service area's daily load based on data mining as claimed in claim 1, characterized in that: In step 3, time attributes, meteorological attributes, and flow attributes are taken as the feature sets to be selected, and load data is taken 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, and the feature variables whose sum of contribution reaches 90% in descending order are selected as the key feature set for single-day load prediction of highway service areas.

6. A method for predicting a highway service area's daily load based on data mining as claimed in claim 1, characterized in that: The specific process in step 4 is: Step 4.1: Obtain the 1×N matrix consisting of the determined values ​​or predicted values ​​of each characteristic variable under the key characteristic set on the test day. f Row vector X p , X H The shape of each sample in the historical data set under the key feature set is N d ×1 nested matrix, N d is the number of samples in the historical data set, X H Each line in is a row vector X consisting of the values ​​of each key feature variable of a historical daily sample hu ; X p =[x p1 ,x p2 ,…,x pNf ] X p With X H Vertical splicing to obtain the original data set D c0 , D c0 Each row in represents a data sample, and the numerical variables in the key features are normalized one by one; Step 4.2: Calculate the similarity between the sample to be predicted and each historical sample in terms of key features, and calculate the similarity between the historical samples according to the similarity Simi(X p ,X hi ) are arranged in ascending order, and the 30 samples with the smallest similarity values ​​are selected to form the similar day data subset D c1 ; Step 4.3, calculate the similarity Simi(X i ,X j ), construct the similarity matrix S; Based on the similarity matrix S, the degree matrix D and the Laplace matrix L are constructed. The degree matrix D is a diagonal matrix with diagonal elements d ii is the sum of the elements of the corresponding row of the similarity matrix S. The relevant calculation formula is as follows: s ij =Simi(x i ,X j ) d ii =S j s ij L=DS Perform eigenvalue decomposition on the Laplace matrix L to obtain the ascending order of all eigenvalues ​​λ1≤λ2≤…, make a difference on the sequence, and determine the maximum value max(|Δλ i |), stack the k eigenvectors corresponding to all previous eigenvalues ​​into an eigenvector matrix U, perform the k-means clustering algorithm on the eigenvector matrix U, divide the historical samples and samples to be predicted into k categories; extract the class containing the samples to be predicted, and use the historical samples in it to form a spectral clustering data subset D c2 ; Step 4.4: Subset D of similar day data c1 With the spectral clustering data subset D c2 After fusion and deduplication, the reorganized data set D for the sample to be tested is obtained c =D c1 ∪D c2 .

7. A method for predicting daily load of a highway service area based on data mining as claimed in claim 1, characterized in that: In step 5, the prediction model is constructed using the XGBoost algorithm.

8. A method for predicting a highway service area's daily load based on data mining as claimed in claim 1, characterized in that: The method further includes step 6, performing hyperparameter optimization on the prediction model based on the obtained single-day load prediction value and the measured value of the expressway service area.

9. A method for predicting a highway service area's daily load based on data mining as claimed in claim 8, characterized in that: In step 6, the Bayesian optimization method is used to optimize the hyperparameters of the prediction model; the hyperparameter combination 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 depth_max∈[3,10] of the regression tree, the minimum sample number threshold sample_min∈[1,10] in the node, the number threshold tree_max∈[10,100] of the regression tree, and the learning rate threshold η∈[0.01,3].

10. A method for predicting a highway service area's daily load based on data mining as claimed in claim 1, characterized in that: It also includes integrating the actual data of the day to be tested into the historical data set to support subsequent predictions.

Citation Information

Patent Citations

  • Power load prediction method

    CN107016469A

  • Electric power system load prediction method and system based on artificial intelligence algorithm

    CN113657657A

  • High-speed service area energy system short-term load prediction method and system

    CN116341870A

  • Short-term load prediction method and system based on data fusion and deep learning

    CN116957154A

  • Bus ultra-short-term load prediction method and device

    CN117374918A

Cited By

  • Expressway service area electricity consumption prediction method

    CN121031865A