Dynamic weight matrix decomposition energy consumption prediction method and system

By standardizing, reducing dimensionality, and sparsely decomposing energy consumption data using a dynamic weighted matrix factorization method, and combining local weighted regression and attention mechanisms, the accuracy and real-time performance issues of energy consumption prediction in complex scenarios are solved, achieving efficient energy consumption prediction.

CN121189573APending Publication Date: 2025-12-23WUHAN VOCATIONAL COLLEGE OF SOFTWARE & ENG (WUHAN OPEN UNIV)

Patent Information

Application Number
CN202511406814.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing prediction methods are ill-suited to the high-dimensional, multimodal, highly nonlinear, and dynamically evolving energy consumption data in large buildings and complex industrial settings. Furthermore, they suffer from high computational overhead and inference latency in resource-constrained environments, failing to meet the demands of real-time energy efficiency monitoring.

Method used

A dynamic weighted matrix factorization method is adopted. Energy consumption data is processed by standardization and dimensionality reduction. Combined with sparse mask matrix factorization, local weighted regression smoothing and attention mechanism, the influence of external factors is dynamically evaluated. The factor matrix is ​​updated by incremental learning optimization algorithm to generate future energy consumption prediction results.

Benefits of technology

It improves the accuracy and real-time performance of energy consumption prediction, enhances the model's environmental adaptability and computational efficiency, and meets the needs of real-time monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121189573A_ABST
    Figure CN121189573A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a dynamic weight matrix decomposition energy consumption prediction method and system, and the method comprises the steps: standardizing internal energy consumption data, and generating a standard data matrix and a sparse mask matrix; based on the mask matrix, processing the standard data matrix by adopting a dynamic regularization matrix decomposition technology, and determining a sparse internal factor matrix and a reconstructed data matrix; and smoothing the noise points by using a local weighted regression algorithm to generate a smooth data matrix. Standardizing the external influence factor data to form low-dimensional external factor embedding; and calculating dynamic influence weights of the external factors by adopting an attention mechanism algorithm, and fusing to generate weighted external factor representation. And when newly added energy consumption data is obtained, a final factor matrix is obtained through an incremental learning optimization algorithm. And outputting a future energy consumption prediction result based on the final factor matrix and the smooth data matrix, thereby effectively improving the accuracy, robustness and efficiency of energy consumption prediction in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a dynamic weight matrix decomposition energy consumption prediction method and system. BACKGROUND

[0002] In large buildings and complex industrial scenarios, raw data streams related to energy consumption often exhibit complex characteristics such as high dimensionality, multi-modality, strong nonlinearity, and dynamic evolution, which pose stringent requirements on the accuracy, response speed, and adaptive ability of prediction methods.

[0003] Existing prediction methods mostly rely on static processing or fixed rule-based methods, which are difficult to adapt to heterogeneous data generated from multiple subsystems (such as HVAC, lighting, power distribution, etc.). Such data differ significantly in terms of time resolution, spatial distribution, sampling method, etc., often accompanied by missing values, noise, and mutations, and urgently need data preprocessing and feature reconstruction mechanisms with structure perception ability.

[0004] In addition, such data are usually driven by internal device operating states (such as start-stop control, power change) and external environmental factors (such as weather conditions, personnel density, etc.), forming a dynamic system with multivariate coupling characteristics. These data processing methods often lack the ability to effectively capture such nonlinear time series dependencies, limiting their performance in medium and long-term and short-term high-frequency prediction.

[0005] Especially in real-time energy efficiency monitoring applications, prediction methods not only need to have high accuracy, but also need to have fast reasoning and adaptive updating ability in resource-constrained environments. Current popular deep neural networks, matrix decomposition methods, etc., although have certain advantages in accuracy, but their calculation overhead is large in the process of prediction method training and parameter updating, and the delay is high in the reasoning stage, which is not suitable for deployment in edge computing platforms or embedded systems.

[0006] Therefore, a dynamic weight matrix decomposition energy consumption prediction method and system are proposed. SUMMARY

[0007] The application aims to provide a dynamic weight matrix decomposition energy consumption prediction method and system, which is designed to process high-dimensional heterogeneous, sparse and noisy energy consumption data in industrial and building scenarios, and effectively fuse external factors to improve prediction accuracy and real-time performance. By standardizing the internal energy consumption data, a standard data matrix and a sparse mask matrix are generated. Based on the mask matrix, a dynamic regularization matrix decomposition technique is used to process the standard data matrix to determine the sparse internal factor matrix and the reconstructed data matrix. A local weighted regression algorithm is used to smooth noise points to generate a smoothed data matrix. The external influencing factor data is standardized to form a low-dimensional external factor embedding. An attention mechanism algorithm is used to calculate the dynamic influence weight of the external factor to generate an external factor representation. When new energy consumption data is obtained, the final factor matrix is obtained through an incremental learning optimization algorithm. Based on the final factor matrix and the smoothed data matrix, the future energy consumption prediction result is output, effectively improving the accuracy, robustness and efficiency of energy consumption prediction in complex scenarios.

[0008] To achieve the above object, the application provides the following technical scheme:

[0009] A dynamic weight matrix decomposition energy consumption prediction method comprises:

[0010] Energy consumption data is obtained and preprocessed to form an initial data matrix and a sparse mask matrix. The heterogeneous characteristics of the initial data matrix are standardized and dimensionally reduced to form a standard data matrix. Based on the sparse mask matrix, the standard data matrix is decomposed using dynamic regularization to determine a sparse factor matrix and a reconstructed data matrix. The standard data matrix and the reconstructed data matrix are compared to identify potential noise points, and the potential noise points are smoothed using local weighted regression to generate a smoothed data matrix.

[0011] External factor data is obtained to form a low-dimensional external factor embedding. Based on the low-dimensional external factor embedding and the sparse factor matrix, an attention mechanism is used to calculate a dynamic weight to generate a weighted external factor representation.

[0012] New energy consumption data is obtained, and the sparse factor matrix is updated through an incremental learning optimization algorithm to obtain a final factor matrix. Based on the final factor matrix, the smoothed data matrix and the weighted external factor representation, a future energy consumption prediction result is output.

[0013] Further, the standardization and dimension reduction processing of the heterogeneous characteristics of the initial data matrix specifically comprises:

[0014] applying Z-score standardization to numerical features in the initial data matrix to generate first features; applying one-hot encoding to discrete features in the initial data matrix to generate second features; applying sine-cosine encoding to periodic time features in the initial data matrix to generate third features; combining the first features, the second features and the third features to form the standard data matrix; applying principal component analysis to the standard data matrix, and selecting principal components with cumulative variance contribution ratio reaching a predetermined percentage to generate the standard data matrix after dimension reduction.

[0015] Further, the process of determining the sparse factor matrix and the reconstructed data matrix comprises: setting a factor dimension, initializing the sparse factor matrix; calculating a data sparsity index based on the sparse mask matrix, determining a first regularization parameter and a second regularization parameter; iteratively optimizing the sparse factor matrix according to an objective function, using an alternating least squares method and a soft threshold operation; and calculating the reconstructed data matrix based on the sparse factor matrix; wherein the objective function comprises: a first regularization term adjusted by the first regularization parameter, for imposing a first norm penalty on elements of the sparse factor matrix; a second regularization term adjusted by the second regularization parameter, for imposing a second norm penalty on elements of the factor matrix; and a squared reconstruction error term, for calculating the squared difference between the standard data matrix and the product of the sparse factor matrix, for data points in the standard data matrix marked as valid by the sparse mask matrix.

[0016] Further, smoothing the potential noise points using local weighted regression specifically comprises:

[0017] calculating point-by-point residuals between the standard data matrix and the reconstructed data matrix; setting a noise determination threshold based on the standard deviation of the point-by-point residuals, and identifying data points in the standard data matrix with absolute residuals exceeding the noise determination threshold as potential noise points; for each of the potential noise points, performing the local weighted regression smoothing operation, comprising: selecting a predetermined time window containing adjacent valid data points in the time dimension of the potential noise point; calculating the weight of each adjacent valid data point in the time window relative to the potential noise point according to the time distance between the adjacent valid data point and the potential noise point, performing weighted average to obtain a revised estimated value of the potential noise point; and replacing the original value of the potential noise point in the standard data matrix with the revised estimated value.

[0018] Further, the process of generating the weighted external factor representation comprises: for each time point, using the internal temporal variation factor representation corresponding to the time point from the sparse factor matrix as a query, and using the low-dimensional external factor embedding as a key and value, calculating external attention weights by a multi-head attention mechanism; based on the external attention weights, performing weighted processing on the low-dimensional external factor embedding to generate the weighted external factor representation.

[0019] Further, the process of predicting the future energy consumption prediction result comprises: preparing prediction input data, the prediction input data comprising: a first representation extracted from the final factor matrix; a second representation extracted from the smoothed data matrix; a third representation extracted from future auxiliary information; a fourth representation extracted from the weighted external factor representation; inputting the prediction input data into a time series prediction model to output the future energy consumption prediction result.

[0020] A dynamic weight matrix decomposition energy consumption prediction system comprises:

[0021] A smoothed data matrix generation module is configured to: acquire and preprocess energy consumption data to form an initial data matrix and a sparse mask matrix; perform standardization and dimensionality reduction processing on heterogeneous features of the initial data matrix to form a standard data matrix; based on the sparse mask matrix, decompose the standard data matrix using dynamic regularization to determine a sparse factor matrix and a reconstructed data matrix; compare the standard data matrix and the reconstructed data matrix to identify potential noise points, and smooth the potential noise points using local weighted regression to generate a smoothed data matrix.

[0022] An external factor representation generation module is configured to: acquire external factor data to form a low-dimensional external factor embedding; based on the low-dimensional external factor embedding and the sparse factor matrix, use an attention mechanism to calculate dynamic weights, and generate a weighted external factor representation after weighted processing.

[0023] A future energy consumption prediction module is configured to: acquire new energy consumption data, update the sparse factor matrix by an incremental learning optimization algorithm to obtain a final factor matrix; based on the final factor matrix, the smoothed data matrix and the weighted external factor representation, output a future energy consumption prediction result.

[0024] Compared with the prior art, the present application has the following beneficial effects:

[0025] 1、The present application preprocesses, standardizes and reduces the dimensionality of internal energy consumption data, uses sparse mask information to guide dynamic regularization matrix decomposition, effectively solves the problems of poor original data quality and incomplete information. By extracting the core energy consumption rules from the complex background, a simple and sparse internal factor representation is generated. In addition, the local weighted regression smoothing mechanism based on model reconstruction residual can accurately locate and correct potential noise points in the data, generating high-quality, actual trend-compliant smoothed historical data sequences, providing a reliable internal information foundation for subsequent prediction.

[0026] 2、The present application adopts an attention mechanism driven by internal energy consumption factors, which dynamically evaluates the importance of various external influencing factors (such as weather, production plans, electricity prices, time patterns, etc.) in real time. This mechanism adaptively calculates the contribution weights of different external factors based on the current internal energy consumption pattern, generating dynamically changing weighted external factor representations. This intelligent weighted fusion method improves the model's ability to capture complex, nonlinear, time-varying external environmental influences compared to traditional static feature input or simple weighting, enhancing the model's environmental adaptability.

[0027] 3、The present application introduces an incremental learning optimization algorithm, which realizes efficient and rapid updating of the core factor matrix, nearly real-time integration of new energy consumption data information into the model, improves the timeliness and online learning ability of the model, and meets the real-time monitoring and rapid response requirements. In the final prediction stage, this method integrates the latest internal factor representation, high-quality smoothed historical data, and dynamically weighted external factor representation, providing a comprehensive, rich, and highly relevant input feature set for downstream time series prediction models. The effective integration of this multi-source information improves the overall accuracy of future energy consumption prediction, achieving dual optimization of precision and efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0028] Fig. 1 A flowchart of a dynamic weight matrix decomposition energy consumption prediction method is provided for the present application;

[0029] Fig. 2 A flowchart of the process of determining the sparse factor matrix and the reconstructed data matrix is provided for the present application;

[0030] Fig. 3 A structural diagram of a dynamic weight matrix decomposition energy consumption prediction system is provided for the present application. DETAILED DESCRIPTION

[0031] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work are within the scope of protection of the present application.

[0032] Please refer to Figs. 1 to 3 The present application provides a dynamic weight matrix decomposition energy consumption prediction method and system, and the technical solutions are as follows:

[0033] Embodiment one:

[0034] In the field of actual industrial and commercial buildings, energy consumption data presents complex characteristics such as high dimensionality, heterogeneity, sparsity, and noise. The existing technology has certain limitations when processing such data, and it is difficult to effectively integrate the influence of dynamically changing external environmental factors, economic signals, and user behavior on energy consumption. In view of the stringent requirements of the energy management system on the prediction model in terms of high precision and real-time computing efficiency, in order to overcome the above technical difficulties, a dynamic weight matrix decomposition energy consumption prediction method is provided. Taking energy consumption prediction of a large office building as an example, as shown in Fig. 1 , it includes:

[0035] Obtain and preprocess energy consumption data to form an initial data matrix and a sparse mask matrix.

[0036] Specifically, in this embodiment, first, data is collected from the building management system (BMS) database of the office building to obtain the total power consumption of each floor, temperature readings of major areas (such as office areas, conference rooms, and lobbies), and the running state (on / off, represented by a Boolean value) of the central air conditioning system (HVAC) main equipment (such as water chillers and fan coil units) recorded every 15 minutes in the past year. At the same time, the on / off state records of the lighting loop in the main public area are collected from the independent lighting control system. In addition, the outdoor temperature, humidity, and other meteorological data of the city where the building is located are obtained through the meteorological service API, and the time resolution is 1 hour.

[0037] The steps of constructing the initial data matrix are as follows: set a uniform time resolution of 15 minutes, and map all collected data to this time grid. For data originally recorded at a frequency of 15 minutes (such as total power consumption on a floor), directly include the data matrix. For data with a recording frequency higher than 15 minutes (for example, some temperature sensors may record every minute), in each 15-minute time window, you can choose to take the average value or the last recorded value for aggregation. For data with a recording frequency lower than 15 minutes (such as hourly updated weather data), the value is copied and filled at all 15-minute time points in the hour. For state data (such as device switch status), use a forward filling strategy, that is, between two state change records, the state value of all intermediate time points remains the state of the last record. Finally, all time series data are organized into a matrix form according to the uniform time grid, denoted as the initial data matrix . Each row in the matrix corresponds to a 15-minute time point, and each column corresponds to a specific energy consumption variable (such as "first floor power consumption", "office area A temperature", "chiller 1 status", etc.).

[0038] The steps of constructing the sparse mask matrix are as follows: first, traverse the obtained initial data matrix . Check if the original data corresponding to each element has missing values, such as NULL values in the database or API not returning data, etc. At the same time, combined with the device running state information, identify the explicit zero power consumption period. For example, if "chiller 1 status" is 0, then even if the corresponding running power column value is recorded as a small value, it should be considered as invalid or zero power consumption state, not valid reading. Next, create a sparse mask matrix M with the same dimension as . Mark all identified missing, invalid or confirmed zero power consumption positions as 0 in M, and mark other positions containing valid measurement values as 1. Then, perform a second check on M. For any variable (column), if the number of consecutive points marked as 0 does not exceed a pre-set short threshold (for example, 4 points), then in , based on the values of the nearest valid data points marked as 1 in M before and after the missing segment, linear interpolation is performed on these positions. If the continuous missing time exceeds the threshold, the values of these positions remain unchanged, or are filled with a special marker value (such as NaN), indicating long-term missing, which will be handled in subsequent steps.

[0039] By providing clearly defined and M, subsequent steps such as standardization, dimensionality reduction, matrix decomposition, etc. can directly use these structured information, for example, in optimization calculations, the processing of positions with mask 0 can be skipped, thereby improving the calculation efficiency.

[0040] The heterogeneous features of the initial data matrix are standardized and dimensionally reduced to form a standard data matrix.

[0041] Further, the standardization and dimensional reduction of the heterogeneous features of the initial data matrix specifically includes:

[0042] Z-score standardization is applied to the numerical features in the initial data matrix to generate first features; one-hot encoding is applied to the discrete features in the initial data matrix to generate second features; sine-cosine encoding is applied to the periodic time features in the initial data matrix to generate third features; the first features, the second features, and the third features are combined to form the standard data matrix; principal component analysis is applied to the standard data matrix, and principal components with a cumulative variance contribution rate reaching a predetermined percentage are selected to generate the standard data matrix after dimensional reduction.

[0043] Specifically, it is assumed that the analysis has 50 columns, of which 30 columns are numerical data (such as floor power consumption, area temperature, equipment power, etc.), 10 columns are discrete data (such as equipment switch state 0 / 1, weekday identifier 0 / 1, etc.), and there are 2 basic time features (for example, “time period index in a day” and “day index in a week”). For numerical data, the mean and standard deviation of each column are calculated independently, and then Z-score standardization is applied to each element in each column to obtain first features. For discrete data, one-hot encoding is used for processing, and each column is converted into 2 binary columns to obtain 20 second features. For time features, sine-cosine encoding is applied to “time period index in a day t” (period T=96) and “day index in a week d” (period =7*96) respectively, and 4 third features that can capture daily and weekly periodicity are generated by calculating , , , . Finally, the 30 first features, the 20 second features, and the 4 third features are concatenated by columns to form a standard data matrix with a dimension of 54 columns.

[0044] When performing principal component analysis on , the covariance matrix of the data needs to be calculated or singular value decomposition is used to obtain principal components and their corresponding explained variances. After arranging the principal components in descending order according to the explained variances, the first p principal components are selected to ensure that the cumulative variance contribution rate of these principal components just reaches or exceeds the preset 95% threshold. For example, p=25 principal components may be selected to achieve a cumulative variance contribution rate of 95.3%, realizing sufficient expression of the data. Then, The low-dimensional space constructed by mapping to the 25 principal components, so as to obtain the final standard data matrix after dimensionality reduction. The reduced matrix will be used as the input data of the subsequent steps.

[0045] Through targeted standardization and coding processing of the original data, it is changed from different data types and different dimensional original form to unified standard numerical expression form, which lays the foundation for subsequent model to process input information without difference. On this basis, through the implementation of PCA dimensionality reduction operation, the core information of the data is retained while the feature dimension is reduced, the computational complexity and memory resource requirement of the subsequent core algorithm are reduced, so that it can more accurately predict when facing new data.

[0046] Based on the sparse mask matrix, the standard data matrix is decomposed using dynamic regularization to determine a sparse factor matrix and a reconstructed data matrix.

[0047] Further, the process of determining the sparse factor matrix and the reconstructed data matrix includes Fig. 2 as shown, comprising:

[0048] The time factor matrix U and the characteristic factor matrix V are specifically composed as follows:

[0049] The time factor matrix U: its dimension is m×k, where m is the total number of time points (i.e. the number of rows of ), and k is the preset number of hidden factors (or rank). Each row of U (i from 1 to m) is a k-dimensional vector, which can be understood as the intensity or representation of the i-th time point on the k hidden factors, which captures the change of the energy consumption pattern over time.

[0050] The characteristic factor matrix V: its dimension is n×k, where n is the number of variables or reduced characteristics (i.e. the number of columns of ), and k is the number of hidden factors. Each row of V (j from 1 to n) is also a k-dimensional vector, which can be understood as the association strength or composition between the j-th characteristic and the k hidden factors, reflecting the inherent characteristics of the variable.

[0051] When initializing the sparse factor matrix, the factor dimensions must first be determined. The appropriate number of hidden patterns is determined empirically or through cross-validation. For example, it can be set to 15. Then, two matrices are created: assuming the output contains 2880 time points, the time factor matrix U has a dimension of 2880×15, with each row corresponding to a row in the original data matrix and each column corresponding to a hidden pattern; the feature factor matrix V has a dimension of 25×15, with each column corresponding to a hidden pattern and each row corresponding to a feature in the original data matrix. These two matrices are filled with small random numbers, sampled from a normal distribution with a mean of 0 and a standard deviation of 0.01, providing a starting point for subsequent optimization.

[0052] The data sparsity index is obtained by calculating the proportion of values ​​of 0 based on the sparse mask matrix. Determine the first regularization parameter Second regularization parameter Based on the objective function, the sparse factor matrix is ​​iteratively optimized using alternating least squares and soft thresholding; and the reconstructed data matrix is ​​calculated based on the sparse factor matrix.

[0053] The objective function includes: a first regularization term adjusted by the first regularization parameter, used to apply a first norm penalty to the elements of the sparse factor matrix; a second regularization term adjusted by the second regularization parameter, used to apply a second norm penalty to the elements of the factor matrix; and a squared reconstruction error term, used to calculate the squared difference between the product of the standard data matrix and the sparse factor matrix for data points in the standard data matrix marked as valid by the sparse mask matrix.

[0054] Specifically, assume the convergence condition is a maximum of 50 iterations. First, fix matrix V and update matrix U:

[0055] For each row of U Find effective feature indexes Solve the weighted least squares problem with L2 regularization:

[0056] ;

[0057] in, To obtain by minimizing the objective function A preliminary solution; To find the function that minimizes the objective function; These are elements of a standard data matrix; These are the elements of the sparse mask matrix; V represents the matrix with characteristic j; is the transpose of, i is the time point index, j is the feature index; the objective function is composed of two parts, the first part is the square reconstruction error term, which represents the sum of square errors between the predicted value and the actual value of the current sample on the effective features, the second part is the second regularization term, which is used to prevent overfitting and make the model smoother.

[0058] to the preliminary solution apply soft threshold operation, introduce the first regularization term to promote sparsity:

[0059] ;

[0060] wherein, is the i-th row of the updated factor matrix U, is the sign function, which returns the sign of each element in the matrix; is the element-level multiplication; is the maximization function; is a parameter proportional to .

[0061] Similarly, fix the matrix U and update the matrix V: for each row of V , find the effective matrix U time point index ; solve the weighted L2 regularization least squares problem about and the soft threshold operation, and update the j-th row of the factor matrix V. After the iteration, the final U and V are the sparse factor matrices.

[0062] Finally, calculate the reconstructed data matrix .

[0063] Based on the sparse mask matrix, calculate the weighted error, which enables the model to focus on learning from the effective real data points while effectively ignoring the interference of missing values and confirmed zero power consumption periods, and can extract more stable and real energy consumption patterns that reflect the underlying rules, thereby effectively improving the accuracy, robustness and efficiency of energy consumption prediction in complex scenarios.

[0064] Compare the standard data matrix and the reconstructed data matrix to identify potential noise points, and smooth the potential noise points using local weighted regression to generate a smoothed data matrix.

[0065] Further, smoothing the potential noise points using local weighted regression specifically includes:

[0066] Calculate the point-by-point residual error between the standard data matrix and the reconstructed data matrix, denoted as:

[0067] ;

[0068] wherein,​ a residual matrix containing point-wise residuals.

[0069] For each column j of the residual matrix, calculate the standard deviation based on the standard deviation of the point-wise residuals, set a noise decision threshold and identify data points in the standard data matrix whose absolute residual values exceed the noise decision threshold as potential noise points;

[0070] For each of the potential noise points, perform the locally weighted regression smoothing operation, including:

[0071] select a predetermined time window containing neighboring valid data points in the time dimension of the potential noise point ; wherein, is the index of the current time point.

[0072] According to the time distance between the neighboring valid data points and the potential noise point, use a Gaussian kernel function to calculate the weight of each neighboring valid data point relative to the potential noise point within the time window, and perform a weighted average to obtain the revised estimate value of the potential noise point, denoted as:

[0073] ;

[0074] ;

[0075] wherein, is the weight, is the natural exponential function, is the time distance, is the kernel bandwidth, set to 2; is the revised estimate value, is the set of valid neighboring point indices within the time window N(i); represents the residual value at the current time point k and feature index j in the standard data matrix.

[0076] Replace the original value corresponding to the potential noise point in the standard data matrix with the revised estimate value to obtain a smoothed data matrix.

[0077] ​By comparing the residual between the actual data and the reconstructed data of the model, and combining with the statistical threshold, the method can accurately identify the potential noise points deviating from the main mode of the data, and realize more accurate noise positioning than traditional filtering methods. Local weighted regression is used to correct only the information in the time window near the noise point. According to the time distance weighting, the contribution of the neighboring points is greater, so that the random noise is smoothed while the real local change trend and key non-noise fluctuations (such as real load peaks and temperature sudden changes, etc.) in the data are maximally retained, effectively avoiding the over-smoothing and information loss caused by global filtering or simple moving average, thereby helping to effectively improve the accuracy, robustness and efficiency of energy consumption prediction in complex scenarios.

[0078] Obtaining external factor data to form a low-dimensional external factor embedding; based on the low-dimensional external factor embedding and the sparse factor matrix, using an attention mechanism to calculate dynamic weights, and generating a weighted external factor representation after weighted processing.

[0079] Further, the external factor data includes but is not limited to: building operation plan, i.e. whether it is a working day, and whether there is a large meeting or special activity; obtain the corresponding time-of-use electricity price table of this area, which may contain the prices of peak, flat and valley periods. Similarly, standardization and dimensionality reduction processing are performed to form a low-dimensional external factor embedding.

[0080] Further, the specific process of generating the weighted external factor representation includes: for each time point, i.e. row number i, using the internal time-varying factor corresponding to the time point from the sparse factor matrix as the query, and using the low-dimensional external factor embedding as the key and value, calculating the external attention weight through the multi-head attention mechanism; specifically, in each attention head, the similarity between the query vector and all key vectors is calculated, for example through the scaled dot-product attention mechanism, and the Softmax function is applied to convert these similarities into normalized attention weight distribution. Then, the value matrix is weighted and summed using these weights, so as to obtain the output of this attention head. The outputs of the 4 attention heads are spliced, and then a final linear transformation is performed to obtain the external attention weight of the time point i. These weights reflect the correlation strength between each external factor and the dimension at this moment.

[0081] Based on the external attention weight, the low-dimensional external factor embedding is weighted to generate a weighted external factor representation.

[0082] The generated weighted external factor representation is an information-rich and dynamically associated vector with the internal state. Whether it is spliced with the internal factor in the subsequent step to achieve deep fusion, or directly input as a feature into the final prediction model, this vector can provide more quality and targeted information than the original external factor embedding or simple average, thereby helping to improve the accuracy and robustness of the final prediction.

[0083] The newly added energy consumption data is obtained, and the sparse factor matrix is updated by the incremental learning optimization algorithm to obtain a final factor matrix.

[0084] Further, the process of obtaining the final factor matrix comprises:

[0085] After collecting new energy consumption data at Δm time points, the same preprocessing, standardization and dimensionality reduction process as the initial data set is performed. The newly added standard data matrix (dimension Δm×N) and the corresponding new sparse mask matrix (dimension Δm×N) are generated. Similar to solving the matrix U, V, a new matrix is created, with a dimension of Δm×E. Wherein, E is the factor dimension, and N is the number of features. It is initialized. Set the L2 regularization coefficient, and perform a small fixed number of iterations (for example, only iterate 1 to 5 times, because the goal is to quickly adapt rather than completely converge): update , and fix V: for each row of , find the valid feature index corresponding to the row in , solve the weighted L2 regularization least squares problem based only on new data, and obtain the updated .

[0086] Then, fine-tune V, fix : for each row of V, find the valid time point index corresponding to the column in , solve the weighted L2 regularization least squares problem based only on the new data time points, and obtain the fine-tuned .

[0087] The optimized is appended to the bottom of the original U to form a new time factor matrix (dimension (m+Δm)×E), m is the total number of time points.

[0088] The fine-tuned variable factor matrix (dimension N×E) is retained. These two and are the final factor matrices.

[0089] In the incremental update link, L1 regularization and soft threshold operation are temporarily omitted to save calculation time, and only the least square update of L2 regularization is performed. Given the limited amount of new data, this fast update method can reflect new data in the factor representation in time, maintaining the timeliness of the model for the current system state.

[0090] Based on the final factor matrix, the smoothed data matrix and the weighted external factor representation, a future energy consumption prediction result is output.

[0091] Further, the process of predicting the future energy consumption prediction result includes: preparing prediction input data, the prediction input data including: a first representation extracted from the final factor matrix; a second representation extracted from the smoothed data matrix; a third representation extracted from future auxiliary information; a fourth representation extracted from the weighted external factor representation; inputting the prediction input data into a time series prediction model to output the future energy consumption prediction result.

[0092] Among them, the first representation is the internal mode state, such as taking the time factor vector at t-1 time when predicting at t time; the second representation is clean historical observation, such as taking the energy consumption data after smoothing at t-1, t-2, etc. time when predicting at t time; the third representation is the known or predicted condition in the future, for example, according to the weather forecast (including temperature, humidity, etc.) at t time and the established equipment operation plan or special event label to determine when predicting at t time; the fourth representation is the historical external influence, such as referring to the weighted external factor representation vector at t-1 time when predicting at t time.

[0093] All intermediate processing results are converted into final prediction output, so that the entire process forms a complete closed loop from raw data to prediction. By revealing the potential law through the internal mode, providing a reliable baseline through the smoothed data, and inputting into the prediction model through the weighted external representation, the synergy and complementarity of multi-source information are realized, and the accuracy and robustness of energy prediction are improved.

[0094] The application can improve the accuracy and real-time performance of energy consumption prediction in industrial and commercial building scenarios. First, through systematic preprocessing, standardization, dimensionality reduction, dynamic regularization sparse decomposition and local weighted regression smoothing, the problems of high dimensionality, heterogeneity, sparsity and noise in the original data are solved, the simple internal energy consumption mode is extracted, and the robustness of the model to data quality problems is enhanced. Second, by processing external influencing factors and combining attention mechanism dynamic weighting, the real-time nonlinear influence of external environment and operation plan on energy consumption is accurately captured, the weighted external factor representation highly related to the current internal state is generated, and the sensitivity and adaptability of the model to dynamic external conditions are improved. Third, the incremental learning optimization algorithm is applied to efficiently update the core factors with new data, maintain the timeliness of the model, meet the real-time or near real-time prediction requirements, and improve the calculation efficiency. Finally, in the prediction stage, the final factors, smoothed historical data and dynamically weighted external representation are integrated to provide comprehensive, accurate and multi-dimensional input information for the downstream prediction model, improving the accuracy and reliability of future energy consumption prediction.

[0095] Embodiment two:

[0096] In order to facilitate the implementation and application of the dynamic weight matrix decomposition energy consumption prediction method disclosed in the foregoing embodiment one, the embodiment correspondingly provides a dynamic weight matrix decomposition energy consumption prediction system. As shown in Fig. 3 The dynamic weight matrix decomposition energy consumption prediction system comprises:

[0097] A smoothed data matrix generation module is configured to acquire and preprocess energy consumption data to form an initial data matrix and a sparse mask matrix; perform standardization and dimensionality reduction processing on the heterogeneous characteristics of the initial data matrix to form a standard data matrix; decompose the standard data matrix based on the sparse mask matrix using dynamic regularization to determine a sparse factor matrix and a reconstructed data matrix; compare the standard data matrix and the reconstructed data matrix to identify potential noise points, and smooth the potential noise points using local weighted regression to generate a smoothed data matrix.

[0098] As shown in Table 1, an input data example is given. With every 15 minutes as a timestamp, the total power of the office area, the host power, the office temperature, the lighting state and the outdoor temperature are included.

[0099] Table 1 Input data example

[0100]

[0101] The initial data matrix is a 4x5 matrix containing numerical values and states in the original data. For the provided data example, M is a 4x5 binary matrix indicating whether the data points in the data example are valid (1 for valid, 0 for invalid), and the assumed conditions, and M as follows:

[0102] ;

[0103] ;

[0104] where NAN is invalid data. After dimension reduction, a 4x3 standard data matrix is obtained. For the sparse factor matrix (U, V), U is a 4x2 matrix representing the time factor. V is a 3x2 matrix representing the characteristic factor. Assuming the factor dimension k = 2, U and V are as follows:

[0105] ;

[0106] ;

[0107] Reconstruction of the data matrix is a 4x3 matrix obtained by the product of U and V. Based on the point-by-point residual error of the standard data matrix and , the output only contains the smoothed original numerical variable, and the smoothed data matrix is a 4x4 matrix containing the smoothed original numerical variable. As follows:

[0108] ;

[0109] wherein, represents the smoothed numerical value.

[0110] The external factor representation generation module is configured to obtain external factor data to form a low-dimensional external factor embedding; based on the low-dimensional external factor embedding and the sparse factor matrix, a dynamic weight is calculated using an attention mechanism, and a weighted external factor representation is generated after weighted processing;

[0111] The future energy consumption prediction module is configured to obtain new energy consumption data, update the sparse factor matrix through an incremental learning optimization algorithm, and obtain a final factor matrix; based on the final factor matrix, the smoothed data matrix and the weighted external factor representation, a future energy consumption prediction result is output.

[0112] wherein the update frequency of the smoothed data matrix is lower than the incremental update frequency of the final factor matrix. The smoothed values calculated by the smoothed data matrix, especially the recent historical segments, are mainly used as input features of the prediction model.

[0113] Table 2 Performance comparison of the method of the present application and the baseline method

[0114]

[0115] Specifically, to demonstrate the effect of the present application, two baseline methods are set up. The baseline method one covers internal data processing (only pre-processing, standardization and dimension reduction are performed, no dynamic regularization decomposition and smoothing are conducted), external factor processing (only pre-processing, encoding and dimension reduction are carried out, no attention weighting is implemented), and final prediction (processed internal and external features and future information are directly input into the LightGBM model). The baseline method two focuses on the pre-processing of a single key internal energy consumption time series (such as total electricity consumption) and uses the SARIMA model for prediction.

[0116] As shown in Table 2, the prediction results of predicting the total electricity consumption of the commercial office building in the next 24 hours are given.

[0117] Although the embodiments of the present application have been shown and described, it can be understood by those of ordinary skill in the art that various changes, modifications, replacements and variations can be made to these embodiments without departing from the principles and spirits of the present application, and the scope of the present application is defined by the appended claims and their equivalents.

Claims

1. A dynamic weighted matrix decomposition method for energy consumption prediction, characterized in that, include: Acquire and preprocess energy consumption data to form an initial data matrix and a sparse mask matrix; The heterogeneous features of the initial data matrix are standardized and dimensionality reduced to form a standard data matrix; Based on the sparse mask matrix, the standard data matrix is ​​decomposed using dynamic regularization to determine the sparse factor matrix and the reconstructed data matrix; the standard data matrix and the reconstructed data matrix are compared to identify potential noise points, and local weighted regression is used to smooth the potential noise points to generate a smoothed data matrix. Acquire external factor data and form low-dimensional external factor embeddings; Based on the low-dimensional external factor embedding and the sparse factor matrix, dynamic weights are calculated using an attention mechanism, and weighted external factor representations are generated after weighted processing. Acquire new energy consumption data, update the sparse factor matrix through incremental learning optimization algorithm, and obtain the final factor matrix; Based on the final factor matrix, the smoothed data matrix, and the weighted external factor representation, the future energy consumption prediction result is output.

2. The dynamic weight matrix decomposition energy consumption prediction method according to claim 1, characterized in that, The standardization and dimensionality reduction of the heterogeneous features of the initial data matrix specifically includes: Z-score normalization is applied to the numerical features in the initial data matrix to generate the first feature; one-hot encoding is applied to the discrete features in the initial data matrix to generate the second feature; sine-cosine encoding is applied to the periodic time features in the initial data matrix to generate the third feature; the first feature, the second feature, and the third feature are combined to form the standard data matrix; principal component analysis is applied to the standard data matrix, and principal components whose cumulative variance contribution rate reaches a predetermined percentage are selected to generate the dimensionality-reduced standard data matrix.

3. The dynamic weight matrix decomposition energy consumption prediction method according to claim 1, characterized in that, The process of determining the sparse factor matrix and the reconstructed data matrix includes: setting the factor dimensions and initializing the sparse factor matrix; calculating the data sparsity index based on the sparse mask matrix and determining the first regularization parameter and the second regularization parameter; iteratively optimizing the sparse factor matrix using alternating least squares method and soft thresholding operation according to the objective function; and calculating the reconstructed data matrix based on the sparse factor matrix. The objective function includes: a first regularization term adjusted by the first regularization parameter, used to apply a first norm penalty to the elements of the sparse factor matrix; a second regularization term adjusted by the second regularization parameter, used to apply a second norm penalty to the elements of the factor matrix; and a squared reconstruction error term, used to calculate the squared difference between the product of the standard data matrix and the sparse factor matrix for data points in the standard data matrix marked as valid by the sparse mask matrix.

4. The dynamic weight matrix decomposition energy consumption prediction method according to claim 1, characterized in that, The use of locally weighted regression to smooth the potential noise points specifically includes: Calculate the pointwise residuals between the standard data matrix and the reconstructed data matrix; set a noise threshold based on the standard deviation of the pointwise residuals, and identify data points in the standard data matrix whose absolute residual value exceeds the noise threshold as potential noise points; for each potential noise point, perform the local weighted regression smoothing, including: selecting a predetermined time window containing neighboring valid data points in the time dimension of the potential noise point; calculating the weights of each neighboring valid data point relative to the potential noise point within the time window based on the time distance between the neighboring valid data points and the potential noise point, and performing a weighted average to obtain a corrected estimate of the potential noise point; and replacing the original value of the potential noise point in the standard data matrix with the corrected estimate.

5. The dynamic weighted matrix decomposition energy consumption prediction method according to claim 1, characterized in that, The specific process of generating the weighted external factor representation includes: for each time point, using the internal time-varying factor representation corresponding to the time point from the sparse factor matrix as a query, and using the low-dimensional external factor embedding as the key and value, calculating the external attention weight through a multi-head attention mechanism; and weighting the low-dimensional external factor embedding based on the external attention weight to generate the weighted external factor representation.

6. The dynamic weighted matrix decomposition energy consumption prediction method according to claim 1, characterized in that, The process of predicting the future energy consumption forecast includes: preparing forecast input data, which includes: a first representation extracted from the final factor matrix; a second representation extracted from the smoothed data matrix; a third representation extracted from future auxiliary information; and a fourth representation extracted from the weighted external factor representation; inputting the forecast input data into a time series forecasting model, and outputting the future energy consumption forecast.

7. A dynamic weighted matrix factorization energy consumption prediction system, characterized in that, include: The smooth data matrix generation module is used to acquire and preprocess energy consumption data to form an initial data matrix and a sparse mask matrix; The heterogeneous features of the initial data matrix are standardized and dimensionality reduced to form a standard data matrix; Based on the sparse mask matrix, the standard data matrix is ​​decomposed using dynamic regularization to determine the sparse factor matrix and the reconstructed data matrix; the standard data matrix and the reconstructed data matrix are compared to identify potential noise points, and local weighted regression is used to smooth the potential noise points to generate a smoothed data matrix. The external factor representation generation module is used to acquire external factor data and form low-dimensional external factor embeddings; Based on the low-dimensional external factor embedding and the sparse factor matrix, dynamic weights are calculated using an attention mechanism, and weighted external factor representations are generated after weighted processing. The future energy consumption prediction module is used to acquire new energy consumption data and update the sparse factor matrix through an incremental learning optimization algorithm to obtain the final factor matrix. Based on the final factor matrix, the smoothed data matrix, and the weighted external factor representation, the future energy consumption prediction result is output.

Citation Information

Patent Citations

  • Energy consumption prediction model construction method, short-term energy consumption prediction method and related device

    CN115345355A

  • Artificial neural network energy consumption prediction method for dimensionality reduction processing of impact factors

    CN116151457A

  • Heterogeneous air quality data fusion method based on sparse matrix decomposition

    CN120671084A

Cited By

  • Energy consumption prediction method, system and medium based on three-factor convergent projection

    CN122414503A