User space equipment energy consumption prediction method based on random forest algorithm

Through the energy consumption prediction method based on the random forest algorithm, the integrated learning model composed of multiple regression trees is solved in the existing technology that it is difficult to deal with complex built environments and consider multiple factors, and more accurate and stable energy consumption prediction is achieved to adapt to the needs of different scenarios.

CN120508924AActive Publication Date: 2025-08-19SOUTH CHINA AGRICULTURAL UNIVERSITY +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510441747.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-08-19
Estimated Expiration
2045-04-09

AI Technical Summary

Technical Problem

The prior art is difficult to cope with complex and dynamic built environments, and it is difficult to fully consider a variety of factors affecting the energy consumption of user space equipment, resulting in insufficient prediction accuracy.

Method used

The energy consumption prediction method based on the random forest algorithm is adopted, and the random forest model is trained by collecting user data, and the integrated learning method composed of multiple regression trees is used to predict the user's equipment usage and energy consumption in public spaces based on user behavior and environmental characteristics.

Benefits of technology

It improves the accuracy and stability of energy consumption prediction, can adapt to changes in different users, equipment and environments, reduces the risk of overfitting, and provides personalized energy consumption management strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508924A_ABST
    Figure CN120508924A_ABST
Patent Text Reader

Abstract

The invention discloses a user space equipment energy consumption prediction method based on a random forest algorithm, which comprehensively reflects user behaviors and energy consumption characteristics through multi-dimensional data collection and integration, utilizes the data to train a random forest model, captures complex relationships and subtle changes of the user behaviors and improves prediction accuracy, and compared with a traditional model, the user space equipment energy consumption prediction method based on the random forest algorithm has the advantages that the prediction accuracy is improved. The random forest is better in performance when processing non-linear and high-dimensional data, can more accurately predict selection and equipment use conditions of a user in a public space, further accurately calculates energy consumption, is composed of multiple regression trees, improves the model generalization ability based on different feature component training and an integrated learning method, and improves the user experience. The method adapts to new data, different scenes and changes of user, equipment and environmental conditions, and meanwhile, randomly selects features and samples to reduce prejudice, improve minority class prediction accuracy, reduce overfitting risks and ensure model stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of user space device energy consumption prediction, and in particular to a user space device energy consumption prediction method based on a random forest algorithm. Background Art

[0002] Current methods for predicting user space equipment energy consumption mostly rely on historical data and physical models. While these methods perform well in specific scenarios, they often struggle to cope with complex and dynamic building environments. For example, traditional regression models and statistical methods can significantly reduce their prediction accuracy when data quality is insufficient or the environment changes dramatically. Furthermore, the variability of user space equipment energy consumption is not only affected by weather conditions but is also closely related to factors such as building design, materials, equipment configuration, and resident behavior, making it difficult for traditional methods to fully consider all influencing factors. Summary of the Invention

[0003] In view of this, the present invention proposes a user space device energy consumption prediction method based on the random forest algorithm, which can effectively solve the defects of the existing technology that it is difficult to cope with complex and dynamic building environments and difficult to fully consider all influencing factors.

[0004] The technical solution of the present invention is achieved as follows:

[0005] A method for predicting energy consumption of user space devices based on a random forest algorithm, specifically comprising:

[0006] Collect user data and create training and test sets. The user data includes user environment preferences, device usage habits, time spent in public spaces, and the types of devices selected and their frequency of use.

[0007] Extracting feature components from the training set to train a random forest model, wherein the random forest model is composed of multiple regression trees, each regression tree being trained based on a different feature component;

[0008] The test set data is input into the trained random forest model to predict users’ space choices and device usage in public spaces.

[0009] Based on the prediction results and the user's time characteristics, the energy consumption generated by each user when using the terminal device in the public space is calculated;

[0010] The energy consumption data of individual users is aggregated into the total energy consumption of the space, and the average daily terminal device energy consumption of each user in each space is calculated.

[0011] As a further optional solution of the user space device energy consumption prediction method based on the random forest algorithm, a bagging algorithm is used to extract feature components from the training set. The specific formula of the bagging algorithm is:

[0012]

[0013] Among them, f n (D b ) is the number of features of the b-th training subset, F n is the number of features in the original training set, that is, each tree selects feature columns.

[0014] As a further optional solution of the user space device energy consumption prediction method based on the random forest algorithm, in the training of each regression tree, the optimal splitting attribute of each regression tree is determined based on the Gini coefficient, specifically:

[0015] Calculate the impurity measure of the current data set based on the Gini coefficient formula;

[0016] For each feature and all its possible values, calculate the impurity measure of the split dataset if the feature and its value are used as the split point;

[0017] Calculate the gain of the Gini index based on the Gini coefficient of the current dataset and the Gini coefficient of the split dataset;

[0018] Among all the features, the feature with the largest Gini index gain is selected as the optimal split feature;

[0019] Split the current node into multiple child nodes based on the selected optimal splitting feature.

[0020] As a further optional solution of the user space device energy consumption prediction method based on the random forest algorithm, the random forest model is trained by applying Bayesian optimization to the parameters of the random forest model, specifically:

[0021] Initializing a parameter space for Bayesian optimization, wherein the parameter space includes the value ranges of all adjustable parameters of the random forest model;

[0022] Calculate the covariance between different points in the parameter space based on the kernel function;

[0023] Using the covariance between different points based on Gaussian process regression, we construct the predictive distribution of the random forest model performance;

[0024] Calculate the marginal likelihood of the predicted distribution according to the marginal likelihood formula;

[0025] According to the calculated marginal likelihood, obtain the parameter combination that maximizes the marginal likelihood;

[0026] Use the expected improvement criterion to select the next parameter combination to evaluate;

[0027] Repeat the above steps until the preset optimization criteria are reached or the preset number of iterations is reached.

[0028] As a further optional solution to the user space device energy consumption prediction method based on the random forest algorithm, the average daily terminal device energy consumption of each user in each space is calculated using the following formula: ; in, Indicates the average daily energy consumption of terminal devices by each user in each space. It indicates the sum of the power consumption of the devices that the user is predicted to use in the space. Indicates the time the user stays in the space. Indicates the number of times the user stays in the space in a day. N Indicates the number of users.

[0029] As a further optional solution of the user space device energy consumption prediction method based on the random forest algorithm, after collecting user data and before creating the training set and the test set, it also includes a data preprocessing step, and the data preprocessing step includes data cleaning, standardization and data enhancement.

[0030] As a further optional solution of the method for predicting energy consumption of user space devices based on the random forest algorithm, the method further includes:

[0031] The predicted average user energy consumption of each space is imported into the BIM model. Based on the number of user occupancy monitored daily, the daily terminal equipment energy consumption generated by each space in the building and the daily terminal equipment energy consumption of the entire building are predicted, and an energy consumption heat map is generated through BIM visualization.

[0032] A user space device energy consumption prediction system based on random forest algorithm, including:

[0033] A data collection and preprocessing module is used to collect user data, the user data including at least the user's environmental preferences, device usage habits, length of stay in public spaces, and the type of device selected and frequency of use, and to create training and test sets based on the user data;

[0034] A random forest model training module is used to extract feature components based on the data in the training set for training the random forest model, wherein the random forest model is composed of multiple regression trees, and each regression tree is independently trained based on different feature components;

[0035] The prediction module is used to input the data in the test set into the trained random forest model to predict users' space choices and device usage in public spaces;

[0036] The energy consumption calculation module is used to calculate the energy consumption generated by each user when using the terminal device in the public space based on the output results of the prediction module and the user's time characteristics;

[0037] The energy consumption summary and analysis module is used to summarize the energy consumption data of individual users into the total energy consumption of the corresponding space, and further calculate the average daily terminal device energy consumption generated by each user in each space.

[0038] A computing device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor implements any one of the steps of the above-mentioned method for predicting energy consumption of a user space device based on a random forest algorithm.

[0039] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for predicting energy consumption of user space devices based on a random forest algorithm.

[0040] The present invention has the following beneficial effects: by collecting and integrating multi-dimensional data such as users' environmental preferences, device usage habits, length of stay in public spaces, and the types and frequency of device selection, the solution can more comprehensively reflect users' actual behavior and energy consumption characteristics. Using this data to train a random forest model can capture complex relationships and subtle changes in the data, thereby improving prediction accuracy. Compared with traditional linear regression or simple machine learning models, the random forest model performs better when processing nonlinear and high-dimensional data, and can more accurately predict users' spatial choices and device usage in public spaces, thereby more accurately calculating energy consumption. The random forest model is composed of multiple regression trees, each of which is trained based on different feature components. This ensemble learning method effectively improves the model's generalization ability. Even when faced with new data or different scenarios, the model can maintain stable prediction performance, reduce the risk of overfitting, and adapt to changes in different users, different devices, and different environmental conditions. At the same time, because the model is an ensemble model composed of multiple regression trees, each tree randomly selects features and data samples during training, which helps reduce the model's bias towards the majority class and improve the prediction accuracy of the minority class. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 This is a flow chart of a method for predicting energy consumption of user space devices based on a random forest algorithm according to the present invention;

[0043] Figure 2 This is a schematic diagram of the composition of a user space device energy consumption prediction system based on a random forest algorithm according to the present invention;

[0044] Figure 3 The figure is a schematic diagram of the composition of a computing device according to the present invention. DETAILED DESCRIPTION

[0045] The following is a clear and complete description of 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 making creative efforts are within the scope of protection of the present invention.

[0046] refer to Figures 1 to 3 ,A user space device energy consumption prediction method based on random forest algorithm, comprising:

[0047] Collect user data and create training and test sets. The user data includes user environment preferences, device usage habits, time spent in public spaces, and the types of devices selected and their frequency of use.

[0048] Extracting feature components from the training set to train a random forest model, wherein the random forest model is composed of multiple regression trees, each regression tree being trained based on a different feature component;

[0049] The test set data is input into the trained random forest model to predict users’ space choices and device usage in public spaces.

[0050] Based on the prediction results and the user's time characteristics, the energy consumption generated by each user when using the terminal device in the public space is calculated;

[0051] The energy consumption data of individual users is aggregated into the total energy consumption of the space, and the average daily terminal device energy consumption of each user in each space is calculated.

[0052] In this embodiment, by collecting and integrating multi-dimensional data such as users' environmental preferences, device usage habits, duration of stay in public spaces, selected device types, and usage frequency, the solution can more comprehensively reflect users' actual behavior and energy consumption characteristics. Using this data to train a random forest model can capture complex relationships and subtle changes in the data, thereby improving prediction accuracy. Compared with traditional linear regression or simple machine learning models, the random forest model performs better when processing nonlinear and high-dimensional data, and can more accurately predict users' spatial choices and device usage in public spaces, thereby more accurately calculating energy consumption. The random forest model is composed of multiple regression trees, each trained based on different feature components. This ensemble learning method effectively improves the model's generalization ability. Even when faced with new data or different scenarios, the model can maintain stable prediction performance, reduce the risk of overfitting, and adapt to changes in different users, different devices, and different environmental conditions. At the same time, because the model is an ensemble model composed of multiple regression trees, each tree randomly selects features and data samples during training, which helps reduce the model's bias towards the majority class and improve the prediction accuracy of the minority class.

[0053] Preferably, a bagging algorithm is used to extract feature components from the training set. The specific formula of the bagging algorithm is:

[0054]

[0055] Among them, f n (D b ) is the number of features of the b-th training subset, F n is the number of features in the original training set, that is, each tree selects feature columns.

[0056] In this embodiment, by selecting This method enhances the diversity and robustness of the model and effectively improves the generalization ability of the model. Even when faced with unseen data, the model can still show good predictive performance. Reducing the number of features means that the amount of data that needs to be processed when training each tree is reduced, thereby saving computing resources. This is especially important for processing large-scale data sets. It can significantly increase training speed, reduce computing costs, and make the model more efficient in practical applications. By integrating multiple weak learners to build a strong learner, the bagging algorithm improves the stability and accuracy of the model. Each tree selects a different feature subset during training, which helps to reduce the impact of a single feature on the model and makes the model more robust in the face of data noise and outliers.

[0057] Preferably, in the training of each regression tree, the best splitting attribute of each regression tree is determined based on the Gini coefficient, specifically:

[0058] Calculate the impurity measure of the current data set based on the Gini coefficient formula;

[0059] For each feature and all its possible values, calculate the impurity measure of the split dataset if the feature and its value are used as the split point;

[0060] Calculate the gain of the Gini index based on the Gini coefficient of the current dataset and the Gini coefficient of the split dataset;

[0061] Among all the features, the feature with the largest Gini index gain is selected as the optimal split feature;

[0062] Split the current node into multiple child nodes based on the selected optimal splitting feature.

[0063] In this embodiment, by calculating the Gini index gain of each feature and all its possible values, the scheme provides a clear and quantitative standard for selecting the optimal splitting feature, which helps to ensure that the growth of the tree is based on the actual influence of the data features rather than subjective judgment; using the Gini coefficient as the splitting criterion aims to build a model by reducing the impurity of the data set, which helps to improve the generalization ability of the model because it tends to select those features that can minimize the prediction error for splitting; calculating the Gini index gain for each feature and all its possible values can be a computationally intensive task, especially when the data set is large or the feature dimension is high, however, this calculation is performed independently on each node of the tree and is no longer required once the tree is built.

[0064] It should be noted that we first need to calculate the Gini coefficient Gini(D) of the current dataset D, which reflects the impurity of the dataset. The smaller the value of the Gini coefficient, the lower the impurity of the dataset, that is, the samples in the dataset tend to belong to the same category. Next, for each feature A and all its possible values, calculate the Gini coefficient Gini(D|A) of the dataset D after splitting if the feature and its value are used as the splitting point. This involves calculating the Gini coefficient Gini(Di) for each subset Di, and performing a weighted average based on the number of samples |Di| in the subset Di to calculate the gain of the Gini index, that is, the Gini coefficient Gini(D) before the split minus the weighted average Gini coefficient Gini(D|A) after the split. The larger the gain, the better the effect of the feature in reducing the impurity of the dataset. The specific calculation formula is:

[0065]

[0066] where p i is the proportion of category i, and y is the total number of categories;

[0067]

[0068] Among them, Gini(D) is the Gini index of the sample set D before partitioning, Gini(D i ) is each subset D after partitioning i The Gini index, |D i | is a subset D i , |D| is the total number of samples in the sample set D, and k is the number of values of feature A.

[0069] Preferably, during the training process of the random forest model, the parameters of the random forest model are optimized using Bayesian optimization, specifically:

[0070] Initializing a parameter space for Bayesian optimization, wherein the parameter space includes the value ranges of all adjustable parameters of the random forest model;

[0071] Calculate the covariance between different points in the parameter space based on the kernel function;

[0072] Using the covariance between different points based on Gaussian process regression, we construct the predictive distribution of the random forest model performance;

[0073] Calculate the marginal likelihood of the predicted distribution according to the marginal likelihood formula;

[0074] According to the calculated marginal likelihood, obtain the parameter combination that maximizes the marginal likelihood;

[0075] Use the expected improvement criterion to select the next parameter combination to evaluate;

[0076] Repeat the above steps until the preset optimization criteria are reached or the preset number of iterations is reached.

[0077] In this embodiment, Bayesian optimization automatically searches for the optimal parameter combination in an iterative manner without the need for manual attempts one by one, which greatly reduces the time cost of parameter tuning. It can intelligently utilize the information of the previous sampling point and construct a prediction distribution through Gaussian process regression to guide subsequent parameter searches and improve search efficiency. Bayesian optimization aims to find the global optimal solution rather than the local optimal solution. By continuously iterating and updating the prediction distribution, it can effectively search the entire parameter space to find the parameter combination that optimizes the performance of the random forest model. When initializing the parameter space, Bayesian optimization allows the user to specify the value range of all adjustable parameters of the random forest model, which ensures wide coverage of the parameter space and increases the possibility of finding a better parameter combination.

[0078] It should be noted that through iterative optimization methods, the model parameters are continuously adjusted so that the model can achieve the best prediction accuracy. In each optimization, the impact of the new parameter configuration on the prediction results is evaluated, and the model parameters are updated according to the optimization results to maximize the prediction accuracy. The relevant formula for its implementation is as follows:

[0079] Matérn 5 / 2 kernel function:

[0080] where x is the input hyperparameter combination, which is the number of generated trees and the maximum depth of the tree, x′ is another input point to be compared with x, k(x,x′) is the covariance between input points x and x′, d = |x-x′|, is the Euclidean distance between the input points, and σ 2 is the variance of the output, which controls the overall amplitude of the function value, and l is the length scale parameter, which is automatically selected based on the data;

[0081] Gaussian process regression: f(x) ~ GP(m(x), k(x, x′));

[0082] Among them, m(x) is the mean function, which is set to zero mean function here;

[0083] Compute the marginal likelihood:

[0084] Among them, p(y i |X,θ) represents the predicted spatial or device type accuracy probability distribution under the input data X and hyperparameter θ, m i (X) is the mean function of yi when input X, assuming it is 0, K i (X,X) is the precision set to the target optimization value y i The kernel matrix, is the variance of the noise, set to 1, used to model the observation noise, and I is the identity matrix;

[0085] Maximize the likelihood margin: θ * =argmaxP(y i |X,θ);

[0086] Among them, θ * To maximize the expression value, y i is the accuracy value output by the model, and X is the input feature dataset;

[0087] Expected improvement: EI(θ)=E[max(0,f(θ)-y best );

[0088] Among them, θ is the current hyperparameter combination, f(θ) is the objective function value under the hyperparameter θ, and y best is the best accuracy observed so far, and E denotes the expected value.

[0089] Preferably, the specific formula for calculating the average daily terminal device energy consumption of each user in each space is: ; in, Indicates the average daily energy consumption of terminal devices by each user in each space. It indicates the sum of the power consumption of the devices that the user is predicted to use in the space. Indicates the time the user stays in the space. Indicates the number of times the user stays in the space in a day. N Indicates the number of users.

[0090] In this embodiment, relevant data of users are collected, including but not limited to the time users stay in different spaces, the types of devices used and their power consumption, etc., and based on these data, the devices that users will use in a specific space and their power consumption are predicted. For each user, the total energy consumption generated by the user's use of terminal devices in the space is calculated based on the prediction results and the user's stay time in the space, the energy consumption data of all users are aggregated into the total energy consumption of the space, and the average daily terminal device energy consumption generated by each user in each space is calculated; by accurately predicting the user's device usage and power consumption in a specific space, this technical solution can provide more accurate energy consumption data, which helps space managers better understand energy consumption, formulate effective energy management strategies, and reduce energy costs. The solution takes into account the different behavior patterns and device usage habits of users, and therefore can provide personalized energy consumption predictions and calculation results, which makes the solution more flexible and able to adapt to the needs of different users, different spaces and different time periods.

[0091] Preferably, after collecting user data and before creating the training set and the test set, a data preprocessing step is also included, and the data preprocessing step includes data cleaning, standardization processing and data enhancement.

[0092] In this embodiment, the user data is preprocessed, including data cleaning, standardization, and data enhancement, to eliminate invalid data and outliers and ensure the balance of the data set. The data enhancement processing includes oversampling or undersampling the label data with uneven distribution to ensure that the model will not be affected by unbalanced data during training.

[0093] Preferably, the method further comprises:

[0094] The predicted average user energy consumption of each space is imported into the BIM model. Based on the number of user occupancy monitored daily, the daily terminal equipment energy consumption generated by each space in the building and the daily terminal equipment energy consumption of the entire building are predicted, and an energy consumption heat map is generated through BIM visualization.

[0095] In this embodiment, by combining the predicted average user energy consumption with the BIM model, the technical solution can achieve refined prediction and management of the energy consumption of each space, which helps space managers to more accurately understand the energy consumption of each space and thus formulate more targeted energy management strategies. The number of user occupants is monitored daily, and the daily energy consumption of terminal equipment in each space is predicted based on this, so that energy management can reflect the actual situation in real time. This provides a basis for space managers to dynamically adjust energy management strategies and helps to respond to abnormal energy consumption in a timely manner. Energy consumption heat maps are generated through BIM visualization, so that energy consumption data is presented in an intuitive and easy-to-understand manner. This helps space managers to more intuitively understand the energy consumption distribution of each space in the building, making it easier to discover abnormal energy consumption areas and potential energy-saving opportunities. Combining the BIM model and the energy consumption heat map, space managers can have a more comprehensive understanding of the building's energy consumption, which provides strong decision-making support for formulating energy efficiency optimization strategies, helping to reduce the building's overall energy consumption and improve energy efficiency.

[0096] A user space device energy consumption prediction system based on random forest algorithm, including:

[0097] A data collection and preprocessing module is used to collect user data, the user data including at least the user's environmental preferences, device usage habits, length of stay in public spaces, and the type of device selected and frequency of use, and to create training and test sets based on the user data;

[0098] A random forest model training module is used to extract feature components based on the data in the training set for training the random forest model, wherein the random forest model is composed of multiple regression trees, and each regression tree is independently trained based on different feature components;

[0099] The prediction module is used to input the data in the test set into the trained random forest model to predict users' space choices and device usage in public spaces;

[0100] The energy consumption calculation module is used to calculate the energy consumption generated by each user when using the terminal device in the public space based on the output results of the prediction module and the user's time characteristics;

[0101] The energy consumption summary and analysis module is used to summarize the energy consumption data of individual users into the total energy consumption of the corresponding space, and further calculate the average daily terminal device energy consumption generated by each user in each space.

[0102] A computing device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor implements any one of the steps of the above-mentioned method for predicting energy consumption of a user space device based on a random forest algorithm.

[0103] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for predicting energy consumption of user space devices based on a random forest algorithm.

[0104] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for predicting energy consumption of user space devices based on random forest algorithm, characterized in that: Specifically include: Collect user data and create training and test sets. The user data includes user environment preferences, device usage habits, time spent in public spaces, and the types of devices selected and their frequency of use. Extracting feature components from the training set to train a random forest model, wherein the random forest model is composed of multiple regression trees, each regression tree being trained based on a different feature component; The test set data is input into the trained random forest model to predict users’ space choices and device usage in public spaces. Based on the prediction results and the user's time characteristics, the energy consumption generated by each user when using the terminal device in the public space is calculated; The energy consumption data of individual users is aggregated into the total energy consumption of the space, and the average daily terminal device energy consumption of each user in each space is calculated.

2. The method for predicting energy consumption of user space devices based on random forest algorithm according to claim 1, characterized in that: The bagging algorithm is used to extract feature components from the training set. The specific formula of the bagging algorithm is: ; in, It is b The number of features in the training subset, is the number of features in the original training set, that is, each tree selects feature columns.

3. The method for predicting energy consumption of user space devices based on random forest algorithm according to claim 2, characterized in that: During the training of each regression tree, the optimal splitting attribute of each regression tree is determined based on the Gini coefficient, which is: Calculate the impurity measure of the current data set based on the Gini coefficient formula; For each feature and all its possible values, calculate the impurity measure of the split dataset if the feature and its value are used as the split point; Calculate the gain of the Gini index based on the Gini coefficient of the current dataset and the Gini coefficient of the split dataset; Among all the features, the feature with the largest Gini index gain is selected as the optimal split feature; Split the current node into multiple child nodes based on the selected optimal splitting feature.

4. The method for predicting energy consumption of user space devices based on random forest algorithm according to claim 3, characterized in that: During the training process of the random forest model, the parameters of the random forest model are optimized using Bayesian optimization, specifically: Initializing a parameter space for Bayesian optimization, wherein the parameter space includes the value ranges of all adjustable parameters of the random forest model; Calculate the covariance between different points in the parameter space based on the kernel function; Using the covariance between different points based on Gaussian process regression, we construct the predictive distribution of the random forest model performance; Calculate the marginal likelihood of the predicted distribution according to the marginal likelihood formula; According to the calculated marginal likelihood, obtain the parameter combination that maximizes the marginal likelihood; Use the expected improvement criterion to select the next parameter combination to evaluate; Repeat the above steps until the preset optimization criteria are reached or the preset number of iterations is reached.

5. The method for predicting energy consumption of user space devices based on random forest algorithm according to claim 4, characterized in that: The specific formula for calculating the average daily terminal device energy consumption of each user in each space is: ; in, Indicates the average daily energy consumption of terminal devices by each user in each space. It indicates the sum of the power consumption of the devices that the user is predicted to use in the space. Indicates the time the user stays in the space. Indicates the number of times the user stays in the space in a day. N Indicates the number of users.

6. The method for predicting energy consumption of user space devices based on random forest algorithm according to claim 5, characterized in that: After collecting user data and before creating the training set and the test set, a data preprocessing step is also included, and the data preprocessing step includes data cleaning, standardization and data enhancement.

7. The method for predicting energy consumption of user space devices based on random forest algorithm according to claim 6, characterized in that: The method further comprises: The predicted average user energy consumption of each space is imported into the BIM model. Based on the number of user occupancy monitored daily, the daily terminal equipment energy consumption generated by each space in the building and the daily terminal equipment energy consumption of the entire building are predicted, and an energy consumption heat map is generated through BIM visualization.

8. A user space device energy consumption prediction system based on random forest algorithm, characterized in that: include: A data collection and preprocessing module is used to collect user data, the user data including at least the user's environmental preferences, device usage habits, length of stay in public spaces, and the type of device selected and frequency of use, and to create training and test sets based on the user data; A random forest model training module is used to extract feature components based on the data in the training set for training the random forest model, wherein the random forest model is composed of multiple regression trees, and each regression tree is independently trained based on different feature components; The prediction module is used to input the data in the test set into the trained random forest model to predict users' space choices and device usage in public spaces; The energy consumption calculation module is used to calculate the energy consumption generated by each user when using the terminal device in the public space based on the output results of the prediction module and the user's time characteristics; The energy consumption summary and analysis module is used to summarize the energy consumption data of individual users into the total energy consumption of the corresponding space, and further calculate the average daily terminal device energy consumption generated by each user in each space.

9. A computing device, characterized in that The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method implements the steps of the method for predicting energy consumption of a user space device based on a random forest algorithm as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the steps of the user space device energy consumption prediction method based on the random forest algorithm described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Prediction method and system for vehicle energy consumption analysis

    CN110705774A

  • Commercial building energy consumption prediction optimization method and system

    CN113282122A

  • Refrigerator energy consumption prediction method and device, refrigerator and storage medium

    CN117057224A

  • Adaptive operator parallel segmentation method for heterogeneous embedded chip of intelligent Internet of Things

    CN119201622A

  • Method for predicting energy consumption for using ensemble learning, and computing apparatus for performing the method

    KR102478684B1