Energy consumption control optimization method based on federated learning and neural network
Through the federated learning method of data collection and model training on the local side of colleges and universities, and global model parameters are updated on the cloud, the problem of data interoperability between colleges and universities is solved, the training efficiency and prediction accuracy of the energy consumption control optimization model is improved, and more efficient energy consumption management and user satisfaction are achieved.
Patent Information
- Application Number
- CN202411971416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
The data between universities is not interoperable, resulting in low training efficiency and low prediction accuracy of energy consumption control optimization models, which in turn limits the development of energy conservation and emission reduction work.
The energy consumption control optimization method based on federated learning and neural network is adopted. By setting up local ends in each university for data collection and preliminary processing, an energy consumption prediction model is built, and global model parameters are updated in the cloud to achieve data privacy protection and model training efficiency improvement.
While protecting data privacy, it improves the training efficiency and prediction accuracy of the energy consumption control optimization model, realizes a more scientific intelligent control strategy, reduces energy consumption and improves user comfort and satisfaction.
Smart Images

Figure CN119884660A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent model technology, and in particular relates to an energy consumption control optimization method based on federated learning and neural networks. Background Art
[0002] As an important place for knowledge dissemination and scientific research innovation, the energy consumption of colleges and universities has attracted increasing attention from all walks of life. Among the various energy consumption, lighting energy consumption accounts for a non-negligible proportion. According to relevant statistics, lighting energy consumption usually accounts for more than 20% of the total energy consumption of colleges and universities, and some colleges and universities even account for 30%, making it a key target for energy conservation and emission reduction. Especially in public areas, such as libraries, teaching buildings, gymnasiums, etc., due to the large flow of people and high frequency of use, lighting equipment often runs for a long time, resulting in unnecessary energy waste and ineffective use of lights.
[0003] In order to effectively reduce the energy consumption of university lighting and achieve sustainable development goals, energy consumption control optimization models have emerged. These models can predict future energy consumption trends by analyzing historical energy consumption data, and formulate intelligent control strategies based on this to accurately control the lighting of public areas. However, the training and optimization of the model cannot be separated from the support of a large amount of data. In the current environment, universities often keep data strictly confidential in order to protect the original data, resulting in data not being interoperable between universities, and each holding independent and difficult-to-share data resources. This data island phenomenon seriously restricts the training and development of energy consumption control optimization models. Since data cannot be shared, the model can only be trained based on a limited data set, which not only reduces the generalization ability of the model, but also may lead to inaccurate prediction results. In addition, the learning efficiency of large-scale machine learning algorithms will be greatly reduced in the absence of sufficient data support, and it is difficult to exert their due effectiveness.
[0004] The seriousness of the problem lies in the fact that the lack of data interoperability not only limits the improvement of model performance, but may also lead to stagnation in energy conservation and emission reduction work. As a major energy consumer, universities will find it difficult to achieve the long-term goal of energy conservation and emission reduction if they cannot make breakthroughs in lighting energy consumption control. At the same time, the confidentiality of data also increases the difficulty of model training, making it difficult for researchers to obtain comprehensive and accurate data support, thus affecting the optimization and upgrading of the model.
[0005] Therefore, how to improve the training efficiency and prediction accuracy of energy consumption control optimization models while protecting data privacy has become a problem that needs to be solved urgently. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides an energy consumption control optimization method based on federated learning and neural networks, which can improve the training efficiency and prediction accuracy of the energy consumption control optimization model while protecting data privacy.
[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0008] A method for optimizing energy consumption control based on federated learning and neural network includes the following steps:
[0009] S1. Set up local terminals in each university; build an energy consumption prediction model and configure initial parameters, and then configure it in the cloud and local terminals; the energy consumption prediction model is used to predict electricity consumption using historical related data;
[0010] S2, collect data through each local terminal and perform preprocessing to obtain respective training data, and divide the training data into a training set and a test set;
[0011] S3, each local terminal uses its own training set to train the energy consumption prediction model and update the local model parameters;
[0012] S4, the local end sends the local model parameters to the cloud;
[0013] S5. After receiving the local model parameters of each local terminal, the cloud processes them according to a preset method to obtain the global model parameters and sends them to each local terminal that sent the local model parameters;
[0014] S6. The local end uses the received global model parameters to update the model parameter configuration of its energy consumption prediction model to obtain an updated energy consumption prediction model; then the local end uses its own test set to test the accuracy of the updated energy consumption prediction model; if the test passes, the updated energy consumption prediction model is used to predict local electricity consumption, and combined with the intelligent control strategy to coordinate the energy consumption of university lights and optimize the lighting mode; if the test fails, the local end uses its own training set to perform a new round of training on the updated energy consumption prediction model, and goes to S4 to send the new round of updated local model parameters to the cloud, perform a new round of global model parameter updates, and repeat the subsequent steps until the preset termination conditions are met.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] 1. This method can achieve data privacy protection. This method effectively avoids the direct leakage of original data and protects the data privacy of universities by setting up local terminals in each university and performing data collection and preliminary processing on the local terminal. The cloud only receives and processes the model parameters trained by the local terminal, rather than directly processing the original data, which further enhances the security of the data.
[0017] 2. This method can improve the efficiency of model training. This method allows each university to train models in parallel locally, making full use of distributed computing resources and significantly improving the efficiency of model training. The cloud is responsible for summarizing and updating global model parameters, reducing the training time of a single local end, while ensuring the continuous optimization of the global model.
[0018] 3. This method can improve the prediction accuracy of the model. Through multiple iterations of training and global model updates, the energy consumption prediction model can continuously absorb the data characteristics of various universities and improve the generalization ability and prediction accuracy of the model. The local end uses the test set to test the accuracy of the updated model to ensure the reliability of the model in practical applications.
[0019] In summary, this method can improve the training efficiency and prediction accuracy of the energy consumption control optimization model while protecting data privacy. Based on the accurate energy consumption prediction results, colleges and universities can formulate more scientific intelligent control strategies to achieve coordinated control of lighting energy consumption. The optimized lighting mode not only reduces energy consumption, but also improves user comfort and satisfaction.
[0020] Preferably, in S6, the local end that fails the test uses its own training set to perform a new round of training on the updated energy consumption prediction model, and then uses its own test set to perform accuracy test on the new round of updated energy consumption prediction model again. If the test is passed, the updated energy consumption prediction model is used to perform local power consumption prediction, and termination update information is generated locally;
[0021] After the local end receives the global model parameters sent by the cloud, if there is termination update information on the local end, the model parameter configuration update and accuracy test of its energy consumption prediction model will no longer be performed.
[0022] This setting, 1. A closed loop of model optimization and verification is achieved. In step S6, for the local end that failed the test, a new round of training is performed on the updated energy consumption prediction model by using its own training set again, and then the accuracy is tested with the test set, forming a closed loop of model optimization and verification. This closed loop ensures that the model can gradually improve its prediction ability after multiple iterations until it reaches the preset accuracy standard.
[0023] 2. Reduce unnecessary consumption of computing resources. When the local end passes the test and generates the termination update information, if it receives the global model parameters sent by the cloud again, it will no longer update the model parameter configuration and accuracy test. This mechanism avoids unnecessary repeated training and testing when the model is already accurate enough, thereby reducing the consumption of computing resources.
[0024] 3. Improve system efficiency and response speed. By introducing a mechanism to stop updating information, the system can more quickly identify models that have met the requirements and stop further training and testing. This helps improve the efficiency and response speed of the entire system, allowing the energy consumption control optimization model to be applied to actual scenarios more quickly.
[0025] Preferably, in S6, the preset termination condition is that the number of local terminals that fail the test is 1 or 0;
[0026] If there is only one local end that fails the test, the local end will use its own training set to conduct a new round of training on the updated energy consumption prediction model, and directly use the energy consumption prediction model after the new round of training to predict lighting power consumption, and combine it with the intelligent control strategy to coordinate the control of university lighting energy consumption and optimize the lighting mode.
[0027] This setting can flexibly respond to model updates. According to the new preset termination condition, that is, when the number of local terminals that fail the test is 1 or 0, the system can flexibly respond to different model update situations. When only one local terminal model fails the test, the local terminal will directly perform a new round of training and application without the need to update the global model parameters, which reduces unnecessary waiting time and computing resource consumption.
[0028] 2. Achieve fast response and local optimization. For the only local terminal that failed the test, the energy consumption prediction model after the new round of training was directly used to predict the lighting power consumption, and combined with the intelligent control strategy to coordinate the energy consumption of university lights and optimize the lighting mode. This fast response mechanism enables the local terminal to quickly adjust its energy consumption management strategy and achieve local optimization without having to wait for the global model to be updated.
[0029] 3. Enhance system robustness. This technology also reflects the system's tolerance for abnormal situations. Even if a local model fails the test, the system can ensure that the local energy management strategy is still effective through local optimization, thereby enhancing the robustness of the entire system.
[0030] Preferably, in S5, when processing the local model parameters, the preset method includes: calculating the weights of the local model parameters of each local terminal according to the amount of training data of each local terminal, and then using a federal averaging algorithm to perform weighted averaging calculation on the model parameters of each local terminal to obtain global model parameters.
[0031] This setting, 1. Balances the reasonable matching of data volume and model parameter weights. In step S5, by calculating the weights of local model parameters based on the amount of training data of each local terminal, the reasonable matching of data volume and model parameters in the global model update is ensured. This method fully considers the impact of data volume differences on model parameters, so that the global model can more accurately reflect the data characteristics of all local terminals.
[0032] 2. Improve the representativeness of the global model. The federated average algorithm is used to perform weighted average calculations on the model parameters of each local terminal, which can combine the learning results of each local terminal to obtain a more representative global model. This method avoids the impact of a single local terminal data bias on the global model and improves the generalization ability and accuracy of the global model.
[0033] 3. Enhance the fairness and reliability of the system. By considering the amount of training data of each local terminal to assign weights and using weighted average to calculate the global model parameters, this method enhances the fairness and reliability of the system. The data contribution of each local terminal is reasonably reflected, making the global model more robust and better able to adapt to the energy consumption prediction needs in different scenarios.
[0034] 4. Optimize the update efficiency of the global model. By taking into account the difference in data volume, excessive calculations are avoided on the local side with smaller data volume, thereby reducing unnecessary consumption of computing resources. At the same time, the weighted average method also makes the update of the global model smoother and reduces the fluctuation of model parameters.
[0035] Preferably, the energy consumption prediction model is an intelligent prediction model based on a long short-term memory neural network.
[0036] With this setup, the LSTM neural network has strong nonlinear fitting capabilities and the ability to capture long-term dependencies, which enables it to better learn the potential patterns and laws in historical energy consumption data. By training the LSTM model, future energy consumption can be accurately predicted, thereby improving the accuracy of the prediction. This is of great significance for formulating energy management strategies and optimizing energy use.
[0037] Preferably, in S2, the preprocessing includes abnormal data processing, missing data processing and data normalization.
[0038] Such settings, abnormal data processing, missing data processing and data normalization in the preprocessing stage have significant effects on improving data quality, reducing model errors, avoiding misleading decisions, improving data availability and accelerating model training. These preprocessing steps are an indispensable part of machine learning projects and are crucial to ensuring the accuracy and reliability of the model.
[0039] Preferably, the abnormal data processing includes: treating the abnormal data as missing values;
[0040] The missing data processing includes: if the importance value of the missing data in the model is less than the preset value, and the loss probability is greater than the preset threshold, then it is directly eliminated; if the importance value of the missing data in the model is less than the preset value, but the loss probability is less than or equal to the preset threshold, the missing item is replaced by the average value of the upper and lower rows of the cell where the missing data is located; if the importance value of the missing data in the model is greater than the preset value, the Lagrange polynomial interpolation method is used to supplement the missing data.
[0041] This setting effectively improves the quality and availability of data and optimizes the performance of the model by treating abnormal data as missing values and adopting different processing strategies based on the importance and loss probability of the missing data in the model. These strategies have extensive value and significance in practical applications.
[0042] Preferably, the data normalization adopts the Min-Max normalization method to linearly map the collected data into a numerical value in the range of 0 to 1; the processing formula is as follows:
[0043] x * =(x i -x min ) / (x max -x min );
[0044] In the formula, x* is the preprocessed data, x i is the collected original data, x min is the minimum value of the collected original data, x max It is the maximum value of the original data collected.
[0045] This setting uses the Min-Max normalization method to linearly map the collected data to values between 0 and 1, which can effectively unify the data scale, improve model performance, enhance model robustness, facilitate feature comparison, and improve model interpretability. These effects together provide a solid foundation for subsequent machine learning model training and prediction.
[0046] Preferably, in S4, the local end sends the local model parameters to the cloud through a preset secure encryption method;
[0047] In S5, the cloud sends the global model parameters to the local end through a preset secure encryption method.
[0048] With this setup, local and global model parameters are transmitted between the local end and the cloud through a preset secure encryption method, which can significantly enhance data security, improve communication reliability, ensure compliance, enhance system trust, and promote the widespread application of federated learning. It provides a solid security guarantee for the energy consumption control optimization method based on federated learning and neural networks.
[0049] Preferably, the historical related data includes the number of personnel, energy consumption data, natural light intensity and light lumen.
[0050] Such a setting, using historical data such as the number of people, energy consumption data, natural light intensity and light lumens to train energy consumption prediction models or conduct energy consumption analysis, can significantly improve prediction accuracy, optimize energy use, improve lighting system efficiency, enhance system robustness, and promote data-driven decision-making. These effects together provide strong support for the coordinated control of lighting energy use and energy consumption management and optimization in colleges and universities. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to make the purpose, technical solution and advantages of the invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0052] Figure 1 Flowchart of this method. DETAILED DESCRIPTION
[0053] The following is a further detailed description through specific implementation methods:
[0054] Example:
[0055] like Figure 1 As shown, this embodiment discloses an energy consumption control optimization method based on federated learning and neural network, including the following steps:
[0056] S1. Set up local terminals in each university; build an energy consumption prediction model and configure initial parameters, and then configure it in the cloud and local terminals; the energy consumption prediction model is used to use historical related data to predict electricity consumption.
[0057] The historical data include the number of people, energy consumption data, natural light intensity and light lumens. In this way, using historical data such as the number of people, energy consumption data, natural light intensity and light lumens to train energy consumption prediction models or conduct energy consumption analysis can significantly improve prediction accuracy, optimize energy use, improve lighting system efficiency, enhance system robustness, and promote data-driven decision-making. These effects together provide strong support for the coordinated control of lighting energy use and energy consumption management and optimization in colleges and universities.
[0058] In specific implementation, the energy consumption prediction model is an intelligent prediction model based on the Long Short-Term Memory (LSTM) neural network. A parameter sharing layer is established through LSTM, and the hidden layer is used as a data feature sharing and respective task output layer.
[0059] First, the energy consumption data, natural light intensity, and light lumens are input into the LSTM shared hidden layer to obtain the general model ε and model parameters θ ε ={θ ε,1 ,…,θ ε,L}, where θ ε , L is the parameter of the lth layer of the neural network, and L is the number of layers of the neural network. After the output of the shared layer, it enters the respective output layer Γ, whose parameters are Independent of each other, it realizes the mapping from features to the output of each task. Given parameters and samples of task t As input, the energy consumption prediction model based on federated learning multi-task is shown in the following formula.
[0060]
[0061] LSTM neural network has strong nonlinear fitting ability and the ability to capture long-term dependencies, which enables it to better learn the potential patterns and laws in historical energy consumption data. By training the LSTM model, future energy consumption can be accurately predicted, thereby improving the accuracy of the prediction. This is of great significance for formulating energy management strategies and optimizing energy use.
[0062] S2. Collect data from each local terminal and perform preprocessing to obtain respective training data, and divide the training data into a training set and a test set.
[0063] The preprocessing includes abnormal data processing, missing data processing and data normalization. In this way, the technical contents such as abnormal data processing, missing data processing and data normalization in the preprocessing stage have significant effects on improving data quality, reducing model errors, avoiding misleading decisions, improving data availability and accelerating model training. These preprocessing steps are an indispensable and important part of machine learning projects and are crucial to ensuring the accuracy and reliability of the model.
[0064] In specific implementation, abnormal data processing includes: treating abnormal data as missing values.
[0065] Missing data processing includes: if the importance value of the missing data in the model is less than the preset value, and the missing probability is greater than the preset threshold, it will be directly eliminated; if the importance value of the missing data in the model is less than the preset value, but the missing probability is less than or equal to the preset threshold, the missing item will be replaced by the average value of the upper and lower rows of the cell where the missing data is located; if the importance value of the missing data in the model is greater than the preset value, the Lagrange polynomial interpolation method will be used to supplement the missing data. In order to better understand the Lagrange polynomial interpolation method, the following explanation is given.
[0066] Assume that a set of n+1 energy consumption training data is (x0, y0), (x1, y1)…, (x n ,y n ), use the n-order Lagrange interpolation formula for the training set data, and fill in the missing data of prefabricated component production energy consumption according to the deformed formula. After the missing data is filled, a relatively complete data matrix can be obtained;
[0067] The data repair method is as follows:
[0068]
[0069] Where, L n (x) is the Lagrange interpolation polynomial, I i (x) is the interpolation basis function.
[0070] In this way, by treating abnormal data as missing values and taking different processing strategies according to the importance and loss probability of missing data in the model, the quality and availability of data are effectively improved, thereby optimizing the performance of the model. These strategies have extensive value and significance in practical applications.
[0071] Data normalization uses the Min-Max normalization method to linearly map the collected data into values between 0 and 1; the processing formula is as follows:
[0072] x *=(x i -x min ) / (x max -x min );
[0073] In the formula, x* is the preprocessed data, x i is the collected original data, x min is the minimum value of the collected original data, x max It is the maximum value of the original data collected.
[0074] This setting uses the Min-Max normalization method to linearly map the collected data to values between 0 and 1, which can effectively unify the data scale, improve model performance, enhance model robustness, facilitate feature comparison, and improve model interpretability. These effects together provide a solid foundation for subsequent machine learning model training and prediction.
[0075] S3. Each local terminal uses its own training set to train the energy consumption prediction model and update the local model parameters.
[0076] S4. The local end sends the local model parameters to the cloud.
[0077] S5. After receiving the local model parameters of each local terminal, the cloud side processes them according to a preset method to obtain the global model parameters and sends them to each local terminal that sent the local model parameters.
[0078] The local end sends the local model parameters to the cloud through a preset secure encryption method; the cloud sends the global model parameters to the local end through a preset secure encryption method. In this way, the local end and the cloud transmit local model parameters and global model parameters through a preset secure encryption method, which can significantly enhance data security, improve communication reliability, ensure compliance, enhance system trust, and promote the widespread application of federated learning. It provides a solid security guarantee for the energy consumption control optimization method based on federated learning and neural networks.
[0079] In specific implementation, when processing local model parameters, the preset method includes: calculating the weights of the local model parameters of each local terminal according to the amount of training data of each local terminal, and then using the federal averaging algorithm to perform weighted averaging calculation on the model parameters of each local terminal to obtain global model parameters.
[0080] In this way, the reasonable matching of data volume and model parameter weight is balanced. By calculating the weight of local model parameters according to the amount of training data of each local terminal, the reasonable matching of data volume and model parameters in the global model update is ensured. This method fully considers the impact of data volume differences on model parameters, so that the global model can more accurately reflect the data characteristics of all local terminals. In addition, the federated average algorithm is used to perform weighted average calculation of the model parameters of each local terminal, which can integrate the learning results of each local terminal to obtain a more representative global model. This method avoids the impact of single local terminal data deviation on the global model and improves the generalization ability and accuracy of the global model. In addition, by considering the amount of training data of each local terminal to allocate weights and using weighted average to calculate the global model parameters, this method enhances the fairness and reliability of the system. The data contribution of each local terminal is reasonably reflected, making the global model more robust and better able to adapt to the energy consumption prediction needs in different scenarios. In addition, since the difference in data volume is taken into account, excessive calculations on local terminals with smaller data volumes are avoided, thereby reducing unnecessary computing resource consumption. At the same time, the weighted average method also makes the update of the global model smoother and reduces the fluctuation of model parameters.
[0081] S6. The local end uses the received global model parameters to update the model parameter configuration of its energy consumption prediction model to obtain an updated energy consumption prediction model; then the local end uses its own test set to test the accuracy of the updated energy consumption prediction model; if the test passes, the updated energy consumption prediction model is used to predict local electricity consumption, and combined with the intelligent control strategy to coordinate the energy consumption of university lights and optimize the lighting mode (for example, the number and position of lights turned on are determined according to the number of people in the room and the indoor light intensity, so as to achieve lean management of energy consumption.). If the test fails, the local end uses its own training set to conduct a new round of training on the updated energy consumption prediction model, and goes to S4 to send the new round of updated local model parameters to the cloud, perform a new round of global model parameter updates, and repeat the subsequent steps until the preset termination conditions are met.
[0082] Among them, the preset termination condition is that the number of local ends that failed the test is 1 or 0; if there is only 1 local end that failed the test, the local end uses its own training set to conduct a new round of training on the updated energy consumption prediction model, and then directly uses the energy consumption prediction model after the new round of training to predict lighting power consumption, and combines it with the intelligent control strategy to coordinate the control of university lighting energy consumption and optimize the lighting mode.
[0083] In this way, the model update situation can be flexibly responded to. According to the new preset termination condition, that is, when the number of local terminals that failed the test is 1 or 0, the system can flexibly respond to different model update situations. When only one local terminal model fails the test, the local terminal will directly apply a new round of training without updating and iterating the global model parameters, which reduces unnecessary waiting time and computing resource consumption. In addition, fast response and local optimization can be achieved. For the only local terminal that failed the test, the energy consumption prediction model after the new round of training is directly used to predict the lighting power consumption, and the intelligent control strategy is combined to coordinate the energy consumption of university lights and optimize the lighting mode. This fast response mechanism enables the local terminal to quickly adjust its energy consumption management strategy and achieve local optimization without waiting for the global model to be updated. In addition, the system robustness can also be enhanced. The technical content also reflects the system's tolerance for abnormal situations. Even if a local terminal model fails to pass the test, the system can ensure that the energy consumption management strategy of the local terminal is still effective through local optimization, thereby enhancing the robustness of the entire system.
[0084] In specific implementation, the local end that failed the test will use its own training set to conduct a new round of training on the updated energy consumption prediction model, and then use its own test set to conduct an accuracy test on the new round of updated energy consumption prediction model. If it passes the test, the updated energy consumption prediction model will be used to perform local power consumption forecasts, and termination update information will be generated locally. After the local end receives the global model parameters sent by the cloud, if the local end has termination update information, the model parameter configuration of its energy consumption prediction model will no longer be updated and accuracy tested.
[0085] In this way, for the local end that failed the test, a new round of training is performed on the updated energy consumption prediction model by using its own training set again, and then the accuracy is tested with the test set, forming a closed loop of model optimization and verification. This closed loop ensures that the model can gradually improve its prediction ability after multiple iterations until it reaches the preset accuracy standard. In addition, unnecessary computing resource consumption can be reduced. When the local end passes the test and generates the termination update information, if it receives the global model parameters sent by the cloud again, it will no longer update the model parameter configuration and perform accuracy testing. This mechanism avoids unnecessary repeated training and testing when the model is already accurate enough, thereby reducing the consumption of computing resources. In addition, by introducing the mechanism of terminating the update information, the system can more quickly identify the model that has met the requirements and stop further training and testing. This helps to improve the efficiency and response speed of the entire system, so that the energy consumption control optimization model can be applied to actual scenarios more quickly.
[0086] This method effectively avoids the direct leakage of original data and protects the data privacy of colleges and universities by setting up local terminals in each college and university and performing data collection and preliminary processing on the local terminal. The cloud only receives and processes the model parameters trained by the local terminal, rather than directly processing the original data, which further enhances the security of the data. In addition, this method can improve the efficiency of model training. This method allows the local terminals of each college to train models in parallel, making full use of distributed computing resources and significantly improving the efficiency of model training. The cloud is responsible for summarizing and updating the global model parameters, reducing the training time of a single local terminal and ensuring the continuous optimization of the global model. In addition, through multiple iterative training and global model updates, the energy consumption prediction model can continuously absorb the data characteristics of each college and university, and improve the generalization ability and prediction accuracy of the model. The local terminal uses the test set to test the accuracy of the updated model to ensure the reliability of the model in practical applications. In summary, this method can improve the training efficiency and prediction accuracy of the energy consumption control optimization model while protecting data privacy. Based on the accurate energy consumption prediction results, colleges and universities can formulate more scientific intelligent control strategies to achieve coordinated control of lighting energy consumption. The optimized lighting mode not only reduces energy consumption, but also improves user comfort and satisfaction.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. An energy consumption control optimization method based on federated learning and neural network, characterized in that: The following steps are involved: S1. Set up local terminals in each university; build an energy consumption prediction model and configure initial parameters, and then configure it in the cloud and local terminals; the energy consumption prediction model is used to predict electricity consumption using historical related data; S2, collect data through each local terminal and perform preprocessing to obtain respective training data, and divide the training data into a training set and a test set; S3, each local terminal uses its own training set to train the energy consumption prediction model and update the local model parameters; S4, the local end sends the local model parameters to the cloud; S5. After receiving the local model parameters of each local terminal, the cloud processes them according to a preset method to obtain the global model parameters and sends them to each local terminal that sent the local model parameters; S6. The local end updates the model parameter configuration of its energy consumption prediction model using the received global model parameters to obtain an updated energy consumption prediction model; and then uses the local end's own test set to test the accuracy of the updated energy consumption prediction model; If the test passes, the updated energy consumption prediction model is used to predict local electricity consumption, and the intelligent control strategy is combined to coordinate the control of university lighting energy consumption and optimize the lighting mode; if the test fails, the local end uses its own training set to conduct a new round of training on the updated energy consumption prediction model, and goes to S4 to send the new round of updated local model parameters to the cloud, perform a new round of global model parameter updates, and repeat the subsequent steps until the preset termination conditions are met.
2. The energy consumption control optimization method based on federated learning and neural network according to claim 1, characterized in that: In S6, the local end that failed the test uses its own training set to perform a new round of training on the updated energy consumption prediction model, and then uses its own test set to test the accuracy of the new round of updated energy consumption prediction model again. If the test is passed, the updated energy consumption prediction model is used to perform local power consumption prediction, and termination update information is generated locally; After the local end receives the global model parameters sent by the cloud, if there is termination update information on the local end, the model parameter configuration update and accuracy test of its energy consumption prediction model will no longer be performed.
3. The energy consumption control optimization method based on federated learning and neural network according to claim 1, characterized in that: In S6, the preset termination condition is that the number of local terminals that failed the test is 1 or 0; If there is only one local end that fails the test, the local end will use its own training set to conduct a new round of training on the updated energy consumption prediction model, and directly use the energy consumption prediction model after the new round of training to predict lighting power consumption, and combine it with the intelligent control strategy to coordinate the control of university lighting energy consumption and optimize the lighting mode.
4. The energy consumption control optimization method based on federated learning and neural network according to claim 1, characterized in that: In S5, when processing the local model parameters, the preset method includes: calculating the weights of the local model parameters of each local terminal according to the amount of training data of each local terminal, and then using the federal averaging algorithm to perform weighted averaging calculation on the model parameters of each local terminal to obtain the global model parameters.
5. The energy consumption control optimization method based on federated learning and neural network according to claim 1, characterized in that: The energy consumption prediction model is an intelligent prediction model based on long short-term memory neural network.
6. The energy consumption control optimization method based on federated learning and neural network according to claim 5, characterized in that: In S2, the preprocessing includes abnormal data processing, missing data processing and data normalization.
7. The energy consumption control optimization method based on federated learning and neural network according to claim 6, characterized in that: The abnormal data processing includes: treating the abnormal data as missing values; The missing data processing includes: if the importance value of the missing data in the model is less than the preset value, and the loss probability is greater than the preset threshold, then it is directly eliminated; if the importance value of the missing data in the model is less than the preset value, but the loss probability is less than or equal to the preset threshold, the missing item is replaced by the average value of the upper and lower rows of the cell where the missing data is located; if the importance value of the missing data in the model is greater than the preset value, the Lagrange polynomial interpolation method is used to supplement the missing data.
8. The energy consumption control optimization method based on federated learning and neural network according to claim 6, characterized in that: The data normalization adopts the Min-Max normalization method to linearly map the collected data into a value in the range of 0 to 1; the processing formula is as follows: x * =(x i -x min ) / (x max -x min ); In the formula, x* is the preprocessed data, x i is the collected original data, x min is the minimum value of the collected original data, x max It is the maximum value of the original data collected.
9. The energy consumption control optimization method based on federated learning and neural network according to claim 1, characterized in that: In S4, the local end sends the local model parameters to the cloud through a preset secure encryption method; In S5, the cloud sends the global model parameters to the local end through a preset secure encryption method.
10. The energy consumption control optimization method based on federated learning and neural network according to claim 1, characterized in that: The historical relevant data includes the number of people, energy usage data, natural light intensity and light lumens.
Citation Information
Cited By
Dual-mode communication optimization method
CN120434700A