Data storage method and device, program product, medium and household appliance
By using the power stored on the control board to save the wired controller's cached data after a power outage, the problem of data loss after a power outage is solved, thus improving the reliability of home appliances and the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2026-05-26
AI Technical Summary
The cached data of wired controllers in existing home appliances is easily damaged after a power outage, resulting in data loss. Existing solutions cannot effectively repair or recover critical data.
After a power outage occurs in home appliances, the system uses the power stored on the control board to save the cached data of the wired controller. It detects the power outage by monitoring the voltage value and shuts down the load after the power outage to save the cached data.
It effectively avoids data repair failures, reduces the risk of cached data loss, and improves the reliability of home appliances and user experience.
Smart Images

Figure CN122086301A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of home appliance and data storage technology, and particularly relates to a data storage method, device, program product, medium and home appliance. Background Technology
[0002] With the continuous upgrading of home appliances and the increasing demands of users for their functionality and interactive experience, the computing power and interactive functions of wired controllers are facing greater challenges. Currently, high-end wired controllers generally adopt color displays and built-in operating systems, leading to increased firmware size and data read / write volume. However, in daily life, the data read / write and storage processes of wired controllers are easily affected by power outages, and cached data may be corrupted. If this critical data is related to the system or main interface application, users may experience a device "freezing" or crashing. Existing solutions typically detect and repair data corruption upon power-up. However, this method has drawbacks: if the detection function itself is damaged, data cannot be corrected; if the amount of corrupted data is too large, it cannot be repaired; and if the corrupted data is critical operating system data and there is no backup, it cannot be recovered. Therefore, reducing the risk of data loss in wired controllers of home appliances is an urgent technical problem to be solved. Summary of the Invention
[0003] The embodiments of this application provide a data storage method, apparatus, computer program product, computer-readable storage medium, and home appliance, which can at least reduce the risk of data loss in the wired controller cache of home appliances.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0005] According to a first aspect of the embodiments of this application, a data storage method is provided, the method being applied to a home appliance, the home appliance including a control board and a wired controller, the method comprising: after the home appliance loses power, storing cached data generated by the wired controller during operation based on the power stored in the control board.
[0006] In some embodiments of this application, based on the foregoing scheme, the method further includes: obtaining a first voltage value supplied by an external power source to the control board, and determining that the home appliance is powered off if the first voltage value is lower than a first preset voltage threshold; or obtaining a second voltage value supplied by the control board to the wired controller, and determining that the home appliance is powered off if the second voltage value is lower than a second preset voltage threshold.
[0007] In some embodiments of this application, based on the foregoing scheme, the method further includes: before saving the cached data generated by the wired controller during operation, turning off the load of the control board based on the power stored in the control board.
[0008] In some embodiments of this application, based on the foregoing scheme, the method further includes: obtaining the initial power value stored in the control board and determining the power consumption value required to shut down the load of the control board; determining the difference between the initial power value and the power consumption value as the remaining power value; if the remaining power value is not sufficient to save the cached data generated by the wired controller during operation, then before saving the cached data generated by the wired controller during operation, shutting down the load of the control board based on the power stored in the control board.
[0009] In some embodiments of this application, based on the foregoing scheme, the method further includes: determining a first duration for which the remaining power supports the execution of the cache data saving action based on the remaining power value and the power consumption value of the wired controller; determining a second duration for which the cache data needs to be saved based on the amount of cache data and the data saving rate of the cache data; and determining that the remaining power value is insufficient to save the cache data generated by the wired controller during operation if the first duration is less than the second duration.
[0010] In some embodiments of this application, based on the foregoing scheme, the method further includes: while saving the cached data generated by the wired controller during operation, shutting down the load of the control board based on the power stored in the control board; or after saving the cached data generated by the wired controller during operation, shutting down the load of the control board based on the power stored in the control board.
[0011] In some embodiments of this application, based on the foregoing scheme, the method further includes: obtaining a target data volume threshold, wherein the target data volume threshold is less than or equal to a pre-set initial data volume threshold for triggering the execution of cache data saving action; if the amount of cache data generated by the wired controller during operation is greater than or equal to the target data volume threshold, then triggering the step of saving the cache data generated by the wired controller during operation based on the power stored in the control board.
[0012] In some embodiments of this application, based on the foregoing scheme, obtaining the target data volume threshold includes: obtaining the initial power value stored in the control board, and determining the power consumption value required to shut down the load of the control board; determining the difference between the initial power value and the power consumption value as the remaining power value; determining the ratio between the remaining power value and the power consumption value required to store a unit amount of cached data, and determining the minimum value between the ratio and the initial data volume threshold as the target data volume threshold.
[0013] In some embodiments of this application, based on the foregoing scheme, saving the cached data generated by the wired controller during operation includes: determining the priority of each cached data generated by the wired controller during operation; and saving the cached data generated by the wired controller during operation in descending order of priority.
[0014] In some embodiments of this application, based on the aforementioned scheme, the home appliance includes a multi-split air conditioner, which is configured with a main controller and at least one secondary controller, wherein the priority of cached data in the main controller is higher than the priority of cached data in the secondary controller.
[0015] In some embodiments of this application, based on the foregoing scheme, shutting down the load of the control board includes: determining the priority of each load of the control board; and shutting down the load of the control board in descending order of priority.
[0016] In some embodiments of this application, based on the foregoing scheme, the method further includes: saving the cached data generated by the wired controller during operation to a remote server or a local non-volatile memory.
[0017] According to a second aspect of the embodiments of this application, a data storage device is provided. The device is disposed in a home appliance, the home appliance including a control board and a wired controller. The device includes a storage unit for storing cached data generated by the wired controller during operation based on the power stored in the control board after the home appliance is powered off.
[0018] According to a third aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform an operation as described in any of the first aspects above.
[0019] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by a processor to perform the operation as described in any of the first aspects above.
[0020] According to a fifth aspect of the embodiments of this application, a home appliance is provided, the home appliance including one or more processors and one or more memories, the one or more memories storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the one or more processors to perform the operation as described in any of the first aspects above.
[0021] Based on the technical solution proposed in this application, after a power outage, the power stored in the control board of the home appliance is used to save the cached data generated by the wired controller during operation. This effectively avoids the home appliance detecting data corruption only after power is restored, thus avoiding data repair failure and reducing the risk of data loss in the wired controller cache, thereby improving the reliability of the home appliance and the user experience.
[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0024] Figure 1 A system architecture diagram of an air conditioning device according to an embodiment of this application is shown;
[0025] Figure 2 A flowchart illustrating a data storage method according to an embodiment of this application is shown;
[0026] Figure 3 A block diagram of a data storage apparatus according to an embodiment of this application is shown;
[0027] Figure 4 A schematic diagram of the structure of a household appliance according to an embodiment of this application is shown. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0030] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices. It should also be noted that, for the sake of simplicity, certain components in the drawings that do not affect the interpretation of the technical solution of this application have been appropriately omitted.
[0031] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0032] In the description of this application, it should be understood that 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 amount of data for the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more.
[0033] It should be noted that the data storage method proposed in this application can be applied to home appliances, such as air conditioners, refrigerators, and washing machines. These home appliances may include control boards and wired controllers.
[0034] To enable those skilled in the art to better understand this application, firstly, in conjunction with Figure 1The system architecture of an air conditioning device in one embodiment of this application is described.
[0035] See Figure 1 The diagram shows the system architecture of an air conditioning device according to an embodiment of this application.
[0036] like Figure 1 The diagram shows a three-in-one air conditioning unit, comprising outdoor unit 101, outdoor unit 102A, outdoor unit 102B, and outdoor unit 102C. Outdoor units 102A, 102B, and 102C are respectively equipped with control boards 103A, 103B, and 103C, and also with wired controllers 104A, 104B, and 104C. Control boards 103A, 103B, and 103C are also connected to loads 105A, 105B, and 105C, respectively. The external power supply 106 supplies power to control boards 103A, 103B, and 103C (e.g., 220V), control boards 103A, 103B, and 103C supply power to wired controllers 104A, 104B, and 104C (e.g., 12V), and control boards 103A, 103B, and 103C also supply power to loads 105A, 105B, and 105C (e.g., 12V).
[0037] Currently, wired controllers require reading and writing a large amount of data (cached data). In the event of a sudden power outage, the reading, writing, and saving of this cached data can be easily affected. If this data is related to the system or main interface applications, users may experience a device "freezing" or crashing. Existing solutions typically detect and repair data corruption upon power-up. However, this method has drawbacks: if the detection function itself is compromised, the amount of corrupted data is too large, or if the corrupted data is critical operating system data without backup, data recovery may fail and data loss may occur. Therefore, this application proposes a data storage scheme to reduce the risk of data loss in wired controllers of home appliances.
[0038] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0039] Reference Figure 2 A flowchart illustrating a data storage method according to an embodiment of this application is shown. The method is applied to a home appliance, which includes a control board and a wired controller. In this application, the data storage method can be executed by a device with computing processing capabilities. (Refer to...) Figure 2 As shown, this data saving method includes at least step 220, which is described in detail below:
[0040] In step 220, after the home appliance loses power, the cached data generated by the wired controller during operation is saved based on the power stored in the control board.
[0041] In this application, the control board of the home appliance includes capacitors capable of storing electrical energy, which can power the wired controller and some loads (such as fans) of the air conditioning equipment.
[0042] In this application, after a power outage, the power stored in the control board of the appliance is used to save the cached data generated by the wired controller during operation. This effectively avoids the appliance detecting data corruption only after power is restored, thus preventing data repair failure and reducing the risk of data loss in the wired controller. This improves the reliability of the appliance and the user experience.
[0043] In this application, it can be determined whether the home appliance has lost power through the following steps 201 or 202:
[0044] In the next step 201, the first voltage value of the power supply from the external power source to the control board is obtained. If the first voltage value is lower than the first preset voltage threshold, it is determined that the home appliance is powered off.
[0045] In this application, the control board can continuously monitor the power supply status of the external power source, that is, continuously monitor the first voltage value supplied by the external power source to the control board. If the first voltage value is lower than a first preset voltage threshold (e.g., 180V), it is determined that the home appliance has lost power, and the power loss message of the home appliance can be sent to the wired controller, for example, as... Figure 1 As shown, control board 103A, 103B, or 103C sends the power failure message of the home appliance to wired controller 104A, 104B, or 104C.
[0046] In this application, the sensitivity of monitoring whether the home appliance has lost power is ensured by continuously monitoring the first voltage value supplied by the external power source to the control board.
[0047] Step 201: Obtain the second voltage value of the power supply from the control board to the wired controller. If the second voltage value is lower than the second preset voltage threshold, it is determined that the home appliance is powered off.
[0048] In this application, the wired controller can continuously monitor the power supply status of the control board, that is, continuously monitor the second voltage value supplied by the control board to the wired controller. If the second voltage value is lower than a second preset voltage threshold (e.g., 8V), it is determined that the home appliance has lost power, and the power loss message can be sent to the control board and other wired controllers, for example, as... Figure 1As shown, the wired controller 104A sends a power failure message of the home appliance to the control boards 103A, 103B, 103C and the wired controllers 104B and 104C.
[0049] In this application, the power supply value of the second voltage supplied by the control board to the wired controller is continuously monitored to determine whether the home appliance has lost power, which also ensures the sensitivity of monitoring whether the home appliance has lost power.
[0050] In this application, the following steps may also be performed: 211, 221, or 231.
[0051] Step 211: Before saving the cached data generated by the wired controller during operation, the load on the control board is turned off based on the power stored in the control board.
[0052] Step 221: While saving the cached data generated by the wired controller during operation, the load on the control board is turned off based on the power stored in the control board.
[0053] Step 231: After saving the cached data generated by the wired controller during operation, the load on the control board is turned off based on the power stored in the control board.
[0054] In this application, it should be noted that shutting down the load on the control board of a household appliance includes two scenarios: normal shutdown and abnormal shutdown. The difference between normal and abnormal shutdown is that normal shutdown involves gradually reducing the power supply to the load through the control board, allowing for a smooth shutdown. While this consumes some power, it ensures the load is not damaged. Abnormal shutdown, on the other hand, directly cuts off the power supply to the load. Although this method is faster, it increases the risk of damage to the load. Therefore, in practical applications, normal shutdown is preferred to protect the stability and lifespan of the load.
[0055] In this application, based on step 211 above, the load on the control board is first shut down based on the power stored in the control board, and then the cached data generated by the wired controller during operation is saved based on the power stored in the control board. The advantages are twofold: firstly, it avoids the potential risk of damage to the load due to a sudden power outage on the control board, thereby extending the load's lifespan; secondly, saving the cached data using the remaining power after shutting down the load allows the home appliance to quickly resume normal operation upon restarting, without the need for complex data repair, thus reducing the risk of cached data loss to some extent, preventing the loss of critical data in the event of a power outage, and improving the reliability of the home appliance in subsequent operation.
[0056] In this application, based on step 221 above, while saving the cached data generated during the operation of the wired controller, the load is shut down based on the power stored in the control board. The advantage is that it can avoid damaging the load to a certain extent, while reducing the risk of losing the cached data of the wired controller during operation to a certain extent.
[0057] In this application, based on step 231 above, the cached data generated by the wired controller during operation is first saved based on the power stored in the control board. Then, based on the power stored in the control board, the load on the control board is shut down. The advantage is that it can greatly reduce the risk of cached data loss, ensure data integrity, avoid the loss of critical data, and improve the reliability of home appliances in subsequent operation. Furthermore, it can also protect the load in home appliances from damage caused by sudden power outages to a certain extent, thereby extending the lifespan of the home appliances.
[0058] Next, this application will further explain step 211, or step 221, or step 231 as described above.
[0059] In one embodiment of step 211 above, steps 241 to 243 can be performed as follows:
[0060] Step 241: Obtain the initial power value stored in the control board, and determine the power consumption value required to shut down the load of the control board.
[0061] Step 242: Determine the difference between the initial power value and the power consumption value as the remaining power value.
[0062] Step 243: If the remaining power value is insufficient to save the cached data generated by the wired controller during operation, then before saving the cached data generated by the wired controller during operation, the load of the control board is turned off based on the power stored in the control board.
[0063] In this application, the initial power value is the power value stored on the control board when the home appliance is powered off, which can be calculated by collecting power parameters such as the output voltage of the control board.
[0064] In this application, the power consumption required to shut down the loads of the control board can be obtained by looking up a pre-established estimation table based on the operating status of each load of the control board, or by predicting it through a pre-trained machine learning model. This application does not make any specific limitations on this.
[0065] In this application, the difference between the initial power value and the power consumption value is determined as the remaining power value, which can be referred to the following formula (1):
[0066] RC = IC - UC (1)
[0067] Wherein, RC represents the remaining power value, IC represents the initial power value stored in the control board, and UC represents the power consumption value required to shut down the load of the control board.
[0068] In this application, it can be determined whether the remaining battery power is sufficient to save the cached data generated by the wired controller during operation by performing the following steps 2431 to 2433:
[0069] Step 2431: Based on the remaining power value and the power consumption value of the wired controller, determine the first duration for which the remaining power supports the execution of the cache data saving action.
[0070] Step 2432: Based on the amount of cached data and the data retention rate of the cached data, determine the second duration required to retain the cached data.
[0071] Step 2433: If the first duration is less than the second duration, then it is determined that the remaining power value does not meet the requirement of saving the cached data generated by the wired controller during operation.
[0072] In this application, based on the remaining power value and the power consumption value of the wired controller, the first duration for which the remaining power supports the execution of the cache data saving action can be determined by referring to the following formula (2):
[0073] PST = RC / LCPC (2)
[0074] Wherein, PST represents the first duration during which the remaining power supports the execution of the cache data saving action, RC represents the remaining power value, and LCPC represents the power consumption value of the wired controller.
[0075] In this application, the second duration required to store the cached data is determined based on the amount of cached data and the data storage rate of the cached data, and can be determined with reference to the following formula (3):
[0076] ST=Σ(DS i / TR) (3)
[0077] Where ST represents the second duration required to store the cached data, and DS i The value represents the size of the i-th data block in the cached data, and TR represents the data retention rate of the cached data.
[0078] In this application, it is understood that if the first duration is greater than or equal to the second duration, then the remaining battery power is determined to be sufficient to store the cached data generated by the remote controller during operation. If the first duration is less than the second duration, then the remaining battery power is determined to be insufficient to store the cached data generated by the remote controller during operation.
[0079] Furthermore, in this embodiment, after the wired controller or control board detects a power failure signal, it calculates the remaining power value of the control board after shutting down its load. If the remaining power value is insufficient to save the cached data generated by the wired controller during operation, it indicates that the initial power value stored in the control board cannot simultaneously save all the cached data generated by the wired controller during operation and shut down all the loads of the control board. In this case, by first shutting down the load of the control board based on the power stored in the control board, and then saving the cached data generated by the wired controller during operation based on the power stored in the control board, the potential risk of damage to the load due to a sudden power failure can be avoided, thereby extending the service life of the load. Saving part of the cached data generated by the wired controller during operation using the remaining power value can also reduce the risk of cached data loss to a certain extent, preventing the loss of critical data in the event of a power failure, thereby improving the reliability of the home appliances.
[0080] It should be noted that, in this application, if the initial power value stored on the control board is sufficient to simultaneously save all cached data generated by the wired controller during operation and shut down all loads on the control board, the load on the control board can be shut down first based on the power value stored on the control board, and then the cached data generated by the wired controller during operation can be saved based on the power value stored on the control board.
[0081] In this application, it is understood that in steps 221 and 231 above, after the home appliance loses power, the system will quickly respond to the power failure signal and quickly save the cached data generated by the wired controller during operation based on the power stored in the control board.
[0082] Specifically, in one embodiment of steps 221 and 231 above, steps 251 to 252 can be performed as follows:
[0083] Step 251: Obtain the target data volume threshold, wherein the target data volume threshold is less than or equal to the preset initial data volume threshold used to trigger the execution of cache data saving action.
[0084] Step 252: If the amount of cached data generated by the wired controller during operation is greater than or equal to the target data amount threshold, then the step of saving the cached data generated by the wired controller during operation based on the power stored in the control board is triggered.
[0085] It should be noted that in some application scenarios, when home appliances are operating normally, the wired controller will trigger the cache data saving action through a pre-set initial data volume threshold. That is, when the amount of cached data in the wired controller reaches the initial data volume threshold, the cached data will be automatically saved.
[0086] Based on the above application background, in this embodiment, after the home appliance loses power, a target data volume threshold less than or equal to the initial data volume threshold can be obtained. If the amount of cached data generated by the wired controller during operation is greater than or equal to the target data volume threshold, then the step of saving the cached data generated by the wired controller during operation based on the power stored in the control board is triggered. In this way, by reducing the triggering condition for performing the cached data saving action, especially when the initial power value stored in the control board cannot simultaneously satisfy the conditions for saving all the cached data generated by the wired controller during operation and shutting down all the loads of the control board, the sensitivity of performing the cached data saving action can be improved. Consequently, after the home appliance loses power, it will quickly respond to the power outage signal and quickly save the cached data generated by the wired controller during operation based on the power stored in the control board.
[0087] In this application, step 251 above, namely obtaining the target data volume threshold, can be performed according to steps 2511 to 2513 as follows:
[0088] Step 2511: Obtain the initial power value stored in the control board, and determine the power consumption value required to shut down the load of the control board.
[0089] Step 2512: Determine the difference between the initial power value and the power consumption value as the remaining power value.
[0090] Step 2513: Determine the ratio between the remaining power value and the power consumption required to store a unit of cached data, and determine the minimum value between the ratio and the initial data volume threshold as the target data volume threshold.
[0091] In this application, the ratio between the remaining power value and the power consumption required to store a unit amount of cached data is determined, and the minimum value between the ratio and the initial data volume threshold is determined as the target data volume threshold. This can be done with reference to the following formula (4):
[0092] CSA = min(RC / PPB, MCS) (4)
[0093] Wherein, CSA represents the target data volume threshold, RC represents the remaining power value, PPB represents the power consumption required to save a unit of cached data, and MCS represents the preset initial data volume threshold used to trigger the cached data saving action.
[0094] Furthermore, in this embodiment, after the wired controller or control board detects a power failure signal, it calculates the remaining power level of the control board after its load is turned off. Based on the remaining power level, it determines a target data amount threshold to trigger the cache data saving action. That is, the smaller the remaining power level, the smaller the target data amount threshold, and the higher the sensitivity of the cache data saving action. Consequently, after the home appliance loses power, the cache data generated by the wired controller during operation can be saved more quickly based on the power level stored on the control board. In this way, by rapidly responding to power failure signals and dynamically adjusting the data amount threshold to trigger the cache data saving action, the risk of cache data loss can be greatly reduced, data integrity can be ensured, critical data loss can be avoided, and the reliability of the home appliance in subsequent operation can be improved.
[0095] In other embodiments of steps 221 and 231 described above, steps 261 to 262 may also be performed:
[0096] Step 261: Obtain the target interval time threshold, wherein the target interval time threshold is less than the preset initial interval time threshold used to trigger the execution of cache data saving action;
[0097] Step 262: If the duration of the cached data generated by the wired controller during operation is greater than or equal to the target interval time threshold, then the step of saving the cached data generated by the wired controller during operation based on the power stored in the control board is triggered.
[0098] It should be noted that in some application scenarios, when home appliances are operating normally, the wired controller will trigger the cache data saving action through a pre-set initial interval time threshold. That is, when the duration of cache data generated by the wired controller during operation reaches the initial interval time threshold, the cache data will be automatically saved.
[0099] Based on the above application background, in this embodiment, after the home appliance loses power, by obtaining a target interval time threshold that is less than the initial interval time threshold to trigger the step of saving the cached data generated by the wired controller during operation based on the power stored in the control board, the sensitivity of the cached data saving action can be improved. Thus, after the home appliance loses power, it will quickly respond to the power loss signal of the home appliance and quickly save the cached data generated by the wired controller during operation based on the power stored in the control board.
[0100] In other embodiments of steps 221 and 231 described above, it is not necessary to consider whether the amount of cached data in the wired controller reaches the target data amount threshold, nor whether the duration of cached data generation during the operation of the wired controller reaches the target interval time threshold. Instead, after the home appliance loses power, the cached data generated by the wired controller during operation is directly saved based on the power stored in the control board. This significantly reduces the risk of cached data loss, ensures data integrity, avoids the loss of critical data, and improves the reliability of the home appliance in subsequent operation.
[0101] In this application, the saving of cached data generated by the wired controller during operation can be performed according to the following steps 222 to 223:
[0102] Step 222: Determine the priority of each cached data generated by the wired controller during operation.
[0103] Step 223: Save the cached data generated by the wired controller during operation in descending order of priority.
[0104] In this application, during the cache data saving process, the data to be saved can be sorted according to preset data priority rules to ensure that data with higher importance and urgency is saved first. Data priority can be determined based on its importance (such as configuration parameters, operation logs, user settings) and urgency (such as emergency fault records, ongoing operations). In the actual data saving operation, data can also be selectively saved based on the remaining power of the control board to ensure that critical data can be processed and saved first when power is insufficient.
[0105] In this application, by determining the priority of each cached data generated by the wired controller during operation and saving them in descending order of priority, it is possible to ensure that critical data is prioritized for protection when power is limited or home appliances are under resource constraints. The advantages are as follows: First, it guarantees the integrity and availability of important data, preventing data loss from impacting the operation of home appliances. Second, it improves the response efficiency of home appliances, enabling rapid recovery and handling in emergency situations. Finally, it optimizes resource management, ensuring the continuous and stable operation of home appliances under limited power storage conditions.
[0106] In this application, the home appliance may include a multi-split air conditioner, which is equipped with a main controller and at least one secondary controller. The cached data in the main controller has a higher priority than the cached data in the secondary controller. After the home appliance is powered on, the cached data in the main controller can be saved first.
[0107] In this application, shutting down the load on the control board can be performed according to the following steps 224 to 225:
[0108] Step 224: Determine the priority of each load on the control board.
[0109] Step 225: Shut down the loads on the control board in descending order of load priority.
[0110] In this application, by prioritizing the shutdown of high-priority loads, firstly, damage to these critical loads caused by sudden power outages can be effectively prevented, thus protecting them. Secondly, preemptively shutting down high-priority loads helps home appliances shut down in an orderly manner during power outages, reducing the impact on critical loads and extending their lifespan, thereby lowering maintenance and replacement costs. Finally, by protecting critical loads, it ensures that home appliances can quickly restart and resume normal operation after power is restored, improving overall reliability and user satisfaction.
[0111] In this application, after the home appliance loses power, higher-priority cached data can be saved first, then higher-priority loads can be shut down, then lower-priority cached data can be saved, and finally lower-priority loads can be shut down. Alternatively, higher-priority loads can be shut down first, then higher-priority cached data can be saved, then lower-priority loads can be shut down, and finally lower-priority cached data can be saved.
[0112] In this application, the cached data generated by the wired controller during operation is saved by storing it on a remote server or in local non-volatile memory. This ensures that the cached data generated by the wired controller during operation is not lost after a power outage, guaranteeing data integrity and improving the reliability of the appliance in subsequent operation. Furthermore, after saving the cached data generated by the wired controller during operation, the wired controller enters a standby state, waiting for power to be restored before being reconnected. After the appliance is reconnected, the power generation equipment can automatically detect and restore its state before the power outage based on a fault recovery mechanism.
[0113] The following describes an apparatus embodiment of this application, which can be used to execute the data storage method described above in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the data storage method described above in this application.
[0114] See Figure 3 The diagram shows a block diagram of a data storage device according to an embodiment of this application. The device is located in a home appliance, which includes a control board and a wired controller.
[0115] like Figure 3 As shown, the data storage device 300 according to an embodiment of this application includes: a storage unit 302.
[0116] The storage unit is used to save the cached data generated by the wired controller during operation based on the power stored in the control board after the home appliance loses power.
[0117] In some embodiments of this application, based on the foregoing scheme, the device further includes: an acquisition unit, configured to acquire a first voltage value supplied by an external power source to the control board, and if the first voltage value is lower than a first preset voltage threshold, determine that the home appliance is powered off; or acquire a second voltage value supplied by the control board to the wired controller, and if the second voltage value is lower than a second preset voltage threshold, determine that the home appliance is powered off.
[0118] In some embodiments of this application, based on the foregoing scheme, the device further includes: a shutdown unit, used to shut down the load of the control board based on the power stored in the control board before saving the cached data generated by the wired controller during operation.
[0119] In some embodiments of this application, based on the foregoing scheme, the shutdown unit is configured to: obtain the initial power value stored in the control board, and determine the power consumption value required to shut down the load of the control board; determine the difference between the initial power value and the power consumption value as the remaining power value; if the remaining power value is not sufficient to save the cached data generated by the wired controller during operation, then before saving the cached data generated by the wired controller during operation, shut down the load of the control board based on the power stored in the control board.
[0120] In some embodiments of this application, based on the foregoing scheme, the shutdown unit is configured to: determine a first duration for which the remaining power supports the cache data saving action based on the remaining power value and the power consumption value of the wired controller; determine a second duration for which the cache data needs to be saved based on the amount of cache data and the data saving rate of the cache data; if the first duration is less than the second duration, then determine that the remaining power value is not sufficient to save the cache data generated by the wired controller during operation.
[0121] In some embodiments of this application, based on the foregoing scheme, the device further includes: a shutdown unit, configured to, while saving the cached data generated by the wired controller during operation, shut down the load of the control board based on the power stored in the control board; or, after saving the cached data generated by the wired controller during operation, shut down the load of the control board based on the power stored in the control board.
[0122] In some embodiments of this application, based on the foregoing scheme, the device further includes: a triggering unit, configured to acquire a target data volume threshold, wherein the target data volume threshold is less than or equal to a pre-set initial data volume threshold for triggering the execution of a cache data saving action; if the amount of cache data generated by the wired controller during operation is greater than or equal to the target data volume threshold, then a step of saving the cache data generated by the wired controller during operation based on the power stored in the control board is triggered.
[0123] In some embodiments of this application, based on the foregoing scheme, the triggering unit is configured to: obtain the initial power value stored in the control board, and determine the power consumption value required to shut down the load of the control board; determine the difference between the initial power value and the power consumption value as the remaining power value; determine the ratio between the remaining power value and the power consumption value required to store a unit amount of cached data, and determine the minimum value between the ratio and the initial data volume threshold as the target data volume threshold.
[0124] In some embodiments of this application, based on the foregoing scheme, the storage unit 302 is configured to: determine the priority of each cached data generated by the wired controller during operation; and store the cached data generated by the wired controller during operation in descending order of priority.
[0125] In some embodiments of this application, based on the aforementioned scheme, the home appliance includes a multi-split air conditioner, which is configured with a main controller and at least one secondary controller, wherein the priority of cached data in the main controller is higher than the priority of cached data in the secondary controller.
[0126] In some embodiments of this application, based on the foregoing scheme, the shutdown unit is configured to: determine the priority of each load of the control board; and shut down the loads of the control board in descending order of priority.
[0127] In some embodiments of this application, based on the foregoing scheme, the storage unit 302 is configured to: save the cached data generated by the wired controller during operation to a remote server or a local non-volatile memory.
[0128] Based on the same inventive concept, embodiments of this application provide a computer program product, the computer program product including computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor, so as to cause a computer device having the processor to perform the operations performed by the data storage method described above.
[0129] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing at least one computer program instruction, which is loaded and executed by a processor to perform the operations performed by the data storage method described above.
[0130] Based on the same inventive concept, this application also provides a household appliance, see reference. Figure 4 The diagram shows a structural schematic of a home appliance according to an embodiment of this application. The home appliance includes one or more memories 404, one or more processors 402, and at least one computer program (computer program instruction) stored in the memory 404 and executable on the processor 402. When the processor 402 executes the computer program, it implements the data storage method as described above.
[0131] Among them, Figure 4In this document, a bus architecture (represented by bus 400) is used. Bus 400 may include interconnects of buses and bridges of arbitrary data volume. Bus 400 links together various circuits, including one or more processors represented by processor 402 and memory represented by memory 404. Bus 400 may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 405 provides an interface between bus 400 and receiver 401 and transmitter 403. Receiver 401 and transmitter 403 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 402 is responsible for managing bus 400 and general processing, while memory 404 can be used to store data used by processor 402 during operation.
[0132] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or code on or transmitted via a computer-readable medium. Other embodiments and implementations are within the scope and spirit of this application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Furthermore, the functional units may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0134] The units described as separate components may or may not be physically separate. Similarly, the components of the control device may or may not be physical units; they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0135] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer program instructions, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0136] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data storage method, characterized in that, The method is applied to a home appliance, the home appliance including a control board and a wired controller, and the method includes: After the home appliance loses power, the cached data generated by the wired controller during operation is saved based on the power stored in the control board.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the first voltage value of the power supply from the external power source to the control board. If the first voltage value is lower than a first preset voltage threshold, determine that the home appliance is powered off; or The second voltage value supplied by the control board to the wired controller is obtained. If the second voltage value is lower than the second preset voltage threshold, it is determined that the home appliance is powered off.
3. The method according to claim 1, characterized in that, The method further includes: Before saving the cached data generated by the wired controller during operation, the load on the control board is turned off based on the power stored in the control board.
4. The method according to claim 3, characterized in that, The method further includes: Obtain the initial power value stored in the control board, and determine the power consumption value required to shut down the load of the control board; The difference between the initial power value and the power consumption value is determined as the remaining power value; If the remaining power value is insufficient to save the cached data generated during the operation of the wired controller, the load on the control board will be turned off based on the power stored in the control board before saving the cached data generated during the operation of the wired controller.
5. The method according to claim 4, characterized in that, The method further includes: Based on the remaining battery power and the power consumption of the wired controller, determine the first duration for which the remaining battery power supports the execution of the cache data saving action; Based on the amount of cached data and the data retention rate of the cached data, determine the second duration required to retain the cached data; If the first duration is less than the second duration, it is determined that the remaining battery power is insufficient to save the cached data generated by the remote controller during operation.
6. The method according to claim 1, characterized in that, The method further includes: While saving the cached data generated by the wired controller during operation, the load on the control board is turned off based on the power stored in the control board; or After saving the cached data generated by the wired controller during operation, the load on the control board is turned off based on the power stored in the control board.
7. The method according to claim 6, characterized in that, The method further includes: Obtain a target data volume threshold, wherein the target data volume threshold is less than or equal to a pre-set initial data volume threshold used to trigger the execution of cache data saving action; If the amount of cached data generated by the wired controller during operation is greater than or equal to the target data amount threshold, then the step of saving the cached data generated by the wired controller during operation based on the power stored in the control board is triggered.
8. The method according to claim 7, characterized in that, The threshold for acquiring the target data volume includes: Obtain the initial power value stored in the control board, and determine the power consumption value required to shut down the load of the control board; The difference between the initial power value and the power consumption value is determined as the remaining power value; Determine the ratio between the remaining battery power and the battery power required to store a unit of cached data, and determine the minimum of the ratio and the initial data volume threshold as the target data volume threshold.
9. The method according to any one of claims 1 to 8, characterized in that, The process of saving cached data generated during the operation of the wired controller includes: Determine the priority of each cached data generated by the wired controller during operation; The cached data generated by the wired controller during operation is saved in descending order of priority.
10. The method according to claim 9, characterized in that, The home appliance includes a multi-split air conditioner, which is equipped with a main controller and at least one secondary controller. The cached data in the main controller has a higher priority than the cached data in the secondary controller.
11. The method according to any one of claims 3 to 8, characterized in that, The process of shutting down the load on the control board includes: Determine the priority of each load on the control board; The loads on the control board are shut down in descending order of load priority.
12. The method according to any one of claims 1 to 8, characterized in that, The method further includes: The cached data generated by the wired controller during operation is saved to a remote server or a local non-volatile memory.
13. A data storage device, characterized in that, The device is installed in a home appliance, the home appliance including a control board and a wired controller, and the device includes: The storage unit is used to save the cached data generated by the wired controller during operation based on the power stored in the control board after the home appliance loses power.
14. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform the method as claimed in any one of claims 1 to 12.
15. A household appliance, characterized in that, The home appliance includes one or more processors and one or more memories, wherein the one or more memories store at least one piece of program code, which is loaded and executed by the one or more processors to implement the method as claimed in any one of claims 1 to 12.