High-frequency data determination method and device in building scene and electronic equipment

By determining the high-frequency data of the primary energy source in the building scenario, using the low-frequency prediction model to construct a high-frequency prediction model, and combining the attention mechanism and encoder-decoder architecture, the problem of accurate and timely monitoring of carbon emissions during the building operation phase is solved, and effective prediction is achieved in the absence of energy data statistics. The prediction accuracy and real-time performance of the model are improved, supporting building energy efficiency management and carbon emission control.

CN119494438BActive Publication Date: 2025-10-21STATE GRID BEIJING ELECTRIC POWER CO +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411523067.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-10-21
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

Carbon emissions during the operation phase of a building are difficult to monitor accurately and timely. Existing technologies lack precise real-time monitoring methods, resulting in delayed energy data statistics and difficulty in effectively predicting energy consumption.

Method used

By determining the high-frequency data of the first energy in the building scenario and using the low-frequency prediction model to construct a high-frequency prediction model, combining the attention mechanism and the encoder-decoder architecture, training the low-frequency prediction model to predict energy consumption, and predicting the energy consumption pattern by inputting the high-frequency data, the implementation of the above technical means solves the specific problems that are difficult to effectively solve when energy data statistics are lacking.

Benefits of technology

It enables effective prediction even in the absence of energy data statistics, improves the prediction accuracy and real-time performance of the model, and supports building energy efficiency management and carbon emission control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494438B_ABST
    Figure CN119494438B_ABST
Patent Text Reader

Abstract

The application discloses a high-frequency data determination method and device in a building scene and electronic equipment. The method comprises the following steps: determining first high-frequency data corresponding to a first energy, wherein the first high-frequency data is data corresponding to the first energy, and the unit of measurement of the first high-frequency data is less than a first threshold; calling a high-frequency prediction model corresponding to a target building scene, wherein the target building scene is a building scene using the first energy and a second energy, the second energy is an energy associated with the first energy, the high-frequency prediction model is constructed according to a low-frequency prediction model, and the low-frequency prediction model is obtained by training sample data; inputting the first high-frequency data into the high-frequency prediction model to determine second high-frequency data corresponding to the second energy. The application solves the technical problem that it is difficult to effectively predict energy data when energy data statistics are lacking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device and electronic equipment for determining high-frequency data in a building scene. Background Art

[0002] With the acceleration of China's urbanization, the issue of carbon emissions from buildings is becoming increasingly prominent. As a major source of energy consumption and greenhouse gas emissions, the construction industry accounts for nearly 40% of total carbon emissions, with carbon emissions from building operations potentially accounting for 60% to 70% of total emissions.

[0003] However, carbon accounting during the building operation phase often relies on estimates and historical data, which are subject to significant lags. Furthermore, it involves multiple energy types, such as electricity, heat, and natural gas, each with its own distinct timescale characteristics. This makes it difficult to accurately and timely reflect a building's actual energy consumption, and there is a lack of precise real-time monitoring methods. Therefore, the lack of energy data statistics creates technical challenges in effectively predicting energy data.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a method, device, and electronic device for determining high-frequency data in a building scenario, to at least solve the technical problem of difficulty in effectively predicting energy data when energy data statistics are lacking.

[0006] According to one aspect of an embodiment of the present invention, a method for determining high-frequency data in a building scene is provided, comprising: determining first high-frequency data corresponding to a first energy source, wherein the first high-frequency data is data having a unit of measurement less than a first threshold and corresponding to the first energy source; retrieving a high-frequency prediction model corresponding to a target building scene, wherein the target building scene is a building scene using the first energy source and a second energy source, the second energy source is an energy source associated with the first energy source, the high-frequency prediction model is constructed based on a low-frequency prediction model, the low-frequency prediction model is trained based on sample data, the sample data includes first sample low-frequency data corresponding to the first energy source and second sample low-frequency data corresponding to the second energy source in the target building scene, the first sample low-frequency data is obtained based on sample high-frequency data, the first sample low-frequency data is data having a unit of measurement greater than or equal to a first threshold and corresponding to the first energy source, the second sample low-frequency data is data having a unit of measurement greater than or equal to a second threshold and corresponding to the second energy source; the first high-frequency data is input into the high-frequency prediction model to determine second high-frequency data corresponding to the second energy source.

[0007] Optionally, before calling the high-frequency prediction model corresponding to the target building scene, it also includes: obtaining the sample high-frequency data corresponding to the first energy; accumulating the sample high-frequency data to obtain first sample low-frequency data, wherein the first sample low-frequency data is data with a measurement unit greater than or equal to a first threshold and corresponding to the first energy; training the initial model based on the first sample low-frequency data corresponding to the first energy and the second sample low-frequency data corresponding to the second energy to obtain the low-frequency prediction model; and obtaining the high-frequency prediction model based on the low-frequency prediction model.

[0008] Optionally, the initial model is trained based on the first sample low-frequency data corresponding to the first energy source and the second sample low-frequency data corresponding to the second energy source to obtain the low-frequency prediction model, including: converting the first sample low-frequency data and the second sample low-frequency data into predetermined vectors; determining the query vector, key vector, and value vector corresponding to the predetermined vector based on the query matrix, key matrix, and value matrix; determining the similarity index between the query vector and each key vector; normalizing multiple similarity indices to obtain multiple attention weights, wherein the multiple attention weights correspond one-to-one to the multiple similarity indices; performing weighted summation on the multiple attention weights and the corresponding value vectors to obtain an output vector corresponding to the query vector; inputting the output vector into the initial model for training to obtain the low-frequency prediction model.

[0009] Optionally, the output vector is input into the initial model for training to obtain the low-frequency prediction model, including: when the initial model includes an encoder and a decoder, the output vector is input into the encoder for dimensionality reduction processing to obtain a target vector; based on the target vector, it is input into the decoder to reconstruct it into a reconstructed vector; the loss value between the output vector and the reconstructed vector is determined; and the parameters of the encoder and the decoder are adjusted by a back propagation algorithm until the corresponding loss value is lower than a third threshold value to obtain the low-frequency prediction model.

[0010] Optionally, the high-frequency prediction model is obtained based on the low-frequency prediction model, including: determining initial model parameters of the low-frequency prediction model; determining distinguishing features between low-frequency data and high-frequency data; determining parameter adjustment items corresponding to the distinguishing features from the initial model parameters; adjusting the parameters of the parameter adjustment items based on the distinguishing features to obtain the adjusted initial model parameters.

[0011] Optionally, before inputting the first high-frequency data into the high-frequency prediction model and determining the second high-frequency data corresponding to the second energy, it also includes: determining a missing index of the first high-frequency data; when the missing index is greater than a third threshold, determining the data type of the first high-frequency data; and filling the first high-frequency data in a manner corresponding to the data type to obtain the filled first high-frequency data.

[0012] Optionally, after inputting the first high-frequency data into the high-frequency prediction model and determining the second high-frequency data corresponding to the second energy, it also includes: determining the energy supply equipment corresponding to the second high-frequency data; and adjusting the energy supply equipment based on the second high-frequency data to achieve the energy supply target.

[0013] According to one aspect of an embodiment of the present invention, a device for determining high-frequency data in a building scene is provided, comprising: a first determination module, configured to determine first high-frequency data corresponding to a first energy source, wherein the first high-frequency data is data having a unit of measurement less than a first threshold and corresponding to the first energy source; a calling module, configured to call a high-frequency prediction model corresponding to a target building scene, wherein the target building scene is a building scene using the first energy source and a second energy source, the second energy source is an energy source associated with the first energy source, the high-frequency prediction model is constructed based on a low-frequency prediction model, the low-frequency prediction model is trained based on sample data, the sample data comprising first sample low-frequency data corresponding to the first energy source and second sample low-frequency data corresponding to the second energy source in the target building scene, the first sample low-frequency data being obtained based on sample high-frequency data, the first sample low-frequency data being data having a unit of measurement greater than or equal to the first threshold and corresponding to the first energy source, and the second sample low-frequency data being data having a unit of measurement greater than or equal to the second threshold and corresponding to the second energy source; and a second determination module, configured to input the first high-frequency data into the high-frequency prediction model to determine second high-frequency data corresponding to the second energy source.

[0014] According to one aspect of an embodiment of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any of the above-described methods for determining high-frequency data in a building scene.

[0015] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to execute any of the above-mentioned methods for determining high-frequency data in a building scene.

[0016] In an embodiment of the present invention, the first high-frequency data corresponding to the first energy source is determined, wherein the first high-frequency data is data having a measurement unit less than a first threshold value and corresponding to the first energy source; a high-frequency prediction model corresponding to the target building scene is retrieved, wherein the target building scene is a building scene using the first energy source and the second energy source, the second energy source is an energy source associated with the first energy source, the high-frequency prediction model is constructed based on a low-frequency prediction model, the low-frequency prediction model is obtained by training based on sample data, the sample data includes the first sample low-frequency data corresponding to the first energy source and the second sample low-frequency data corresponding to the second energy source in the target building scene, the first sample low-frequency data is obtained based on the sample high-frequency data; the first high-frequency data is input into the high-frequency prediction model to determine the second high-frequency data corresponding to the second energy source. It can be seen that the high-frequency data of one energy source in the target building scene can be used to predict the high-frequency data of another energy source, thereby achieving the purpose of being able to effectively predict the second energy source even when there is a lack of energy data statistics, thereby solving the technical problem of being difficult to effectively predict energy data when there is a lack of energy data statistics. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 is a flowchart of a method for determining high-frequency data in a building scene according to an embodiment of the present invention;

[0019] Figure 2 is a flow chart of a data determination method provided by an optional embodiment of the present invention;

[0020] Figure 3 4 is a structural block diagram of a device for determining high-frequency data in a building scene according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] Example 1

[0024] According to an embodiment of the present invention, an embodiment of a method for determining high-frequency data in a building scene is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0025] Figure 1 FIG. 1 is a flow chart of a method for determining high-frequency data in a building scene according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0026] Step S102, determining first high-frequency data corresponding to the first energy source, wherein the first high-frequency data is data having a measurement unit less than a first threshold and corresponding to the first energy source;

[0027] In step S102 provided in the present application, the first high-frequency data corresponding to the first energy is determined. The first energy refers to a main energy used in the target building scene, such as electricity. The first high-frequency data refers to high-frequency data corresponding to the first energy, that is, energy consumption data recorded in a shorter time interval (such as every hour). These data can reflect the energy usage in more detail. The first threshold is a threshold used to distinguish the frequency (time resolution) of the data. For example, if the data has a frequency lower than the hourly level, it is high-frequency data.

[0028] In this step, high-frequency data related to electricity (or any designated "primary energy source") is identified—data recorded with a frequency above a certain threshold (e.g., less than daily). This data provides more detailed information about energy consumption. The use of high-frequency data improves the model's forecasting accuracy by capturing short-term fluctuations in energy use, which is crucial when developing real-time energy conservation strategies.

[0029] It should be noted that in this application, high-frequency data refers to data with a measurement unit less than the corresponding threshold and corresponding to the corresponding energy type, such as the hourly level; low-frequency data refers to data with a measurement unit less than or equal to the corresponding threshold and corresponding to the corresponding energy type, such as the daily level.

[0030] Step S104: Retrieve a high-frequency prediction model corresponding to a target building scene, wherein the target building scene is a building scene using a first energy source and a second energy source, the second energy source is an energy source associated with the first energy source, the high-frequency prediction model is constructed based on a low-frequency prediction model, the low-frequency prediction model is obtained by training based on sample data, the sample data includes first sample low-frequency data corresponding to the first energy source and second sample low-frequency data corresponding to the second energy source in the target building scene, the first sample low-frequency data is obtained based on the sample high-frequency data, the first sample low-frequency data is data having a measurement unit greater than or equal to a first threshold value and corresponding to the first energy source, and the second sample low-frequency data is data having a measurement unit greater than or equal to a second threshold value and corresponding to the second energy source;

[0031] In step S104 provided in the present application, a high-frequency prediction model corresponding to the target building scene is retrieved.

[0032] This involves a secondary energy source, which is another energy source related to the primary energy source, such as heat or natural gas. Together, they contribute to the target building scenario's energy consumption. The amounts of energy consumed are also correlated. The secondary energy source can be an energy source for which high-frequency data is difficult to obtain, for example, if the acquisition difficulty index exceeds a predetermined threshold, or if the accumulated high-frequency data exceeds a predetermined threshold.

[0033] Among them, high-frequency prediction models are involved. Models obtained based on low-frequency prediction models are used to predict high-frequency data, and machine learning or deep learning technologies are usually used.

[0034] Among them, a low-frequency prediction model is also involved. The model trained based on sample data is used to predict low-frequency data (such as daily or weekly energy consumption), which is the basis of the high-frequency prediction model.

[0035] In this step, a high-frequency prediction model is selected based on the type of energy used in the building (such as electricity and heat). This model is built on the previously trained low-frequency prediction model to improve temporal resolution, that is, to predict hourly data from daily data. By expanding from a low-frequency prediction model to a high-frequency prediction model, more detailed data can be predicted using a smaller amount of data (low-frequency data is often more readily available), which is crucial for the real-time and accurate decision-making of energy management and energy conservation and emission reduction.

[0036] Step S106: input the first high-frequency data into a high-frequency prediction model to determine second high-frequency data corresponding to the second energy source.

[0037] In step S106, the application provides that known high-frequency electricity data is input into a high-frequency prediction model, which then predicts high-frequency data related to thermal (or other energy) usage. This approach can infer the interactions and patterns between different energy sources, leading to a more comprehensive and accurate assessment of building energy data.

[0038] Through the above steps S102-S106, the first high-frequency data corresponding to the first energy is determined, wherein the first high-frequency data is data with a measurement unit less than a first threshold and corresponding to the first energy; the high-frequency prediction model corresponding to the target building scene is retrieved, wherein the target building scene is a building scene using the first energy and the second energy, the second energy is an energy associated with the first energy, and the high-frequency prediction model is constructed based on the low-frequency prediction model, the low-frequency prediction model is trained based on sample data, the sample data includes the first sample low-frequency data corresponding to the first energy and the second sample low-frequency data corresponding to the second energy in the target building scene, the first sample low-frequency data is obtained based on the sample high-frequency data; the first high-frequency data is input into the high-frequency prediction model to determine the second high-frequency data corresponding to the second energy. It can be seen that the high-frequency data of one energy in the target building scene can be used to predict the high-frequency data of another energy, achieving the purpose of being able to effectively predict the second energy even when there is a lack of energy data statistics, thereby solving the technical problem of being difficult to effectively predict energy data when there is a lack of energy data statistics.

[0039] It should be noted that in practical applications, the fusion of high-frequency and low-frequency data can further enhance the model's predictive performance. For example, fusing high-frequency electricity data with low-frequency thermal data can leverage the temporal details of the high-frequency data to complement the deficiencies of the low-frequency data, improving the model's ability to capture energy consumption patterns.

[0040] As an optional embodiment, before calling the high-frequency prediction model corresponding to the target building scene, it also includes: obtaining sample high-frequency data corresponding to the first energy; accumulating the sample high-frequency data to obtain first sample low-frequency data, wherein the first sample low-frequency data is data with a measurement unit greater than or equal to a first threshold and corresponding to the first energy; training the initial model based on the first sample low-frequency data corresponding to the first energy and the second sample low-frequency data corresponding to the second energy to obtain a low-frequency prediction model; and obtaining a high-frequency prediction model based on the low-frequency prediction model.

[0041] In this embodiment, sample high-frequency data corresponding to the first energy source is obtained. That is, at this stage, the goal is to collect high-frequency data samples related to the first energy source (e.g., electricity). High-frequency data refers to data recorded at shorter time intervals (such as every hour or every minute), which can more accurately reflect the patterns and changes in energy use. High-frequency data provides more detailed time series information, which is critical for training predictive models that can accurately capture short-term fluctuations. This step ensures that the input data of the model has sufficient details to learn the complex patterns of energy consumption.

[0042] By accumulating the high-frequency data of the samples, the low-frequency data of the first sample is obtained. That is, by accumulating or averaging the high-frequency data, it can be converted into low-frequency data (such as daily or weekly data). This conversion is intended to be consistent with the low-frequency data of the second energy source (such as daily data for thermal energy) to facilitate subsequent analysis and model training. The generation of low-frequency data helps reduce the amount of data, simplify the model training process, and to some extent, reduce data noise, improving model stability and prediction accuracy.

[0043] Then, based on the first sample low-frequency data corresponding to the first energy source and the second sample low-frequency data corresponding to the second energy source, the initial model is trained to obtain a low-frequency prediction model. That is, an initial model is trained using the low-frequency data generated above, including data on the first energy source (such as electricity) and the second energy source (such as heat). This model is designed to predict low-frequency energy consumption and will form the basis of the high-frequency prediction model. By training the low-frequency prediction model, the basic pattern of energy consumption can be learned with fewer data points and computing resources, and then the model can be expanded to high-frequency prediction, which not only saves computing costs but also improves prediction accuracy.

[0044] Finally, a high-frequency prediction model is derived based on the low-frequency prediction model. After successfully training the low-frequency prediction model, it needs to be further expanded to predict high-frequency data. This typically involves adjusting the model structure (such as adding an attention mechanism) and fine-tuning parameters to accommodate the prediction needs of higher-frequency data. High-frequency prediction models can provide real-time or near-real-time energy consumption forecasts, which are crucial for immediate response, optimizing energy management, and reducing carbon emissions.

[0045] This series of preparatory steps ensures that the construction and training of high-frequency prediction models are based on sufficient data preparation and model optimization. By starting with high-frequency data, gradually converting it to low-frequency data and training the low-frequency prediction model, and then extending the low-frequency model to high-frequency prediction, the model's prediction accuracy and practicality are effectively improved while reducing the complexity of data processing and model training. This approach ensures the construction of high-quality prediction models even with limited resources, significantly improving the real-time and accuracy of building energy management.

[0046] As an optional embodiment, the initial model is trained based on the first sample low-frequency data corresponding to the first energy source and the second sample low-frequency data corresponding to the second energy source to obtain a low-frequency prediction model, including: converting the first sample low-frequency data and the second sample low-frequency data into predetermined vectors; determining the query vector, key vector, and value vector corresponding to the predetermined vector based on the query matrix, key matrix, and value matrix; determining the similarity index between the query vector and each key vector; normalizing the multiple similarity indices to obtain multiple attention weights, wherein the multiple attention weights correspond one-to-one to the multiple similarity indices; performing weighted summation on the multiple attention weights and the corresponding value vector to obtain an output vector corresponding to the query vector; and inputting the output vector into the initial model for training to obtain a low-frequency prediction model.

[0047] In this embodiment, the first sample low-frequency data and the second sample low-frequency data are converted into predetermined vectors. That is, at this stage, data preprocessing converts low-frequency data (such as daily electricity consumption, daily thermal energy consumption, etc.) into vector representations suitable for input into the self-attention Transformer model. This usually involves data standardization, encoding, and possible feature extraction. Vectorized data helps the model understand and process information. Especially for deep learning models, converting data into numerical vectors is a necessary preprocessing step that can improve the training efficiency and prediction accuracy of the model.

[0048] Then, based on the query matrix, key matrix, and value matrix, the query vector, key vector, and value vector corresponding to the predetermined vector are determined. That is, first, the predetermined vector is linearly transformed to generate the query vector (Q), key vector (K), and value vector (V). The query vector is used to find information, the key vector indicates the location of the information, and the value vector contains the information that needs attention. The attention mechanism allows the model to focus on the most relevant information when processing sequential data, rather than blindly averaging all inputs. This is particularly useful for processing long sequence data and capturing long-term dependencies in the sequence, which can significantly improve the model's prediction accuracy.

[0049] Next, the similarity index between the query vector and each key vector is determined. The degree of match between each key vector and the query vector, or the similarity index, is calculated by calculating the dot product between the query vector and all key vectors or using other similarity metrics (such as cosine similarity). The similarity index measures the relevance of different data points to the current query and forms the basis for calculating attention weights. Data points with higher similarity are assigned greater weights, thus playing a more important role in model predictions.

[0050] Multiple similarity indices are then normalized to produce multiple attention weights. That is, the similarity indices are normalized, such as using a normalized Softmax function, to produce attention weights. The sum of these weights equals 1, representing the distribution of the model's attention on different parts of the input data. Normalized attention weights ensure a more balanced distribution of the model's attention. By using different weights, the model can learn which parts of the data sequence are more important, which is crucial for improving prediction accuracy.

[0051] Based on multiple attention weights, a weighted sum is performed with the corresponding value vector to obtain the output vector corresponding to the query vector. The calculated attention weights are weighted and summed with the corresponding value vector to generate the output vector. This is the output of the attention mechanism and contains the information that the query vector is most concerned about. This weighted summed output vector can more accurately reflect the characteristics of the key information in the sequence, helping the model make more accurate predictions, especially when dealing with complex and nonlinear energy consumption patterns.

[0052] Finally, the output vector is fed into the initial model for training, resulting in a low-frequency prediction model. The output vector generated by the attention mechanism is then fed into the initial model as part of the training data to optimize the model parameters, ultimately resulting in a model that accurately predicts low-frequency energy consumption. By integrating the attention mechanism, the model can more intelligently process input data and learn more complex energy consumption patterns. This not only improves prediction accuracy but also enhances the model's generalization capabilities, making it more adaptable to different building scenarios and energy consumption patterns.

[0053] Together, these steps enable the training of a low-frequency prediction model. The integration of the attention mechanism improves the model's focus on key information, enhancing its predictive capabilities and understanding of complex energy consumption patterns. This helps more accurately predict a building's energy demand at different points in time, supporting building energy efficiency management and carbon emissions control.

[0054] It should be noted that when converting low-frequency data into predetermined vectors, dynamic feature engineering can be further performed, such as calculating the average consumption of the past few days as an additional feature through a sliding window, which helps the model learn seasonal and cyclical patterns.

[0055] In addition to electricity and thermal energy data, other low-frequency data types, such as humidity and temperature, can be incorporated to improve the model's predictive performance. This additional data can increase the model's input dimensionality, making predictions more refined.

[0056] As an optional embodiment, the output vector is input into the initial model for training to obtain a low-frequency prediction model, including: when the initial model includes an encoder and a decoder, the output vector is input into the encoder for dimensionality reduction processing to obtain a target vector; based on the target vector, it is input into the decoder to reconstruct it into a reconstructed vector; the loss value between the output vector and the reconstructed vector is determined; and the parameters of the encoder and decoder are adjusted through the back propagation algorithm until the corresponding loss value is lower than the third threshold value to obtain a low-frequency prediction model.

[0057] In this embodiment, when the initial model includes an encoder and a decoder, the output vector is input into the encoder for dimensionality reduction processing to obtain a target vector. The encoder performs dimensionality reduction processing on the output vector generated by the attention mechanism, which is achieved through the forward propagation of the neural network. The goal of the encoder is to extract the most core features of the output vector and convert it into a more compact representation (target vector) for easy model understanding and processing. Dimensionality reduction processing helps to reduce data redundancy and improve the computational efficiency of the model. It can also enhance the model's understanding of the characteristics of the input data and is particularly effective for processing high-dimensional data.

[0058] The target vector is then fed into the decoder and reconstructed into a reconstructed vector. The decoder receives the target vector generated by the encoder and attempts to reconstruct it back into the format of the original data, generating a new sequence (the reconstructed vector) that is as close as possible to the input low-frequency data sequence. This reconstruction process verifies whether the features extracted by the encoder are sufficient to represent the information of the original data and also provides a goal for model training: the decoder output should be similar to the input data.

[0059] Determine the loss between the output vector and the reconstructed vector. The loss is a measure of the difference between the model's predictions (the reconstructed vector) and the actual data (the output vector or low-frequency data). Mean squared error (MSE), root mean squared error (RMSE), or other loss functions suitable for sequence data are typically used. Calculating the loss provides a quantitative objective for model training, enabling the model to optimize its prediction accuracy by minimizing the loss, improving both training effectiveness and practicality.

[0060] The parameters of the encoder and decoder are adjusted through the back-propagation algorithm until the corresponding loss value is lower than the third threshold, thereby obtaining a low-frequency prediction model. Among them, the back-propagation algorithm is a commonly used method for training neural networks. It adjusts the parameters by calculating the gradient of the loss function relative to the network parameters to minimize the loss value. During the training process, the model training is considered complete until the loss value is lower than the preset second threshold (an acceptable error level). The back-propagation algorithm can continuously optimize the model parameters and improve the accuracy of the model prediction. By setting the second threshold, it can be ensured that the model stops training after reaching a certain accuracy standard, avoiding overfitting and improving the model's generalization ability on unknown data.

[0061] This series of training steps ensures that the encoder-decoder architecture effectively learns the characteristics of low-frequency energy data and verifies the validity of the learned characteristics through the reconstruction process. By adjusting the parameters of the backpropagation algorithm, the model achieves high prediction accuracy and good generalization performance, which is crucial for predicting low-frequency energy consumption of buildings at different time points.

[0062] As an optional embodiment, a high-frequency prediction model is obtained based on a low-frequency prediction model, including: determining initial model parameters of the low-frequency prediction model; determining distinguishing features between low-frequency data and high-frequency data; determining parameter adjustment items corresponding to the distinguishing features from the initial model parameters; adjusting the parameters of the parameter adjustment items based on the distinguishing features to obtain the adjusted initial model parameters.

[0063] In this embodiment, the initial model parameters of the low-frequency prediction model are determined. This step primarily involves obtaining parameters such as weights and biases for all neural network layers in the low-frequency prediction model. These parameters are learned during model training and are used to predict low-frequency energy consumption. The initial model parameters provide a starting point for the high-frequency prediction model, avoiding the significant time and computational resources required to train the model from scratch, and also preventing the inability to train an accurate model due to insufficient data.

[0064] Next, identify the distinguishing characteristics of low-frequency and high-frequency data. Compare characteristics of low-frequency and high-frequency data, such as temporal resolution, data volatility, and periodic patterns, to identify significant differences. High-frequency data typically has higher temporal resolution and more complex short-term fluctuations. Understanding these differences is key to adapting the model to high-frequency data. This helps optimize the model structure and parameters to improve predictive capabilities for high-frequency data.

[0065] From the initial model parameters, determine the parameter adjustments that correspond to the distinguishing features. Based on the distinguishing features, determine which model parameters require adjustment. For example, if high-frequency data exhibits higher volatility, it may be necessary to increase model complexity or adjust the weights of the attention mechanism. Targeted parameter adjustments can optimize the model more efficiently, avoiding blind adjustments that waste resources and extend training time.

[0066] The parameters of the parameter adjustment items are adjusted based on the distinguishing features to obtain the initial model parameters after adjustment. Using the specific information from the distinguishing features, the selected parameter adjustment items are adjusted, such as changing the learning rate, increasing or decreasing the number of model layers, and adjusting the regularization parameters, to generate model parameters suitable for high-frequency data prediction. The adjusted model parameters can better capture the characteristics of high-frequency data, improve the model's prediction accuracy and stability for high-frequency data, and thus more accurately estimate real-time or short-term energy consumption.

[0067] This series of steps leverages the learned parameters of the low-frequency prediction model and makes targeted adjustments to the model parameters based on the characteristics of high-frequency data. This allows for the rapid generation of a model suitable for high-frequency data prediction, significantly reducing the time and resource consumption of model training. This improves the model's predictive capabilities for high-frequency data, contributing to real-time monitoring and optimization of building energy management.

[0068] As an optional embodiment, before inputting the first high-frequency data into the high-frequency prediction model and determining the second high-frequency data corresponding to the second energy, it also includes: determining the missing index of the first high-frequency data; when the missing index is greater than a third threshold, determining the data type of the first high-frequency data; and filling the first high-frequency data in a manner corresponding to the data type to obtain the filled first high-frequency data.

[0069] In this embodiment, a missingness index is determined for the first high-frequency data. The missingness index refers to the proportion of missing values ​​in the data. For high-frequency data (such as hourly electricity consumption data), due to the large number of data points, calculating the missingness index is a necessary preprocessing step that can help identify the completeness of the data set. Clarifying the missingness of the data helps to take targeted measures and avoid directly using data with a large number of missing values ​​for prediction, thereby improving the prediction accuracy and reliability of the model.

[0070] If the missing index is greater than a third threshold, the data type of the first high-frequency data is determined. If the missing index exceeds the preset third threshold (an acceptable missing ratio), the data type needs to be further determined, such as continuous data (power consumption) or discrete data (such as device status). Different data types will affect the data filling method, so this step is crucial for selecting the correct filling strategy.

[0071] The first high-frequency data is padded according to a method corresponding to the data type to obtain padded first high-frequency data. An appropriate filling method is selected according to the data type, such as using time series prediction filling (such as a moving average method or using a prediction model) for continuous data, and using state-based filling (such as nearest neighbor filling) for discrete data.

[0072] By filling missing data, we can avoid the problem of incomplete data in model training. At the same time, choosing the appropriate data type filling method can preserve the original characteristics of the data and the coherence of the time series as much as possible, thereby improving the performance of the prediction model.

[0073] Handling missing values ​​in high-frequency data is a critical step in ensuring model prediction accuracy. By calculating the missingness index and selecting an appropriate data filling strategy, we can effectively compensate for data incompleteness and avoid prediction bias caused by missing data, thereby improving the model's predictive power and robustness for high-frequency data.

[0074] It should be noted that in addition to using prediction models or time series analysis for filling, you can also try to integrate external data sources (such as meteorological data, holiday information, etc.) for data filling to improve the accuracy of filling and the completeness of the data.

[0075] It should also be noted that the output results of the low-frequency prediction model can also be used as a reference for filling in high-frequency data, especially during periods of missing data. The low-frequency prediction results can be used for reasonable speculation and filling to further improve the prediction accuracy of high-frequency data.

[0076] These extensions not only enable more efficient preprocessing of high-frequency data, ensuring the accuracy and reliability of model training and predictions, but also enable flexible adjustments and optimizations based on specific scenarios and data characteristics, providing a more comprehensive and accurate data foundation. Furthermore, model-based infill strategies and multi-source data fusion infill can improve the overall performance of data prediction and reduce prediction errors caused by incomplete data, thereby better supporting real-time monitoring and decision-making.

[0077] As an optional embodiment, after inputting the first high-frequency data into the high-frequency prediction model and determining the second high-frequency data corresponding to the second energy, it also includes: determining the energy supply equipment corresponding to the second high-frequency data; and adjusting the energy supply equipment based on the second high-frequency data to achieve the energy supply target.

[0078] In this embodiment, the energy supply equipment corresponding to the second high-frequency data is determined. After obtaining the second high-frequency data (such as high-frequency thermal energy consumption data), it is first necessary to clarify which energy supply equipment (such as boilers and heat pumps in the thermal energy supply system) is directly related to this data, as different energy types may involve different equipment. This step ensures that the prediction results can be accurately applied to actual energy management, avoids improper operations caused by confusion between equipment categories, and improves the effectiveness and targetedness of energy adjustments.

[0079] Adjust energy supply equipment based on the second-highest frequency data. Based on the second-highest frequency data predicted by the high-frequency prediction model, the operating parameters of relevant energy supply equipment are dynamically adjusted to achieve energy supply goals, such as reducing energy waste, lowering carbon emissions, or optimizing energy costs while meeting energy demand. This equipment adjustment strategy based on real-time prediction results can significantly improve energy efficiency and reduce unnecessary energy consumption. It also helps building managers respond to fluctuations in energy demand in real time, achieving more precise energy management.

[0080] Directly applying the output of the high-frequency prediction model to the adjustment of energy supply equipment can not only optimize energy supply in real time, but also improve the response speed and flexibility of the building energy system, providing strong technical support and management means for achieving energy conservation, emission reduction and green building goals.

[0081] It should be noted that a prediction-adjustment closed-loop control system can be constructed, that is, the prediction results of the high-frequency prediction model are used to adjust the energy supply equipment in real time, and the actual operating data of the equipment after adjustment is input into the model again for prediction, forming a continuously optimized closed-loop control process, thereby improving the adaptability and stability of the energy system.

[0082] Based on the above embodiment and optional embodiment, an optional implementation manner is provided, which is described in detail below.

[0083] An optional embodiment of the present invention provides a method for determining high-frequency data in a building scene. Figure 2 is a flow chart of a data determination method provided by an optional embodiment of the present invention, such as Figure 2 As shown, it involves a building energy and carbon data downscaling method based on the optimized sparse attention mechanism Sparse Transformer target tracking algorithm. For multiple categories of low-frequency energy such as building cooling, heating, and gas, the long-term, coarse-grained time series data is downscaled to shorter-period or higher-frequency hourly dimension data, and the refined hourly power data is collected to obtain high-frequency energy data of all categories of buildings. The carbon emission factor is used to calculate the real-time carbon emissions during the building operation stage, evaluate the dynamic changes in carbon emissions, and formulate precise emission reduction measures.

[0084] To achieve the purpose of this invention, the technical solution is: a building energy and carbon data downscaling method based on an optimized Sparse Transformer target tracking algorithm. The method includes the following steps:

[0085] Step 1: Collect high-frequency data α and low-frequency data β and perform data preprocessing;

[0086] Step 2: Reduce the high-frequency data α to low-frequency data α1;

[0087] Step 3: Establish a tracking model A1 of the low-frequency data α1 and the original low-frequency data β;

[0088] Step 4: Extend the low-frequency data tracking model A1 to high-frequency data, establish the high-frequency data tracking model A2, and obtain the high-frequency energy data β1;

[0089] Step 5: Gather high-frequency data α and β1 to perform high-frequency carbon emission calculations during the building operation phase.

[0090] Specifically:

[0091] Step 1: Collect high-frequency energy data α and low-frequency energy data β and perform data preprocessing:

[0092] 1.1 Clean the raw energy data (e.g., high-frequency: hourly electricity data; low-frequency: daily cooling, heating, and gas data) to ensure data quality, including processing outliers and missing values.

[0093] Outliers: Determine whether there are outliers based on the box plot and each quantile, delete the outliers, and convert them into missing values.

[0094] Missing values: Detect the missing ratio of variables and consider deletion or filling. If the missing rate of the variable is high (greater than 50%), the coverage is low, and the importance is low, the variable can be deleted directly. If the variable to be filled is continuous, the mean method and random difference are generally used for filling. If the variable is discrete, the median or dummy variable is usually used for filling.

[0095] 1.2 Normalize the data to facilitate comparison and conversion between different scales. Use max-min normalization to map the data to the interval [0, 1]. The calculation formula is as follows.

[0096]

[0097] x is the eigenvalue before transformation, xnew is the eigenvalue after transformation, xmax is the maximum eigenvalue, and xmin is the minimum eigenvalue.

[0098] Step 2: Reduce the high-frequency energy data α to low-frequency energy data α1:

[0099] 2.1 Taking high-frequency hourly electricity data as an example, by simple summation, its time dimension is reduced to the same as the low-frequency energy data. In this article, the time dimension of low-frequency data is taken as day, and the total daily electricity consumption of the building is calculated.

[0100] Step 3: Establish a tracking model A1 for the low-frequency energy data α1 and the original low-frequency energy data β:

[0101] Based on the Sparse Transformer target tracking algorithm, the attention mechanism is introduced to establish a low-frequency energy data tracking model. The specific steps are as follows:

[0102] 3.1 Collect low-frequency energy data α1 and β, and convert the data at time i into vector zi, as shown below.

[0103] z i =[α1,β]

[0104] 3.2 For the vector zi, multiply it by three matrices WQ, WK, and WV respectively to obtain three features, namely query: Qi = WQzi, key: Ki = WKzi, value: Vi = WVzi.

[0105] 3.3 Calculate the global attention weight, first calculate it with the query Qi of zi and the key Ki of all other vectors.

[0106]

[0107]

[0108] Where dk represents the dimension of the vector; e1i is the calculation weight; a1i is the global attention weight.

[0109] 3.4 Multiply the corresponding a1i and Vi and add them together to calculate the output vector h1 of z1.

[0110]

[0111] Perform the above steps for each zi to obtain the corresponding output vector. After aggregation and flattening, a new vector h will be obtained. The above introduces the attention mechanism module, which enhances the feature representation of the model, improves the model prediction performance and adaptability, and optimizes the Sparse Transformer target tracking algorithm.

[0112] 3.5 uses Untied Positional Encoding to perform positional encoding on the SparseTransformer module.

[0113] The 3.6 encoder consists of N encoder layers, each of which takes the output of the previous encoder layer as input and inputs the spatial position encoding into the encoder. Therefore, the first encoder layer takes the target template features with spatial position encoding as input. The specific calculation is expressed as:

[0114]

[0115] Where Z∈RHtWt×C represents the characteristics of the target template; Penc∈RHtWt×C represents the spatial position encoding, represents the i-th encoder layer, represents the output of the (i-1)th encoder layer.

[0116] The 3.7 decoder consists of M decoding layers. Each decoder layer not only inputs the search area features with spatial position encoding or the output of the previous decoder layer, but also inputs the encoded features of the target template output by the encoder. The specific calculation is expressed as:

[0117]

[0118] Where X∈RHsWs×C represents the search area feature, Pdec∈RHsWs×C represents the spatial position encoding, represents the target template encoding feature output by the encoder, represents the i-th decoding layer, Represents the output of the (i-1)th decoding layer, and establishes a tracking model A1 of the low-frequency energy data α1 and the original low-frequency energy data β.

[0119] Step 4: Extend the low-frequency energy data tracking model A1 to high-frequency energy data and establish the high-frequency energy data tracking model A2.

[0120] 4.1 Extend the low-frequency energy data tracking model A1 to high-frequency energy data.

[0121] 4.2 Accumulate hourly energy data of other categories, compare and verify with daily or monthly data, and correct intelligent model parameters.

[0122] 4.3 The mean absolute error (MAE) and root mean square error (RMSE) evaluation model is used to establish the high-frequency energy data tracking model A2.

[0123] MAE, the full name of which is Mean Absolute Error, is the average absolute error. It represents the average value of the absolute error between the predicted value and the observed value. Its calculation formula is as follows.

[0124]

[0125] RMSE, short for Root Mean Square Error, represents the sample standard deviation of the difference between the predicted and observed values ​​(called the residual). The RMSE accounts for the degree of sample dispersion. When performing nonlinear fitting, a smaller RMSE is preferred. Its calculation formula is shown below.

[0126]

[0127] Step 5: Gather high-frequency energy data and perform high-frequency carbon emission calculations during the building operation phase.

[0128] 5.1 Based on the high-frequency energy data tracking model A2, the input is the low-frequency energy data of the building, such as cooling, heating, and gas, and the output is the high-frequency energy data of the building, such as cooling, heating, and gas.

[0129] 5.2 Collect high-frequency data on all energy categories, including electricity, cooling, heating, and gas, and combine them with the carbon emission factors of the corresponding energy categories. Use the carbon emission factor method to calculate the high-frequency carbon emission data C. The calculation expression is as follows.

[0130]

[0131] Among them, Ei is the energy consumption of the i-th type of building; EFi is the (dynamic) carbon emission factor of the i-th type of energy, and i is the number of energy categories.

[0132] It is worth noting that the optional implementation methods of the present invention are described using the main energy forms of buildings, such as cold, heat, electricity, and gas, as examples, but the optional implementation methods of the present invention include but are not limited to the above energy categories.

[0133] Through the above optional implementation, at least the following beneficial effects can be achieved:

[0134] (1) Enhanced real-time performance:

[0135] By downscaling long-term, coarse-grained time series data to shorter-period or higher-frequency data, the model can provide a more refined analysis of the dynamic changes in carbon emissions. This downscaling process helps to more accurately assess and formulate emission reduction measures, which is important for real-time monitoring and response to building carbon emissions. For building managers, it can immediately adjust energy use strategies and optimize building operating efficiency. Real-time data helps to quickly respond to market changes and promptly adjust energy policies and emission reduction measures.

[0136] (2) Improve accuracy:

[0137] The method proposed in an optional embodiment of the present invention is based on the Sparse Transformer target tracking algorithm, an advanced deep learning architecture that can effectively process sequence data and introduce an attention mechanism, which enables the model to focus on key information and ignore irrelevant or redundant data. Through this optimization algorithm, the model can better capture the time series characteristics of building energy consumption and improve the accuracy of carbon emission accounting.

[0138] (3) Improving green and low-carbon development in the construction industry:

[0139] This invention provides an efficient and accurate carbon emissions accounting model for the construction industry, helping to drive the sector towards green and low-carbon development. Through accurate carbon emissions accounting, building owners and operators can better understand the environmental impact of their operations and take effective measures to reduce their carbon footprint. Furthermore, it provides data support for building owners to participate in the carbon trading market, facilitating the quantification and management of carbon assets, and promoting the development of green buildings and a low-carbon economy.

[0140] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0141] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.

[0142] Example 2

[0143] According to an embodiment of the present invention, a device for implementing the above-mentioned method for determining high-frequency data in a building scene is also provided. Figure 3 is a structural block diagram of a device for determining high-frequency data in a building scene according to an embodiment of the present invention. Figure 3As shown, the device includes: a first determining module 302, a calling module 304 and a second determining module 306. The device will be described in detail below.

[0144] The first determination module 302 is used to determine the first high-frequency data corresponding to the first energy, wherein the first high-frequency data is data with a measurement unit less than a first threshold and corresponding to the first energy; the retrieval module 304 is connected to the above-mentioned first determination module 302, and is used to retrieve the high-frequency prediction model corresponding to the target building scene, wherein the target building scene is a building scene using the first energy and the second energy, the second energy is an energy associated with the first energy, and the high-frequency prediction model is constructed based on the low-frequency prediction model, and the low-frequency prediction model is obtained by training based on sample data, and the sample data includes the first sample low-frequency data corresponding to the first energy and the second sample low-frequency data corresponding to the second energy in the target building scene, and the first sample low-frequency data is obtained based on the sample high-frequency data; the second determination module 306 is connected to the above-mentioned retrieval module 304, and is used to input the first high-frequency data into the high-frequency prediction model to determine the second high-frequency data corresponding to the second energy.

[0145] It should be noted here that the above-mentioned first determination module 302, calling module 304 and second determination module 306 correspond to steps S102 to S106 in the method for determining high-frequency data in the architectural scene. The examples and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0146] Example 3

[0147] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement any of the above-mentioned methods for determining high-frequency data in a building scene.

[0148] Example 4

[0149] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned methods for determining high-frequency data in a building scene.

[0150] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

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

[0152] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0154] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0156] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for determining high-frequency data in a building scene, characterized in that: include: Determining first high-frequency data corresponding to a first energy source, wherein the first high-frequency data is data having a measurement unit less than a first threshold and corresponding to the first energy source; Retrieve a high-frequency prediction model corresponding to a target building scene, wherein the target building scene is a building scene using the first energy and the second energy, the second energy is an energy associated with the first energy, the high-frequency prediction model is constructed based on a low-frequency prediction model, the low-frequency prediction model is trained based on sample data, the sample data includes first sample low-frequency data corresponding to the first energy and second sample low-frequency data corresponding to the second energy in the target building scene, the first sample low-frequency data is obtained based on the sample high-frequency data, the first sample low-frequency data is data having a measurement unit greater than or equal to the first threshold and corresponding to the first energy, and the second sample low-frequency data is data having a measurement unit greater than or equal to the second threshold and corresponding to the second energy; Inputting the first high-frequency data into a high-frequency prediction model to determine second high-frequency data corresponding to the second energy source; Before calling the high-frequency prediction model corresponding to the target building scene, the method further includes: obtaining the sample high-frequency data corresponding to the first energy source; accumulating the sample high-frequency data to obtain the first sample low-frequency data; training an initial model based on the first sample low-frequency data corresponding to the first energy source and the second sample low-frequency data corresponding to the second energy source to obtain the low-frequency prediction model; and obtaining the high-frequency prediction model based on the low-frequency prediction model. Among them, the initial model is trained based on the first sample low-frequency data corresponding to the first energy and the second sample low-frequency data corresponding to the second energy to obtain the low-frequency prediction model, including: converting the first sample low-frequency data and the second sample low-frequency data into predetermined vectors; determining the query vector, key vector, and value vector corresponding to the predetermined vector based on the query matrix, key matrix, and value matrix; determining the similarity index between the query vector and each key vector; normalizing multiple similarity indices to obtain multiple attention weights, wherein the multiple attention weights correspond one-to-one to the multiple similarity indices; performing weighted summation on the multiple attention weights and the corresponding value vectors to obtain the output vector corresponding to the query vector; inputting the output vector into the initial model for training to obtain the low-frequency prediction model.

2. The method according to claim 1, characterized in that Inputting the output vector into the initial model for training to obtain the low-frequency prediction model includes: In the case where the initial model includes an encoder and a decoder, the output vector is input into the encoder for dimensionality reduction processing to obtain a target vector; Inputting the target vector into the decoder to reconstruct a reconstructed vector; determining a loss value between the output vector and the reconstructed vector; The parameters of the encoder and the decoder are adjusted by a back propagation algorithm until the corresponding loss value is lower than a third threshold, thereby obtaining the low-frequency prediction model.

3. The method according to claim 1, characterized in that Obtaining the high-frequency prediction model based on the low-frequency prediction model includes: Determining initial model parameters of the low-frequency prediction model; Identify the distinguishing features of low-frequency data from high-frequency data; Determining, from the initial model parameters, parameter adjustment items corresponding to the distinguishing features; The parameters of the parameter adjustment items are adjusted according to the distinguishing features to obtain the adjusted initial model parameters.

4. The method according to claim 1, wherein Before inputting the first high-frequency data into a high-frequency prediction model to determine second high-frequency data corresponding to the second energy source, the method further includes: determining a missing index of the first high-frequency data; When the missing index is greater than a third threshold, determining a data type of the first high-frequency data; The first high-frequency data is padded according to a method corresponding to the data type to obtain the padded first high-frequency data.

5. The method according to any one of claims 1 to 4, characterized in that After inputting the first high-frequency data into a high-frequency prediction model to determine second high-frequency data corresponding to the second energy source, the method further includes: determining an energy supply device corresponding to the second high-frequency data; The energy supply equipment is adjusted according to the second high-frequency data to achieve an energy supply target.

6. A device for determining high-frequency data in a building scene, characterized in that: include: a first determining module, configured to determine first high-frequency data corresponding to a first energy source, wherein the first high-frequency data is data having a measurement unit less than a first threshold and corresponding to the first energy source; a calling module, configured to call a high-frequency prediction model corresponding to a target building scene, wherein the target building scene is a building scene using the first energy and the second energy, the second energy is an energy associated with the first energy, the high-frequency prediction model is constructed based on a low-frequency prediction model, the low-frequency prediction model is trained based on sample data, the sample data includes first sample low-frequency data corresponding to the first energy and second sample low-frequency data corresponding to the second energy in the target building scene, the first sample low-frequency data is obtained based on the sample high-frequency data, the first sample low-frequency data is data having a measurement unit greater than or equal to the first threshold and corresponding to the first energy, and the second sample low-frequency data is data having a measurement unit greater than or equal to the second threshold and corresponding to the second energy; a second determination module, configured to input the first high-frequency data into a high-frequency prediction model to determine second high-frequency data corresponding to the second energy source; The retrieval module is further configured to obtain the sample high-frequency data corresponding to the first energy source; accumulate the sample high-frequency data to obtain the first sample low-frequency data; train an initial model based on the first sample low-frequency data corresponding to the first energy source and the second sample low-frequency data corresponding to the second energy source to obtain the low-frequency prediction model; and obtain the high-frequency prediction model based on the low-frequency prediction model. Among them, the retrieval module is also used to convert the first sample low-frequency data and the second sample low-frequency data into a predetermined vector; determine the query vector, key vector, and value vector corresponding to the predetermined vector based on the query matrix, key matrix, and value matrix; determine the similarity index between the query vector and each key vector; normalize the multiple similarity indices to obtain multiple attention weights, wherein the multiple attention weights correspond one-to-one to the multiple similarity indices; perform weighted summation on the multiple attention weights and the corresponding value vectors to obtain the output vector corresponding to the query vector; input the output vector into the initial model for training to obtain the low-frequency prediction model.

7. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for determining high-frequency data in a building scene according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for determining high-frequency data in a building scene according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Akeptus smart building technology: system and procedure for development of smart energy sensors

    CA3082653A1

  • Scene template library construction method, object prediction method and device, and electronic equipment

    CN116662411A