A method for predicting power load based on smart meter communication module
By performing feature extraction and DBSCAN clustering on the power load data, combined with local feature difference calculation, dynamic weight adjustment and local consistency strengthening, the problem of large differences in the clustering results is solved, and more accurate and stable power load prediction is achieved.
Patent Information
- Application Number
- CN202411877130.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-19
AI Technical Summary
There is a great difference in each cluster in the clustering results, which affects the accuracy of the clustering results and leads to an increase in the error in electricity prediction.
By collecting historical electricity load data and influencing factors, extracting electricity consumption feature vectors, clustering using DBSCAN clustering method, local feature difference calculation and dynamic feature weight adjustment, local consistency measurement and strengthening, hierarchical division and hierarchical feature focus in clusters, and finally obtaining the weighted feature matrix and reinforcement matrix, and hierarchical fusion is performed to obtain the final clustering result.
It effectively reduces the differences in the cluster, improves the accuracy and stability of clustering results, and improves the accuracy and robustness of power load prediction.
Smart Images

Figure CN119337160B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electricity consumption prediction, and in particular to an electricity load prediction method based on a smart meter communication module. Background Art
[0002] The functions of the smart meter communication module include real-time data acquisition, remote data transmission, fault diagnosis, remote control, and user power consumption monitoring and analysis, providing accurate data support for load forecasting.
[0003] Electricity load forecasting technology includes the following main methods: regression analysis, time series analysis, neural network model and cluster analysis. Among them, the advantage of clustering model is that it can automatically divide groups according to users' electricity consumption patterns and load characteristics, thereby providing more accurate predictions for different clusters and improving the flexibility and adaptability of the model. However, there may be large differences within the clusters generated by clustering, resulting in inconsistency of data within the same cluster. This difference will affect the accuracy of the clustering results, thereby increasing the error of electricity consumption forecasting.
[0004] Therefore, a power load forecasting method based on smart meter communication module is proposed. Summary of the invention
[0005] The purpose of the present invention is to provide a power load prediction method based on a smart meter communication module, which is used to reduce the differences within each cluster in the clustering results and improve the effect of the clustering results. Collect historical power load data and power influencing factors to extract power feature vectors. Cluster the power feature vectors using the DBSCAN clustering method to obtain a group of clusters. Perform local feature difference calculation and dynamic feature weight adjustment on samples within each cluster to obtain a weighted feature matrix. Perform local consistency measurement and local consistency enhancement on the weighted feature matrix to obtain an enhanced matrix. Perform intra-cluster hierarchical division, hierarchical feature focusing and hierarchical fusion on the enhanced matrix to obtain the final clustering result, and evaluate the clustering result and power load model.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for predicting power load based on a smart meter communication module, comprising:
[0008] Data collection and processing: Collect historical power load data and power consumption influencing factors, and perform data processing and feature extraction on the power consumption influencing factors corresponding to the power load data to obtain a power consumption feature vector;
[0009] Building a power load model: using the power feature vector, clustering is performed based on the power load pattern using the DBSCAN clustering method to obtain a group of clusters, each cluster representing a similar power load pattern;
[0010] Feature adaptive mapping: local feature difference calculation is performed on samples in each cluster to obtain a difference matrix; dynamic feature weight adjustment is performed on the difference matrix to obtain a weighted feature matrix;
[0011] Local consistency enhancement mechanism: perform local consistency measurement on the weighted feature matrix and output a similarity matrix; perform local consistency enhancement on the similarity matrix to obtain an enhanced matrix and remove noise;
[0012] Hierarchical focusing mechanism: perform intra-cluster hierarchical division on the reinforcement matrix to obtain small-level groups; perform hierarchical feature focusing on the small-level groups to obtain local model prediction results within each level; perform hierarchical fusion on each of the local model prediction results to obtain the final clustering result;
[0013] Model evaluation: using the silhouette coefficient to evaluate the clustering result; using the power load data to evaluate the power load model.
[0014] Further, the factors affecting electricity consumption include weather condition data, socio-economic factors, special events and market fluctuation data;
[0015] The data processing process includes missing value processing, outlier processing and duplicate data removal.
[0016] Furthermore, the feature extraction process includes:
[0017] The weather condition data is converted into numerical features on a weekly basis, including average temperature, maximum temperature, minimum temperature, temperature fluctuation range, average humidity, total precipitation, number of days with precipitation, average wind speed and extreme wind speed within the period;
[0018] The socio-economic factors include GDP during the period;
[0019] Use Boolean variables to mark the special events, including whether it is a holiday or whether extreme weather occurs;
[0020] During the period, the market fluctuation data includes the fluctuation range and average electricity price of electricity price;
[0021] All features of the power consumption influencing factors are combined to obtain the power consumption feature vector.
[0022] The specific steps of the DBSCAN clustering method include: determining the domain radius and the minimum number of sample points , the determination method is:
[0023] Since the electricity consumption feature vector contains the characteristics of the four dimensions of the electricity consumption influencing factors, ;
[0024] Each of the power consumption feature vectors is a data point. For each of the data points, the distance from the data point to the nearest The distances of the points are the k nearest neighbors; the k distances of all data points are sorted and a k-distance graph is drawn, where the x-axis is the index of the data point and the y-axis is the distance; the data point with a sudden increase in distance is found in the k-distance graph, and the corresponding distance of the data point is used as the radius of the domain .
[0025] Furthermore, the specific steps of the DBSCAN clustering method also include:
[0026] A data point is selected from all the power consumption feature vectors, and all the data points within the area of the data point with a distance less than The data points are added to the cluster;
[0027] If the number of data points in the neighborhood of the current data point is not less than , then the current data point becomes the core point, and continues to expand its neighborhood, adding more data points, until no more data points are added to the cluster;
[0028] If there are data points that cannot be expanded into clusters, they are marked as noise points;
[0029] Continue to select the next unprocessed data point and repeat the above steps until all data points are processed;
[0030] After clustering is completed, a set of clusters are obtained, each cluster represents a load pattern.
[0031] Furthermore, the process of calculating the local feature difference is: using cosine similarity to calculate the feature difference between each pair of samples in the cluster, and outputting the difference matrix;
[0032] The process of dynamic feature weight adjustment is: in the difference matrix, different weights are assigned to different features to obtain a weighted feature matrix.
[0033] Furthermore, the specific process of the local consistency measurement is: using the Euclidean distance to calculate the similarity between samples in the cluster to obtain the similarity matrix;
[0034] The specific process of the local consistency enhancement is: according to the similarity matrix, the similarity is converted into an enhancement factor, the feature is enhanced, and the enhancement matrix is obtained.
[0035] Furthermore, the specific steps of the intra-cluster hierarchical division are:
[0036] The weighted cosine similarity is used to further calculate the similarity between the features of the reinforcement matrix, and the similarity interval is divided according to the similarity, so as to obtain the small-level group.
[0037] Furthermore, the specific steps of the hierarchical feature focusing are:
[0038] Using a local model to train and predict each small level in the small level group, so that the load pattern of each small level is accurately fitted, and the prediction result of the local model in each level is obtained;
[0039] Each local model prediction result is hierarchically fused to obtain the final clustering result.
[0040] Furthermore, the power load of each cluster of the clustering result is calculated to obtain a predicted power load, and the predicted power load is compared with the power load data to measure the effect of the clustering result.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. The present invention calculates the local feature differences between samples through feature adaptive mapping and performs dynamic weight adjustment, which can effectively enhance the data discrimination and prediction accuracy. By weighted processing of the difference matrix, key features can be highlighted and the interference of noise features can be suppressed, so that subsequent models can better capture the potential patterns and trends in the data that affect the power load, thereby improving the accuracy of load prediction.
[0043] 2. The present invention uses local consistency enhancement to measure the similarity of samples within a cluster and enhance similar features, which helps to improve the stability and consistency of clustering results. After the features with high similarity are enhanced, it helps to more accurately identify the similarities between load patterns, remove noise, ensure that the model's prediction is more robust, reduce errors, and improve the reliability of clustering results.
[0044] 3. The present invention divides the reinforcement matrix into layers by using a hierarchical focusing mechanism, which can finely process data features at different levels. The local model in each small-level group can fit a specific pattern more accurately, thereby improving the local adaptability of the model. After hierarchical fusion, the final result can integrate information from each level and optimize the overall clustering effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A method flow chart of a method for predicting power load based on a smart meter communication module of the present invention;
[0046] Figure 2It is a flow chart of the feature adaptive mapping of the present invention;
[0047] Figure 3 It is a flow chart of the local consistency strengthening mechanism of the present invention;
[0048] Figure 4 It is a flow chart of the hierarchical focusing mechanism of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] In order to reduce the differences within each cluster in the clustering results and improve the effect of the clustering results, the present invention provides a method for predicting power load based on a smart meter communication module. In order to illustrate the effect of the present invention, the effectiveness of the present invention will be illustrated from the following examples.
[0051] Embodiment 1
[0052] Company A in the field of electric energy metering is committed to the research and development and production of products such as smart meters and power consumption information collection systems. Among them, the power consumption information collection system collects data based on the communication module of the smart meter and predicts the power load, helping power grid dispatchers to respond to demand, regulate power supply, optimize power dispatch, and reduce power grid load fluctuations. The power consumption information collection system adopts a power load prediction method based on the communication module of the smart meter. Figure 1 , a method flow chart of a power load prediction method based on a smart meter communication module is shown.
[0053] Reference Figure 1 Step S01 in the data collection and processing: collect historical power load data and power consumption influencing factors, and perform data processing and feature extraction on the power consumption influencing factors corresponding to the power load data to obtain a power consumption feature vector.
[0054] Specifically, the factors affecting electricity consumption include weather condition data, socio-economic factors, special events and market fluctuation data; the data processing process includes missing value processing, outlier processing and duplicate data removal.
[0055] Through these multi-dimensional data inputs, the forecasting model can more accurately reflect the changing patterns of load demand.
[0056] Furthermore, the feature extraction process includes:
[0057] The weather condition data is converted into numerical features on a weekly basis, including average temperature, maximum temperature, minimum temperature, temperature fluctuation range, average humidity, total precipitation, number of days with precipitation, average wind speed and extreme wind speed within the period;
[0058] The socioeconomic factors include the GDP in the period; the GDP in the period is standardized to the range of [0,1], that is, ,in, represents the standardized GDP, Indicates the maximum value operation;
[0059] Use Boolean variables to mark the special events, including whether it is a holiday or whether extreme weather occurs;
[0060] During the period, the market fluctuation data includes the fluctuation range and average electricity price of electricity price;
[0061] All features of the power consumption influencing factors are combined to obtain the power consumption feature vector.
[0062] Through reasonable data cleaning and feature extraction methods, complex raw data can be converted into numerical, standardized and periodic feature vectors, which can be used as inputs for the power load model. The processed data can not only capture the multi-dimensional characteristics of the power load, but also enhance the adaptability of the model to different factors.
[0063] Further, refer to Figure 1 Step S02 in the example, building a power load model: using the power consumption feature vector, clustering is performed based on the power consumption load pattern using the DBSCAN clustering method to obtain a group of clusters, each cluster representing a similar power consumption load pattern.
[0064] Specifically, the specific steps of the DBSCAN clustering method include: determining the domain radius and the minimum number of sample points , the determination method is:
[0065] Since the electricity consumption feature vector contains the characteristics of the four dimensions of the electricity consumption influencing factors, , in this embodiment, Set to 7;
[0066] Each of the power consumption feature vectors is a data point. For each of the data points, the distance from the data point to the nearest The distances of the points are the k nearest neighbors; the k distances of all data points are sorted and a k-distance graph is drawn, where the x-axis is the index of the data point and the y-axis is the distance; the data point with a sudden increase in distance is found in the k-distance graph, and the distance corresponding to the data point is used as the radius of the domain The radius of the field Usually corresponds to the position of the "inflection point" in the graph, indicating a sharp increase in distance, and usually the distance after this point increases very quickly. and the minimum number of sample points With these two parameters, DBSCAN can better handle clusters of different densities and effectively identify noise points.
[0067] Furthermore, the specific steps of the DBSCAN clustering method also include:
[0068] A data point is selected from all the power consumption feature vectors, and all the neighbors within the neighborhood of the data point whose distance is less than The data points are added to the cluster;
[0069] If the number of data points in the neighborhood of the current data point is not less than , then the current data point becomes the core point, and continues to expand its neighborhood, adding more data points, until no more data points are added to the cluster;
[0070] If there are data points that cannot be expanded into clusters, they are marked as noise points;
[0071] Continue to select the next unprocessed data point and repeat the above steps until all data points are processed;
[0072] After clustering is completed, a group of clusters are obtained, each cluster represents a load mode. In this embodiment, 5 clusters are obtained, as shown in Table 1, which shows the clustering results.
[0073] Table 1 Clustering results
[0074]
[0075] Among them, Cluster 1 shows an obvious high load during the high temperature period in summer, which is mainly affected by the use of air conditioning and has a large demand for electricity; Cluster 2 shows a high load during the cold weather period in winter, which is mainly affected by the heating load; Cluster 3 mainly includes the load patterns at noon and in the evening on weekdays, which are usually the peak periods of industrial and commercial electricity consumption, especially for office buildings, restaurants, shops and other places with large electricity demand; Cluster 4 corresponds to the load pattern of weekends and holidays. Due to the reduction of most industrial and commercial activities, users' electricity demand is low, showing an obvious low load feature; Cluster 5 represents the alternating period between spring and autumn. In these seasons, the electricity demand changes little, and the air conditioning and heating loads are low, which are mainly the loads of household appliances and basic living electricity.
[0076] DBSCAN can automatically identify high-density areas in the data and divide these areas into clusters without setting the number of clusters in advance. In addition, DBSCAN can effectively handle noise and outliers, avoiding the interference of these data points on the clustering results. DBSCAN is particularly suitable for identifying load patterns with obvious density characteristics in power load data, so as to accurately classify similar load patterns into the same category.
[0077] Further, refer to Figure 1 Step S03 in the method is feature adaptive mapping: local feature difference calculation is performed on samples in each cluster to obtain a difference matrix; dynamic feature weight adjustment is performed on the difference matrix to obtain a weighted feature matrix. Figure 2 , showing the process structure diagram of feature adaptive mapping.
[0078] Specifically, the process of calculating the local feature difference is: using cosine similarity to calculate the feature difference between each pair of samples in the cluster, and outputting the difference matrix; the specific calculation formula is expressed as:
[0079] ;
[0080] in, and represents any two samples in the cluster; Represents the cosine similarity between any two samples in the cluster; and The samples are and The corresponding eigenvector; dot product of eigenvectors; and is the eigenvector and of Norm.
[0081] According to cosine similarity Calculate the difference matrix , the difference matrix Each element in Representation sample and The difference measure between them is calculated as:
[0082] ;
[0083] The difference matrix The range of each element in is [0,2], and larger values indicate greater differences.
[0084] The process of dynamic feature weight adjustment is: in the difference matrix In , different weights are assigned to different features to obtain a weighted feature matrix. Specifically:
[0085] Suppose the feature vector of each sample is ,in, represents the dimension of the feature vector, and each feature The weight is , and obtain the weighted feature matrix , the calculation formula is:
[0086] ;
[0087] Among them, the weight The calculation method is:
[0088] For each feature , calculate the degree of difference among all samples in the cluster :
[0089] ;
[0090] in, Indicates the number of samples in the cluster.
[0091] According to the degree of difference Features Assign a weight :
[0092] ;
[0093] in, Represents a constant to prevent the denominator from being zero.
[0094] The accuracy of clustering results can be effectively enhanced by calculating local feature differences and dynamically adjusting feature weights. By calculating the differences between samples within a cluster and adjusting feature weights based on the differences, the impact of important features can be highlighted and the interference of noise or irrelevant features can be suppressed. This helps to better capture subtle differences in power consumption behavior in the clustering of load patterns, thereby improving the consistency and reliability of clustering results.
[0095] Further, refer to Figure 1 Step S04 in the local consistency enhancement mechanism: perform local consistency measurement on the weighted feature matrix and output a similarity matrix; perform local consistency enhancement on the similarity matrix to obtain an enhanced matrix and remove noise. Figure 3 , showing the process structure diagram of the local consistency enforcement mechanism.
[0096] Specifically, the specific process of the local consistency measurement is: using the Euclidean distance to calculate the similarity between samples in the cluster to obtain the similarity matrix. and , whose weighted eigenvectors are and ,in, and ; then its Euclidean distance The calculation formula is as follows:
[0097] ;
[0098] in, and For sample and In the The weighted value of each feature; Represents the dimension of the feature.
[0099] Similarity Matrix Each element in According to the Euclidean distance To convert, the calculation formula is:
[0100] ;
[0101] in, Representation sample and The larger the value, the more similar they are.
[0102] The specific process of the local consistency enhancement is: according to the similarity matrix, the similarity is converted into an enhancement factor, the feature is enhanced, and the enhancement matrix is obtained. , for each pair of samples and Calculating the reinforcement factor , the calculation formula is:
[0103] ;
[0104] in, Indicates the number of samples in the cluster.
[0105] According to each sample , according to the reinforcement factor Weight its features to get the reinforcement matrix ,Right now:
[0106] ;
[0107] The resulting reinforcement matrix Perform denoising.
[0108] The similarity of samples within a cluster is calculated by Euclidean distance, and a similarity matrix is generated, which can accurately capture the relationship between samples. Then, by strengthening the features with high similarity, the strengthening matrix can highlight the commonalities between similar samples and suppress the interference of noise or irrelevant features. This process effectively reduces the differences between samples within a cluster and improves the consistency of each cluster, thereby improving the quality of clustering results and providing more accurate input for subsequent hierarchical feature focusing.
[0109] Further, refer to Figure 1 Step S05 in , hierarchical focusing mechanism: perform intra-cluster hierarchical division of the reinforcement matrix to obtain small-level groups; perform hierarchical feature focusing on the small-level groups to obtain local model prediction results within each level; perform hierarchical fusion on each local model prediction result to obtain the final clustering result. Figure 4 , showing the process structure diagram of the hierarchical focusing mechanism.
[0110] Specifically, the specific steps of the intra-cluster hierarchical division are:
[0111] Since the reinforcement matrix After weighted processing, the weighted cosine similarity is used to further calculate the similarity between the features of the reinforcement matrix to obtain the similarity . Set a set of thresholds for the similarity ,in , , , , Indicates the maximum value operation. According to this set of thresholds, the samples are divided into 4 levels, so as to obtain the small level group .
[0112] Similarity interval division can handle the similarity between samples more carefully, ensuring that samples with different similarity levels are correctly divided into corresponding small-level groups, providing a more accurate group division basis for subsequent local model training and hierarchical fusion.
[0113] Furthermore, the specific steps of the hierarchical feature focusing are:
[0114] For the small group Each small level in the model is trained and predicted using a local model, so that the load pattern of each small level is accurately fitted, and the prediction results of the local model in each level are obtained. Specifically, ,in, Indicates A small group of people, ; Indicates the sample number. For each small stratum group , train a local model To fit the load pattern within the group. Assume that each sub-level group has samples, and the input features are , the target variable is , the training of the local model can be expressed as:
[0115] ;
[0116] in, Represents a mathematical function, taking the minimum value operation; Representation sample In the group Through the model Predicted load values; Representation sample In the group The actual load value in .
[0117] Using Local Models Predict each sample and get the prediction results within each small level group ,Right now .
[0118] Perform hierarchical fusion on each local model prediction result to obtain the final clustering result , the calculation formula is:
[0119] ;
[0120] in, The weight of each sub-group is set according to the ratio of the number of samples in the sub-group to the total number of samples in the cluster.
[0121] Through intra-cluster hierarchical division and hierarchical feature focusing, the clustering results can be further refined to improve the accuracy and stability of the model. The weighted cosine similarity is used to calculate the similarity of the reinforcement matrix to ensure that the load pattern of each small-level group is more accurate, avoiding the problem of over-generalization within the large cluster. At the same time, hierarchical fusion can effectively integrate the prediction results of local models at different levels, making the overall clustering results more consistent with the law of actual power load changes, and improving the accuracy and robustness of power load prediction.
[0122] Further, refer to Figure 1 Step S06 in , model evaluation: using silhouette coefficient to evaluate the clustering result; using power load data to evaluate the power load model.
[0123] Specifically, in each cluster in the clustering result, calculate each data point in the cluster The average distance to all other points , and calculate the average distance from the data point to all points in the nearest other clusters , then the data point The silhouette coefficient is:
[0124] ;
[0125] in, Represents data points The silhouette coefficient.
[0126] Furthermore, the silhouette coefficients of all data points are calculated, and the average of the silhouette coefficients of all data points is taken as the silhouette coefficient of the entire clustering result, then:
[0127] ;
[0128] in, Indicates the number of data points; Represents the silhouette coefficient of the entire clustering result.
[0129] Furthermore, since each cluster of the clustering results has a similar power consumption pattern, the representative power load of each cluster is the average value of all sample power loads in each cluster. The representative power load is compared with the historical power load data, that is, compared with the real power load data, to obtain the error. The error is used to evaluate the rationality of the clustering results, and the representative power load corresponding to the clustering results can be used as the predicted power load.
[0130] By taking the average load of samples within a cluster as a representative, the complex power load pattern can be simplified to the average load of each cluster, making it easier to evaluate whether the clustering model effectively identifies different power consumption patterns.
[0131] The power load prediction method based on the smart meter communication module used in this embodiment can effectively reduce the differences within the cluster and improve the clustering accuracy by combining DBSCAN clustering and multi-level feature processing. First, through feature extraction and data processing, the power consumption characteristics are accurately extracted to ensure the accurate division of the power load pattern. Secondly, local consistency enhancement and feature adaptive mapping help to improve the fineness of clustering and reduce noise interference. The hierarchical focusing mechanism further refines the prediction ability of the model, so that the local features of each level can be fully utilized, and ultimately improves the accuracy and reliability of power load prediction. In addition, the model evaluation link helps to verify the superiority of the clustering effect through multi-indicator evaluation.
[0132] Embodiment 2
[0133] The developer of a B energy management platform provides power companies with integrated renewable energy management and load forecasting solutions, so it is necessary to optimize the balance of power supply and demand to avoid power waste or power shortage. The developer of a B energy management platform uses a power load forecasting method based on a smart meter communication module.
[0134] The method includes data collection and processing: collecting historical power load data and power consumption influencing factors, and performing data processing and feature extraction on the power consumption influencing factors corresponding to the power load data to obtain a power consumption feature vector.
[0135] Specifically, the factors affecting electricity consumption include weather condition data, socio-economic factors, special events and market fluctuation data; the data processing process includes missing value processing, outlier processing and duplicate data removal.
[0136] Furthermore, the feature extraction process includes:
[0137] The weather condition data is converted into numerical features on a weekly basis, including average temperature, maximum temperature, minimum temperature, temperature fluctuation range, average humidity, total precipitation, number of days with precipitation, average wind speed and extreme wind speed within the period;
[0138] The socioeconomic factors include the GDP in the period; the GDP in the period is standardized to the range of [0,1], that is, ,in, represents the standardized GDP, Indicates the maximum value operation;
[0139] Use Boolean variables to mark the special events, including whether it is a holiday or whether extreme weather occurs;
[0140] During the period, the market fluctuation data includes the fluctuation range and average electricity price of electricity price;
[0141] All features of the power consumption influencing factors are combined to obtain the power consumption feature vector.
[0142] The method also includes building an electricity load model: using electricity feature vectors, using the DBSCAN clustering method to cluster based on the electricity load pattern, to obtain a group of clusters, each cluster represents a similar electricity load pattern.
[0143] Specifically, the specific steps of the DBSCAN clustering method include: determining the domain radius and the minimum number of sample points , the determination method is:
[0144] Since the electricity consumption feature vector contains the characteristics of the four dimensions of the electricity consumption influencing factors, , in this embodiment, Set to 5;
[0145] Each of the power consumption feature vectors is a data point. For each of the data points, the distance from the data point to the nearest The distances of the points are the k nearest neighbors; the k distances of all data points are sorted and a k-distance graph is drawn, where the x-axis is the index of the data point and the y-axis is the distance; the data point with a sudden increase in distance is found in the k-distance graph, and the distance corresponding to the data point is used as the radius of the domain The radius of the field It usually corresponds to the position of the "inflection point" in the graph, indicating a sharp increase in distance, and usually the distance after this point grows very quickly.
[0146] Furthermore, the specific steps of the DBSCAN clustering method also include:
[0147] A data point is selected from all the power consumption feature vectors, and all the neighbors within the neighborhood of the data point whose distance is less than The data points are added to the cluster;
[0148] If the number of data points in the neighborhood of the current data point is not less than , then the current data point becomes the core point, and continues to expand its neighborhood, adding more data points, until no more data points are added to the cluster;
[0149] If there are data points that cannot be expanded into clusters, they are marked as noise points;
[0150] Continue to select the next unprocessed data point and repeat the above steps until all data points are processed;
[0151] After clustering is completed, a group of clusters are obtained, each cluster represents a load mode. In this embodiment, 6 clusters are obtained, as shown in Table 2, which shows the clustering results.
[0152] Table 2 Clustering results
[0153]
[0154] Among them, Cluster 1 usually occurs in the mornings of weekdays, especially in office areas and commercial areas, where electricity demand increases; Cluster 2 usually occurs in the late night, when most industrial and commercial activities stop and most households have low electricity demand, showing an obvious load trough; Cluster 3 is a load pattern for special weather phenomena. For example, air conditioning and heating loads may be low during heavy rain, but the loads of other equipment such as drainage equipment, emergency lighting and electric pumps may increase; Cluster 4 represents certain holidays, such as the Spring Festival and National Day, during which temporary load peaks may occur, especially in large-scale activities, celebrations and travel; Cluster 5 represents the load pattern under extreme weather conditions, especially the impact of continuous high temperature weather on air conditioning load; Cluster 6 represents the load pattern during the seasonal transition period. The sudden change in temperature leads to frequent changes in heating and air conditioning loads, especially in the transition period between autumn and winter and winter and spring, when the load of household appliances and basic living electricity consumption fluctuate greatly.
[0155] The method also includes feature adaptive mapping: performing local feature difference calculation on samples in each cluster to obtain a difference matrix; and performing dynamic feature weight adjustment on the difference matrix to obtain a weighted feature matrix.
[0156] Specifically, the process of calculating the local feature difference is: using cosine similarity to calculate the feature difference between each pair of samples in the cluster, and outputting the difference matrix; the specific calculation formula is expressed as:
[0157] ;
[0158] in, and represents any two samples in the cluster; Represents the cosine similarity between any two samples in the cluster; and The samples are and The corresponding eigenvector; dot product of eigenvectors; and is the eigenvector and of Norm.
[0159] According to cosine similarity Calculate the difference matrix , the difference matrix Each element in Representation sample and The difference measure between them is calculated as:
[0160] ;
[0161] The difference matrix The range of each element in is [0,2], and larger values indicate greater differences.
[0162] The process of dynamic feature weight adjustment is: in the difference matrix In , different weights are assigned to different features to obtain a weighted feature matrix. Specifically:
[0163] Suppose the feature vector of each sample is ,in, represents the dimension of the feature vector, and each feature The weight is , and obtain the weighted feature matrix , the calculation formula is:
[0164] ;
[0165] Among them, the weight The calculation method is:
[0166] For each feature , calculate the degree of difference among all samples in the cluster :
[0167] ;
[0168] in, Indicates the number of samples in the cluster.
[0169] According to the degree of difference Features Assign a weight :
[0170] ;
[0171] in, Represents a constant to prevent the denominator from being zero.
[0172] The method also includes a local consistency enhancement mechanism: performing local consistency measurement on the weighted feature matrix and outputting a similarity matrix; performing local consistency enhancement on the similarity matrix to obtain an enhanced matrix and remove noise.
[0173] Specifically, the specific process of the local consistency measurement is: using the Euclidean distance to calculate the similarity between samples in the cluster to obtain the similarity matrix. and , whose weighted eigenvectors are and ,in, and ; then its Euclidean distance The calculation formula is as follows:
[0174] ;
[0175] in, and For sample and In the The weighted value of each feature; Represents the dimension of the feature.
[0176] Similarity Matrix Each element in According to the Euclidean distance To convert, the calculation formula is:
[0177] ;
[0178] in, Representation sample and The larger the value, the more similar they are.
[0179] The specific process of the local consistency enhancement is: according to the similarity matrix, the similarity is converted into an enhancement factor, the feature is enhanced, and the enhancement matrix is obtained. , for each pair of samples and Calculating the reinforcement factor , the calculation formula is:
[0180] ;
[0181] in, Indicates the number of samples in the cluster.
[0182] According to each sample , according to the reinforcement factor Weight its features to get the reinforcement matrix ,Right now:
[0183] ;
[0184] The resulting reinforcement matrix Perform denoising.
[0185] The method also includes a hierarchical focusing mechanism: hierarchical division of the reinforcement matrix within the cluster to obtain small-level groups; hierarchical feature focusing on the small-level groups to obtain local model prediction results within each level; hierarchical fusion of each local model prediction result to obtain the final clustering result.
[0186] Specifically, the specific steps of the intra-cluster hierarchical division are:
[0187] Since the reinforcement matrix After weighted processing, the weighted cosine similarity is used to further calculate the similarity between the features of the reinforcement matrix to obtain the similarity . Set a set of thresholds for the similarity ,in , , , , Indicates the maximum value operation. According to this set of thresholds, the samples are divided into 4 levels, so as to obtain the small level group .
[0188] Furthermore, the specific steps of the hierarchical feature focusing are:
[0189] For the small group Each small level in the model is trained and predicted using a local model, so that the load pattern of each small level is accurately fitted, and the prediction results of the local model in each level are obtained. Specifically, ,in, Indicates A small group of people, ; Indicates the sample number. For each small stratum group , train a local model To fit the load pattern within the group. Assume that each sub-level group has samples, and the input features are , the target variable is , the training of the local model can be expressed as:
[0190] ;
[0191] in, Represents a mathematical function, taking the minimum value operation; Representation sample In the group Through the model Predicted load values; Representation sample In the group The actual load value in .
[0192] Using Local Models Predict each sample and get the prediction results within each small level group ,Right now .
[0193] Perform hierarchical fusion on each local model prediction result to obtain the final clustering result , the calculation formula is:
[0194] ;
[0195] in, The weight of each sub-group is set according to the ratio of the number of samples in the sub-group to the total number of samples in the cluster.
[0196] The method also includes model evaluation: using silhouette coefficient to evaluate clustering results; using power load data to evaluate the power load model.
[0197] Specifically, in each cluster in the clustering result, calculate each data point in the cluster The average distance to all other points , and calculate the average distance from the data point to all points in the nearest other clusters , then the data point The silhouette coefficient is:
[0198] ;
[0199] in, Represents data points The silhouette coefficient.
[0200] Furthermore, the silhouette coefficients of all data points are calculated, and the average of the silhouette coefficients of all data points is taken as the silhouette coefficient of the entire clustering result, then:
[0201] ;
[0202] in, Indicates the number of data points; Represents the silhouette coefficient of the entire clustering result.
[0203] Furthermore, since each cluster of the clustering results has a similar power consumption pattern, the representative power load of each cluster is the average value of all sample power loads in each cluster. The representative power load is compared with the historical power load data, that is, compared with the real power load data, to obtain the error. The error is used to evaluate the rationality of the clustering results, and the representative power load corresponding to the clustering results can be used as the predicted power load.
[0204] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for predicting power load based on a smart meter communication module, characterized in that: include: Data collection and processing: Collect historical power load data and power consumption influencing factors, and perform data processing and feature extraction on the power consumption influencing factors corresponding to the power load data to obtain a power consumption feature vector; Building a power load model: using the power feature vector, clustering is performed based on the power load pattern using the DBSCAN clustering method to obtain a group of clusters, each cluster representing a similar power load pattern; Feature adaptive mapping: local feature difference calculation is performed on samples in each cluster to obtain a difference matrix; dynamic feature weight adjustment is performed on the difference matrix to obtain a weighted feature matrix; Local consistency enhancement mechanism: perform local consistency measurement on the weighted feature matrix and output a similarity matrix; perform local consistency enhancement on the similarity matrix to obtain an enhanced matrix and remove noise; Hierarchical focusing mechanism: perform intra-cluster hierarchical division on the reinforcement matrix to obtain small-level groups; perform hierarchical feature focusing on the small-level groups to obtain local model prediction results within each level; perform hierarchical fusion on each of the local model prediction results to obtain the final clustering result; Model evaluation: Use the silhouette coefficient to evaluate the clustering results; The power load model is evaluated using the power load data.
2. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The factors affecting electricity consumption include weather conditions data, socio-economic factors, special events and market fluctuation data; The data processing process includes missing value processing, outlier processing and duplicate data removal.
3. The method for predicting power load based on a smart meter communication module according to claim 2, characterized in that: The feature extraction process includes: The weather condition data is converted into numerical features on a weekly basis, including average temperature, maximum temperature, minimum temperature, temperature fluctuation range, average humidity, total precipitation, number of days with precipitation, average wind speed and extreme wind speed within the period; The socio-economic factors include GDP during the period; Use Boolean variables to mark the special events, including whether it is a holiday or whether extreme weather occurs; During the period, the market fluctuation data includes the fluctuation range and average electricity price of electricity price; All features of the power consumption influencing factors are combined to obtain the power consumption feature vector.
4. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The specific steps of the DBSCAN clustering method include: determining the domain radius and the minimum number of sample points , the determination method is: Since the electricity consumption feature vector contains the characteristics of the four dimensions of the electricity consumption influencing factors, ; Each of the power consumption feature vectors is a data point. For each of the data points, the distance from the data point to the nearest The distances of the points are the k nearest neighbors; the k distances of all data points are sorted and a k-distance graph is drawn, where the x-axis is the index of the data point and the y-axis is the distance; the data point with a sudden increase in distance is found in the k-distance graph, and the distance corresponding to the data point is used as the radius of the domain .
5. The method for predicting power load based on a smart meter communication module according to claim 4, characterized in that: The specific steps of the DBSCAN clustering method also include: A data point is selected from all the power consumption feature vectors, and all the neighbors within the neighborhood of the data point whose distance is less than The data points are added to the cluster; If the number of data points in the neighborhood of the current data point is not less than , then the current data point becomes the core point, and continues to expand its neighborhood, adding more data points, until no more data points are added to the cluster; If there are data points that cannot be expanded into clusters, they are marked as noise points; Continue to select the next unprocessed data point and repeat the above steps until all data points are processed; After clustering is completed, a set of clusters is obtained, each cluster represents a load pattern.
6. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The process of calculating the local feature difference is: using cosine similarity to calculate the feature difference between each pair of samples in the cluster, and outputting the difference matrix; The process of dynamic feature weight adjustment is: in the difference matrix, different weights are assigned to different features to obtain a weighted feature matrix.
7. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The specific process of the local consistency measurement is: using the Euclidean distance to calculate the similarity between samples in the cluster to obtain the similarity matrix; The specific process of the local consistency enhancement is: according to the similarity matrix, the similarity is converted into an enhancement factor, the feature is enhanced, and the enhancement matrix is obtained.
8. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The specific steps of the intra-cluster hierarchical division are: The weighted cosine similarity is used to further calculate the similarity between the features of the reinforcement matrix, and the similarity interval is divided according to the similarity, so as to obtain the small-level group.
9. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The specific steps of the hierarchical feature focusing are: Using a local model to train and predict each small level in the small level group, so that the load pattern of each small level is accurately fitted, and the prediction result of the local model in each level is obtained; Each local model prediction result is hierarchically fused to obtain the final clustering result.
10. The method for predicting power load based on a smart meter communication module according to claim 1, characterized in that: The power load of each cluster of the clustering result is calculated to obtain the predicted power load, and the predicted power load is compared with the power load data to measure the effect of the clustering result.
Citation Information
Patent Citations
Ultra-short-term prediction method and system for wind condition of wind power plant, medium and computer equipment
CN117578400A
Photovoltaic power prediction method and system based on clustering and hybrid neural network
CN119134336A