Method and system for predicting energy consumption of central air conditioner

By using the Transformer model optimized by improved Harris Eagle algorithm to predict central air conditioners, the existing models solve the problem of performance bottlenecks and insufficient adaptability when processing large-scale data, and achieve efficient and accurate energy consumption prediction.

CN119740689APending Publication Date: 2025-04-01STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +1

Patent Information

Application Number
CN202411765936.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing central air conditioner energy consumption prediction model has performance bottlenecks when processing large-scale data, with slow prediction speed, high computing resource consumption, and limited adaptability, making it difficult to effectively deal with sudden changes in environmental conditions or adjustments in system configuration.

Method used

Using the Transformer model based on the improved Harris Eagle algorithm, the data related to the air conditioner energy consumption impact is obtained and preprocessed, divided into training sets and test sets, and input them into pre-established models for training and testing to generate energy consumption prediction results.

Benefits of technology

It improves the accuracy and speed of energy consumption prediction, enhances the model's adaptability to dynamic environments, avoids the problem of difficulty in parameter adjustment, and improves the accuracy and stability of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740689A_ABST
    Figure CN119740689A_ABST
Patent Text Reader

Abstract

The invention discloses a central air-conditioning energy consumption prediction method and system, and relates to the technical field of energy consumption prediction, and the method comprises the following steps: obtaining air-conditioning energy consumption influence related data, preprocessing the air-conditioning energy consumption influence related data, and obtaining processed air-conditioning energy consumption influence related data; dividing the processed air conditioner energy consumption influence related data into a training set and a test set; inputting the training set and the test set into a pre-established Transform model based on an improved Harris Eagle algorithm for training and testing, and obtaining the trained Transform model based on the improved Harris Eagle algorithm; and obtaining to-be-evaluated air conditioner energy consumption data, inputting the to-be-evaluated air conditioner energy consumption data into the trained Transformer model based on the improved Harris eagle algorithm, and outputting to obtain a central air conditioner energy consumption prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of energy consumption prediction, and in particular to a method and system for predicting energy consumption of a central air conditioner. Background Art

[0002] As an important energy consumption system in buildings, the energy consumption management of central air conditioning system is directly related to energy efficiency, operating costs, environmental protection and other aspects. Effective energy consumption management can not only help building managers reduce energy costs, but also improve the operating efficiency of air conditioning system and reduce environmental impact.

[0003] In the field of central air-conditioning energy consumption prediction research, technology has advanced rapidly, and a variety of related technologies and products have been proposed and applied. For example, the prior art US20200243656A1 describes a model for optimizing the energy consumption of a building's central air-conditioning system. The model integrates multiple data sources within the building (such as indoor and outdoor temperature and humidity, meteorological data, building usage, etc.) and combines advanced prediction algorithms to improve the accuracy of energy consumption prediction. Similarly, the prior art CN202210083358X proposes a real-time parameter identification method for the first-order model of the building to which the air conditioner belongs. This method combines the standard least squares method with the recursive auxiliary variable method to achieve real-time updating of the air-conditioning load model, thereby optimizing the control and scheduling of the air-conditioning system.

[0004] Although existing technologies have improved the accuracy of energy consumption prediction to a certain extent, they still have some limitations. For example, some models may encounter performance bottlenecks when processing large-scale data, resulting in slower prediction speeds and higher consumption of computing resources. In addition, the adaptability of existing models is limited and they often cannot effectively cope with dynamic changes in actual applications, such as sudden changes in environmental conditions or adjustments to system configurations. These limitations limit the effectiveness and universality of existing technologies in practical applications. Summary of the invention

[0005] In order to solve the deficiencies mentioned in the above background technology, the purpose of the present invention is to provide a central air conditioning energy consumption prediction method and system.

[0006] In a first aspect, the purpose of the present invention can be achieved by the following technical solution: a method for predicting energy consumption of a central air conditioner, the method comprising the following steps:

[0007] Acquire relevant data on the impact of air conditioning energy consumption, pre-process the relevant data on the impact of air conditioning energy consumption, obtain processed relevant data on the impact of air conditioning energy consumption, and divide the processed relevant data on the impact of air conditioning energy consumption into a training set and a test set;

[0008] Input the training set and the test set into the pre-established Transformer model based on the improved Harris Eagle algorithm for training and testing, and obtain the trained Transformer model based on the improved Harris Eagle algorithm;

[0009] The energy consumption data of the air conditioner to be evaluated is obtained, and the energy consumption data of the air conditioner to be evaluated is input into the trained Transformer model based on the improved Harris Eagle algorithm, and the energy consumption prediction result of the central air conditioner is obtained as output.

[0010] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: the air conditioning energy consumption-related data includes: outdoor temperature and humidity, weather type, solar radiation, outdoor wind speed, thermal insulation performance of building materials, heat dissipation of indoor heat sources, indoor space size, number of indoor air conditioners, air conditioner working mode, air conditioner's own parameters and air conditioner set temperature.

[0011] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the construction process of the pre-established Transformer model based on the improved Harris Hawk algorithm is as follows:

[0012] Build the Transformer model and determine the parameters to be optimized: learning rate, hidden layer dimension;

[0013] Initialize the parameters of the improved Harris Hawk algorithm and the Harris Hawk population, and calculate the fitness of the population;

[0014] Select the position update method based on the energy factor E and the prey escape probability λ;

[0015] Termination judgment: if the number of runs is less than the maximum number of iterations, return to the previous step to execute; otherwise, end;

[0016] Return the optimal parameters to the Transformer model;

[0017] Generate a Transformer model based on the improved Harris Eagle algorithm.

[0018] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: the stages of selecting the position update method based on the energy factor E and the prey escape probability λ include: a transition stage from exploration to development, an exploration stage, and a development stage.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: the transition phase from exploration to development is as follows:

[0020]

[0021] E r=E×E0 (2)

[0022] Where: t is the current iteration number of the algorithm, T is the maximum iteration number of the algorithm, E is the energy factor of the prey, E0 is the initial escape energy of the prey, Er is the prey escape energy factor, when E r ≥1, the algorithm enters the exploration phase; when E r <1, the algorithm enters the development stage;

[0023] The exploration phase is as follows:

[0024]

[0025] Where: Y(t) is the position vector of an eagle in the eagle group at the current t iterations, Y rand (t) is the position vector of the randomly selected eagle, Y rabbit (t) is the position vector of the prey, r1, r2, r3, r4 and q are random numbers, BU and BL are the upper and lower limits of the variable, N is the population of eagles, Y m (t) is the average position of the eagle;

[0026] The development stages include: soft siege, hard siege, soft siege with progressive rapid assault, and hard siege with progressive rapid assault.

[0027] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the soft siege:

[0028] When 0.5≤|E r When |≤1 and λ≥0.5, the prey cannot escape the pursuit of Harris's hawk, and the formula is updated as follows:

[0029] Y(t+1)=Y(t)-E r |JY rabbit (t)-Y(t)| (5)

[0030] Where λ is the probability of prey escape;

[0031] Hard Siege:

[0032] When|E r When |≤0.5 and λ≥0.5, the probability of prey escaping from Harris's hawk is small, and the formula is updated as follows:

[0033] Y(t+1)=Y rabbit (t)-E r |ΔY(t)| (6)

[0034] Soft siege with progressive fast raid:

[0035] When 0.5≤|E rWhen |≤1 and λ<0.5, the prey has enough energy to escape from the Harris hawk, and the formula is updated as follows:

[0036]

[0037] Among them: s(.) is the fitness function, D is the dimension of the objective function, S is a random variable, and the LF function expression is as follows:

[0038]

[0039] Where: v and μ are random numbers with values ​​of [0,1], and σ is the value calculated for β;

[0040] Hard siege with progressive fast raid:

[0041] When|E r When |≤0.5 and λ<0.5, the prey is not physically strong enough to escape the encirclement, but the prey will escape, and the formula is updated as follows:

[0042]

[0043] Where: s(G) represents the fitness function value of point G, and s(Y(t)) represents the fitness function value of point Y(t).

[0044] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the improvement process based on the improved Harris Hawk algorithm includes the following steps:

[0045] Even symmetric infinite folding chaotic sequence population initialization:

[0046] Infinite iterations are performed in a symmetrical manner in the search space to achieve infinite folding mapping in a finite space to generate a model whose phase space structure tends to white noise. The value of the even symmetric infinite folding chaotic sequence is defined as

[0047]

[0048] Where: α, β—chaotic factors, α∈[1,∞), β∈(0,1), y i,j —the chaotic sequence value generated by individual i in dimension j, mod() —modulus function;

[0049] The chaotic sequence values ​​generated in [0, 1] are then inversely mapped to the individual search space of the sparrow to obtain the initial position of the population. The mapping method is:

[0050]

[0051] Where: x i,j —The j-dimensional position of individual i, lb i ,ubi —The lower and upper boundary values ​​of the search space of individuals in the population;

[0052] Energy factor update and improvement

[0053] The energy factor update formula is as follows:

[0054]

[0055] Incremental Rapid Raid Improvements

[0056] By integrating the optimal individual positions, enhancing search diversity, expanding the exploration range, helping the algorithm to jump out of the local optimum, and proposing a new coordinate position update formula, the soft siege update formula of the progressive rapid raid is as follows:

[0057]

[0058] Where rand represents a random number between 0 and 1, Y_best1(t) represents the optimal position of the Harris Hawk at the current t iterations, Y_best2(t) represents the second optimal position of the Harris Hawk at the current t iterations, and Y_best3(t) represents the third optimal position of the Harris Hawk at the current t iterations.

[0059] The hard siege update formula for progressive fast raids is as follows:

[0060]

[0061] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the process of inputting the air conditioning energy consumption data to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm, and outputting the central air conditioning energy consumption prediction result is as follows:

[0062] First, the air conditioning energy consumption data to be evaluated is x new Contains the current operating status parameters of the air conditioner, such as indoor temperature, outdoor temperature, humidity, workload and other characteristics. This data is input into the trained Transformer model, processed by several layers of encoders and decoders, and outputs the predicted air conditioner energy consumption. That is, the energy consumption value predicted by the model.

[0063] During this process, the model processes the input data through the following steps:

[0064] Data input and encoding: Input feature x new is embedded into the model and first passes through a multi-layer self-attention encoder to extract the dependencies between features. The output of each encoder is H encoder, which represents the high-level feature representation of the input data.

[0065] H encoder =Encoder(x new ,θ * )

[0066] Among them, θ * Represents the model parameters optimized by the improved Harris Eagle algorithm.

[0067] Model output and decoding: Next, after processing by multiple layers of decoders, the model finally generates a predicted value for air conditioning energy consumption The output of the decoder is expressed by the following formula:

[0068]

[0069] This process processes the input features and uses the learned optimal parameters θ * , and obtain a forecast of future energy consumption.

[0070] Model evaluation: To evaluate the accuracy of the prediction, the mean square error (MSE) can be used as an evaluation indicator to calculate the air conditioning energy consumption predicted by the model. The actual observed value y actual For comparison, the calculation expression is as follows:

[0071]

[0072] Where n is the number of samples, is the predicted value of the i-th sample, y actual,i is the actual value of the i-th sample.

[0073] In a second aspect, in order to achieve the above-mentioned purpose, the present invention discloses a central air-conditioning energy consumption prediction system, comprising:

[0074] A data processing module is used to obtain the air conditioning energy consumption impact related data, pre-process the air conditioning energy consumption impact related data to obtain processed air conditioning energy consumption impact related data, and divide the processed air conditioning energy consumption impact related data into a training set and a test set;

[0075] A model training module is used to input the training set and the test set into a pre-established Transformer model based on the improved Harris Eagle algorithm for training and testing, thereby obtaining a trained Transformer model based on the improved Harris Eagle algorithm;

[0076] The energy consumption prediction module is used to obtain the energy consumption data of the air conditioner to be evaluated, input the energy consumption data of the air conditioner to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm, and output the energy consumption prediction result of the central air conditioner.

[0077] In another aspect of the present invention, in order to achieve the above-mentioned purpose, a terminal device is disclosed, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, a central air conditioning energy consumption prediction method as described above is adopted.

[0078] Beneficial effects of the present invention:

[0079] The Transformer model used in the present invention can effectively capture the complex energy consumption patterns in the central air-conditioning system with its powerful processing power and superior feature extraction capabilities. It not only solves the problem that the existing air-conditioning energy consumption models are mostly ETP models or machine learning models with low model accuracy, but also overcomes the problem that most high-precision models are highly data-dependent. In addition, the use of the improved Harris Eagle algorithm overcomes the problem of difficult parameter adjustment in deep learning models, improves the model prediction accuracy, and enhances the model's adaptability to dynamic environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0081] Figure 1 It is a schematic flow chart of the method of the present invention;

[0082] Figure 2 It is a schematic diagram of the flow chart of the improved Harris Eagle algorithm of the present invention;

[0083] Figure 3 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments 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 creative work are within the scope of protection of the present invention.

[0085] Embodiment 1:

[0086] The following is an introduction to the relevant terms involved in the embodiments of the present application:

[0087] Harris Hawks Optimization (HHO) is a metaheuristic algorithm that simulates the Harris Hawk's predation behavior. It aims to solve optimization problems by simulating the Harris Hawk's predation strategy. The algorithm combines the strategies of global search and local search by simulating the flight and predation behavior of the Harris Hawk, and has strong global exploration and local development capabilities.

[0088] like Figure 1 As shown, a method for predicting energy consumption of a central air conditioner comprises the following steps:

[0089] S101: Acquire air conditioning energy consumption impact related data, pre-process the air conditioning energy consumption impact related data to obtain processed air conditioning energy consumption impact related data, and divide the processed air conditioning energy consumption impact related data into a training set and a test set;

[0090] The air conditioning energy consumption-related data include: outdoor temperature and humidity, weather type, solar radiation, outdoor wind speed, thermal insulation performance of building materials, heat dissipation of indoor heat sources, indoor space size, number of indoor air conditioners, air conditioner working mode, air conditioner parameters and air conditioner set temperature;

[0091] Optional data collection methods include: direct sensor collection, meteorological data platform integration, building energy efficiency monitoring system, wireless sensor network, smart metering equipment, etc.

[0092] The data collection method adopted by the present invention: According to the actual requirements of the air conditioning energy consumption prediction system, the present invention selects a method of combining a wireless sensor network (WSN) and an intelligent metering device to collect data.

[0093] Wireless sensor networks are used to collect environmental data, including outdoor temperature and humidity, solar radiation, wind speed, etc. The working parameters of the air conditioner (such as set temperature, operating mode, number of air conditioners, power consumption, etc.) are collected through the intelligent metering equipment built into the air conditioning system. These data can directly reflect the operating status of the air conditioning system and provide accurate basic data for subsequent energy consumption prediction.

[0094] Advantages of choosing this data collection method: By combining wireless sensor networks and smart metering devices, high-precision, real-time environmental and air-conditioning operation data collection is achieved, ensuring the accuracy of the energy consumption prediction model. At the same time, wireless sensor networks have good flexibility and scalability, can adapt to different building environments and meet a wide range of application needs. The integrity and consistency of data collection are guaranteed, ensuring the reliability of air-conditioning energy consumption prediction. In addition, wireless sensor devices are low-power, low-cost, and have a long service life. The high integration of smart metering devices and air-conditioning systems helps reduce maintenance costs, thereby achieving efficient and economical air-conditioning energy consumption management.

[0095] S102: inputting the training set and the test set into a pre-established Transformer model based on the improved Harris Eagle algorithm for training and testing, thereby obtaining a trained Transformer model based on the improved Harris Eagle algorithm;

[0096] Among them, the pre-established Transformer model based on the improved Harris Eagle algorithm is established:

[0097] When selecting an optimization algorithm, a variety of optimization algorithms can be selected in this field, including but not limited to the gray wolf algorithm (GWO), particle swarm optimization algorithm (PSO), whale optimization algorithm (WOA), butterfly optimization algorithm (BOA), etc. These optimization algorithms have their own characteristics. For example, the gray wolf algorithm (GWO) can simulate the hunting behavior of wolves, and has strong global search capabilities and adaptability to complex problems; the particle swarm optimization algorithm (PSO) simulates the collaboration and individual experience of particle groups, not only performs well in global search, but also can quickly converge to a better solution; the whale optimization algorithm (WOA) simulates the predation behavior of whales, has strong global exploration capabilities and local development capabilities, and can efficiently solve multi-peak optimization problems; and the butterfly optimization algorithm (BOA) simulates the flight mode of butterfly groups, has strong local search capabilities, and is suitable for optimization tasks that require local fine-tuning.

[0098] However, considering the high precision requirements and computational efficiency of power load forecasting tasks, especially for complex power load data with seasonal and sudden fluctuation characteristics, this application finally selected the Harris Hawk Optimization (HHO) algorithm to optimize the Transformer model.

[0099] The Harris Hawk algorithm is an optimization algorithm based on the predation behavior of hawks in nature, with excellent global search capabilities and fast convergence. Compared with traditional optimization algorithms, HHO can avoid falling into local optimality while maintaining strong exploration capabilities, making it particularly outstanding in complex nonlinear problems. Power load forecasting requires rapid adaptation to changing data patterns. The exploration-exploitation balance strategy of the Harris Hawk algorithm just meets this requirement and can effectively optimize the hyperparameters of the Transformer model, thereby improving the accuracy and stability of load forecasting.

[0100] The Transformer model based on the improved Harris Eagle algorithm proposed in this application shows significant advantages in power load forecasting. Through its self-attention mechanism, the Transformer model can capture long-term dependencies when processing time series data, which is especially important for seasonal fluctuations and sudden load changes in power load forecasting. After optimizing the Transformer model with the Harris Eagle algorithm, the global optimization capability of the model can be further improved, overfitting can be avoided, and the prediction accuracy can be improved.

[0101] In theoretical analysis, the Transformer model based on HHO optimization has the following advantages:

[0102] Global optimization capability: The Harris Hawk algorithm simulates the behavior of hawks when hunting and has strong global search capabilities. It can effectively avoid the problem of local optimal solutions and improve the global optimization effect of the Transformer model.

[0103] Fast convergence: Compared with traditional optimization algorithms (such as particle swarm optimization, grey wolf algorithm, etc.), HHO can find the global optimal solution more quickly, reduce model training time, and improve computational efficiency.

[0104] Strong adaptability: When processing power load data with complex volatility, the HHO-optimized Transformer model can better capture the law of load changes and enhance the stability and adaptability of the model, especially when facing sudden load fluctuations.

[0105] HHO is compared with five groups of intelligent optimization algorithms, including GWO, PSO, WOA, and BOA, and their optimal values, average values, and standard deviations are compared under the same test function and the same parameters. The selected test functions are some test functions of CEC2005, among which F1~F3 are unimodal functions, F7~F9 are multimodal functions, and F14~F16 are fixed-dimensional multimodal functions. The compared algorithms all use the same experimental parameters, that is, the population size n=30 and the maximum number of iterations T=500. The experimental results are shown in the following table, where the bold data are the optimal results of the comparison.

[0106]

[0107] According to the table data, in the comparison of 9 test functions, the HHO algorithm performed well in most cases, especially in the search for the global optimal value, which was significantly better than other algorithms. The specific analysis is as follows: In terms of the global optimal value, the HHO algorithm can find better solutions than other comparison algorithms on multiple functions. For example, in test functions such as F1, F2, F3 and F9, the HHO algorithm successfully reached a close to or complete global optimal solution, indicating that it has strong global search capabilities and exploratory nature. Especially in F1 and F2, the optimal value of the HHO algorithm is a very small number close to zero, which is much better than other algorithms.

[0108] In terms of average value, the HHO algorithm also leads. Although the average value of HHO is slightly higher on some functions (such as F14), overall, the average quality and stability of its solutions are better than other algorithms in most test functions, especially in complex multi-modal and high-dimensional problems. Compared with other algorithms, HHO shows more stable performance on multi-modal functions such as F7 and F8.

[0109] In terms of standard deviation, the HHO algorithm shows strong stability. For example, in the F9 function, HHO not only achieved the global optimal solution (0), but also had a standard deviation of 0, indicating that it was highly consistent in multiple experiments with almost no fluctuations. This performance, compared to the larger standard deviations of other algorithms (such as PSO and BOA) in this function, further proves the robustness of the HHO algorithm and can effectively avoid falling into the local optimal solution.

[0110] In the performance of some complex problems, the HHO algorithm showed strong adaptability and optimization accuracy. For example, in the F16 function, HHO successfully optimized to the theoretical optimal value (-1.03), and the standard deviation was close to zero, indicating that it can maintain efficient global search capabilities and quickly converge to high-quality solutions when facing high-dimensional, nonlinear, and multi-peak complex optimization tasks.

[0111] In general, the outstanding performance of the HHO algorithm in multiple test functions highlights its advantages in global optimization, especially in avoiding local optimal solutions, improving solution quality, and ensuring convergence, showing high efficiency and reliability. Especially in multi-peak functions (such as F9), the global search ability and convergence accuracy of HHO show its superiority over other algorithms. In addition, the HHO algorithm is not only applicable to standard test functions, but also can show strong application potential and wide applicability when dealing with more complex practical problems (such as large-scale, multi-objective optimization).

[0112] The construction process of the pre-established Transformer model based on the improved Harris Eagle algorithm is as follows:

[0113] Build the Transformer model and determine the parameters to be optimized: learning rate, hidden layer dimension;

[0114] Initialize the parameters of the improved Harris Hawk algorithm and the Harris Hawk population, and calculate the fitness of the population;

[0115] Select the position update method based on the energy factor E and the prey escape probability λ;

[0116] Termination judgment: if the number of runs is less than the maximum number of iterations, return to the previous step to execute; otherwise, end;

[0117] Return the optimal parameters to the Transformer model;

[0118] Generate a Transformer model based on the improved Harris Eagle algorithm.

[0119] The IHHO-Transformer model is used for central air conditioning energy consumption prediction. In order to more comprehensively demonstrate the superiority of the IHHO-Transformer model for energy consumption prediction, some other prediction models are selected for comparison. The results are shown in the following table.

[0120] model RMSE MAE <![CDATA[R 2 ]]> CNN 97.2465 75.7207 0.2555 RNN 45.2293 40.0163 0.8389 TCN 46.5574 37.9720 0.8389 GRU 32.4513 25.6143 0.9171 LSTM 42.1582 35.2940 0.8601 Transformer 18.2329 13.6186 0.9738 HHO-Transformer 17.5732 13.0021 0.9792 IHHO-Transformer 16.4395 12.0406 0.9846

[0121] The superiority of the IHHO-Transformer model in central air conditioning energy consumption prediction is not only reflected in its powerful Transformer architecture, but also benefits from the improved Harris Hawk Optimizer (IHHO). Compared with the traditional Harris Hawk Optimizer (HHO), IHHO significantly improves the training efficiency and prediction accuracy of the model by introducing more sophisticated search strategies and stronger global optimization capabilities. Experimental results show that IHHO-Transformer is superior to HHO-Transformer and Transformer in RMSE, MAE and R 2 The performance of the model is better in all indicators, especially in RMSE and MAE, which are about 80 and 30 units lower than those of CNN and RNN models respectively. 2 It is close to 1, indicating that the model's fitting ability and accuracy in energy consumption prediction have been greatly improved. The improved Eagle Swarm Optimization algorithm effectively avoids the limitation that the traditional HHO may fall into the local optimal solution in complex problems, enabling IHHO-Transformer to better capture the complex nonlinear characteristics in energy consumption data, thereby providing more accurate and reliable prediction results.

[0122] The stages of selecting the position updating method according to the energy factor E and the prey escape probability λ include: a transition stage from exploration to exploitation, an exploration stage and an exploitation stage.

[0123] The transition stages from exploration to development are as follows:

[0124]

[0125] E r =E×E0 (2)

[0126] Where: t is the current iteration number of the algorithm, T is the maximum iteration number of the algorithm, E is the energy factor of the prey, E0 is the initial escape energy of the prey, and its value is a random number between [0,1], and Er is the prey escape energy factor. r ≥1, the algorithm enters the exploration phase; when E r <1, the algorithm enters the development stage;

[0127] The exploration phase is as follows:

[0128]

[0129] Where: Y(t) is the position vector of an eagle in the eagle group at the current t iterations, Y rand (t) is the position vector of the randomly selected eagle, Y rabbit (t) is the position vector of the prey, r1, r2, r3, r4 and q are random numbers with values ​​of [0,1], BU and BL are the upper and lower limits of the variables, N is the population of eagles, Y m (t) is the average position of the eagle;

[0130] The development stages include: soft siege, hard siege, soft siege with progressive rapid assault, and hard siege with progressive rapid assault.

[0131] The soft siege:

[0132] When 0.5≤|E r When |≤1 and λ≥0.5, the prey has enough physical strength, but it is almost impossible to escape the pursuit of Harris's hawk. Therefore, the formula is updated as follows:

[0133] Y(t+1)=Y(t)-E r |JY rabbit (t)-Y(t)| (5)

[0134] Where λ is the probability of prey escaping, which is a random number between [0,1];

[0135] Hard Siege

[0136] When|E r When |≤0.5 and λ≥0.5, the prey does not have enough physical strength and the probability of escaping from the Harris Hawk is very small. The formula is updated as follows:

[0137] Y(t+1)=Yrabbit (t)-E r |ΔY(t)| (6)

[0138] Soft siege with progressive fast raid:

[0139] When 0.5≤|E r When |≤1 and λ<0.5, the prey has enough energy to escape from the Harris Hawk and has a high chance of escaping. The formula is updated as follows:

[0140]

[0141] Among them: s(.) is the fitness function, D is the dimension of the objective function, S is a random variable, and the LF function expression is as follows:

[0142]

[0143] Where: v and μ are random numbers with values ​​of [0,1], and σ is the value calculated for β;

[0144] Hard siege with progressive fast raid:

[0145] When|E r When |≤0.5 and λ<0.5, the prey is not physically strong enough to escape the encirclement, but the prey has a great chance of escaping, and the formula is updated as follows:

[0146]

[0147] Where: s(G) represents the fitness function value of point G, and s(Y(t)) represents the fitness function value of point Y(t).

[0148] S103: Obtain the energy consumption data of the air conditioner to be evaluated, input the energy consumption data of the air conditioner to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm, and output the central air conditioner energy consumption prediction result.

[0149] The improvement process based on the improved Harris Hawk algorithm includes the following steps:

[0150] Even symmetric infinite folding chaotic sequence population initialization:

[0151] Infinite iterations are performed in a symmetrical manner in the search space to achieve infinite folding mapping in a finite space to generate a model whose phase space structure tends to white noise. The value of the even symmetric infinite folding chaotic sequence is defined as

[0152]

[0153] Where: α, β—chaotic factors, α∈[1,∞), β∈(0,1), y i,j—the chaotic sequence value generated by individual i in dimension j, mod() —modulus function;

[0154] The chaotic sequence values ​​generated in [0, 1] are then inversely mapped to the individual search space of the sparrow to obtain the initial position of the population. The mapping method is:

[0155]

[0156] Where: x i,j —The j-dimensional position of individual i, lb i ,ub i —The lower and upper boundary values ​​of the search space of individuals in the population;

[0157] Energy factor update and improvement

[0158] The energy factor update formula is as follows:

[0159]

[0160] Incremental Rapid Raid Improvements

[0161] By integrating the optimal individual positions, enhancing search diversity, expanding the exploration range, helping the algorithm to jump out of the local optimum, and proposing a new coordinate position update formula, the soft siege update formula of the progressive rapid raid is as follows:

[0162]

[0163] Where: rand represents a random number between 0 and 1, Y best1 (t) represents the optimal position of the Harris Hawk at the current t iterations, Y best2 (t) represents the second best position of Harris Hawk at the current t iterations, Y best3 (t represents the third best position of Harris Hawk at the current t iterations.

[0164] The hard siege update formula for progressive fast raids is as follows:

[0165]

[0166] The process of inputting the air conditioning energy consumption data to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm and outputting the central air conditioning energy consumption prediction result is as follows:

[0167] First, the air conditioning energy consumption data to be evaluated is x new Contains the current operating status parameters of the air conditioner, such as indoor temperature, outdoor temperature, humidity, workload and other characteristics. This data is input into the trained Transformer model, processed by several layers of encoders and decoders, and outputs the predicted air conditioner energy consumption. That is, the energy consumption value predicted by the model.

[0168] During this process, the model processes the input data through the following steps:

[0169] Data input and encoding: Input feature x new is embedded into the model and first passes through a multi-layer self-attention encoder to extract the dependencies between features. The output of each encoder is H encoder , which represents the high-level feature representation of the input data.

[0170] H encoder =Encoder(x new ,θ * )

[0171] Among them, θ * Represents the model parameters optimized by the improved Harris Eagle algorithm.

[0172] Model output and decoding: Next, after processing by multiple layers of decoders, the model finally generates a predicted value for air conditioning energy consumption The output of the decoder is expressed by the following formula:

[0173]

[0174] This process processes the input features and uses the learned optimal parameters θ * , and obtain a forecast of future energy consumption.

[0175] Model evaluation: To evaluate the accuracy of the prediction, the mean square error (MSE) can be used as an evaluation indicator to calculate the air conditioning energy consumption predicted by the model. The actual observed value y actual For comparison, the calculation expression is as follows:

[0176]

[0177] Where n is the number of samples, is the predicted value of the i-th sample, y actual,i is the actual value of the i-th sample.

[0178] Embodiment 2: In the second aspect, as Figure 3 As shown, in order to achieve the above-mentioned purpose, the present invention discloses a central air-conditioning energy consumption prediction system, comprising:

[0179] The data processing module 11 is used to obtain the air conditioning energy consumption impact related data, pre-process the air conditioning energy consumption impact related data to obtain the processed air conditioning energy consumption impact related data, and divide the processed air conditioning energy consumption impact related data into a training set and a test set;

[0180] A model training module 12 is used to input the training set and the test set into a pre-established Transformer model based on the improved Harris Eagle algorithm for training and testing, so as to obtain a trained Transformer model based on the improved Harris Eagle algorithm;

[0181] The energy consumption prediction module 13 is used to obtain the energy consumption data of the air conditioner to be evaluated, input the energy consumption data of the air conditioner to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm, and output the central air conditioner energy consumption prediction result.

[0182] Based on the same inventive concept, the present invention also provides a computer device, which includes: one or more processors, and a memory for storing one or more computer programs; the program includes program instructions, and the processor is used to execute the program instructions stored in the memory. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is used to implement one or more instructions, specifically for loading and executing one or more instructions in a computer storage medium to implement the above method.

[0183] It needs to be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to execute the above method. The storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electrical, magnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0184] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0185] The above shows and describes the basic principles, main features and advantages of the present disclosure. Those skilled in the art should understand that the present disclosure is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present disclosure. Without departing from the spirit and scope of the present disclosure, the present disclosure may have various changes and improvements, and these changes and improvements fall within the scope of the present disclosure to be protected.

Claims

1. A method for predicting energy consumption of a central air conditioner, characterized in that: The method comprises the following steps: Acquire relevant data on the impact of air conditioning energy consumption, pre-process the relevant data on the impact of air conditioning energy consumption, obtain processed relevant data on the impact of air conditioning energy consumption, and divide the processed relevant data on the impact of air conditioning energy consumption into a training set and a test set; Input the training set and the test set into the pre-established Transformer model based on the improved Harris Eagle algorithm for training and testing, and obtain the trained Transformer model based on the improved Harris Eagle algorithm; The energy consumption data of the air conditioner to be evaluated is obtained, and the energy consumption data of the air conditioner to be evaluated is input into the trained Transformer model based on the improved Harris Eagle algorithm, and the energy consumption prediction result of the central air conditioner is obtained as output.

2. A central air conditioning energy consumption prediction method according to claim 1, characterized in that: The data related to the impact of air conditioning energy consumption include: outdoor temperature and humidity, weather type, solar radiation, outdoor wind speed, thermal insulation performance of building materials, heat dissipation of indoor heat sources, indoor space size, number of indoor air conditioners, air conditioner working mode, air conditioner's own parameters and air conditioner set temperature.

3. A central air conditioning energy consumption prediction method according to claim 1, characterized in that: The construction process of the pre-established Transformer model based on the improved Harris Eagle algorithm is as follows: Build the Transformer model and determine the parameters to be optimized: learning rate, hidden layer dimension; Initialize the parameters of the improved Harris Hawk algorithm and the Harris Hawk population, and calculate the fitness of the population; Select the position update method according to the energy factor E and the prey escape probability λ; terminate the judgment, if the number of runs is less than the maximum number of iterations, return to the previous step to execute, otherwise, end; Return the optimal parameters to the Transformer model; Generate a Transformer model based on the improved Harris Eagle algorithm.

4. A central air conditioning energy consumption prediction method according to claim 3, characterized in that: The stages of selecting the position updating method according to the energy factor E and the prey escape probability λ include: a transition stage from exploration to exploitation, an exploration stage and an exploitation stage.

5. A central air conditioning energy consumption prediction method according to claim 4, characterized in that: The transition phases from exploration to development are as follows: AND r =E×E0 (2) Where: t is the current iteration number of the algorithm, T is the maximum iteration number of the algorithm, E is the energy factor of the prey, E0 is the initial escape energy of the prey, Er is the prey escape energy factor, when E r ≥1, the algorithm enters the exploration phase; when E r <1, the algorithm enters the development stage; The exploration phase is as follows: Where: Y(t) is the position vector of an eagle in the eagle group at the current t iterations, Y rand (t) is the position vector of the randomly selected eagle, Y rabbit (t) is the position vector of the prey, r1, r2, r3, r4 and q are random numbers, BU and BL are the upper and lower limits of the variable, N is the population of eagles, Y m (t) is the average position of the eagle; The development stages include: soft siege, hard siege, soft siege with progressive rapid assault, and hard siege with progressive rapid assault.

6. A central air conditioning energy consumption prediction method according to claim 5, characterized in that: The soft siege: When 0.5≤|E r When |≤1 and λ≥0.5, the prey cannot escape the pursuit of Harris's hawk, and the formula is updated as follows: Y(t+1)=Y(t)-E r |YOU rabbit (t)-Y(t)| (5) Where λ is the probability of prey escape; Hard Siege: When|E r When |≤0.5 and λ≥0.5, the probability of prey escaping from Harris's hawk is small, and the formula is updated as follows: Y(t+1)=Y rabbit (t)-E r |ΔY(t)| (6) Soft siege with progressive fast raid: When 0.5≤|E r When |≤1 and λ<0.5, the prey has enough energy to escape from the Harris hawk, and the formula is updated as follows: Among them: s(.) is the fitness function, D is the dimension of the objective function, S is a random variable, and the LF function expression is as follows: Where: v and μ are random numbers with values ​​of [0,1], and σ is the value calculated for β; Hard siege with progressive fast raid: When|E r When |≤0.5 and λ<0.5, the prey is not physically strong enough to escape the encirclement, but the prey will escape, and the formula is updated as follows: Where: s(G) represents the fitness function value of point G, and s(Y(t)) represents the fitness function value of point Y(t).

7. A central air conditioning energy consumption prediction method according to claim 3, characterized in that: The improvement process based on the improved Harris Hawk algorithm comprises the following steps: Even symmetric infinite folding chaotic sequence population initialization: Infinite iterations are performed in a symmetrical manner in the search space to achieve infinite folding mapping in a finite space to generate a model whose phase space structure tends to white noise. The value of the even symmetric infinite folding chaotic sequence is defined as Where: α, β—chaotic factors, α∈[1,∞), β∈(0,1), y i,j —the chaotic sequence value generated by individual i in dimension j, mod() —modulus function; The chaotic sequence values ​​generated in [0, 1] are then inversely mapped to the individual search space of the sparrow to obtain the initial position of the population. The mapping method is: Where: x i,j —The j-dimensional position of individual i, lb i ,ub i —The lower and upper boundary values ​​of the search space of individuals in the population; Energy factor update and improvement The energy factor update formula is as follows: Incremental Rapid Raid Improvements By integrating the optimal individual positions, enhancing search diversity, expanding the exploration range, helping the algorithm to jump out of the local optimum, and proposing a new coordinate position update formula, the soft siege update formula of the progressive rapid raid is as follows: Where: rand represents a random number between 0 and 1, Y best1 (t) represents the optimal position of the Harris Hawk at the current t iterations, Y best2 (t) represents the second best position of Harris Hawk at the current t iterations, Y best3 (t represents the third best position of Harris Hawk at the current t iterations; The hard siege update formula for progressive fast raids is as follows:

8. A central air conditioning energy consumption prediction method according to claim 1, characterized in that: The process of inputting the air conditioning energy consumption data to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm and outputting the central air conditioning energy consumption prediction result is as follows: Air conditioning energy consumption data to be evaluated x new Contains the current operating status parameters of the air conditioner, including indoor temperature, outdoor temperature, humidity, and workload; it is input into the trained Transformer model, processed by several layers of encoders and decoders, and outputs the predicted air conditioner energy consumption Get the energy consumption value predicted by the model; Data input and encoding: Input feature x new It is embedded into the model and first passes through a multi-layer self-attention mechanism encoder to extract the dependencies between features. The output of each encoder is H encoder , represents the high-level feature representation of the input data; H encoder =Encoder(x new ,θ * ) Among them, θ * represents the model parameters optimized by the improved Harris Eagle algorithm; Model output and decoding: After being processed by multiple layers of decoders, the model finally generates a predicted value of air conditioning energy consumption The output of the decoder is expressed by the following formula: By processing the input features, using the learned optimal parameter θ * , and obtain a forecast of future energy consumption.

9. A central air conditioning energy consumption prediction system, characterized in that: include: A data processing module is used to obtain the air conditioning energy consumption impact related data, pre-process the air conditioning energy consumption impact related data to obtain processed air conditioning energy consumption impact related data, and divide the processed air conditioning energy consumption impact related data into a training set and a test set; A model training module is used to input the training set and the test set into a pre-established Transformer model based on the improved Harris Eagle algorithm for training and testing, thereby obtaining a trained Transformer model based on the improved Harris Eagle algorithm; The energy consumption prediction module is used to obtain the energy consumption data of the air conditioner to be evaluated, input the energy consumption data of the air conditioner to be evaluated into the trained Transformer model based on the improved Harris Eagle algorithm, and output the energy consumption prediction result of the central air conditioner.

10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a central air-conditioning energy consumption prediction method according to any one of claims 1 to 8 is adopted.

Citation Information

Patent Citations

  • Split gate semiconductor with non-uniform trench oxide

    US20200243656A1

Cited By

  • Cold and hot channel air volume optimization energy-saving method based on AI prediction

    CN120354716A

  • An AI prediction-based cold-hot aisle air volume optimization energy-saving method

    CN120354716B

  • Energy consumption monitoring method and system based on machine learning

    CN120764723A