A hotel energy consumption prediction method based on artificial intelligence

By adopting a generative adversarial network with non-stationary processes in hotel energy consumption prediction, refined search whale optimization neural network, auto-coding neural network with dynamic allocation of feature importance, and variable-scale high-order activation of higher-order neural network, the traditional method's shortcomings in non-stationary data processing and gradient problems are solved, and more efficient and stable energy consumption prediction is achieved.

CN119539203BActive Publication Date: 2025-05-13HANGZHOU HUWEI INTEGRATED ENERGY SERVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510084600.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

Traditional hotel energy consumption prediction methods are insufficient in processing non-stationary data, and there are problems of gradient vanishing, gradient explosion and local optimal solutions, which affect model performance and training stability.

Method used

A generative adversarial network algorithm based on non-stationary processes is used to dynamically simulate the non-stationary characteristics of energy consumption data to solve the problem of insufficient response. At the same time, use a neural network optimized based on refined search whale search to dynamically adjust the network weight and bias to avoid gradient problems. In feature dimensionality reduction, an auto-encoded neural network based on dynamic allocation of feature importance is used to deal with outliers and boundary effects. In the classifier, a higher-order neural network with variable-scale high-order activation is used to dynamically adjust the activation threshold and learning rate.

Benefits of technology

It significantly improves the adaptation speed and accuracy of the model to new changes, enhances the stability and robustness of feature extraction and dimensionality reduction, and improves classification accuracy and learning ability of complex modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539203B_ABST
    Figure CN119539203B_ABST
Patent Text Reader

Abstract

A hotel energy consumption prediction method based on artificial intelligence belongs to the field of data processing, including a data processing module, a feature processing module and a decision module; the output information of the data processing module is used as the input parameter of the feature processing module; the data processing module collects data and expands data from the perspective of samples; the feature processing module extracts features and reduces the compressibility of features from the perspective of feature vectors; the decision module uses the features output by the feature processing module to make task decisions and predict hotel energy consumption. The data generated by the present invention is closer to real data in statistical characteristics, significantly enhances the adaptability and generalization ability of the model; avoids gradient problems in the network training process, optimizes network performance; enhances the robustness of the dimensionality reduction model, improves the accuracy and compression performance of data representation; enhances classification accuracy and response speed to changes in input data distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data processing, and in particular relates to a hotel energy consumption prediction method based on artificial intelligence. Background Art

[0002] With the increase in global energy demand and increasingly stringent environmental protection requirements, the hotel industry, as one of the key areas of energy consumption, has put forward higher requirements for energy consumption management. Traditional energy consumption management methods often rely on experience and rule-making, lack of in-depth analysis and accurate prediction capabilities of data, and are difficult to effectively respond to complex energy consumption trends. At the same time, hotel energy consumption data presents characteristics such as multidimensionality, nonlinearity, and time-dynamic changes, which makes traditional modeling methods show obvious limitations in feature extraction, data dimensionality reduction, and prediction classification.

[0003] The Chinese invention patent with the publication number CN118885910A proposes an air conditioning energy consumption prediction method, system and storage medium based on an improved LSTM network, which involves the field of public building air conditioning energy saving technology. The method includes: S1, data collection and processing of the air conditioning energy consumption prediction model; S2, correlation analysis through the Spearman correlation coefficient; S3, dividing the analyzed and processed data into a training set, a validation set and a test set; using the chaos constraint DE algorithm to optimize the weights and thresholds of the LSTM neural network; obtaining an optimized air conditioning energy consumption prediction model; S4, using the optimized air conditioning energy consumption prediction model to predict air conditioning energy consumption and generate prediction results; introducing the Attention mechanism to extract the important feature information of the LSTM neural network prediction output, namely the air conditioning load influencing factors; S5, judging the prediction performance of the model through verification indicators. This technology realizes real-time prediction and control of energy consumption for the long-term energy consumption of the air conditioning system and its energy consumption in several short-term control steps. The Chinese invention patent with the publication number CN111178626A proposes a building energy consumption prediction method and monitoring prediction system based on the WGAN algorithm. The energy consumption data of the building and the related energy consumption characteristic data are collected, and the variational autoencoder is used to extract high-level features, and the feature importance is detected by the extreme gradient enhancement algorithm. Then all the energy consumption characteristics obtained are input into the generative adversarial network model for training, and the hyperparameters in the model are optimized by the reinforcement learning algorithm, and finally a prediction model is obtained for predicting the energy consumption of the building. The energy consumption prediction method of this technology not only improves the performance and speed of model training, but also makes full use of the close connection and interaction between various data, making the prediction model more stable and accurate. The Chinese invention patent with the publication number CN118799113A proposes a method for predicting the energy consumption of the tin smelting process based on virtual sample generation and multi-output neural network model, which belongs to the technical field of energy consumption prediction of production process. The technology specifically includes: preprocessing the data of the tin smelting process, using the mutual information algorithm to test the correlation of the input variables, constructing a multi-output neural network model, using the multi-distribution overall trend diffusion technology to realize the virtual sample generation of the input variables, using the particle swarm optimization algorithm to screen the virtual samples, and finally reconstructing the multi-output neural network energy consumption prediction model based on the mixed samples. This technology can solve the problem of low energy consumption prediction accuracy caused by insufficient data and incomplete data information in the tin smelting process; it improves the prediction ability of the model by integrating virtual samples with real samples; and it effectively expands small sample data to improve the prediction accuracy of the prediction model under small sample data sets.

[0004] The above technology still has the following problems that need to be further solved: 1. Traditional generative adversarial networks are trained in a stable data environment and do not respond sufficiently to dynamic changes in non-stationary data, resulting in the lack of representativeness of generated samples and the inability to fully reflect the complex characteristics of time series data.

[0005] 2. Traditional neural networks are prone to gradient vanishing, gradient exploding, or falling into local optimal solutions during feature extraction, which affects model performance and training stability.

[0006] 3. Traditional dimensionality reduction methods are not robust enough in dealing with outliers and boundary effects, which can easily lead to distortion of feature representation and reduce the effect of dimensionality reduction.

[0007] 4. The activation function and learning rate of traditional high-order neural networks are fixed and cannot be dynamically adjusted according to complex feature distribution, which limits the adaptability and classification accuracy of the model. Summary of the invention

[0008] The purpose of the present invention is to propose a hotel energy consumption prediction method based on artificial intelligence, which generates data that is closer to real data in statistical characteristics and significantly enhances the adaptability and generalization ability of the model; the feature extraction model can improve the efficiency and stability of feature extraction, avoid gradient problems in the network training process, and optimize network performance; the feature dimension reduction model can reduce the influence of outliers and boundary effects in the dimension reduction process, enhance the robustness of the dimension reduction model, and improve the accuracy and compression performance of data representation; the classifier model can improve the learning ability of the classification model for complex patterns, enhance the classification accuracy and the response speed to changes in the distribution of input data.

[0009] The technical solution adopted by the present invention is:

[0010] A hotel energy consumption prediction method based on artificial intelligence includes a data processing module, a feature processing module and a decision module; the output information of the data processing module is used as an input parameter of the feature processing module;

[0011] The data processing module collects and expands data from the perspective of samples; the feature processing module extracts features and reduces the compressibility of features from the perspective of feature vectors; the decision-making module uses the features output by the feature processing module to make task decisions and predict the hotel's energy consumption.

[0012] Furthermore, in the data processing module, data is collected from the energy consumption monitoring systems of multiple hotels, including the daily consumption of electricity, water, and gas data. The data collection method adopts a real-time automatic transmission system and is stored in a structured JSON format; the collected data is manually annotated;

[0013] Data augmentation is then performed, and a generative adversarial network algorithm based on a non-stationary process is used to generate samples (to achieve data augmentation).

[0014] In traditional generative adversarial network models, the generator and discriminator are usually trained in a stable data environment, which may cause the model to insufficiently respond to dynamic changes in time series. In order to solve this problem, the generator of the present invention is designed to simulate the dynamic changes of non-stationary energy consumption data, thereby more accurately generating data that reflects the changes and improving the model's adaptation speed and accuracy to new changes.

[0015] Furthermore, the training process of the generative adversarial network algorithm is as follows:

[0016] S101. Initialize the network structure of the generator and discriminator of the generative adversarial network, including the initial value setting of weights and biases, to ensure that the network can stably learn in subsequent training; let the generator be , the discriminator is , the weight of the generator is , the weight of the discriminator is , the initialization method is expressed as:

[0017] ,

[0018] In the formula, Indicates compliance with a specific distribution; is the weight of the generator; is the weight of the discriminator; represents the standard deviation of the initialization; is the dimension of the input layer of the generator; Indicates that the mean is 0 and the variance matrix is The multivariate normal distribution of is the identity matrix; is a normal distribution;

[0019] S102. During the training process of the generator, the generator receives a random noise vector and generates virtual energy consumption data through network layer mapping, with the purpose of making the generated data sufficiently close to the real energy consumption data in terms of statistical characteristics, which is expressed as:

[0020] ,

[0021] In the formula, Fake data generated for the generator; is the generator function; is a random noise vector, and are the weight and bias of the generator, respectively. is the hyperbolic tangent function; represents element-wise multiplication; and are the attention weights and biases, which enable the generator to assign different importance to different parts of the input noise vector, thereby enhancing the quality and diversity of the generated data;

[0022] S103. During the training process of the discriminator, the task of the discriminator is to distinguish whether the input data comes from the real data set or the data generated by the generator. The discriminator continuously learns how to identify the subtle differences between the generated data and the real data, which can be expressed as:

[0023] ,

[0024] In the formula, is the label of the real sample; The label of the sample determined by the discriminator to be generated; is real data; is the Sigmoid activation function, and They are the weight and bias of the discriminator respectively; is the discriminator function, and the output of the discriminator uses the Sigmoid function to give the binary classification probability; is the intermediate feature layer function;

[0025] Among them, the role of the intermediate feature layer function is to enhance the model's ability to extract data features, making it more sensitive to the difference between generated data and real data. The implementation method is expressed as:

[0026] ,

[0027] In the formula, for A linear rectifier function allows small gradients to flow in the negative part of the activation function, avoiding inactive states of neurons; and The weights and biases of the intermediate feature layers respectively;

[0028] S104. During the training process of the generator and the discriminator, a feedback mechanism is adopted. Whenever the discriminator correctly identifies the generated data or the real data, the generator will adjust its own parameters according to the feedback to optimize the quality of the generated data and make it more difficult for the discriminator to distinguish. The feedback mechanism between the generator and the discriminator is realized by the adversarial loss function, which is expressed as:

[0029] ,

[0030] In the formula, is the loss function of the discriminator; is the number of samples in the batch, is the label corresponding to the i-th true sample (usually 1), is the i-th fake sample generated by the generator; is the i-th true sample; is the loss function of the generator; is the cross entropy calculation function; is the coefficient that adjusts the influence of cross entropy; is the generator regularization coefficient; is the weight of the generator Regularization, used to control model complexity;

[0031] S105, adaptive regularization, based on the uncertainty of model output, dynamically adjusts the regularization strength to effectively prevent overfitting and enhance the model's adaptability to changes in input data. Specifically, the generator weights are automatically adjusted according to the distribution difference between the generated data and the real data. Regularization term, in order to achieve more accurate model training, first define the uncertainty metric, which is calculated based on the probability distribution entropy of the discriminator output, expressed as:

[0032] ,

[0033] In the formula, is a measure of uncertainty; is the predicted probability of the discriminator output for the i-th sample;

[0034] The regularization coefficient is defined according to the uncertainty measure and the calculation method is expressed as:

[0035] ,

[0036] In the formula, is the scale factor, adjusting the sensitivity of the regularization strength; is the target uncertainty level, which aims to keep the model output within a certain uncertainty range to avoid overfitting;

[0037] S106. Each round of iteration finely adjusts the parameters of the generator and the discriminator. Through multiple iterations, the generator will gradually be able to generate high-quality data that is almost indistinguishable from the actual energy consumption data. Specifically, the parameters of the generator and the discriminator are updated by the gradient descent method. The update method is expressed as:

[0038] ,

[0039] In the formula, Indicates parameter update operation; are the parameters of the discriminator; is the parameter of the generator; is the learning rate of the discriminator; is the learning rate of the generator; is the gradient with respect to the discriminator parameters; is the gradient with respect to the generator parameters;

[0040] S107, repeating iterative steps S101-S106 until the preset stop iteration condition is met, indicating that the model training is completed.

[0041] Further, in the feature processing module, feature processing is performed on the expanded data. If the number of expanded data features is less than or equal to 30, a feature extraction model is used to extract features; if the number of expanded data features is greater than 30, a feature dimension reduction model is used to reduce features;

[0042] Among them, for the feature extraction model, a 6-layer fully connected neural network is used for feature extraction. In the prior art, some solutions use neural networks for feature extraction. In some neural network structures, gradient vanishing, gradient explosion or falling into local optimal solutions may occur, affecting the stability of training and the performance of the model. Specifically, a neural network algorithm based on refined search whale optimization is used as the feature extraction model. Through a refined search mechanism, the strategies of encirclement, compression and spiral update position in whale predation behavior are simulated to optimize the network weights, thereby more effectively extracting features.

[0043] The training process of the neural network algorithm based on refined search whale optimization is as follows:

[0044] S201, initialize the parameters of the neural network, including the weight and bias parameters of the neural network, and the initialization method is expressed as:

[0045] ,

[0046] In the formula, is the weight of the neural network; is the bias of the neural network; represents the number of neurons in the input layer of the neural network, represents the number of neurons in the output layer of the neural network, generate dimensional standard normal distribution random number, generate dimensional zero vector;

[0047] S202, using the whale optimization algorithm to optimize the parameters of the neural network, by evaluating the loss function under the current network parameters, guiding how to adjust the network weights to improve the feature extraction effect. Specifically, the whale optimization algorithm simulates the hunting behavior of whales, dynamically adjusts the search direction and step size, and finds the minimum value of the loss function. The optimization method is expressed as:

[0048] ,

[0049] In the formula, t represents the current iteration number, and They represent the weights of the neural network at the tth iteration and the t+1th iteration respectively; A is the first coefficient matrix of the whale optimization algorithm, C is the second coefficient matrix of the whale optimization algorithm, and D is the third coefficient matrix of the whale optimization algorithm, and A and C control the amplitude and direction of the search, and D represents the distance from the optimal solution; The optimal solution of the whale optimization algorithm corresponds to a set of optimal parameters of the neural network;

[0050] S203. In each round of iteration, the network calculates the features through forward propagation, and then optimizes the network parameters according to the loss function through back propagation, dynamically adjusting the learning rate and optimization direction to adapt to the characteristics and complexity of the data. The update of the neural network parameters (different from the optimization in the previous step) is expressed as:

[0051] ,

[0052] In the formula, is the learning rate of the neural network, is the loss function of the neural network, Represents the partial derivative of the loss function of the neural network with respect to the weight; is the parameter update amount of the neural network; is the updated neural network weight;

[0053] S204, adopting an adaptive network topology dynamic adjustment strategy, automatically adjusting the layer structure and number of neurons of the neural network according to the feedback during the training process, and dynamically optimizing the network structure based on the performance indicators of the neural network, so that the model not only performs well in the current task, but also has better generalization ability. Specifically, the calculation method of the performance indicators of the neural network is expressed as:

[0054] ,

[0055] In the formula, P is the performance index of the neural network; Represents the network complexity, calculated as the number of layers and the total number of neurons in each layer; is the influencing factor of adjustment loss; is the factor affecting the complexity;

[0056] S205. Repeat iterative steps S201-S204 until the preset stop iteration condition is met, indicating that the model training is completed.

[0057] Furthermore, for the feature dimensionality reduction model, an autoencoder neural network based on dynamic allocation of feature importance is used as the feature dimensionality reduction model. The autoencoder neural network includes an encoder and a decoder. The encoder compresses the input data into a low-dimensional representation, and the decoder reconstructs the low-dimensional representation into a feature vector that is as similar as possible to the input data.

[0058] Specifically, the training process of the autoencoder neural network algorithm based on dynamic allocation of feature importance is as follows:

[0059] S301, initialize the parameters of the autoencoder neural network, and the initialization method is expressed as:

[0060] ,

[0061] In the formula, represents the weight of the encoder, Indicates the encoder bias; represents the weight of the decoder, represents the bias of the decoder; represents a random function; is the dimension of the encoder input layer, is the dimension of the middle layer of the encoder, is the dimension of the encoder output layer; is a function that generates a vector of all zeros;

[0062] S302, during the training process of the autoencoder neural network, the data is processed by forward propagation, and then the parameters of the autoencoder neural network are updated by using the gradient descent method through error back propagation. In this process, the calculation method of the loss function of the autoencoder neural network is expressed as:

[0063] ,

[0064] In the formula, is the loss function of the autoencoder neural network; is the input data of the autoencoder neural network, is the output reconstructed by the decoder, is the Sigmoid activation function; yes norm; is the output of the smoothed encoder; is the weight coefficient of the i-th dimension autoencoder neural network; is the vector dimension corresponding to the samples of the current batch input to the autoencoder neural network;

[0065] Among them, the weight coefficient of the autoencoder neural network is used to adjust the contribution of each dimensional feature in the error. These weights are dynamically allocated according to the importance of the feature. The calculation method is expressed as:

[0066] ,

[0067] In the formula, is the characteristic variance of the input data of the i-th dimension autoencoder neural network; is the feature of the input data of the i-th dimension autoencoder neural network; is a small constant to avoid division by zero; is the variance function;

[0068] S303. In order to deal with outliers and boundary effects in the dimensionality reduction process, an automatic boundary smoothing strategy is adopted to enhance the robustness of the model by dynamically adjusting the boundary value. Specifically, the output of the encoder is smoothed by a smoothing function, which is expressed as:

[0069] ,

[0070] In the formula, is a smooth function, is the smoothing strength parameter; It is an automatically adjusted threshold parameter used to control the degree of smoothing and improve the adaptability to the input data boundary;

[0071] Among them, the smoothing strength parameter is determined by an adaptive method based on the local density of the data, and the calculation method is expressed as:

[0072] ,

[0073] In the formula, calculate In its neighborhood The kernel density estimation in can accurately process data in high-density and sparse areas, improving the robustness and adaptability of the overall model; represents the neighborhood; is the kernel density estimation function; is the averaging function; is a preset small constant;

[0074] S304, the training of the autoencoder neural network is completed by continuously optimizing the loss function in the iterative process, and the calculation method of the parameter update amount of each iteration parameter update is expressed as:

[0075] ,

[0076] In the formula, is the update amount of the encoder's weight parameters; is the encoder bias parameter update amount; is the update amount of the decoder weight parameters; is the update amount of the bias parameter of the decoder; is the learning rate of the autoencoder neural network at the tth iteration;

[0077] S305, using the convex hull convergence strategy to optimize the training process of the autoencoder neural network, by adjusting the learning step size and weight update strategy, the network converges quickly, and the learning rate is dynamically adjusted according to the data distribution characteristics in the current iteration as expressed in:

[0078] ,

[0079] In the formula, is the learning rate of the initial autoencoder neural network; is the learning rate of the autoencoder neural network at the tth iteration; is the learning rate decay factor of the autoencoder neural network, is the average diameter of the convex hull in the tth iteration, is the diameter of the initial convex hull. The learning rate decreases as the convex hull diameter decreases to prevent instability caused by too large a step size in the later stages of learning.

[0080] S306: Repeat iterative steps S301-S305 until the preset stop iteration condition is met, indicating that the model training is completed.

[0081] Furthermore, in the decision module, a high-order neural network based on variable-scale high-order activation is used as a classifier model to classify the data features obtained from the feature processing module. On the basis of the traditional high-order neural network, a variable-scale high-order activation function is used to dynamically adjust its activation threshold according to the complexity of the input data, thereby improving the classification accuracy and the adaptability of the high-order neural network.

[0082] Specifically, the training process of the high-order neural network algorithm based on variable-scale high-order activation is as follows:

[0083] S401, initializing the parameters of the high-order neural network, including the weights and biases of the high-order neural network, the initialization method is expressed as:

[0084] ,

[0085] In the formula, represents the weight of the lth layer of the high-order neural network; Represents the bias of the lth layer of the high-order neural network; and They represent the number of input and output neurons in the lth layer of the high-order neural network respectively; represents a normal distribution with a mean of 0 and a variance of 1; represents an all-zero vector function;

[0086] S402. In each layer of the high-order neural network, the activation function of the high-order neural network is a high-order activation function that can adjust its own curve shape according to the standard deviation of the input data, and can more effectively process data with more complex distribution in the feature space. The high-order activation function can adapt to input data of different complexity, thereby optimizing the activation threshold, and the calculation method is expressed as:

[0087] ,

[0088] In the formula, is a high-order activation function; x is the independent variable of the function; It represents the maximum value function; Represents the minimum value function; It is a parameter that is automatically adjusted according to the input data distribution; k is the coefficient of the higher-order term, which is used to control the nonlinearity of the activation function when it is negative;

[0089] When the parameters of the activation function are dynamically adjusted according to the statistical characteristics of the input data, the parameters of the activation function are adjusted with the variability of the input data, and the measure of the variability is the standard deviation, which is expressed as:

[0090] ,

[0091] In the formula, It is a basic parameter that is automatically adjusted according to the input data distribution; are the coefficients of the higher-order terms of the basis; is the first sensitivity coefficient of the adjustment parameter in response to the variability of the input data; is the second sensitivity coefficient of the adjustment parameter response to the variability of the input data; is the variability of the input to the high-order neural network, specifically the standard deviation of the data input to the high-order neural network; is the threshold used to adjust the starting point of the influence of higher-order terms;

[0092] S403. During the training process, the learning rate and activation function parameters are dynamically adjusted according to the performance of each batch of data through the high-order neural network, and the training parameters are optimized according to the real-time high-order neural network output volatility and prediction uncertainty to achieve faster convergence speed and higher classification accuracy. Specifically, the adjustment of the learning rate is achieved according to the change rate of the loss, which is expressed as:

[0093] ,

[0094] In the formula, is the learning rate of the high-order neural network at the tth iteration; is the initial learning rate of the high-order neural network; is the total number of iterations of the high-order neural network; is the current iteration number; is the coefficient that adjusts the effect of the decrease in learning rate; is the loss difference between the tth iteration and the previous iteration; is the sensitivity of adjusting the learning rate according to the loss acceleration; is the acceleration of the loss of high-order neural networks;

[0095] Among them, the acceleration of the loss of the high-order neural network is to control the learning rate more finely, and the calculation method is expressed as:

[0096] ,

[0097] In the formula, is the loss difference between the t-1th iteration and the previous iteration;

[0098] S404. The high-order neural network is trained through multiple iterations. Each iteration includes forward propagation, loss calculation, back propagation and parameter update. During the training process, the update of weights and biases follows the standard back propagation and gradient descent algorithm. The parameter update method is expressed as:

[0099] ,

[0100] Where L is the loss function of the high-order neural network; It is the parameter update operation; Represents element-wise multiplication; is the weight adjustment matrix, whose elements are weight adjustment factors;

[0101] Among them, the strategy of adaptive feature dependency enhancement is adopted to dynamically enhance the dependency between different features in high-order neural networks. Specifically, the connection weights are adjusted based on the mutual information between features through an adaptive weight adjustment layer, thereby optimizing the synergy between features and enhancing the model's ability to learn complex patterns. Specifically, the calculation method of feature mutual information is expressed as:

[0102] ,

[0103] In the formula, is the first input sample of the high-order neural network, is the category probability vector of the first input sample of the high-order neural network; is a characteristic element of the first input sample set of the high-order neural network; is the element of the class probability vector of the first input sample of the high-order neural network; is the joint probability distribution function;

[0104] S405, repeating the iteration steps S401-S404 until the preset stop iteration condition is met, indicating that the model training is completed.

[0105] Further, in step S202, the first coefficient matrix of the whale optimization algorithm and the second coefficient matrix of the whale optimization algorithm are reduced from 2 to 0 in each iteration, which is expressed as:

[0106] ,

[0107] Where r is a uniformly randomly generated number in the range [0, 1]; a is the control coefficient of the current iteration step, which gradually decreases with the number of iterations;

[0108] The distance from the optimal solution represents the distance between the current individual position and the target (optimal solution position), and the calculation method is expressed as:

[0109] ,

[0110] In the formula, The optimal solution of the whale optimization algorithm corresponds to a set of optimal parameters of the neural network.

[0111] Further, in step S204, the decision of adjusting the network topology is based on the change of the performance index, and whether to adjust and how to adjust are determined, which is expressed as:

[0112] ,

[0113] In the formula, Indicates the rate of change of the performance indicator in this iteration; is the preset performance threshold; is the number of layers or neurons that change at each adjustment; is the adjustment increment of the neural network, according to Update the network structure with the value of If it is positive, k neurons or layers are added; if it is negative, k neurons or layers are reduced.

[0114] Furthermore, in step S304, the parameters of the autoencoder neural network are updated, and the updating method is expressed as follows:

[0115] ,

[0116] In the formula, Represents a parameter update operation.

[0117] Further, in step S404, for the features input into the high-order neural network, the calculation method of defining the weight adjustment factor is expressed as follows according to the mutual information between the features:

[0118] ,

[0119] In the formula, It is a regulatory factor used to control the influence of mutual information on weight adjustment; is the weight adjustment factor.

[0120] Beneficial effects of the present invention:

[0121] The present invention proposes a hotel energy consumption prediction method based on artificial intelligence, which is innovative in the following aspects compared with the prior art: 1. A generative adversarial network algorithm based on a non-stationary process is adopted, and the non-stationary characteristics of energy consumption data are dynamically simulated by the generator to solve the problem that the traditional generative adversarial network is insufficiently responsive to dynamic changes in time series data modeling. 2. A neural network based on a refined search whale optimization algorithm is adopted to dynamically adjust the network weights and biases by simulating the whale's predation behavior to solve the common problems of gradient disappearance, gradient explosion and falling into local optimal solutions. 3. An autoencoder neural network based on dynamic allocation of feature importance is adopted to solve the adverse effects of outlier processing and boundary effects on the accuracy of feature representation during dimensionality reduction by dynamically adjusting boundary values ​​and adaptively allocating feature weights. 4. A high-order neural network with variable scale high-order activation is adopted to solve the problem of insufficient adaptability of traditional high-order neural networks to complex feature distributions by dynamically adjusting the activation function threshold and learning rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0122] Figure 1 It is the overall flow chart of the method of the present invention;

[0123] Figure 2 It is the flow chart of feature dimensionality reduction model. DETAILED DESCRIPTION

[0124] like Figure 1 As shown, a hotel energy consumption prediction method based on artificial intelligence includes a data processing module, a feature processing module and a decision module; the output information of the data processing module is used as the input parameter of the feature processing module; the data processing module collects and expands data from the perspective of samples; the feature processing module extracts features and reduces the compressibility of features from the perspective of feature vectors; the decision module uses the features output by the feature processing module to make task decisions and realize the prediction of hotel energy consumption.

[0125] In the data processing module, data is collected from energy consumption monitoring systems of multiple hotels, including daily electricity, water and gas data. The data collection method adopts a real-time automatic transmission system and is stored in a structured JSON format. In this embodiment, the attributes of the data include: temperature (Ta), humidity (Ha), time (Za), number of rooms (Na), occupancy rate (Oa), season (Sa), event (Ea), electricity consumption (Pa), water consumption (Wa), and gas consumption (Ga). It should be noted that this embodiment is only used to illustrate a data format and type of the present invention. In actual applications, the attributes of the data are usually more than 10 attributes, and the number of attributes of the data may reach dozens or even hundreds.

[0126] The collected data is manually labeled. In this embodiment, the labeled categories include: high energy consumption, medium energy consumption, and low energy consumption, a total of 3 categories.

[0127] In the task of the present invention, the collection, acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor generalization ability of the model and affect the accuracy of the model.

[0128] Then, data expansion is performed. The present invention adopts a generative adversarial network algorithm based on a non-stationary process to generate samples (to achieve data expansion).

[0129] In traditional generative adversarial network models, the generator and discriminator are usually trained in a stable data environment, which may cause the model to insufficiently respond to dynamic changes in time series. In order to solve this problem, the generator of the present invention is designed to simulate the dynamic changes of non-stationary energy consumption data, thereby more accurately generating data that reflects the changes and improving the model's adaptation speed and accuracy to new changes.

[0130] The training process of the generative adversarial network algorithm is as follows:

[0131] S101. Initialize the network structure of the generator and discriminator of the generative adversarial network, including the initial value setting of weights and biases, to ensure that the network can stably learn in subsequent training; let the generator be , the discriminator is , the weight of the generator is , the weight of the discriminator is , the initialization method is expressed as:

[0132] ,

[0133] In the formula, Indicates compliance with a specific distribution; is the weight of the generator; is the weight of the discriminator; represents the standard deviation of the initialization; is the dimension of the input layer of the generator; Indicates that the mean is 0 and the variance matrix is The multivariate normal distribution of is the identity matrix; is a normal distribution; preferably, Set to 0.01.

[0134] S102. During the training process of the generator, the generator receives a random noise vector and generates virtual energy consumption data through network layer mapping, with the purpose of making the generated data sufficiently close to the real energy consumption data in terms of statistical characteristics, which is expressed as:

[0135] ,

[0136] In the formula, Fake data generated for the generator; is the generator function; is a random noise vector, and are the weight and bias of the generator, respectively. is the hyperbolic tangent function; represents element-wise multiplication; and are the attention weights and biases, which enable the generator to assign different importance to different parts of the input noise vector, thereby enhancing the quality and diversity of the generated data;

[0137] S103. During the training process of the discriminator, the task of the discriminator is to distinguish whether the input data comes from the real data set or the data generated by the generator. The discriminator continuously learns how to identify the subtle differences between the generated data and the real data, which can be expressed as:

[0138] ,

[0139] In the formula, is the label of the real sample; The label of the sample determined by the discriminator to be generated; is real data; is the Sigmoid activation function, and They are the weight and bias of the discriminator respectively; is the discriminator function, and the output of the discriminator uses the Sigmoid function to give the binary classification probability; is the intermediate feature layer function;

[0140] Among them, the role of the intermediate feature layer function is to enhance the model's ability to extract data features, making it more sensitive to the difference between generated data and real data. The implementation method is expressed as:

[0141] ,

[0142] In the formula, for A linear rectifier function allows small gradients to flow in the negative part of the activation function, avoiding inactive states of neurons; and The weights and biases of the intermediate feature layers respectively;

[0143] S104. During the training process of the generator and the discriminator, a feedback mechanism is adopted. Whenever the discriminator correctly identifies the generated data or the real data, the generator will adjust its own parameters according to the feedback to optimize the quality of the generated data and make it more difficult for the discriminator to distinguish. The feedback mechanism between the generator and the discriminator is realized by the adversarial loss function, which is expressed as:

[0144] ,

[0145] In the formula, is the loss function of the discriminator; is the number of samples in the batch, is the label corresponding to the i-th true sample (set to 1), is the i-th fake sample generated by the generator; is the i-th true sample; is the loss function of the generator; is the cross entropy calculation function; is the coefficient that adjusts the influence of cross entropy; is the generator regularization coefficient; is the weight of the generator Regularization is used to control model complexity; preferably, Set to 0.2.

[0146] S105, adaptive regularization, based on the uncertainty of the model output, dynamically adjusts the regularization strength to effectively prevent overfitting and enhance the model's adaptability to changes in input data. Specifically, the L2 regularization term of the generator weight is automatically adjusted according to the distribution difference between the generated data and the real data to achieve more accurate model training. First, the uncertainty metric is defined, which is calculated based on the probability distribution entropy of the discriminator output and is expressed as:

[0147] ,

[0148] In the formula, is a measure of uncertainty; is the predicted probability of the discriminator output for the i-th sample;

[0149] The regularization coefficient is defined according to the uncertainty measure and the calculation method is expressed as:

[0150] ,

[0151] In the formula, is the scale factor, adjusting the sensitivity of the regularization strength; is the target uncertainty level, which aims to keep the model output within a certain uncertainty range to avoid overfitting; preferably, Set to 2.

[0152] S106. Each round of iteration finely adjusts the parameters of the generator and the discriminator. Through multiple iterations, the generator will gradually be able to generate high-quality data that is almost indistinguishable from the actual energy consumption data. Specifically, the parameters of the generator and the discriminator are updated by the gradient descent method. The update method is expressed as:

[0153] ,

[0154] In the formula, Indicates parameter update operation; are the parameters of the discriminator; is the parameter of the generator; is the learning rate of the discriminator; is the learning rate of the generator; is the gradient with respect to the discriminator parameters; is the gradient with respect to the generator parameters;

[0155] S107, repeating iterative steps S101-S106 until a preset stop iteration condition is met, indicating that the model training is completed. In this embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0156] In the feature processing module, feature processing is performed on the expanded data. If the number of expanded data features is less than or equal to 30, a feature extraction model is used for feature extraction; if the number of expanded data features is greater than 30, a feature dimension reduction model is used for feature dimension reduction;

[0157] Among them, for the feature extraction model, a 6-layer fully connected neural network is used for feature extraction. In the prior art, some solutions use neural networks for feature extraction. In some neural network structures, gradient vanishing, gradient explosion or falling into local optimal solutions may occur, affecting the stability of training and the performance of the model. Specifically, a neural network algorithm based on refined search whale optimization is used as the feature extraction model. Through a refined search mechanism, the strategies of encirclement, compression and spiral update position in whale predation behavior are simulated to optimize the network weights, thereby more effectively extracting features.

[0158] The training process of the neural network algorithm based on refined search whale optimization is as follows:

[0159] S201, initialize the parameters of the neural network, including the weight and bias parameters of the neural network, and the initialization method is expressed as:

[0160] ,

[0161] In the formula, is the weight of the neural network; is the bias of the neural network; represents the number of neurons in the input layer of the neural network, represents the number of neurons in the output layer of the neural network, generate dimensional standard normal distribution random number, generate dimensional zero vector;

[0162] S202, using the whale optimization algorithm to optimize the parameters of the neural network, by evaluating the loss function under the current network parameters, guiding how to adjust the network weights to improve the feature extraction effect. Specifically, the whale optimization algorithm simulates the hunting behavior of whales, dynamically adjusts the search direction and step size, and finds the minimum value of the loss function. The optimization method is expressed as:

[0163] ,

[0164] In the formula, t represents the current iteration number, and They represent the weights of the neural network at the tth iteration and the t+1th iteration respectively; A is the first coefficient matrix of the whale optimization algorithm, C is the second coefficient matrix of the whale optimization algorithm, and D is the third coefficient matrix of the whale optimization algorithm, and A and C control the amplitude and direction of the search, and D represents the distance from the optimal solution; The optimal solution of the whale optimization algorithm corresponds to a set of optimal parameters of the neural network;

[0165] The first coefficient matrix of the whale optimization algorithm and the second coefficient matrix of the whale optimization algorithm decrease from 2 to 0 in each iteration, which is expressed as:

[0166] ,

[0167] Where r is a uniformly randomly generated number in the range [0, 1]; a is the control coefficient of the current iteration step, which gradually decreases with the number of iterations;

[0168] The distance from the optimal solution represents the distance between the current individual position and the target (optimal solution position), and the calculation method is expressed as:

[0169] ,

[0170] In the formula, The optimal solution of the whale optimization algorithm corresponds to a set of optimal parameters of the neural network.

[0171] S203. In each round of iteration, the network calculates the features through forward propagation, and then optimizes the network parameters according to the loss function through back propagation, dynamically adjusting the learning rate and optimization direction to adapt to the characteristics and complexity of the data. The update of the neural network parameters (different from the optimization in the previous step) is expressed as:

[0172] ,

[0173] In the formula, is the learning rate of the neural network, is the loss function of the neural network, Represents the partial derivative of the loss function of the neural network with respect to the weight; is the parameter update amount of the neural network; is the updated neural network weight;

[0174] S204, adopting an adaptive network topology dynamic adjustment strategy, automatically adjusting the layer structure and number of neurons of the neural network according to the feedback during the training process, and dynamically optimizing the network structure based on the performance indicators of the neural network, so that the model not only performs well in the current task, but also has better generalization ability. Specifically, the calculation method of the performance indicators of the neural network is expressed as:

[0175] ,

[0176] In the formula, P is the performance index of the neural network; Represents the network complexity, calculated as the number of layers and the total number of neurons in each layer; is the influencing factor of adjustment loss; is the factor affecting the complexity;

[0177] The decision of adjusting the network topology is based on the change of performance indicators, and determines whether to adjust and how to adjust, which is expressed as:

[0178] ,

[0179] In the formula, Indicates the rate of change of the performance indicator in this iteration; is the preset performance threshold; is the number of layers or neurons that change at each adjustment; is the adjustment increment of the neural network, according to Update the network structure with the value of If it is positive, k neurons or layers are added; if it is negative, k neurons or layers are reduced.

[0180] S205, repeating the iteration steps S201-S204 until the preset stop iteration condition is met, indicating that the model training is completed. In this embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0181] For the feature dimensionality reduction model, an autoencoder neural network based on dynamic allocation of feature importance is used as the feature dimensionality reduction model. The autoencoder neural network includes an encoder and a decoder. The encoder compresses the input data to a low-dimensional representation, and the decoder reconstructs the low-dimensional representation into a feature vector that is as similar as possible to the input data.

[0182] Specifically, Figure 2 As shown in the figure, the training process of the autoencoder neural network algorithm based on dynamic allocation of feature importance is as follows:

[0183] S301, initialize the parameters of the autoencoder neural network, and the initialization method is expressed as:

[0184] ,

[0185] In the formula, represents the weight of the encoder, Indicates the encoder bias; represents the weight of the decoder, represents the bias of the decoder; represents a random function; is the dimension of the encoder input layer, is the dimension of the middle layer of the encoder, is the dimension of the encoder output layer; is a function that generates a vector of all zeros;

[0186] S302, during the training process of the autoencoder neural network, the data is processed by forward propagation, and then the parameters of the autoencoder neural network are updated by using the gradient descent method through error back propagation. In this process, the calculation method of the loss function of the autoencoder neural network is expressed as:

[0187] ,

[0188] In the formula, is the loss function of the autoencoder neural network; is the input data of the autoencoder neural network, is the output reconstructed by the decoder, is the Sigmoid activation function; yes norm; is the output of the smoothed encoder; is the weight coefficient of the i-th dimension autoencoder neural network; is the vector dimension corresponding to the samples of the current batch input to the autoencoder neural network;

[0189] Among them, the weight coefficient of the autoencoder neural network is used to adjust the contribution of each dimensional feature in the error. These weights are dynamically allocated according to the importance of the feature. The calculation method is expressed as:

[0190] ,

[0191] In the formula, is the characteristic variance of the input data of the i-th dimension autoencoder neural network; is the feature of the input data of the i-th dimension autoencoder neural network; is a small constant to avoid division by zero; is the variance function;

[0192] S303. In order to deal with outliers and boundary effects in the dimensionality reduction process, an automatic boundary smoothing strategy is adopted to enhance the robustness of the model by dynamically adjusting the boundary value. Specifically, the output of the encoder is smoothed by a smoothing function, which is expressed as:

[0193] ,

[0194] In the formula, is a smooth function, is the smoothing strength parameter; It is an automatically adjusted threshold parameter used to control the degree of smoothing and improve the adaptability to the input data boundary;

[0195] Among them, the smoothing strength parameter is determined by an adaptive method based on the local density of the data, and the calculation method is expressed as:

[0196] ,

[0197] In the formula, calculate In its neighborhood The kernel density estimation in can accurately process data in high-density and sparse areas, improving the robustness and adaptability of the overall model; represents the neighborhood; is the kernel density estimation function; is the averaging function; is a preset small constant; preferably, Set to 0.001.

[0198] S304, the training of the autoencoder neural network is completed by continuously optimizing the loss function in the iterative process, and the calculation method of the parameter update amount of each iteration parameter update is expressed as:

[0199] ,

[0200] In the formula, is the update amount of the encoder's weight parameters; is the encoder bias parameter update amount; is the update amount of the decoder weight parameters; is the update amount of the bias parameter of the decoder; is the learning rate of the autoencoder neural network at the tth iteration;

[0201] Update the parameters of the autoencoder neural network, and the update method is expressed as:

[0202] ,

[0203] In the formula, Represents a parameter update operation.

[0204] S305, using the convex hull convergence strategy to optimize the training process of the autoencoder neural network, by adjusting the learning step size and weight update strategy, the network converges quickly, and the learning rate is dynamically adjusted according to the data distribution characteristics in the current iteration as expressed in:

[0205] ,

[0206] In the formula, is the learning rate of the initial autoencoder neural network; is the learning rate of the autoencoder neural network at the tth iteration; is the learning rate decay factor of the autoencoder neural network, is the average diameter of the convex hull in the tth iteration, is the diameter of the initial convex hull. The learning rate decreases as the convex hull diameter decreases to prevent instability caused by too large a step size in the later stages of learning.

[0207] S306, repeating the iteration steps S301-S305 until the preset stop iteration condition is met, indicating that the model training is completed. In this embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0208] In the decision module, a high-order neural network based on variable-scale high-order activation is used as a classifier model to classify the data features obtained from the feature processing module. On the basis of the traditional high-order neural network, a variable-scale high-order activation function is used to dynamically adjust its activation threshold according to the complexity of the input data, thereby improving the classification accuracy and the adaptability of the high-order neural network.

[0209] Specifically, the training process of the high-order neural network algorithm based on variable-scale high-order activation is as follows:

[0210] S401, initializing the parameters of the high-order neural network, including the weights and biases of the high-order neural network, the initialization method is expressed as:

[0211] ,

[0212] In the formula, represents the weight of the lth layer of the high-order neural network; Represents the bias of the lth layer of the high-order neural network; and They represent the number of input and output neurons in the lth layer of the high-order neural network respectively; represents a normal distribution with a mean of 0 and a variance of 1; represents an all-zero vector function;

[0213] S402. In each layer of the high-order neural network, the activation function of the high-order neural network is a high-order activation function that can adjust its own curve shape according to the standard deviation of the input data, and can more effectively process data with more complex distribution in the feature space. The high-order activation function can adapt to input data of different complexity, thereby optimizing the activation threshold, and the calculation method is expressed as:

[0214] ,

[0215] In the formula, is a high-order activation function; x is the independent variable of the function; It represents the maximum value function; Represents the minimum value function; It is a parameter that is automatically adjusted according to the input data distribution; k is the coefficient of the higher-order term, which is used to control the nonlinearity of the activation function when it is negative;

[0216] When the parameters of the activation function are dynamically adjusted according to the statistical characteristics of the input data, the parameters of the activation function are adjusted with the variability of the input data, and the measure of the variability is the standard deviation, which is expressed as:

[0217] ,

[0218] In the formula, It is a basic parameter that is automatically adjusted according to the input data distribution; are the coefficients of the higher-order terms of the basis; is the first sensitivity coefficient of the adjustment parameter in response to the variability of the input data; is the second sensitivity coefficient of the adjustment parameter response to the variability of the input data; is the variability of the input to the high-order neural network, specifically the standard deviation of the data input to the high-order neural network; is the threshold used to adjust the starting point of the influence of higher-order terms;

[0219] S403. During the training process, the learning rate and activation function parameters are dynamically adjusted according to the performance of each batch of data through the high-order neural network, and the training parameters are optimized according to the real-time high-order neural network output volatility and prediction uncertainty to achieve faster convergence speed and higher classification accuracy. Specifically, the adjustment of the learning rate is achieved according to the change rate of the loss, which is expressed as:

[0220] ,

[0221] In the formula, is the learning rate of the high-order neural network at the tth iteration; is the initial learning rate of the high-order neural network; is the total number of iterations of the high-order neural network; is the current iteration number; is the coefficient that adjusts the effect of the decrease in learning rate; is the loss difference between the tth iteration and the previous iteration; is the sensitivity of adjusting the learning rate according to the loss acceleration; is the acceleration of the loss of high-order neural networks;

[0222] Among them, the acceleration of the loss of the high-order neural network is to control the learning rate more finely, and the calculation method is expressed as:

[0223] ,

[0224] In the formula, is the loss difference between the t-1th iteration and the previous iteration;

[0225] S404. The high-order neural network is trained through multiple iterations. Each iteration includes forward propagation, loss calculation, back propagation and parameter update. During the training process, the update of weights and biases follows the standard back propagation and gradient descent algorithm. The parameter update method is expressed as:

[0226] ,

[0227] Where L is the loss function of the high-order neural network; It is the parameter update operation; Represents element-wise multiplication; is a weight adjustment matrix whose elements are weight adjustment factors; preferably, the loss function of the high-order neural network adopts cross entropy loss.

[0228] Among them, the strategy of adaptive feature dependency enhancement is adopted to dynamically enhance the dependency between different features in high-order neural networks. Specifically, the connection weights are adjusted based on the mutual information between features through an adaptive weight adjustment layer, thereby optimizing the synergy between features and enhancing the model's ability to learn complex patterns. Specifically, the calculation method of feature mutual information is expressed as:

[0229] ,

[0230] In the formula, is the first input sample of the high-order neural network, is the category probability vector of the first input sample of the high-order neural network; is a characteristic element of the first input sample set of the high-order neural network; is the element of the class probability vector of the first input sample of the high-order neural network; is the joint probability distribution function;

[0231] For the features input into the high-order neural network, the calculation method of defining the weight adjustment factor is expressed as follows based on the mutual information between the features:

[0232] ,

[0233] In the formula, It is a regulatory factor used to control the influence of mutual information on weight adjustment; is the weight adjustment factor. Preferably, Set to 2.

[0234] S405, repeating the iteration steps S401-S404 until the preset stop iteration condition is met, indicating that the model training is completed. In this embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0235] After the model training is completed, the trained model is used to predict the hotel energy consumption. In this embodiment, the collected raw data is input into the model in the trained feature processing module for feature processing. Further, the processed features are input into the model in the decision module for classification, thereby obtaining the classification results. In this embodiment, the classification categories include: high energy consumption, medium energy consumption, and low energy consumption, a total of 3 categories.

Claims

1. A hotel energy consumption prediction method based on artificial intelligence, characterized in that: It includes a data processing module, a feature processing module and a decision module; the output information of the data processing module is used as the input parameter of the feature processing module; The data processing module collects and expands data from the perspective of samples; the feature processing module extracts features and reduces the compressibility of features from the perspective of feature vectors; the decision module uses the features output by the feature processing module to make task decisions and predict the energy consumption of the hotel; In the feature processing module, feature processing is performed on the expanded data. If the number of expanded data features is less than or equal to 30, a feature extraction model is used for feature extraction; if the number of expanded data features is greater than 30, a feature dimension reduction model is used for feature dimension reduction; Among them, for the feature extraction model, a 6-layer fully connected neural network is used for feature extraction. Specifically, a neural network algorithm based on refined search whale optimization is used as the feature extraction model. The training process is as follows: S201, initialize the parameters of the neural network, including the weight and bias parameters of the neural network, and the initialization method is expressed as: , In the formula, is the weight of the neural network; is the bias of the neural network; represents the number of neurons in the input layer of the neural network, represents the number of neurons in the output layer of the neural network, generate dimensional standard normal distribution random number, generate dimensional zero vector; S202. Optimize the parameters of the neural network using the whale optimization algorithm, dynamically adjust the search direction and step size, and find the minimum value of the loss function. The optimization method is expressed as: , In the formula, t represents the current iteration number, and They represent the weights of the neural network at the tth iteration and the t+1th iteration respectively; A is the first coefficient matrix of the whale optimization algorithm, C is the second coefficient matrix of the whale optimization algorithm, and D is the third coefficient matrix of the whale optimization algorithm, and A and C control the amplitude and direction of the search, and D represents the distance from the optimal solution; The optimal solution of the whale optimization algorithm corresponds to a set of optimal parameters of the neural network; S203, the updating method of the neural network parameters is expressed as: , In the formula, is the learning rate of the neural network, is the loss function of the neural network, Represents the partial derivative of the loss function of the neural network with respect to the weight; is the parameter update amount of the neural network; is the updated neural network weight; S204, adopting an adaptive network topology dynamic adjustment strategy, automatically adjusting the layer structure and number of neurons of the neural network according to the feedback during the training process, and dynamically optimizing the network structure based on the performance index of the neural network. Specifically, the calculation method of the performance index of the neural network is expressed as: , In the formula, P is the performance index of the neural network; Represents the network complexity, calculated as the number of layers and the total number of neurons in each layer; is the influencing factor of adjustment loss; is the factor affecting the complexity; S205. Repeat iterative steps S201-S204 until the preset stop iteration condition is met, indicating that the model training is completed.

2. A hotel energy consumption prediction method based on artificial intelligence as claimed in claim 1, characterized in that: In the data processing module, data is collected from the energy consumption monitoring systems of multiple hotels, including daily electricity, water, and gas data. The data collection method adopts a real-time automatic transmission system and is stored in a structured JSON format. The collected data is manually labeled; Then the data is expanded and samples are generated using a generative adversarial network algorithm based on a non-stationary process.

3. A hotel energy consumption prediction method based on artificial intelligence as claimed in claim 2, characterized in that: The training process of the generative adversarial network algorithm is as follows: S101. Initialize the network structure of the generator and discriminator of the generative adversarial network, including the initial value setting of weights and biases; let the generator be , the discriminator is , the weight of the generator is , the weight of the discriminator is , the initialization method is expressed as: , In the formula, Indicates compliance with a specific distribution; is the weight of the generator; is the weight of the discriminator; represents the standard deviation of the initialization; is the dimension of the input layer of the generator; Indicates that the mean is 0 and the variance matrix is The multivariate normal distribution of is the identity matrix; is a normal distribution; S102. During the training process of the generator, the generator receives a random noise vector and generates virtual energy consumption data through network layer mapping, which is expressed as: , In the formula, Fake data generated for the generator; is the generator function; is a random noise vector, and are the weight and bias of the generator, respectively. is the hyperbolic tangent function; represents element-wise multiplication; and are the attention weights and biases; S103. During the training process of the discriminator, the discriminator continuously learns how to identify the subtle differences between the generated data and the real data, which is expressed as: , In the formula, is the label of the real sample; The label of the sample determined by the discriminator to be generated; is real data; is the Sigmoid activation function, and They are the weight and bias of the discriminator respectively; is the discriminator function, and the output of the discriminator uses the Sigmoid function to give the binary classification probability; is the intermediate feature layer function; Among them, the role of the intermediate feature layer function is to enhance the model's ability to extract data features, making it more sensitive to the difference between generated data and real data. The implementation method is expressed as: , In the formula, for A linear rectifier function allows small gradients to flow in the negative part of the activation function, avoiding inactive states of neurons; and The weights and biases of the intermediate feature layers respectively; S104. During the training process of the generator and the discriminator, a feedback mechanism is adopted. Whenever the discriminator correctly identifies the generated data or the real data, the generator will adjust its own parameters according to the feedback to optimize the quality of the generated data and make it more difficult for the discriminator to distinguish. The feedback mechanism between the generator and the discriminator is realized by the adversarial loss function, which is expressed as: , In the formula, is the loss function of the discriminator; is the number of samples in the batch, is the label corresponding to the i-th real sample, is the i-th fake sample generated by the generator; is the i-th true sample; is the loss function of the generator; is the cross entropy calculation function; is the coefficient that adjusts the influence of cross entropy; is the generator regularization coefficient; is the weight of the generator Regularization; S105, adaptive regularization, specifically, automatically adjusting the generator weights according to the distribution difference between the generated data and the real data Regularization term, first define the uncertainty measure, which is calculated based on the probability distribution entropy of the discriminator output and is expressed as: , In the formula, is a measure of uncertainty; is the predicted probability of the discriminator output for the i-th sample; The regularization coefficient is defined according to the uncertainty measure and the calculation method is expressed as: , In the formula, is the scale factor; is the target uncertainty level; S106. Update the parameters of the generator and the discriminator by the gradient descent method. The update method is expressed as: , In the formula, Indicates parameter update operation; are the parameters of the discriminator; is the parameter of the generator; is the learning rate of the discriminator; is the learning rate of the generator; is the gradient with respect to the discriminator parameters; is the gradient with respect to the generator parameters; S107, repeating iterative steps S101-S106 until the preset stop iteration condition is met, indicating that the model training is completed.

4. The hotel energy consumption prediction method based on artificial intelligence as claimed in claim 1 is characterized in that: For the feature dimensionality reduction model, an autoencoder neural network based on dynamic allocation of feature importance is used as the feature dimensionality reduction model. The autoencoder neural network includes an encoder and a decoder. The encoder compresses the input data to a low-dimensional representation, and the decoder reconstructs the low-dimensional representation into a feature vector that is as similar as possible to the input data. Specifically, the training process of the autoencoder neural network algorithm based on dynamic allocation of feature importance is as follows: S301, initialize the parameters of the autoencoder neural network, and the initialization method is expressed as: , In the formula, represents the weight of the encoder, Indicates the encoder bias; represents the weight of the decoder, represents the bias of the decoder; represents a random function; is the dimension of the encoder input layer, is the dimension of the middle layer of the encoder, is the dimension of the encoder output layer; is a function that generates a vector of all zeros; S302, during the training process of the autoencoder neural network, the data is processed by forward propagation, and then the parameters of the autoencoder neural network are updated by using the gradient descent method through error back propagation. In this process, the calculation method of the loss function of the autoencoder neural network is expressed as: , In the formula, is the loss function of the autoencoder neural network; is the input data of the autoencoder neural network, is the output reconstructed by the decoder, is the Sigmoid activation function; yes norm; is the output of the smoothed encoder; is the weight coefficient of the i-th dimension autoencoder neural network; is the vector dimension corresponding to the samples of the current batch input to the autoencoder neural network; Among them, the weight coefficient of the autoencoder neural network is used to adjust the contribution of each dimensional feature in the error. These weights are dynamically allocated according to the importance of the feature. The calculation method is expressed as: , In the formula, is the characteristic variance of the input data of the i-th dimension autoencoder neural network; is the feature of the input data of the i-th dimension autoencoder neural network; is a small constant to avoid division by zero; is the variance function; S303, adopting an automatic boundary smoothing strategy to enhance the robustness of the model by dynamically adjusting the boundary value, specifically by smoothing the output of the encoder through a smoothing function, which is expressed as: , In the formula, is a smooth function; is the smoothing strength parameter; is the automatically adjusted threshold parameter; Among them, the smoothing strength parameter is determined by an adaptive method based on the local density of the data, and the calculation method is expressed as: , In the formula, calculate In its neighborhood Kernel density estimation in ; represents the neighborhood; is the kernel density estimation function; is the averaging function; is a preset small constant; S304, the training of the autoencoder neural network is completed by continuously optimizing the loss function in the iterative process, and the calculation method of the parameter update amount of each iteration parameter update is expressed as: , In the formula, is the update amount of the encoder's weight parameters; is the encoder bias parameter update amount; is the update amount of the decoder weight parameter; is the update amount of the bias parameter of the decoder; is the learning rate of the autoencoder neural network at the tth iteration; S305, using the convex hull convergence strategy to optimize the training process of the autoencoder neural network, by adjusting the learning step size and weight update strategy, the network converges quickly, and the learning rate is dynamically adjusted according to the data distribution characteristics in the current iteration as expressed in: , In the formula, is the learning rate of the initial autoencoder neural network; is the learning rate of the autoencoder neural network at the tth iteration; is the learning rate decay factor of the autoencoder neural network, is the average diameter of the convex hull in the tth iteration, is the diameter of the initial convex hull; S306: Repeat iterative steps S301-S305 until the preset stop iteration condition is met, indicating that the model training is completed.

5. The hotel energy consumption prediction method based on artificial intelligence as claimed in claim 1, characterized in that: In the decision module, a high-order neural network based on variable-scale high-order activation is used as a classifier model to classify the data features obtained from the feature processing module. Specifically, the training process of the high-order neural network algorithm based on variable-scale high-order activation is as follows: S401, initializing the parameters of the high-order neural network, including the weights and biases of the high-order neural network, the initialization method is expressed as: , In the formula, represents the weight of the lth layer of the high-order neural network; Represents the bias of the lth layer of the high-order neural network; and Respectively represent the number of input and output neurons in the lth layer of the high-order neural network; represents a normal distribution with a mean of 0 and a variance of 1; represents an all-zero vector function; S402. In each layer of the high-order neural network, the activation function of the high-order neural network is a high-order activation function that can adjust the shape of its own curve according to the standard deviation of the input data, and the calculation method is expressed as: , In the formula, is a high-order activation function; x is the independent variable of the function; It represents the maximum value function; Represents the minimum value function; is a parameter that is automatically adjusted according to the input data distribution; k is the coefficient of the higher-order term; When the parameters of the activation function are dynamically adjusted according to the statistical characteristics of the input data, the parameters of the activation function are adjusted with the variability of the input data, and the measure of the variability is the standard deviation, which is expressed as: , In the formula, It is a basic parameter that is automatically adjusted according to the input data distribution; are the coefficients of the higher-order terms of the basis; is the first sensitivity coefficient of the adjustment parameter in response to the variability of the input data; is the second sensitivity coefficient of the adjustment parameter response to the variability of the input data; is the variability of the input to the high-order neural network; is the threshold used to adjust the starting point of the influence of higher-order terms; S403. During the training process, the learning rate and the parameters of the activation function are dynamically adjusted according to the performance of each batch of data through the high-order neural network, and the training parameters are optimized according to the real-time high-order neural network output volatility and the uncertainty of the prediction. Specifically, the adjustment of the learning rate is realized according to the change rate of the loss, which is expressed as: , In the formula, is the learning rate of the high-order neural network at the tth iteration; is the initial learning rate of the high-order neural network; is the total number of iterations of the high-order neural network; is the current iteration number; is the coefficient that adjusts the effect of the decrease in learning rate; is the loss difference between the tth iteration and the previous iteration; is the sensitivity of adjusting the learning rate according to the loss acceleration; is the acceleration of the loss of high-order neural networks; Among them, the acceleration of the loss of the high-order neural network is to control the learning rate more finely, and the calculation method is expressed as: , In the formula, is the loss difference between the t-1th iteration and the previous iteration; S404. The high-order neural network is trained through multiple iterations. Each iteration includes forward propagation, loss calculation, back propagation and parameter update. During the training process, the update of weights and biases follows the standard back propagation and gradient descent algorithm. The parameter update method is expressed as: , Where L is the loss function of the high-order neural network; It is the parameter update operation; represents element-wise multiplication; is the weight adjustment matrix, whose elements are weight adjustment factors; Among them, the strategy of adaptive feature dependency enhancement is adopted to dynamically enhance the dependency between different features in high-order neural networks. Specifically, the connection weights are adjusted based on the mutual information between features through an adaptive weight adjustment layer, thereby optimizing the synergy between features and enhancing the model's ability to learn complex patterns. Specifically, the calculation method of feature mutual information is expressed as: , In the formula, is the first input sample of the high-order neural network, is the category probability vector of the first input sample of the high-order neural network; is a characteristic element of the first input sample set of the high-order neural network; is the element of the class probability vector of the first input sample of the high-order neural network; is the joint probability distribution function; S405, repeating the iteration steps S401-S404 until the preset stop iteration condition is met, indicating that the model training is completed.

6. A hotel energy consumption prediction method based on artificial intelligence as claimed in claim 1, characterized in that: In step S202, the first coefficient matrix of the whale optimization algorithm and the second coefficient matrix of the whale optimization algorithm are reduced from 2 to 0 in each iteration, which is expressed as: , Where r is a uniformly randomly generated number in the range [0, 1]; a is the control coefficient of the current iteration step, which gradually decreases with the number of iterations; The distance from the optimal solution represents the distance between the current individual position and the target, and the calculation method is expressed as: , In the formula, The optimal solution of the whale optimization algorithm corresponds to a set of optimal parameters of the neural network.

7. The hotel energy consumption prediction method based on artificial intelligence as claimed in claim 1, characterized in that: In step S204, the decision of adjusting the network topology is based on the change of the performance index, and determines whether to adjust and how to adjust, which is expressed as: , In the formula, Indicates the rate of change of the performance indicator in this iteration; is the preset performance threshold; is the number of layers or neurons that change at each adjustment; is the adjustment increment of the neural network, according to Update the network structure with the value of If it is positive, k neurons or layers are added; if it is negative, k neurons or layers are reduced.

8. A hotel energy consumption prediction method based on artificial intelligence as claimed in claim 4, characterized in that: In step S304, the parameters of the autoencoder neural network are updated, and the updating method is expressed as follows: , In the formula, Represents a parameter update operation.

9. The hotel energy consumption prediction method based on artificial intelligence as claimed in claim 5, characterized in that: In step S404, for the features input into the high-order neural network, the calculation method of defining the weight adjustment factor is expressed as follows based on the mutual information between the features: , In the formula, It is a regulatory factor used to control the influence of mutual information on weight adjustment; is the weight adjustment factor.

Citation Information

Patent Citations

  • Building energy consumption prediction method based on WGAN algorithm and monitoring and prediction system

    CN111178626A

  • Tin smelting process energy consumption prediction method based on virtual sample generation and multi-output neural network model

    CN118799113A

  • Air conditioner energy consumption prediction method and system based on improved LSTM network and storage medium

    CN118885910A

  • Equipment state prediction method and device based on artificial intelligence

    CN118171180A

  • Method for isolating, processing and analyzing user data of operating system

    CN119226920A