Low-power-consumption remote updating method for battery-powered Internet of Things equipment

By performing partition management and real-time status acquisition of battery-powered IoT devices, dynamically adjusting the firmware update area size and charging parameters, the remote update problem of IoT devices under low power consumption is solved, and safe and reliable firmware updates and battery life extension are achieved.

CN120255929APending Publication Date: 2025-07-04LINYI UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510331416.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In resource-constrained battery-powered IoT devices, how to perform secure remote firmware updates at low power consumption, solve the problem of obtaining the latest passwords, clock synchronization and preventing password theft when the device is intermittently offline, while reducing energy consumption to ensure the safe and normal operation of the device.

Method used

The battery is partitioned through hardware switches, and battery status information is collected in real time, firmware update area size is dynamically adjusted, update priority is determined based on battery status information, and charging parameters are adjusted according to battery characteristic curve to achieve power allocation optimization and safe transmission.

Benefits of technology

It significantly reduces the energy consumption of IoT devices, improves the reliability and flexibility of firmware updates, ensures the normal operation of the device and extends battery life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255929A_ABST
    Figure CN120255929A_ABST
Patent Text Reader

Abstract

The invention discloses a low-power-consumption remote updating method for battery-powered Internet of Things equipment, and belongs to the field of battery remote updating, and the method comprises the following steps: partitioning a battery based on a hardware switch to obtain partitioned batteries; collecting and storing battery state information of the partitioned batteries in real time; dynamically adjusting the size of a firmware updating area based on the battery state information of the partitioned battery; determining a firmware update priority based on the updated power consumption estimated by the firmware update area size and the current battery capacity; and performing firmware updating on the equipment based on the firmware updating priority, and adjusting a charging parameter based on a battery characteristic curve in the firmware updating process. The energy consumption of the Internet of Things equipment is remarkably reduced, the reliability and flexibility of firmware updating are improved, meanwhile, the normal operation of the equipment is guaranteed, and the service life of a battery is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of battery-powered Internet of Things device remote updates, and particularly relates to a low-power remote update method for battery-powered Internet of Things devices. Background Art

[0002] In resource-constrained battery-powered Internet of Things devices, remote firmware updates are a crucial yet challenging task. Especially in low-power password authentication scenarios, how to balance security and energy consumption becomes a thorny technical problem.

[0003] Suppose the device is deployed in a remote area and relies on intermittent environmental energy harvesting to operate, such as weak light energy or vibrations. The device's power supply is extremely limited, and any unnecessary energy consumption may cause the device to fail. The server needs to update passwords regularly to ensure security, but transmitting new passwords consumes valuable power. How can we minimize the energy consumption during password transmission while ensuring that passwords are not maliciously stolen?

[0004] First, due to the intermittency and instability of environmental energy harvesting, the device may not be able to stay continuously online when the server pushes new passwords. This may cause the device to miss server updates, resulting in password inconsistencies and ultimately firmware update failures. How can we design a mechanism that enables the device to obtain the latest passwords in a timely manner even when it is intermittently offline?

[0005] Second, even if the device can successfully receive new passwords, due to the limited storage space of the device, storing multiple passwords will increase the device's burden. If only the latest password is stored, it may cause password mismatches when the server verifies the password due to clock drift between the server and the device. How can we design a mechanism to handle clock synchronization between the server and the device with extremely low storage space occupancy and ensure the correctness of password verification?

[0006] Finally, even if the above problems are solved, due to the open transmission channel, attackers may still steal the transmitted passwords by eavesdropping. How can we design a secure password transmission mechanism under extremely low power consumption so that even if the password is stolen, it is difficult for attackers to obtain valid information from it, thereby protecting the security of the device? Therefore, based on the above technical problems, the present invention provides a low-power remote update method for battery-powered Internet of Things devices. Summary of the Invention

[0007] To solve the above technical problems, the present invention proposes a low-power remote update method for battery-powered Internet of Things devices to solve the problems existing in the above prior art.

[0008] To achieve the above object, the present invention provides a low-power remote update method for battery-powered Internet of Things devices, including:

[0009] Partition the battery into partitioned batteries based on a hardware switch;

[0010] Collect and store the battery status information of the partitioned batteries in real time;

[0011] Dynamically adjust the size of the firmware update area based on the battery status information of the partitioned batteries;

[0012] Determine the firmware update priority based on the update power consumption estimated from the size of the firmware update area and the current battery capacity;

[0013] Perform firmware update on the device based on the firmware update priority, and adjust the charging parameters based on the battery characteristic curve during the firmware update process.

[0014] Optionally, the partitioned batteries include a device operation mode, a firmware update mode, and an energy-saving mode;

[0015] When the hardware switch is in the device operation state and the remaining battery power is higher than the preset operation mode power threshold, turn on the device operation mode; the operation mode power threshold is 20%;

[0016] When the hardware switch is in the firmware update state and the remaining battery power is higher than the preset update mode power threshold, turn on the firmware update mode; the update mode power threshold is 30%;

[0017] When the remaining battery power is lower than the preset energy-saving mode power threshold or the battery voltage is lower than the preset voltage threshold, turn on the energy-saving mode; the energy-saving mode power threshold is 10%, and the voltage threshold is 3.6V.

[0018] Optionally, the battery status information includes battery voltage, current, and temperature information.

[0019] Optionally, the process of storing the battery status information includes:

[0020] Preprocess the battery status information to obtain effective battery status data;

[0021] Judge the effective battery status data according to the preset battery voltage, current, and temperature thresholds to determine the current battery operation state;

[0022] Use the Kalman filter algorithm to filter the continuously collected battery status information and the corresponding previous battery operation state to obtain a battery status estimate value;

[0023] Store the effective battery status data and the battery status estimate value in the non-volatile memory of the device to form historical data of the battery operation state.

[0024] Optionally, the process of dynamically adjusting the size of the firmware update area includes:

[0025] Training a linear regression model based on the historical data of the battery operating state to determine the relationship between power consumption and update duration;

[0026] Input the current battery level and the expected update duration into the linear regression model to estimate the power consumption required for the update;

[0027] Adjust the size of the firmware update area according to the power consumption required for the update. At the same time, monitor the update progress and battery level in real time. When the battery runs out during the update process, stop the update in a timely manner and restore the original firmware version.

[0028] Optionally, the expression of the linear regression model for power consumption is: Power consumption = a × Update duration + b;

[0029] Where a and b are the first parameter and the second parameter obtained by fitting through the linear regression algorithm.

[0030] Optionally, the process of determining the firmware update priority includes:

[0031] Obtain the estimated update power consumption based on the size of the firmware update area;

[0032] If the current battery level is sufficient to support the estimated update power consumption, perform a full firmware update first;

[0033] If the current battery level is not sufficient to support the estimated update power consumption, update the key modules first.

[0034] Optionally, the process of performing firmware update on the device based on the firmware update priority includes:

[0035] Compare the obtained battery status information with the data in the pre-established battery characteristic database, and find the battery characteristic curve that is closest to the current battery status through the similarity matching algorithm;

[0036] Extract the key parameters related to charge control based on the battery characteristic curve;

[0037] Dynamically adjust the charging current and cut-off voltage during the firmware update process based on the key parameters.

[0038] Compared with the prior art, the present invention has the following advantages and technical effects:

[0039] The low-power remote update method for battery-powered Internet of Things devices provided by the present invention manages the battery in partitions through a hardware switch, achieving the optimization of power allocation for device operation and firmware update. By collecting and storing battery status information in real time, the system can accurately grasp the real-time status of the battery, providing reliable data support for firmware update. The function of dynamically adjusting the size of the firmware update area enables the system to flexibly adjust the storage space allocation according to the actual power and update requirements, effectively utilizing the limited battery resources. In addition, determining the firmware update priority based on the estimated update power consumption of the firmware update area size and the current battery capacity ensures the priority update of key modules, thus guaranteeing that the key functions of the device are not affected. Finally, adjusting the charging parameters according to the battery characteristic curve during the firmware update process not only improves the charging efficiency but also ensures the safety of the battery and extends its service life. Overall, the present invention significantly reduces the energy consumption of Internet of Things devices, improves the reliability and flexibility of firmware update, while ensuring the normal operation of the device and extending the battery life, having important practical value and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which form a part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application. In the drawings:

[0041] Figure 1 It is a flowchart of the low-power remote update method for battery-powered Internet of Things devices according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments may be combined with each other. The following will refer to the accompanying drawings and describe this application in detail with reference to the embodiments.

[0043] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0044] Embodiment 1

[0045] As Figure 1As shown in the figure, in this embodiment, a low-power remote update method for battery-powered Internet of Things devices is provided, including the following steps: partitioning the battery based on a hardware switch to obtain partitioned batteries; collecting and storing the battery status information of the partitioned batteries in real time; dynamically adjusting the size of the firmware update area based on the battery status information of the partitioned batteries; determining the firmware update priority based on the estimated update power consumption of the firmware update area and the current battery capacity; performing firmware update on the device based on the firmware update priority, and adjusting the charging parameters based on the battery characteristic curve during the firmware update process.

[0046] Specifically, it includes: Step 1: The hardware switch divides the total battery capacity into a device normal operation area and a firmware update area, realizing physical isolation between the two areas. When the device is operating normally, the power supply circuit of the firmware update area is disconnected.

[0047] Furthermore, based on the state of the hardware switch, it is determined whether it is the device operation mode or the firmware update mode. If it is the device operation mode, the power supply circuit of the firmware update area is disconnected, and only the device operation area is powered, using the part of the battery capacity divided into the operation area to ensure the normal operation of the device. If it is the firmware update mode, the power supply circuit of the entire battery is connected, and the total capacity is used for firmware update to ensure that there is enough power to support the update process. By controlling the state switch of the hardware switch, physical isolation is achieved, the power supply circuit is dynamically adjusted, and the battery capacity is divided between the two areas. Obtain the current battery power information and operation mode, and judge whether the remaining power meets the requirements of the current mode. If not, a warning prompt is issued. The firmware is updated in a dual-area backup manner, and an available firmware version is always retained during the update process to avoid the problem that the device cannot start due to update failure. A power monitoring mechanism is established to monitor the changes in battery voltage and current in real time, analyze and predict the remaining available time of the battery based on the data, and automatically switch to the energy-saving mode when necessary to extend the device usage time.

[0048] Furthermore, as a specific implementation of this embodiment, the hardware switch acts like a shunt, controlling the flow of battery energy. It has two states: device operation mode and firmware update mode. In the device operation mode, the switch disconnects the power supply circuit of the firmware update area, just like closing a valve, preventing current from flowing to the firmware update area. At this time, only the device operation area can obtain power supply, just like only opening a valve leading to the device operation area, ensuring the normal operation of the device. For example, a 1000mAh battery can be divided into an 800mAh operation area and a 200mAh update area. In the device operation mode, only 800mAh of power is available for the device to use. In the firmware update mode, the hardware switch connects the power supply circuit of the entire battery, just like opening all valves, allowing current to flow to the entire battery area. This means that the entire capacity of the battery, such as the above-mentioned 1000mAh, can be used during the firmware update process, ensuring sufficient power to support the update process and preventing the update process from being interrupted. By toggling the hardware switch, it is possible to switch between the device operation mode and the firmware update mode, achieving dynamic adjustment of the power supply circuit, just like controlling the flow of energy. This physical isolation method can effectively protect the device operation area and prevent accidental power off or incorrect operation during the firmware update process from affecting the device. Obtaining battery power information and operation mode is the key to power management. For example, through a built-in fuel gauge chip, the voltage and current values of the battery can be read, and the remaining battery percentage or remaining available time can be calculated according to a preset algorithm. At the same time, the system can identify the current operation mode (device operation mode or firmware update mode). By comparing the remaining battery power information with the requirements of the operation mode, it can be determined whether the remaining battery power is sufficient. If the current is the device operation mode and the remaining battery power is less than 20%, the system will issue a low battery warning to remind the user to charge in time. If the current is the firmware update mode and the remaining battery power is less than 30%, the system will issue a warning, suggesting that the user connect the power supply before updating to avoid firmware damage caused by power off during the update process. The firmware update adopts a dual-region backup strategy, just like backing up important files, ensuring the safety and reliability of the update process. Specifically, two regions are divided in the flash memory to store the current firmware version and the firmware version to be updated respectively. During the update process, the system writes the firmware version to be updated into the backup region. Only when the new firmware is written successfully and passes the verification, the system will set the backup region as the startup region to complete the firmware update. If the writing of the new firmware fails or the verification fails, the system will continue to start with the original firmware version to avoid the device being "bricked" due to update failure. For example, the device is currently running firmware version A and now needs to be updated to version B. The system will first write the firmware version B into the backup region. After passing the verification, the backup region will be set as the startup region. If the writing of the firmware version B fails, the system will continue to start from the region storing the firmware version A to ensure the normal operation of the device.The power monitoring mechanism is like a precise instrument panel that monitors the battery status in real time. It regularly collects battery voltage and current data and analyzes and predicts the remaining available time of the battery based on this data. For example, by establishing the correspondence between battery voltage and the percentage of remaining power, the current remaining power can be estimated. At the same time, by monitoring the change in current, the power consumption of the device can be judged. If the power consumption is too high and the remaining power is insufficient to support the normal operation of the device, the system will automatically switch to the energy-saving mode, reducing the screen brightness, processor frequency, etc., to extend the usage time of the device. For example, when it is detected that the battery voltage is lower than 3.6V, the system judges that the remaining power is less than 10%, and will automatically reduce the screen brightness and close some unnecessary background programs to extend the device usage time. If the battery voltage continues to drop, the system will prompt the user to charge in time or enter the sleep mode to save power as much as possible.

[0049] Step 2: When the device is operating normally, the built-in battery fuel gauge collects battery voltage, current, and temperature information in real time and stores this information in the non-volatile memory.

[0050] Furthermore, the voltage, current, and temperature information of the battery is collected in real time through the built-in fuel gauge of the device to obtain the real-time status data of the battery. The collected battery voltage, current, and temperature information is preprocessed to remove outliers and noise interference, obtaining effective battery status data. According to the preset battery voltage, current, and temperature thresholds, it is judged whether the currently collected battery status data is within the normal range. If it exceeds the threshold range, the battery is considered to be operating abnormally. The Kalman filter algorithm is used to filter the continuously collected battery status data to eliminate random errors and obtain a smooth battery status estimate value. The preprocessed battery status data and the Kalman filter estimate value are stored together in the non-volatile memory of the device to form a historical record of the battery operating status. The support vector machine algorithm is used to model and train the stored battery historical status data to obtain a prediction model for the battery performance degradation trend. According to the battery performance prediction model, the health status and remaining service life of the battery are judged. If it is lower than the preset threshold, an alarm message indicating that the battery needs maintenance or replacement is sent to the device management system.

[0051] Furthermore, collecting the voltage, current, and temperature information of the battery is the basis for understanding the real-time state of the battery. For example, an in-built analog-to-digital converter (ADC) is used to collect the battery voltage and current values at a certain sampling frequency (e.g., 1 Hz), while a temperature sensor is used to collect the battery temperature. These data reflect the instantaneous operating state of the battery. Preprocessing the collected data is to remove noise and outliers to ensure the validity of the data. As a specific implementation of this embodiment, according to the battery specification, the voltage threshold is set to 3.0V - 4.2V, the current threshold is -1A - 1A (the charging current is positive, and the discharging current is negative), and the temperature threshold is 0°C - 40°C. If the collected voltage is lower than 3.0V or higher than 4.2V, the battery voltage is considered abnormal; if the current exceeds ±1A, the battery current is considered abnormal; if the temperature is lower than 0°C or higher than 40°C, the battery temperature is considered abnormal. These thresholds can be adjusted according to the specific application scenario. Kalman filtering is a commonly used state estimation method that can effectively eliminate random errors and obtain a more accurate battery state estimate. It iteratively updates the battery state by combining the system model and measurement data. As a specific implementation of this embodiment, a simple battery model is established to describe the relationship between the battery voltage, current, and temperature, and then the Kalman filtering algorithm is used to filter the collected data to obtain smooth voltage, current, and temperature estimates. Storing the preprocessed data and Kalman filtering estimates in a non-volatile memory can form a historical record of the battery operating state. As a specific implementation of this embodiment, a Flash memory is used to record the battery voltage, current, temperature, and the corresponding Kalman filtering estimates, and timestamp information is added. These historical data can be used for subsequent battery performance analysis and prediction.

[0052] Step 3: When the firmware update is started, the system reads the historical firmware update power consumption data from the non-volatile memory as a reference.

[0053] Furthermore, according to the instruction to start the firmware update, determine the target version number of this firmware update, and obtain the firmware data corresponding to the target version number. By querying the non-volatile memory, obtain the historical firmware update record that matches the target version number, and read the power consumption data in the record. Use the data normalization algorithm to process the historical power consumption data to obtain the power consumption reference value under a unified dimension. Compare the real-time power consumption data of this firmware update with the reference value. If the real-time data exceeds the preset threshold range of the reference value, it is determined that the power consumption is abnormal. If power consumption abnormality is detected during the update process, trigger the preset frequency reduction strategy to reduce the power consumption by dynamically adjusting the CPU main frequency. Continuously monitor the power consumption data during the update process, and filter the power consumption data through the Kalman filtering algorithm to obtain a smooth power consumption curve. Write the complete power consumption data of this firmware update into the non-volatile memory as the historical reference basis for subsequent firmware updates.

[0054] Furthermore, firmware update is a power-consuming operation. To ensure that the device will not be interrupted due to power exhaustion during the update process, it is necessary to monitor and manage the power consumption during the update. By querying the power consumption data of historical firmware updates, a power consumption reference benchmark can be established for comparison and anomaly detection during the current update. Suppose the device model is A, and the historical records show that the power consumption of the last three firmware updates of device A was 80 mAh, 75 mAh, and 85 mAh respectively. Considering that the firmware versions and update environments for each update may vary slightly, a data normalization algorithm, such as min-max normalization, can be used to map these three data to between 0 and 1. Suppose the target version number for the current update is V2.0. By querying the non-volatile memory, the historical firmware update record matching V2.0 is obtained, and the power consumption data in the record is read. For example, the power consumption for the upgrade from V1.9 to V2.0 is 82 mAh. After normalization, the reference value is (82 - 75) / (85 - 75) = 0.7. After the firmware update starts, the built-in fuel gauge of the device will collect the current information of the battery in real time and calculate the current power consumption. Suppose the real-time power consumption is 100 mA within 1 minute after the update starts. To avoid the influence of instantaneous power consumption fluctuations on the judgment, the Kalman filter algorithm can be used to smooth the power consumption data. The Kalman filter algorithm can predict the power consumption value at the next moment based on historical data and current data, and perform a weighted average on the predicted value and the actual measured value to obtain a more accurate power consumption estimate. As a specific implementation of this embodiment, the power consumption value after Kalman filtering is 95 mA. Comparing the real-time power consumption data with the reference value can determine whether the power consumption during the update is abnormal. Suppose the preset threshold is 0.2, that is, if the real-time power consumption exceeds the reference value by 20%, it is considered abnormal. Since the power consumption corresponding to 0.7 is 82 mAh, converted to mA is approximately 1.37 mA (assuming the update time is 1 hour). The real-time power consumption of 95 mA significantly exceeds the reference value of 1.37 mA and exceeds the preset threshold, so it is judged that the power consumption is abnormal. When power consumption anomaly is detected, a preset frequency reduction strategy can be triggered. As a specific implementation of this embodiment, the CPU main frequency is reduced from 1 GHz to 800 MHz. Reducing the CPU main frequency can effectively reduce the power consumption and prevent the device from being interrupted due to power exhaustion during the update. Continuously monitoring the power consumption data during the update process and performing smoothing processing through the Kalman filter algorithm can obtain a smooth power consumption curve. This curve can reflect the power consumption changes during the entire update process and serve as a historical reference for subsequent firmware updates. Writing the complete power consumption data of this firmware update, including real-time power consumption, power consumption after Kalman filtering, execution status of the frequency reduction strategy, etc. into the non-volatile memory. These data can provide a reference for the power consumption management of subsequent firmware updates. As a specific implementation of this embodiment, the preset threshold can be adjusted according to historical data, or the frequency reduction strategy can be optimized.This can better control the power consumption during the firmware update process and improve the stability and reliability of the device. In another case, assume that the target version number for the update is V2.1. By querying the non-volatile memory, it is found that there is no historical update record for version V2.1, nor is there a record of upgrading from V2.0 to V2.1. In this case, the historical data of a similar version can be used as a reference. For example, the power consumption reference value of V2.0 or the reference value of upgrading from V1.9 to V2.0 of an earlier version. Assume that the data of 82 mAh for version V2.0 is used as the reference value and normalized to 0.7. The subsequent process is the same as the previous example. By collecting power consumption data in real time and comparing it with the reference value, it is determined whether to trigger the frequency reduction strategy. At the same time, the complete power consumption data of the upgrade from V2.0 to V2.1 this time is recorded as a reference for subsequent version updates.

[0055] Step 4: The system dynamically adjusts the size of the firmware update area according to the historical data and the remaining battery power at present through a prediction algorithm based on linear regression to adapt to different update requirements. The prediction algorithm takes into account factors such as historical update power consumption, the current battery capacity, and the expected update duration.

[0056] The process of dynamically adjusting the size of the firmware update area includes: training a linear regression model based on the historical data of the battery operating state to determine the relationship between power consumption and update duration; inputting the current battery power and the expected update duration into the linear regression model to predict the power consumption required for the update; adjusting the size of the firmware update area according to the power consumption required for the update. At the same time, the update progress and the battery power are monitored in real time. When there is insufficient battery power during the update process, the update is aborted in a timely manner and the original firmware version is restored.

[0057] Further, obtain the historical firmware update data of the device, including information such as power consumption and update duration for each update, and use it as the training data set. Obtain the battery power and battery capacity information of the current device, and use them as input parameters for the estimation algorithm. Based on the historical data and the current battery information, establish an estimation model using the linear regression algorithm. By fitting the historical data, obtain the linear relationship equation between the update power consumption and the update duration. Input the current battery power and the expected update duration into the estimation model to obtain the estimated update power consumption. Based on the estimated update power consumption and the current battery capacity, determine whether the current battery power is sufficient to support the completion of the expected firmware update. If the battery power is sufficient, proceed to the next step; if the battery power is insufficient, issue a low battery warning to the user and recommend connecting the power supply before updating. Dynamically adjust the size of the firmware update area according to the estimated update power consumption and the update duration. If the estimated power consumption is large or the update duration is long, appropriately increase the size of the update area; otherwise, appropriately reduce the size of the update area to save storage space. Apply the dynamically adjusted update area size to the firmware update process and monitor the update progress and battery power changes in real time to ensure the safe and reliable completion of the update process. If an abnormality occurs during the update process or the battery power is insufficient, immediately abort the update and restore the original firmware version to ensure the normal use of the device.

[0058] Furthermore, obtain the historical firmware update data of the device, such as the power consumption and update duration of each update, and use this data as the training dataset. As a specific implementation of this embodiment, read the start time and end time of each firmware update from the system log of the device, so as to calculate the update duration. At the same time, record the battery power percentage of the device before and after each update, and combine with the battery capacity to calculate the power consumption of each update. Obtain the battery power and battery capacity information of the current device and use them as the input parameters of the estimation algorithm. As a specific implementation of this embodiment, the battery power of the current device is 80%, and the battery capacity is 4000 mAh. This information is obtained through the power management system of the device. According to the historical data and the current battery information, establish an estimation model using the linear regression algorithm. The linear regression algorithm assumes that there is a linear relationship between the update power consumption and the update duration. By fitting the historical data, a linear relationship equation can be obtained, for example: power consumption = a × update duration + b, where a and b are the first parameter and the second parameter obtained by fitting with the linear regression algorithm. The current battery power is 80%, and the battery capacity is 4000 mAh, that is, the current available power is 3200 mAh. The estimated update power consumption is 25 mAh, which is much less than the current available power. Therefore, it is judged that the power is sufficient and the firmware update can be carried out. If the estimated power consumption is greater than the current available power, a low power warning is issued to the user, and it is recommended to connect the power supply before updating. For example, if the estimated power consumption is 3500 mAh, a low power warning will be issued. Dynamically adjust the size of the firmware update area according to the estimated update power consumption and update duration. For example, if the estimated power consumption is large or the update duration is long, such as the power consumption is 1000 mAh and the update duration is 60 minutes, appropriately increase the size of the update area to ensure that there is enough storage space to store the new firmware file and the temporary files generated during the update process. On the contrary, if the estimated power consumption is small and the update duration is short, such as the power consumption is 50 mAh and the update duration is 10 minutes, appropriately reduce the size of the update area to save storage space. This can avoid unnecessary waste of storage space and improve the utilization rate of storage space. Apply the dynamically adjusted update area size to the firmware update process, and monitor the update progress and power change in real time to ensure that the update process is completed safely and reliably. During the update process, continuously monitor the power change of the device. If the power drops below a certain threshold, such as 20%, the update is terminated in time and the original firmware version is restored to ensure the normal use of the device. If other abnormal situations occur during the update process, such as network connection interruption, file verification error, etc., the update should also be terminated in time and corresponding processing should be carried out, such as rolling back to the previous firmware version, to ensure the stability and security of the device. This can maximize the risk of firmware update failure.

[0059] Furthermore, based on historical data and current battery information, a prediction model is established using a linear regression algorithm. By fitting the historical data, a linear relationship equation between the updated power consumption and the update duration is obtained. The historical update data of the battery is acquired, including the power consumption and update duration of each update, to form a historical dataset. The current state information of the battery is obtained, including parameters such as battery capacity, voltage, and internal resistance, as the input features of the model. The historical data is preprocessed by removing abnormal data and normalizing the data so that the data falls within the same magnitude. The preprocessed historical data is divided into a training set and a test set. The training set is used for model training, and the test set is used for model evaluation. Using the linear regression algorithm, with the updated power consumption as the dependent variable and the update duration as the independent variable, a linear regression model is trained on the training set. The optimal linear relationship equation is fitted by the least squares method. The performance of the model is evaluated on the test set, and indicators such as mean squared error and coefficient of determination are used to measure the fitting degree of the model. The current battery information is input into the trained linear regression model to obtain the predicted battery update power consumption. Combining with the rated capacity of the battery, it is converted into the predicted remaining battery life.

[0060] Step Five: When the remaining power of the current battery is lower than the preset threshold, the system decides whether to perform a full firmware update or only update the key modules according to the remaining power and the priority of the update package content. The priority of the update package content is predefined according to the importance and security of the module functions.

[0061] Further, during the firmware update process of the smart device, it is first necessary to detect the remaining battery power of the device. If the power is lower than a preset threshold, this usually means that the device may not be able to complete the update of all modules. Therefore, it is necessary to update the key modules first. As a specific implementation manner of this embodiment, assume that the power of a smart watch is lower than 30%, and the operating system and Bluetooth module of the watch are key functions. At this time, the system will update these two modules first according to the pre-set priority list. Next, the decision tree algorithm is used to determine which modules can be updated under the current power condition. A decision tree is a model that decides the operations to be performed through a series of questions, similar to "Is the power sufficient to update the operating system?" If the answer is yes, it will continue to the next question: "Is the power sufficient to update the Bluetooth module?" This method can effectively help the system make the optimal update decision. After determining the modules to be updated, the system will obtain the update packages for the corresponding modules. The differential algorithm is used to compare the differences between the current module version and the update package version. This step can significantly reduce the power and time consumed due to the large amount of data transferred during the update. For example, if there are only a few functional improvements in the Bluetooth module, the differential algorithm can generate only a small update package containing these improvements instead of the complete update package for the entire module. It is crucial to transmit these differential upgrade packages to the device side through a secure channel, which ensures that the data is not intercepted or tampered with during the transmission. After receiving the differential upgrade package, the device side will call the firmware flashing interface to merge the differential upgrade package into the original firmware.

[0062] Step Six: During the firmware update process, the system matches the closest battery characteristic curve from the pre-established battery characteristic database according to the real-time battery status information, and adjusts the charging current and cut-off voltage accordingly to ensure the update stability. The battery characteristic curve includes parameters such as voltage, capacity, and temperature.

[0063] Furthermore, obtain the real-time status information of the battery, including parameters such as voltage, current, and temperature, to form battery status data. Compare the obtained battery status data with the data in the pre-established battery characteristic database, and through a similarity matching algorithm, find one or more battery characteristic curves that are closest to the current battery status. Extract the key parameters related to charge control, such as the charge current threshold and charge cut-off voltage, from the matched battery characteristic curves. According to the extracted charge control parameters, dynamically adjust the charge current and cut-off voltage during the firmware update process to ensure that the charging process is carried out within a safe range. While adjusting the charging parameters, monitor the changes in the battery status data in real time. If an abnormal battery status is found, immediately interrupt the firmware update and record the abnormal data. After the firmware update is completed, update and optimize the battery characteristic database based on the battery status data recorded during the update process to improve the accuracy of subsequent matching. Save the optimized battery characteristic database for use in the next firmware update. At the same time, archive the battery status data and adjustment parameters during the current firmware update process as a basis for future analysis and improvement.

[0064] Furthermore, while adjusting the charging parameters, monitor the changes in the battery status data in real time. If an abnormal battery status is found, immediately interrupt the firmware update.

[0065] Obtain a charging parameter adjustment plan. For different battery types and charging scenarios, determine the adjustment range and step size of corresponding charging voltage, current, etc. Real-time collect the status data of the battery, such as voltage, current, and temperature, and upload it to the cloud server through a wireless communication module. In the cloud server, use an anomaly detection algorithm to analyze the battery status data to determine whether abnormal conditions such as too high / low voltage and too high temperature occur. The anomaly detection algorithm can adopt the 3σ principle based on statistics or the isolation forest algorithm in machine learning. If a battery status anomaly is detected, the cloud server immediately sends an instruction to the device to interrupt the firmware update. After receiving the instruction, the device stops the current firmware update process. The cloud server decides whether to adjust the charging parameters according to the type and severity of the battery status anomaly.

[0066] As a specific implementation of this embodiment, obtain a charging parameter adjustment scheme, and determine the adjustment range and step size of corresponding charging parameters such as voltage and current for different battery types and charging scenarios. For lithium-ion batteries, if it is in a fast charging scenario, the voltage adjustment range can be set from 3.9V to 4.2V, and the step size can be set to 0.05V. The current adjustment range can be set from 1A to 2A, and the step size can be set to 0.1A. If it is a trickle charging scenario, the voltage adjustment range can be set from 3.8V to 4.0V, and the step size can be set to 0.01V. The current adjustment range can be set from 0.1A to 0.5A, and the step size can be set to 0.01A. The advantage of doing this is that appropriate charging parameters can be selected according to different battery types and charging scenarios, avoiding overcharging or undercharging, and prolonging the service life of the battery. Real-time collect the status data of the battery such as voltage, current, and temperature, and upload it to the cloud server through the wireless communication module. For example, sensors can be used to collect data such as the voltage, current, and temperature of the battery, and then upload the data to the cloud server through wireless communication modules such as Bluetooth or Wi-Fi. The upload frequency can be set according to the actual situation, such as uploading once per second or once per minute. The advantage of doing this is that the status of the battery can be monitored in real time, and abnormal situations can be detected in time. In the cloud server, use an anomaly detection algorithm to analyze the battery status data to determine whether abnormal situations such as too high / low voltage or too high temperature occur. The anomaly detection algorithm can adopt the 3σ principle based on statistics or the isolation forest algorithm in machine learning. For example, the 3σ principle can be used to determine whether the battery voltage is too high or too low. If the battery voltage exceeds the average value plus 3 times the standard deviation, it is considered that the voltage is too high. If the battery voltage is lower than the average value minus 3 times the standard deviation, it is considered that the voltage is too low. The advantage of doing this is that the abnormal status of the battery can be detected quickly and accurately. If an abnormal battery status is detected, the cloud server immediately sends an instruction to the device to interrupt the firmware update. After receiving the instruction, the device stops the current firmware update process. For example, if the cloud server detects that the battery temperature is too high, it will send an instruction to the device to interrupt the firmware update. After receiving the instruction, the device will immediately stop the firmware update process to avoid danger caused by overheating of the battery. The advantage of doing this is that it can protect the battery safety and prevent danger. If the battery voltage is too low, the cloud server will reduce the charging current or increase the charging voltage according to the pre-set adjustment scheme to ensure that the battery can be charged normally. The advantage of doing this is that the charging parameters can be dynamically adjusted according to the battery status to ensure charging efficiency and safety. Send the new charging parameter configuration to the device through the wireless communication module, and the device updates the charging parameters and restarts the charging process. Continuously monitor the battery status data. If the abnormal situation is eliminated, the firmware update process can be resumed. For example, if the battery temperature returns to normal, the cloud server will send an instruction to the device to resume the firmware update. After receiving the instruction, the device will continue to execute the firmware update process.The advantage of doing this is that it can ensure the integrity and security of the firmware update.

[0067] The above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed by the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A low-power remote update method for battery-powered Internet of Things devices, characterized in that, It includes the following steps: Partition the battery based on a hardware switch to obtain partitioned batteries; Collect and store the battery status information of the partitioned batteries in real time; Dynamically adjust the size of the firmware update area based on the battery status information of the partitioned batteries; Determine the firmware update priority based on the estimated update power consumption of the firmware update area size and the current battery capacity; Perform firmware update on the device based on the firmware update priority, and adjust the charging parameters based on the battery characteristic curve during the firmware update process.

2. The low-power remote update method for the battery-powered Internet of Things device according to claim 1, wherein The partitioned batteries include a device operation mode, a firmware update mode, and an energy-saving mode; When the hardware switch is in the device operation state and the remaining battery power is higher than the preset operation mode power threshold, the device operation mode is enabled; the operation mode power threshold is 20%; When the hardware switch is in the firmware update state and the remaining battery power is higher than the preset update mode power threshold, the firmware update mode is enabled; the update mode power threshold is 30%; When the remaining battery power is lower than the preset energy-saving mode power threshold or the battery voltage is lower than the preset voltage threshold, the energy-saving mode is enabled; The energy-saving mode power threshold is 10%, and the voltage threshold is 3.6V.

3. The low-power remote update method for the battery-powered Internet of Things device according to claim 1, wherein The battery status information includes battery voltage, current, and temperature information.

4. The low-power remote update method for the battery-powered Internet of Things device according to claim 3, characterized in that The process of storing the battery status information includes: Preprocess the battery status information to obtain effective battery status data; Judge the current battery operation state based on the preset battery voltage, current, and temperature thresholds for the effective battery status data; Use the Kalman filter algorithm to perform filtering processing on the continuously collected battery status information and the corresponding previous battery operation state to obtain a battery status estimation value; Store the effective battery status data and the battery status estimation value in the non-volatile memory of the device to form historical data of the battery operation state.

5. The low-power remote update method for a battery-powered Internet of Things device according to claim 4, wherein The process of dynamically adjusting the size of the firmware update area includes: Train a linear regression model based on the historical data of the battery operation state to determine the relationship between power consumption and update duration; Input the current battery power and the expected update duration into the linear regression model to estimate the power consumption required for the update; Adjust the size of the firmware update area according to the power consumption required for the update. At the same time, monitor the update progress and battery power in real time. When the battery power is insufficient during the update process, stop the update in time and restore the original firmware version.

6. The low-power remote update method for a battery-powered Internet of Things device according to claim 5, wherein The expression of the linear regression model regarding power consumption is: Power consumption = a × Update duration + b; Among them, a and b are the first parameter and the second parameter obtained by fitting through the linear regression algorithm.

7. The low-power remote update method for the battery-powered Internet of Things device according to claim 1, wherein The process of determining the firmware update priority includes: Obtain the estimated update power consumption based on the size of the firmware update area; If the current battery power is sufficient to support the estimated update power consumption, perform a complete firmware update first; If the current battery power is insufficient to support the estimated update power consumption, update the key modules first.

8. The low-power remote update method for a battery-powered Internet of Things device according to claim 7, characterized in that The process of performing firmware update on the device based on the firmware update priority includes: Compare the obtained battery status information with the data in the pre-established battery characteristic database, and find the battery characteristic curve closest to the current battery status through the similarity matching algorithm; Extract the key parameters related to charge control based on the battery characteristic curve; Dynamically adjust the charging current and cut-off voltage during the firmware update based on the key parameters.

Citation Information

Cited By

  • MCU low-power-consumption firmware upgrading method and system based on energy self-adaption

    CN120631410A

  • Energy-adaptive mcu low-power firmware upgrade method and system

    CN120631410B