Building energy consumption time series missing data imputation method, device and program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN UNIV
- Filing Date
- 2026-04-08
- Publication Date
- 2026-06-26
Smart Images

Figure CN122087287B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, device and program product for interpolating missing data in building energy consumption time series. Background Technology
[0002] In building energy consumption monitoring, data gaps often occur due to sensor malfunctions, communication interruptions, or system maintenance, directly impacting subsequent energy efficiency analysis, load forecasting, and optimized control. Current data imputation solutions fall into three categories: First, those relying on multivariate correlation, require external meteorological data such as temperature and humidity, as well as building attributes, for imputation assistance. Imputation is poor when multiple related variables are missing or external covariates are lacking. Second, those based on non-convex low-rank and Alternating Direction Method of Multipliers (ADMM) optimization, while maintaining data structure characteristics, suffer from high computational costs, parameter sensitivity, and limited stability, making them unsuitable for engineering applications. Third, deep learning-based imputation methods are primarily designed for multivariate scenarios, exhibiting poor adaptability to univariate building energy consumption sequences and lacking statistical constraints, resulting in insufficient stability under high missing rates or long missing intervals. Summary of the Invention
[0003] This disclosure provides a method, equipment, and program product for interpolating missing data in building energy consumption time series.
[0004] According to one aspect of this disclosure, a method for imputing missing time series data of building energy consumption is provided, comprising:
[0005] Based on the univariate energy consumption time series data corresponding to the target building, generate a missing mask to indicate whether the data values of the data points in the univariate energy consumption time series data are missing;
[0006] Based on the missing mask, the data values of the data points marked as missing in the univariate energy consumption time series data are replaced with randomly generated noise values to obtain the target input sequence;
[0007] The target input sequence is input into a generative interpolation network, wherein the generative interpolation network includes a generator and a discriminator. The generator generates a complete sequence after data interpolation based on the target input sequence, and the discriminator judges whether the data value corresponding to each data point in the complete sequence is real data or interpolated data.
[0008] The generator and the discriminator are jointly trained using adversarial learning to obtain the trained generator, which is then used as the target data imputation model. During the adversarial learning joint training process, a statistical constraint term is embedded in the total loss function. The statistical constraint term is used to constrain the generator to generate imputation data that conforms to the statistical laws of real data.
[0009] Based on the target data imputation model, missing data imputation is performed on the building energy consumption time series data where data is missing.
[0010] According to one technical solution, by constructing the target input sequence and subsequently training the model based on the univariate energy consumption time series data of the target building, the trained target data imputation model can perform missing data imputation without relying on external meteorological data or multivariate information such as building attributes, thus expanding the applicability of this technical solution in practical engineering scenarios. Furthermore, by embedding statistical constraint terms into the total loss function of adversarial learning joint training, not only is the inherent structural characteristics and global pattern of building energy consumption data effectively maintained, significantly improving imputation stability under high missing rates or long missing intervals, but also eliminating the need for multiple tensor expansions and singular value decomposition calculations, reducing the computational cost of missing data imputation.
[0011] According to at least one embodiment of the building energy consumption time series missing data imputation method of this disclosure, the statistical constraint term includes at least one sub-constraint term; during the adversarial learning joint training process, the building energy consumption time series missing data imputation method further includes: initializing the hyperparameters of each of the sub-constraint terms as learnable variables, and participating in training together with the network weight parameters of the generative imputation network; and in each training iteration of the adversarial learning joint training, determining the gradient of the total loss function with respect to each network weight parameter and the hyperparameters of each of the sub-constraint terms through the backpropagation algorithm, and synchronously updating the hyperparameters of each of the sub-constraint terms and the network weight parameters of the generative imputation network according to the gradient.
[0012] According to the technical solution of this embodiment, by setting the hyperparameters of each sub-constraint as learnable variables, the model can automatically and dynamically learn the optimal parameters of each sub-constraint during the training process based on the specific characteristics of the input training data.
[0013] According to at least one embodiment of the building energy consumption time series missing data imputation method of this disclosure, the sub-constraint term includes a low-rank structure constraint term. When constructing the low-rank structure constraint term, the building energy consumption time series missing data imputation method includes: constructing a tensor matrix from the complete sequence output by the generator; performing singular value decomposition on the tensor matrix to obtain multiple singular values; applying a non-convex penalty function to the multiple singular values to obtain a penalty amount corresponding to each singular value; and summing the penalty amounts corresponding to the multiple singular values to obtain the low-rank structure constraint term.
[0014] According to the technical solution of this embodiment, by reconstructing the complete sequence into a tensor matrix and applying a non-convex penalty, the domain knowledge that building energy consumption data has an inherent low-rank structure in the periodic dimension is transformed into a computable loss term, namely a low-rank structure constraint term, that can be integrated into the backpropagation process of the neural network. This enables the data imputation results to maintain the consistency of the inherent pattern of the data and avoids the generation of discontinuous or unreasonable imputation data in long missing intervals.
[0015] According to at least one embodiment of the building energy consumption time series missing data imputation method of this disclosure, the sub-constraint term includes a time autoregressive constraint term. When constructing the time autoregressive constraint term, the building energy consumption time series missing data imputation method includes: constructing a third-order tensor from the complete sequence output by the generator, and expanding the third-order tensor into a two-dimensional matrix along the time period dimension; and determining the fitting error of each row of the sequence in the two-dimensional matrix, and taking the sum of the fitting errors corresponding to all rows of the sequence as the time autoregressive constraint term.
[0016] According to the technical solution of this embodiment, by introducing a time autoregressive constraint term as a sub-constraint term into the statistical constraint term, it can be ensured that when the generator performs missing data imputation in the face of continuous missing intervals, the imputation result generated by it can maintain a smooth and continuous transition within the missing interval and at the boundary between the missing interval and the real data. This effectively avoids the imputation data generated by the generator from having instantaneous spikes or cliff-like drops that violate physical common sense, and significantly improves the physical reliability and practical usability of the imputation data.
[0017] According to at least one embodiment of the building energy consumption time series missing data imputation method of this disclosure, the sub-constraint term includes a periodic similarity constraint term. When constructing the periodic similarity constraint term, the building energy consumption time series missing data imputation method includes: constructing a third-order tensor from the complete sequence output by the generator, and extracting the matrix representation corresponding to the time period dimension from the third-order tensor; constructing a self-representation coefficient matrix based on the matrix representation, the self-representation coefficient matrix being used to characterize the linear representation relationship between different periodic segments in the matrix representation; and applying an elastic network regularization term containing sparsity constraints and smoothness constraints to the self-representation coefficient matrix, and using the calculation result of the elastic network regularization term as the periodic similarity constraint term.
[0018] According to the technical solution of this embodiment, by constructing a periodic similarity constraint term, the generator is explicitly guided during training to discover and follow the corresponding periodic repetition pattern. This enables the generator to effectively refer to historical patterns when faced with cross-period missing data (e.g., data from this week's Monday is missing, but historical Monday data is available), generating highly reliable imputation data that conforms to periodic patterns, significantly improving the accuracy and contextual rationality of the imputation results.
[0019] According to at least one embodiment of the building energy consumption time series missing data imputation method of the present disclosure, the generator generates a complete sequence after data imputation based on the target input sequence, including: the generator extracts a first time series feature of each data point in the target input sequence along the time increment direction, and extracts a second time series feature of each data point in the target input sequence along the time decrement direction; the first time series feature and the second time series feature of the same data point are fused to obtain a third time series feature of the data point; and missing data imputation is performed on the data points marked as missing in the target input sequence according to the third time series feature of the data points marked as missing in the target input sequence to obtain a complete sequence after data imputation.
[0020] According to the technical solution of this embodiment, by independently constructing a third temporal feature that integrates a bidirectional complete context (i.e., the first temporal feature and the second temporal feature) for each data point, the generator can accurately integrate the antecedent (historical energy consumption information) and consequences (future energy consumption context) for the specific time position of each data point marked as missing, and generate the interpolation value that best matches the context of the data point, thus realizing fine-grained and personalized data recovery.
[0021] The building energy consumption time series missing data imputation method according to at least one embodiment of the present disclosure includes a generator comprising any one of a multilayer bidirectional long short-term memory network, a gated recurrent unit network, a temporal convolutional network, or a transformer network.
[0022] According to the technical solution of this embodiment, the most suitable network can be selected to implement the generator function based on specific hardware conditions, data scale and real-time requirements, thereby improving the deployability and applicability in different engineering environments.
[0023] According to at least one embodiment of the building energy consumption time series missing data imputation method of the present disclosure, the discriminator judges whether the data value corresponding to each data point in the complete sequence is real data or imputed data, including: the discriminator performs binary classification judgment on the data value of each data point in the complete sequence according to the complete sequence and the corresponding hint vector, and outputs the probability that the data value of each data point is real data, wherein the hint vector is generated based on the missing mask and is used to partially reveal whether the data value of each data point in the complete sequence is real data or imputed data.
[0024] According to the technical solution of this embodiment, by providing some real missing information (i.e., cue vectors) as "cues," it is equivalent to providing a weak supervision signal for the discriminator's learning process. This helps to alleviate the pattern collapse and instability problems commonly found in generative adversarial network training, guides the discriminator and generator to converge more efficiently, accelerates the overall training speed of the model, and improves the training success rate.
[0025] According to another aspect of this disclosure, a device for imputing missing data in a building energy consumption time series is provided, comprising: a mask generation module, configured to generate a missing mask based on univariate energy consumption time series data corresponding to a target building, indicating whether data values of data points in the univariate energy consumption time series data are missing; a noise filling module, configured to replace the data values of data points marked as missing in the univariate energy consumption time series data with randomly generated noise values based on the missing mask, thereby obtaining a target input sequence; and a sequence input module, configured to input the target input sequence into a generative imputation network, wherein the generative imputation network includes a generator and a discriminator, the generator being based on the... The system generates a complete data imputation sequence from the target input sequence. The discriminator determines whether the data value corresponding to each data point in the complete sequence is real data or imputed data. A training module is used to jointly train the generator and the discriminator using adversarial learning to obtain a trained generator, which is then used as the target data imputation model. During the adversarial learning joint training process, a statistical constraint term is embedded in the total loss function. This statistical constraint term is used to constrain the generator to generate imputed data that conforms to the statistical laws of real data. A processing module is used to impute missing data in building energy consumption time series data with missing data based on the target data imputation model.
[0026] According to another aspect of this disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, causing the processor to perform a building energy consumption time series missing data imputation method according to any embodiment of this disclosure.
[0027] According to another aspect of this disclosure, a readable storage medium is provided, wherein execution instructions are stored therein, which, when executed by a processor, are used to implement the building energy consumption time series missing data interpolation method of any embodiment of this disclosure.
[0028] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements a method for imputing missing time-series building energy consumption data according to any embodiment of this disclosure.
[0029] The beneficial effects of this disclosure are that it only requires univariate data for data imputation, does not rely on external information, and has wide applicability; furthermore, by embedding statistical constraint terms in the total loss function of adversarial learning joint training, it not only improves the imputation stability under high missing rate or long missing interval, but also avoids complex iterative calculations and reduces computational costs. Attached Figure Description
[0030] The accompanying drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0031] Figure 1 This is a flowchart illustrating a method for imputing missing time series data of building energy consumption according to one embodiment of this disclosure.
[0032] Figure 2 This is a schematic diagram of the generator's processing flow in a building energy consumption time series missing data imputation method according to one embodiment of this disclosure.
[0033] Figure 3 This is a flowchart illustrating parameter optimization in a method for imputing missing time series data of building energy consumption according to one embodiment of this disclosure.
[0034] Figure 4 This is a flowchart illustrating the process of constructing low-rank structural constraint terms in a method for imputing missing time series building energy consumption data according to one embodiment of this disclosure.
[0035] Figure 5 This is a flowchart illustrating the process of constructing time autoregressive constraint terms in a method for imputing missing time series data of building energy consumption according to one embodiment of this disclosure.
[0036] Figure 6 This is a flowchart illustrating the process of constructing periodic similarity constraint terms in a method for imputing missing time series building energy consumption data according to one embodiment of this disclosure.
[0037] Figure 7 This is a schematic diagram illustrating the missing data imputation effect of a missing data imputation method for building energy consumption time series according to one embodiment of this disclosure.
[0038] Figure 8 This is a schematic diagram of a building energy consumption time series missing data interpolation device according to one embodiment of the present disclosure.
[0039] Figure 9 This is a schematic structural block diagram of an electronic device according to one embodiment of the present disclosure. Detailed Implementation
[0040] The present disclosure will now be described in further detail with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the accompanying drawings.
[0041] It should be noted that, where there is no conflict, the embodiments and features described in this disclosure can be combined with each other. The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0042] Existing technologies lack effective statistical constraint mechanisms in imputing missing data in univariate building energy consumption time series, resulting in insufficient stability of the imputation results and failing to balance computational efficiency and imputation accuracy.
[0043] To this end, the present disclosure proposes the following technical solution: by constructing the target input sequence based on the univariate energy consumption time series data of the target building and subsequent model training, the target data imputation model obtained after training does not need to rely on external meteorological data or multivariate information such as building attributes when imputing missing data, thus expanding the applicability of the technical solution of the present disclosure in actual engineering scenarios.
[0044] Furthermore, by embedding statistical constraint terms into the total loss function of adversarial learning joint training, not only are the inherent structural features and global patterns of building energy consumption data effectively preserved, significantly improving the imputation stability under high missing rates or long missing intervals, but also eliminating the need for multiple tensor expansions and singular value decompositions, thus reducing the computational cost of missing data imputation.
[0045] Figure 1This is a flowchart illustrating a method for imputing missing time series data of building energy consumption according to one embodiment of this disclosure. This method can be executed by electronic devices such as smartphones, computers, and servers. The following explanation uses the application of this method to a terminal device (hereinafter referred to as "terminal") as an example.
[0046] like Figure 1 As shown, the building energy consumption time series missing data interpolation method preferably includes steps S110 to S150.
[0047] In step S110, a missing mask is generated based on the univariate energy consumption time series data corresponding to the target building to indicate whether the data values of the data points in the univariate energy consumption time series data are missing.
[0048] The univariate energy consumption time series data refers to the sequence data continuously collected from specific metering devices (such as electricity meters, gas meters, etc.) of the target building at fixed time intervals (e.g., every hour, every 15 minutes, etc.), reflecting only the numerical changes of a single type of energy consumption (such as electricity or gas consumption). Preferably, the univariate energy consumption time series data is stored in vector or list form, where each element corresponds to an observation value at a specific time point.
[0049] The missing data mask is a binary sequence (usually consisting of 0s and 1s) of the same length as the univariate energy consumption time series data. The missing data mask can provide a "label" for each data point in the univariate energy consumption time series data to clearly indicate whether the data point's value is an observation or a missing value.
[0050] For example, if the value at a certain position in the missing mask (such as the 15th position) is "1", it means that the data point at the corresponding position (such as the 15th position) in the univariate energy consumption time series data is an observed value. Conversely, if the value at a certain position in the missing mask (such as the 16th position) is "0", it means that the data point at the corresponding position (such as the 16th position) in the univariate energy consumption time series data is missing.
[0051] In this implementation, the terminal exports or reads raw energy consumption records for a specific time period from the energy consumption monitoring device (such as an electricity meter or gas meter) of the target building. These raw energy consumption records include timestamps and corresponding energy consumption values. The terminal arranges these energy consumption values in chronological order to obtain univariate energy consumption time series data corresponding to the target building.
[0052] Next, the terminal generates a missing mask of the same length based on the length of the univariate energy consumption time series data. The elements in this missing mask can be generated according to pre-defined generation rules (such as cyclically concatenating pre-defined cyclic segments (such as 011, 100, or 110, etc.) to obtain a missing mask of the corresponding length) or randomly. In this way, based on the missing mask, data missing situations that may occur in real-world application scenarios can be simulated, ensuring the training effect of subsequent model training.
[0053] In step S120, according to the missing mask, the data values of the data points marked as missing in the univariate energy consumption time series data are replaced with randomly generated noise values to obtain the target input sequence.
[0054] The noise value is a numerical value generated by a computer algorithm (e.g., a pseudo-random number generator) and follows a certain probability distribution. In the embodiments of this disclosure, the randomly generated noise value has no direct physical correlation with the data values in the univariate energy consumption time series data, and is only used to place places at missing data locations.
[0055] In this embodiment, the terminal generates a random noise sequence using a computer algorithm. N This random noise sequence N The length is the same as that of the univariate energy consumption time series data. This random noise sequence... N Each noise value in the dataset is generated independently, and the noise values are controlled to be within roughly the same order of magnitude as the real data (i.e., the observations).
[0056] The missing mask generated by the terminal according to the aforementioned steps M univariate energy consumption time series data X With random noise sequence N By performing point-by-point conditional replacement, the target input sequence containing random noise is obtained. Specifically, during the point-by-point conditional replacement process, for missing masks... M The position with a median value of 1 retains the univariate energy consumption time series data. X The data value at that position. For the missing mask. M For positions where the median value is 0, a random noise sequence is used. N Replace the noise value at the corresponding position in the univariate energy consumption time series data. X The data value at that position.
[0057] In one embodiment of this disclosure, the target input sequence It can be as follows:
[0058]
[0059] in, This is univariate energy consumption time series data after preprocessing (such as normalization). This indicates element-wise multiplication; 1 represents a sequence where all elements are 1 and the length is the same as the missing mask M. N This is a random noise sequence used to fill univariate energy consumption time series data. X The missing data location.
[0060] In step S130, the target input sequence is input into a generative interpolation network, wherein the generative interpolation network includes a generator and a discriminator. The generator generates a complete sequence after data interpolation based on the target input sequence, and the discriminator determines whether the data value corresponding to each data point in the complete sequence is real data or interpolated data.
[0061] In this embodiment, the terminal uses the target input sequence generated in the aforementioned steps as input to the generative imputation network for corresponding data processing. The generative imputation network is a pre-constructed neural network framework for data completion. This network includes a generator and a discriminator. The generator is responsible for data generation and repair. It takes the target input sequence containing random noise values as input and, through internal nonlinear transformations (such as temporal modeling based on bidirectional long short-term memory networks), outputs a complete sequence of the same length as the target input sequence, where all positions (including missing data positions) are filled with data values.
[0062] The discriminator is responsible for identifying the data values of each data point in the complete sequence, that is, determining whether the data value is real data (i.e., observed value) or imputed data. Specifically, the discriminator takes the complete sequence output by the generator as input, attempts to determine whether the data value of each data point in the complete sequence comes from the original (i.e., the aforementioned univariate energy consumption time series data) real observation value or imputed data generated by the generator, and outputs the probability that each position is "real data".
[0063] In some embodiments of this disclosure, the generator generates a complete sequence after data interpolation based on the target input sequence, preferably including steps S210 to S230, please refer to... Figure 2 .
[0064] In step S210, the generator extracts the first temporal features of each data point in the target input sequence along the time-increasing direction, and extracts the second temporal features of each data point in the target input sequence along the time-decreasing direction.
[0065] In this implementation, the first temporal feature is generated by the generator processing the target input sequence along the time-increasing direction (i.e., the direction from the start time to the end time of the data sequence) and outputting a corresponding hidden state vector, i.e., the first temporal feature, for each data point. This first temporal feature encodes the energy consumption data dependencies of the current data point and all historical times before it, reflecting the historical energy consumption information of the target input sequence.
[0066] The second temporal feature is generated by the generator processing the target input sequence along the time-decreasing direction (i.e., from the end time of the data sequence to the start time), and outputting the corresponding hidden state vector, i.e., the second temporal feature, for each data point. This second temporal feature encodes the energy consumption data dependencies of the current data point and all future times thereafter, reflecting the future energy consumption context and subsequent changes of the target input sequence.
[0067] In this way, by extracting the first and second time-series features, the historical energy consumption information before the missing data position in the target input sequence and the future energy consumption context after the missing data position can be used simultaneously to ensure the accuracy of the generator's subsequent missing data imputation results.
[0068] In some embodiments of this disclosure, the generator includes at least one layer of bidirectional long short-term memory (BiLSTM) network structure. Each layer of bidirectional long short-term memory network structure includes two independent but symmetrical long short-term memory (LSTM) network layers (including a forward LSTM layer and a reverse LSTM layer).
[0069] During temporal feature extraction, the target input sequence is simultaneously fed into both a forward LSTM layer and a backward LSTM layer. Specifically, the data values of each data point in the target input sequence are input into the forward LSTM layer in forward chronological order. The forward LSTM layer calculates the data value of each data point sequentially and outputs the first temporal feature corresponding to that data point. The data values of each data point in the target input sequence are input into the backward chronological order into the backward LSTM layer. The backward LSTM layer calculates the data value of each data point sequentially and outputs the second temporal feature corresponding to that data point.
[0070] In step S220, the first time-series feature and the second time-series feature of the same data point are fused to obtain the third time-series feature of the data point.
[0071] In this embodiment, feature fusion is an operation process that combines the first temporal feature and the second temporal feature according to a pre-defined feature fusion rule to form a unified and more expressive feature vector. Preferably, the first temporal feature and the second temporal feature of the same data point are concatenated along the feature dimension to obtain the third temporal feature.
[0072] Preferably, feature fusion can be performed only on the data points marked as missing in the target input sequence (determined based on the missing mask), that is, only the third temporal features of the data points marked as missing are calculated, so as to reduce the amount of computation.
[0073] In step S230, based on the third temporal features of the data points marked as missing in the target input sequence, data interpolation is performed on the data points marked as missing in the target input sequence to obtain the complete sequence after data interpolation.
[0074] In this implementation, the generator inputs the third temporal feature of the data points marked as missing in the target input sequence into one or more fully connected layers to perform a nonlinear transformation on the third temporal feature, ultimately mapping it to a scalar value. This scalar value is the interpolation result of the generator for that data point. The generator can then replace the data value of that data point with this scalar value to imput the missing data in the target input sequence, thus obtaining a complete sequence.
[0075] Thus, by independently constructing a third temporal feature that integrates a complete bidirectional context (i.e., the first temporal feature and the second temporal feature) for each data point, the generator can accurately integrate the antecedent (historical energy consumption information) and consequences (future energy consumption context) for the specific time position of each data point marked as missing, and generate the interpolation value that best matches the context of that data point, thereby achieving fine-grained and personalized data recovery.
[0076] Preferably, the generator includes a multi-layer bidirectional long short-term memory network structure, wherein the input of the first layer of the bidirectional long short-term memory network structure is the data value of each data point in the target input sequence, and the input of each subsequent layer of the bidirectional long short-term memory network structure is the third temporal feature of each data point output by the layer above it.
[0077] Thus, by setting up a multi-layer bidirectional long short-term memory network structure, it is possible to abstract and integrate the complex and multi-level time patterns in building energy consumption data in a layered and progressive manner, enabling the generator to more fully and deeply mine and utilize the multi-scale time patterns contained in the energy consumption time series data, and ensuring the stability of the data imputation results under high missing rate or long missing interval conditions.
[0078] In some embodiments of this disclosure, in addition to the bidirectional long short-term memory network structure described above, the bidirectional long short-term memory network structure in the generator can be replaced with any one of a gated recurrent unit (GRU) network, a temporal convolutional network, or a transformer network. That is, the generator can include any one of a multi-layer bidirectional long short-term memory network, a gated recurrent unit network, a temporal convolutional network, or a transformer network.
[0079] It should be noted that different network architectures have their own advantages and disadvantages in terms of computational complexity, parallel efficiency, long-range dependency modeling capabilities, and parameter scale. Therefore, those skilled in the art can select the most suitable network to implement the generator function described in this disclosure based on specific hardware conditions (such as edge devices or cloud servers), data scale (sequence length), and real-time requirements, thereby improving the deployability and applicability of the technical solution of this disclosure in different engineering environments. For example, temporal convolutional networks can be used for edge applications with high real-time requirements; transformer networks can be used for scenarios with high accuracy requirements and sufficient computing power.
[0080] In some embodiments of this disclosure, the discriminator's determination of whether the data value corresponding to each data point in the complete sequence is real data or interpolated data preferably includes:
[0081] The discriminator performs binary classification on the data values of each data point in the complete sequence through a fully connected layer based on the complete sequence and the corresponding cue vector, and outputs the probability that the data value of each data point is real data. The cue vector is generated based on the missing mask and partially exposes the information of the missing mask.
[0082] In this embodiment, based on the complete sequence output by the generator, a cue vector of the same length as the complete sequence is generated. The values in this cue vector are generated based on a missing mask, thereby selectively and partially revealing that the data points in the complete sequence are real data or imputed data. Preferably, some elements in the missing mask can be randomly inverted (e.g., some "0"s can be replaced with "1", or some "1"s can be replaced with "0") to obtain the cue vector, thus providing only incomplete real information as clues to the discriminator.
[0083] The complete sequence output by the generator and the hint vector are used as input to the discriminator. Preferably, the discriminator can fuse the complete sequence and the hint vector before processing to obtain a fusion matrix, such as by concatenating the complete sequence and the hint vector along the feature dimension.
[0084] The discriminator contains multiple fully connected layers. The fusion matrix passes through these layers sequentially and undergoes multiple nonlinear transformations using nonlinear activation functions to extract deep discriminative features. The final fully connected layer outputs a probability value for each data point in the complete sequence, representing the likelihood that the data point is a real data point. This probability value ranges from 0 to 1; the closer the probability value is to 1, the more confident the discriminator is that the data point is a real data point; the closer the probability value is to 0, the more confident the discriminator is that the data point is imputed data generated by the generator.
[0085] Thus, by providing some real missing information (i.e., cue vectors) as "cues," it is equivalent to providing a weak supervision signal for the discriminator's learning process. This helps alleviate the pattern collapse and instability problems commonly found in generative adversarial network training, guides the discriminator and generator to converge more efficiently, accelerates the overall training speed of the model, and improves the training success rate.
[0086] Please continue to refer to this. Figure 1 In step S140, the generator and the discriminator are jointly trained using adversarial learning to obtain the trained generator, which is then used as the target data imputation model. During the adversarial learning joint training process, a statistical constraint term is embedded in the total loss function. The statistical constraint term is used to constrain the generator to generate imputation data that conforms to the statistical laws of real data.
[0087] In adversarial learning joint training, the generator and discriminator in a generative imputation network alternately or synchronously optimize in an adversarial game. The generator aims to generate imputation data that is as realistic as possible to "deceive" the discriminator, while the discriminator aims to distinguish between real and imputed data in the data sequence as accurately as possible.
[0088] The total loss function is the objective function used to guide model parameter updates during adversarial learning joint training. This total loss function can comprehensively consider the discriminator loss, generator loss, and statistical constraint loss to guide model parameter updates.
[0089] The statistical constraint term is a set of sub-terms in the total loss function. It is a mathematical penalty term constructed based on prior knowledge of the statistical regularities of real building energy consumption data. This statistical constraint term is used to mathematically guide and restrict the generator to generate imputed data, so that the imputed data generated by the generator conforms to known physical or statistical regularities, such as low rank, time smoothness, and periodicity of the data.
[0090] In this implementation, before joint training of adversarial learning, the network weight parameters of the generator and discriminator are initialized respectively, and a corresponding training dataset is prepared. This training dataset may contain target input sequences constructed based on multiple univariate energy consumption time series data with random data gaps. For example, a complete univariate energy consumption time series data can be combined with multiple missing masks to generate multiple target input sequences.
[0091] During adversarial learning joint training, multiple target input sequences are fed sequentially into the generative imputation network. Based on the outputs of the generator and discriminator, the corresponding loss value is calculated according to the total loss function. The parameters of the generator or discriminator are then optimized based on the calculated loss value until a preset number of training epochs is reached or the loss value converges. At this point, the trained generator can be used as a target data imputation model to impute missing data in univariate energy consumption time series data in real-world engineering scenarios.
[0092] Thus, by embedding statistical constraint terms into the total loss function, the imputation data generated by the generator can strictly follow the statistical laws of building energy consumption. This not only effectively solves the problem of insufficient stability of traditional generative adversarial networks under high missing rates or long missing intervals, but also transforms the complex statistical constraint optimization problem that originally needed to be solved externally by iterative algorithms such as ADMM into a component of the differentiable loss term inside the neural network. This allows the process of satisfying statistical constraints to be completed in one go through backpropagation in sync with adversarial learning, completely avoiding the huge computational overhead and engineering complexity caused by iterative decomposition and parameter sensitivity tuning in traditional methods.
[0093] In some embodiments of this disclosure, the total loss function may be as follows:
[0094]
[0095] in, L D For discriminator loss;
[0096] For generator loss,
[0097] , That is, the neural network implementation of the original ADMM objective function;
[0098] This is univariate energy consumption time series data after preprocessing (such as normalization); M For missing mask matrix; This represents the energy consumption time series data output by the generator, which includes the generator's predicted values for all data points; E[] represents the energy consumption time series data reconstruction result output by the generator, i.e., the complete sequence; E[] represents the mathematical expectation operator; D(⋅) represents the output result of the discriminator; , As weight.
[0099] In step S150, missing data is imputed for univariate energy consumption time series data with missing data according to the target data imputation model.
[0100] In the implementation, when missing data imputation is required, the target data imputation model obtained after the aforementioned training is used to input the univariate energy consumption time series data with missing data into the target data imputation model. The target data imputation model then imputes the missing data in the univariate energy consumption time series data with missing data, resulting in a continuous, complete, and physically consistent univariate energy consumption time series data.
[0101] Therefore, the building energy consumption time series missing data imputation method provided in this disclosure constructs the target input sequence based on the univariate energy consumption time series data of the target building and subsequently trains the model. This allows the trained target data imputation model to perform missing data imputation without relying on external meteorological data or multivariate information such as building attributes, thus expanding the applicability of the technical solution in practical engineering scenarios. Furthermore, by embedding statistical constraint terms into the total loss function of adversarial learning joint training, it not only effectively maintains the inherent structural characteristics and global patterns of building energy consumption data, significantly improving imputation stability under high missing rates or long missing intervals, but also eliminates the need for multiple tensor expansions and singular value decomposition calculations, reducing the computational cost of missing data imputation.
[0102] In some embodiments of this disclosure, the statistical constraint term includes at least one sub-constraint term, each sub-constraint term corresponding to a specific statistical regularity (such as low-rank property of the data, temporal smoothness, or periodicity). Preferably, the sub-constraint term includes one or more of low-rank structure constraint terms, time autoregressive constraint terms, and periodic similarity constraint terms. The sub-constraint terms are independent of each other and jointly constrain different aspects of the generator output.
[0103] Based on this, during the adversarial learning joint training process, the method for imputing missing data in the building energy consumption time series preferably further includes steps S310 to S320, please refer to... Figure 3 .
[0104] In step S310, the hyperparameters of each of the sub-constraint terms are initialized as learnable variables and trained together with the network weight parameters of the generative interpolation network.
[0105] In this implementation, the hyperparameters (such as weight coefficients) of each sub-constraint are transformed from fixed hyperparameters in traditional schemes into learnable parameters that can be optimized. This allows the hyperparameters of each sub-constraint to participate in training together with the network weight parameters of the generative interpolation network (including the network weight parameters of the generator and discriminator, such as the weights of fully connected layers and the weights of long short-term memory networks), and to be optimized and adjusted during the training process.
[0106] In one embodiment of this disclosure, the sub-constraints include a low-rank structure constraint, a time autoregressive constraint, and a periodic similarity constraint. The hyperparameters corresponding to each sub-constraint are as follows: λ , γ , τ The hyperparameters can be represented as learnable variables as follows:
[0107] λ=σ(θλ) , γ=σ(θγ) , τ=σ(θτ)
[0108] in, θ These are network hyperparameters (network weights), which are automatically updated through backpropagation.
[0109] In step S320, in each training iteration of adversarial learning joint training, the gradient of the total loss function with respect to each network weight parameter and the hyperparameter of each sub-constraint term is determined by the backpropagation algorithm, and the hyperparameter of each sub-constraint term and the network weight parameters of the generative interpolation network are updated synchronously according to the gradient.
[0110] In this implementation, in each training iteration of adversarial learning joint training, after completing a full forward propagation (i.e., from the input of the original data to the calculation of all necessary loss function values), the gradient of the total loss function with respect to each network weight parameter and each sub-constraint term is determined by the backpropagation algorithm based on the calculated total loss function. That is, the partial derivative of the total loss function with respect to each parameter participating in training (including network weight parameters and each sub-constraint term hyperparameter) is calculated. This gradient can clarify the direction and magnitude of the influence of each parameter participating in training on the final loss.
[0111] Next, using gradient descent or other optimization algorithms, the hyperparameters of each network weight and each sub-constraint are updated synchronously in the direction of the negative gradient, thereby reducing the total loss function.
[0112] In this way, by setting the hyperparameters of each sub-constraint as learnable variables, the model can automatically and dynamically learn the optimal parameters of each statistical constraint during training, based on the specific characteristics of the input training data (such as the missing rate distribution of the current batch of data, the strength of the periodicity of the sequence, noise level, etc.). This allows the model to automatically "adjust" its dependence on different types of statistical regularities when facing energy consumption data with different missing patterns (such as random missing, consecutive block missing) or different building types.
[0113] In some embodiments of this disclosure, the sub-constraint term includes a low-rank structure constraint term. Therefore, when constructing the low-rank structure constraint term, the building energy consumption time series missing data imputation method preferably includes steps S410 to S440. Please refer to [reference needed]. Figure 4 .
[0114] In step S410, the complete sequence output by the generator is constructed into a tensor matrix.
[0115] In this implementation, when constructing the low-rank structure constraint term, the complete sequence (one-dimensional) output by the generator is first reconstructed into a two-dimensional matrix, namely a tensor matrix, according to a predetermined transformation rule. This allows the intrinsic structural features of the complete sequence to be characterized by the low-rank property of the tensor matrix (i.e., data with periodic repetition patterns exhibit high similarity between rows in the tensor matrix).
[0116] In step S420, the tensor matrix is subjected to singular value decomposition to obtain multiple singular values.
[0117] In step S430, a non-convex penalty function is applied to the plurality of singular values to obtain the penalty amount corresponding to each singular value.
[0118] The non-convex penalty function is a non-linear penalty term applied to the singular values, used to more accurately approximate the true rank of the tensor matrix (i.e., the number of non-zero singular values). Based on this non-convex penalty function, smaller penalties can be applied to larger singular values, and larger penalties to smaller singular values, thus better preserving the main structural features of the data.
[0119] In this implementation, each singular value is input into a predefined non-convex penalty function to obtain the corresponding penalty amount.
[0120] In step S440, the penalty amounts corresponding to the multiple singular values are summed to obtain the low-rank structure constraint term.
[0121] Thus, by reconstructing the complete sequence into a tensor matrix and applying a non-convex penalty, the domain knowledge that building energy consumption data has an inherent low-rank structure in the periodic dimension is transformed into a computable loss term, namely a low-rank structure constraint term, that can be integrated into the backpropagation process of a neural network. This enables the data imputation results to maintain the consistency of the data's inherent patterns and avoids generating incoherent or unreasonable imputation data in long missing intervals.
[0122] Preferably, the non-convex penalty function described in this disclosure can be any one of the following: Smoothly Clipped Absolute Deviation (SCAD) function, Minimax Concave Penalty (MCP) function, or Log-Sum Penalty function, without any special limitation.
[0123] In some embodiments of this disclosure, the sub-constraints include a time autoregressive constraint designed based on prior knowledge that building energy consumption data exhibits continuity and smooth variation over a short period. The time autoregressive constraint aims to penalize unreasonable abrupt changes in the data values of adjacent data points within the complete sequence output by the generator, thereby guiding the generator to produce interpolated data with a natural and coherent transition over time.
[0124] When constructing the time-regressive constraint term, the method for imputing missing data in the building energy consumption time series preferably includes steps S510 to S520. Please refer to [reference needed]. Figure 5 .
[0125] In step S510, the complete sequence output by the generator is constructed into a third-order tensor, and the third-order tensor is expanded into a two-dimensional matrix along the time period dimension.
[0126] In step S520, the fitting error of each row sequence in the two-dimensional matrix is determined, and the sum of the fitting errors corresponding to all row sequences is used as the time autoregressive constraint term.
[0127] In this implementation, based on the inherent daily and weekly cycle patterns of building energy consumption data, the complete sequence output by the generator is constructed as a third-order tensor, whose three dimensions correspond to the hourly segments within a day, the day sequence within a week, and the total number of weeks included.
[0128] Subsequently, for the periodic dimension of the week, the third-order tensor is expanded along the week sequence dimension to obtain a two-dimensional matrix, where each row of the two-dimensional matrix represents a data vector of a complete week. For each row of the sequence in this two-dimensional matrix, its fitting error is calculated, that is, to what extent the data value of each hour in that week can be linearly predicted by the data of the previous few hours. The larger the error, the worse the short-term continuity of the sequence.
[0129] By summing the fitting errors of all weekly sequences (i.e., calculating the sum of fitting errors), a time autoregressive constraint term is obtained. The value of this time autoregressive constraint term will be incorporated into the total loss function, thereby guiding the generator during training to produce smooth and coherent interpolated data that conforms to the short-term operating inertia of building energy consumption.
[0130] Therefore, by introducing a time autoregressive constraint as a sub-constraint into the statistical constraints, it can be ensured that when the generator performs missing data imputation on continuous missing intervals, the imputation results generated can maintain a smooth and continuous transition within the missing interval and at the boundary between the missing interval and the real data. This effectively avoids instantaneous spikes or cliff-like drops in the imputation data generated by the generator that violate physical common sense, and significantly improves the physical reliability and practical usability of the imputation data.
[0131] In some embodiments of this disclosure, the sub-constraints include periodic similarity constraints, which are constructed based on prior physical knowledge that building energy consumption data exhibits repetitive patterns at specific periodic time scales (such as a week or a month). The periodic similarity constraints can constrain data points in the same periodic phase position within the complete sequence output by the generator to have similar data values, thereby guiding the interpolated data generated by the generator to conform to known periodic patterns.
[0132] When constructing the periodic similarity constraint term, the building energy consumption time series missing data imputation method preferably includes steps S610 to S630. Please refer to [link / reference needed]. Figure 6 .
[0133] In step S610, the complete sequence output by the generator is constructed into a third-order tensor, and the matrix representation corresponding to the time period dimension is extracted from the third-order tensor.
[0134] In step S620, a self-representation coefficient matrix is constructed based on the matrix representation. The self-representation coefficient matrix is used to characterize the linear representation relationship between different periodic segments in the matrix representation.
[0135] In step S630, an elastic network regularization term containing sparsity constraints and smoothness constraints is applied to the self-representation coefficient matrix, and the calculation result of the elastic network regularization term is used as a periodic similarity constraint term.
[0136] In this implementation, the complete sequence output by the generator is reconstructed into a third-order tensor. The three dimensions of this third-order tensor correspond to the hourly segments within a day, the day sequence within a week, and the total number of weeks included.
[0137] For the time period dimension of the week sequence, the third-order tensor is expanded along the time period dimension representing the week sequence to obtain a two-dimensional matrix (i.e., the matrix representation corresponding to the time period dimension is extracted from the third-order tensor). Each row of this two-dimensional matrix represents a vector consisting of all energy consumption data for a complete week.
[0138] Based on this two-dimensional matrix, a self-representation coefficient matrix is constructed. Specifically, for the row sequence representing each week's data in the two-dimensional matrix, it is attempted to be approximated by a weighted sum of the data rows from all other weeks (excluding itself), and the weights constitute the self-representation coefficient matrix. This design forces the model to explicitly explore the inherent linear correlations and similarity patterns between data segments from different weeks.
[0139] To ensure that the learned associations are reasonable, concise, and stable, rather than a complex overfit to the training data, an elastic network regularization constraint is applied to the self-representation coefficient matrix. This constraint pursues two objectives: first, sparsity, meaning that the vast majority of elements in the final self-representation coefficient matrix are zero. This implies that each week has strong similarity associations with only a few of the most representative weeks, making the learned periodic patterns concise and representative; second, smoothness, meaning that the size of non-zero coefficient values should be limited and their distribution relatively uniform to avoid excessively large or small extreme weights, thereby enhancing the stability and generalization ability of the learned relationships.
[0140] The metric value of the elastic network regularization term, which is calculated based on the self-representation coefficient matrix and reflects both sparsity and smoothness, is used as a periodic similarity constraint term and incorporated into the total loss function to guide the generator to generate data that conforms to the periodic similarity pattern.
[0141] Thus, by constructing a periodic similarity constraint, the generator is explicitly guided during training to discover and follow the corresponding periodic repetition patterns. This enables the generator to effectively reference historical patterns when faced with missing data across periods (e.g., data from this week's Monday is missing, but historical Monday data is available), generating highly reliable imputation data that conforms to periodic patterns, significantly improving the accuracy and contextual reasonableness of the imputation results.
[0142] Figure 7 This is a schematic diagram illustrating the missing data imputation effect of a missing data imputation method for building energy consumption time series according to one embodiment of this disclosure.
[0143] in, Figure 7 The horizontal axis represents the time dimension, with the unit being hours. This horizontal axis covers a four-week time series (including week 1 to week 4) in hourly increments. The vertical axis represents the building's electricity demand, indicating the building's power consumption at the corresponding moment, with the unit being megawatts (MW).
[0144] like Figure 7 As shown, the blue curve represents the true value curve, indicating complete and unmissing building energy consumption observation data. The orange dashed line represents the repair curve, indicating the complete sequence after missing data imputation generated by applying the building energy consumption time series missing data imputation method disclosed herein.
[0145] from Figure 7 As can be seen, in the pink area, i.e., the area with missing data, after imputation of missing data, the repaired curve and the true value curve closely match the data values. Figure 7 Taking the area within the red box as an example, the repair curve can accurately restore the fluctuation pattern of the true value curve, including peaks, valleys and their changing trends, indicating that the building energy consumption time series missing data imputation method disclosed herein can generate high-quality imputation data in areas with missing data.
[0146] Furthermore, within a four-week timeframe, the repaired curve and the true value curve maintained the same long-term trend, indicating that the building energy consumption time series missing data imputation method disclosed herein can not only handle short-term fluctuations but also accurately grasp the long-term evolution of building energy consumption, avoiding long-term trend distortion caused by missing data.
[0147] It should be noted that the building energy consumption time series missing data imputation method disclosed herein can be applied to building energy consumption monitoring and management systems (such as building energy consumption monitoring systems, intelligent building energy management platforms, or public building energy consumption supervision platforms), building energy consumption analysis and prediction software products (such as building energy consumption analysis software, energy consumption prediction and load analysis systems, or energy efficiency assessment and benchmarking analysis tools), or intelligent energy dispatching and operation optimization products (such as intelligent energy dispatching systems, building operation optimization or energy-saving control platforms; energy management decision support systems).
[0148] By integrating the aforementioned building energy consumption time series missing data imputation method into the data processing flow, it is possible to effectively repair continuous data missingness caused by equipment or communication failures, relying only on univariate historical energy consumption series and without the aid of external auxiliary information. This provides a continuous, complete, and reliable data foundation for subsequent energy consumption statistics, energy efficiency analysis, load forecasting, and operation optimization, ultimately improving the accuracy and reliability of related systems and decisions.
[0149] Figure 8This is a schematic diagram of a building energy consumption time series missing data interpolation device according to one embodiment of the present disclosure.
[0150] like Figure 8 As shown, the building energy consumption time series missing data interpolation device 800 includes a mask generation module 810, a noise filling module 820, a sequence input module 830, a training module 840, and a processing module 850.
[0151] The mask generation module 810 generates a missing mask based on the univariate energy consumption time series data corresponding to the target building, indicating whether data points in the univariate energy consumption time series data are missing. The noise filling module 820 replaces the data values of the data points marked as missing in the univariate energy consumption time series data with randomly generated noise values based on the missing mask, thereby obtaining the target input sequence. The sequence input module 830 inputs the target input sequence into a generative interpolation network, wherein the generative interpolation network includes a generator and a discriminator, and the generator generates a complete sequence after data interpolation based on the target input sequence. The discriminator determines whether the data value corresponding to each data point in the complete sequence is real data or imputed data; the training module 840 is used to perform adversarial learning joint training on the generator and the discriminator to obtain the trained generator and use it as the target data imputation model. In the adversarial learning joint training process, a statistical constraint term is embedded in its total loss function. The statistical constraint term is used to constrain the generator to generate imputed data that conforms to the statistical laws of real data; and the processing module 850 is used to perform missing data imputation on the building energy consumption time series data with missing data according to the target data imputation model.
[0152] In some embodiments of this disclosure, the statistical constraint term includes at least one sub-constraint term, each of which corresponds to a regularization strength parameter, the regularization strength parameter being used to characterize the relative weight of each sub-constraint term in the total loss function; during the adversarial learning joint training process, the training module 840 is further configured to: initialize the hyperparameters of each of the sub-constraint terms as learnable variables, and participate in training together with the network weight parameters of the generative interpolation network; and in each training iteration of the adversarial learning joint training, determine the gradient of the total loss function relative to each network weight parameter and the hyperparameters of each of the sub-constraint terms through the backpropagation algorithm, and synchronously update the hyperparameters of each of the sub-constraint terms and the network weight parameters of the generative interpolation network according to the gradient.
[0153] In some embodiments of this disclosure, the sub-constraint term includes a low-rank structure constraint term. When constructing the low-rank structure constraint term, the training module 840 is configured to: construct a tensor matrix from the complete sequence output by the generator; perform singular value decomposition on the tensor matrix to obtain multiple singular values; apply a non-convex penalty function to the multiple singular values to obtain a penalty amount corresponding to each singular value; and sum the penalty amounts corresponding to the multiple singular values to obtain the low-rank structure constraint term.
[0154] In some embodiments of this disclosure, the sub-constraints include time autoregressive constraints. When constructing the time autoregressive constraints, the training module 840 is used to: construct a third-order tensor from the complete sequence output by the generator, and expand the third-order tensor into a two-dimensional matrix along the time period dimension; and determine the fitting error of each row of the sequence in the two-dimensional matrix, and take the sum of the fitting errors corresponding to all rows of the sequence as the time autoregressive constraints.
[0155] In some embodiments of this disclosure, the sub-constraint term includes a periodic similarity constraint term. When constructing the periodic similarity constraint term, the training module 840 is configured to: construct a third-order tensor from the complete sequence output by the generator, and extract the matrix representation corresponding to the time period dimension from the third-order tensor; construct a self-representation coefficient matrix based on the matrix representation, the self-representation coefficient matrix being used to characterize the linear representation relationship between different periodic segments in the matrix representation; and apply an elastic network regularization term containing sparsity constraints and smoothness constraints to the self-representation coefficient matrix, and use the calculation result of the elastic network regularization term as the periodic similarity constraint term.
[0156] In some embodiments of this disclosure, the generator generates a complete sequence after data interpolation based on the target input sequence, including: the generator extracting a first temporal feature of each data point in the target input sequence along the time-increasing direction, and extracting a second temporal feature of each data point in the target input sequence along the time-decreasing direction; fusing the first temporal feature and the second temporal feature of the same data point to obtain a third temporal feature of the data point; and performing missing data interpolation on the data points marked as missing in the target input sequence according to the third temporal feature of the data points marked as missing in the target input sequence to obtain a complete sequence after data interpolation.
[0157] In some embodiments of this disclosure, the generator includes any one of a multi-layer bidirectional long short-term memory network, a gated recurrent unit network, a temporal convolutional network, or a transformer network.
[0158] In some embodiments of this disclosure, the discriminator determines whether the data value corresponding to each data point in the complete sequence is real data or imputed data, including: the discriminator performs binary classification on the data value of each data point in the complete sequence based on the complete sequence and the corresponding cue vector, and outputs the probability that the data value of each data point is real data, wherein the cue vector is generated based on the missing mask and is used to partially reveal whether the data value of each data point in the complete sequence is real data or imputed data.
[0159] This disclosure also provides an electronic device. Figure 9 A schematic diagram of the hardware implementation using the processing system is shown.
[0160] like Figure 9 As shown, the hardware structure of electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnect buses and bridges, depending on the specific application and overall design constraints of the hardware. Bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules. Bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc. Bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one connection line is used in this figure, but this does not indicate that there is only one bus or one type of bus.
[0161] This disclosure also provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the methods described above. A "readable storage medium" can be any means that can contain a program for storage, communication, propagation, or transmission for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples of a readable storage medium include: an electrical connection with one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM), etc.
[0162] This disclosure also provides a computer program product, the methods of which can be implemented wholly or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, all or part of the processes or functions of this disclosure are performed.
[0163] Computer programs or instructions can be stored in a readable storage medium or transferred from one readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The readable storage medium can be any available medium capable of access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or it can include both volatile and non-volatile types of storage media.
[0164] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0165] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, electronic devices, and computer program products according to this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0166] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0167] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0168] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment / mode or example, which are included in at least one embodiment / mode or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Moreover, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.
[0169] Those skilled in the art should understand that the above embodiments are merely for illustrating the present disclosure and are not intended to limit the scope of the disclosure. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present disclosure.
Claims
1. A method for imputing missing time series data of building energy consumption, characterized in that, include: Based on the univariate energy consumption time series data corresponding to the target building, generate a missing mask to indicate whether the data values of the data points in the univariate energy consumption time series data are missing; Based on the missing mask, the data values of the data points marked as missing in the univariate energy consumption time series data are replaced with randomly generated noise values to obtain the target input sequence; The target input sequence is input into a generative interpolation network, wherein the generative interpolation network includes a generator and a discriminator. The generator generates a complete sequence after data interpolation based on the target input sequence, and the discriminator judges whether the data value corresponding to each data point in the complete sequence is real data or interpolated data. The generator and the discriminator are jointly trained using adversarial learning to obtain a trained generator, which is then used as the target data imputation model. During the joint adversarial learning training, a statistical constraint term is embedded in the total loss function. This statistical constraint term constrains the generator to generate imputation data that conforms to the statistical laws of real data. Based on the target data imputation model, missing data imputation is performed on the building energy consumption time series data with missing data. The generator generates a complete, data-interpolated sequence based on the target input sequence, including: The generator extracts the first temporal features of each data point in the target input sequence along the time-increasing direction, and extracts the second temporal features of each data point in the target input sequence along the time-decreasing direction; The first and second time-series features of the same data point are fused to obtain the third time-series feature of that data point; and Based on the third temporal features of the data points marked as missing in the target input sequence, the missing data points in the target input sequence are imputed to obtain the complete sequence after data imputation.
2. The method for imputing missing time series data of building energy consumption as described in claim 1, characterized in that, The statistical constraint term includes at least one sub-constraint term; During adversarial learning joint training, the method for imputing missing building energy consumption time series data also includes: The hyperparameters of each of the sub-constraint terms are initialized as learnable variables and trained together with the network weight parameters of the generative interpolation network. as well as In each training iteration of adversarial learning joint training, the gradient of the total loss function with respect to each network weight parameter and the hyperparameter of each sub-constraint term is determined by the backpropagation algorithm, and the hyperparameter of each sub-constraint term and the network weight parameters of the generative interpolation network are updated synchronously according to the gradient.
3. The method for imputing missing data in building energy consumption time series as described in claim 2, characterized in that, If the sub-constraint term includes a low-rank structure constraint term, then the method for imputing missing data in the building energy consumption time series when constructing the low-rank structure constraint term includes: Construct a tensor matrix from the complete sequence output by the generator; Singular value decomposition is performed on the tensor matrix to obtain multiple singular values; A non-convex penalty function is applied to the plurality of singular values to obtain a penalty amount corresponding to each singular value; and Summing the penalty amounts corresponding to multiple singular values yields the low-rank structure constraint term.
4. The method for imputing missing time series data of building energy consumption as described in claim 2, characterized in that, The sub-constraint term includes a time autoregressive constraint term. Therefore, when constructing the time autoregressive constraint term, the method for imputing missing data in the building energy consumption time series includes: The complete sequence output by the generator is constructed into a third-order tensor, and the third-order tensor is expanded into a two-dimensional matrix along the time period dimension; and The fitting error of each row sequence in the two-dimensional matrix is determined, and the sum of the fitting errors corresponding to all row sequences is used as the time autoregressive constraint term.
5. The method for imputing missing time series data of building energy consumption as described in claim 2, characterized in that, If the sub-constraint term includes a periodic similarity constraint term, then the method for imputing missing building energy consumption time series data when constructing the periodic similarity constraint term includes: The complete sequence output by the generator is constructed into a third-order tensor, and the matrix representation corresponding to the time period dimension is extracted from the third-order tensor. Based on the matrix representation, a self-representation coefficient matrix is constructed, which characterizes the linear representation relationship between different periodic segments in the matrix representation; and An elastic network regularization term, which includes sparsity constraints and smoothness constraints, is applied to the self-representation coefficient matrix, and the calculation result of the elastic network regularization term is used as a periodic similarity constraint term.
6. The method for imputing missing time series data of building energy consumption as described in claim 1, characterized in that, The generator includes any one of the following: a multi-layer bidirectional long short-term memory network, a gated recurrent unit network, a temporal convolutional network, or a transformer network.
7. The method for imputing missing data in building energy consumption time series as described in claim 1, characterized in that, The discriminator determines whether the data value corresponding to each data point in the complete sequence is real data or imputed data, including: The discriminator performs binary classification on the data values of each data point in the complete sequence based on the complete sequence and the corresponding cue vector, and outputs the probability that the data value of each data point is real data. The cue vector is generated based on the missing mask and is used to partially reveal whether the data value of each data point in the complete sequence is real data or imputed data.
8. An electronic device, characterized in that, include: The memory stores execution instructions; as well as A processor that executes the execution instructions stored in the memory, causing the processor to perform the building energy consumption time series missing data imputation method according to any one of claims 1 to 7.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for interpolating missing data in the time series of building energy consumption as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Processing method and processing system for DPI (Deep Packet Inspection) data
CN113010500A
Industrial process missing value filling method and system based on time sequence
CN120705482A