Energy consumption intelligent optimization method and system for IoT scene
By designing a multi-module partitioned IoT energy consumption intelligent optimization system, using improved Bayesian algorithms and data cleaning technology, the problems of low scalability of IoT equipment energy consumption optimization and slow convergence speed are solved, and efficient and accurate energy consumption tuning is achieved, reducing operating costs and carbon emissions.
Patent Information
- Application Number
- CN202311482015.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2025-05-09
AI Technical Summary
Existing IoT devices have problems such as low scalability, inaccurate energy consumption measurement and slow convergence of parameter optimization in terms of energy consumption tuning, which is difficult to meet the needs of IoT device resource constraints and large-scale deployment.
An intelligent energy consumption optimization method and system for IoT scenarios was designed, and the coupling degree was reduced through multi-module division, and the improved Bayesian algorithm was used to achieve automatic tuning of system parameters, and the scalability and accuracy of the system were improved through data cleaning and iterating the parameter configuration library.
It realizes the ease of use, effectiveness, accuracy and scalability of the IoT energy consumption tuning system, reduces the energy consumption of equipment, extends the life of equipment, reduces operating costs, and reduces carbon emissions.
Smart Images

Figure CN119966821A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer software technology, and in particular to an intelligent energy consumption optimization method and system for IoT scenarios. Background Art
[0002] With the development of IoT technology, the use of IoT devices has increased year by year. As of 2019, the number of connected IoT devices in the world reached 11 billion; IoT Analytics predicts that the number of IoT devices in the world will reach 12.3 billion active terminals in 2021; by 2022, global IoT-related spending is expected to exceed US$1 trillion, with hardware accounting for 35% of the IoT market; by 2025, there may be more than 27 billion active IoT terminals. China is a major country in global manufacturing and industrial development. Data shows that the scale of China's industrial IoT market exceeded 600 billion yuan in 2019, and the scale of China's industrial IoT market will reach 700 billion yuan in 2020. As industrial policies are gradually implemented, the market space is expected to accelerate. While the use of IoT devices is growing rapidly, it brings huge energy consumption pressure. Carbon emissions of IoT devices in the use stage account for about 80%-95% of the overall life cycle, so energy-saving technologies should be used to reduce carbon emissions.
[0003] The development and application of IoT technology brings many benefits: (1) Obtaining data through sensors improves the system's optimization and decision-making capabilities. (2) Improving event tracking and event monitoring capabilities. (3) Improving task automation capabilities and work efficiency. As the coverage and quality of IoT services continue to improve, the IoT is expected to promote revolutionary development in many traditional industries, including agriculture, retail, transportation, etc.
[0004] Despite the huge application potential and market demand, the existing IoT network still has some drawbacks, and the challenge of energy consumption restricts its further development. IoT devices must run continuously for a long time without charging, so the energy consumption tuning of IoT devices is of great significance: (1) Extending the life of the device: IoT devices usually need to run for a long time and are not easy to replace or repair. Optimizing energy consumption can reduce the load and wear of the equipment, extend the life of the equipment, and reduce the cost of repair and replacement. (2) Improving system performance: Optimizing energy consumption can make the IoT system work more efficiently. Reducing energy consumption can reduce the operating temperature of the equipment, improve the stability and reliability of the system, and reduce the possibility of failure. (3) Reducing operating costs: Energy consumption tuning of the IoT system can help enterprises reduce energy expenses and operating costs. (4) Saving energy and protecting the environment: Energy consumption is one of the main factors leading to environmental problems. Energy consumption tuning of the IoT can reduce excessive energy consumption, reduce greenhouse gas emissions, help protect the environment and respond to climate change, achieve efficient use of energy, contribute to sustainable development, and meet the requirements of government laws and regulations on green IT.
[0005] The main research directions in the field of IoT energy consumption optimization include: (1) Optimizing sleep and wake-up: Many IoT devices are in standby mode for a long time. Optimizing standby power consumption and wake-up power consumption can reduce IoT energy consumption. (2) Optimizing IoT network transmission: The IoT is a network that connects various physical devices, sensors and other objects to realize the functions of collecting, exchanging, sharing and processing data. Therefore, energy consumption can be reduced by optimizing network transmission. As the scale of the IoT gradually grows, the huge data traffic increasingly requires more efficient network transmission methods. (3) Optimizing IoT task scheduling: With the continuous development of cloud computing and edge computing, the entry of IoT devices into the cloud can effectively solve the problem of limited resources of IoT devices, but at the same time it increases task scheduling time and data transmission costs. Therefore, a good task scheduling strategy becomes particularly important, which can balance energy consumption and task response time to a certain extent.
[0006] Physical devices are the main carriers of the Internet of Things, so tuning the system parameters of physical devices can reduce the energy consumption of the Internet of Things. On the one hand, the target carriers of existing tuning systems are resource-rich servers or specific application loads for special business scenarios. They are not suitable for use on resource-constrained Internet of Things devices and cannot meet the special scenario requirements of the Internet of Things. On the other hand, the current field of Internet of Things energy consumption tuning lacks research and practice on automatic tuning of physical device system parameters. Therefore, in the Internet of Things scenario, when using artificial intelligence algorithms to automatically tune system parameters and optimize performance indicators such as energy consumption, the main challenges faced are three points: (1) How to improve the scalability of the tuning system and reduce coupling. (2) How to ensure the accuracy and stability of energy consumption measurement. (3) How to improve the accuracy and convergence speed of parameter optimization. Summary of the invention
[0007] In order to solve the above challenges, the present invention discloses an intelligent energy consumption optimization method and system for IoT scenarios, which ensures the usability, effectiveness, accuracy and scalability of the IoT energy consumption optimization system.
[0008] An intelligent energy consumption optimization method for IoT scenarios is applied to a main control module, and the method includes:
[0009] Select iteration parameters based on their impact on system energy consumption;
[0010] Send the last round of recommended values of the iteration parameters to the development board modules deployed on each IoT device, so that the development board modules complete the local load test according to the last round of recommended values;
[0011] According to the start timestamp and end timestamp of the development board module running the Benchmark, the energy consumption is intercepted from the array of the energy consumption measurement module to obtain the energy consumption result of this round; wherein the energy consumption intercepted from the array of the energy consumption measurement module is obtained based on the local load test of each IoT device;
[0012] The energy consumption result of this round is sent to the AI engine module, so that the AI engine module selects the recommended value of the iteration parameter of this round based on the energy consumption result of this round.
[0013] Furthermore, the selection of iteration parameters based on the impact on system energy consumption includes:
[0014] By constructing a set of functional relationships between parameters and system energy consumption, a Lasso regression model is generated;
[0015] Reset all parameter weights to zero;
[0016] Gradually relax the restrictions on parameter selection by reducing the penalty, and refit the Lasso regression model after each reduction in the penalty, and record the list of parameters added to the Lasso regression model;
[0017] Iteration parameters are chosen based on the order in which they first appear in the Lasso regression model.
[0018] Furthermore, the energy consumption is intercepted from the array of the energy consumption measurement module according to the start timestamp and end timestamp of the development board module running the Benchmark to obtain the energy consumption result of this round, including:
[0019] According to the start timestamp and end timestamp of the development board module running the Benchmark, the energy consumption is intercepted from the array of the energy consumption measurement module to obtain the new energy consumption;
[0020] When the difference between the new energy consumption and the benchmark energy consumption is less than a first set threshold, the new energy consumption is used as the energy consumption result of this round; wherein the benchmark energy consumption is obtained based on a default parameter value of an iteration parameter;
[0021] When the difference between the new energy consumption and the benchmark energy consumption is greater than a first set threshold, the new energy consumption is assigned to the old energy consumption, and according to the start timestamp and end timestamp of the development board module running the Benchmark, a second energy consumption interception is performed from the array of the energy consumption measurement module, and then assigned to the new energy consumption;
[0022] When the difference between the new energy consumption and the old energy consumption is greater than the second set threshold, the second intercepted energy consumption is assigned to the old energy consumption, and the start timestamp and end timestamp of running the Benchmark according to the development board module are returned. After the second energy consumption is intercepted from the array of the energy consumption measurement module, it is assigned to the new energy consumption;
[0023] When the difference between the new energy consumption and the old energy consumption is less than the second set threshold, the second intercepted energy consumption is used as the energy consumption result of this round.
[0024] Furthermore, when acquiring the benchmark energy consumption, at least one repeated experiment on the second set threshold is completed.
[0025] Furthermore, the AI engine module selects the current round recommended value of the iteration parameter based on the current round energy consumption result, including:
[0026] According to the energy consumption results of this round, calculate the expected value μ(x) and standard deviation σ(x) of each candidate solution point x;
[0027] Calculate the current optimal value f_best of each candidate solution point x;
[0028] Based on the expected value μ(x), standard deviation σ(x) and current optimal value f_best of each candidate solution point x, calculate the expected improvement value EI(x) of each candidate solution point x;
[0029] The candidate solution point with the maximum expected improvement value is selected as the recommended value of the iteration parameter in this round.
[0030] Furthermore, the expected improvement value where Φ is the cumulative distribution function of the standard normal distribution, It is the probability density function of the standard normal distribution, and the conversion value Z = (μ(x)-f_best) / σ(x).
[0031] Furthermore, the main control module is also used for:
[0032] Before the tuning task starts, the parameter values and timestamps of the development board module are stored in the specified file of the system;
[0033] When parameter callback is required, the parameter value is read from the specified file and set to complete the parameter callback.
[0034] An energy consumption intelligent optimization system for IoT scenarios, the system comprising:
[0035] The main control module is used to select iteration parameters based on the impact on system energy consumption; send the previous round of recommended values of iteration parameters to the development board modules deployed on each IoT device; intercept energy consumption from the array of the energy consumption measurement module according to the start timestamp and end timestamp of the development board module running the Benchmark to obtain the energy consumption results of this round; send the energy consumption results of this round to the AI engine module;
[0036] Development board module, used to complete local load testing based on the previous round of recommended values;
[0037] An energy consumption measurement module, used for generating energy consumption in an array of energy consumption measurement modules based on a local load test of each IoT device;
[0038] The AI engine module is used to select the recommended value of the iteration parameter for this round based on the energy consumption result of this round.
[0039] A computer device comprises: a processor, and a memory storing computer program instructions; when the processor executes the computer program instructions, any of the above-mentioned energy consumption intelligent optimization methods for IoT scenarios is implemented.
[0040] A computer-readable storage medium having computer program instructions stored thereon, characterized in that when the computer program instructions are executed by a processor, any of the above-mentioned intelligent energy consumption optimization methods for IoT scenarios is implemented.
[0041] Compared with the prior art, the present invention reduces the coupling degree by dividing the system into multiple modules, so that the tuning system has the ability of distributed deployment and supports cluster tuning; performs data cleaning on energy consumption measurement values to eliminate the influence of energy consumption data measurement errors on the accuracy of energy consumption optimization; uses an improved Bayesian algorithm to achieve automatic tuning of system parameters; and continuously iterates the parameter configuration library to lower the user's usage threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flow chart of an intelligent energy consumption optimization system for IoT scenarios.
[0043] Figure 2 Data preprocessing flow chart. DETAILED DESCRIPTION
[0044] The present invention is further described below by way of examples, but the scope of the present invention is not limited in any way.
[0045] The three main challenges of the present invention are: (1) How to improve the scalability of the tuning system and reduce coupling. (2) How to ensure the accuracy and stability of energy consumption measurement. (3) How to improve the accuracy and convergence speed of parameter optimization. In response to the above three challenges, the present invention mainly implements three aspects, namely system architecture design, data preprocessing, and parameter optimization algorithm.
[0046] The first aspect is system architecture design.
[0047] The present invention designs and implements an automatic tuning system IoTune based on artificial intelligence algorithm in the energy consumption optimization scenario of IoT. There are two main factors affecting the system architecture design: (1) Since the computing, storage and other resources of IoT devices are limited, the system modules deployed on the development board must be lightweight. (2) The system must have good scalability and support cluster tuning.
[0048] In view of the above two factors, the IoTune system is divided into four modules, such as Figure 1 As shown: IoTuned (main control module), IoTune_engine (AI engine module), IoTune_bench (energy consumption measurement module), IoTune_apply (development board module). The main control module consists of the user command line CLI and the control module daemon. The control module responds to the user command line request and acts as a control center to interact with the other three modules. The main control module provides two services: parameter callback and iterative tuning. The tuning service first uses the important parameter selection algorithm to perform parameter tailoring and selects parameters that have a greater impact on system energy consumption, including system parameters and application parameters; then uses the default parameters to assign values to the load module and completes the benchmark test to obtain the benchmark energy consumption; then enters the business logic of iterative tuning, and the main control module returns the energy consumption results of the previous iteration to the AI engine module to complete the historical data update. When the AI engine module is initialized, it will collect sample points and train the agent model according to the initialization strategy, and then select a new round of recommended parameters according to the sampling strategy and return them to the main control module; the main control module starts the energy consumption measurement module to start measuring the energy consumption of the device, and uses the new parameters to assign values to the development board module and complete the iterative test; until the system completes the iteration round, the AI engine module returns the optimal parameters.
[0049] Among them, when selecting parameters that have a greater impact on system energy consumption, Lasso is used for feature selection to achieve parameter pruning. A set of functional relationships between configuration items and evaluation indicators is constructed to identify important configuration items. The algorithm starts with a higher penalty setting, all configuration item weights are reset to zero, and then the penalty is reduced in smaller increments, gradually relaxing the selection restrictions on features. After each reduction in the penalty parameter, the Lasso regression model is refitted, and which features are added to the regression model are tracked at each step. The order in which the configuration items first appear in the regression model is used to determine the importance ranking.
[0050] The task of the development board module is to receive new parameters and complete the load test. The energy consumption results are stored in the energy consumption measurement module by converting the timestamp into an array. According to the start and end timestamps of the development board module running the Benchmark, the energy consumption is intercepted from the array of the energy consumption measurement module. In the IoTune system, only the development board module is deployed on the IoT device, and all algorithm tasks that consume a lot of computing resources are deployed in the AI engine module with sufficient resources to ensure the lightweight of the development board module. Among them, Benchmark is a recognized and standardized benchmark test, such as testing sqlite using YCSB or the test script that comes with sqlite.
[0051] The IoTune system supports cluster tuning, which is achieved through IP division and parameter filtering in the tuning tasks of the main control module. The except field in the YAML configuration file can be used to prohibit specified IoT devices from adjusting specified parameters, so that different cluster nodes can adjust different parameters at the same time, or different cluster nodes can adjust the same parameters at the same time but with different results.
[0052] The parameter callback function implemented by the main control module can restore the parameter settings of the development board to the state before tuning. This is achieved by storing the parameter values of the development board with timestamps in the specified file of the system before the tuning task starts. Subsequent callbacks only need to read the parameter values from the file and set them to complete the parameter callback.
[0053] The second part is data preprocessing.
[0054] The main target of data cleaning in the present invention is the error data of energy consumption measurement. Because the present invention uses an energy consumption tester to directly measure the energy consumption data of IoT devices, there may be problems with inaccurate energy consumption measurement data due to poor line contact, unstable voltage, or increased temperature of physical equipment. The method of data preprocessing is threshold plus repeated experiments. There are two places where data preprocessing is needed during system tuning. The first is when measuring the baseline energy consumption, because in the whole process of system tuning, the energy consumption value of each round of iterative measurement is compared with the baseline energy consumption. If the baseline energy consumption is an abnormal value, then all subsequent iterative measurements are meaningless, so it is necessary to ensure that the baseline energy consumption is an accurate value; the second is when iterative energy consumption is measured. If the energy consumption measurement data is inaccurate, it will greatly affect the tuning results of Bayesian optimization.
[0055] Data preprocessing methods such as Figure 2 As shown. During iterative tuning, if the difference between the new energy consumption and the baseline energy consumption exceeds the percentage threshold, the system marks the new energy consumption as the energy consumption to be verified and assigns the new energy consumption to the old energy consumption. Then, the energy consumption is measured repeatedly under the same parameter conditions. If the difference between the new energy consumption and the old energy consumption is less than the percentage threshold, the measured energy consumption value is considered correct, and the new energy consumption value is returned; at least one repeated experiment must be performed during the baseline energy consumption test.
[0056] Part III, parameter optimization algorithm.
[0057] Select the improved Bayesian optimization algorithm, and select the default value plus random value strategy for the initialization strategy. The purpose is to improve the lower limit of the tuning effect. The worst tuning effect is the default initial value. In order to improve convergence and convergence speed, choose to use the expected improvement (EI) sampling method, because the EI sampling function can balance exploration and development while considering the value and uncertainty of the objective function. The calculation steps of the EI sampling function are as follows:
[0058] (1) Based on the current proxy plane, calculate the expected value and standard deviation of each candidate solution point.
[0059] (2) Calculate the current optimal value of each candidate solution point (the optimal value currently observed).
[0060] (3) Calculate the expected improvement of each candidate solution point, which represents the possible improvement value of the point based on the current optimal value. The calculation formula of EI is as follows:
[0061]
[0062] Among them, μ(x) is the expected value of the candidate solution point x, f_best is the current optimal value, σ(x) is the standard deviation of the candidate solution point x, Φ(Z) and are the cumulative distribution function and probability density function of the standard normal distribution, respectively, and Z is a transformation value defined as (μ(x)-f_best) / σ(x).
[0063] (4) Select the candidate solution point with the maximum expected improvement value as the sampling point for the next step.
[0064] Next, we will take the use of YCSB to tune SQLite as an example to illustrate the energy consumption intelligent optimization method provided by the present invention. SQLite is a lightweight relational database widely used in IoT scenarios, and YCSB is a database testing tool. The implementation steps are as follows:
[0065] (1) Correctly configure YCSB and SQLite, write specific Benchmark files, and deploy different stress test scenarios (based on the database read-write ratio).
[0066] (2) Customize tuning parameters or let the system select tuning parameters based on load scenarios, and filter out parameters that have little impact on energy consumption through important parameter selection algorithms;
[0067] (3) Generate a YAML configuration file based on the selected parameters to be tuned;
[0068] (4) The main control module parses the tuning configuration parameter information of the YAML configuration file;
[0069] (5) The main control module controls the energy consumption measurement module to start energy consumption measurement;
[0070] (6) Set the parameters of the development board module and run the written Benchmark;
[0071] (7) The main control module intercepts the energy consumption value of this Benchmark from the energy consumption measurement module and performs data cleaning;
[0072] (8) Update the energy consumption value of this round of iteration to the AI engine module and calculate the recommended parameter values for the new round;
[0073] (9) After all tuning iterations are completed, the optimal parameter values are set to the development board module;
[0074] (10) Finally, the tuning parameter database is updated according to the load scenario.
[0075] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the present disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof.
Claims
1. An intelligent energy consumption optimization method for IoT scenarios, applied to a main control module, characterized in that: The method comprises: selecting an iteration parameter according to the influence on the energy consumption of the system; Send the last round of recommended values of the iteration parameters to the development board modules deployed on each IoT device, so that the development board modules complete the local load test according to the last round of recommended values; According to the start timestamp and end timestamp of the development board module running the Benchmark, the energy consumption is intercepted from the array of the energy consumption measurement module to obtain the energy consumption result of this round; wherein the energy consumption intercepted from the array of the energy consumption measurement module is obtained based on the local load test of each IoT device; The energy consumption result of this round is sent to the AI engine module, so that the AI engine module selects the recommended value of the iteration parameter of this round based on the energy consumption result of this round.
2. The method according to claim 1, characterized in that The iteration parameters are selected based on the influence on the system energy consumption, including: By constructing a set of functional relationships between parameters and system energy consumption, a Lasso regression model is generated; Reset all parameter weights to zero; Gradually relax the restrictions on parameter selection by reducing the penalty, and refit the Lasso regression model after each reduction in the penalty, and record the list of parameters added to the Lasso regression model; Iteration parameters are chosen based on the order in which they first appear in the Lasso regression model.
3. The method according to claim 1, characterized in that According to the start timestamp and end timestamp of the development board module running the Benchmark, the energy consumption is intercepted from the array of the energy consumption measurement module to obtain the energy consumption result of this round, including: According to the start timestamp and end timestamp of the development board module running the Benchmark, the energy consumption is intercepted from the array of the energy consumption measurement module to obtain the new energy consumption; When the difference between the new energy consumption and the benchmark energy consumption is less than a first set threshold, the new energy consumption is used as the energy consumption result of this round; wherein the benchmark energy consumption is obtained based on a default parameter value of an iteration parameter; When the difference between the new energy consumption and the benchmark energy consumption is greater than a first set threshold, the new energy consumption is assigned to the old energy consumption, and according to the start timestamp and end timestamp of the development board module running the Benchmark, a second energy consumption interception is performed from the array of the energy consumption measurement module, and then assigned to the new energy consumption; When the difference between the new energy consumption and the old energy consumption is greater than the second set threshold, the second intercepted energy consumption is assigned to the old energy consumption, and the start timestamp and end timestamp of running the Benchmark according to the development board module are returned. After the second energy consumption is intercepted from the array of the energy consumption measurement module, it is assigned to the new energy consumption; When the difference between the new energy consumption and the old energy consumption is less than the second set threshold, the second intercepted energy consumption is used as the energy consumption result of this round.
4. The method according to claim 3, characterized in that When acquiring the benchmark energy consumption, at least one repeated experiment on the second set threshold is completed.
5. The method according to claim 1, characterized in that The AI engine module selects the current round recommended value of the iteration parameter based on the current round energy consumption result, including: According to the energy consumption results of this round, calculate the expected value μ(x) and standard deviation σ(x) of each candidate solution point x; Calculate the current optimal value f_best of each candidate solution point x; Based on the expected value μ(x), standard deviation σ(x) and current optimal value f_best of each candidate solution point x, calculate the expected improvement value EI(x) of each candidate solution point x; The candidate solution point with the maximum expected improvement value is selected as the recommended value of the iteration parameter in this round.
6. The method according to claim 5, characterized in that The expected improvement where Φ is the cumulative distribution function of the standard normal distribution, It is the probability density function of the standard normal distribution, and the conversion value Z = (μ(x)-f_best) / σ(x).
7. The method according to any one of claims 1 to 6, characterized in that: The main control module is also used for: Before the tuning task starts, the parameter values and timestamps of the development board module are stored in the specified file of the system; When parameter callback is required, the parameter value is read from the specified file and set to complete the parameter callback.
8. An intelligent energy consumption optimization system for IoT scenarios, characterized in that: The system comprises: The main control module is used to select iteration parameters based on the impact on system energy consumption; send the previous round of recommended values of iteration parameters to the development board modules deployed on each IoT device; intercept energy consumption from the array of the energy consumption measurement module according to the start timestamp and end timestamp of the development board module running the Benchmark to obtain the energy consumption results of this round; send the energy consumption results of this round to the AI engine module; Development board module, used to complete local load testing based on the previous round of recommended values; An energy consumption measurement module, used for generating energy consumption in an array of energy consumption measurement modules based on a local load test of each IoT device; The AI engine module is used to select the recommended value of the iteration parameter for this round based on the energy consumption result of this round.
9. A computer device, characterized in that: The invention comprises: a processor, and a memory storing computer program instructions; When the processor executes the computer program instructions, the energy consumption intelligent optimization method for IoT scenarios described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the energy consumption intelligent optimization method for IoT scenarios described in any one of claims 1 to 7 is implemented.