A method for predicting user power load based on data analysis
By combining the clustering algorithm and the MPEA algorithm with the LSTM model, the date type of the user's power load is identified and predicted, which solves the problem that the impact of date type is not considered in the existing technology, and achieves high-precision and automated power load forecasting.
Patent Information
- Application Number
- CN202111301447.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-04
AI Technical Summary
Existing time series forecasting methods fail to effectively consider date type factors, resulting in large user power load prediction errors, especially when the actual date type is inconsistent with the labeled date type.
The clustering algorithm is used to identify date types in historical data, and the MPEA algorithm is used to predict future date types. It is combined with the LSTM model to build a training set for power load prediction, and automatically identifies and adapts to different user power load patterns.
It improves the accuracy and adaptability of power load forecasting, is suitable for a variety of power user types, reduces the work of manual calibration of date types, and achieves high-precision automated forecasting.
Smart Images

Figure CN114004408B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power load prediction, and specifically relates to a method for analyzing a user's power load by using data analysis technology to predict the user's power load on a certain day in the future. Background Art
[0002] Energy is an important pillar of economic and social development. As my country's economic development model changes from "two highs and two lows" (high input, high energy consumption, low efficiency, and low output) to one high and two lows (high added value, low consumption, and low pollution), the Energy Internet has become an important facility and technical means to promote low-carbon environmental protection and efficient use of energy. With electricity as the core, the Energy Internet integrates heat, cold, gas and other energy, comprehensively utilizes Internet and other technologies, deeply integrates energy systems and information and communication systems, coordinates the production, transmission, distribution, storage, conversion, consumption and trading of multiple energy sources, and has an open energy Internet network with high efficiency, cleanliness, low carbon and security characteristics.
[0003] It is predicted that by 2050, clean energy will account for 70% of installed power generation capacity, and electricity consumption will account for about 50% of terminal energy consumption. Clean energy has the characteristic of unstable output, and the large proportion of clean energy consumption has put forward higher and higher requirements for the intelligence of energy Internet. Accurately predicting user power load is of great significance for scientifically designing the architecture of energy Internet and optimizing resource allocation, enhancing grid flexibility, reducing energy costs, and improving economic benefits.
[0004] At present, most of the existing general time series prediction methods (such as differential integrated moving average autoregressive model or exponential smoothing prediction method) do not take into account the influence of date type factors, while user power load is usually closely related to date type, and these methods are usually only suitable for short-term prediction with small data volume; while other time series prediction methods consider date type, but they only consider its impact on user power load prediction based on the marked date type (working day or holiday). If the actual date type is inconsistent with the marked date type, it will lead to a large error between the model prediction value and the actual value. For example, if the working mode of a company is "three days of work and one day of rest", then the holidays (such as Sunday) marked on the statutory holidays are likely to be working days in the company, resulting in a large prediction error. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention proposes a method for predicting future user power loads based on historical data of user power loads. The method can automatically identify date types and consider the impact of date type changes on user power loads, thereby improving prediction accuracy.
[0006] The key point of the present invention is: according to the historical data of the user's power load, a clustering algorithm is used to divide the date type of the historical data (belonging to working days or holidays). According to the change of the date type of the historical data, the MPEA algorithm (Mode-based Period Extension Algorithm) is used to predict the date type of the power load data of a certain day in the future. The user's power load historical data is divided into two categories according to its date type: working days or holidays, and a training set is constructed and an LSTM (Long Short-Term Memory) model is trained respectively. Then the trained LSTM model can be used to predict the power load of a certain day in the future.
[0007] The present invention first collects a historical data set of user power loads for N days, and can accurately predict the user power load for the future N+1 day without manually specifying the date type label of the data. The method proposed in the present invention has strong adaptability to the situation where the user's actual date type is inconsistent with the statutory holidays, and is therefore suitable for a variety of power user types (such as residential users, commercial users, industrial users, etc.). In addition, the method proposed in the present invention has a high degree of automation and high accuracy, as well as the ability to be expanded to a variety of user date types.
[0008] Step 1: Obtain historical data sets of user power loads
[0009] Collect user power load data, the data set is represented by DS; each sampling record includes sampling date, sampling time, and active power;
[0010] Assuming that the user power load data required in the present invention has been obtained by a certain collection method, the data set is represented by DS. DS is the user power load data with a sampling interval of 1 minute, and each sampling record includes the sampling date, sampling time, active power, etc.
[0011] The user power load data structure is shown in Table 1:
[0012] Table 1 Example of user power load sequence data
[0013]
[0014] Step 2: Data Preprocessing
[0015] Step 2.1: Normalization
[0016] The normalization method used is maximum and minimum normalization, as shown in Formula 1.
[0017]
[0018] Among them, it means P* The power load sequence after the maximum and minimum values are normalized; P represents the original power load sequence in DS; P min Indicates the minimum value of power load in DS; P max Indicates the maximum value of the power load in DS.
[0019] Step 2.2: Build the dictionary structure
[0020] The data obtained by step 2.1 is organized into a dictionary structure. The date is used as the dictionary key, and the sequence of power load data corresponding to the date is used as the value. The key type is a string in the format of "year-mouth-day";
[0021] Step 3: Date type analysis.
[0022] The study found that the change in user power load within a day has a large correlation with the date type. The correlation between user power load sequences of different date types is weak, while the correlation between user power load sequences of the same date type is strong. Therefore, if the original data set DS is directly used to train the model without considering the impact of the date type on the user power load sequence within a day, the model training accuracy will be reduced, and even non-convergence will occur. The present invention improves the training accuracy of the model by analyzing the date type of the historical data of user power load.
[0023] The purpose of date type analysis is to determine the date type of daily power load data by analyzing the power load sequence of users in the past N days. The idea of date type analysis is to divide the power load sequence of N days into two categories: working days and holidays through the k-means clustering algorithm.
[0024] Let symbol D represent a list of user power load sequences within N days starting from a certain date. D = [P *[year-mouth-day] , P *[year-mouth-day]+1 , P *[year-mouth-day]+2 ,…,P *[year-mouth-day]+N-1 ]; In this clustering algorithm, each sample is a sequence, and the sample interval is the dynamic time warping function DTW of the sequence; the date keys are two power load sequences P of A and B. *[A] With P *[B] The sample distance between them is defined as DTW(P *[A] ,P *[B] );
[0025] After clustering, for each sequence sample D in D i Add a type label and output the label in the form of an array represented by the symbol L; L = [L0, L1, ..., L N-1 ], L i ∈{0, 1}.
[0026] Step 4: Future Date Type Prediction
[0027] The periodicity of date type changes is extracted from the label array L, and the date type of future dates is predicted using this periodicity.
[0028] Since each element value in L only represents the date type to which the date corresponding to the index of the element belongs, there is no difference in numerical value. If a general sequence prediction algorithm is used alone (for example: differential integrated moving average autoregressive model or exponential smoothing prediction), the effect is not ideal (they are all designed for numerical time series). The present invention proposes a new sequence prediction algorithm for periodic sequences whose element values are integers and have no numerical meaning - a pattern-based period extension algorithm, referred to as the MPEA algorithm. The algorithm takes an integer sequence L (L is of length N, which is used to represent date types from 0 to N days in the present invention) and a prediction step length n as input, and outputs a sequence L′ of length n, where L′ represents the predicted values of indexes from N to N+n.
[0029] Step 4.1: Cycle Extraction
[0030] Extract the period of the input sequence L, which is denoted as T; divide the original sequence L into periods from 1 to N / 2, compare the differences between the subsequences obtained by segmentation under different periods, and select the period corresponding to the segmentation method with the smallest difference as the period of the original sequence. For each segmentation with an interval of t, there is a score, which represents the similarity between the subsequences obtained by the segmentation method. The smaller the score, the smaller the similarity, and the larger the score, the greater the similarity. The period corresponding to the segmentation method with the largest score value is selected as the optimal period T of the original sequence L. Let the function score(L, t) represent the similarity score between the subsequences obtained by segmenting the input sequence L with a period length of t. Its formal description is:
[0031]
[0032] Among them, L i represents the sample value of index i in the input sequence L, N is the length of L, and the formal description of the equal function is:
[0033]
[0034] Let EXTRACT_CYCEL(L) represent the algorithm for extracting cycles from sequence L. Its pseudo code is shown in Algorithm 1:
[0035]
[0036] Step 4.2: Pattern Extraction
[0037] In step 4.1, the period T of the input sequence L is obtained. With T as the interval, L is divided into N / T subsequences, each subsequence is T long. If N / T is not an integer, it is rounded down and the redundant sample values are discarded. After that, pattern extraction is performed on these subsequences. Pattern extraction is to take the mode between the sample values corresponding to the same index of each subsequence to obtain a new subsequence, namely the pattern subsequence.
[0038] Let EXTRACT_MODE(L, T) represent the algorithm for extracting the pattern subsequence W from the sequence L with T as the period. Its pseudo code is shown in Algorithm 2:
[0039]
[0040] Wherein, GET_MODE(P) means obtaining the mode of the integer sequence P.
[0041] Step 4.3: Predict Date Type
[0042] Predicting the sequence within n steps in the future is actually to extend the original sequence L with a pattern subsequence with T as the period and W as the length. Let the predicted sequence within n steps in the future be L′, L′ i represents the predicted value at time i, 0≤i<n; then:
[0043] L′ i =W (N+i)mod T (4)
[0044] In formula 4, mod means modulus. Let the function FORECAST(W, n, N) be used to represent the prediction algorithm, where W is the pattern subsequence obtained in step 4.2, n is the specified step length, and N is the length of the input sequence L in steps 4.1 and 4.2. Its pseudo code is shown in Algorithm 3:
[0045]
[0046] Combined with step 4.1 to step 4.3. The pseudo code of the overall process of the MPEA algorithm is shown in Algorithm 4. Its parameters are a sequence L and a step length n. By analyzing the periodicity of L, the sample values of the next n steps are predicted, and a sequence L′ with a length of n is output. L′ represents the date type of the next n days.
[0047]
[0048] Step 5: Build a training set and train the LSTM model.
[0049] Assume that the prediction target is P *[year-mouth-day]+N. Let the label sequence obtained by date type analysis be L. Let P be predicted using the future date type prediction algorithm *[year-mouth-day]+N The prediction result of the date type is G, G∈{0,1}.
[0050] The specific steps to construct the training set are as follows:
[0051] Step 5.1: Extract similar data
[0052] Extract all sequence samples with date type G from D to form sample sublist D (G) . D (G) The length of D is H. i (G) Indicates D i (G) The i-th sequence in is numbered starting from 0, 0≤i<H.
[0053] Step 5.2: Build a training set
[0054] Assume that the input training set of the LSTM model is X, and the output training set is y; the definitions of X and y are shown in Equation 5 and Equation 6;
[0055]
[0056]
[0057] Each row of X is an input sample, each row of y is an output sample, K is the length of each row of X, and K is called the split parameter; its meaning is "use the sequence of the previous K days to predict the data of the next day."
[0058] Step 5.3: Train the LSTM model
[0059] The LSTM model is trained using the training set consisting of X and y, represented by the symbol MD.
[0060] Step 6: Use the LSTM model to predict future user power load sequences
[0061] After training the LSTM model MD, the specific steps of using MD to predict future user power load sequences are as follows:
[0062] Step 6.1: Prediction
[0063] Let the LSTM model MD prediction input be Z, and Z be D (G) A list consisting of the last K sequences in , Take Z as input and call MD to get the prediction target, that is, the normalized user power load sequence P *[year-mouth-day]+N .
[0064] Step 6.2: Denormalization
[0065] P *[year-mouth-day]+N After reverse normalization, we can get the user power load sequence P for the next day. *[year-mouth-day]+N . As shown in Formula 7.
[0066] P [year-mouth-day]+N =(P max -P min ) *[year-mouth-day]+N +P min (7)
[0067] Through the above steps 1 to 6, the list D consisting of the user power load sequence data of N days is used as input to predict the user power load sequence P for the next day (i.e., the N+1th day). [year-mouth-day]+N .
[0068] As a preference, the sample interval is a dynamic time warping function DTW of a sequence; the date keys are two power load sequences P of A and B. *[A] With P *[B] The DTW (P *[A] ,P *[B] ), defined as
[0069] As shown in formula 8:
[0070]
[0071] In equation 8, π=[π0, π1,…,π K ] is a list of index pairs, where each element π K is an index pair, P i *[A] and P j *[B] Represent the active power sequence P *[A] The sample value and active power sequence P at index i *[B] The sample value at index j; let the lengths of the two sequences be n and m respectively, and in the present invention, the values of n and m are both 1440. π satisfies the following conditions:
[0072] π k =(i k , j k ), 0≤i k <n, 0≤j k <m
[0073] π0=(0,0), π K =(n-1,m-1)
[0074] ●For all k>0,π k =(ik , j k ) and π k-1 =(i k-1 , j k-1 ) is as follows:
[0075] ■i k-1 ≤i k <i k-1 +1
[0076] ■j k-1 ≤j k <j k-1 +1.
[0077] The present invention has the following advantages:
[0078] 1. In terms of data collection and preprocessing: the present invention only uses historical user power load data to predict future user power load data, without involving other data features. Therefore, data processing is convenient, eliminating the tedious work of manually calibrating data date types.
[0079] 2. In terms of prediction accuracy: the present invention takes into account the impact of date type on daily user power load changes when making predictions. And through cluster analysis of user power load sequences, the date type (working day or weekend) is automatically identified, which is suitable for the power consumption patterns of various power users and has a high prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 : Data dictionary structure example;
[0081] Figure 2 : Cycle extraction example;
[0082] Figure 3 : Schematic diagram of pattern extraction;
[0083] Figure 4 : Forecast the user power load sequence on August 31, 2020. DETAILED DESCRIPTION
[0084] All codes in the present invention are implemented using Python language.
[0085] Step 1: Obtain the historical data set of user power load.
[0086] In the present invention, the user power load data is collected using a smart meter. The smart meter collects the user's power data in real time with a sampling interval of 1 minute, and uploads the data to the data acquisition server in real time. The server will add a timestamp to the collected data and save it in csv (Comma-Separated Values, character separated value file format). At the same time, the ftp service is configured on the data acquisition server to provide an interface for external network access to data.
[0087] The staff accesses the data collection server through the network using the FTP protocol to obtain the csv format file and saves it to the local computer.
[0088] Step 2: Data Preprocessing:
[0089] Step 2.1: Normalization.
[0090] First, use the read_csv function in the pandas library to read the csv file in step 1 into the memory in the form of a DataFrame class object of the pandas library, denoted as df. Then, use the MinMaxScaler class in the preprocessing module of the scikit-learn library to create an object instance, denoted as min_max_scaler. With df as the parameter, call the fit_transform function of min_max_scaler to complete the normalization of the power load data.
[0091] Step 2.2: Build the dictionary structure.
[0092] like Figure 1 As shown, the present invention completes the construction of the dictionary structure by setting the date column in the DataFrame class object as the index column of the DataFrame class object. Afterwards, according to the specified forecast target date, the user power load sequence one month before the target date is extracted from df in the form of date key index as training data, and saved in the form of a sequence list object, denoted as D. D is a 30×1440 two-dimensional numpy array (30 days, 1440 power load data per day).
[0093] Step 3: Date type analysis.
[0094] In the present invention, the dynamic distortion function used in the date type analysis step is implemented by the dtw function of the metrics module of the tslearn library. The k-means clustering algorithm is implemented using the TimeSeriesKMeans class of the clustering module of the tslearn library. First, create a TimeSeriesKMeans class object, denoted as tskmeans_model. The initialization parameters of the tskmeans_model object are: the number of clusters n_clusters is set to 2, and the sample distance function metric is set to the dynamic distortion function dtw. Afterwards, the fit_predict function of the tskmeans_model object is called with the user power load sequence D of the past month in step 2.2 as the function parameter. Get the label sequence L. L is a one-dimensional numpy array of length 30 (date type labels corresponding to 30 days).
[0095] Step 4: Future date type prediction.
[0096] Step 4.1: Periodic extraction. Figure 2 As shown, in the present invention, the cycle extraction function is implemented using Python language, and the function name is extract_cycel. The parameter of extract_cycel is a one-dimensional numpy array (label sequence). With the label sequence L obtained in step 3 as a parameter, the extract_cycel method is called to obtain the cycle T. T is an integer.
[0097] Step 4.2: Pattern extraction. Figure 3 As shown, in the present invention, a pattern extraction function is implemented using Python language, and the function name is extract_mode. The parameters of extract_mode are a one-dimensional numpy array (label sequence) and an integer (segmentation period). With the label sequence L obtained in step 3 and the period T obtained in step 4.1 as parameters, the extract_mode method is called to obtain the pattern subsequence W. W is a one-dimensional numpy array of length T.
[0098] Step 4.3: Prediction. In the present invention, the prediction function is implemented using Python language, and the function name is forecast. The parameters of the forecast function are a one-dimensional numpy array (pattern subsequence), an integer n (prediction step) and an integer N (label sequence length). The forecast function is called with the pattern subsequence W obtained in step 4.2, the step n=1, and the length N of the label sequence L obtained in step 3 as parameters. The predicted date type sequence L′ is a one-dimensional numpy array with a length of 1. Let G represent the date type of the specified prediction date, G=L′[0].
[0099] Step 5: Build a training set and train the LSTM model.
[0100] Step 5.1: Extract similar data. Using the python expression "L==G" as a parameter, call the where function of the numpy library to obtain the index array of all power load sequences with date type G in D. Index is a one-dimensional numpy array. Then, use the python expression "D[index]" to extract the list D consisting of all power load sequences with date type G from list D. (G) , D (G) is a 2D numpy array.
[0101] Step 5.2: Construct a training set. (G) , K = 2 is the segmentation parameter, and the input training set and output training set X, y are constructed respectively. X is a three-dimensional numpy array, and y is a two-dimensional numpy array.
[0102] Step 5.3: Train the LSTM model. The LSTM model in the present invention is implemented using the Tensorflow library and saved in the form of a Tensorflow model object, denoted as MD. The activation function of all LSTM layers used in this model is the relu function, the optimizer used is adam, and the loss function is mean_squared_error (mean square error function). Its structure is shown in Table 2:
[0103] Table 2 LSTM model structure used in the present invention
[0104]
[0105] With X, y, and epochs = 400 (number of training rounds) as parameters, call the MD object fit function to complete the training of the MD model.
[0106] Step 6: Use the LSTM model to predict future user power load sequences.
[0107] Step 6.1: Prediction. From the list of similar sequences D (G) Extract the last K (K is 2 in this invention) sequence samples as parameters, call the predict function of the MD object to get the prediction result, that is, the normalized power load sequence P for the next day *[year-mouth-day]+N , P *[year-mouth-day]+N is a 1D numpy array of length 1440.
[0108] Step 6.2: Denormalization. *[year-mouth-day]+NAs a parameter, call the inverse_transform function of the min_max_scaler object obtained in step 2.1 to obtain the power load sequence P for the next day. [year-mouth-day]+N .
[0109] Figure 4 This is the effect diagram of the present invention using the user power load sequence from August 1, 2020 to August 30, 2020 as input to predict the user power load time series on August 31, 2020. After calculation, Figure 4 The root mean square error RMSE between the predicted sequence predict and the real sequence real is 0.0123, and the mean absolute error MAE is 0.0643, which has good prediction accuracy.
Claims
1. A user power load forecasting method based on data analysis, characterized in that: The method specifically comprises the following steps: Step 1: Obtain historical data sets of user power loads Collect user power load data, the data set is represented by DS; each sampling record includes sampling date, sampling time, and active power; Step 2: Data Preprocessing Step 2.1: Normalization The normalization method used is maximum and minimum normalization, as shown in formula 1; Among them, it means P * The power load sequence after the maximum and minimum values are normalized; P represents the original power load sequence in DS; P min Indicates the minimum value of power load in DS; P max Indicates the maximum value of the power load in DS; Step 2.2: Build the dictionary structure The data obtained in step 2.1 are sorted into a dictionary structure; the date is used as the dictionary key, and the sequence of power load data corresponding to the date is used as the value; the key type is a string in the format of "year-mouth-day"; Step 3: Date type analysis; The N-day power load sequence is divided into two categories: working days and holidays by using the k-means clustering algorithm; Let symbol D represent the list of user power load sequences within N days from a certain date; D = [P *[year-mouth-day] , P *[year-mouth-day]+1 , P *[year-mouth-day]+2 ,…,P *[year-mouth-day]+N-1 ]; In this clustering algorithm, each sample is a sequence, and the sample interval is the dynamic time warping function DTW of the sequence; the date keys are two power load sequences P of A and B. *[A] With P *[B] The sample distance between them is defined as DTW(P *[A] ,P *[B] ); After clustering, for each sequence sample D in D i Add a type label and output the label in the form of an array represented by the symbol L; L = [L0, L1, ..., L N-1 ], L i ∈{0,1}; Step 4: Future Date Type Prediction Extract the periodicity of date type changes from the label array L, and use this periodicity to predict the date type of future dates; Step 4.1: Cycle Extraction Extract the period of the input sequence L, which is recorded as T; for each segmentation with an interval of t, there is a score, which represents the similarity between the subsequences obtained by the segmentation method; the smaller the score, the smaller the similarity, and the larger the score, the greater the similarity; the period corresponding to the segmentation method with the largest score value is selected as the optimal period T of the original sequence L; let the function score(L, t) represent the similarity score between the subsequences obtained by segmenting the input sequence L with a period length of t; its formal description is: Among them, L i represents the sample value of index i in the input sequence L, N is the length of L, and the formal description of the equal function is: Let EXTRACT_CYCEL(L) represent the algorithm for extracting cycles from sequence L. Its pseudo code is shown in Algorithm 1: Step 4.2: Pattern Extraction In step 4.1, the period T of the input sequence L is obtained; L is divided into N / T subsequences at intervals of T, each subsequence is T long, and if N / T is not an integer, it is rounded down and the excess sample values are discarded; then, pattern extraction is performed on these subsequences; pattern extraction is to take the mode between the sample values corresponding to the same index of each subsequence to obtain a new subsequence, namely the pattern subsequence; Let EXTRACT_MODE(L, T) represent the algorithm for extracting a pattern subsequence W from a sequence L with a period of T. Its pseudo code is shown in Algorithm 2: Among them, GET_MODE(P) means obtaining the mode of the integer sequence P; Step 4.3: Predict Date Type To predict the sequence within n steps in the future, in fact, it is to extend the original sequence L with a pattern subsequence with T as the period and W as the period. Let the predicted sequence within n steps in the future be L′, L′ i represents the predicted value at time i, 0≤i<n; then: L′ i =W (N+i)modT (4) In Formula 4, mod means modulus. Let the function FORECAST(W, n, N) be used to represent the prediction algorithm, where W is the pattern subsequence obtained in step 4.2, n is the specified step length, and N is the length of the input sequence L in steps 4.1 and 4.
2. Its pseudo code is shown in Algorithm 3: Combining steps 4.1 to 4.3; the pseudo code of the overall process of the MPEA algorithm is shown in Algorithm 4; its parameters are a sequence L and a step length n. By analyzing the periodicity of L, the sample values of the next n steps are predicted, and a sequence L′ with a length of n is output, where L′ represents the date type of the next n days; Step 5: Build a training set and train the LSTM model; Assume that the prediction target is P *[year-mouth-day]+N ; Let the label sequence obtained by date type analysis be L; let P be predicted using the future date type prediction algorithm *[year-mouth-day]+N The prediction result of the date type is G, G∈{0,1}; The specific steps to construct the training set are as follows: Step 5.1: Extract similar data Extract all sequence samples with date type G from D to form sample sublist D (G) ;D (G) The length of D is H; i (G) Indicates D i (G) The i-th sequence in is numbered starting from 0, 0≤i<H; Step 5.2: Build a training set Assume that the input training set of the LSTM model is X, and the output training set is y; the definitions of X and y are shown in Equation 5 and Equation 6; Each row of X is an input sample, each row of y is an output sample, K is the length of each row of X, and K is called the segmentation parameter; Step 5.3: Train the LSTM model Use the training set consisting of X and y to train the LSTM model, represented by the symbol MD; Step 6: Use the LSTM model to predict future user power load sequences After training the LSTM model MD, the specific steps of using MD to predict future user power load sequences are as follows: Step 6.1: Prediction Let the LSTM model MD prediction input be Z, and Z be D (G) A list consisting of the last K sequences in , Take Z as input and call MD to get the prediction target, that is, the normalized user power load sequence P *[year-mouth-day]+N ; Step (6.2): Denormalization P *[year-mouth-day]+N After reverse normalization, we can get the user power load sequence P for the next day. *[year-mouth-day]+N ; As shown in formula 7; P [year-mouth-day]+N =(P max -P min )P *[year-mouth-day]+N +P min (7) Through the above steps 1 to 6, for the list D consisting of N days of user power load sequence data, the P of the user power load sequence for the next day is predicted. [year-mouth-day]+N .
2. The method for predicting user power load based on data analysis according to claim 1, characterized in that: The sample interval is a dynamic time warping function DTW of the sequence; the date keys are two power load sequences P of A and B. *[A] With P *[B] The DTW (P *[A] ,P *[B] ), defined as shown in Formula 8: In equation 8, π=[π0, π1,…,π K ] is a list of index pairs, where each element π K is an index pair, P i *[A] and P j *[B] Represent the active power sequence P *[A] The sample value and active power sequence P at index i *[B] The sample value at index j; let the lengths of the two sequences be n and m, respectively, and the values of n and m are both 1440; π satisfies the following conditions: ●π k =(i k ,j k ),0≤i k <n,0≤j k <m ●π0=(0,0),π K =(n-1,m-1) ●For all k>0,π k =(i k , j k ) and π k-1 =(i k-1 , j k-1 ) is as follows: ■i k-1 ≤i k <i k-1 +1 ■j k-1 ≤j k <j k-1 +1。
