CN101551780B - Television and data storage method and device thereof - Google Patents

Television and data storage method and device thereof Download PDF

Info

Publication number
CN101551780B
CN101551780B CN2008102418882A CN200810241888A CN101551780B CN 101551780 B CN101551780 B CN 101551780B CN 2008102418882 A CN2008102418882 A CN 2008102418882A CN 200810241888 A CN200810241888 A CN 200810241888A CN 101551780 B CN101551780 B CN 101551780B
Authority
CN
China
Prior art keywords
data
storer
unit
space
needs
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
Application number
CN2008102418882A
Other languages
Chinese (zh)
Other versions
CN101551780A (en
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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN2008102418882A priority Critical patent/CN101551780B/en
Publication of CN101551780A publication Critical patent/CN101551780A/en
Application granted granted Critical
Publication of CN101551780B publication Critical patent/CN101551780B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention is applicable to the field of television and provides a data storage method, a device and a receiving terminal for the television. The method comprises the following steps of: arranging a space in a memory; dividing the space into a plurality of sectors which are respectively divided into a plurality of units; detecting if the data needs to be saved according to the time of the system setting; searching the units which do not store data in the space arranged in the memory when the data needs to be saved; and writing down the data which needs to be saved in the searched units which do not store data in sequence. The invention is divided into a plurality of sectors through the memory, divides each sector into a plurality of units and stores the data which needs to be stored in each unit in sequence; as the variables which are saved are dynamically stored in the memory, the invention avoids the process for wiping the memory once when the data is saved every time, and the memory is wiped once after the sectors of the whole memory are completely written on, thereby greatly prolonging the service life of the memory.

Description

A kind of televisor and date storage method thereof, device
Technical field
The invention belongs to field of television, relate in particular to a kind of televisor and date storage method thereof, device.
Background technology
At present, all be that inner E2PROM stores before frequency range data, volume, brightness, the shutdown last time parameters such as program location in most of system for TV set.E2PROM is the storer of can online electricity wiping with electronically written, have that volume is little, interface simple, data preserve reliable, can onlinely rewrite, low in energy consumption, erasable number of times can reach 1,000,000 times, data and characteristics such as can preserve 100 years.Therefore, it aspect televisor storage data always in occupation of irreplaceable position.
Yet along with the continuous development of TV tech, the complexity of television system also improves constantly, and has seemed unable to do what one wishes as 8 single-chip microcomputers of televisor main control chip.Therefore, 32 bit processors begin to serve as the main control chip of television system.This has also brought the rapid expansion of code space thereupon.
Television system before is fairly simple owing to its function, so size of code is less, program generally all is stored among the ROM of MCU, yet adopts the system of 32 bit processors must consider that plug-in storer solves the problem that expands in the space.Consider that the NORFlash cost is higher, industry begins to have released a kind of with the stored program method of SPI Flash (Serial Peripheral Interface Flash, the serial periphery connects flash memory).The method be with procedure stores in SPI Flash, system operation time, again program is copied among the DDR of system, processor directly obtains the instruction of execution from DDR.
The data storage that how will be stored in E2PROM becomes one of direction of TV domain research in SPI Flash.
Wherein, have a look the characteristics of SPI Flash earlier.Its erasing times has 100,000 times, and minimum erase units is a sector (4KB), and data can only write on the zone of having wiped and can preserve 20 years.
In television system, need frequent preservation data, for E2PROM, can repeat to write data to same place, SPI Flash is then not all right, writes before the data, must wipe the zone that will write.And minimumly when wiping to wipe the space that a sector is a 4Kbyte size.
See also Fig. 1, the figure shows the general Flash process of writing.
When wiping a certain zone, guarantee that the data of same sector outside should the zone are not damaged in order to solve, usually way be exactly read earlier->change again->wipe again->mode write again.Promptly wipe and change before the sector, at first reading out of this sectors of data is saved in the internal memory, in internal memory, revise data to be written, wipe all data of this sector then, at last the data in the amended internal memory are write back among the SPI Flash.
But; Because television system needs frequent preservation data, possibly need to preserve the information that the user changes platform sometimes, possibly need to preserve volume sometimes; And the address of these data in SPI Flash fixed; If preserve a byte, just must wipe the space of a sector earlier, this will have a strong impact on the life-span of SPI Flash.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of date storage method of televisor, is intended to make storer to be utilized fully, improves the serviceable life of storer.
The embodiment of the invention is achieved in that a kind of date storage method of televisor, and said method comprises:
In internal memory, a space is set, the size of the physical address of the said data of said spatial registration in said internal memory, shared internal memory, whether need preserves and said data are saved to the concrete physical address in the said storer for the data that will be written in the storer;
One space is set in storer, is a plurality of sectors with said spatial division, and each sector also is divided into a plurality of unit;
Whether needs are preserved data according to time detecting that system is provided with;
When detecting needs preservation data, in the space of said storer setting, search the unit of not storing data;
The data that needs are preserved write in the unit of not storing data that finds successively.
Another purpose of the embodiment of the invention is to provide a kind of data storage device of televisor, and said device comprises:
The space is provided with module; Be used for for the data that will be written in the storer space being set at internal memory; The size of the physical address of the said data of said spatial registration in said internal memory, shared internal memory, whether need preserve and said data are saved to the concrete physical address in the said storer, and a space is set in storer;
The spatial division module, being used for said spatial division is a plurality of sectors, each sector also is divided into a plurality of unit;
Data Detection is preserved module, and whether needs are preserved data to the time detecting that is used for being provided with according to system;
Module is searched in the space, is used for when said Data Detection preservation module detects needs preservation data, in the space of said storer setting, searching the unit of not storing data;
Data are preserved module, are used for the data that needs are preserved are write the unit of not storing data that finds successively.
The embodiment of the invention is divided into a plurality of sectors through storer; Each sector is divided into a plurality of unit; The data of needs storage are stored in each unit successively, because the variable of being preserved is dynamic memory in storer, the process of having avoided every preservation one secondary data need wipe primary memory; But just wipe once after writing the sector of completely whole storer, prolonged the life-span of storer greatly.
Description of drawings
Fig. 1 is the Flash process of a writing synoptic diagram general in the prior art;
Fig. 2 is the process flow diagram of the date storage method of the televisor that provides of the embodiment of the invention;
Fig. 3 A to Fig. 3 E is the synoptic diagram of the televisor data storage procedure that provides of the embodiment of the invention;
Fig. 4 is the structural drawing of the data storage device of the televisor that provides of the embodiment of the invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the invention is through being divided into storer a plurality of sectors, and each sector also is divided into a plurality of unit, and the data that needs are stored store in each unit successively.
Fig. 1 shows the flow process of the date storage method of the televisor that the embodiment of the invention provides.
The embodiment of the invention is that example describes with SPI Flash in the televisor.Certainly, in the practical implementation process, can be the storage that example is carried out data also with nonvolatile flash memory (NAND).
In step S101, in internal memory, one space is set for the data that will be written to SPI Flash.
See also Fig. 3 A; The size (length) of physical address (instance) in internal memory of data that preserve as needs in this space and a bridge between the SPI Flash, this variable of this spatial registration, shared internal memory, information (Dirty) such as whether need preserve.Simultaneously, it is also writing down the concrete physical address (storage_address) that this variable is saved to SPI Flash.
In step S102, a space is set in SPI Flash, be a plurality of sectors with the spatial division that is provided with, each sector also is divided into a plurality of unit.
In the practical implementation process, see also Fig. 3 B, at first in SPI Flash, open up the space of a 16Kbyte according to the size of SPI Flash, be four sector A, B, C, D with spatial division, the size of each sector is 4Kbyte.
In the sector that each marks off, mark off several unit a, b, c... again, these unit are used for depositing and need the data of preserving, the sign whether data of physical address and this unit of these data in internal memory are wiped free of,
In step S103, whether needs are preserved data according to time detecting that system is provided with, when system need preserve the data of certain variable, carry out step S104, otherwise normal operation.
For example, the embodiment of the invention through Time Created at interval (for example 3 seconds) detect the mechanism that once whether need preserve, rather than data are modified real-time the going in back and preserve, and can prolong the life-span of SPI Flash like this.
In step S104,, search the unit of not storing data according to the operating position of current SPI Flash.
In step S105, the data that needs are preserved write in the unit of not storing data that finds.
In the practical implementation process, see also Fig. 3 C 1., when system need preserve the data of certain variable, the zone bit shown at first can set Fig. 3 A showed that promptly this variable need be preserved.
Afterwards, in the described space of Fig. 3 B, find out and be used, but the sector that does not also use; Suppose to find sector A, and then A finds the unit that is not used in the sector, be assumed to be unit a; Then 2. system can see also Fig. 3 C with data to be preserved writing unit a successively.
Simultaneously, also to write down the physical address of this part data in internal memory that writes, see also Fig. 3 C 3..
At last; According to before the preservation address of this variable in SPI Flash; Find the unit of in SPI Flash, being preserved before this variable, then whether the data of this unit are wiped free of zone bit and write 0 and see also Fig. 3 C 4., show that this part data block is invalid.Then system need upgrade the up-to-date physical address that the described variable of 3A is stored in SPI Flash, sees also Fig. 3 C 5..
Arrive this, data are preserved and are finished.
Because it is in real time synchronous being kept at data and the data in the described space of Fig. 3 A of SPI Flash; Therefore; After writing a full sector (such as sector A); We can directly wipe this sector A before preserving data next time, again the data among the DDR are write next sector (such as sector B) successively.
When reading the data that are written into SPI Flash, be described below:
Usually, in adopting the system of E2PROM, when system had just started, whether the data that detect E2PROM were effective, if invalid, at first used the default value initialization E2PROM of variable in the system; Otherwise, then read the data initialization system variable of E2PROM.
In like manner, be stored in the data read process basically identical with E2PROM that reads of data among the SPI Flash, unique difference is exactly that the address that is stored in the data of E2PROM is changeless, sees also Fig. 3 D.Therefore, read the data of certain fixed address after, all can the same variable of initialization.SPI Flash is then different, and the variable of being preserved is fully indefinite in the address of SPI Flash, and this just needs system when starting, and travels through the space of the 16Kbyte that whole Fig. 3 B opens up out, and whether detect each sectors of data effective.If effectively, then according to this partial data of this sector record at the corresponding variable of the physical address initialization of DDR, see also Fig. 3 E.
After adopting above the description; We can be saved in data among the SPI Flash at any time; And do not need every preservation once to wipe SPI Flash one time; But just wipe once after writing a full sector, in the life-span that this has just prolonged SPI Flash greatly, solved with SPI Flash and substituted E2PROM key technical problem to be solved.
The embodiment of the invention also provides a kind of data storage device of televisor, sees also Fig. 2.
Wherein, the space is provided with module 21 space is set in storer.
Spatial division module 22 is a plurality of unit with said spatial division.
Said spatial division module 22 specifically comprises sector division module 221 and dividing elements module 222:
Division module 221 in sector is a plurality of sectors according to the said spatial division of big young pathbreaker in said space;
Dividing elements module 222 continues to be divided into a plurality of unit with the said sector that marks off.
Whether needs are preserved data to the time detecting that Data Detection preservation module 23 is provided with according to system.
When 23 detections of said Data Detection preservation module needed to preserve data, the space was searched module 24 and in the space of said storer setting, is searched the unit of not storing data.
The data that data preservation module 25 will be preserved write in the unit of not storing data that finds successively.
Data preserve address acquisition module 26 obtain the data of preserving in the preservation address of the unit of said storer.
Address designation module 27 is invalid with the said address designation that obtains.
The embodiment of the invention also provides a kind of televisor, and said televisor comprises the data storage device of the televisor that the embodiment of the invention provides, seeing that the data storage device of this televisor repeats no more in the existing detailed description of preceding text here.
The embodiment of the invention is through being divided into storer a plurality of sectors; Each sector also is divided into a plurality of unit; The data of needs storage are stored in each unit successively; Avoid every preservation one secondary data need wipe the process of primary memory, but just wiped once after writing the sector of completely whole storer, prolonged the life-span of storer greatly.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. the date storage method of a televisor is characterized in that, said method comprises:
In internal memory, a space is set, the size of the physical address of the said data of said spatial registration in said internal memory, shared internal memory, whether need preserves and said data are saved to the concrete physical address in the said storer for the data that will be written in the storer;
One space is set in storer, is a plurality of sectors with said spatial division, and each sector also is divided into a plurality of unit;
Whether needs are preserved data according to time detecting that system is provided with;
When detecting needs preservation data, in the space of said storer setting, search the unit of not storing data;
The data that needs are preserved write in the unit of not storing data that finds successively.
2. the date storage method of televisor as claimed in claim 1 is characterized in that, the step of in the space of said storer setting, searching the unit of not storing data specifically comprises:
Search data storage less than the sector;
In the sector that finds, search the unit of not storing data.
3. the date storage method of televisor as claimed in claim 1 is characterized in that, after the said data that will preserve write the step in the unit of not storing data that finds successively, said method also comprised:
Obtain the preservation address of preserving before the data in the unit of said storer;
With the preservation address mark in the unit of said storer before the said preservation data is invalid.
4. the date storage method of televisor as claimed in claim 1 is characterized in that, said storer is serial peripheral interface flash memory or nonvolatile flash memory.
5. the data storage device of a televisor is characterized in that, said device comprises:
The space is provided with module; Be used for for the data that will be written in the storer space being set at internal memory; The size of the physical address of the said data of said spatial registration in said internal memory, shared internal memory, whether need preserve and said data are saved to the concrete physical address in the said storer, and a space is set in storer;
The spatial division module, being used for said spatial division is a plurality of sectors, each sector also is divided into a plurality of unit;
Data Detection is preserved module, and whether needs are preserved data to the time detecting that is used for being provided with according to system;
Module is searched in the space, is used for when said Data Detection preservation module detects needs preservation data, in the space of said storer setting, searching the unit of not storing data;
Data are preserved module, are used for the data that needs are preserved are write the unit of not storing data that finds successively.
6. the data storage device of televisor as claimed in claim 5 is characterized in that, said storer is serial peripheral interface flash memory or nonvolatile flash memory.
CN2008102418882A 2008-12-29 2008-12-29 Television and data storage method and device thereof Expired - Fee Related CN101551780B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008102418882A CN101551780B (en) 2008-12-29 2008-12-29 Television and data storage method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008102418882A CN101551780B (en) 2008-12-29 2008-12-29 Television and data storage method and device thereof

Publications (2)

Publication Number Publication Date
CN101551780A CN101551780A (en) 2009-10-07
CN101551780B true CN101551780B (en) 2012-05-09

Family

ID=41156028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008102418882A Expired - Fee Related CN101551780B (en) 2008-12-29 2008-12-29 Television and data storage method and device thereof

Country Status (1)

Country Link
CN (1) CN101551780B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073592B (en) * 2009-11-19 2012-12-05 中兴通讯股份有限公司 Quick read-write method and device for flash memory
CN102279806A (en) * 2011-05-18 2011-12-14 深圳创维-Rgb电子有限公司 Digital television equipment and storage method for single program initiation (SPI) memory
CN102270177A (en) * 2011-06-17 2011-12-07 南京Lg新港显示有限公司 Method for replacing EEPROM (Electrically-Erasable Programmable Read-Only Memory) with memory space of flash memory
CN103294615B (en) * 2012-02-24 2017-09-22 北京四达时代软件技术股份有限公司 A kind of method for storing set-top box users information
CN102883207B (en) * 2012-09-13 2016-11-23 深圳创维数字技术有限公司 The method of a kind of data process and digital TV terminal
CN105812891B (en) * 2014-12-30 2019-03-19 Tcl集团股份有限公司 A kind of method and system of module TV screen end plate data storage
CN105022701B (en) * 2015-07-27 2018-03-23 四川长虹电器股份有限公司 The storage method of conditioners running conditions and parameter
CN105828196B (en) * 2016-03-09 2019-01-15 青岛海信电器股份有限公司 A kind of smart television data processing method and device
CN108279852A (en) * 2017-12-27 2018-07-13 浙江恒业电子有限公司 Method for improving NORFLASH service lifes in intelligent electric energy meter
CN109947364A (en) * 2019-02-01 2019-06-28 浙江蓝点动力科技有限公司 A kind of method for storing real-time data in FLASH/EEPROM
CN109947369A (en) * 2019-03-22 2019-06-28 河南卓正电子科技有限公司 Date storage method and device
CN111324554B (en) * 2020-02-18 2022-03-18 日立楼宇技术(广州)有限公司 Management method and device of flash memory data and elevator controller
CN113316010B (en) * 2021-05-28 2023-02-28 杭州国芯科技股份有限公司 Method for recording current viewing channel information by set top box

Also Published As

Publication number Publication date
CN101551780A (en) 2009-10-07

Similar Documents

Publication Publication Date Title
CN101551780B (en) Television and data storage method and device thereof
US7127551B2 (en) Flash memory management method
CN103577121B (en) A kind of highly reliable linear file access method based on Nand Flash
KR100843543B1 (en) System comprising flash memory device and data recovery method thereof
CN1902599B (en) Method for updating data in non-volatile memory systems and operating the non-volatile memory systems system
CN103440205B (en) A kind of set top box data storage method and device
CN102737715B (en) For the method for power fail safeguard of data of NOR flash memory
CN101944115B (en) Method and system for searching logs
US7925821B2 (en) Nonvolatile semiconductor storage device and method of managing the same
CN101901189B (en) User data updating method and method for recovering user data
US8775758B2 (en) Memory device and method for performing a write-abort-safe firmware update
CN103577574A (en) High-reliability linear file system based on nand flash
CN101526927B (en) Data processing method and data processing device of Flash file system
JP2007280428A (en) Memory management
CN101013351A (en) Hard disk drive cache memory and playback device
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
CN102637461B (en) Start method supporting bad block flash memory scanning
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN100524217C (en) Embedded system guiding method and device
CN102687113A (en) Program, control method, and control device
CN106528441B (en) Data processing method and device for simulating EEPROM (electrically erasable programmable read-Only memory) and electronic equipment
CN101727361B (en) Method for storing edition of terminal product and system
CN102541753B (en) A kind of read-write optimization method of in-line memory
CN102023845A (en) Cache concurrent access management method based on state machine
US9535796B2 (en) Method, apparatus and computer for data operation

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120509

Termination date: 20151229

EXPY Termination of patent right or utility model