CN104111893A - Data storage method - Google Patents

Data storage method Download PDF

Info

Publication number
CN104111893A
CN104111893A CN201310250976.XA CN201310250976A CN104111893A CN 104111893 A CN104111893 A CN 104111893A CN 201310250976 A CN201310250976 A CN 201310250976A CN 104111893 A CN104111893 A CN 104111893A
Authority
CN
China
Prior art keywords
data
storage space
group
storage
memory paragraph
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
Application number
CN201310250976.XA
Other languages
Chinese (zh)
Inventor
全永兵
王明
刘伟君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhu Midea Kitchen and Bath Appliances Manufacturing Co Ltd
Original Assignee
Wuhu Midea Kitchen and Bath Appliances Manufacturing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhu Midea Kitchen and Bath Appliances Manufacturing Co Ltd filed Critical Wuhu Midea Kitchen and Bath Appliances Manufacturing Co Ltd
Priority to CN201310250976.XA priority Critical patent/CN104111893A/en
Publication of CN104111893A publication Critical patent/CN104111893A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides a data storage method. The data storage method includes the following steps: acquiring N bytes, to be used for storing data, from a FLASH of a control chip; dividing the N bytes into a groups of storage spaces, wherein each group of storage spaces includes two storage sections, the first storage section is used for storing rewritten times of the group of storage spaces, and the second storage section is used for storing data; reading the data of the first storage section in each group of storage spaces; judging whether the data of the first storage section are smaller than preset number of times or not; when the data of the first storage section are smaller than the preset number of times, storing the data in the second storage section of the group of storage spaces, and controlling the data in the first storage section of the group of storage spaces to be added with one. By the data storage method, an independent storage chip is not required to be arranged, cost is low, rewritable times of the data can be increased, and performance of product is improved.

Description

The storage means of data
Technical field
The present invention relates to technical field of data storage, particularly a kind of storage means of data.
Background technology
Along with the development of household electrical appliance technology, existing household electrical appliances generally all have power-failure memory function, the parameters of the household electrical appliances that again power on after having a power failure before can remembering power failure (can referred to as power-off parameter), such as open state, set temperature etc.The realization of in prior art, the power-off parameter of household electrical appliance being remembered mainly contains two kinds of modes, a kind of mode is by EEPROM(Electrically Erasable Programmable Read-Only Memory, electric erasable and programmable is collected ROM (read-only memory)) preservation power-off parameter, it is often erasable, and erasable number of times reaches 1,000,000 times.The schematic diagram that is illustrated in figure 1 the control panel that adopts EEPROM storage power-off data, except main control chip 101, also needs to arrange independent EEPROM storage chip 102.Another kind of mode is that the FLASH that the main control chip by household electrical appliance control panel carries preserves power-off parameter, and this mode does not need to arrange separately storage chip.
The shortcoming of prior art is: adopt EEPROM storage chip 102 storage data need to chip be set separately, cost is higher; And the FLASH that adopts main control chip stores data, due to the technological reason of FLASH itself, it can repeat erasable number of times only has 10,000 times, can not meet repeatedly the needs of save data.
Summary of the invention
Object of the present invention is intended to solve at least to a certain extent one of above-mentioned technical matters.
For this reason, the object of the invention is to propose a kind of storage means of data, this storage means does not need storage chip is set separately, and cost is lower, and can improve the erasable number of times of data, improves the performance of product.
For achieving the above object, the embodiment of the present invention proposes a kind of storage means of data, and the storage means of these data comprises the following steps: obtain N byte in the FLASH of control chip for storage data; A described N byte is divided into a group storage space, and wherein, every group of storage space comprises two memory paragraphs, and the first memory paragraph is for storing erasable number of times of this group storage space, and the second memory paragraph is used for storing data; Read the data of described the first memory paragraph in described every group of storage space; Whether the data that judge described the first memory paragraph are less than preset times; When the data of described the first memory paragraph are less than preset times, data are stored in described second memory paragraph of this group storage space, and the data of controlling in described first memory paragraph of this group storage space add one.
According to the storage means of the data of the embodiment of the present invention, do not need to arrange separately storage chip, by adopting the FLASH of control chip to carry out data storage, can reduce costs, and the storage space of FLASH is divided into a group storage space, by changing data in the memory location of a group storage space, thereby the number of times that can improve the erasable data of FLASH for example can reach the erasable number of times 1,000,000 times of EEPROM storage.The data poke method of the embodiment of the present invention, in the cost-effective while, has improved the reliability of product.
Further, in one embodiment of the invention, the storage means of above-mentioned data can also comprise: when the data of described the first memory paragraph equal preset times, judge whether this group storage space is last group storage space; If not, read this group storage space next group storage space described the first memory paragraph data and judge whether the data of described the first memory paragraph are less than described preset times.
Wherein, in one embodiment of the invention, described preset times can be 10,000 times.
In addition, in another embodiment of the present invention, the storage means of above-mentioned data also comprises: judge that whether described a group storage space is for storing first data; If so every group of storage space, controlling described a group storage space carries out initialization.
In another embodiment of the present invention, the value of N and a can be: N=2200, a=100.
The aspect that the present invention is additional and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Accompanying drawing explanation
Above-mentioned and/or the additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments and obviously and easily understand, wherein:
Fig. 1 is the schematic diagram of the employing EEPROM storage data of prior art;
Fig. 2 is according to the process flow diagram of the storage means of the data of the embodiment of the present invention;
Fig. 3 is the schematic diagram of the FLASH storage data of employing control chip according to an embodiment of the invention;
Fig. 4 is the process flow diagram of the storage means of data according to an embodiment of the invention; And
Fig. 5 is the process flow diagram of the storage means of data according to another embodiment of the invention.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Below by the embodiment being described with reference to the drawings, be exemplary, only for explaining the present invention, and can not be interpreted as limitation of the present invention.
Disclosing below provides many different embodiment or example to be used for realizing different structure of the present invention.Of the present invention open in order to simplify, hereinafter the parts of specific examples and setting are described.Certainly, they are only example, and object does not lie in restriction the present invention.In addition, the present invention can be in different examples repeat reference numerals and/or letter.This repetition is in order to simplify and object clearly, itself do not indicate the relation between discussed various embodiment and/or setting.In addition, the various specific technique the invention provides and the example of material, but those of ordinary skills can recognize the property of can be applicable to of other techniques and/or the use of other materials.In addition, First Characteristic described below Second Characteristic it " on " structure can comprise that the first and second Characteristics creations are for the direct embodiment of contact, also can comprise the embodiment of other Characteristics creation between the first and second features, such the first and second features may not be direct contacts.
In description of the invention, it should be noted that, unless otherwise prescribed and limit, term " installation ", " being connected ", " connection " should be interpreted broadly, for example, can be mechanical connection or electrical connection, also can be the connection of two element internals, can be to be directly connected, and also can indirectly be connected by intermediary, for the ordinary skill in the art, can understand as the case may be the concrete meaning of above-mentioned term.
Describe with reference to the accompanying drawings according to the storage means of the data of the embodiment of the present invention.
As shown in Figure 2, the storage means of the data of the embodiment of the present invention comprises the following steps:
S201, obtains N byte in the FLASH of control chip for storage data.
In one embodiment of the invention, as shown in Figure 3, can adopt the FLASH302 of control chip 301 self of the control panel of household electrical appliance to carry out data storage for example stores the power-off parameter of household electrical appliance, control chip 301 self with FLASH302 conventionally have larger storage space, more than 16K byte, be generally for example 16*1024=16384 byte, wherein can preserve fixing routine data by 12K byte, and remaining 4K byte can be used for for example power-off parameter of household electrical appliance of save data.So can obtain N byte in the FLASH302 of control chip 301 for the storage data power-off parameter of household electrical appliance for example.The value of N can be in one embodiment of the invention: N=2200, obtains 2200 bytes store power-off parameters in FLASH302.After obtaining N byte, enter step S202.
S202, is divided into a group storage space by N byte, and wherein, every group of storage space comprises two memory paragraphs, and the first memory paragraph is for storing erasable number of times of this group storage space, and the second memory paragraph is used for storing data.
After step S201 obtains individual for example 2200 bytes of N in FLASH302, N byte is divided into a group storage space, every group of storage space comprises two memory paragraphs i.e. the first memory paragraph and the second memory paragraph, wherein, the first memory paragraph is for storing erasable number of times of this group storage space, and the second memory paragraph is used for storing data.Power-off number of parameters that general household electrical appliance need to be preserved is limited can not surpass 20 bytes.The value of a can be in one embodiment of the invention: a=100.For example 2200 bytes are divided into 100 groups of storage spaces, every group of storage space comprises 22 bytes, wherein 2 bytes can be used as the first memory paragraph, for storing erasable number of times of respective sets storage space, remaining 20 bytes can be used as the second memory paragraph and for storing data, for example store the power-off parameter of household electrical appliance.After N byte being divided into a group storage space, can be by power-off Parameter storage in the second memory paragraph of every group of storage space, but, because the erasable number of times that repeats of every group of storage space of FLASH302 only has 10,000 times, so need to judge that this group storage space whether can data writing according to the data of the first memory paragraph of every group of storage space, enter step S203.
S203, reads the data of the first memory paragraph in every group of storage space.
Because the erasable number of times that repeats of every group of storage space of FLASH302 only has 10,000 times, so need to judge whether data to be write to this group according to the number of times of every group of storage space, need to read the data of the first memory paragraph in every group of storage space, and enter step S204.
S204, judges whether the data of the first memory paragraph are less than preset times.
In one embodiment of the invention, preset times can be 10,000 times, it is the erasable number of times of FLASH302, in other words, at step S203, read after the data of the first memory paragraph of every group of storage space, whether the data that judge the first memory paragraph are less than 10,000 times, when for example the first memory paragraph data are less than 10,000 times when the data of the first memory paragraph are less than preset times, enter step S205.
S205, is stored in data in the second memory paragraph of this group storage space, and the data of controlling in the first memory paragraph of this group storage space add one.
At step S204, judge that the data of the first memory paragraph are less than preset times for example 10,000 times time, the data of needs storage are stored in the second memory paragraph of this group storage space, simultaneously, after in the second memory paragraph that data is stored in to this group storage space, the data of controlling in the first memory paragraph of this group storage space add one, represent that the data storage number of times of this group storage space in the data space of FLASH302 has increased once.
It should be noted that, when needing for example power-off parameter of save data at every turn, all need to read by step S203 the data of the first memory paragraph in every group of storage space, and judge by step S204 whether the data in the first memory paragraph are less than preset times for example 10,000 times, and when the first memory paragraph is less than preset times, by step S205 by data for example power-off Parameter storage in the second memory paragraph of this group storage space, and the data of the first memory paragraph of this group storage space are added to one.In addition, in one embodiment of the invention, as shown in Figure 4, also comprise the steps:
S401, when the data of the first memory paragraph equal preset times, judges whether this group storage space is last group storage space.
At step S204, judge that the data of the first memory paragraph equal preset times for example 10,000 times time, the erasable number of times that represents this group storage space is full, cannot store again data, judge whether this group storage space is last group in a group storage space, say, whether the erasable number of times that judges a group storage space is all full, if so, enters step S402.If not, this group storage space is not last group in a group storage space, in other words, in a group storage space, also have other erasable number of times less than storage space group, enter step S403.
S402, a group storage space of FLASH cannot be stored data again.
S403, read this group storage space next group storage space the first memory paragraph data and judge whether the data of the first memory paragraph are less than preset times.
If it is not last group of a group storage space that step S401 judges this group storage space, be in a group storage space, also have erasable number of times less than storage space group, read the data of the first memory paragraph of next group storage space of this group storage space, and whether the data that judge this first memory paragraph be less than preset times for example 10,000 times, return to step S204.So circulation, until the erasable number of times of a group storage space in FLASH302 is all expired, FLASH302 cannot store data again.
Can find out, although a of the FLASH302 of control chip 301 group storage space for example in 100 groups the erasable number of times of every group of storage space be preset times for example 10,000 times, but by change data at FLASH302 the memory location at 100 groups of storage spaces, can make the storage number of times of data reach 1,000,000 times of EEPROM, reach the object of using the FLASH302 simulation EEPROM storage data that control chip 301 carries.In storage data full in the situation that, can also provide prompting so that user knows in FLASH302 has write 1,000,000 times.
In one embodiment of the invention, as shown in Figure 5, the storage means of above-mentioned data also comprises:
S501, judges that whether a group storage space is for storing first data.
At equipment, after for example household electrical appliance power on, first judge that a group storage space of FLASH302, whether for storing first data, if store first data, enters step S502, if not storing first data, return to step S203.
S502, every group of storage space controlling a group storage space carries out initialization.
If a group storage space in step S501 judgement FLASH302 is for carrying out first data storage, control every group of storage space and carry out initialization, the first memory paragraph and the second memory paragraph that are about to every group of storage space all carry out assignment zero, carry out zero clearing to facilitate data storage.At every group of storage space controlling a group storage space, complete after initialization, if storage data are returned to step S203.
In sum, according to the storage means of the data of the embodiment of the present invention, by adopting the FLASH of control chip to carry out data storage, can reduce costs, and the storage space of FLASH is divided into a group storage space, by changing data in the memory location of a group storage space, thereby the number of times that can improve the erasable data of FLASH for example can reach the erasable number of times 1,000,000 times of EEPROM storage.The data poke method of the embodiment of the present invention, in the cost-effective while, has improved the reliability of product.
In process flow diagram or any process of otherwise describing at this or method describe and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of the step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
The logic and/or the step that in process flow diagram, represent or otherwise describe at this, for example, can be considered to for realizing the sequencing list of the executable instruction of logic function, may be embodied in any computer-readable medium, for instruction execution system, device or equipment (as computer based system, comprise that the system of processor or other can and carry out the system of instruction from instruction execution system, device or equipment instruction fetch), use, or use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can comprise, storage, communication, propagation or transmission procedure be for instruction execution system, device or equipment or the device that uses in conjunction with these instruction execution systems, device or equipment.The example more specifically of computer-readable medium (non-exhaustive list) comprises following: the electrical connection section (electronic installation) with one or more wirings, portable computer diskette box (magnetic device), random-access memory (ram), ROM (read-only memory) (ROM), the erasable ROM (read-only memory) (EPROM or flash memory) of editing, fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium can be even paper or other the suitable medium that can print described program thereon, because can be for example by paper or other media be carried out to optical scanning, then edit, decipher or process in electronics mode and obtain described program with other suitable methods if desired, be then stored in computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, a plurality of steps or method can realize with being stored in storer and by software or the firmware of suitable instruction execution system execution.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: have for data-signal being realized to the discrete logic of the logic gates of logic function, the special IC with suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is to come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, this program, when carrying out, comprises step of embodiment of the method one or a combination set of.

Claims (5)

1. a storage means for data, is characterized in that, comprises the following steps:
Obtain N byte in the FLASH of control chip for storage data;
A described N byte is divided into a group storage space, and wherein, every group of storage space comprises two memory paragraphs, and the first memory paragraph is for storing erasable number of times of this group storage space, and the second memory paragraph is used for storing data;
Read the data of described the first memory paragraph in described every group of storage space;
Whether the data that judge described the first memory paragraph are less than preset times; And
When the data of described the first memory paragraph are less than preset times, data are stored in described second memory paragraph of this group storage space, and the data of controlling in described first memory paragraph of this group storage space add one.
2. the storage means of data as claimed in claim 1, is characterized in that, also comprises:
When the data of described the first memory paragraph equal preset times, judge whether this group storage space is last group storage space;
If not, read this group storage space next group storage space described the first memory paragraph data and judge whether the data of described the first memory paragraph are less than described preset times.
3. the storage means of data as claimed in claim 1, is characterized in that, also comprises:
Judge that whether described a group storage space is for storing first data;
If so every group of storage space, controlling described a group storage space carries out initialization.
4. the storage means of data as claimed in claim 1, is characterized in that, described preset times is 10,000 times.
5. the storage means of data as claimed in claim 1, is characterized in that, N=2200, a=100.
CN201310250976.XA 2013-06-21 2013-06-21 Data storage method Pending CN104111893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310250976.XA CN104111893A (en) 2013-06-21 2013-06-21 Data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310250976.XA CN104111893A (en) 2013-06-21 2013-06-21 Data storage method

Publications (1)

Publication Number Publication Date
CN104111893A true CN104111893A (en) 2014-10-22

Family

ID=51708691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310250976.XA Pending CN104111893A (en) 2013-06-21 2013-06-21 Data storage method

Country Status (1)

Country Link
CN (1) CN104111893A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021122A (en) * 2016-05-12 2016-10-12 青岛海信宽带多媒体技术有限公司 Writing method and apparatus for flash data in optical module
CN106227620A (en) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 Recoverable Flash data storage method
CN113419974A (en) * 2021-06-25 2021-09-21 长虹美菱股份有限公司 Control method for prolonging power-off memory times of refrigerator
CN114047884A (en) * 2021-11-24 2022-02-15 Tcl空调器(中山)有限公司 Data storage method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1135081A (en) * 1995-01-24 1996-11-06 Lg电子株式会社 Semiconductor memory device and data writing method thereof
CN1499532A (en) * 2002-10-28 2004-05-26 Hybrid realization of error correcting code in non-volatile memory
CN101640069A (en) * 2008-08-01 2010-02-03 群联电子股份有限公司 Average wear method, storage system and controller used for flash memory
CN101819821A (en) * 2010-03-25 2010-09-01 清华大学深圳研究生院 Dynamic loss balancing method for solid state disk
CN102081577A (en) * 2011-01-12 2011-06-01 厦门雅迅网络股份有限公司 Data storage structure of Flash memory and data manipulation mode thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1135081A (en) * 1995-01-24 1996-11-06 Lg电子株式会社 Semiconductor memory device and data writing method thereof
CN1499532A (en) * 2002-10-28 2004-05-26 Hybrid realization of error correcting code in non-volatile memory
CN101640069A (en) * 2008-08-01 2010-02-03 群联电子股份有限公司 Average wear method, storage system and controller used for flash memory
CN101819821A (en) * 2010-03-25 2010-09-01 清华大学深圳研究生院 Dynamic loss balancing method for solid state disk
CN102081577A (en) * 2011-01-12 2011-06-01 厦门雅迅网络股份有限公司 Data storage structure of Flash memory and data manipulation mode thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021122A (en) * 2016-05-12 2016-10-12 青岛海信宽带多媒体技术有限公司 Writing method and apparatus for flash data in optical module
CN106227620A (en) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 Recoverable Flash data storage method
CN106227620B (en) * 2016-07-20 2019-03-29 中国航空工业集团公司航空动力控制系统研究所 Recoverable Flash data storage method
CN113419974A (en) * 2021-06-25 2021-09-21 长虹美菱股份有限公司 Control method for prolonging power-off memory times of refrigerator
CN113419974B (en) * 2021-06-25 2024-02-06 长虹美菱股份有限公司 Control method for prolonging power-off memory times of refrigerator
CN114047884A (en) * 2021-11-24 2022-02-15 Tcl空调器(中山)有限公司 Data storage method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102483949B (en) Preloading data into a flash storage device
US8346977B2 (en) Device address assignment in a bus cascade system
CN103366831B (en) The detection method of memory
US20090306925A1 (en) Systems and methods for testing integrated circuit devices
CN104424044A (en) Server system
CN101853207A (en) Memory storage
CN104111893A (en) Data storage method
CN106155638A (en) In configuration computer, basic input output system usefulness sets the system and method for shelves
CN105446864A (en) Method and device for verifying influence of deletion of cache file and mobile terminal
CN108958429A (en) A kind of cooling control method, system and equipment and storage medium
CN103067459A (en) Field programmable gate array (FPGA) remote loading device based on digital signal processor
CN104216740A (en) Application software management method and device and terminal
CN104346202A (en) Setting method and device of terminal application program and terminal
CN102870099B (en) Analog electrical erasable (EEE) storer and method of operating thereof
CN103487619B (en) electric energy data storage method
CN105644369B (en) Electric machine controller and its reset processing method and device
CN110471811B (en) Control system applied to input/output interface configuration
CN104748313A (en) Air conditioner and temperature sampling device used for air conditioner
US9612638B1 (en) Systems and methods for automatic detection and configuration of voltage regulator phases in a multi-rail voltage regulator
CN103985410B (en) Storage device and data access method for storage device
CN116343888A (en) Verification method of memory chip, electronic equipment and memory medium
CN110619918B (en) FTL power failure test method, system, device and storage medium
CN107506206A (en) A kind of loaded circuits of Flouride-resistani acid phesphatase antifuse PROM to SRAM type FPGA
CN108873668A (en) Time calibrating method, processor and time calibration system
US20180113833A1 (en) Board management controller peripheral card, host system with the same, and method for managing host peripheral member by the same

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: 20141022