Day-ahead prediction method and device for load of heating ventilation and air conditioning system, computer equipment, readable storage medium and program product

By adopting a multi-scale attention mechanism and a cross-variable attention mechanism in the load prediction of HVAC systems, the problem of traditional methods ignoring the correlation of weather data is solved, and a higher precision load prediction is achieved.

CN120180036APending Publication Date: 2025-06-20ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510264172.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

When traditional HVAC system load prediction methods process different variable data, they may ignore weather data with weak correlation, resulting in lower prediction accuracy.

Method used

The multi-scale attention mechanism and the cross-variable attention mechanism are adopted to obtain key vectors, value vectors and query vectors by performing feature extraction and linear transformation of load sequences and weather sequences, thereby realizing the recent prediction of the load of HVAC system.

Benefits of technology

By extracting load components related to weather changes, and effectively using weather data, the recent prediction accuracy of HVAC system load is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180036A_ABST
    Figure CN120180036A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power load prediction, and provides a day-ahead prediction method and device for the load of a heating ventilation and air conditioning system, computer equipment, a readable storage medium and a program product. The method comprises the steps of performing feature extraction on a first load splicing sequence and a first weather sequence according to a multi-scale attention mechanism module of a load prediction model to obtain a second load sequence and a second weather sequence; the first load splicing sequence is obtained according to the first load sequence; performing linear transformation on the second load sequence according to a cross-variable attention mechanism module of the load prediction model to obtain a key vector and a value vector; performing linear transformation on the second weather sequence according to a cross-variable attention mechanism module to obtain a query vector; and according to the cross-variable attention mechanism module, the key vector, the value vector and the query vector, obtaining a day-ahead prediction result of the load of the heating ventilation and air conditioning system. By adopting the method, the prediction precision of the day-ahead load of the heating ventilation air-conditioning system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electric load forecasting, and particularly to a day-ahead forecasting method, device, computer device, computer-readable storage medium and computer program product for the load of a heating, ventilation and air conditioning (HVAC) system. Background Art

[0002] As the main electricity load in commercial and residential buildings, the load characteristics of the heating, ventilation and air conditioning (HVAC) system are greatly affected by various factors such as weather and user behavior during the implementation of electricity demand response, resulting in large load fluctuations, which brings difficulties to the accurate implementation of electricity demand response. Therefore, accurately forecasting the load of the HVAC system is of great significance for realizing efficient electricity demand response.

[0003] Traditional technologies usually perform day-ahead forecasting of the load of the HVAC system based on historical multi-source data (such as load data and weather data) and deep learning models. However, when dealing with different variable data, deep learning models often use the same feature processing method, which may ignore the weather data with weak correlation, resulting in low accuracy of day-ahead forecasting of the load of the HVAC system. Summary of the Invention

[0004] Based on this, it is necessary to provide a day-ahead forecasting method, device, computer device, computer-readable storage medium and computer program product for the load of the HVAC system in view of the above technical problems.

[0005] In a first aspect, the present application provides a day-ahead forecasting method for the load of an HVAC system, including:

[0006] Obtaining a first load sequence and a first weather sequence corresponding to the HVAC system;

[0007] Performing feature extraction on a first concatenated load sequence and the first weather sequence according to a multi-scale attention mechanism module of a load forecasting model to obtain a second load sequence and a second weather sequence; the first concatenated load sequence is obtained according to the first load sequence;

[0008] Performing a linear transformation on the second load sequence according to a cross-variable attention mechanism module of the load forecasting model to obtain a key vector and a value vector;

[0009] Performing a linear transformation on the second weather sequence according to the cross-variable attention mechanism module to obtain a query vector;

[0010] According to the cross-variable attention mechanism module, obtain the day-ahead prediction result of the HVAC system load according to the key vector, the value vector, and the query vector.

[0011] In one embodiment, obtaining the first load concatenated sequence includes:

[0012] Perform a pooling operation on the first load sequence to obtain the trend component and the seasonal component of the first load sequence;

[0013] According to the trend component and the seasonal component of the first load sequence, obtain the residual component of the first load sequence;

[0014] Concatenate the trend component, the seasonal component, and the residual component to obtain the first load concatenated sequence.

[0015] In one embodiment, the performing a pooling operation on the first load sequence to obtain the trend component and the seasonal component of the first load sequence includes:

[0016] Perform a pooling operation on the first load sequence according to the first pooling kernel to obtain the trend component of the first load sequence;

[0017] Perform a pooling operation on the first load sequence according to the second pooling kernel to obtain the seasonal component of the first load sequence; the size of the first pooling kernel is larger than the size of the second pooling kernel.

[0018] In one embodiment, the obtaining the residual component of the first load sequence according to the trend component and the seasonal component of the first load sequence includes:

[0019] Perform an addition operation on the trend component and the seasonal component of the first load sequence to obtain the sum of the components;

[0020] Perform a subtraction operation on the first load sequence and the sum of the components to obtain the residual component of the first load sequence.

[0021] In one embodiment, the obtaining the day-ahead prediction result of the HVAC system load according to the key vector, the value vector, and the query vector includes:

[0022] According to the key vector and the value vector, obtain the correlation coefficient between the second load sequence and the second weather sequence;

[0023] According to the correlation coefficient and the query vector, obtain the day-ahead prediction result of the HVAC system load.

[0024] In one embodiment, obtaining the day-ahead prediction result of the HVAC system load according to the correlation coefficient and the query vector includes:

[0025] Obtaining an initial day-ahead prediction result of the HVAC system load according to the correlation coefficient and the query vector;

[0026] Obtaining the quantile corresponding to the initial day-ahead prediction result according to the quantile regression module in the load prediction model and the initial day-ahead prediction result;

[0027] Obtaining the day-ahead prediction result of the HVAC system load according to the initial day-ahead prediction result and the quantile corresponding to the initial day-ahead prediction result.

[0028] In a second aspect, the present application also provides a day-ahead prediction device for the load of an HVAC system, including:

[0029] A first sequence data acquisition module, configured to acquire a first load sequence and a first weather sequence corresponding to the HVAC system;

[0030] A second sequence data acquisition module, configured to perform feature extraction on the first load concatenated sequence and the first weather sequence according to the multi-scale attention mechanism module of the load prediction model to obtain a second load sequence and a second weather sequence; the first load concatenated sequence is obtained according to the first load sequence;

[0031] A key vector and value vector acquisition module, configured to perform a linear transformation on the second load sequence according to the cross-variable attention mechanism module of the load prediction model to obtain a key vector and a value vector;

[0032] A query vector acquisition module, configured to perform a linear transformation on the second weather sequence according to the cross-variable attention mechanism module to obtain a query vector;

[0033] A day-ahead prediction result acquisition module, configured to obtain the day-ahead prediction result of the HVAC system load according to the cross-variable attention mechanism module, the key vector, the value vector, and the query vector.

[0034] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the above method.

[0035] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program is executed by the processor to perform the above method.

[0036] Fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and the computer program is executed by a processor to perform the above method.

[0037] For the above-mentioned day-ahead prediction method, device, computer device, computer-readable storage medium and computer program product of the load of the HVAC system, obtain the first load sequence and the first weather sequence corresponding to the HVAC system; according to the multi-scale attention mechanism module of the load prediction model, perform feature extraction on the first load concatenated sequence and the first weather sequence to obtain the second load sequence and the second weather sequence; the first load concatenated sequence is obtained according to the first load sequence; according to the cross-variable attention mechanism module of the load prediction model, perform a linear transformation on the second load sequence to obtain a key vector and a value vector; according to the cross-variable attention mechanism module, perform a linear transformation on the second weather sequence to obtain a query vector; according to the cross-variable attention mechanism module, obtain the day-ahead prediction result of the load of the HVAC system based on the key vector, the value vector and the query vector. The present application performs a linear transformation on the second load sequence to obtain a key vector and a value vector; performs a linear transformation on the second weather sequence to obtain a query vector; obtains the day-ahead prediction result of the load of the HVAC system based on the key vector, the value vector and the query vector; can extract the load components related to the weather change law from the second load sequence, and can effectively utilize the second weather sequence, thereby improving the prediction accuracy of the day-ahead load of the HVAC system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0039] Figure 1 It is an application environment diagram of the day-ahead prediction method for the load of the HVAC system in an embodiment;

[0040] Figure 2 It is a flowchart of the day-ahead prediction method for the load of the HVAC system in an embodiment;

[0041] Figure 3 It is a schematic diagram of the load prediction model in an embodiment;

[0042] Figure 4 It is a schematic diagram of the multi-scale attention mechanism module in an embodiment;

[0043] Figure 5 It is a structural block diagram of the day-ahead prediction device for the load of the HVAC system in an embodiment;

[0044] Figure 6 It is the internal structure diagram of a computer device in an embodiment. Specific implementation manners

[0045] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] The day-ahead prediction method for the load of the HVAC system provided by the embodiment of the present application can be applied to, for example Figure 1 the application environment shown in the figure. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or other network servers. The terminal 102 can obtain the first load sequence and the first weather sequence corresponding to the HVAC system, and then obtain the day-ahead prediction result of the load of the HVAC system. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0047] In an exemplary embodiment, as Figure 2 shown in the figure, a day-ahead prediction method for the load of the HVAC system is provided. Taking the method applied to Figure 1 the terminal 102 in the figure as an example, it includes the following steps S201 to step 205.

[0048] Step S201, obtain the first load sequence and the first weather sequence corresponding to the HVAC system.

[0049] The first load sequence as shown in formula (1) can be obtained according to the historical load data corresponding to the HVAC system.

[0050] (1)

[0051] Among them, represents the first load sequence, represents the length of the sequence, represents the load data at time t.

[0052] The first weather sequence as shown in formula (2) can be obtained according to the weather data corresponding to the HVAC system.

[0053] (2)

[0054] Among them, represents the first weather sequence, represents the length of the sequence, represents the weather data at time t.

[0055] Step S202: According to the multi-scale attention mechanism module of the load prediction model, feature extraction is performed on the first load concatenated sequence and the first weather sequence to obtain a second load sequence and a second weather sequence; the first load concatenated sequence is obtained from the first load sequence.

[0056] A Transformer model based on the attention mechanism can be trained according to the quantile regression framework to obtain a load prediction model. The load prediction model can include a feature embedding module, a multi-scale attention mechanism module, a cross-variable attention mechanism module, and a quantile regression module. The load prediction model can be as shown in Figure 3 where Linear represents a linear transformation, and its full English name is Linear Transformation; ReLU represents a rectified linear unit, and its full English name is Rectified Linear Unit; Conv1d represents a one-dimensional convolution, and its full English name is 1D Convolution; MSA Block represents a multi-head self-attention module, and its full English name is Multi-Head Self-Attention Block; Multi-Scale Attention represents multi-scale attention, and its full English name is Multi-Scale Attention; Add & Norm represents addition and normalization, and its full English name is Add and Normalization; Feed Forward represents a feed-forward network; CVA Block represents a cross-view attention module, and its full English name is Cross-View Attention Block; Quantity Regression represents quantity regression, and its full English name is Quantity Regression.

[0057] The load prediction model can perform a day-ahead prediction on the load of the HVAC system to obtain a day-ahead prediction result of the load of the HVAC system. Among them, the prediction process of the load prediction model can be modeled as Equation (3).

[0058] (3)

[0059] Among them, represents the output of the load prediction model, represents the first load sequence, represents the first weather sequence, Represents all the parameters of the load forecasting model.

[0060] The prediction loss of the load forecasting model can be calculated using the pinball loss, and the parameters of the load forecasting model can be optimized using the stochastic gradient descent method, as shown in Equation (4).

[0061] (4)

[0062] Where, Represents the optimized parameters, Represents the parameters before optimization, And Represents the prediction loss, Represents the learning rate.

[0063] The prediction loss of the load forecasting model is calculated using the pinball loss as shown in Equation (5).

[0064] (5)

[0065] Where, Represents the prediction loss, Represents the actual value, Represents the predicted value, Represents the pinball loss at the quantile q, Represents the initial pinball loss, q represents the quantile, and the value range is q Between.

[0066] The parameters of the load forecasting model are optimized using the stochastic gradient descent method as shown in Equation (6).

[0067] (6)

[0068] Where represents The pinball loss at the quantile q, q represents the quantile, Represents the actual value, Represents the predicted value.

[0069] The first load sequence can be decomposed according to the Seasonal-Trend decomposition using Losses (STL) technique based on the loss function, and the decomposition results can be spliced to obtain the first load splicing sequence.

[0070] The first load splicing sequence can be feature-extracted according to the multi-scale attention mechanism module of the load forecasting model to obtain the second load sequence. The multi-scale attention mechanism module is as Figure 4 Shown. Where, Input represents the input, Indicates a pooling operation, Indicates a small-sized pooling kernel, Indicates a large-sized pooling kernel, Output indicates output, and Multi-Scale Attention indicates multi-scale attention.

[0071] The multi-scale attention mechanism module of the load prediction model can be used to extract features from the first weather sequence to obtain the second weather sequence.

[0072] Step S203: Perform a linear transformation on the second load sequence according to the cross-variable attention mechanism module of the load prediction model to obtain a key vector and a value vector.

[0073] The cross-variable attention mechanism module of the load prediction model can be used to perform a linear transformation on the second load sequence to obtain a key vector and a value vector, as shown in Equations (7) and (8).

[0074] (7)

[0075] (8)

[0076] Where, Indicates the key vector, Indicates the value vector, Indicates the second load sequence, and Indicates the weight matrix, and Indicates the bias term.

[0077] Step S204: Perform a linear transformation on the second weather sequence according to the cross-variable attention mechanism module to obtain a query vector.

[0078] The cross-variable attention mechanism module can be used to perform a linear transformation on the second weather sequence to obtain a query vector, as shown in Equation (9).

[0079] (9)

[0080] Where, Indicates the query vector, Indicates the second weather sequence, Indicates the weight matrix, Indicates the bias term.

[0081] Step S205: According to the cross-variable attention mechanism module, obtain the day-ahead prediction result of the load of the HVAC system based on the key vector, value vector, and query vector.

[0082] According to the cross-variable attention mechanism module, the key vector and the value vector, the distances between each point in the two sequences of the second load sequence and the second weather sequence can be calculated, so as to determine the strength of the correlation between features according to the size of the distances, and the correlation coefficient between the second load sequence and the second weather sequence can be obtained.

[0083] According to the correlation coefficient, feature extraction can be performed on the query vector to obtain the day-ahead prediction result of the load of the HVAC system.

[0084] In the above day-ahead prediction method of the load of the HVAC system, a linear transformation is performed on the second load sequence to obtain the key vector and the value vector; a linear transformation is performed on the second weather sequence to obtain the query vector; according to the key vector, the value vector and the query vector, the day-ahead prediction result of the load of the HVAC system is obtained; the load components related to the weather change law can be extracted from the second load sequence, and the second weather sequence can be effectively utilized, thereby improving the prediction accuracy of the day-ahead load of the HVAC system.

[0085] In one embodiment, obtaining the first load concatenated sequence specifically includes the following steps: performing a pooling operation on the first load sequence to obtain the trend component and the seasonal component of the first load sequence; obtaining the residual component of the first load sequence according to the trend component and the seasonal component of the first load sequence; concatenating the trend component, the seasonal component and the residual component to obtain the first load concatenated sequence.

[0086] A pooling operation can be performed on the first load sequence to obtain the trend component and the seasonal component of the first load sequence, as shown in Equations (10) and (11).

[0087] (10)

[0088] (11)

[0089] Where represents the trend component, represents the seasonal component, represents the pooling operation, which acts on the last dimension of the input, represents the size of the pooling kernel, represents the padding operation, which can ensure that the sizes of the input and output of the pooling operation are the same.

[0090] The residual component of the first load sequence can be obtained according to the trend component and the seasonal component of the first load sequence, as shown in Equation (12).

[0091] (12)

[0092] Where represents the first load sequence, Represents the residual component, Represents the trend component, Represents the seasonal component.

[0093] The characteristic dimensions of the trend component, seasonal component, and residual component can be concatenated to obtain the first load concatenated sequence, as shown in Equation (13).

[0094] (13)

[0095] Among them, Represents the first load concatenated sequence, , Represents the concatenation operation.

[0096] In this embodiment, the first load sequence is decomposed, and the decomposition results are concatenated to obtain the first load concatenated sequence, which can fully explore the operating characteristics of the first load sequence at different time scales, thereby improving the prediction accuracy of the daily HVAC system load.

[0097] In one of the embodiments, a pooling operation is performed on the first load sequence to obtain the trend component and seasonal component of the first load sequence. The specific steps are as follows: According to the first pooling kernel, a pooling operation is performed on the first load sequence to obtain the trend component of the first load sequence; According to the second pooling kernel, a pooling operation is performed on the first load sequence to obtain the seasonal component of the first load sequence; The size of the first pooling kernel is larger than the size of the second pooling kernel.

[0098] The trend component of the first load sequence can be obtained by performing a pooling operation on the first load sequence according to the first pooling kernel with a larger size, as shown in Equation (10).

[0099] (10)

[0100] Among them, Represents the trend component, Represents the pooling operation, which acts on the last dimension of the input, Represents the size of the pooling kernel, Represents the padding operation.

[0101] The seasonal component of the first load sequence can be obtained by performing a pooling operation on the first load sequence according to the second pooling kernel with a smaller size, as shown in Equation (11). Among them, the size of the first pooling kernel is larger than the size of the second pooling kernel.

[0102] (11)

[0103] Among them, Represents the seasonal component, Represents the pooling operation, which acts on the last dimension of the input, Indicates the size of the pooling kernel, Indicates the padding operation.

[0104] In this embodiment, according to the first pooling kernels and the second pooling kernels of different sizes, a pooling operation is performed on the first load sequence to obtain the trend component and the seasonal component of the first load sequence, which can fully exploit the operating characteristics of the first load sequence at different time scales, thereby improving the prediction accuracy of the daily HVAC system load.

[0105] In one of the embodiments, according to the trend component and the seasonal component of the first load sequence, the residual component of the first load sequence is obtained, and the specific steps are as follows: perform an addition operation on the trend component and the seasonal component of the first load sequence to obtain the sum of the components; perform a subtraction operation on the first load sequence and the sum of the components to obtain the residual component of the first load sequence.

[0106] The trend component of the first load sequence can be added to the seasonal component to obtain the sum of the components ; the first load sequence can be subtracted from the sum of the components to obtain the residual component of the first load sequence, as shown in Equation (14).

[0107] (14)

[0108] In this embodiment, by performing an addition operation on the trend component and the seasonal component of the first load sequence to obtain the sum of the components, and performing a subtraction operation on the first load sequence and the sum of the components to obtain the residual component of the first load sequence, the operating characteristics of the first load sequence at different time scales can be fully exploited, thereby improving the prediction accuracy of the daily HVAC system load.

[0109] In one of the embodiments, based on the key vector, the value vector, and the query vector, the daily prediction result of the HVAC system load is obtained, and the specific steps are as follows: according to the key vector and the value vector, obtain the correlation coefficient between the second load sequence and the second weather sequence; according to the correlation coefficient and the query vector, obtain the daily prediction result of the HVAC system load.

[0110] The correlation coefficient between the second load sequence and the second weather sequence can be obtained according to the key vector and the value vector . The daily prediction result of the HVAC system load can be obtained according to the correlation coefficient and the query vector Feature extraction is performed to obtain a query feature vector, as shown in Equations (15). According to the residual structure, the query feature vector finally output by the cross-variable attention mechanism module can be obtained, as shown in Equation (16), so as to obtain the day-ahead prediction result of the HVAC system load based on the finally output query feature vector.

[0111] (15)

[0112] Among them, Softmax represents a normalization operation, which can convert the feature matrix into a weight matrix to obtain the correlation coefficient.

[0113] (16)

[0114] In this embodiment, according to the key vector and the value vector, the correlation coefficient between the second load sequence and the second weather sequence is obtained; according to the correlation coefficient and the query vector, the day-ahead prediction result of the HVAC system load is obtained. The load components related to the weather change law can be extracted from the second load sequence, and the second weather sequence can be effectively utilized, thereby improving the prediction accuracy of the day-ahead HVAC system load.

[0115] In one of the embodiments, according to the correlation coefficient and the query vector, the day-ahead prediction result of the HVAC system load is obtained, and the specific steps are as follows: according to the correlation coefficient and the query vector, the initial day-ahead prediction result of the HVAC system load is obtained; according to the quantile regression module in the load prediction model and the initial day-ahead prediction result, the quantile corresponding to the initial day-ahead prediction result is obtained; according to the initial day-ahead prediction result and the quantile corresponding to the initial day-ahead prediction result, the day-ahead prediction result of the HVAC system load is obtained.

[0116] The initial day-ahead prediction result of the HVAC system load can be obtained according to the correlation coefficient and the query vector; the initial day-ahead prediction result can be input into the quantile regression module in the load prediction model to obtain the quantile corresponding to the initial day-ahead prediction result; the initial day-ahead prediction result and the quantile corresponding to the initial day-ahead prediction result can be used as the day-ahead prediction result of the HVAC system load.

[0117] In this embodiment, after obtaining the initial day-ahead prediction result of the HVAC system load according to the correlation coefficient and the query vector, the quantile corresponding to the initial day-ahead prediction result is obtained according to the quantile regression module in the load prediction model and the initial day-ahead prediction result; the day-ahead prediction result of the HVAC system load is obtained according to the initial day-ahead prediction result and the quantile corresponding to the initial day-ahead prediction result, so that while predicting the HVAC system load, the load prediction model can also predict the quantiles of different degrees of the HVAC system load, thereby giving the specific load distribution of the HVAC system, effectively evaluating the uncertainty of the HVAC system load prediction, and being beneficial to formulating an effective load demand response plan.

[0118] To better understand the above method, the following details an application embodiment of the day-ahead prediction method for the HVAC system load of this application.

[0119] In the context of the energy system's transformation towards low-carbon and intelligent development, demand response (DR), as an important load management method, is being widely applied in the power system to improve the stability of the power grid and energy utilization efficiency. Demand response can effectively relieve the power grid pressure, reduce the peak load, and promote the consumption of renewable energy by motivating users to adjust their electricity consumption behaviors when the power supply and demand are unbalanced. However, with the continuous expansion of the scale of demand response, how to accurately predict the user load demand has become one of the key challenges for achieving efficient demand response. During the implementation of demand response, the heating, ventilation, and air conditioning (HVAC) system is the main electricity-consuming load in commercial and residential buildings. Due to the load characteristics of the HVAC system being affected by various factors such as weather and user behavior, it has large fluctuations, which brings difficulties to the accurate implementation of demand response.

[0120] Traditional HVAC system load forecasting methods are usually based on historical data and simple regression models, which are difficult to accurately capture the nonlinear characteristics and dynamic changes of HVAC system loads. Therefore, how to improve the prediction accuracy of HVAC system loads has become a key issue that needs to be solved in the field of demand response. In recent years, with the rapid development of artificial intelligence and big data technologies, load forecasting methods based on machine learning have gradually become a research hotspot. For example, the use of deep learning models such as long short-term memory networks (LSTM) can better handle nonlinear relationships in time series data, thereby improving prediction accuracy. In this context, the day-ahead prediction of HVAC system loads, as an important supporting technology for demand response, is receiving more and more attention. By accurately predicting the HVAC system load, the power system can more effectively formulate demand response strategies, optimize load scheduling, and thus improve the operating efficiency of the power grid and the absorption capacity of renewable energy. Therefore, the research and development of day-ahead prediction technology for HVAC system loads has become an important direction in the field of demand response.

[0121] In the field of demand response and load forecasting, traditional technologies usually predict HVAC system loads based on historical multi-source data and deep learning models. Traditional HVAC system load forecasting methods achieve prediction by analyzing the correlation between historical load data and influencing factors (such as temperature, humidity, time, etc.), such as temporal dependence and spatial dependence. The prediction object of traditional HVAC system load forecasting methods is usually the HVAC system load of a building or region. This strategy can achieve HVAC system load prediction based only on historical data and a reasonable model structure. Traditional HVAC system load forecasting methods can make full use of a large amount of historical data collected by intelligent measurement systems to model complex correlations. In addition, in order to cope with the volatility and uncertainty of HVAC system loads, time series analysis and multivariate regression methods are widely used to solve traditional HVAC system load forecasting problems.

[0122] When analyzing the historical data of HVAC system operation, traditional technologies are often limited to a certain time scale, which may cause the model to be unable to fully perceive the operating rules of the HVAC system at different time scales and the correlation between them, resulting in poor prediction of the HVAC system load. To address this problem, the technical solution provided in this embodiment embeds the (Seasonal-Trend decomposition using Losses) STL decomposition technology into the self-attention mechanism to obtain a multi-scale attention mechanism to fully explore the operating characteristics of the HVAC system at different time scales.

[0123] When predicting the load of a heating, ventilation, and air conditioning (HVAC) system using traditional techniques, multi-source data such as load data and weather data are usually utilized. However, when a deep learning model processes historical sequences of different variables, it often processes these data using the same feature processing method, which may cause the model to overlook weather data with relatively weak correlations, resulting in poor prediction performance of the model for the load of the HVAC system. To address this issue, the technical solution provided in this embodiment proposes a cross-variable attention mechanism that can extract feature components related to the operating characteristics of weather data from historical load data, and can fully utilize weather data to improve the load prediction performance of the model.

[0124] When traditional techniques perform load prediction, they often focus on single-step or multi-step deterministic predictions, and these methods cannot effectively evaluate the uncertainty of the predictions, which is not conducive to formulating effective demand response programs. To address this issue, the technical solution provided in this embodiment integrates quantile regression prediction into the deep learning model. While the model predicts the load of the HVAC system, it can also predict different quantiles thereof, thereby giving the specific load distribution of the HVAC system.

[0125] To overcome the shortcomings of traditional techniques in predicting the load of the HVAC system, the technical solution provided in this embodiment proposes a Transformer model based on a multi-variable multi-scale attention mechanism, and can train the Transformer model based on the multi-variable multi-scale attention mechanism according to the quantile regression framework to obtain a load prediction model, thereby achieving high-precision day-ahead probabilistic load prediction of the HVAC system.

[0126] The specific load prediction model framework is as Figure 3As shown in the figure. Among them, Linear represents linear transformation, and its full English name is Linear Transformation; ReLU represents rectified linear unit, and its full English name is Rectified Linear Unit; Conv1d represents one-dimensional convolution, and its full English name is 1D Convolution; MSA Block represents multi-head self-attention module, and its full English name is Multi-Head Self-Attention Block; Multi-Scale Attention represents multi-scale attention, and its full English name is Multi-Scale Attention; Add & Norm represents addition and normalization, and its full English name is Add and Normalization; Feed Forward represents feed-forward network; CVA Block represents cross-view attention module, and its full English name is Cross-View Attention Block; Quantity Regression represents quantity regression, and its full English name is Quantity Regression.

[0127] The input of the load prediction model has two parts, namely the first load sequence and the first weather sequence , where represents the length of the sequence, and represent the historical load data and weather data at time t, respectively.

[0128] The output of the load prediction model is , where , represents the length of the load of the HVAC system to be predicted, represents the number of quantiles, represents the quantile as the load sequence of the HVAC system predicted by the load prediction model at the quantile.

[0129] The prediction process of the load prediction model can be modeled as Equation (3).

[0130] (3)

[0131] Among them, represents the output of the load prediction model, represents the first load sequence, represents the first weather sequence, represents all the parameters of the load prediction model.

[0132] The prediction loss of the load prediction model can be calculated using the pinball loss, and the parameters of the load prediction model can be optimized by means of stochastic gradient descent, as shown in Equation (4).

[0133] (4)

[0134] Wherein, represents the optimized parameter, represents the parameter before optimization, and represent the prediction loss, represents the learning rate.

[0135] The prediction loss of the load prediction model calculated using the pinball loss is shown in Equation (5).

[0136] (5)

[0137] Wherein, represents the prediction loss, represents the actual value, represents the predicted value, and represents the pinball loss at the quantile q, represents the initial pinball loss, and q represents the quantile, with the value range between q .

[0138] The parameters of the load prediction model are optimized by means of stochastic gradient descent as shown in Equation (6).

[0139] (6)

[0140] Wherein, represents the pinball loss at the quantile q, q represents the quantile, represents the actual value, represents the predicted value.

[0141] The load prediction model may include a feature embedding module, a multi-scale attention mechanism module, a cross-variable attention mechanism module, and a quantile regression module. Among them, the multi-scale attention mechanism module is as shown in Figure 4 wherein, Input represents the input, represents the pooling operation, represents the small-size pooling kernel, represents the large-size pooling kernel, Output represents the output, and Multi-Scale Attention represents the multi-scale attention.

[0142] Considering the feature extraction network composed of G stacked multi-scale attention mechanism modules, there is For the g-th multi-scale attention mechanism module, the input first load concatenation sequence of this module is the first load sequence obtained by decomposition, where , represents the length of the first load sequence, represents the length of the features included in each time point. The mathematical expression for decomposing the first load sequence can be expressed as:

[0143] (17)

[0144] (18)

[0145] (19)

[0146] (20)

[0147] Among them, represents the trend component of the g-th multi-scale attention mechanism module, represents the seasonal component of the g-th multi-scale attention mechanism module, represents the pooling operation, which acts on the last dimension of the input, represents the size of the pooling kernel, represents the padding operation, which can ensure that the input and output sizes of the pooling operation are the same. The trend component and seasonal component of the first load sequence can be obtained by using pooling kernels of larger and smaller sizes respectively. Then, the residual component of the input first load sequence is obtained according to formula (19). represents the concatenation operation, which can concatenate the feature dimensions of the input data to obtain , where . Next, the multi-scale attention mechanism can be used to achieve feature extraction, and the mathematical expression is as follows.

[0148] (21)

[0149] (22)

[0150] (23)

[0151] (24)

[0152] (25)

[0153] First, obtain the query vector of the g-th multi-scale attention mechanism module through linear transformation , the key vector and the value vector , representing the feature quantities obtained from different perspectives . Among them , , denote weight matrices, , , , , , denote bias terms, , , . As matrix calculations, calculate the and distances between each point in these two sequences. The magnitude of the distance indicates the strength of the correlation between features. Softmax represents a normalization operation. By converting the feature matrix into a weight matrix, feature extraction is performed on the data in . Finally, through formula (25), the input of the (g + 1)-th multi-scale attention mechanism module is obtained with the help of the residual structure

[0154] The input of the cross-variable attention mechanism has two parts, namely the second load sequence and the second weather sequence . The mathematical expression of the cross-variable attention mechanism can be expressed as:

[0155] (9)

[0156] (7)

[0157] (8)

[0158] (15)

[0159] (16)

[0160] Among them represents the second load sequence, represents the second weather sequence, . The basic structure of the cross-variable attention mechanism is similar to the calculation process of the attention mechanism in the multi-scale attention mechanism. The only difference lies in the calculation of the query vector . In the multi-scale attention mechanism, , , They are all obtained by subjecting the same input to different linear transformations. In the cross-variable attention mechanism, is obtained by subjecting the second weather sequence to a linear transformation, while and is obtained by subjecting the second load sequence to a linear transformation. In this case, represents the correlation coefficient between different variable time series, and by calculating the attention scores, the load sequence components related to the weather in the second load sequence are extracted.

[0161] In summary, the technical solution provided in this embodiment has the following beneficial effects:

[0162] (1) The technical solution provided in this embodiment combines the multi-scale sequence decomposition technology and the attention mechanism, and proposes a multi-scale attention mechanism, which can fully consider the temporal characteristics of the load sequence exhibited at different time scales, as well as the correlation between the load sequences at different time scales, and effectively extract the complex operating characteristics of the load sequence.

[0163] (2) Based on using multi-source data to achieve the day-ahead prediction of the load of the HVAC system, the technical solution provided in this embodiment proposes a cross-variable attention mechanism, which effectively extracts the load components related to the weather change law from the load sequence, realizes the effective utilization of the weather sequence, and improves the accuracy of the load prediction.

[0164] (3) The technical solution provided in this embodiment combines the quantile prediction and the transformer model based on the multi-variable multi-scale attention mechanism, and while accurately giving the day-ahead load prediction of the HVAC system, gives the probabilistic prediction at each time point, providing support for formulating an effective demand response plan.

[0165] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same moment, but can be executed at different moments, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.

[0166] Based on the same inventive concept, an embodiment of the present application further provides a day-ahead prediction device for the load of the HVAC system for implementing the day-ahead prediction method of the load of the HVAC system involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more of the following embodiments of the day-ahead prediction device for the load of the HVAC system can refer to the limitations on the day-ahead prediction method of the load of the HVAC system in the above text, and will not be repeated here.

[0167] In an exemplary embodiment, as Figure 5 shown, a day-ahead prediction device for the load of the HVAC system is provided, wherein:

[0168] The first sequence data acquisition module 501 is used to acquire the first load sequence and the first weather sequence corresponding to the HVAC system;

[0169] The second sequence data acquisition module 502 is used to perform feature extraction on the first load concatenated sequence and the first weather sequence according to the multi-scale attention mechanism module of the load prediction model to obtain the second load sequence and the second weather sequence; the first load concatenated sequence is obtained according to the first load sequence;

[0170] The key vector and value vector acquisition module 503 is used to perform a linear transformation on the second load sequence according to the cross-variable attention mechanism module of the load prediction model to obtain the key vector and the value vector;

[0171] The query vector acquisition module 504 is used to perform a linear transformation on the second weather sequence according to the cross-variable attention mechanism module to obtain the query vector;

[0172] The day-ahead prediction result acquisition module 505 is used to obtain the day-ahead prediction result of the load of the HVAC system according to the cross-variable attention mechanism module, the key vector, the value vector and the query vector.

[0173] In one of the embodiments, the second sequence data acquisition module 502 is further used to: perform a pooling operation on the first load sequence to obtain the trend component and the seasonal component of the first load sequence; obtain the residual component of the first load sequence according to the trend component and the seasonal component of the first load sequence; perform concatenation on the trend component, the seasonal component and the residual component to obtain the first load concatenated sequence.

[0174] In one embodiment, the second sequence data acquisition module 502 is further configured to: perform a pooling operation on the first load sequence according to a first pooling kernel to obtain a trend component of the first load sequence; perform a pooling operation on the first load sequence according to a second pooling kernel to obtain a seasonal component of the first load sequence; wherein the size of the first pooling kernel is greater than the size of the second pooling kernel.

[0175] In one embodiment, the second sequence data acquisition module 502 is further configured to: perform an addition operation on the trend component and the seasonal component of the first load sequence to obtain a sum of the components; perform a subtraction operation on the first load sequence and the sum of the components to obtain a residual component of the first load sequence.

[0176] In one embodiment, the day-ahead prediction result acquisition module 505 is further configured to: obtain a correlation coefficient between the second load sequence and the second weather sequence according to the key vector and the value vector; obtain a day-ahead prediction result of the load of the HVAC system according to the correlation coefficient and the query vector.

[0177] In one embodiment, the day-ahead prediction result acquisition module 505 is further configured to: obtain an initial day-ahead prediction result of the load of the HVAC system according to the correlation coefficient and the query vector; obtain a quantile corresponding to the initial day-ahead prediction result according to a quantile regression module in the load prediction model and the initial day-ahead prediction result; obtain a day-ahead prediction result of the load of the HVAC system according to the initial day-ahead prediction result and the quantile corresponding to the initial day-ahead prediction result.

[0178] Each module in the above day-ahead prediction device for the load of the HVAC system can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so as to be called by the processor to execute the operations corresponding to the above respective modules.

[0179] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of embodiments of the day-ahead prediction method for the load of the heating, ventilation, and air conditioning system. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a day-ahead prediction method for the load of the heating, ventilation, and air conditioning system.

[0180] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0181] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are implemented.

[0182] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0183] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0185] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0186] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.

[0187] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for predicting the load of a heating, ventilation and air conditioning system a day ahead, characterized in that: The method comprises: Obtaining a first load sequence and a first weather sequence corresponding to a HVAC system; According to the multi-scale attention mechanism module of the load forecasting model, feature extraction is performed on the first load splicing sequence and the first weather sequence to obtain a second load sequence and a second weather sequence; the first load splicing sequence is obtained based on the first load sequence; According to the cross-variable attention mechanism module of the load forecasting model, linearly transform the second load sequence to obtain a key vector and a value vector; According to the cross-variable attention mechanism module, linearly transform the second weather sequence to obtain a query vector; According to the cross-variable attention mechanism module, a day-ahead prediction result of the HVAC system load is obtained according to the key vector, the value vector and the query vector.

2. The method according to claim 1, characterized in that: Get the first load splicing sequence, including: Performing a pooling operation on the first load sequence to obtain a trend component and a seasonal component of the first load sequence; Obtaining a residual component of the first load series according to a trend component and a seasonal component of the first load series; The trend component, the seasonal component and the residual component are spliced ​​to obtain a first load splicing sequence.

3. The method according to claim 2, characterized in that The performing a pooling operation on the first load sequence to obtain a trend component and a seasonal component of the first load sequence includes: performing a pooling operation on the first load sequence according to a first pooling kernel to obtain a trend component of the first load sequence; According to the second pooling kernel, a pooling operation is performed on the first load sequence to obtain a seasonal component of the first load sequence; the size of the first pooling kernel is larger than the size of the second pooling kernel.

4. The method according to claim 2, characterized in that: The step of obtaining the residual component of the first load sequence according to the trend component and the seasonal component of the first load sequence comprises: Adding the trend component and the seasonal component of the first load sequence to obtain a sum of the components; A subtraction operation is performed on the first load sequence and the sum of the components to obtain a residual component of the first load sequence.

5. The method according to claim 1, characterized in that The step of obtaining a day-ahead forecast result of the HVAC system load according to the key vector, the value vector, and the query vector includes: Obtaining a correlation coefficient between the second load sequence and the second weather sequence according to the key vector and the value vector; A day-ahead prediction result of the HVAC system load is obtained according to the correlation coefficient and the query vector.

6. The method according to claim 5, characterized in that The step of obtaining a day-ahead prediction result of the HVAC system load according to the correlation coefficient and the query vector includes: Obtaining an initial day-ahead forecast result of the HVAC system load according to the correlation coefficient and the query vector; According to the quantile regression module in the load forecasting model and the initial day-ahead forecasting result, obtaining the quantile corresponding to the initial day-ahead forecasting result; The day-ahead prediction result of the HVAC system load is obtained according to the initial day-ahead prediction result and the quantile corresponding to the initial day-ahead prediction result.

7. A device for predicting the load of a heating, ventilation and air conditioning system a day ahead, characterized in that: The device comprises: A first sequence data acquisition module, used to acquire a first load sequence and a first weather sequence corresponding to the HVAC system; A second sequence data acquisition module is used to extract features from the first load splicing sequence and the first weather sequence according to the multi-scale attention mechanism module of the load forecasting model to obtain a second load sequence and a second weather sequence; the first load splicing sequence is obtained according to the first load sequence; A key vector and value vector acquisition module, configured to perform a linear transformation on the second load sequence according to the cross-variable attention mechanism module of the load forecasting model to obtain a key vector and a value vector; A query vector acquisition module, configured to perform a linear transformation on the second weather sequence according to the cross-variable attention mechanism module to obtain a query vector; The day-ahead prediction result acquisition module is used to obtain the day-ahead prediction result of the HVAC system load according to the cross-variable attention mechanism module, the key vector, the value vector and the query vector.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.