CN104216304A - Method for improving reliability of cache data of household appliances - Google Patents
Method for improving reliability of cache data of household appliances Download PDFInfo
- Publication number
- CN104216304A CN104216304A CN201310212235.2A CN201310212235A CN104216304A CN 104216304 A CN104216304 A CN 104216304A CN 201310212235 A CN201310212235 A CN 201310212235A CN 104216304 A CN104216304 A CN 104216304A
- Authority
- CN
- China
- Prior art keywords
- data
- storage area
- running state
- stored
- household electrical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000005406 washing Methods 0.000 claims description 6
- 238000004378 air conditioning Methods 0.000 claims 1
- 230000007547 defect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 241000209094 Oryza Species 0.000 description 4
- 235000007164 Oryza sativa Nutrition 0.000 description 4
- 235000009566 rice Nutrition 0.000 description 4
- 238000010411 cooking Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000001035 drying Methods 0.000 description 1
- 235000021395 porridge Nutrition 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000002791 soaking Methods 0.000 description 1
- 235000014347 soups Nutrition 0.000 description 1
- 238000010025 steaming Methods 0.000 description 1
- 238000010257 thawing Methods 0.000 description 1
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本发明公开了一种提高家电缓存数据可靠性的方法,该方法包括:A、设定待保存的运行状态需求项,将用于保存程序控制运行状态的存储器划分出多个存储区域,根据设定内容分别依次将运行状态数据存入其中一个存储区域;B、当设备重新上电时,先进行初始化操作;C、读取所述存储器的当前存储区域的状态数据,然后执行步骤D;D、判断运行状态数据是否正常;若正常,则执行步骤E;否则,将读取目标指向前一个存储区域,然后执行步骤C;E、按照当前的状态数据恢复设备掉电前的运行状态。采用本发明的方法,能够克服电源不稳定时控制板程序存写数据出错的缺陷,提高缓存数据的可靠性。
The invention discloses a method for improving the reliability of home appliance cache data. The method includes: A. Setting the running state requirement item to be saved, dividing the memory for saving the program control running state into a plurality of storage areas, and according to the setting Set the content and store the running status data in one of the storage areas in turn; B. When the device is powered on again, perform an initialization operation first; C. Read the status data of the current storage area of the memory, and then perform step D; D 1. Determine whether the running state data is normal; if normal, then execute step E; otherwise, point the read target to the previous storage area, and then execute step C; E. Restore the running state of the device before power-off according to the current state data. By adopting the method of the invention, it is possible to overcome the defect that the control board program stores and writes data errors when the power supply is unstable, and improves the reliability of the cached data.
Description
技术领域 technical field
本发明涉及家用电器应用领域,尤其涉及一种提高家电缓存数据可靠性的方法。 The invention relates to the application field of household appliances, in particular to a method for improving the reliability of cached data of household appliances.
背景技术 Background technique
电子设备的掉电记忆,也叫停电补偿或停电恢复,是控制板断电再上电之后,重新恢复设备掉电前的当时状态的一种有效措施。其原理主要是在设备运转过程中将设置及状态数据存储在存储器中,该过程如图1A所示。 The power-off memory of electronic equipment, also called power-off compensation or power-off recovery, is an effective measure to restore the current state of the equipment before power-off after the control board is powered off and on again. Its principle is mainly to store the setting and state data in the memory during the operation of the equipment, and the process is shown in Figure 1A.
当设备掉电再重新上电后先去读取存储器中的数据,用以还原之前的状态:若存储器中的数据正常,则恢复掉电之前的当时状态;若数据异常,则恢复到设备的原始状态。该过程如图1B所示。 When the device is powered off and then powered on again, first read the data in the memory to restore the previous state: if the data in the memory is normal, restore the current state before the power failure; if the data is abnormal, restore to the state of the device Original state. This process is shown in Figure 1B.
但是如果设备在运行环境不理想的状态下,如,电源不稳定时,设备的控制板会出现存写数据失败的问题,导致设备重新上电时无法恢复掉电时的状态。现有家电设备在程序控制下的运行过程中,如果遇到状态变化时就随时会将当前状态写入存储器,设备在掉电后再上电时会先去读取存储器中存储的数据。但是,如果在写入数据时发生了掉电,数据就会不完整,再上电时读取出的数据就不是正确的,此时,若利用该数据恢复掉电之前的状态时就会导致出错,无法正确恢复掉电前的设备状态。 However, if the device is in an unsatisfactory operating environment, for example, when the power supply is unstable, the control board of the device will fail to store and write data, which will cause the device to fail to restore the state when the power is turned off. During the operation of existing home appliances under the control of the program, if the state changes, the current state will be written into the memory at any time. When the device is powered off and then powered on, it will first read the data stored in the memory. However, if a power failure occurs when writing data, the data will be incomplete, and the data read when the power is turned on again will not be correct. At this time, if the data is used to restore the state before the power failure, it will cause An error occurred, and the device state before the power failure could not be restored correctly.
发明内容 Contents of the invention
有鉴于此,本发明的主要目的在于提供一种提高家电缓存数据可靠性的方法,能够克服电源不稳定时控制板程序存写数据出错的缺陷,以提高缓存数据的可靠性。 In view of this, the main purpose of the present invention is to provide a method for improving the reliability of cached data in household appliances, which can overcome the defect of error in storing and writing data in the control board program when the power supply is unstable, so as to improve the reliability of cached data.
为达到上述目的,本发明的技术方案是这样实现的: In order to achieve the above object, technical solution of the present invention is achieved in that way:
一种提高家电缓存数据可靠性的方法,该方法包括: A method for improving the reliability of home appliance cache data, the method comprising:
A、设定待保存的运行状态需求项,将用于保存程序控制运行状态的存储器划分出多个存储区域,根据设定内容分别依次将运行状态数据存入其中一个存储区域; A. Set the running state requirement item to be saved, divide the memory used to save the program control running state into multiple storage areas, and store the running state data in one of the storage areas in turn according to the setting content;
B、当设备重新上电时,先进行初始化操作; B. When the device is powered on again, the initialization operation is performed first;
C、读取所述存储器的当前存储区域的状态数据,然后执行步骤D; C. Read the state data of the current storage area of the memory, and then execute step D;
D、判断运行状态数据是否正常;若正常,则执行步骤E;否则,将读取目标指向前一个存储区域,然后执行步骤C; D. Determine whether the running status data is normal; if normal, execute step E; otherwise, point the read target to the previous storage area, and then execute step C;
E、按照当前的状态数据恢复设备掉电前的运行状态。 E. According to the current state data, restore the operating state of the device before power failure.
其中:所述家电,主要包括电视机、洗衣机、冰箱、空调、电饭煲、电烤箱和微波炉。 Wherein: the household appliances mainly include television sets, washing machines, refrigerators, air conditioners, electric cookers, electric ovens and microwave ovens.
所述存储器的存储区域的数量大于2。 The number of storage areas of the memory is greater than two.
将设备运行状态数据存入所述存储器的存储区域时,按时间先后顺序存入或随机存入。 When storing the equipment operating state data into the storage area of the memory, it is stored in chronological order or randomly.
当所述存储器的存储区域无空闲空间时,按存入运行状态数据的时间先后,用当前待写入的运行状态数据覆盖存入最早存入状态数据的存储区域。 When there is no free space in the storage area of the memory, the storage area where the state data is stored earliest is overwritten with the current operation state data to be written according to the time sequence of storing the operation state data.
步骤D所述判断运行状态数据是否正常,具体为:设备掉电前写入的设备运行状态数据是否完整。 In step D, it is judged whether the operation state data is normal, specifically: whether the device operation state data written before the device is powered off is complete.
本发明所提供的提高家电缓存数据可靠性的方法,具有以下优点: The method for improving the reliability of home appliance cache data provided by the present invention has the following advantages:
采用本发明方法的家用电器,通过在现有存储器中增设多个存储区域,保存不同时间点的设备运行状态数据,在重新上电后通过逻辑判断即可恢复出最理想的完整缓存数据,可以使掉电记忆出错的几率大大降低,从而提高了缓存数据的可靠性。 The household appliance adopting the method of the present invention, by adding a plurality of storage areas in the existing memory, saves the equipment operation state data at different time points, and can recover the most ideal complete cache data through logical judgment after power on again, which can The probability of power-off memory error is greatly reduced, thereby improving the reliability of cached data.
附图说明 Description of drawings
图1A为现有电子设备将状态数据存储在存储器中的过程示意图; FIG. 1A is a schematic diagram of the process of storing state data in a memory in an existing electronic device;
图1B为现有电子设备按图1A所示状态数据恢复设备状态的过程示意图; Fig. 1B is a schematic diagram of the process of restoring the state of the device according to the state data shown in Fig. 1A for the existing electronic device;
图2A为本发明的家电将缓存数据写入正序轮换写入区的过程示意图; FIG. 2A is a schematic diagram of the process of writing cached data into the positive sequence rotation writing area by the household appliance of the present invention;
图2B为本发明的家电利用图2A所示缓存数据恢复掉电前状态的过程示意图。 FIG. 2B is a schematic diagram of the process of restoring the state of the home appliance before the power failure by utilizing the cached data shown in FIG. 2A according to the present invention.
具体实施方式 Detailed ways
下面结合附图及本发明的实施例对本发明的方法作进一步详细的说明。 The method of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments of the present invention.
本发明方法的核心思想在于:对设备运行状态在不同时间点的相同功能结构的缓存数据即状态数据进行多区域分别存储备份。这样,掉电记忆的工作就是将所述缓存数据存储到存储区,在上电后先去读取对应区域的状态数据再根据数据进行状态的设置,但是在数据写入时如果掉电,则数据写入失败,整个存储区存放的数据就不完整了,通过多增加几个存储区域,在上电后通过逻辑判断可以恢复出最理想的完整缓存数据,这样使掉电记忆出错的几率大大降低。 The core idea of the method of the present invention is to separately store and back up the cached data of the same functional structure, that is, the status data, in different time points in the operating status of the equipment. In this way, the work of power-off memory is to store the cached data in the storage area. After power-on, first read the state data of the corresponding area and then set the state according to the data, but if the power is off when the data is written, then If data writing fails, the data stored in the entire storage area will be incomplete. By adding a few more storage areas, the most ideal complete cache data can be recovered through logical judgment after power-on, which greatly increases the probability of power-off memory errors. reduce.
图2A为本发明的家电将缓存数据写入正序轮换写入区的过程示意图。如图2A所示,该过程包括: FIG. 2A is a schematic diagram of the process of writing cached data into the positive sequence rotation writing area by the household appliance of the present invention. As shown in Figure 2A, the process includes:
步骤201:设定家电待保存的运行状态需求项。 Step 201: Set the running status requirement items of the household appliances to be saved.
这里,所述家电,主要包括电视机、洗衣机、冰箱、空调、电饭煲、电烤箱、微波炉等。所述待保存的运行状态需求项,若针对洗衣机,可以是自动或人工设定的洗衣机工作模式,如浸泡、洗涤、脱水、烘干等的各项工作顺序及其时长。若针对冰箱,则可以是冷藏室、冷冻室的温度设置。若是微波炉,则可以是设定的工作模式,如光波、微波或光波+微波混合模式,还可以是当前正在工作的状态,如解冻、蒸煮、烧烤等。若是电饭煲,可以是预设定时启动工作的时间,还可以是煲饭模式,如炖汤、煲粥、蒸饭等。 Here, the home appliances mainly include televisions, washing machines, refrigerators, air conditioners, rice cookers, electric ovens, microwave ovens, and the like. The operating status requirement item to be saved, if it is for a washing machine, can be the working mode of the washing machine set automatically or manually, such as the working sequence and duration of soaking, washing, dehydrating, drying, etc. For refrigerators, it can be the temperature setting of the refrigerator compartment and the freezer compartment. If it is a microwave oven, it can be a set working mode, such as light wave, microwave or light wave + microwave mixed mode, and it can also be a current working state, such as thawing, cooking, grilling, etc. If it is a rice cooker, it can be a preset time to start work, or it can be a rice cooking mode, such as stewing soup, cooking porridge, steaming rice, etc.
步骤202:将用于保存程序控制运行状态的存储器划分出多个存储区域,根据设定内容分别依次将运行状态数据存入其中一个存储区域。 Step 202: Divide the memory for storing the running state of the program control into multiple storage areas, and sequentially store the running state data into one of the storage areas according to the setting content.
这里,所述的存储区域的数量大于2。将运行状态数据存入所述多个存储区域时,既可以按一定顺序存入也随机存入。存入所述运行状态数据时,可按一定的预设时间间隔(如每2分钟/次)写入存储区域,当存储区域无空闲空间时,可按存入运行状态数据的时间先后,用当前待写入的运行状态数据覆盖存入最早存入状态数据的存储区域。 Here, the number of the storage areas is greater than two. When storing the running state data into the plurality of storage areas, it can be stored in a certain order or randomly. When storing the running status data, it can be written into the storage area according to a certain preset time interval (such as every 2 minutes/time). The running status data currently to be written overwrites the storage area where the status data is stored earliest.
图2B为本发明的家电利用图2A所示缓存数据恢复掉电前状态的过程示意图。如图2B所示,该过程包括: FIG. 2B is a schematic diagram of the process of restoring the state of the home appliance before the power failure by utilizing the cached data shown in FIG. 2A according to the present invention. As shown in Figure 2B, the process includes:
步骤203:当设备重新上电时,进行初始化操作。 Step 203: Perform an initialization operation when the device is powered on again.
步骤204:读取存储器的当前存储区域的状态数据,然后执行步骤205。 Step 204: read the status data of the current storage area of the memory, and then execute step 205.
步骤205:判断运行状态数据是否正常;若正常,则执行步骤206;否则,将读取目标指向前一个存储区域,然后执行步骤204。 Step 205: Determine whether the running status data is normal; if normal, execute step 206; otherwise, point the read target to the previous storage area, and then execute step 204.
这里,所述数据是否正常,可以是指设备掉电前写入的设备运行状态数据是否完整。 Here, whether the data is normal may refer to whether the device operation status data written before the device is powered off is complete.
步骤206:按照当前的状态数据恢复设备掉电前的运行状态,然后结束本次恢复过程。 Step 206: Restore the operating state of the device before the power failure according to the current state data, and then end the restoration process.
而本方法则是通过使用多个存储区域,在存储时分别依次存储数据,上电后判断多个区域的数据是否完整,如果完整则采用最新的数据,如果不完整则采用前一次存储的数据。例如,针对有只有2个存储区域的情况,上电后先判断所述两个区域的数据是否完整,如果完整则采用最新的数据,如果不完整则采用前一次存储的数据。 However, this method uses multiple storage areas to store data sequentially during storage. After power-on, it is judged whether the data in multiple areas is complete. If it is complete, the latest data is used. If it is incomplete, the previous stored data is used. . For example, in the case of only two storage areas, after power-on, it is first judged whether the data in the two areas are complete, if complete, the latest data is used, and if not, the previous stored data is used.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。 The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310212235.2A CN104216304A (en) | 2013-05-31 | 2013-05-31 | Method for improving reliability of cache data of household appliances |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310212235.2A CN104216304A (en) | 2013-05-31 | 2013-05-31 | Method for improving reliability of cache data of household appliances |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104216304A true CN104216304A (en) | 2014-12-17 |
Family
ID=52097924
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310212235.2A Pending CN104216304A (en) | 2013-05-31 | 2013-05-31 | Method for improving reliability of cache data of household appliances |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104216304A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105376324A (en) * | 2015-12-01 | 2016-03-02 | 九阳股份有限公司 | Network control method of food processor |
| CN106130812A (en) * | 2016-06-02 | 2016-11-16 | 美的集团股份有限公司 | A kind of method and apparatus that equipment state is provided |
| CN106264063A (en) * | 2015-05-26 | 2017-01-04 | 佛山市顺德区美的电热电器制造有限公司 | Electric cooker |
| CN114326427A (en) * | 2021-12-29 | 2022-04-12 | Tcl家用电器(合肥)有限公司 | A control method, device, intelligent device and storage medium for an intelligent device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN2401836Y (en) * | 1999-12-06 | 2000-10-18 | 广东科龙空调器有限公司 | Computerized air conditioner controller |
| WO2001095106A2 (en) * | 2000-06-02 | 2001-12-13 | Sun Microsystems, Inc. | Virtual heap for a virtual machine |
| US6763440B1 (en) * | 2000-06-02 | 2004-07-13 | Sun Microsystems, Inc. | Garbage collection using nursery regions for new objects in a virtual heap |
| CN1936853A (en) * | 2005-09-22 | 2007-03-28 | 康佳集团股份有限公司 | Data cut-off protection and repairing method of inlaid apparatus |
| CN101944119A (en) * | 2010-09-21 | 2011-01-12 | 国网电力科学研究院 | Real-time event management method for intelligent electronic equipment |
| CN102662852A (en) * | 2012-03-20 | 2012-09-12 | 山东省科学院自动化研究所 | Method for storing nonvolatile data by using MCU internal data Flash |
-
2013
- 2013-05-31 CN CN201310212235.2A patent/CN104216304A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN2401836Y (en) * | 1999-12-06 | 2000-10-18 | 广东科龙空调器有限公司 | Computerized air conditioner controller |
| WO2001095106A2 (en) * | 2000-06-02 | 2001-12-13 | Sun Microsystems, Inc. | Virtual heap for a virtual machine |
| US6763440B1 (en) * | 2000-06-02 | 2004-07-13 | Sun Microsystems, Inc. | Garbage collection using nursery regions for new objects in a virtual heap |
| CN1936853A (en) * | 2005-09-22 | 2007-03-28 | 康佳集团股份有限公司 | Data cut-off protection and repairing method of inlaid apparatus |
| CN101944119A (en) * | 2010-09-21 | 2011-01-12 | 国网电力科学研究院 | Real-time event management method for intelligent electronic equipment |
| CN102662852A (en) * | 2012-03-20 | 2012-09-12 | 山东省科学院自动化研究所 | Method for storing nonvolatile data by using MCU internal data Flash |
Non-Patent Citations (2)
| Title |
|---|
| 李杰: "一种单片机掉电数据保护的方法", 《电子世界》 * |
| 胡一飞 等: "NAND Flash上均匀损耗与掉电恢复在线测试", 《单片机与嵌入式系统应用》 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106264063A (en) * | 2015-05-26 | 2017-01-04 | 佛山市顺德区美的电热电器制造有限公司 | Electric cooker |
| CN105376324A (en) * | 2015-12-01 | 2016-03-02 | 九阳股份有限公司 | Network control method of food processor |
| CN106130812A (en) * | 2016-06-02 | 2016-11-16 | 美的集团股份有限公司 | A kind of method and apparatus that equipment state is provided |
| CN106130812B (en) * | 2016-06-02 | 2019-03-15 | 美的集团股份有限公司 | It is a kind of that the method and apparatus of equipment state are provided |
| CN114326427A (en) * | 2021-12-29 | 2022-04-12 | Tcl家用电器(合肥)有限公司 | A control method, device, intelligent device and storage medium for an intelligent device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104216304A (en) | Method for improving reliability of cache data of household appliances | |
| TWI515660B (en) | Firmware variable update method | |
| KR20160049956A (en) | Mobile divece and operating method thereof | |
| US20170277603A1 (en) | Data saving method, device and terminal | |
| CN109918234B (en) | Metadata recovery method, device, equipment and medium based on SSD | |
| CN103514063B (en) | Method and device for processing FLASH data | |
| CN204743704U (en) | Electric rice cooker | |
| CN201707642U (en) | Device for reducing powering up instant power consumption of disk array | |
| CN109507916B (en) | Method, device, server and storage medium for controlling recovery work of household appliance | |
| CN104570821B (en) | Integrated circuit and operation method thereof | |
| CN105867850A (en) | Information adjusting method and electronic equipment | |
| TWI482004B (en) | Processing device and method of system booting failure | |
| CN112804772B (en) | Control method, system and device of electric heater and storage medium | |
| CN110925954A (en) | Defrosting mode starting or not judging method, processor, air conditioner and heat pump water heater | |
| TW201809943A (en) | Temperature controller, electronic device having the same and conttrol method thereof | |
| CN113806119B (en) | Memory card processing method, device, equipment and storage medium | |
| CN105465951B (en) | Method and device for protecting compressor | |
| TWI497319B (en) | Update method of baseboard management controller | |
| CN117267926A (en) | Air conditioner control method and device, storage medium and air conditioner | |
| US12163669B2 (en) | Cooking appliance with electrical cooking element drying operations | |
| CN114816230B (en) | Flash data storage method, device and household appliance | |
| WO2019137139A1 (en) | Air conditioning equipment, control device, and display screen fault handling method | |
| CN104374035A (en) | Power supply control method and device of air conditioner and air conditioner | |
| JP2013228118A (en) | Air conditioner | |
| CN112148100B (en) | Embedded equipment control method, device and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20141217 |