Method for predicting medium-term electricity consumption of users in manufacturing industry

By decomposing the historical load data of manufacturing users and applying the prediction model, the problem of inaccurate electricity consumption prediction in the existing technology is solved, and higher prediction accuracy and complexity are achieved.

CN119940630APending Publication Date: 2025-05-06STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510022955.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art is difficult to achieve accurate prediction of electricity consumption in manufacturing, especially due to the complex changes in electricity consumption, time series models and artificial neural network models are difficult to capture features and trends in data.

Method used

By decomposing the historical load data of manufacturing users, high-frequency and low-frequency historical sequences are obtained, and corresponding prediction models are input to predict, and the prediction sequence is finally merged to obtain the load prediction sequence and power consumption prediction.

Benefits of technology

It improves the accuracy of medium-term electricity consumption prediction for manufacturing users, can better capture the characteristics and trends in the data, reduce the complexity of prediction, and avoid the reduction in accuracy caused by the mutual influence of high-frequency and low-frequency data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940630A_ABST
    Figure CN119940630A_ABST
Patent Text Reader

Abstract

The invention provides a method for predicting medium-term electricity consumption of users in the manufacturing industry. The method comprises the following steps: acquiring first historical load data of a manufacturing industry user and a category to which the user belongs; decomposing the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data; inputting the high-frequency historical sequence into a high-frequency sequence prediction model corresponding to the category to obtain a high-frequency prediction sequence output by the high-frequency sequence prediction model; inputting the low-frequency historical data into a low-frequency sequence prediction model corresponding to the category to obtain a low-frequency prediction sequence output by the low-frequency sequence prediction model; determining a load prediction sequence of the manufacturing industry user according to the high-frequency prediction sequence and the low-frequency prediction sequence; and obtaining the electricity consumption of the manufacturing industry user based on the load prediction sequence. The method can improve the accuracy of middle-term electricity consumption prediction of the users in the manufacturing industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power forecasting, and in particular to a method for forecasting mid-term power consumption of manufacturing users. Background Art

[0002] Industrial electricity consumption is an important part of the total social electricity consumption, and manufacturing electricity consumption is an important part of industrial electricity consumption. With the development of manufacturing, manufacturing electricity consumption is also increasing. In order to improve power efficiency and reduce energy costs, electricity consumption forecasting can be used to predict future electricity demand, reasonably and effectively allocate power resources, and ensure the development of the manufacturing industry.

[0003] In the related art, the prediction of electricity consumption generally adopts time series model or artificial neural network model, etc., but the electricity consumption of manufacturing industry varies in a complex way, and it is difficult to achieve accurate prediction of electricity consumption of manufacturing industry by relying on the above prediction models. Summary of the invention

[0004] The embodiment of the present application provides a method for predicting the medium-term electricity consumption of manufacturing users, so as to improve the accuracy of the medium-term electricity consumption prediction of manufacturing users.

[0005] In a first aspect, an embodiment of the present application provides a method for predicting medium-term electricity consumption of manufacturing users, including:

[0006] Obtain the first historical load data of manufacturing users and the categories they belong to;

[0007] Decomposing the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data;

[0008] Input the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model; input the low-frequency historical data into the low-frequency sequence prediction model corresponding to the category to obtain the low-frequency prediction sequence output by the low-frequency sequence prediction model;

[0009] Determine the load forecast sequence of the manufacturing user in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence;

[0010] Based on the load forecast sequence, the power consumption of the manufacturing users in the forecast period is obtained.

[0011] In a possible implementation, the obtaining of the first historical load data of the manufacturing user and the category to which it belongs includes:

[0012] Get the first historical load data of manufacturing users;

[0013] The category to which the manufacturing user belongs is determined based on the first historical load data and the preset typical load data corresponding to each category.

[0014] In a possible implementation, decomposing the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the historical load data includes:

[0015] Get the wavelet basis function of the preset wavelet transform;

[0016] The first historical load data is decomposed according to the wavelet basis function to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data.

[0017] In a possible implementation, determining the load forecast sequence of the manufacturing user in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence includes:

[0018] According to the wavelet basis function, the high-frequency prediction sequence and the low-frequency prediction sequence are subjected to wavelet inverse transformation to obtain the load prediction sequence of the manufacturing users in the period to be predicted.

[0019] In a possible implementation, before acquiring the historical load data of manufacturing users and the categories to which they belong, the method further includes:

[0020] Obtain the second historical load data of multiple manufacturing users;

[0021] Set the clustering criterion function, fuzzy index and number of clusters;

[0022] Randomly select the manufacturing users of the cluster number as cluster centers;

[0023] Determining a fuzzy membership matrix according to the second historical load data, the cluster center and the fuzzy index;

[0024] According to the fuzzy membership matrix and the second historical load data, the cluster center is updated; according to the second historical load data, the updated cluster center and the fuzzy index, the fuzzy membership matrix is ​​updated; and according to the updated cluster center and the updated fuzzy membership matrix, the value of the criterion function is calculated; and an iterative calculation of the cluster center is completed;

[0025] Iterate continuously until the criterion function is smaller than a preset value, and determine multiple categories according to the cluster centers corresponding to the criterion functions smaller than the preset value, as well as typical load data corresponding to each category.

[0026] In a possible implementation, before inputting the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model, the method further includes:

[0027] For each category, determining third historical load data of manufacturing users corresponding to the category from the second historical load data;

[0028] Decomposing the third historical load data to obtain a high-frequency sequence and a low-frequency sequence corresponding to the third historical load data;

[0029] According to the high-frequency sequence corresponding to the third historical load data, a preset first machine learning model is trained to obtain a high-frequency sequence prediction model corresponding to the category;

[0030] According to the low-frequency sequence corresponding to the third historical load data, the preset second machine learning model is trained to obtain a low-frequency sequence prediction model corresponding to the category.

[0031] In a possible implementation, before training a preset first machine learning model according to the high frequency sequence corresponding to the third historical load data to obtain a high frequency sequence prediction model corresponding to the category, the method further includes:

[0032] Optimizing the hyperparameters of the first machine learning model using a particle swarm optimization algorithm;

[0033] Before training the preset second machine learning model according to the low-frequency sequence corresponding to the third historical load data to obtain the low-frequency sequence prediction model corresponding to the category, the method further includes:

[0034] The particle swarm optimization algorithm is used to optimize the hyperparameters of the second machine learning model.

[0035] In a second aspect, an embodiment of the present application provides a device for predicting medium-term electricity consumption of manufacturing users, including:

[0036] An acquisition module, used to acquire the first historical load data of manufacturing users and the category to which it belongs;

[0037] a decomposition module, configured to decompose the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data;

[0038] A prediction module, used to input the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model; input the low-frequency historical data into the low-frequency sequence prediction model corresponding to the category to obtain the low-frequency prediction sequence output by the low-frequency sequence prediction model;

[0039] A restoration module, used to determine the load forecast sequence of the manufacturing user in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence;

[0040] The calculation module is used to obtain the power consumption of the manufacturing users in the period to be predicted based on the load prediction sequence.

[0041] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect or any possible implementation method of the first aspect.

[0043] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the steps of the method described in the first aspect or any possible implementation method of the first aspect.

[0044] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0045] The embodiment of the present application decomposes the first historical load data of the manufacturing user to be predicted to obtain a high-frequency historical sequence and a low-frequency historical sequence, and can split the complex load data to capture the characteristics and trends in the data; then, predictions are made respectively through the high-frequency sequence prediction model and the low-frequency sequence prediction model corresponding to the category to which the manufacturing user belongs, and accurate predictions can be made for high frequency and low frequency respectively, thereby improving the accuracy of the prediction; at the same time, the electricity consumption behavior of the manufacturing user is taken into account during the prediction, and the corresponding model is selected for prediction, thereby further improving the accuracy of the prediction; finally, the load prediction sequence of the manufacturing user is obtained through the predicted high-frequency prediction sequence and low-frequency prediction sequence, and the electricity consumption of the manufacturing user is calculated, thereby realizing accurate prediction of the medium-term electricity consumption of the manufacturing user. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 This is a first implementation flow chart of the method for predicting medium-term electricity consumption of manufacturing users provided in an embodiment of the present application;

[0048] Figure 2 This is a second implementation flow chart of the method for predicting medium-term electricity consumption of manufacturing users provided in an embodiment of the present application;

[0049] Figure 3 It is a structural schematic diagram of a medium-term electricity consumption prediction device for manufacturing users provided in an embodiment of the present application;

[0050] Figure 4 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0053] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0054] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0055] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0056] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more.

[0057] In order to make the purpose, technical solutions and advantages of the present application clearer, specific embodiments will be described below in conjunction with the accompanying drawings.

[0058] Figure 1 The first implementation flow chart of the method for predicting the medium-term electricity consumption of manufacturing users provided in the embodiment of the present application is described in detail as follows:

[0059] Step 101, obtaining the first historical load data of manufacturing users and the category to which they belong.

[0060] In this embodiment, the first historical load data of the manufacturing users to be predicted in the previous period of the period to be predicted can be obtained, and the load data of the period to be predicted can be predicted using the first historical load data. The period to be predicted can be one month or one quarter.

[0061] Considering that there are different types of manufacturing users, the load curves of each type of manufacturing users are different. For example, some manufacturing users produce continuously, and their load curves are relatively stable; some manufacturing users have peak production during the day and the lowest output late at night. Correspondingly, the load curve will be high in the middle and low on both sides.

[0062] Therefore, in order to make targeted predictions for the manufacturing users to be predicted, the category to which the manufacturing users belong may also be obtained.

[0063] Here, the category to which the manufacturing users belong may be a subcategory to which the manufacturing users belong in the manufacturing industry, or may be a category obtained by clustering load data, and the like.

[0064] Optional, such as Figure 2As shown, obtaining the first historical load data of manufacturing users and the category to which they belong may be obtaining the first historical load data of manufacturing users; and determining the category to which the manufacturing users belong based on the first historical load data and typical load data corresponding to each preset category.

[0065] In this embodiment, the similarity between the manufacturing users and each category can be obtained through the first historical load data and the preset typical load data corresponding to each category, and the manufacturing users can be classified into the most similar category.

[0066] Here, the similarity between the manufacturing users and each category can be obtained by calculating the distance between the first historical load data and the preset typical load data corresponding to each category. The distance can be Euclidean distance or Dynamic Time Warping (DTW) distance.

[0067] Step 102: Decompose the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data.

[0068] In this embodiment, by decomposing the first historical load data into a high-frequency historical sequence and a low-frequency historical sequence, high-frequency components and low-frequency components in the data can be extracted to better capture the characteristics and trends of the data.

[0069] Step 103, input the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model; input the low-frequency historical data into the low-frequency sequence prediction model corresponding to the category to obtain the low-frequency prediction sequence output by the low-frequency sequence prediction model.

[0070] In this embodiment, a high-frequency sequence prediction model is used to predict the high-frequency sequence, and a low-frequency sequence prediction model is used to predict the low-frequency sequence. The high frequency and low frequency of the load data can be predicted separately to reduce the complexity of the prediction, improve the accuracy of the prediction, and avoid the mutual influence of high-frequency data and low-frequency data during the prediction, which leads to a decrease in the prediction accuracy.

[0071] Here, each category corresponds to a high-frequency sequence prediction model and a low-frequency sequence prediction model. When predicting manufacturing users, the high-frequency sequence prediction model and the low-frequency sequence prediction model of the category to which the manufacturing users belong are selected for prediction in order to make accurate predictions.

[0072] Step 104, determining the load forecast sequence of the manufacturing industry users in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence.

[0073] In this embodiment, the high-frequency prediction sequence and the low-frequency prediction sequence are restored to merge the high-frequency prediction sequence and the low-frequency prediction sequence into a final load forecast sequence to obtain the load data of the manufacturing users in the forecast period.

[0074] Step 105, based on the load forecast sequence, obtain the power consumption of manufacturing users in the forecast period.

[0075] In this embodiment, the power consumption of manufacturing users in the period to be predicted can be obtained by calculating the load forecast sequence.

[0076] Here, the period to be predicted may be a month or a quarter, etc., to calculate the monthly or quarterly electricity consumption of manufacturing users.

[0077] The embodiment of the present application decomposes the first historical load data of the manufacturing user to be predicted to obtain a high-frequency historical sequence and a low-frequency historical sequence, and can split the complex load data to capture the characteristics and trends in the data; then, predictions are made respectively through the high-frequency sequence prediction model and the low-frequency sequence prediction model corresponding to the category to which the manufacturing user belongs, and accurate predictions can be made for high frequency and low frequency respectively, thereby improving the accuracy of the prediction; at the same time, the electricity consumption behavior of the manufacturing user is taken into account during the prediction, and the corresponding model is selected for prediction, thereby further improving the accuracy of the prediction; finally, the load prediction sequence of the manufacturing user is obtained through the predicted high-frequency prediction sequence and low-frequency prediction sequence, and the electricity consumption of the manufacturing user is calculated, thereby realizing accurate prediction of the medium-term electricity consumption of the manufacturing user.

[0078] In some embodiments, the first historical load data is decomposed to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the historical load data, which can be a wavelet basis function of a preset wavelet transform; and then the first historical load data is decomposed according to the wavelet basis function to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data.

[0079] In this embodiment, the first historical load data may be decomposed once by wavelet decomposition to obtain a high-frequency historical sequence and a low-frequency historical sequence.

[0080] Here, the wavelet basis function may be a db4 wavelet function. Specifically, the db4 wavelet function may be used to perform discrete wavelet transform on the first historical load data to decompose the first historical load data into a high-frequency historical sequence and a low-frequency historical sequence.

[0081] In discrete wavelet transform, the scaling factor and translation factor in the wavelet basis function can be discretized. The scaling factor can be discretized in a power series, that is, a represents the scaling factor, m is an integer, m∈Z. The translation factor is uniformly discrete under the same conditions as the scaling factor, that is, τ represents the translation factor, k is an integer, k∈Z. a0 and τ0 are both constants greater than 0.

[0082] The corresponding wavelet basis function is Then for the signal f(t)∈L 2 (R), the corresponding discrete wavelet transform is:

[0083] Usually, a0=2, τ0=1, then we get the binary discrete wavelet transform: WT f (m,k)≤f, in, is the wavelet basis. Discrete wavelet coefficients WT f (m,k) is a two-dimensional discrete sequence of integers m and k.

[0084] Optionally, the load forecast sequence of manufacturing users in the forecast period is determined based on the high-frequency forecast sequence and the low-frequency forecast sequence. The load forecast sequence of manufacturing users in the forecast period can be obtained by performing an inverse wavelet transform on the high-frequency forecast sequence and the low-frequency forecast sequence based on the wavelet basis function.

[0085] In this embodiment, the wavelet basis function may be used to perform inverse transformation to restore the predicted high-frequency prediction sequence and low-frequency prediction sequence into a load sequence, namely, a load prediction sequence.

[0086] In some embodiments, before obtaining the historical load data of manufacturing users and the categories to which they belong, the following steps may also be included:

[0087] Step 1: Obtain second historical load data of multiple manufacturing users. Here, the second historical load data is load data of multiple manufacturing users in a historical period.

[0088] Step 2: Set the clustering criterion function, fuzzy index and number of clusters.

[0089] Step 3: Randomly select a cluster number of manufacturing users as cluster centers.

[0090] Step 4: Determine the fuzzy membership matrix based on the second historical load data, cluster centers and fuzzy indexes.

[0091] Step five, update the cluster center according to the fuzzy membership matrix and the second historical load data; update the fuzzy membership matrix according to the second historical load data, the updated cluster center and the fuzzy index; and calculate the value of the criterion function according to the updated cluster center and the updated fuzzy membership matrix; complete an iterative calculation of the cluster center.

[0092] Step six, continuously iterate until the criterion function is less than a preset value, and determine multiple categories according to the cluster centers corresponding to the criterion functions less than the preset value, as well as the typical load data corresponding to each category.

[0093] In this embodiment, since the power load data is a kind of time series data, DTW can be selected as the distance measurement between the data and the cluster center.

[0094] The objective function uses cluster volumes as weights, which can balance the volumes of various classes during the clustering process, thereby compensating for the unequal interactions between classes and improving the clustering performance of traditional algorithms on unbalanced data sets.

[0095] The cluster center update formula is: In the formula, θ j represents the jth cluster center, represents the membership of the i-th data to the j-th cluster center, x i represents the i-th data, and N represents the total number of all data.

[0096] Since the partial derivative of the membership relation is always positive, in order to obtain the latest formula of the membership relation, the constraint variables are introduced through Lagrange multiplication. Then the criterion function is

[0097]

[0098] In the formula, L represents the criterion function, c represents the total number of cluster centers, and d(x i ,θ j ) means between x i and θ j The second-order normal form between j represents the volume of the jth category, λ i Represents the weight parameter of the i-th data. The second term is a constant 0.

[0099] Then the membership update formula is:

[0100] When calculating the membership value of a sample belonging to a certain class in the IFCM algorithm, it is necessary to consider both the clustering of the sample with the class center and the size of the class. When the distance between the samples and the two cluster centers is the same, the IFCM algorithm prefers the smaller class, thereby optimizing the sample allocation mechanism of the traditional algorithm.

[0101] The number of clusters is a very important parameter in cluster analysis. The main feature of the IMI indicator is that it takes into account the degree of imbalance between classes in the inter-class separation indicator, so that the number of clusters can be accurately determined in the clustering results of unbalanced data:

[0102]

[0103] In the formula, Used to measure the imbalance between the lth cluster and the jth cluster.

[0104] Select the minimum value of IMI from the multi-clustering results as the number of clusters for the data set: In the formula, K represents the maximum number of clusters.

[0105] In some embodiments, before inputting the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model, the following may also be included:

[0106] For each category, the third historical load data of manufacturing users corresponding to the category is determined from the second historical load data; the third historical load data is first decomposed to obtain high-frequency sequences and low-frequency sequences corresponding to the third historical load data; then, according to the high-frequency sequence corresponding to the third historical load data, a preset first machine learning model is trained to obtain a high-frequency sequence prediction model corresponding to the category; and, according to the low-frequency sequence corresponding to the third historical load data, a preset second machine learning model is trained to obtain a low-frequency sequence prediction model corresponding to the category.

[0107] In this embodiment, the second historical load data includes historical load data of manufacturing users of different categories. Through the clustering in the above embodiment, multiple manufacturing users are divided into different categories. By extracting the data corresponding to the manufacturing users of the same category from the second historical load data, the third historical load data of each category of manufacturing users can be obtained.

[0108] The first machine learning model may use support vector regression (SVR), and the second machine learning model may use gradient boosting decision tree (GBDT).

[0109] Among them, the purpose of the first machine learning model, namely SVR, is to find a linear function for predicting continuous values.

[0110] Suppose there are two different types of linearly differentiable samples (x1, y1), (x2, y2), ..., (x n ,y n ), where (x1, y1) is the input sample. The hyperplane is defined, and the sample points can be separated by w·x+b=0, where w and b are constants. Min|w·x+b|=1 is satisfied.

[0111] The hyperplane is subject to the formula y i [w·x i +b]≥1,i=1,2,……l.

[0112] Then the distance between the sampling point and the hyperplane is

[0113] Assuming that there is a straight line that maximizes the separation of the two samples mentioned above, this line is called the optimal classification line. If there is an m-dimensional space whose data samples are distributed in the form of a hypersphere with R as the radius, then the boundary of the VC-dimensional regular hyperplane that constitutes and satisfies ||w||≤A should satisfy: h≤min([R 2 A 2 ],n)+1.

[0114] Therefore, to make To minimize, we must minimize the upper limit of the VC dimension. The following Langrange conclusion can be obtained:

[0115] The above formula a i Representing different Lagrange multipliers, w and b can be solved by minimizing L(w,b,a).

[0116] Following the Lungkuta conditions:

[0117]

[0118] The dual problem of the Lagrangian homogeneous function can be obtained from its dual form:

[0119]

[0120] Among them, a i ≥0,i=1,2,…l, is the expected solution, There are several non-zero values. Generally speaking, support vectors are samples corresponding to non-zero solutions.

[0121] In this way, the optimal classification function can be obtained:

[0122]

[0123] In the above formula:

[0124]

[0125] In the formula, x * (1) represents the support vector of each category, x * (-1) represents the support vector of other categories. In the case of nonlinearity in the sample data, it is necessary to add a slack variable ξ to the conditioni ≥0, then:

[0126] y i [(w·x i +b)]+ξ i ≥1.

[0127] minimize value, thereby minimizing The value of is used to fully evaluate the minimum misclassified sample and the maximum classification interval, and the conclusion is the generalized optimal classification surface for nonlinear problems.

[0128] Where C>0 controls the degree of penalty in the case of erroneous samples, and C is a fixed constant.

[0129] When solving the optimal classification surface even number problem, linear decomposition and linear indecomposition are the same. The corresponding condition changes to: 0≤a i ≤C,i=1,2,…l.

[0130] The main way to deal with nonlinear problems is to map them to high-dimensional space, and then linearize the nonlinear problem through the variation function. Then solve the optimal classification surface from it. At this time, there is no need to consider the finite and infinite characteristics of the high-dimensional space function. The mapping relationship is x→φ(x)=(a1φ1(x),a2φ2(x),…,a n φ n (x)).

[0131] The kernel function realizes the change from low dimension to high dimension in support vector machine, that is, k(x i ,x j )=φ i (x)φ j (x). When linearly differentiable, the inner product changes x i ·x j The kernel function k(x) is constrained by Mercer. i ,x j ) is replaced by . The change process is as follows:

[0132]

[0133] So as to obtain the best classifier function

[0134] Among them, the second machine learning model, the GBDT algorithm, is an iterative decision tree algorithm composed of multiple decision trees (Classification and Regression Trees), usually with hundreds of trees, and the depth of each tree does not exceed 6. The CART algorithm uses a binary decision tree, and pruning operations are also required after the decision tree is built. The purpose of the pruning operation is to avoid overfitting.

[0135] The function expression of the tree model in GBDT is:

[0136]

[0137] In the formula, f m (x) represents the mth CART tree model, c j represents the output value of the jth unit, I(x∈R m ) represents the indicator function, and n represents dividing the data set into n units.

[0138] If x∈R m , then I=1, otherwise, I is 0.

[0139] The GBDT mathematical model can adopt the additive model of decision tree, namely:

[0140] F m =F0+β1f1(x)+β2f2(x)+…+β m f m (x);

[0141] In the formula, F m represents the predicted value of GBDT, f m (x) represents the predicted value corresponding to the mth tree, β m represents the learning rate corresponding to the m-th tree, F0 represents the initial value corresponding to the m-th tree, and is the average value of the historical data input into the m-th tree.

[0142] The loss function of the model is the mean square error (MSE), and the loss function can be in, represents the model prediction value, and y represents the true value.

[0143] The gradient of the mth round is -g m (x) = y i -F m , where y i Represents the true value of the i-th data.

[0144] The residual of m is y i -F m-1 (x i ), that is, the gradient of the m-1th round

[0145] The GBDT model is fitted through residuals and gradients to ensure the accuracy of the fitting.

[0146] In some embodiments, before training a preset first machine learning model based on the high-frequency sequence corresponding to the third historical load data to obtain a high-frequency sequence prediction model corresponding to the category, a particle swarm optimization algorithm is also used to optimize the hyperparameters of the first machine learning model.

[0147] Before training the preset second machine learning model according to the low-frequency sequence corresponding to the third historical load data to obtain the low-frequency sequence prediction model corresponding to the category, the particle swarm optimization algorithm is used to optimize the hyperparameters of the second machine learning model.

[0148] In this embodiment, each particle in the particle swarm optimization algorithm (PSO) searches for the optimal solution in an independent search space, and the optimal solution is stored as its current unique extreme value, and is shared by other particles in the entire particle swarm. When the swarm is large, new particles are added to the local optimal point by calculating the distance between particles in the swarm.

[0149] In a particle swarm containing m particles, searching in n-dimensional space, the current best position of the i-th particle is pbest i , the current best position of the particle swarm is gbest.

[0150] Update the current speed of each particle in the entire particle group:

[0151] v i (t+1)=wv i (t)+c1rand1(pbest i (t)-x i (t))+c2rand2(g(t)-x i (t));

[0152] In the formula, v i (t+1) represents the current velocity of the ith particle at iteration t+1, v i (t) represents the current velocity of the ith particle at the tth iteration, w represents the inertia factor, c1 and c2 represent the learning factors, rand1 and rand2 represent random numbers between 0 and 1, and x i (t) represents the position of the ith particle at the tth iteration, pbest i (t) represents the best position of the ith particle in the tth iteration, and gbest(t) represents the best position of the particle group in the tth iteration.

[0153] Update the current position of each particle in the entire particle swarm: x i (t+1)=v i (t+1)+x i (t), where x i(t+1) represents the position of the i-th particle at iteration t+1.

[0154] In some specific embodiments, the medium-term electricity consumption forecasting method for manufacturing users proposed in the embodiments of the present application is used to perform forecasting, and the power load pattern recognition clustering performance and electricity consumption forecasting performance of the above method are determined.

[0155] Six different data sets were used for testing, and the corresponding FMI indicators were 0.9035, 0.9201, 0.9056, 0.9417, 0.9088, and 0.9311, respectively. Different clustering methods were used for clustering, and the results were compared. The method for predicting the medium-term electricity consumption of manufacturing users proposed in the embodiment of the present application had the highest ARI, FMI, and AMI indicators on all data sets, which were 0.9543, 0.9347, and 0.9344, respectively. Compared with other clustering algorithms, its performance is more accurate, while the traditional DPC and K-means clustering algorithms have poor results.

[0156] In addition, the machine learning algorithm after wavelet decomposition optimization has an R2 improvement of 8.98% compared with PSO-GBDT, and MAPE and RMSE are reduced by 19.78% and 11.53% respectively. The prediction and evaluation indicators are improved. The two machine learning algorithms of wavelet decomposition combined with PSO optimization have good prediction effects in the embodiment. Compared with the PSO-GBDT prediction method, the prediction results of the method provided in this embodiment have been significantly improved. 2 Increased from 0.801 to 0.842.

[0157] The embodiment of the present application decomposes the first historical load data of the manufacturing user to be predicted to obtain a high-frequency historical sequence and a low-frequency historical sequence, and can split the complex load data to capture the characteristics and trends in the data; then, predictions are made respectively through the high-frequency sequence prediction model and the low-frequency sequence prediction model corresponding to the category to which the manufacturing user belongs, and accurate predictions can be made for high frequency and low frequency respectively, thereby improving the accuracy of the prediction; at the same time, the electricity consumption behavior of the manufacturing user is taken into account during the prediction, and the corresponding model is selected for prediction, thereby further improving the accuracy of the prediction; finally, the load prediction sequence of the manufacturing user is obtained through the predicted high-frequency prediction sequence and low-frequency prediction sequence, and the electricity consumption of the manufacturing user is calculated, thereby realizing accurate prediction of the medium-term electricity consumption of the manufacturing user.

[0158] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0159] The following is an embodiment of the device of the present application. For details not described in detail, please refer to the corresponding method embodiment described above.

[0160] Figure 3 The following is a schematic diagram showing the structure of a medium-term electricity consumption prediction device for manufacturing users provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown, which are described in detail as follows:

[0161] like Figure 3 As shown, the medium-term electricity consumption prediction device 30 for manufacturing users includes:

[0162] An acquisition module 31 is used to acquire the first historical load data of the manufacturing industry user and the category to which it belongs;

[0163] A decomposition module 32, configured to decompose the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data;

[0164] The prediction module 33 is used to input the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model; input the low-frequency historical data into the low-frequency sequence prediction model corresponding to the category to obtain the low-frequency prediction sequence output by the low-frequency sequence prediction model;

[0165] The restoration module 34 is used to determine the load forecast sequence of the manufacturing users in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence;

[0166] The calculation module 35 is used to obtain the power consumption of manufacturing users in the period to be predicted based on the load prediction sequence.

[0167] In a possible implementation, the acquisition module 31 is specifically used for:

[0168] Get the first historical load data of manufacturing users;

[0169] The category to which the manufacturing user belongs is determined based on the first historical load data and the preset typical load data corresponding to each category.

[0170] In a possible implementation, the decomposition module 32 is specifically configured to:

[0171] Get the wavelet basis function of the preset wavelet transform;

[0172] The first historical load data is decomposed according to the wavelet basis function to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data.

[0173] In a possible implementation, the restoration module 34 is specifically configured to:

[0174] According to the wavelet basis function, the high-frequency prediction sequence and the low-frequency prediction sequence are subjected to wavelet inverse transform to obtain the load prediction sequence of manufacturing users in the forecast period.

[0175] In a possible implementation, the medium-term electricity consumption prediction device 30 for manufacturing users further includes a training module for:

[0176] Obtain the second historical load data of multiple manufacturing users;

[0177] Set the clustering criterion function, fuzzy index and number of clusters;

[0178] Randomly select a cluster number of manufacturing users as cluster centers;

[0179] Determine a fuzzy membership matrix according to the second historical load data, the cluster center and the fuzzy index;

[0180] According to the fuzzy membership matrix and the second historical load data, the cluster center is updated; according to the second historical load data, the updated cluster center and the fuzzy index, the fuzzy membership matrix is ​​updated; and according to the updated cluster center and the updated fuzzy membership matrix, the value of the criterion function is calculated; and an iterative calculation of the cluster center is completed;

[0181] Iterate continuously until the criterion function is smaller than a preset value, and determine multiple categories according to the cluster centers corresponding to the criterion function smaller than the preset value, as well as the typical load data corresponding to each category.

[0182] In a possible implementation, the training module is further used to:

[0183] For each category, determining third historical load data of manufacturing users corresponding to the category from the second historical load data;

[0184] Decomposing the third historical load data to obtain a high-frequency sequence and a low-frequency sequence corresponding to the third historical load data;

[0185] According to the high-frequency sequence corresponding to the third historical load data, a preset first machine learning model is trained to obtain a high-frequency sequence prediction model corresponding to the category;

[0186] According to the low-frequency sequence corresponding to the third historical load data, the preset second machine learning model is trained to obtain a low-frequency sequence prediction model corresponding to the category.

[0187] In a possible implementation, the training module is further used to:

[0188] The particle swarm optimization algorithm is used to optimize the hyperparameters of the first machine learning model;

[0189] The training module is also used to:

[0190] The particle swarm optimization algorithm is used to optimize the hyperparameters of the second machine learning model.

[0191] Figure 4 Schematic diagram of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 40 of this embodiment includes: a processor 41, a memory 42, and a computer program 43 stored in the memory 42 and executable on the processor 41. When the processor 41 executes the computer program 43, the steps in the above-mentioned embodiments of the method for predicting the medium-term electricity consumption of manufacturing users are implemented, such as Figure 1 Alternatively, when the processor 41 executes the computer program 43, the functions of each module in the above-mentioned device embodiments are realized, for example, Figure 3 The functions of the modules 31 to 35 are shown.

[0192] Exemplarily, the computer program 43 may be divided into one or more modules / units, one or more modules / units are stored in the memory 42 and executed by the processor 41 to complete the present application. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 43 in the electronic device 40. For example, the computer program 43 may be divided into Figure 3 Modules 31 to 35 are shown.

[0193] The electronic device 40 may include, but is not limited to, a processor 41 and a memory 42. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 40 and does not constitute a limitation of the electronic device 40. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0194] The processor 41 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0195] The memory 42 may be an internal storage unit of the electronic device 40, such as a hard disk or memory of the electronic device 40. The memory 42 may also be an external storage device of the electronic device 40, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 40. Further, the memory 42 may also include both an internal storage unit of the electronic device 40 and an external storage device. The memory 42 is used to store computer programs and other programs and data required by the electronic device. The memory 42 may also be used to temporarily store data that has been output or is to be output.

[0196] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0197] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0198] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0199] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0202] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0203] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for predicting medium-term electricity consumption of manufacturing users, characterized in that: include: Obtain the first historical load data of manufacturing users and the categories they belong to; Decomposing the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data; Input the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model; input the low-frequency historical data into the low-frequency sequence prediction model corresponding to the category to obtain the low-frequency prediction sequence output by the low-frequency sequence prediction model; Determine the load forecast sequence of the manufacturing user in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence; Based on the load forecast sequence, the power consumption of the manufacturing users in the forecast period is obtained.

2. The method for predicting medium-term electricity consumption of manufacturing users according to claim 1 is characterized in that: The obtaining of the first historical load data of the manufacturing industry user and the category to which it belongs includes: Get the first historical load data of manufacturing users; The category to which the manufacturing user belongs is determined based on the first historical load data and the preset typical load data corresponding to each category.

3. The method for predicting medium-term electricity consumption of manufacturing users according to claim 1 is characterized in that: Decomposing the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the historical load data includes: Get the wavelet basis function of the preset wavelet transform; The first historical load data is decomposed according to the wavelet basis function to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data.

4. The method for predicting medium-term electricity consumption of manufacturing users according to claim 3 is characterized in that: Determining the load forecast sequence of the manufacturing user in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence includes: According to the wavelet basis function, the high-frequency prediction sequence and the low-frequency prediction sequence are subjected to wavelet inverse transformation to obtain the load prediction sequence of the manufacturing users in the period to be predicted.

5. The method for predicting medium-term electricity consumption of manufacturing users according to claim 1 is characterized in that: Before obtaining the historical load data of manufacturing users and the categories to which they belong, the following step is also included: Obtain the second historical load data of multiple manufacturing users; Set the clustering criterion function, fuzzy index and number of clusters; Randomly select the manufacturing users of the cluster number as cluster centers; Determining a fuzzy membership matrix according to the second historical load data, the cluster center and the fuzzy index; According to the fuzzy membership matrix and the second historical load data, the cluster center is updated; according to the second historical load data, the updated cluster center and the fuzzy index, the fuzzy membership matrix is ​​updated; and according to the updated cluster center and the updated fuzzy membership matrix, the value of the criterion function is calculated; and an iterative calculation of the cluster center is completed; Iterate continuously until the criterion function is smaller than a preset value, and determine multiple categories according to the cluster centers corresponding to the criterion functions smaller than the preset value, as well as typical load data corresponding to each category.

6. The method for predicting medium-term electricity consumption of manufacturing users according to claim 5 is characterized in that: Before inputting the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model, the method further includes: For each category, determining third historical load data of manufacturing users corresponding to the category from the second historical load data; Decomposing the third historical load data to obtain a high-frequency sequence and a low-frequency sequence corresponding to the third historical load data; According to the high-frequency sequence corresponding to the third historical load data, a preset first machine learning model is trained to obtain a high-frequency sequence prediction model corresponding to the category; According to the low-frequency sequence corresponding to the third historical load data, the preset second machine learning model is trained to obtain a low-frequency sequence prediction model corresponding to the category.

7. The method for predicting medium-term electricity consumption of manufacturing users according to claim 6 is characterized in that: Before training the preset first machine learning model according to the high frequency sequence corresponding to the third historical load data to obtain the high frequency sequence prediction model corresponding to the category, the method further includes: Optimizing the hyperparameters of the first machine learning model using a particle swarm optimization algorithm; Before training the preset second machine learning model according to the low-frequency sequence corresponding to the third historical load data to obtain the low-frequency sequence prediction model corresponding to the category, the method further includes: The particle swarm optimization algorithm is used to optimize the hyperparameters of the second machine learning model.

8. A medium-term electricity consumption prediction device for manufacturing users, characterized in that: include: An acquisition module, used to acquire the first historical load data of manufacturing users and the category to which it belongs; a decomposition module, configured to decompose the first historical load data to obtain a high-frequency historical sequence and a low-frequency historical sequence corresponding to the first historical load data; A prediction module, used to input the high-frequency historical sequence into the high-frequency sequence prediction model corresponding to the category to obtain the high-frequency prediction sequence output by the high-frequency sequence prediction model; input the low-frequency historical data into the low-frequency sequence prediction model corresponding to the category to obtain the low-frequency prediction sequence output by the low-frequency sequence prediction model; A restoration module, used to determine the load forecast sequence of the manufacturing user in the forecast period according to the high-frequency forecast sequence and the low-frequency forecast sequence; The calculation module is used to obtain the power consumption of the manufacturing users in the period to be predicted based on the load prediction sequence.

9. An electronic device comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.