CN101329684A - Embedded system and method for reading word base data - Google Patents
Embedded system and method for reading word base data Download PDFInfo
- Publication number
- CN101329684A CN101329684A CNA2008101172832A CN200810117283A CN101329684A CN 101329684 A CN101329684 A CN 101329684A CN A2008101172832 A CNA2008101172832 A CN A2008101172832A CN 200810117283 A CN200810117283 A CN 200810117283A CN 101329684 A CN101329684 A CN 101329684A
- Authority
- CN
- China
- Prior art keywords
- character
- word
- file system
- base data
- data
- 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 16
- 238000005516 engineering process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000013507 mapping Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
- Document Processing Apparatus (AREA)
Abstract
The invention discloses an embedded system and a reading method of word stock data thereof. The invention aims at solving the problem of slow access speed of word stock data stored in a file system. The method disclosed by the invention comprises the steps: letterform data of characters are acquired; according to the corresponding relationship of the storing physical positions of preset letterform data and word stock data in the file system, storing physical positions of word stock data of characters in the file system are determined; word stock data are read from the determined physical positions; the storing physical positions of word stock data of characters in the file system are determined according to the corresponding relationship of the storing physical positions of preset letterform data and word stock data in the file system, thus speeding up the reading of the word stock data stored in the file system.
Description
Technical field
The invention belongs to the font technical field, the method that particularly a kind of embedded system and word-base data thereof read.
Background technology
For embedded platform, two restrictions are arranged usually, one is that the speed of CPU is slow, another one is that internal memory is fewer.On the other side be the user to embedded product, more and more higher as the requirement of media player.Such as requiring the interface promptly beautiful, display speed is fast again.Between this contradiction, important a bit is the problem that how to solve font.
Literal is the main contents of a electronic document, and any literal all can not break away from font and individualism, and present most of electronic documents have all used TrueType font.Because Chinese character is more, and the font complexity, so the font file of Chinese font is all bigger.Can there be a character library that exists with the chain sheet form in the Chinese font file of a Truetype, the inner order of character library has been deposited the word-base data of all characters, word-base data goes out the profile of character glyphs by some Bezier curve descriptions, the all corresponding character font data of each word-base data, character font data refers to the positional information of word-base data in character library, by table 1 character font data of each character correspondence as can be known.
Character font data | Character |
... | ... |
1011-1012 | One |
1013-1014 | I |
... | ... |
2001-2002 | Two |
... | ... |
Table 1
The Hanzi font library file of Chinese character set correspondence is generally all about 4MByte.For the less embedded platform of internal memory, can be put into word-base data among the flash memory flash and read by file system, in file allocation table FAT file system, bunch linked data structure that the storage of data in magnetic disk is formulated according to the FAT table carries out, needing character display " " back character display " two " with the user is that example describes, the character font data of character " " is 1010-1012 (character font data 1010-1012 represent be that the word-base data of character " " is in the 1011-1012 of character library byte), the character font data of character " I " is the 1013-1014 next character font data of the character font data of character " " (promptly with respect to), the character font data of character " two " is 2011-2012, the physical location that the word-base data of the character font data corresponding characters of character " " leaves file system in is the 100th bunch, the physical location that the word-base data (word-base data of character " I ") that also identifies simultaneously next character font data correspondence in the file system leaves file system in is the 30th bunch, also identify simultaneously the word-base data of next character font data correspondence in the file system, the physical location that leaves file system in up to the word-base data that obtains character " two " is the 146th bunch by that analogy.As seen the user needs character display " " back character display " two ", because the physical location possibility difference that is stored in the file system is very big.And file system can spend long time when the position is read in switching, and the file system access word-base data is slow, causes speed of displaying slack-off.
Summary of the invention
In order to solve in the existing technology, read the slow-footed problem of the word-base data that is put in the file system, the embodiment of the invention provides the method that word-base data reads in a kind of embedded system, comprising:
Obtain the character font data of character, described character font data is used for indicating the positional information of word-base data in character library;
The corresponding relation of the physical location of storing in file system according to the character font data that presets and word-base data is determined the physical location that word-base data is stored in file system;
Read word-base data from determined physical location.
The embodiment of the invention also provides a kind of embedded system simultaneously, comprising:
Acquisition module: be used to obtain the character font data of character, described character font data is used for indicating the positional information of word-base data in character library;
Position determination module: be used for the corresponding relation of the physical location stored in file system according to the character font data that presets and word-base data, determine the physical location that word-base data is stored in file system;
Read module: be used for reading word-base data from determined physical location.
The specific embodiments that is provided by the invention described above directly finds word-base data to be stored in position in the physical medium from file system as can be seen, generates the corresponding relation of and character font data then.In the time of the needs word-base data, can be directly find memory location in the corresponding physical medium by this corresponding relation, read the time that the position takies thereby reduce to switch, accelerated the speed that visit is put into the word-base data in the file system.
Description of drawings
Fig. 1 is the first embodiment method flow diagram provided by the invention;
Fig. 2 is the second embodiment device structural drawing provided by the invention.
Embodiment
First embodiment provided by the invention is the method that word-base data reads in a kind of embedded system, and method flow comprises as shown in Figure 1:
All character font datas in the traversal character library, and determine the physical location that each word-base data is stored in file system are set up the corresponding tables of the physical location that a character font data and word-base data store, as table 2 in file system.
Character font data | Physical location |
... | ... |
1011-1012 | 100 bunches |
1013-1014 | 30 bunches |
... | ... |
2001-2002 | 146 bunches |
... | ... |
Table 2
Step 101: determine that character to be shown is " one ", obtaining the corresponding character font data of character " " is 1011-1012, and described character font data 1011-1012 is used for the position of the word-base data of pointing character in character library.
Step 102: according to table 2, the physical location of storing in the FAT file system that finds the correspondence of word-base data among the 1011-1012 is the 100th bunch.
Step 103: the word-base data that from the 100th bunch of determined physical location, reads character " one ".
Step 104: according to the word-base data that reads, describe out character " one's " character contour, and demonstrate character " ".
Step 105: determine that next character to be shown is " two ", obtaining the corresponding character font data of character " two " is 2011-2012.
Step 106: according to table 2, the physical location of storing in file system that finds the correspondence of word-base data among the 2011-2012 is the 146th bunch.
Step 107: the word-base data that from the 146th bunch of determined physical location, reads character " two ".
Step 108: according to the word-base data that reads, describe out character " twos' " character contour, and demonstrate character " two ".
According to the process of top character display " " and character " two " as can be seen, adopt the technical scheme in the embodiment of the invention, can be directly by table 2 find character " " and " two " character font data the memory location in the corresponding physical medium be the 100th bunch and the 146th bunch, whole process only need read 2 times.And in the prior art, need read character " ", " two " and the pairing physical location of the character font data of all characters between them, as seen the technical scheme in the embodiment of the invention can reduce to switch and reads the time that the position takies, and has accelerated the speed that visit is put into the word-base data in the file system.
In the FAT file system, the data of file are not deposited continuously, but have been divided into each fritter (be called bunch).Bunch size be 32KB to the maximum.Each bunch is made up of different sectors (sector).File system has been used two notion storage files of logic sector and physical sector in constituent act.What file system visit sector itself was used is logical sector address.The design of generic-document system is read and write all the time in order to prevent certain sector, and the not accessed all the time situation in other sector, there is an epiphase correspondence address of physical sector and the address of logic sector.That is to say that though the address of the logic sector of file system access is constant, identical logic sector corresponding physical sector may often change.
Therefore,, set up the mapping table of logic sector in a character font data and the file system at the FAT file system, and the mapping table of the physical location in file system, stored of logic sector and word-base data.
Can use an independent subregion of file system, this subregion is read-only, because file system is when using concrete physical sector, can dynamically adjust the position of the actual physical sector that uses, and an independent read-only partitioned file system can not go to adjust, and guarantees that like this corresponding tables of character font data and logic sector is unique all the time.
Second embodiment provided by the invention is a kind of embedded system, and its structure comprises as shown in Figure 2:
Acquisition module 201: be used to obtain the character font data of character, described character font data is used for indicating the positional information of word-base data in character library;
Position determination module 202: be used for the corresponding relation of the physical location stored in file system according to the character font data that presets and word-base data, determine the physical location that word-base data is stored in file system;
Read module 203: be used for reading word-base data from determined physical location.
Further, position determination module 202 comprises:
FAT position determination module 2021: the corresponding relation of the physical location of in the FAT file system, storing according to the character font data that presets and word-base data, determine the physical location that word-base data is stored in the FAT file system.
Read-only position determination module 2022: be used for the corresponding relation of the physical location stored at the independent read-only subregion of file system according to the character font data that presets and word-base data, determine the physical location that word-base data is stored in file system.
Submodule 2023 is determined in the position: be used for according to the character font data that presets and the corresponding relation of file system logic sector, and the corresponding relation of the physical location in file system, stored of logic sector and word-base data, determine the physical location that word-base data is stored in file system.
Embedded system also comprises:
Display module 204: be used for describing out the character contour of character, and demonstrating character according to the word-base data that reads.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (10)
1, the method that word-base data reads in a kind of embedded system is characterized in that, comprising:
Obtain the character font data of character;
The corresponding relation of the physical location of storing in file system according to the word-base data of character font data that presets and character is determined the physical location that word-base data is stored in file system;
Read word-base data from determined physical location.
2, the method for claim 1 is characterized in that, file system is a file allocation table FAT file system.
3, method as claimed in claim 2, it is characterized in that, the corresponding relation of the physical location of storing in the independent read-only subregion of FAT file system according to the word-base data of character font data that presets and character is determined the physical location that word-base data is stored in file system.
4, method as claimed in claim 2, it is characterized in that, corresponding relation according to logic sector in character font data that presets and the file system, and the corresponding relation of the physical location in the FAT file system, stored of the word-base data of logic sector and character, determine the physical location that word-base data is stored in file system.
5, the method for claim 1 is characterized in that, according to the word-base data that reads, describes out the character contour of character, and demonstrates character.
6, a kind of embedded system is characterized in that, comprising:
Acquisition module: the character font data that is used to obtain character;
Position determination module: be used for the corresponding relation of the physical location stored in file system according to the word-base data of the character font data that presets and character, determine the physical location that word-base data is stored in file system;
Read module: be used for reading word-base data from determined physical location.
7, system as claimed in claim 6 is characterized in that, position determination module comprises:
The FAT determination module: the corresponding relation of the physical location of in the FAT file system, storing according to the word-base data of character font data that presets and character, determine the physical location that word-base data is stored in the FAT file system.
8, system as claimed in claim 7 is characterized in that, position determination module comprises:
Read-only position determination module: be used for the corresponding relation of the physical location stored at the independent read-only subregion of FAT file system according to the word-base data of the character font data that presets and character, determine the physical location that word-base data is stored in the FAT file system.
9, system as claimed in claim 7 is characterized in that, position determination module comprises:
Submodule is determined in the position: be used for according to the character font data that presets and the corresponding relation of file system logic sector, and the corresponding relation of the physical location in the FAT file system, stored of the word-base data of logic sector and character, determine the physical location that word-base data is stored in the FAT file system.
10, system as claimed in claim 6 is characterized in that, also comprises:
Display module: be used for describing out the character contour of character, and demonstrating character according to the word-base data that reads.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101172832A CN101329684A (en) | 2008-07-28 | 2008-07-28 | Embedded system and method for reading word base data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101172832A CN101329684A (en) | 2008-07-28 | 2008-07-28 | Embedded system and method for reading word base data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101329684A true CN101329684A (en) | 2008-12-24 |
Family
ID=40205494
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008101172832A Pending CN101329684A (en) | 2008-07-28 | 2008-07-28 | Embedded system and method for reading word base data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101329684A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011072552A1 (en) * | 2009-12-16 | 2011-06-23 | 中兴通讯股份有限公司 | Method and device for accessing file resources |
CN106445736A (en) * | 2016-08-31 | 2017-02-22 | 四川效率源信息安全技术股份有限公司 | Method for extracting and recombining MTK62 series word stock data of mobile phone |
-
2008
- 2008-07-28 CN CNA2008101172832A patent/CN101329684A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011072552A1 (en) * | 2009-12-16 | 2011-06-23 | 中兴通讯股份有限公司 | Method and device for accessing file resources |
CN106445736A (en) * | 2016-08-31 | 2017-02-22 | 四川效率源信息安全技术股份有限公司 | Method for extracting and recombining MTK62 series word stock data of mobile phone |
CN106445736B (en) * | 2016-08-31 | 2019-03-22 | 四川效率源信息安全技术股份有限公司 | A method of it extracts and recombinates MTK62 series mobile phone word-base data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9208074B2 (en) | Updating address mapping in sub-intervals in a flash memory data storage device | |
US9514057B2 (en) | Storage module and method for managing logical-to-physical address mapping | |
US20190171559A1 (en) | Method for accessing flash module, associated flash controller and electronic device | |
CN105830022B (en) | The method and apparatus for accessing file | |
CN110059031B (en) | Data storage device and data processing method | |
US20130061124A1 (en) | Managing forms in electronic documents | |
US8521947B2 (en) | Method for writing data into flash memory | |
US8621134B2 (en) | Storage tiering with minimal use of DRAM memory for header overhead | |
US20140181371A1 (en) | Method and system for reducing mapping table size in a storage device | |
CN101320594A (en) | Physical operation method of flash memory chip | |
CN107704200A (en) | A kind of data deposit method | |
CN102999441B (en) | Fine granularity memory access method | |
CN100458736C (en) | NAND flash information extraction method and NAND flash automatic identification method | |
CN106354658A (en) | Method for reducing memory resource occupation of mapping tables in hybrid mapping algorithm | |
CN108255742A (en) | A kind of large capacity solid state disk mapping method | |
CN108427648B (en) | Storage system page viscera data indexing method and device | |
KR20140008914A (en) | Non-volatile memory controller and control method therefor | |
CN103309619A (en) | NAND Flash memory data storage method | |
CN101329684A (en) | Embedded system and method for reading word base data | |
CN102541753B (en) | A kind of read-write optimization method of in-line memory | |
US8316210B2 (en) | Dividing a logical memory space into ranges and sets for address translation | |
CN115079957B (en) | Request processing method, device, controller, equipment and storage medium | |
US8966159B2 (en) | Flash storage device and data writing method thereof | |
CN103116640A (en) | Method and device for formatting FAT (file allocation table) file system | |
CN103257928A (en) | Method and system for data management of flash memory equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20081224 |