Dual backup OTA method and system applied to air conditioner controller
By employing a dual-backup OTA method in the home air conditioner controller, real-time voltage and temperature are monitored, and the write rate is dynamically adjusted. This solves the problems of write failure and data corruption caused by voltage fluctuations and environmental interference during the OTA upgrade process of home air conditioners, improves the upgrade success rate and reliability, and optimizes the write speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI ZHIMEI INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-23
AI Technical Summary
During the OTA upgrade process for home air conditioners, issues such as write failures, data corruption, and low upgrade efficiency caused by voltage fluctuations and environmental interference arise, and existing technologies lack robust design.
The dual-backup OTA method is adopted. By real-time detection of the core voltage and chip temperature of the air conditioner controller, the write rate is adjusted when each data block is written. Writing is only performed when the voltage meets the preset value, and a progress pointer is generated to ensure data integrity. The write rate is dynamically adjusted in combination with voltage and temperature.
It improves the success rate and reliability of air conditioner OTA upgrades, optimizes the writing speed, enhances the system's adaptability to dynamic environments, and ensures a smooth, efficient, safe, and stable wireless upgrade process.
Smart Images

Figure CN122261602A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart home upgrade technology, and in particular to a dual-backup OTA method and system for air conditioner controllers. Background Technology
[0002] With the rapid development of IoT technology, the intelligence level of home air conditioners is increasing. Over-the-air (OTA) updates for air conditioner controllers have become a core means of optimizing functionality, fixing defects, and improving user experience. However, the usage environment, user habits, and technological cost constraints of home air conditioners present unique challenges to the reliability, security, and practicality of their OTA updates, differing from those in industrial scenarios such as automobiles.
[0003] Currently, common technical solutions for OTA upgrades of embedded devices mainly include the following categories: First, a single-partition upgrade solution, which directly overwrites the existing program storage area. This method is simple in structure and low in cost, but if the upgrade process is interrupted due to unexpected power outages, network interruptions, or data errors, it can easily lead to controller program crashes, rendering the device unusable. This requires on-site repair by professionals, resulting in a poor user experience and high maintenance costs. Second, a single-partition upgrade solution with an independent bootloader, which manages the upgrade process through a separate bootloader, improving controllability to some extent.
[0004] Therefore, most current OTA upgrades for residential air conditioners use a dual-zone approach. However, residential power environments are affected by peak electricity consumption, making it difficult to ensure a stable voltage supply to the chip, unlike automotive OTA upgrades. Consequently, most solutions do not consider the large voltage fluctuations in residential environments, and the upgrade process itself lacks robust design against voltage fluctuations. Therefore, a method to improve the OTA upgrade capabilities of residential air conditioners is needed. Summary of the Invention
[0005] To address the aforementioned shortcomings, the present invention aims to propose a dual-backup OTA method and system for air conditioner controllers, thereby improving the robustness of air conditioners during OTA upgrades.
[0006] To achieve this objective, the present invention adopts the following technical solution: a dual-backup OTA method for air conditioner controllers, comprising the following steps: Step S1: Receive the upgrade package via wireless signal, identify the running status of the partition, and select the idle partition as the target partition; Step S2: After performing a full erase operation on the target partition, obtain the controller kernel voltage as the first voltage; Obtain the chip temperature as the first temperature; Step S3: Write the data blocks of the upgrade package to the target partition. When writing each data block, determine whether the data block of the upgrade package can be written based on the first voltage. If it can be written, obtain the first write rate of the data block based on the first voltage and the first temperature, and write the data block at the first write rate.
[0007] Preferably, the criterion for determining whether the data block of the upgrade package can be written based on the first voltage is: Determine whether the first voltage value is lower than the first preset value. If it is lower, stop writing the data block and generate a progress pointer for saving the current writing progress. The progress pointer is saved in the minimum recovery program. If the value is not lower than the limit, then writing data blocks is allowed.
[0008] Preferably, after writing to a data block stops, the following steps are performed: The system detects whether the air conditioner has entered a low-power sleep state. If so, it periodically checks the first voltage value. If the first voltage value is higher than the second preset value, it reads the progress pointer and continues writing from the paused data block, wherein the second preset value is greater than the first preset value.
[0009] Preferably, in one embodiment, if the target partition has not stopped writing, the step of obtaining the first write rate includes: Based on the difference between the first voltage and the rated voltage, a first ratio is calculated in a first preset ratio table, wherein the difference between the first voltage and the rated voltage is proportional to the first ratio. A second ratio is obtained from a second preset ratio table based on a first temperature, wherein the second ratio is inversely proportional to the first temperature; The first write rate is calculated based on the first ratio, the second ratio, and the base write rate.
[0010] Preferably, the formula (1) for obtaining the first write speed is as follows: ; in Based on write speed, These represent the first and second proportions, respectively, with p1 being the power exponent, where p1 takes a value of 1.2. Rated voltage, This is the lowest voltage ever recorded during this upgrade process. The first preset value, For the first temperature, The recommended maximum temperature for Flash writing, This is the chip's maximum operating temperature.
[0011] Preferably, when a data block write operation is paused, the step of obtaining the first write rate includes: When the voltage is lower than a first preset value, it is marked as the first time; when the voltage is higher than a second preset value, it is marked as the second time. During the first and second time periods, the first voltage is periodically recorded, and the number of times the first voltage is lower than the first preset value is obtained as the first number. Based on the first number, the third ratio is found in the third preset ratio table, where the first number is inversely proportional to the third ratio. Based on the difference between the first voltage and the rated voltage, a first ratio is calculated in a first preset ratio table, wherein the difference between the first voltage and the rated voltage is proportional to the first ratio. A second ratio is obtained from a second preset ratio table based on a first temperature, wherein the second ratio is inversely proportional to the first temperature; The first write rate is calculated based on the first ratio, the second ratio, the third ratio, and the base write rate.
[0012] Preferably, the formula (2) for obtaining the first write speed is as follows: ; in Based on write speed, These represent the first, second, and third proportions, respectively, with p1 and p2 being power exponents, where p1 takes a value of 1.2 and p2 takes a value of 1.5. Rated voltage, The lowest historical voltage between the first and second time points. The first preset value, For the first temperature, The recommended maximum temperature for Flash writing, This is the chip's maximum operating temperature. denoted as the first time, and N represents the total number of times the first voltage is collected during the first and second time periods.
[0013] A dual-backup OTA system for an air conditioner controller, using the aforementioned dual-backup OTA method for an air conditioner controller, includes a receiving module, a data acquisition module, and an upgrade module; The receiving module is used to receive upgrade packages via wireless signals, identify the running status of partitions, and select idle partitions as target partitions. The data acquisition module is used to acquire the controller kernel voltage after performing a full erase operation on the target partition, and use it as the first voltage. Obtain the chip temperature as the first temperature; The upgrade module is used to write the data blocks of the upgrade package to the target partition. When writing each data block, it determines whether the data block of the upgrade package can be written based on the first voltage. If it can be written, it obtains the first write rate of the data block based on the first voltage and the first temperature, and writes the data block at the first write rate.
[0014] One of the above technical solutions has the following advantages or beneficial effects: The present invention effectively solves the problems of write failure, data corruption or low upgrade efficiency caused by voltage fluctuations, temperature changes or environmental interference in firmware upgrade. Its beneficial effects include improving the upgrade success rate and reliability, optimizing the write speed to reduce upgrade time, and enhancing the system's adaptability to dynamic environments, thereby ensuring that the wireless upgrade process is smooth, efficient and safe. Attached Figure Description
[0015] Figure 1 This is a flowchart of one embodiment of the method of the present invention.
[0016] Figure 2 This is a schematic diagram of the structure of one embodiment of the system of the present invention. Detailed Implementation
[0017] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0018] In the description of embodiments of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0019] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0020] like Figures 1-2As shown, a dual-backup OTA method for air conditioner controllers includes the following steps: Step S1: Receive the upgrade package via wireless signal, identify the running status of the partition, and select the idle partition as the target partition; Step S2: After performing a full erase operation on the target partition, obtain the controller kernel voltage as the first voltage; Obtain the chip temperature as the first temperature; Step S3: Write the data blocks of the upgrade package to the target partition. When writing each data block, determine whether the data block of the upgrade package can be written based on the first voltage. If it can be written, obtain the first write rate of the data block based on the first voltage and the first temperature, and write the data block at the first write rate.
[0021] Because household air conditioners often face voltage fluctuations (such as during peak electricity consumption in older residential areas), low voltage may prevent the writing of a single data block. Continuing to write data blocks from the upgrade package could lead to code errors. To improve the robustness of air conditioner OTA upgrades in the face of voltage fluctuations, a first voltage detection was added to the existing dual-backup OTA upgrade system. In this invention, the controller's kernel voltage is checked before each data block is written to the target partition. Writing is only allowed when the first voltage value is greater than a first preset value. This ensures complete data writing and prevents the upgrade program from crashing. When writing is allowed, the first write rate of the data block is dynamically calculated based on the first voltage and first temperature, and the writing is performed at this first write rate, effectively improving the efficient and stable writing of data blocks from the upgrade package to the target partition.
[0022] This invention effectively solves problems such as write failure, data corruption, or low upgrade efficiency caused by voltage fluctuations, temperature changes, or environmental interference during firmware upgrades. Its beneficial effects include improving upgrade success rate and reliability, optimizing write speed to reduce upgrade time, and enhancing the system's adaptability to dynamic environments, thereby ensuring a smooth, efficient, safe, and stable wireless upgrade process.
[0023] The following example illustrates this process. In a traditional dual-backup OTA upgrade system, partitions A and B are created, serving as mutual backups. Assuming the current air conditioning system uses partition A as its boot partition, and partition B is currently idle, it becomes the target partition. When the manufacturer uploads the upgrade package, the air conditioning system obtains it via the wireless network and writes it to partition B. Before writing, the existing programs in partition B are completely erased to prevent different versions from interfering with each other. Then, a first voltage and a first temperature are obtained. If the first voltage is lower than a preset value when the first data block is written, no data block is written. If the first voltage is higher than the preset value, writing the first data block is allowed. During the writing process, the writing rate is adjusted based on the first voltage and first temperature to ensure that the data block is written to partition B quickly and stably. Once all data blocks of the upgrade package are written to partition B, the corresponding operations will be executed. When the air conditioner starts up next time, the versions of the programs in partition A and partition B will be compared. At this time, partition B will be used as the boot partition, and the OTA upgrade of the air conditioner will be successfully achieved. Partition A will then back up the program in partition B.
[0024] Preferably, the criterion for determining whether the data block of the upgrade package can be written based on the first voltage is: Determine whether the first voltage value is lower than the first preset value. If it is lower, stop writing the data block and generate a progress pointer for saving the current writing progress. The progress pointer is saved in the minimum recovery program. If the value is not lower than the limit, then writing data blocks is allowed.
[0025] If the system detects that the first voltage is lower than a preset value, it will immediately interrupt the current and subsequent data block writing process. This prevents unreliable write operations under critical conditions of unstable power supply, thus avoiding incomplete data writing or damage to storage units in the target partition due to insufficient voltage. Simultaneously with the write interruption, the system generates a progress pointer in real time, accurately recording the current successfully written position. This progress pointer determines the current position of the written data block, allowing the writing of data blocks to continue to the target partition when the voltage stabilizes. For example, if the first voltage is detected to be lower than the first preset value when writing the 15th data block, a progress pointer pointing to 15 will be generated. When the voltage stabilizes later, the 15th data block will be located based on this progress pointer, and writing will continue. This provides crucial fault tolerance and reliability guarantees for air conditioner OTA upgrades.
[0026] Preferably, after writing to a data block stops, the following steps are performed: The system detects whether the air conditioner has entered a low-power sleep state. If so, it periodically checks the first voltage value. If the first voltage value is higher than the second preset value, it reads the progress pointer and continues writing from the paused data block, wherein the second preset value is greater than the first preset value.
[0027] When the air conditioner enters a low-power sleep state (i.e., the air conditioner's sleep mode), the voltage is generally relatively stable. Therefore, the controller core voltage is detected at this time. When the first voltage value is greater than the second preset value, it indicates that the power supply is sufficiently stable and meets the voltage threshold to support a safe restart and reliably complete subsequent upgrade operations. At this point, the progress pointer from before the write operation stopped is read, and subsequent data blocks are written according to the progress pointer.
[0028] Preferably, in one embodiment, if the target partition has not stopped writing, the step of obtaining the first write rate includes: Based on the difference between the first voltage and the rated voltage, a first ratio is calculated in a first preset ratio table, wherein the difference between the first voltage and the rated voltage is proportional to the first ratio. Rated voltage The system is designed with a rated operating voltage, typically set between 3.3V and 3.5V. A voltage closer to the rated voltage indicates greater stability, allowing for a more efficient write speed. Therefore, the difference between the first voltage and the rated voltage is proportional to a first ratio; a first preset ratio table stores the correspondence between a second difference range and the first ratio.
[0029] A second ratio is obtained from a second preset ratio table based on a first temperature, wherein the second ratio is inversely proportional to the first temperature; Because the performance of the memory cells becomes more unstable at higher chip temperatures, the second ratio should be reduced to decrease the write rate and increase the write success rate. The second preset ratio table stores the correspondence between the first temperature range and the second ratio. The base write rate is the minimum interval required to ensure reliable writing to the memory cells under rated voltage and normal temperature.
[0030] The first write rate is calculated based on the first ratio, the second ratio, and the base write rate.
[0031] Preferably, the formula (1) for obtaining the first write speed is as follows: ; in Based on write speed, These represent the first and second proportions, respectively, with p1 being the power exponent, where p1 takes a value of 1.2. Rated voltage, This is the lowest voltage ever recorded during this upgrade process. The first preset value, For the first temperature, The recommended maximum temperature for Flash writing, This is the chip's maximum operating temperature.
[0032] Preferably, in another embodiment, when a data block write is paused, the step of obtaining the first write rate includes: When the voltage is lower than a first preset value, it is marked as the first time; when the voltage is higher than a second preset value, it is marked as the second time. In the first and second time intervals, the first voltage is periodically recorded, and the number of times the first voltage falls below a first preset value is obtained as the first count. Based on the first count, a third ratio is looked up in a third preset ratio table, where the first count and the third ratio are inversely proportional. The first count represents the frequency of voltage drops below the first preset value. A larger first count indicates a more severe power supply environment. If a higher write rate is continued, it will lead to accelerated aging of the storage cells. Therefore, in this invention, the first count and the third ratio are inversely proportional. The first preset ratio table stores the correspondence between voltage and the third ratio.
[0033] Based on the difference between the first voltage and the rated voltage, a first ratio is applied to a first preset ratio table, wherein the difference between the first voltage and the rated voltage is proportional to the first ratio; rated voltage The system is designed with a rated operating voltage, typically set between 3.3V and 3.5V. A voltage closer to the rated voltage indicates greater stability, allowing for a more efficient write speed. Therefore, the difference between the first voltage and the rated voltage is proportional to a first ratio; a first preset ratio table stores the correspondence between a second difference range and the first ratio.
[0034] A second ratio is obtained from a second preset ratio table based on a first temperature, wherein the second ratio is inversely proportional to the first temperature; Since the performance of the memory cells becomes more unstable at higher chip temperatures, the second ratio should be reduced to decrease the write rate and increase the write success rate. The second preset ratio table stores the correspondence between the first temperature range and the second ratio.
[0035] The first write rate is calculated based on the first ratio, the second ratio, the third ratio, and the base write rate.
[0036] Preferably, the formula (2) for obtaining the first write speed is as follows: ; in Based on write speed, These represent the first, second, and third proportions, respectively, with p1 and p2 being power exponents, where p1 takes a value of 1.2 and p2 takes a value of 1.5. Rated voltage, The lowest historical voltage between the first and second time points. The first preset value, For the first temperature, The recommended maximum temperature for Flash writing, This is the chip's maximum operating temperature. denoted as the first time, and N represents the total number of times the first voltage is collected during the first and second time periods.
[0037] For example, in one embodiment, an upgrade package is set up with 30 data blocks. When the 15th data block is being written, a first voltage is detected to be lower than a first preset value. At this time, the first write rate of the 1st to 14th data blocks is calculated using formula (1). When the writing of data blocks is resumed, the first write rate of the 15th to 30th data blocks is calculated using formula (2).
[0038] A dual-backup OTA system for an air conditioner controller, using the aforementioned dual-backup OTA method for an air conditioner controller, includes a receiving module, a data acquisition module, and an upgrade module; The receiving module is used to receive upgrade packages via wireless signals, identify the running status of partitions, and select idle partitions as target partitions. The data acquisition module is used to acquire the controller kernel voltage after performing a full erase operation on the target partition, and use it as the first voltage. Obtain the chip temperature as the first temperature; The upgrade module is used to write the data blocks of the upgrade package to the target partition. When writing each data block, it determines whether the data block of the upgrade package can be written based on the first voltage. If it can be written, it obtains the first write rate of the data block based on the first voltage and the first temperature, and writes the data block at the first write rate.
[0039] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0040] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A dual-backup OTA method for air conditioner controllers, characterized in that, Includes the following steps: Step S1: Receive the upgrade package via wireless signal, identify the running status of the partition, and select the idle partition as the target partition; Step S2: After performing a full erase operation on the target partition, obtain the controller kernel voltage as the first voltage; Obtain the chip temperature as the first temperature; Step S3: Write the data blocks of the upgrade package to the target partition. When writing each data block, determine whether the data block of the upgrade package can be written based on the first voltage. If it can be written, obtain the first write rate of the data block based on the first voltage and the first temperature, and write the data block at the first write rate.
2. The dual-backup OTA method for an air conditioner controller according to claim 1, characterized in that, The criterion for determining whether the data block of the upgrade package can be written based on the first voltage is: Determine whether the first voltage value is lower than the first preset value. If it is lower, stop writing the data block and generate a progress pointer for saving the current writing progress. The progress pointer is saved in the minimum recovery program. If the value is not lower than the limit, then writing data blocks is allowed.
3. The dual-backup OTA method for an air conditioner controller according to claim 2, characterized in that, After writing to the data block stops, perform the following steps: The system detects whether the air conditioner has entered a low-power sleep state. If so, it periodically checks the first voltage value. If the first voltage value is higher than the second preset value, it reads the progress pointer and continues writing from the paused data block, wherein the second preset value is greater than the first preset value.
4. The dual-backup OTA method for an air conditioner controller according to claim 2, characterized in that, The steps for obtaining the first write speed include: Based on the difference between the first voltage and the rated voltage, a first ratio is calculated in a first preset ratio table, wherein the difference between the first voltage and the rated voltage is proportional to the first ratio. A second ratio is obtained from a second preset ratio table based on a first temperature, wherein the second ratio is inversely proportional to the first temperature; The first write rate is calculated based on the first ratio, the second ratio, and the base write rate.
5. The dual-backup OTA method for an air conditioner controller according to claim 4, characterized in that, The formula (1) for obtaining the first write speed is as follows: ; in Based on write speed, These represent the first and second proportions, respectively, with p1 being the power exponent, where p1 takes a value of 1.
2. Rated voltage, This is the lowest voltage ever recorded during this upgrade process. The first preset value, For the first temperature, The recommended maximum temperature for Flash writing, This is the chip's maximum operating temperature.
6. The dual-backup OTA method for an air conditioner controller according to claim 3, characterized in that, When a data block write is paused, the steps for obtaining the first write rate include: When the voltage is lower than a first preset value, it is marked as the first time; when the voltage is higher than a second preset value, it is marked as the second time. During the first and second time periods, the first voltage is periodically recorded, and the number of times the first voltage is lower than the first preset value is obtained as the first number. Based on the first number, the third ratio is found in the third preset ratio table, where the first number is inversely proportional to the third ratio. Based on the difference between the first voltage and the rated voltage, a first ratio is calculated in a first preset ratio table, wherein the difference between the first voltage and the rated voltage is proportional to the first ratio. A second ratio is obtained from a second preset ratio table based on a first temperature, wherein the second ratio is inversely proportional to the first temperature; The first write rate is calculated based on the first ratio, the second ratio, the third ratio, and the base write rate.
7. The dual-backup OTA method for an air conditioner controller according to claim 6, characterized in that, The formula (2) for obtaining the first write speed is as follows: ; in Based on write speed, These represent the first, second, and third proportions, respectively, with p1 and p2 being power exponents, where p1 takes a value of 1.2 and p2 takes a value of 1.
5. Rated voltage, The lowest historical voltage between the first and second time points. The first preset value, For the first temperature, The recommended maximum temperature for Flash writing, This is the chip's maximum operating temperature. denoted as the first time, and N represents the total number of times the first voltage is collected during the first and second time periods.
8. A dual-backup OTA system for an air conditioner controller, using the dual-backup OTA method for an air conditioner controller as described in any one of claims 1 to 7, characterized in that, It includes a receiving module, a data acquisition module, and an upgrade module; The receiving module is used to receive upgrade packages via wireless signals, identify the running status of partitions, and select idle partitions as target partitions. The data acquisition module is used to acquire the controller kernel voltage after performing a full erase operation on the target partition, and use it as the first voltage. Obtain the chip temperature as the first temperature; The upgrade module is used to write the data blocks of the upgrade package to the target partition. When writing each data block, it determines whether the data block of the upgrade package can be written based on the first voltage. If it can be written, it obtains the first write rate of the data block based on the first voltage and the first temperature, and writes the data block at the first write rate.