A load forecasting method and system for cold region integrated energy grid
By obtaining training samples and reference power load data for local reference time periods in the cold-land comprehensive energy grid, using AdaBoost algorithm and neural network technology, the problems of overfitting and underfitting in the existing prediction methods are solved, and the more Accurate power load data prediction.
Patent Information
- Application Number
- CN202411327834.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Existing methods can easily lead to overfitting or underfitting when predicting the power load data of the comprehensive energy grid in cold areas, resulting in inaccurate predictions.
By obtaining the training samples and reference power load data for each local reference time period, the training samples are processed using the AdaBoost algorithm, the first importance value of each reference data is obtained, and the final importance value is selected according to the base classifier matching pair. Finally, the power load data is predicted through the neural network.
The analysis efficiency and accuracy of the degree of influence on each reference data is improved, and the accurate prediction of power load data is ensured, which helps the stable operation and optimized scheduling of the cold-land integrated energy grid.
Smart Images

Figure CN118868083B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid control, and in particular to a load forecasting method and system for a cold-region integrated energy power grid. Background Art
[0002] By predicting the power load data, it is beneficial for the cold-region integrated energy grid to regulate the future power demand, ensure the stable operation of the cold-region integrated energy grid, and avoid problems caused by insufficient or excessive power supply. In the existing method, the power load data in the cold-region integrated energy grid is predicted by fitting the historical power load data in the cold-region integrated energy grid by the least square method. However, in actual situations, there are many factors that affect the power load data. For example, various meteorological conditions such as temperature, wind speed, and solar radiation intensity will affect the power load data. If the least square method is directly fitted to the historical power load data, it is easy to cause overfitting or underfitting, which in turn leads to inaccurate predicted power load data, and the power situation in the cold-region integrated energy grid cannot be accurately obtained, which is not conducive to the accurate adjustment of the power by the cold-region integrated energy grid. Summary of the invention
[0003] In order to solve the technical problem that directly fitting the historical power load data in the cold-region integrated energy grid by the least square method easily leads to overfitting or underfitting, thereby causing inaccurate predicted power load data, the purpose of the present invention is to provide a load prediction method and system for the cold-region integrated energy grid, and the technical scheme adopted is as follows:
[0004] A first aspect of the present invention provides a load forecasting method for a cold region integrated energy grid, the method comprising the following steps:
[0005] Obtaining each type of reference data of the cold-region integrated energy grid at each moment within a preset time period; wherein the reference data includes power load data;
[0006] According to the distribution of reference data in each local reference time period preset in the preset time period, a training sample of each local reference time period and reference power load data of each training sample are obtained;
[0007] The training samples are processed by the AdaBoost algorithm, and the first importance value of each reference data in each base classifier is obtained according to the similarity between the training power load data and the reference power load data of each training sample in each base classifier, and the feature distribution of each reference data in each base classifier;
[0008] According to the change of the weight of the training samples between adjacent base classifiers, base classifier matching pairs are screened out; according to the size and similarity of the first importance value of each reference data in each base classifier matching pair, the final importance value of each reference data is obtained;
[0009] According to each reference data at each moment in a preset time period and the final importance value of each reference data, as well as the power load data at the next adjacent moment, a neural network for predicting power load data is trained; the power load data at each moment is predicted through the trained neural network for predicting power load data.
[0010] Furthermore, the method for obtaining the local reference time period is:
[0011] Fitting the power load data within a preset time period into a power load curve, and dividing the power load curve into local curves according to the fluctuation of the power load curve;
[0012] Obtaining the variance of the electric load data in each local curve as the first variance of the corresponding local curve;
[0013] When the first variance is less than a preset fluctuation threshold, the local time period corresponding to the local curve is used as the local reference time period.
[0014] Furthermore, the method for obtaining the training samples of each local reference time period and the reference power load data of each training sample is:
[0015] The mean of each reference data in each local reference time period is constructed into an array as a training sample for each local reference time period;
[0016] The mean value of all the power load data in the local reference time period corresponding to each training sample is used as the reference power load data of each training sample.
[0017] Furthermore, the method for obtaining the first importance value is:
[0018] For any base classifier, obtain the difference between the training power load data and the reference power load data of each training sample in the base classifier, and use them as the first difference;
[0019] Obtaining the number of all first differences greater than a preset first difference threshold as the number of errors in the training samples of the base classifier;
[0020] The ratio of the number of errors in the training samples to the total number of training samples is used as the error rate of the base classifier;
[0021] Obtain the order in which each reference data in the base classifier is used as a classification feature and label them from small to large, and determine the classification feature sequence number of each reference data in the base classifier;
[0022] According to the classification feature sequence number of each reference data in the base classifier and the error rate, a first importance value of each reference data in the base classifier is obtained.
[0023] Furthermore, the method for obtaining the first importance value is:
[0024] For any base classifier, the classification feature number of each reference data in the base classifier is negatively correlated and the normalized result is positively correlated with the first importance value of the corresponding reference data in the base classifier;
[0025] The error rate of the base classifier is negatively correlated with the first importance value of each reference data in the base classifier.
[0026] Furthermore, the method for obtaining the base classifier matching pair is:
[0027] Cluster the weights of the training samples in each base classifier to obtain the weight clustering clusters in each base classifier;
[0028] The center weight of the weight cluster to which the weight of each training sample in each base classifier belongs is used as the reference weight of each training sample in each base classifier;
[0029] The mean of the reference weight differences of all training samples between any two adjacent base classifiers is obtained as the weight change rate between the corresponding two adjacent base classifiers; when the weight change rate is greater than a preset weight change rate threshold, the corresponding two adjacent base classifiers are regarded as a base classifier matching pair.
[0030] Furthermore, the method for obtaining the final importance value is:
[0031] For any base classifier matching pair, according to the size and fluctuation of the first importance value of each reference data in the base classifier matching pair, obtain the second importance value of each reference data in the base classifier matching pair;
[0032] For any kind of reference data, the average of the second importance values of the reference data in all base classifier matching pairs is taken as the important feature value of the reference data;
[0033] The result of normalizing the important characteristic values is used as the final importance value of the reference data.
[0034] Furthermore, the calculation formula of the second importance value is:
[0035] ; In the formula, is the second importance value of the a-th reference data in the k-th base classifier matching pair; The first importance value of the a-th reference data in the first base classifier in the k-th base classifier matching pair; The first importance value of the a-th reference data in the second base classifier within the k-th base classifier matching pair; for and The variance of ; e is a natural constant.
[0036] Furthermore, the weights of the training samples in each base classifier are clustered using the DBSCAN density clustering algorithm.
[0037] A second aspect of the present invention provides a load forecasting system for a cold region integrated energy grid, the system comprising a data acquisition module, a preprocessing module, a first importance value acquisition module, a final importance value acquisition module and a data processing module:
[0038] A data acquisition module is used to acquire each reference data of the cold region integrated energy grid at each moment within a preset time period; wherein the reference data includes power load data;
[0039] A preprocessing module, used to obtain training samples of each local reference time period and reference power load data of each training sample according to the distribution of reference data in each local reference time period preset in the preset time period;
[0040] A first importance value acquisition module is used to process the training samples by using the AdaBoost algorithm, and acquire the first importance value of each reference data in each base classifier according to the similarity between the training power load data of each training sample in each base classifier and the reference power load data, and the feature distribution of each reference data in each base classifier;
[0041] The final importance value acquisition module is used to screen out base classifier matching pairs according to the changes in the weights of training samples between adjacent base classifiers; and to obtain the final importance value of each reference data according to the size and similarity of the first importance value of each reference data in each base classifier matching pair;
[0042] The data processing module is used to train a neural network for predicting electric load data based on each reference data at each moment in a preset time period and the final importance value of each reference data, as well as the electric load data at the next adjacent moment; and predict the electric load data at each moment through the trained neural network for predicting electric load data.
[0043] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a load forecasting method for a cold-region integrated energy grid as described in the first aspect of the present invention.
[0044] The present invention has the following beneficial effects:
[0045] According to the distribution of reference data in each local reference time period preset within the preset time period, the training samples of each local reference time period and the reference power load data of each training sample are obtained, so as to reduce the calculation amount of reference data and improve the efficiency and accuracy of analyzing the influence of each reference data on the predicted power load data; the training samples are further processed by the AdaBoost algorithm, and the first importance value of each reference data in each base classifier is obtained according to the similarity between the training power load data and the reference power load data of each training sample in each base classifier, and the feature distribution of each reference data in each base classifier, so as to determine the importance of each reference data in each base classifier to the predicted power load data; in order to more accurately determine the influence of each reference data on the predicted power load data, the training samples between adjacent base classifiers are further processed according to the AdaBoost algorithm. According to the change of the weight of the sample, the base classifier matching pairs are screened out to improve the accuracy and efficiency of analyzing the characteristics of each reference data; further, according to the size and similarity of the first importance value of each reference data in each base classifier matching pair, the final importance value of each reference data is obtained, and the importance of each reference data to the predicted electricity load data is accurately determined; therefore, according to each reference data at each moment in the preset time period and the final importance value of each reference data, as well as the electricity load data at the next adjacent moment, the neural network for predicting the electricity load data is trained, and the trained neural network for predicting the electricity load data is accurately obtained, so as to accurately predict the electricity load data at each moment, which is conducive to the accurate regulation of electricity by the cold-region integrated energy power grid, and provides strong support for the stable operation and optimized scheduling of the cold-region integrated energy power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic flow chart of a load forecasting method for a cold-region integrated energy grid provided in the first embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a flow chart of a method for obtaining a final importance value of each reference data provided in the first embodiment of the present invention;
[0049] Figure 3 A schematic structural diagram of a load forecasting system for a cold-region integrated energy grid provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0050] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a load forecasting method and system for a cold-region integrated energy grid proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0051] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0052] The specific scheme of the load forecasting method for the cold region integrated energy grid provided by the present invention is described in detail below with reference to the accompanying drawings.
[0053] The specific scenario of the embodiment of the present invention is: in the existing method, the historical electricity load data in the cold-region integrated energy grid is fitted by the least squares method to predict the electricity load data in the cold-region integrated energy grid. However, in actual situations, there are many factors that affect the electricity load data. For example, various meteorological conditions such as temperature, wind speed, and solar radiation intensity will affect the electricity load data. If the least squares method is directly fitted to the historical electricity load data, it is easy to cause overfitting or underfitting of the historical electricity load data, and then cause the predicted electricity load data to be inaccurate, and the stable operation of the cold-region integrated energy grid cannot be ensured. Therefore, the embodiment of the present invention is based on various meteorological data and The changes in electricity load data are analyzed, and the training samples and reference electricity load data of the training samples in the historical time period are obtained. Then, the training samples are processed by the AdaBoost algorithm to obtain the influence of each meteorological data and electricity load data on the predicted electricity load data. Then, according to each reference data at each moment in the preset time period and the final importance value of each reference data, as well as the electricity load data at the next adjacent moment, the neural network for predicting electricity load data is trained. Then, the electricity load data at each moment is accurately predicted based on the trained neural network for predicting electricity load data, which is conducive to the accurate regulation of electricity by the cold-region integrated energy power grid.
[0054] Embodiment 1: This embodiment discloses a load forecasting method for a cold-region integrated energy grid;
[0055] See also Figure 1 , which shows a flow chart of a load forecasting method for a cold region integrated energy grid provided by an embodiment of the present invention, the method comprising the following steps:
[0056] Step S1: Obtain each type of reference data of the cold-region integrated energy grid at each moment within a preset time period; wherein the reference data includes power load data.
[0057] Specifically, in actual situations, meteorological data will affect the electricity load data in the cold-region integrated energy grid. In order to improve the accurate regulation of electricity by the cold-region integrated energy grid, this embodiment obtains each reference data of the cold-region integrated energy grid at each moment within a preset time period. The reference data includes electricity load data and various meteorological data, such as temperature, wind speed, solar radiation intensity, rainfall and other meteorological data. Among them, this embodiment sets the preset time period to one year, and the time interval between two adjacent moments is set to 12 hours. Among them, the preset time period is selected as a historical time period close to the current moment as much as possible, because the electricity usage in the same place will not change much within 5 years. The implementer can set the size of the preset time period and the time interval between two adjacent moments according to the actual situation, which is not limited here.
[0058] Step S2: according to the distribution of reference data in each local reference time period preset in the preset time period, obtain the training sample of each local reference time period and the reference power load data of each training sample.
[0059] Specifically, in order to accurately and efficiently analyze the influence of each reference data on the predicted power load data, which is conducive to the subsequent accurate prediction of power load data, this embodiment fits the power load data within the preset time period into a power load curve, wherein the curve fitting method is a well-known technology and will not be repeated. The power load curve is divided into local curves by the multi-threshold OTSU algorithm. In other embodiments, the power load curve can be divided into local curves by setting the fluctuation range of the power load curve, or other standards are set artificially to divide the power load curve to obtain local curves. The method for obtaining the local curve is not limited here. Among them, the multi-threshold OTSU algorithm is a well-known technology and will not be repeated. It is known that the change of power load data within the preset time period is small under normal circumstances. In order to eliminate the interference of abnormal power load data, it is impossible to accurately analyze the influence of each reference data on the predicted power load data. Therefore, this embodiment obtains the variance of the power load data in each local curve as the first variance of the corresponding local curve; when the first variance is larger, it means that the power load data in the corresponding local curve is more likely to be abnormal. Therefore, this embodiment sets the preset fluctuation threshold to 0.3, and the implementer can set the size of the preset fluctuation threshold according to the actual situation, which is not limited here. When the first variance is greater than or equal to the preset fluctuation threshold, it is assumed that there is abnormal power load data in the corresponding local curve, and the corresponding local time period is not analyzed. Therefore, this embodiment uses the local time period corresponding to the local curve with the first variance less than the preset fluctuation threshold as the local reference time period, and then only analyzes the reference data within the local reference time period, thereby improving the accuracy of the analysis of each reference data, which is conducive to the subsequent accurate analysis of the influence of each reference data on the predicted power load data, that is, determining the importance of each reference data to the predicted power load data, and then accurately predicting the power load data.
[0060] In order to reduce the amount of calculation while maintaining the accuracy of each reference data, this embodiment obtains the mean value of each reference data in each local reference time period and constructs it into an array as a training sample for each local reference time period. It should be noted that the arrangement position of the mean value of each reference data in each training sample is exactly the same. At the same time, the mean value of all power load data in the local reference time period corresponding to each training sample is used as the reference power load data of the corresponding training sample, that is, the power load data actually corresponding to each training sample is used by default. At this point, the training samples and the reference power load data of each training sample are obtained, which facilitates the subsequent accurate acquisition of the degree of influence of each reference data on the predicted power load data.
[0061] Step S3: Process the training samples through the AdaBoost algorithm, and obtain the first importance value of each reference data in each base classifier according to the similarity between the training power load data and the reference power load data of each training sample in each base classifier, and the feature distribution of each reference data in each base classifier.
[0062] Specifically, in order to analyze the influence of each reference data on the predicted power load data, this embodiment processes the training samples through the AdaBoost algorithm, wherein this embodiment sets the number of training times of the AdaBoost algorithm to 100 times, that is, there are 100 base classifiers in total, and the implementer can set the number of training times of the AdaBoost algorithm according to the actual situation, which is not limited here. The AdaBoost algorithm is a well-known technology and will not be described in detail. Each base classifier is analyzed, and when the training power load data of the training samples in a certain base classifier has more errors, that is, there are more training power load data of the training samples in the base classifier that deviate from the reference power load data, it means that the training result of the base classifier is less accurate, and each reference data in the base classifier should be less referenced when analyzing the influence on the predicted power load data. Considering that in the training process of the base classifier, the criticality of each reference data in the base classifier can be obtained according to the classification features based on which the node splitting of the corresponding decision tree is based, when the node corresponding to a certain reference data as a classification feature is closer to the root node of the decision tree corresponding to the training process of the base classifier, it means that the role played by this reference data in the classification process of the training sample is greater, which indirectly means that the influence of this reference data on the predicted power load data is greater. Therefore, this embodiment obtains the first importance value of each reference data in each base classifier according to the similarity between the training power load data and the reference power load data of each training sample in each base classifier, and the feature distribution of each reference data in each base classifier. The larger the first importance value is, the more accurately the corresponding type of reference data in the corresponding base classifier can classify the training sample, which indirectly means that the corresponding type of reference data in the corresponding base classifier has a greater influence on the predicted power load data.
[0063] Preferably, the method for obtaining the first importance value is: for any base classifier, obtain the absolute value of the difference between the training power load data and the reference power load data of each training sample in the base classifier, all as the first difference; when the first difference is 0, it means that the training result of the corresponding training sample in the base classifier is correct; when the first difference is not 0, it means that the training result of the corresponding training sample in the base classifier is deviated. Therefore, in this embodiment, the preset first difference threshold is set to 0, and the number of all first differences greater than the preset first difference threshold is obtained, that is, the number of training samples with erroneous training results in the base classifier, as the number of training sample errors in the base classifier; the ratio of the number of training sample errors to the total number of training samples is taken as the error rate of the base classifier. The larger the error rate, the more inaccurate the training result of the base classifier, the more inaccurate the features of each reference data in the base classifier, and the smaller the importance of each reference data in the base classifier. At the same time, obtain the order of each reference data in the base classifier as a classification feature and label them from small to large. The labeling order set in this embodiment is 1, 2, 3... For example, taking the yth reference data as an example, if the yth reference data is the classification feature basis for dividing the root node into the first-layer node, the label of the yth reference data is 1; if the yth reference data is the classification feature basis for dividing the second-layer node into the third-layer node, the label of the yth reference data is 2; if the yth reference data is the classification feature basis for dividing the third-layer node into the fourth-layer node, the label of the yth reference data is 3; and so on, obtain the label of each reference data in the base classifier, that is, determine the classification feature sequence number of each reference data in the base classifier. The implementer can set the classification feature sequence number according to the actual situation, which is not limited here. Among them, the smaller the classification feature sequence number, the more critical the corresponding type of reference data is in the training process of the base classifier, and the greater the influence of the corresponding type of reference data on the predicted power load data. Therefore, according to the classification feature serial number and error rate of each reference data in the base classifier, the first importance value of each reference data in the base classifier is obtained. Among them, the classification feature serial number of each reference data in the base classifier is negatively correlated and the normalized result is positively correlated with the first importance value of the corresponding reference data in the base classifier; the error rate of the base classifier is negatively correlated with the first importance value of each reference data in the base classifier.
[0064] As an example, take the yth reference data in the ith base classifier as an example, where the ith base classifier is the base classifier obtained by the ith training of the AdaBoost algorithm. The calculation formula for obtaining the first importance value of the yth reference data in the ith base classifier is:
[0065] ; In the formula, is the first importance value of the y-th reference data in the ith base classifier; is the classification feature number of the yth reference data in the ith base classifier; is the error rate of the i-th base classifier; e is a natural constant; It is the first preset constant, which is greater than 0.
[0066] This embodiment will Set to 0.1 to avoid the denominator being 0. The implementer can set it according to the actual situation. The size is not limited here.
[0067] It should be noted that The smaller it is, the better the y-th reference data can classify the training samples in the ith base classifier, and the more important the y-th reference data is in the training process of the ith base classifier. The bigger, The bigger; The smaller it is, the more accurate the training result of the i-th base classifier is, and the more accurate the features of each reference data in the i-th base classifier are. The larger the The larger it is, the more accurate the features of the yth reference data in the ith base classifier are, and the greater the subsequent impact on the predicted power load data.
[0068] According to the method for obtaining the first importance value of the yth type of reference data in the ith base classifier, the first importance value of each type of reference data in each base classifier is obtained.
[0069] Step S4: According to the change of the weight of the training samples between adjacent base classifiers, base classifier matching pairs are screened out; according to the size and similarity of the first importance value of each reference data in each base classifier matching pair, the final importance value of each reference data is obtained.
[0070] Specifically, if the weight of the training samples between the base separators of two adjacent trainings changes greatly during the AdaBoost algorithm training process, and the first importance value of a certain reference data is large and similar in the base separators under the two adjacent trainings, then the characteristics of this reference data do not change with the change of the weight distribution of the training samples, which more accurately illustrates that the greater the importance of this reference data to the classification of the training samples. Among them, the weights of the training samples in the base separator are well known, and the specific acquisition method will not be repeated. It is further determined that the greater the influence of this reference data on the predicted power load data. Therefore, this embodiment obtains the weight change rate between two adjacent base classifiers according to the change of the weight of the training samples between two adjacent base classifiers during the training process. In order to reduce the amount of calculation, the influence of each reference data on the predicted power load data is analyzed more accurately and efficiently. Therefore, the base classifier matching pairs are screened out according to the size of the weight change rate. Then, according to the size and similarity of the first importance value of each reference data in each base classifier matching pair, the second importance value of each reference data in each base classifier matching pair is obtained. The larger the second importance value, the greater the accuracy of the corresponding type of reference data in classifying the training samples, which indirectly indicates that the corresponding type of reference data has a greater impact on the predicted power load data. Therefore, the final importance value of each reference data is obtained based on the second importance value. The larger the final importance value, the greater the impact of the corresponding type of reference data on the predicted power load data, and the greater the degree to which this type of reference data is considered when predicting the power load data. Among them, the method for obtaining the final importance value of each reference data is as follows: Figure 2 As shown:
[0071] S4-001: Obtain base classifier matching pairs.
[0072] Preferably, the method for obtaining the base classifier matching pair is: clustering the weights of the training samples in each base classifier through the DBSCAN density clustering algorithm to obtain the weight clustering cluster in each base classifier; in this embodiment, the neighborhood distance threshold in the DBSCAN density clustering algorithm is set to 0.1 and the minimum number of neighbors is set to 5. The implementer can set the neighborhood distance threshold and the minimum number of neighbors in the DBSCAN density clustering algorithm according to the actual situation, which is not limited here. Among them, the DBSCAN density clustering algorithm is a well-known technology and will not be repeated. The center weight of the weight clustering cluster to which the weight of each training sample in each base classifier belongs is used as the reference weight of each training sample in each base classifier; in order to accurately characterize the difference in the weight of the training sample between two adjacent base classifiers, this embodiment obtains the mean of the reference weight difference of all training samples between any two adjacent base classifiers as the weight change rate between the corresponding two adjacent base classifiers; the larger the weight change rate, the more inconsistent the training results of the training samples between the two adjacent base classifiers. When the weight change rate is greater than the preset weight change rate threshold, the corresponding two adjacent base classifiers are used as a base classifier matching pair, thereby improving the efficiency and accuracy of analyzing the importance of each reference data.
[0073] As an example, taking the i-th base classifier and the i-1-th base classifier as examples, the calculation formula for obtaining the weight change rate of the i-th base classifier and the i-1-th base classifier is:
[0074] ; is the weight change rate of the i-th base classifier and the i-1-th base classifier; N is the total number of training samples; is the reference weight of the nth training sample in the i-th base classifier; is the reference weight of the nth training sample in the i-1th base classifier; is the absolute value function.
[0075] It should be noted that The larger the value is, the greater the difference between the weight of the nth training sample between the ith base classifier and the i-1th base classifier is, which indirectly indicates that the greater the difference between the weight of the training sample between the ith base classifier and the i-1th base classifier is. The larger the The larger the value is, the greater the degree of change in the weight of the training samples from the i-1th base classifier to the i-th base classifier.
[0076] According to the method for obtaining the weight change rates of the ith base classifier and the (i-1)th base classifier, the weight change rates of any two adjacent base classifiers are obtained.
[0077] In this embodiment, the preset weight change rate threshold is set to 0.6. The implementer can set the preset weight change rate threshold according to the actual situation, which is not limited here. When the weight change rate is greater than the preset weight change rate threshold, the corresponding two adjacent base classifiers are regarded as a base classifier matching pair. At this point, the base classifier matching pair in the AdaBoost algorithm is determined.
[0078] S4-002: Obtain the second importance value.
[0079] As an example, taking the ath type of reference data in the kth base classifier matching pair as an example, this embodiment characterizes the similarity of the first importance value of the ath type of reference data in the kth base classifier matching pair by obtaining the variance of the first importance value of the ath type of reference data in the kth base classifier matching pair. Then, the calculation formula for obtaining the second importance value of the ath type of reference data in the kth base classifier matching pair is:
[0080] ; In the formula, is the second importance value of the a-th reference data in the k-th base classifier matching pair; The first importance value of the a-th reference data in the first base classifier in the k-th base classifier matching pair; The first importance value of the a-th reference data in the second base classifier within the k-th base classifier matching pair; for and The variance of ; e is a natural constant.
[0081] It should be noted that The bigger, The larger the value is, the more important the a-th reference data is in the k-th base classifier matching pair, and the more accurately the a-th reference data can classify the training samples. The bigger; The smaller, the and The more similar, the more the characteristics of the reference data do not change with the change of sample weight distribution, and the more accurate the classification of training samples is. The bigger, The larger the The larger the value is, the greater the influence of the a-th reference data on the predicted power load data is. Obtain the similarity of the first importance value of the a-th reference data in the k-th base classifier matching pair. The implementer can obtain the similarity of the first importance value of the a-th reference data in the k-th base classifier matching pair according to actual conditions, which is not limited here.
[0082] According to the method for obtaining the second importance value of the ath type of reference data in the kth base classifier matching pair, the second importance value of each type of reference data in each base classifier matching pair is obtained.
[0083] S4-003: Get the final importance value.
[0084] As an example, taking the a-th reference data as an example, the calculation formula for obtaining the final importance value of the a-th reference data is:
[0085] ; In the formula, is the final importance value of the a-th reference data; M is the total number of matching pairs of the base classifier; is the second importance value of the ath reference data in the mth base classifier matching pair; norm is the normalization function.
[0086] It should be noted that The larger it is, the more accurately the a-th reference data can classify the training samples. The larger the value is, the greater the influence of the a-th reference data on the predicted power load data is; therefore, The larger it is, the greater the proportion of the ath reference data needs to be involved in predicting power load data.
[0087] According to the method for obtaining the final importance value of the a-th reference data, the final importance value of each reference data is obtained.
[0088] Step S5: Train a neural network for predicting electric load data according to each reference data at each moment in a preset time period and the final importance value of each reference data, as well as the electric load data at the next adjacent moment; predict the electric load data at each moment through the trained neural network for predicting electric load data.
[0089] Specifically, in order to better predict the power load data at each moment, this embodiment uses the final importance value of each reference data as the weight of each reference data at each moment to participate in predicting the power load data at the next adjacent moment. Therefore, each reference data at each moment in the preset time period and the final importance value of each reference data are input into the neural network for predicting the power load data, and the neural network for predicting the power load data is trained. When predicting the power load data at the next adjacent moment at each moment, the neural network pays more attention to the reference data with a larger final importance value, thereby improving the accuracy of predicting the power load data. This embodiment simulates the actual influence of each reference data on the power load data, so that the neural network can better capture the changing trend and pattern of the power load data, help identify and emphasize those reference data that are most critical to predicting the power load data, and provide more targeted decision support for the regulation of the cold-region integrated energy grid. For example, when the temperature has a significant impact on the power load data of the cold-region integrated energy grid, the greater the final importance value of the temperature, the higher the weight of the temperature will be given in the neural network, which helps to more accurately predict the power load data under specific temperature conditions. Therefore, inputting the final importance value of each reference data into the neural network as a weight is an effective method to improve the accuracy of predicted electricity load data. It combines the advantages of domain knowledge and data-driven models, and provides strong support for the stable operation and optimized scheduling of cold-region integrated energy power grids.
[0090] The training process of the neural network for predicting power load data is as follows:
[0091] The input is each reference data at each moment in the preset time period and the final importance value of each reference data. The output is the predicted power load data at the next adjacent moment of each moment in the preset time period. The training label is the power load data at the next adjacent moment of each moment in the preset time period, and the loss function is the cross entropy loss function. Among them, the neural network for predicting power load data is the LSTM (Long Short-Term Memory) long short-term memory network. The LSTM (Long Short-Term Memory) long short-term memory network is a well-known technology and will not be described in detail. It should be noted that if there is no power load data at the next adjacent moment at the last moment of the preset time period, then each reference data at the last moment of the preset time period does not participate in the training of the neural network for predicting power load data.
[0092] At this point, a trained neural network for predicting power load data is obtained. Each reference data at the current moment and the final importance value of each reference data are input into the trained neural network for predicting power load data, and the predicted power load data at the next moment of the current moment is accurately output. This is conducive to the accurate regulation of power by the cold-region integrated energy grid.
[0093] The present invention is completed.
[0094] In summary, this embodiment obtains reference data of the cold-region integrated energy grid at each moment; obtains training samples according to the distribution of the reference data; processes the training samples through the AdaBoost algorithm, and obtains the first importance value according to the training results of the base classifier and the characteristic distribution of the reference data in the base classifier; obtains the final importance value of the reference data according to the size and similarity of the first importance values between adjacent base classifiers; and predicts the power load data based on the final importance value and the reference data. The present invention obtains the final importance value of each reference data, accurately determines the degree of influence of each reference data on the power load data, and then accurately predicts the power load data at each moment.
[0095] Embodiment 2: This embodiment discloses a load forecasting system for a cold-region integrated energy grid;
[0096] like Figure 3 As shown, a load forecasting system for a cold region integrated energy grid includes a data acquisition module 10, a preprocessing module 20, a first importance value acquisition module 30, a final importance value acquisition module 40 and a data processing module 50:
[0097] The data acquisition module 10 is used to acquire each reference data of the cold region integrated energy grid at each moment within a preset time period; wherein the reference data includes power load data;
[0098] The preprocessing module 20 is used to obtain the training samples of each local reference time period and the reference power load data of each training sample according to the distribution of the reference data in each local reference time period preset in the preset time period;
[0099] A first importance value acquisition module 30 is used to process the training samples by using the AdaBoost algorithm, and acquire the first importance value of each reference data in each base classifier according to the similarity between the training power load data of each training sample in each base classifier and the reference power load data, and the feature distribution of each reference data in each base classifier;
[0100] The final importance value acquisition module 40 is used to screen out base classifier matching pairs according to the changes in the weights of the training samples between each base classifier and its adjacent base classifiers during the training process; and to obtain the final importance value of each reference data according to the size and similarity of the first importance value of each reference data in each base classifier matching pair;
[0101] The data processing module 50 is used to train a neural network for predicting electric load data based on each reference data at each moment in a preset time period and the final importance value of each reference data, as well as the electric load data at the next adjacent moment; and predict the electric load data at each moment through the trained neural network for predicting electric load data.
[0102] Embodiment 3: The purpose of this embodiment is to provide a computer-readable storage medium.
[0103] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a load forecasting method for a cold-region integrated energy grid as described in Example 1 of the present disclosure.
[0104] The steps involved in the above embodiments 2 and 3 correspond to the method embodiment 1. For specific implementation and methods, please refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0105] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0106] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A load forecasting method for a cold region integrated energy grid, characterized in that: The method comprises the following steps: Obtaining each type of reference data of the cold-region integrated energy grid at each moment within a preset time period; wherein the reference data includes power load data; According to the distribution of reference data in each local reference time period preset in the preset time period, a training sample of each local reference time period and reference power load data of each training sample are obtained; The training samples are processed by the AdaBoost algorithm, and the first importance value of each reference data in each base classifier is obtained according to the similarity between the training power load data and the reference power load data of each training sample in each base classifier, and the feature distribution of each reference data in each base classifier; According to the change of the weight of the training samples between adjacent base classifiers, base classifier matching pairs are screened out; according to the size and similarity of the first importance value of each reference data in each base classifier matching pair, the final importance value of each reference data is obtained; According to each reference data at each moment in a preset time period and the final importance value of each reference data, and the power load data at the next adjacent moment, a neural network for predicting power load data is trained; and the power load data at each moment is predicted by using the trained neural network for predicting power load data; The method for obtaining the final importance value is: For any base classifier matching pair, according to the size and similarity of the first importance value of each reference data in the base classifier matching pair, obtain the second importance value of each reference data in the base classifier matching pair; For any kind of reference data, the average of the second importance values of the reference data in all base classifier matching pairs is taken as the important feature value of the reference data; The result of normalizing the important characteristic values is used as the final importance value of the reference data; The calculation formula of the second importance value is: ; In the formula, is the second importance value of the a-th reference data in the k-th base classifier matching pair; The first importance value of the a-th reference data in the first base classifier in the k-th base classifier matching pair; The first importance value of the a-th reference data in the second base classifier within the k-th base classifier matching pair; for and The variance of ; e is a natural constant.
2. A load forecasting method for a cold region integrated energy grid as claimed in claim 1, characterized in that: The method for obtaining the local reference time period is: Fitting the power load data within a preset time period into a power load curve, and dividing the power load curve into local curves according to the fluctuation of the power load curve; Obtaining the variance of the electric load data in each local curve as the first variance of the corresponding local curve; When the first variance is less than a preset fluctuation threshold, the local time period corresponding to the local curve is used as the local reference time period.
3. A load forecasting method for a cold region integrated energy grid as claimed in claim 1, characterized in that: The method for obtaining the training samples of each local reference time period and the reference power load data of each training sample is: The mean of each reference data in each local reference time period is constructed into an array as a training sample for each local reference time period; The mean value of all the power load data in the local reference time period corresponding to each training sample is used as the reference power load data of each training sample.
4. A load forecasting method for a cold region integrated energy grid as claimed in claim 1, characterized in that: The method for obtaining the first importance value is: For any base classifier, obtain the difference between the training power load data and the reference power load data of each training sample in the base classifier, and use them as the first difference; Obtaining the number of all first differences greater than a preset first difference threshold as the number of errors in the training samples of the base classifier; The ratio of the number of errors in the training samples to the total number of training samples is used as the error rate of the base classifier; Obtain the order in which each reference data in the base classifier is used as a classification feature and label them from small to large, and determine the classification feature sequence number of each reference data in the base classifier; According to the classification feature sequence number of each reference data in the base classifier and the error rate, a first importance value of each reference data in the base classifier is obtained.
5. A load forecasting method for a cold region integrated energy grid as claimed in claim 4, characterized in that: The method for obtaining the first importance value is: For any base classifier, the classification feature number of each reference data in the base classifier is negatively correlated and the normalized result is positively correlated with the first importance value of the corresponding reference data in the base classifier; The error rate of the base classifier is negatively correlated with the first importance value of each reference data in the base classifier.
6. A load forecasting method for a cold region integrated energy grid as claimed in claim 1, characterized in that: The method for obtaining the base classifier matching pair is: Cluster the weights of the training samples in each base classifier to obtain the weight clustering clusters in each base classifier; The central weight of the weight cluster to which the weight of each training sample in each base classifier belongs is used as the reference weight of each training sample in each base classifier; The mean of the reference weight differences of all training samples between any two adjacent base classifiers is obtained as the weight change rate between the corresponding two adjacent base classifiers; when the weight change rate is greater than a preset weight change rate threshold, the corresponding two adjacent base classifiers are regarded as a base classifier matching pair.
7. A load forecasting method for a cold region integrated energy grid as claimed in claim 6, characterized in that: The weights of the training samples in each base classifier are clustered using the DBSCAN density clustering algorithm.
8. A load forecasting system for a cold region integrated energy grid, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When executing the computer program, the processor implements the steps of a load forecasting method for a cold-region integrated energy grid as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Micro-grid multi-model load prediction adaptive selection method and system and storage medium
CN112508224A
Load prediction and allocation method for ring main unit based on machine learning
CN118263865A