CN100470504C - Memory access method - Google Patents
Memory access method Download PDFInfo
- Publication number
- CN100470504C CN100470504C CNB2006100665570A CN200610066557A CN100470504C CN 100470504 C CN100470504 C CN 100470504C CN B2006100665570 A CNB2006100665570 A CN B2006100665570A CN 200610066557 A CN200610066557 A CN 200610066557A CN 100470504 C CN100470504 C CN 100470504C
- Authority
- CN
- China
- Prior art keywords
- mentioned
- storage
- data
- access method
- storage area
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The present invention provides a memory access method , said method is executed in electronic device. It includes main memory and first storage zone and second storage zone of storage unit. When the electronic device is started or reset, the first data set of first storage zone is loaded into main memory interior so as form second data set. When the first data of second data set is modified, the specific address first-correspondently recorded in first storage zone can be stored. If the space of first storage zone is not enough, the first correspondent record is stored in second storage zone, after the storage is completed, the correspondent first data in the first storage zone can be removed; otherwise, if the space of first storage zone is still enough, the modified several correspondent records can be continuously stored in the space of first storage zone.
Description
Technical field
The invention relates to computer technology, and be particularly to access method.
Background technology
Storage unit often is used in digital camera, mobile phone, reaches personal digital assistant (Personal Digital Assistant, abbreviation PDA), global navigation satellite positioning system (GLOBAL POSITIONING SYSTEM, abbreviation GPS), multimedium player (Moving Picture Experts Group 1 Layer 3, be called for short MP3) or the like in the portable electronic devices of tool access capability, especially common with nonvolatile memory (as: flash memory flash memory).
Though nonvolatile memory has the advantage of permanent preservation data, but its reaction velocity is all the time not as good as dynamic storage, dynamic RAM (DynamicRandom Access Memory for example, be called for short DRAM), usually only as the usefulness of storage medium, therefore under the situation of computing fast, then must copy data to computing in the dynamic storage.
Is example with flash memory as the digital camera of main storage device (mass storage), earlier data such as setting value in the flash memory and pre-set programs is written in the primary memory during start.Data factor word camera in the primary memory during operation the setting value adjustment and be modified, before shutdown, write back again in the residue storage area of flash memory.On actual the use, if when the storage area of flash memory is not enough, the past data record of before writing data, can erasing earlier.As if power interruption this moment, the data in the primary memory have little time to deposit back in the flash memory, and then setting value will be lost.
In addition, even the portable electronic devices of general tool access capability has only the setting value of modification in open state, the data before finishing shutdown in the still necessary whole erasing memory earlier, and return again and deposit the interior data of primary memory to storage element.So not only can take the storage area, also can increase and shorten its serviceable life because of the frequency that storage element is erased.
Summary of the invention
In view of this, for solving the aforementioned problems in the prior, purpose of the present invention is providing a kind of access method of storage.
Based on above-mentioned purpose, the present invention proposes a kind of access method of storage, is executed in the electronic installation.This electronic installation comprises first storage area (bank) and second storage area (bank) of primary memory, storage element.When electronic installation is started shooting, first data acquisition of first storage area is written in the primary memory, become second data acquisition.When first data of second data acquisition in the primary memory are modified, store first corresponding record on the particular address of first storage area.First corresponding record is connected in after first data acquisition, and the particular address of depositing is outside first data acquisition.And first corresponding record comprises the address and the modification value of first data.
When the first storage area insufficient space, second data acquisition of primary memory is stored to second storage area, and first storage area of erasing subsequently; Otherwise, still enough when space, first storage area, then continue a plurality of corresponding record that storage revised in wherein.
The present invention is achieved in that
The invention provides a kind of access method of storage, described access method of storage is executed in an electronic installation, this electronic installation comprises a primary memory and a storage element, above-mentioned storage element comprises one first storage area and one second storage area, comprise: the data of looking above-mentioned in first storage area are one first set, and when above-mentioned electronic installation is started shooting, above-mentioned first set is written in the above-mentioned primary memory, becomes one second set; One first data in above-mentioned second set are modified, and space, above-mentioned first storage area stores the particular address of one first corresponding record in above-mentioned first storage area when enough; And when the above-mentioned first storage area insufficient space, then above-mentioned second set is stored to above-mentioned second storage area, and above-mentioned first storage area of erasing subsequently, wherein, above-mentioned storage element is the nonvolatile memory module.
Access method of storage of the present invention, above-mentioned first corresponding record comprise an address and a modification value of above-mentioned first data.
Access method of storage of the present invention, above-mentioned address is in order to discern the position of above-mentioned first data at above-mentioned primary memory.
Access method of storage of the present invention, comprise: when above-mentioned electronic installation is reopened machine, above-mentioned first set in the above-mentioned storage element is written into above-mentioned primary memory, become above-mentioned second set, according to the above-mentioned address of above-mentioned first corresponding record to search above-mentioned first data in the above-mentioned primary memory; And according to above-mentioned modification value in above-mentioned first corresponding record to revise above-mentioned first data.
Access method of storage of the present invention, the above-mentioned particular address of above-mentioned first corresponding record are right after above-mentioned first set.
Access method of storage of the present invention when one second data are modified in above-mentioned second set, stores one second corresponding record, is right after above-mentioned first corresponding record, and wherein above-mentioned second corresponding record comprises the address and the modification value of above-mentioned second data.
Access method of storage of the present invention, above-mentioned first set is the setting value of above-mentioned electronic installation.
Access method of storage of the present invention, above-mentioned electronic installation are for comprising a storage element, and the portable electronic devices of tool access capability.
Access method of storage of the present invention, above-mentioned electronic installation are digital camera.
Description of drawings
The structural representation of Fig. 1 display electronics assemblies;
The process flow diagram of Fig. 2 display-memory access method one embodiment;
Fig. 3 shows the synoptic diagram of above-mentioned electronic installation embodiment;
Fig. 4 shows the synoptic diagram of above-mentioned electronic installation embodiment;
The process flow diagram of the embodiment that Fig. 5 display setting value is written into.
Embodiment
Below disclose access method of storage.Need be appreciated that, below the configuration of each entity and step just in order to for example, and can be adjusted.
In the electronic installation 100 of Fig. 1, processor 1 is coupled to primary memory 2 and storage element 3.Electronic installation 100 can be the synthesis of digital camera, mobile phone, PDA(Personal Digital Assistant), global navigation satellite Positioning System (GPS), multimedium player (MP3) and said apparatus or the portable electronic devices of other tool access capability.Primary memory 2 can be windows random access memory (Windows Random-AccessMemory is called for short WRAM), video RAM (Video Random-Access Memory is called for short VRAM) or other random access memory.Storage element 3 can nonvolatile memory module 5 real work of flash memory.
The size of first storage area 31 and second storage area 32 is distinctly greater than total size of setting value, and the base unit of erasing more than or equal to storage element 3, i.e. block (block).First storage area 31 and second storage area 32 can be in the same storeies of storage element 3 or in different storeies.
With reference to Fig. 1 and Fig. 2, electronic installation 100 execute store access method embodiment.
When electronic installation was started shooting, shown in step S20, processor 1 was written into primary memory 2 with first data acquisition 312 of first storage area 31, becomes second data acquisition 21, shown in step S22.Processor 1 receives and responds user's operation, shown in step S24.In the process of using, second data acquisition 21 in the primary memory 2 may be modified.Whether processor 1 is differentiated in second data acquisition 21 has data recording to be modified, shown in step S26.
When first data 211 in second data acquisition 21 of primary memory 2 were modified, processor 1 stored first corresponding record 313 in the particular address of storage element 3, and shown in step S28, and particular address is outside first data acquisition 312.
With Fig. 3 is example, and wherein, storage element 3 is with nonvolatile memory module 5 real doing.The particular address at first corresponding record, 313 places is right after first data acquisition 312, and first corresponding record 313 comprises the address 41 and the modification value 42 of first data 211.Address 41 is in order to discern the position of first data 211 at primary memory 2.First data acquisition 312 and first corresponding record 313 are stored in first storage area 31 of nonvolatile memory module 5.
When storing first corresponding record 313, processor 1 judges whether the storage area of first storage area 31 is enough, shown in step S30.In this way, finish storing first corresponding record 313, then repeating step S24.
When second data were modified in second data acquisition 21 of primary memory 2, processor 1 stored second corresponding record, is next to first corresponding record 313, and wherein second corresponding record comprises the address and the modification value of second data.
When the storage area of first storage area 31 is not enough, second data acquisition 21 is to second storage area 32 of nonvolatile memory module 5 in the processor 1 backup primary memory 2, shown in step S32, and all data and record in first storage area 31 of erasing, shown in step S34.Fig. 4 shows the nonvolatile memory module 5 of first storage area 31 of erasing.Follow repeating step S24.Wherein, second storage area 32 can be initialised when step S32 or be initialised before this step.
Because first data 211 in second data acquisition 21 have been modified, the corresponding record that need not store its modification in addition is in second storage area 32.When having the 3rd data to be modified in second data acquisition 21 of primary memory 2, processor 1 stores the 3rd corresponding record in second storage area 32, is arranged in after the duplicated record of second data acquisition 21 in second storage area 32.Yet after also the data (comprising first data acquisition 312 and corresponding record 313) of first storage area 31 can being backed up in second storage area 32 in another example, first storage area 31 of erasing again.
Because after the new setting value (second data acquisition 21) of first stored electrons device 100, remove former setting value (first data acquisition 312) again, so, even power interruption in the storage process, processor 1 also can judge earlier that when start next time the setting value that makes new advances is imperfect, and is written into unmodified preceding setting value.
As for judging the whether complete method of setting value, for instance, processor 1 promptly writes the corresponding states label in second storage area 32 after finishing storage second data acquisition 21.Whether processor 1 is complete to judge second data acquisition 21 according to this state tag.
With reference to Fig. 5, when electronic installation was started shooting the first time after power interruption, shown in step S40, processor 1 can be chosen write time setting value the latest earlier, and is written in the primary memory 2, shown in step S41.When first data acquisition 312 in first storage area 31, processor 1 is written into primary memory 2 with first data acquisition 312, becomes second data acquisition 21.If this moment first storage area 31 erased or data imperfect, when electronic installation was reopened machine, processor 1 was written into primary memory 2 with second data acquisition 21 in second storage area 32.
Processor 1 is judged the corresponding states label that whether has setting value to revise in the nonvolatile memory module 5, shown in step S42.If do not have, the setting value of finishing in the start process is written into operation.
If have, processor 1 is chosen corresponding record, and first corresponding record 313 for example is shown in step S44.Processor 1 according to address 41 in first corresponding record 313 to search first data 211 in the primary memory 2, shown in step S46, and according to modification value 42 in first corresponding record 313 to revise first data 211 of primary memory 2, shown in step S48.Repeating step S42.
When electronic installation is modified in setting value, promptly write corresponding record immediately to nonvolatile memory module 5, and only store the address of the data be modified and modification value but not whole setting values.Setting value in storing primary memory is during to nonvolatile memory, if the storage area insufficient space, then setting value is stored to another storage area earlier, all data and record in the fully loaded storage area of erasing again.Use when the space, storage area of having erased so, can be for next storing and setting value.
Though the present invention by the preferred embodiment explanation as above, this preferred embodiment is not in order to limit the present invention.Those skilled in the art without departing from the spirit and scope of the present invention, should have the ability this preferred embodiment is made various changes and replenished, so protection scope of the present invention is as the criterion with the scope of claims.
Being simply described as follows of symbol in the accompanying drawing:
1: processor
2: main storage
21: the second data acquisition systems
211: the first data
3: storage element
31: the first storage areas
32: the second storage areas
311: data acquisition
312: the first data acquisitions
313: the first corresponding record
41: the address
42: the modification value
5: the nonvolatile memory module
100: electronic installation
Claims (9)
1. an access method of storage is characterized in that, described access method of storage is executed in an electronic installation, and this electronic installation comprises a primary memory and a storage element, and above-mentioned storage element comprises one first storage area and one second storage area, comprises:
The data of looking above-mentioned in first storage area are one first set, and when above-mentioned electronic installation is started shooting, above-mentioned first set are written in the above-mentioned primary memory, become one second set;
One first data in above-mentioned second set are modified, and space, above-mentioned first storage area stores the particular address of one first corresponding record in above-mentioned first storage area when enough; And
When the above-mentioned first storage area insufficient space, then above-mentioned second set is stored to above-mentioned second storage area, and above-mentioned first storage area of erasing subsequently,
Wherein, above-mentioned storage element is the nonvolatile memory module.
2. access method of storage according to claim 1 is characterized in that, above-mentioned first corresponding record comprises an address and a modification value of above-mentioned first data.
3. access method of storage according to claim 2 is characterized in that, above-mentioned address is in order to discern the position of above-mentioned first data at above-mentioned primary memory.
4. access method of storage according to claim 3 is characterized in that, described access method of storage is executed in an electronic installation, comprises:
When above-mentioned electronic installation is reopened machine, above-mentioned first set in the above-mentioned storage element is written into above-mentioned primary memory, become above-mentioned second set;
According to the above-mentioned address of above-mentioned first corresponding record to search above-mentioned first data in the above-mentioned primary memory; And
According to above-mentioned modification value in above-mentioned first corresponding record to revise above-mentioned first data.
5. access method of storage according to claim 1 is characterized in that, the above-mentioned particular address of above-mentioned first corresponding record is right after above-mentioned first set.
6. access method of storage according to claim 1, it is characterized in that, when one second data are modified in above-mentioned second set, store one second corresponding record, be right after above-mentioned first corresponding record, wherein above-mentioned second corresponding record comprises the address and the modification value of above-mentioned second data.
7. access method of storage according to claim 1 is characterized in that, above-mentioned first set is the setting value of above-mentioned electronic installation.
8. access method of storage according to claim 1 is characterized in that, above-mentioned electronic installation is for comprising a storage element, and the portable electronic devices of tool access capability.
9. access method of storage according to claim 8 is characterized in that, above-mentioned electronic installation is a digital camera.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100665570A CN100470504C (en) | 2006-03-30 | 2006-03-30 | Memory access method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100665570A CN100470504C (en) | 2006-03-30 | 2006-03-30 | Memory access method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101046768A CN101046768A (en) | 2007-10-03 |
CN100470504C true CN100470504C (en) | 2009-03-18 |
Family
ID=38771394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100665570A Expired - Fee Related CN100470504C (en) | 2006-03-30 | 2006-03-30 | Memory access method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100470504C (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110635849B (en) * | 2019-10-23 | 2022-11-25 | 青岛海信宽带多媒体技术有限公司 | Optical module |
CN114993540A (en) * | 2022-08-02 | 2022-09-02 | 国网江西省电力有限公司建设分公司 | Data acquisition, protection and storage device for tension sensor |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5402383A (en) * | 1992-10-06 | 1995-03-28 | Fujitsu Limited | Electrically erasable non-volatile semiconductor memory device for selective use in boot block type or normal type flash memory devices |
US6092190A (en) * | 1995-01-31 | 2000-07-18 | Neopost Limited | Electronic apparatus including a memory device and method of reprogramming the memory device |
US20020002652A1 (en) * | 2000-01-28 | 2002-01-03 | Nec Corporation | Method of rewriting program in flash microcomputer |
CN1596401A (en) * | 2002-10-02 | 2005-03-16 | 松下电器产业株式会社 | Non-volatile storage device control method |
-
2006
- 2006-03-30 CN CNB2006100665570A patent/CN100470504C/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5402383A (en) * | 1992-10-06 | 1995-03-28 | Fujitsu Limited | Electrically erasable non-volatile semiconductor memory device for selective use in boot block type or normal type flash memory devices |
US6092190A (en) * | 1995-01-31 | 2000-07-18 | Neopost Limited | Electronic apparatus including a memory device and method of reprogramming the memory device |
US20020002652A1 (en) * | 2000-01-28 | 2002-01-03 | Nec Corporation | Method of rewriting program in flash microcomputer |
CN1596401A (en) * | 2002-10-02 | 2005-03-16 | 松下电器产业株式会社 | Non-volatile storage device control method |
Also Published As
Publication number | Publication date |
---|---|
CN101046768A (en) | 2007-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210232326A1 (en) | Memory system storing management information and method of controlling same | |
US7441085B2 (en) | Memory control method for restoring data in a cache memory | |
US10168913B2 (en) | Data storage device and data maintenance method thereof | |
US20090161430A1 (en) | Bit map control of erase block defect list in a memory | |
US8108594B2 (en) | Memory system | |
CN111475425B (en) | Method for managing flash memory module and related flash memory controller and electronic device | |
US20170285954A1 (en) | Data storage device and data maintenance method thereof | |
JP3212960B2 (en) | Data management method using flash memory | |
US20170285953A1 (en) | Data Storage Device and Data Maintenance Method thereof | |
CN102184117A (en) | Method and device for starting system on different Nandflash | |
CN100470504C (en) | Memory access method | |
CN107193485B (en) | Storage device, control unit thereof and data storage method for storage device | |
US20070198788A1 (en) | Memory access methods | |
JP2008084184A (en) | Memory controller | |
CN101526921B (en) | Method and device for writing data | |
CN103389943A (en) | Control device, storage device, and storage control method | |
US7853763B2 (en) | Storage apparatus and method for accessing a storage apparatus | |
CN109426443B (en) | Memory control apparatus and method | |
US10545805B2 (en) | Memory system, reading method thereof and writing method thereof | |
CN109960611A (en) | Method, apparatus, electronic equipment and the machine readable storage medium that data are restored | |
US11150940B2 (en) | System and method for recording transaction associated with a page-oriented non-volatile memory | |
CN111324281B (en) | Memory and control method and device thereof | |
CN100410901C (en) | Firmware upgrade method and system for executing said method | |
KR100650839B1 (en) | Flash memory system and erasing method thereof | |
CN101470644A (en) | Operating system recovery apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090318 Termination date: 20110330 |