Intelligent electricity consumption metering prediction method and system based on big data
By combining sliding window, wavelet packet decomposition, Kalman filtering and LSTM-GRU model, the shortcomings of existing electricity metering forecasting methods in handling nonlinear, non-stationary data and multi-source data relationships are solved, and high-precision and stable electricity load forecasting is achieved.
Patent Information
- Application Number
- CN202511292440.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-11
AI Technical Summary
Existing electricity metering forecasting methods have difficulty in processing nonlinear and non-stationary electricity consumption data, have limited prediction accuracy, and fail to fully consider the complex relationship between multi-source data, resulting in unstable prediction results.
A sliding window and wavelet packet decomposition algorithm is used to reconstruct the signal, combined with Kalman filtering for denoising, to extract time, meteorological and user behavior features. The LSTM-GRU model is used for training, the feature weight distribution is enhanced through the attention mechanism, and the quantum bit superposition coding strategy is introduced to optimize the parameters to build an intelligent electricity metering prediction system based on big data.
It improves the accuracy and reliability of electricity load forecasting, can effectively process nonlinear and non-stationary data, comprehensively consider the influence of multi-source factors, improves the accuracy and stability of forecasting, and displays the forecast results through visualization.
Smart Images

Figure CN120804607A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of electric power, in particular to an intelligent power consumption metering prediction method and system based on big data. BACKGROUND
[0002] In the electric power system, accurate power consumption metering prediction is of great significance for the rational scheduling of electric power, the optimal allocation of resources and the power consumption management of users. With the development of smart grids and the application of big data technology, the traditional power consumption metering prediction method has been difficult to meet the increasing requirements of accuracy and reliability. In the prior art, the commonly used power consumption metering prediction methods include time series analysis method, regression analysis method, neural network method and the like. However, these methods have the following problems: The time series analysis method and the regression analysis method usually assume that the data has a linear relationship, and it is difficult to process nonlinear and non-stationary power consumption data, so the prediction accuracy is limited; The traditional neural network method is prone to gradient disappearance or gradient explosion when processing long sequence data, which leads to difficult model training and unstable prediction effect; The existing method usually only considers the influence of a single factor on the power consumption load, ignores the complex relationship between multi-source data, and is difficult to accurately predict the power consumption load. SUMMARY
[0003] The application aims to solve the above problems, and designs an intelligent power consumption metering prediction method and system based on big data.
[0004] The application provides an intelligent power consumption metering prediction method based on big data in a first aspect, which comprises the following steps: Real-time acquisition of user power consumption, environmental parameters and holiday data through the Internet of Things to form an initial data set; A sliding window and wavelet packet decomposition joint algorithm is adopted, the threshold is dynamically adjusted through the exponential weighted moving average control chart, and multi-stage signal reconstruction is carried out in combination with Kalman filtering to obtain denoised data, time features, weather features and user behavior features are extracted from the denoised data, and target feature data is obtained by dimension reduction using principal component analysis; An LSTM-GRU model is constructed, the LSTM-GRU model is trained using the target feature data, the weight distribution of the features related to the power consumption load prediction is strengthened through the attention mechanism, wherein the gating mechanism of the LSTM layer and the GRU layer in the LSTM-GRU model is multi-scale fused, a multi-granularity attention module is introduced, a qubit superposition coding strategy is adopted, and a global search of the parameter space is carried out in combination with the simulated annealing mechanism; The to-be-predicted data is input into the optimized LSTM-GRU model to obtain the prediction result of the power consumption load, and the prediction result can be visualized and displayed.
[0005] Optionally, in the first implementation manner of the first aspect, the sliding window and wavelet packet decomposition combined algorithm dynamically adjusts the threshold value through an exponentially weighted moving average control chart, and combines Kalman filtering to perform multi-stage signal reconstruction to obtain the denoised data, including: The volatility of the current initial data set is calculated through the sliding window, and the abnormality determination threshold value is dynamically adjusted based on the EWMA control chart; The initial data set is decomposed by wavelet packet, and the signal is reconstructed after retaining the high-frequency transient mutation characteristics; The reconstructed signal is input into the Kalman filter, and the residual impulse noise is eliminated through the state equation and the observation equation to obtain the denoised data.
[0006] Optionally, in the second implementation manner of the first aspect, the time feature, the weather feature and the user behavior feature are extracted from the denoised data, and the target feature data is obtained by using principal component analysis dimension reduction, including: The periodic variation law of the power load is analyzed from the denoised data through Fourier transform, and the periodic features including the hour, day, week and month time dimensions are extracted to obtain the time feature; The denoised data is filtered through correlation analysis and feature selection algorithm, the correlation coefficient between the weather factor and the power load is calculated, and the weather factor with a large correlation coefficient is selected as the feature to obtain the weather feature; The users are classified according to the power habit and the power mode, and the power behavior features of different user groups are extracted through K-means clustering analysis; The extracted time feature, weather feature and user behavior feature are integrated to form an initial feature data set; The initial feature data set is standardized, the covariance matrix of the standardized data is calculated, and the eigenvalues and eigenvectors of the covariance matrix are solved; According to the size of the eigenvalue, the eigenvectors corresponding to the first k largest eigenvalues are selected to obtain the principal component; The initial feature data set is projected onto the principal component to obtain the target feature data after dimension reduction.
[0007] Optionally, in the third implementation manner of the first aspect, the LSTM-GRU model is constructed, the LSTM-GRU model is trained by using the target feature data, and the weight distribution of the features related to the power load prediction is strengthened through the attention mechanism, including: The basic architecture of the LSTM-GRU model is determined, wherein the basic architecture includes an input layer, an LSTM layer, a GRU layer, an attention layer and an output layer; Setting appropriate number of neurons for LSTM layer and GRU layer, randomly initializing connection weights and bias items between layers; Dividing target feature data into training set, validation set and test set, training LSTM-GRU model using training set, calculating weight of each time step and each feature through attention mechanism, and strengthening weight distribution of features related to power load prediction; Using qubit superposition coding strategy, combining simulated annealing mechanism to perform global search in parameter space, and applying the optimized optimal parameters to the LSTM-GRU model; Using test set to evaluate the trained LSTM-GRU model, calculating the prediction error, mean square error and mean absolute error of the model, and finally obtaining the optimized LSTM-GRU model.
[0008] Optionally, in the fourth implementation manner of the first aspect of the present application, the qubit superposition coding strategy is combined with the simulated annealing mechanism to perform global search in the parameter space, which includes: Determine the parameters of the LSTM-GRU model to be optimized, divide the model parameters into continuous layers and discrete layers, and use real number coding and binary coding strategies respectively; Generate initial population through the superposition characteristics of qubits, and use the simulated annealing mechanism to jump out of local optimum in the iteration process; When the validation set error does not improve for 5 generations in succession, randomly reset part of the population individuals and restart the search, and when the maximum number of iterations is reached, determine the optimized optimal parameters.
[0009] Optionally, in the fifth implementation manner of the first aspect of the present application, the parameters of the LSTM-GRU model to be optimized include learning rate, number of neurons of LSTM layer and GRU layer, and weight of attention mechanism.
[0010] Optionally, in the sixth implementation manner of the first aspect of the present application, the input of the predicted data into the optimized LSTM-GRU model to obtain the prediction result of the power load, and the visualization of the prediction result, includes: Input the predicted data into the optimized LSTM-GRU model, use the LSTM layer to capture low-frequency trends, and use the memory unit to process long-term dependencies; The GRU layer captures high-frequency power fluctuations based on the output of the LSTM layer and processes short-term dynamic changes; The output based on the GRU layer is first dynamically distributed with weights of different time steps through time attention to capture periodic patterns, and then features are distributed with different weights through feature attention, and the attention weights are applied to the GRU output to obtain a context vector, wherein the hierarchical attention is used to first perform coarse-grained screening on the time steps, and then fine-grained weighting is performed on the screened features. The context vector is converted into actual numerical values through a full connection layer, and a prediction result of the power consumption load is output.
[0011] The second aspect of the present application provides a power consumption intelligent metering prediction system based on big data, which comprises: An acquisition module is configured to acquire user power consumption, environmental parameters and holiday data in real time through an Internet of Things to form an initial data set. A processing module is configured to adopt a sliding window and wavelet packet decomposition joint algorithm, dynamically adjust a threshold value through an exponentially weighted moving average control chart, and combine Kalman filtering to perform multi-stage signal reconstruction to obtain denoised data, extract time features, weather features and user behavior features from the denoised data, and obtain target feature data by using principal component analysis for dimension reduction. A construction module is configured to construct an LSTM-GRU model, train the LSTM-GRU model using the target feature data, and strengthen weight distribution of features related to power consumption load prediction through an attention mechanism. A prediction module is configured to input to-be-predicted data into the optimized LSTM-GRU model to obtain a prediction result of the power consumption load, and visually display the prediction result.
[0012] The third aspect of the present application provides a power consumption intelligent metering prediction device based on big data, which comprises a memory and at least one processor, and the memory stores instructions; the at least one processor calls the instructions in the memory to enable the power consumption intelligent metering prediction device based on big data to perform the steps of the power consumption intelligent metering prediction method based on big data according to any one of the above.
[0013] The fourth aspect of the present application provides a computer readable storage medium, which stores instructions, and the instructions are executed by a processor to realize the steps of the power consumption intelligent metering prediction method based on big data according to any one of the above.
[0014] In the technical scheme provided by the application, the user power consumption, environmental parameters and holiday data are acquired in real time through the Internet of Things to form an initial data set; a sliding window and wavelet packet decomposition joint algorithm is used to dynamically adjust the threshold through an exponentially weighted moving average control chart, and multi-stage signal reconstruction is performed in combination with Kalman filtering to obtain denoised data; time features, weather features and user behavior features are extracted from the denoised data, and target feature data is obtained by using principal component analysis for dimension reduction; an LSTM-GRU model is constructed, the LSTM-GRU model is trained by using the target feature data, and the weight distribution of features related to power load prediction is strengthened through an attention mechanism; the to-be-predicted data is input into the optimized LSTM-GRU model to obtain a prediction result of the power load, and the prediction result can be visually displayed; the LSTM-GRU model is constructed, the advantages of LSTM in processing long-term dependence and GRU in capturing short-term change features are fully exerted, nonlinear and non-stationary power consumption data can be effectively processed, and the prediction accuracy of the power load is improved; the attention mechanism is introduced, the weight distribution of target features more important for power load prediction can be automatically learned and strengthened, and the prediction ability of the model is further improved; the GA-ACO hybrid algorithm is used to optimize the model parameters, the global search ability of the genetic algorithm and the positive feedback mechanism of the ant colony algorithm are combined, the optimal parameter combination can be quickly found, and the performance and stability of the model are improved; multi-source data such as user power consumption historical data, weather data and holiday data are integrated, and various related features are extracted, various factors affecting the power load are comprehensively considered, and the prediction accuracy and reliability are improved; the prediction result is intuitively displayed to the user through the visualization technology, the user is facilitated to understand and analyze the change trend of the power load, and strong support is provided for the decision of the power system. BRIEF DESCRIPTION OF DRAWINGS
[0015] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments with reference made to the accompanying drawings. The drawings are for purposes of illustration only and are not considered as limiting the application.
[0016] Figure 1 A flowchart of the power consumption intelligent metering prediction method based on big data provided for the embodiments of the application is shown in the figure. Figure 2 A structural schematic diagram of the power consumption intelligent metering prediction system based on big data provided for the embodiments of the application is shown in the figure. Figure 3 A structural schematic diagram of the power consumption intelligent metering prediction device based on big data provided for the embodiments of the application is shown in the figure. DETAILED DESCRIPTION
[0017] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-mentioned drawings, if any, are used to distinguish between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so-termed "first", "second", "third", "fourth" and the like, if any, in the description and in the claims of the present application is not used to describe a particular sequential or chronological order, unless otherwise expressly stated. It is to be understood that the data so used can be interchanged, where appropriate, so that the embodiments described herein can be carried out in a different order than the one illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, article, or apparatus that comprises a list of steps or units not necessarily limited to those explicitly stated, but can include other steps or units not expressly listed or inherent to such process, method, article, or apparatus.
[0018] For the sake of understanding, the specific flow of the embodiments of the present application is described below, please refer to Figure 1 The flowchart of the power consumption intelligent metering prediction method based on big data provided by the embodiments of the present application, which specifically comprises the following steps: Step 101, real-time acquisition of user power consumption, environmental parameters and holiday data through the Internet of Things to form an initial data set; In this embodiment, the process of real-time acquisition of user power consumption, environmental parameters and holiday data through the Internet of Things to form an initial data set is realized by relying on the Internet of Things sensing devices deployed on the user side and in public areas; at the user power consumption end, the smart meter as the core sensing node records the key data such as the instantaneous power consumption and the cumulative power consumption of the user in real time according to the preset collection frequency such as once every 15 minutes, and transmits the data to the local edge gateway through the power line carrier or wireless communication module such as LoRa, NB-IoT; in terms of environmental parameter collection, devices such as temperature and humidity sensors, light sensors and wind speed sensors distributed in different areas continuously monitor environmental information such as real-time temperature, relative humidity, light intensity and wind grade in the area where the user is located, and these data are also aggregated to the data gateway through the Internet of Things communication network after standardized processing; for holiday data, the date attribute information including statutory holidays, weekends, rest days and the like is acquired in real time through the interface of the government information system or the calendar service, and is converted into structured data such as 0 and 1 to identify non-holidays and holidays respectively. Finally, the power consumption data collected by the smart meter, the environmental parameters acquired by the environmental sensor and the holiday data synchronized through the interface are time-stamped and formatted in the edge gateway or the cloud platform, and together constitute an initial data set containing multi-dimensional information.
[0019] Step 102, a sliding window and wavelet packet decomposition combined algorithm is used to dynamically adjust the threshold value through the exponentially weighted moving average control chart, and multi-stage signal reconstruction is performed in combination with Kalman filtering to obtain denoised data, time characteristics, weather characteristics and user behavior characteristics are extracted from the denoised data, and target characteristic data is obtained by dimension reduction using principal component analysis; In this embodiment, the volatility of the current initial data set is calculated by a sliding window, and the abnormality determination threshold is dynamically adjusted based on the EWMA control chart; the initial data set is decomposed by wavelet packet, and the signal is reconstructed after retaining the high-frequency transient mutation characteristics; the reconstructed signal is input into the Kalman filter, and the residual impulse noise is eliminated through the state equation and the observation equation to obtain the denoised data.
[0020] In this embodiment, the periodic variation law of the electric load is analyzed from the denoised data by Fourier transform, and the periodic characteristics including hour, day, week and month time dimensions are extracted to obtain time characteristics; the denoised data is filtered by correlation analysis and feature selection algorithm, the correlation coefficient between meteorological factors and electric load is calculated, and the meteorological factor with large correlation coefficient is selected as the feature to obtain the meteorological feature; the users are classified according to the power usage habits and power usage patterns, and the power usage behavior characteristics of different user groups are extracted by K-means clustering analysis; the extracted time characteristics, weather characteristics and user behavior characteristics are integrated to form an initial feature data set; the initial feature data set is standardized, the covariance matrix of the standardized data is calculated, and the eigenvalues and eigenvectors of the covariance matrix are solved; according to the size of the eigenvalues, the eigenvectors corresponding to the first k largest eigenvalues are selected to obtain the principal components; the initial feature data set is projected onto the principal components to obtain the target feature data after dimension reduction.
[0021] In this embodiment, the denoised electric load time series data is subjected to discrete Fourier transform (DFT), which converts it from time domain to frequency domain, thereby decomposing the data into sinusoidal and cosine components of different frequencies; by analyzing the amplitudes and phases of the frequency components in the frequency domain, significant periodic patterns are identified; for example, a 24-hour cycle corresponds to daily power usage patterns such as morning and evening peaks, a 7-day cycle corresponds to weekly power usage patterns such as weekday and weekend differences, and a 30-day cycle corresponds to monthly power fluctuations; to improve computational efficiency, a fast Fourier transform algorithm can be used; subsequently, by setting a frequency threshold or an energy proportion threshold, the frequency components representing the main periodic changes are selected, and these components are reconstructed back to the time domain to obtain periodic characteristics of each time dimension; for example, retaining the 24-hour cycle component can obtain daily periodic characteristics, and retaining the 7-day cycle component can obtain weekly periodic characteristics; finally, these periodic characteristics are combined with original time stamp information such as hours, days, weeks, months, etc. to form a complete time characteristic set; The de-noised power consumption data and the synchronously collected meteorological data such as temperature, humidity, air pressure, wind speed, and illumination intensity are time-aligned to ensure that the data points correspond to each other in the time dimension; then, the correlation coefficient between each meteorological factor and the power consumption is calculated, and the commonly used correlation coefficient calculation methods include the Pearson correlation coefficient, the Spearman rank correlation coefficient, and the like; for example, the Pearson correlation coefficient between the temperature and the power consumption is calculated, if the coefficient is positive and close to 1, it indicates that the power consumption also increases when the temperature rises, such as the summer air conditioner power consumption; if the coefficient is negative and close to -1, it indicates that the power consumption decreases when the temperature rises, such as the winter heating power consumption; to avoid the problem of multicollinearity, the correlation between the meteorological factors can be further calculated, if it is found that two meteorological factors are highly correlated, such as the temperature and the apparent temperature, then the one with a stronger correlation with the power consumption is selected; finally, a correlation coefficient threshold is set, such as |r|>0.3, and the meteorological factors exceeding the threshold are selected as the final meteorological features; The de-noised user power consumption data is preprocessed to extract the feature vector reflecting the user power consumption habit, for example, the daily power consumption peak period, the valley period, the average power consumption, the peak-valley difference, the power consumption time distribution entropy, and the like; to eliminate the influence of different feature dimensions, the feature vector is standardized; then, the K-means clustering algorithm is applied to classify the users, and the K value can be determined by the elbow method or the silhouette coefficient method to evaluate the clustering effect; for example, when K=3, the users can be divided into three categories of peak type, valley type, and balanced type; for each cluster center, the statistical characteristics of the feature vector are analyzed to extract the typical power consumption mode of the user group; for example, the characteristics of the peak type user can include that the power consumption is significantly higher than other time periods at 9-11 am and 2-5 pm on weekdays, and the weekend power consumption mode is relatively flat; in addition, the distance between each user and the cluster center can be calculated to evaluate the stability of the user power consumption mode; finally, these clustering results and typical power consumption modes are used as the user behavior features.
[0022] In step 103, an LSTM-GRU model is constructed, the LSTM-GRU model is trained by using the target feature data, and the weight distribution of the features related to the power consumption prediction is strengthened through the attention mechanism. In this embodiment, the basic architecture of the LSTM-GRU model is determined, wherein the basic architecture includes an input layer, an LSTM layer, a GRU layer, an attention layer, and an output layer; appropriate numbers of neurons are set for the LSTM layer and the GRU layer, and the connection weights and bias terms between layers are randomly initialized; the target feature data is divided into a training set, a validation set, and a test set, the LSTM-GRU model is trained using the training set, the weight of each time step and each feature is calculated through the attention mechanism, and the weight distribution of the features related to the electricity load prediction is strengthened; a qubit superposition encoding strategy is used, combined with a simulated annealing mechanism for global search of the parameter space, and the optimal parameters obtained by optimization are applied to the LSTM-GRU model; the trained LSTM-GRU model is evaluated using the test set, the prediction error, the mean square error, and the mean absolute error of the model are calculated, and finally the optimized LSTM-GRU model is obtained.
[0023] In this embodiment, the parameters of the LSTM-GRU model to be optimized are determined, the model parameters are divided into continuous layers and discrete layers, and real number encoding and binary encoding strategies are used respectively; an initial population is generated through the superposition characteristics of qubits, and the simulated annealing mechanism is used to jump out of the local optimum in the iteration process; when the validation set error does not improve for 5 generations in a row, randomly reset part of the population individuals and restart the search, and when the maximum number of iterations is reached, the optimal parameters obtained by optimization are determined.
[0024] Step 104, input the data to be predicted into the optimized LSTM-GRU model to obtain the prediction result of the electricity load, and visualize and display the prediction result.
[0025] In this embodiment, the data to be predicted is input into the optimized LSTM-GRU model, the long-term time dependence is captured through the LSTM layer; the GRU layer processes short-term dynamic changes based on the output of the LSTM layer, the importance weight of each time step is calculated based on the output of the GRU layer, the attention weight is applied to the GRU output, and the context vector is obtained; the context vector is converted to an actual numerical value through a fully connected layer, and the prediction result of the electricity load is output.
[0026] In this embodiment, the data to be predicted is usually a pre-processed multi-dimensional sequence containing historical electricity load, weather data and other features; the LSTM layer is composed of multiple LSTM units, each containing three key components: forget gate, input gate and output gate; when the sequence data is input sequentially, the forget gate decides which information in the previous cell state needs to be forgotten according to the current input and the hidden state at the previous time; the input gate decides which information in the current input needs to be added to the cell state; the output gate generates the hidden state at the current time according to the updated cell state; this gating mechanism enables LSTM to effectively capture long-term dependencies in the sequence, such as seasonal electricity consumption patterns, periodic differences between weekdays and weekends, etc.; when processing electricity load prediction, the LSTM layer can learn the influence of electricity consumption patterns in the past few days, weeks or even months on the current load; GRU is a simplified variant of LSTM, which combines the forget gate and input gate into an update gate and introduces a reset gate to control the influence of the previous hidden state; this structure makes GRU more efficient in handling short-term dynamic changes, quickly capturing sudden fluctuations in electricity load, such as air conditioning load changes caused by sudden weather changes, temporary electricity peaks caused by special events, etc.; after the GRU layer processes the sequence data, the attention mechanism is applied to calculate the importance weight of each time step; specifically, a feedforward neural network is used to map the GRU output to a low-dimensional space, and then a softmax function is used to convert it to normalized attention weights; these weights represent the contribution of each time step to the current prediction, for example, when predicting the electricity load in the morning of the next day, the electricity data in the evening of the same day may be more important than the data at an earlier time; finally, the attention weights are weighted and summed with the GRU output to obtain a context vector, which is a fixed-dimensional feature representation containing the most relevant information in the sequence for the current prediction; The fully connected layer is composed of multiple neurons, each connected to all neurons in the previous layer, mapping input features to the output space through a weight matrix and a bias term; in electricity load prediction, the output of the fully connected layer is usually a scalar value representing the predicted electricity load; to convert the model output to the actual electricity load value, inverse normalization may be needed, i.e. mapping the model output from the standardized value range back to the original electricity quantity unit; in addition, to improve the accuracy and reliability of the prediction, a nonlinear activation function such as ReLU or tanh can be introduced in the fully connected layer to capture the complex nonlinear relationship between input features and output; finally, the value obtained after processing through the fully connected layer is the prediction result of the electricity load, which can be used in practical application scenarios such as power dispatching and load management.
[0027] In the optimization design of the LSTM-GRU model in this embodiment, the multi-scale fusion of the gating mechanism is the core link to improve the performance of the model. The gating structure of the LSTM layer can effectively handle long-term dependencies in long sequences by fine-tuning the input, retention and output of information, but the complex gating calculation has a certain lag in capturing high-frequency dynamics. The GRU layer has a more concise update gate and reset gate structure, which has faster computing efficiency and sensitivity to short-term fluctuations while maintaining the ability to capture sequence dependencies. Through multi-scale fusion, the model combines the low-frequency trend capturing ability of the LSTM layer with the high-frequency fluctuation response ability of the GRU layer. Specifically, a cross-layer interaction mechanism is introduced in the update process of the gating parameters, so that the gating state of the LSTM can provide long-term trend reference for the gating decision of the GRU, and the gating feedback of the GRU can also dynamically adjust the attention of the LSTM to recent information, so that the model can maintain sensitivity to key information at different time scales. After inputting the to-be-predicted data into the optimized LSTM-GRU model, the LSTM layer first undertakes the task of capturing low-frequency trends and handling long-term dependencies. When the data flows through the LSTM layer, the forget gate will automatically decide to retain or discard the content of the previous memory unit according to the importance of historical information. For example, in electricity load prediction, it will automatically filter out seasonal irrelevant short-term fluctuation data and focus on retaining annual or quarterly electricity trend features. The input gate is responsible for screening the input information at the current time, and will include data consistent with long-term trends in the update range. The output gate generates an output vector containing low-frequency trend features based on the current cell state and hidden state. Through this process, key information across multiple time steps can be accumulated and passed on. The GRU layer will further capture high-frequency electricity fluctuations based on the output of the LSTM layer, focusing on handling short-term dynamic changes. After receiving the low-frequency trend vector output by the LSTM layer, the GRU layer will fuse it with the short-term fluctuation features in the original data as background information. The reset gate plays a key role in this process. It will evaluate the relevance of the current input and the output of the LSTM layer. When detecting sudden electricity changes such as short-term load peaks, recovery electricity after sudden power outages, etc., the reset gate will weaken the influence of historical information, allowing the model to focus more on short-term fluctuations. The update gate is responsible for deciding how much new information to include in the hidden state, retaining both the trend reference passed on by the LSTM layer and quickly responding to short-term electricity dynamics. Based on the GRU layer output, the multi-granularity attention module further refines key information through hierarchical processing of temporal attention and feature attention. First, the temporal attention mechanism assigns dynamic weights to different time steps of the GRU output. By calculating the correlation between the features of each time step and the overall sequence, it highlights time nodes with periodic patterns, such as daily peak electricity consumption hours and fixed high-load days of the week, and weakens irregular noise interference. Subsequently, the hierarchical attention mechanism performs coarse-grained screening of time steps, retaining a subset of time steps with high contributions based on a preset importance threshold or cluster analysis to reduce redundant calculations. Next, the feature attention mechanism performs fine-grained weighting on the features contained in the screened time steps, such as power load, temperature, holidays, and other influencing factors, and adjusts the weight values based on the correlation between the features and the prediction target. For example, in summer electricity consumption prediction, the weight of the temperature feature is significantly increased. Finally, these attention weights are applied to the GRU output. The resulting context vector not only condenses the information of key time steps but also highlights the influence of important features, significantly improving the model's ability to capture complex sequence patterns and prediction accuracy. See also Figure 2 , a schematic diagram of the structure of a smart electricity metering and prediction system based on big data provided by an embodiment of the present invention, the system includes: The acquisition module is used to obtain user power consumption, environmental parameters and holiday data in real time through the Internet of Things to form an initial data set; The processing module is used to dynamically adjust the threshold using a sliding window and wavelet packet decomposition algorithm through an exponentially weighted moving average control chart, and to perform multi-stage signal reconstruction in conjunction with Kalman filtering to obtain denoised data. The module then extracts temporal, meteorological, and user behavior features from the denoised data, and uses principal component analysis to reduce the dimensionality and obtain target feature data. A construction module is used to build an LSTM-GRU model, train the LSTM-GRU model using target feature data, and strengthen the weight distribution of features related to power load prediction through the attention mechanism; The prediction module is used to input the data to be predicted into the optimized LSTM-GRU model to obtain the prediction results of the power load and visualize the prediction results.
[0028] Figure 3is a structural schematic view of an electricity intelligent metering prediction device based on big data provided by an embodiment of the present application. The electricity intelligent metering prediction device based on big data 300 can have a large difference due to different configurations or performances, and can include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and the storage media 330 can be temporary storage or persistent storage. The programs stored in the storage media 330 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the electricity intelligent metering prediction device based on big data 300. Further, the processor 310 can be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the electricity intelligent metering prediction device based on big data 300 to realize the method provided by the above embodiment.
[0029] The electricity intelligent metering prediction device based on big data 300 can also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that, Figure 3 The electricity intelligent metering prediction device structure shown does not constitute a limitation on the computer device provided by the present application, and can include more or fewer components than shown, or combine certain components, or different component arrangements.
[0030] The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium, or a volatile computer readable storage medium. The computer readable storage medium has instructions stored therein, and when the instructions are run on a computer, the computer executes the steps of the electricity intelligent metering prediction method based on big data provided by the above embodiments.
[0031] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device or apparatus, unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0032] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0033] The basic principles, main features and advantages of the present application are shown and described above. Those skilled in the art should understand that the present application is not limited by the above embodiments, and the above embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. The intelligent electricity metering prediction method based on big data is characterized by: The method comprises the following steps: Use the Internet of Things to obtain real-time user electricity consumption, environmental parameters, and holiday data to form an initial data set; A sliding window combined with wavelet packet decomposition algorithm is used to dynamically adjust the threshold using an exponentially weighted moving average control chart. Multi-stage signal reconstruction is performed in conjunction with Kalman filtering to obtain denoised data. Temporal, meteorological, and user behavior characteristics are extracted from the denoised data, and principal component analysis is used to reduce the dimensionality and obtain the target feature data. An LSTM-GRU model was constructed and trained using target feature data. The attention mechanism was used to strengthen the weight distribution of features related to power load forecasting. The LSTM-GRU model integrated the gating mechanisms of the LSTM and GRU layers at multiple scales, introduced a multi-granularity attention module, and used a qubit superposition encoding strategy combined with a simulated annealing mechanism to perform a global search in the parameter space. The data to be predicted is input into the optimized LSTM-GRU model to obtain the predicted results of power load and visualize the predicted results.
2. The method for predicting electricity consumption based on big data according to claim 1, characterized in that: The sliding window and wavelet packet decomposition combined algorithm is used to dynamically adjust the threshold through the exponentially weighted moving average control chart, and combined with the Kalman filter to perform multi-stage signal reconstruction to obtain denoised data, including: Calculate the volatility of the current initial data set through a sliding window, and dynamically adjust the abnormality judgment threshold based on the EWMA control chart; Perform wavelet packet decomposition on the initial data set, and reconstruct the signal after retaining the transient mutation characteristics of the high-frequency band; The reconstructed signal is input into the Kalman filter, and the residual impulse noise is eliminated through the state equation and observation equation to obtain the denoised data.
3. The method for predicting electricity consumption based on big data according to claim 1, characterized in that: The extraction of time features, meteorological features, and user behavior features from the denoised data, and the use of principal component analysis to reduce the dimension to obtain target feature data, include: The cyclical variation pattern of power load is analyzed from the denoised data through Fourier transform, and the cyclical features including hourly, daily, weekly and monthly time dimensions are extracted to obtain the time features. The denoised data is screened through correlation analysis and feature selection algorithms, the correlation coefficient between meteorological factors and power load is calculated, and meteorological factors with large correlation coefficients are selected as features to obtain meteorological features; Users are classified according to their electricity usage habits and patterns, and the electricity usage behavior characteristics of different user groups are extracted through K-means cluster analysis; Integrate the extracted time features, meteorological features, and user behavior features to form an initial feature dataset; Standardize the initial feature data set, calculate the covariance matrix of the standardized data, and solve the eigenvalues and eigenvectors of the covariance matrix; According to the size of the eigenvalue, select the eigenvectors corresponding to the first k largest eigenvalues to obtain the principal components; The initial feature data set is projected onto the principal component to obtain the target feature data after dimensionality reduction.
4. The method for predicting electricity consumption based on big data according to claim 1, wherein: The LSTM-GRU model is constructed, the target feature data is used to train the LSTM-GRU model, and the weight distribution of features related to power load prediction is strengthened through the attention mechanism, including: Determine the basic architecture of the LSTM-GRU model, which includes the input layer, LSTM layer, GRU layer, attention layer, and output layer; Set the appropriate number of neurons for the LSTM layer and the GRU layer, and randomly initialize the connection weights and bias terms between the layers; The target feature data is divided into training, validation, and test sets. The LSTM-GRU model is trained using the training set. The weight of each time step and each feature is calculated through the attention mechanism to strengthen the weight distribution of features related to power load prediction. A quantum bit superposition coding strategy is used, combined with a simulated annealing mechanism to perform a global search of the parameter space, and the optimized optimal parameters are applied to the LSTM-GRU model. The trained LSTM-GRU model is evaluated using the test set, and the prediction error, mean square error, and mean absolute error of the model are calculated to finally obtain the optimized LSTM-GRU model.
5. The method for predicting electricity consumption based on big data according to claim 4, characterized in that: The quantum bit superposition encoding strategy is used in combination with the simulated annealing mechanism to perform a global search in the parameter space, including: Determine the parameters of the LSTM-GRU model to be optimized, divide the model parameters into continuous layers and discrete layers, and use real number encoding and binary encoding strategies respectively; Generate the initial population through the superposition characteristics of quantum bits, and use the simulated annealing mechanism to jump out of the local optimum during the iteration process; When the validation set error does not improve for five consecutive generations, some individuals in the population are randomly reset and the search is restarted. When the maximum number of iterations is reached, the optimal parameters obtained by optimization are determined.
6. The method for predicting electricity consumption based on big data according to claim 5, characterized in that: The parameters of the LSTM-GRU model to be optimized include the learning rate, the number of neurons in the LSTM layer and the GRU layer, and the weight of the attention mechanism.
7. The method for predicting electricity consumption based on big data according to claim 4, characterized in that: The data to be predicted is input into the optimized LSTM-GRU model to obtain the power load prediction results, and the prediction results are visualized, including: The data to be predicted is fed into the optimized LSTM-GRU model, which uses the LSTM layer to capture low-frequency trends and the memory unit to handle long-term dependencies. The GRU layer captures high-frequency power consumption fluctuations based on the output of the LSTM layer and handles short-term dynamic changes; Based on the output of the GRU layer, the weights of different time steps are first dynamically assigned through temporal attention to capture periodic patterns. Then, different weights are assigned to features through feature attention. The attention weights are applied to the GRU output to obtain the context vector. The hierarchical attention is used to first perform coarse-grained screening of time steps, and then fine-grained weighting of the screened features is performed. The context vector is converted into an actual value through a fully connected layer, and the predicted result of power load is output.
8. The intelligent electricity metering and prediction system based on big data is characterized by: The system includes: The acquisition module is used to obtain user power consumption, environmental parameters and holiday data in real time through the Internet of Things to form an initial data set; The processing module is used to dynamically adjust the threshold using a sliding window and wavelet packet decomposition algorithm through an exponentially weighted moving average control chart, and to perform multi-stage signal reconstruction in conjunction with Kalman filtering to obtain denoised data. The module then extracts temporal, meteorological, and user behavior features from the denoised data, and uses principal component analysis to reduce the dimensionality and obtain target feature data. A construction module is used to build an LSTM-GRU model. The LSTM-GRU model is trained using target feature data and the weight distribution of features related to power load forecasting is strengthened through the attention mechanism. The LSTM-GRU model integrates the gating mechanisms of the LSTM layer and the GRU layer at multiple scales, introduces a multi-granularity attention module, adopts a quantum bit superposition encoding strategy, and combines it with a simulated annealing mechanism to perform a global search in the parameter space. The prediction module is used to input the data to be predicted into the optimized LSTM-GRU model to obtain the prediction results of the power load and visualize the prediction results.
9. A smart electricity metering and prediction device based on big data, characterized in that: The smart metering and prediction device for electricity consumption based on big data includes a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the smart metering and prediction device for electricity consumption based on big data performs each step of the smart metering and prediction method for electricity consumption based on big data as described in any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the smart electricity metering prediction method based on big data as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Attention-GRU short-term load prediction method based on sparrow search optimization
CN113516316A
Power load prediction method based on SL-SSA optimization combination model hyper-parameter
CN118630730A
Multi-target load prediction adjustment method, system, device, medium and program product
CN119904040A
Gas turbine exhaust gas temperature prediction and fault early warning system and method
CN120496298A
KR20230170314A