CN102082964A - Method, system and set top box (STB) for displaying text file - Google Patents
Method, system and set top box (STB) for displaying text file Download PDFInfo
- Publication number
- CN102082964A CN102082964A CN2009101885177A CN200910188517A CN102082964A CN 102082964 A CN102082964 A CN 102082964A CN 2009101885177 A CN2009101885177 A CN 2009101885177A CN 200910188517 A CN200910188517 A CN 200910188517A CN 102082964 A CN102082964 A CN 102082964A
- Authority
- CN
- China
- Prior art keywords
- text
- content
- individual event
- index record
- file
- 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 21
- 230000004048 modification Effects 0.000 claims description 17
- 238000012986 modification Methods 0.000 claims description 17
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
Images
Abstract
The invention is applied to the field of set top box (STB), and provides a method, system and STB for displaying a text file. The method comprises the following steps: receiving command information for opening the text file; creating an index record file corresponding to the text file in flash; applying to a memory for reading the contents of the text file identified by single indexes in accordance with the positions of start bytes and end bytes of the indentified contents recorded by the single indexes in the text file; and displaying the contents of the text file identified by the single indexes. For the method, system and STB for displaying the text file, the index record file is created in the flash, so that corresponding single indexes can be created in sequence in accordance with the preset byte number, and the contents of the text file indentified by the single indexes can be displayed, thus the file size is not restricted any more when the text file is displayed.
Description
Technical field
The invention belongs to field of set-top, relate in particular to a kind of method, system and set-top box of videotex file.
Background technology
At present, common set-top box can realize reading text and show from USB device, but generally, but because the restriction of memory size, if text is all read in internal memory, the size of supporting to open text so just is subjected to the restriction of internal memory.
At present, the method for common set-top box videotex file is by reading text from USB device, showing then.Because the restriction of memory size, if text is all read in internal memory, the size of text just is restricted so but generally.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method of videotex file, is intended to solve the method for videotex file common in the prior art, the problem that the size of text is restricted.
The embodiment of the invention is achieved in that a kind of method of videotex file, said method comprising the steps of:
The command information of text is opened in reception;
In flash, create the index record file corresponding: the byte quantity that sets in advance the content of the text that the individual event index of index record file identified with text; Begin to search from first byte of text, create corresponding individual event index, the start byte of the content that described individual event index record identifies to some extent and the position of end byte in text successively according to the byte quantity that sets in advance;
According to the start byte and the position of end byte in text of the content that is identified of described individual event index record, read the content of the text of described individual event index sign to the internal memory application;
The content that shows the text of described individual event index sign.
The embodiment of the invention also provides a kind of system of videotex file, and described system comprises:
First receiver module is used to receive the command information of opening text;
Create the index record module, be used for creating the index record file corresponding with text at flash, described establishment index record module comprises: set in advance module, be used to set in advance the byte quantity of the content of the text that the individual event index of index record file identified; Search creation module, be used for beginning to search from first byte of text, create corresponding individual event index, the start byte of the content that described individual event index record identifies to some extent and the position of end byte in text successively according to the byte quantity that sets in advance;
The application read module is used for according to the start byte of the content that is identified of described individual event index record and end byte reading the content of the text of described individual event index sign to the internal memory application in the position of text;
Display module is used to show the content of the text of described individual event index sign.
The embodiment of the invention also provides a kind of set-top box, and described set-top box comprises the system of described videotex file.
The embodiment of the invention compared with prior art, beneficial effect is: by create the index record file in flash, can create corresponding individual event index successively according to the byte quantity that sets in advance, the content that shows the text of described individual event index sign, thereby when the videotex file, the size of file no longer is restricted.
Description of drawings
Fig. 1 is the flow chart of the method for the videotex file that provides of the embodiment of the invention;
Fig. 2 is the module frame chart of the system of the videotex file that provides of the embodiment of the invention;
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.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.
See also Fig. 1, the method for the videotex file that the embodiment of the invention provides said method comprising the steps of:
S101: receive the command information of opening text;
S102: in flash, create the index record file corresponding: the byte quantity that sets in advance the content of the text that the individual event index of index record file identified with text; Begin to search from first byte of text, create corresponding individual event index, the start byte of the content that described individual event index record identifies to some extent and the position of end byte in text successively according to the byte quantity that sets in advance;
S103:, read the content of the text of described individual event index sign to the internal memory application according to the start byte and the position of end byte in text of the content that is identified of described individual event index record;
S104: the content that shows the text of described individual event index sign.
Wherein, during the byte of the byte quantity that the content that last individual event index record is identified sets in advance inadequately, then show the byte content of remaining text.
The byte quantity of the content of the text that the individual event index of the index record file that wherein, sets in advance is identified can be 1024 bytes.
Such as, if a text size is 3100 bytes, when then setting up the index record file, the content that first individual event index identified is the content of 1024 bytes of the 1st byte to the of text;
The content that second individual event index identified is the content of the 1025th byte to 2048 byte of text;
The 3rd content that the individual event index is identified is the content of the 2049th byte to 3072 byte of text;
The 4th content that the individual event index is identified is the content of the 3073rd remaining byte to 3100 byte of text.
Wherein, described S103 is according to the start byte and the position of end byte in text of the content that is identified of described individual event index record, and is further comprising the steps of after the step of content of text of described individual event index sign is read in the internal memory application:
Whether the form of judging text is displayable form, if not, convert described text to displayable form.
At present, text comprises three kinds of forms, and first kind is the UNICODE form, and header byte is 0xFF0xFE; Second kind is the UTF8 coded format, and header byte is 0xEE 0xBB 0xBF; The third is the GB2312 coded format.
First kind and second kind is can not display format, but the third is a display format, in an embodiment of the present invention, if text is first kind or second kind of form, then needs first kind or second kind of format conversion are become the third form.
Wherein, further comprising the steps of after the described step S102:
Acquiescence shows the content of the text of first individual event index sign.
Wherein, described S104 shows after the step of content of text of described individual event index sign further comprising the steps of:
Receive the command information of opening text once more;
Read in the index record file of creating among the flash corresponding with text;
Whether the modification time of judging the text that writes down in the index record file is identical with the modification time of the text of opening, if it is identical, then read the content of the text of the pairing individual event index of breakpoint location sign to the internal memory application, show the content of the text of the pairing individual event index sign of breakpoint location then according to breakpoint location; If it is inequality, then remove the content of index record file, and in flash, create the index record file corresponding once more with text, start byte and the position of end byte in text according to the content that is identified of described individual event index record, read the content of the text of described individual event index sign to the internal memory application, show the content of the text of described individual event index sign then.
Wherein, described S104 shows after the step of content of text of described individual event index sign further comprising the steps of:
Display command information is withdrawed from reception;
Discharge the content of the text that reads in the internal memory.
Wherein, further comprising the steps of after the described step S103:
Internal memory reads the content of the text of described individual event index sign;
See also Fig. 2, the embodiment of the invention also provides a kind of system of videotex file, and described system comprises:
Create index record module 202, be used for creating the index record file corresponding with text at flash, described establishment index record module comprises: set in advance module, be used to set in advance the byte quantity of the content of the text that the individual event index of index record file identified; Search creation module, be used for beginning to search from first byte of text, create corresponding individual event index, the start byte of the content that described individual event index record identifies to some extent and the position of end byte in text successively according to the byte quantity that sets in advance;
Wherein, described system also comprises:
First judge module is used to judge whether the form of text is displayable form;
Modular converter is used for converting described text to displayable form when described judge module judges that the form of text is not displayable form.
In addition, described system also comprises:
Read the index record file module, be used for when described receiver module receives the command information of opening text once more, read in the index record file of creating among the flash corresponding with text;
Second judge module, be used for when reading the index record file module and reading the index record file of creating at flash corresponding, judging whether the modification time of the text that writes down in the index record file is identical with the modification time of the text of opening with text when described;
When the modification time of the text that described application read module writes down in described second judge module judgement index record file is identical with the modification time of the text of opening, read the content of the text of the pairing individual event index of breakpoint location sign according to breakpoint location to the internal memory application, described display module then shows the content of the text of the pairing individual event index sign of breakpoint location;
When the modification time of the modification time of the text that described application read module writes down in described second judge module judgement index record file and the text of opening is inequality, then remove the content of index record file, and in flash, create the index record file corresponding once more with text by described establishment index record module, described application read module is according to the start byte and the position of end byte in text of the content that is identified of described individual event index record, read the content of the text of described individual event index sign to the internal memory application, show the content of the text of described individual event index sign then by display module.
Wherein, described system comprises:
Second receiver module is used for receiving the display command information that withdraws from;
Release module is used for receiving mould and receiving when withdrawing from display command information when described second, discharges the content of the text that reads in the internal memory.
In addition, described system also comprises:
Internal memory is used to read the content of the text of described individual event index sign.
The embodiment of the invention also provides a kind of set-top box, and described set-top box comprises the system of described videotex file.
Method, system and the set-top box of the videotex file that the embodiment of the invention provides, by in flash, creating the index record file, can create corresponding individual event index successively according to the byte quantity that sets in advance, the content that shows the text of described individual event index sign, thereby when the videotex file, the size of file no longer is restricted.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. the method for a videotex file is characterized in that, said method comprising the steps of:
The command information of text is opened in reception;
In flash, create the index record file corresponding: the byte quantity that sets in advance the content of the text that the individual event index of index record file identified with text; Begin to search from first byte of text, create corresponding individual event index, the start byte of the content that described individual event index record identifies to some extent and the position of end byte in text successively according to the byte quantity that sets in advance;
According to the start byte and the position of end byte in text of the content that is identified of described individual event index record, read the content of the text of described individual event index sign to the internal memory application;
The content that shows the text of described individual event index sign.
2. the method for videotex file as claimed in claim 1, it is characterized in that, the start byte and the position of end byte in text of the described content that is identified according to described individual event index record, further comprising the steps of after the step of content of text of described individual event index sign is read in the internal memory application:
Whether the form of judging text is displayable form, if not, convert described text to displayable form.
3. the method for videotex file as claimed in claim 1 is characterized in that, the described step of creating the index record file corresponding with text in flash is afterwards further comprising the steps of:
Acquiescence shows the content of the text of first individual event index sign.
4. the method for videotex file as claimed in claim 1 is characterized in that, and is further comprising the steps of after the step of the content of the text of the described individual event index sign of described demonstration:
Receive the command information of opening text once more;
Read in the index record file of creating among the flash corresponding with text;
Whether the modification time of judging the text that writes down in the index record file is identical with the modification time of the text of opening, if it is identical, then read the content of the text of the pairing individual event index of breakpoint location sign to the internal memory application, show the content of the text of the pairing individual event index sign of breakpoint location then according to breakpoint location; If it is inequality, then remove the content of index record file, and in flash, create the index record file corresponding once more with text, start byte and the position of end byte in text according to the content that is identified of described individual event index record, read the content of the text of described individual event index sign to the internal memory application, show the content of the text of described individual event index sign then.
5. the method for videotex file as claimed in claim 1 is characterized in that, and is further comprising the steps of after the step of the content of the text of the described individual event index sign of described demonstration:
Display command information is withdrawed from reception;
Discharge the content of the text that reads in the internal memory.
6. the system of a videotex file is characterized in that, described system comprises:
First receiver module is used to receive the command information of opening text;
Create the index record module, be used for creating the index record file corresponding with text at flash, described establishment index record module comprises: set in advance module, be used to set in advance the byte quantity of the content of the text that the individual event index of index record file identified; Search creation module, be used for beginning to search from first byte of text, create corresponding individual event index, the start byte of the content that described individual event index record identifies to some extent and the position of end byte in text successively according to the byte quantity that sets in advance;
The application read module is used for according to the start byte of the content that is identified of described individual event index record and end byte reading the content of the text of described individual event index sign to the internal memory application in the position of text;
Display module is used to show the content of the text of described individual event index sign.
7. the system of videotex file as claimed in claim 6 is characterized in that, described system comprises:
First judge module is used to judge whether the form of text is displayable form;
Modular converter is used for converting described text to displayable form when described judge module judges that the form of text is not displayable form.
8. the system of videotex file as claimed in claim 6 is characterized in that, described system also comprises:
Read the index record file module, be used for when described receiver module receives the command information of opening text once more, read in the index record file of creating among the flash corresponding with text;
Second judge module, be used for when reading the index record file module and reading the index record file of creating at flash corresponding, judging whether the modification time of the text that writes down in the index record file is identical with the modification time of the text of opening with text when described;
When the modification time of the text that described application read module writes down in described second judge module judgement index record file is identical with the modification time of the text of opening, read the content of the text of the pairing individual event index of breakpoint location sign according to breakpoint location to the internal memory application, described display module then shows the content of the text of the pairing individual event index sign of breakpoint location;
When the modification time of the modification time of the text that described application read module writes down in described second judge module judgement index record file and the text of opening is inequality, then remove the content of index record file, and in flash, create the index record file corresponding once more with text by described establishment index record module, described application read module is according to the start byte and the position of end byte in text of the content that is identified of described individual event index record, read the content of the text of described individual event index sign to the internal memory application, show the content of the text of described individual event index sign then by display module.
9. the system of videotex file as claimed in claim 6 is characterized in that, described system comprises:
Second receiver module is used for receiving the display command information that withdraws from;
Release module is used for receiving mould and receiving when withdrawing from display command information when described second, discharges the content of the text that reads in the internal memory.
10. a set-top box is characterized in that, described set-top box comprises the system of the described videotex file of described claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101885177A CN102082964A (en) | 2009-11-30 | 2009-11-30 | Method, system and set top box (STB) for displaying text file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101885177A CN102082964A (en) | 2009-11-30 | 2009-11-30 | Method, system and set top box (STB) for displaying text file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102082964A true CN102082964A (en) | 2011-06-01 |
Family
ID=44088689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101885177A Pending CN102082964A (en) | 2009-11-30 | 2009-11-30 | Method, system and set top box (STB) for displaying text file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102082964A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186621A (en) * | 2011-12-30 | 2013-07-03 | 北大方正集团有限公司 | Catalogue generation method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030187954A1 (en) * | 2002-03-29 | 2003-10-02 | Inventec Appliances Corp. | Method and apparatus for downloading e-book via WAP |
CN101059800A (en) * | 2006-04-21 | 2007-10-24 | 上海晨兴电子科技有限公司 | Method and apparatus for displaying electronic book on mobile phone |
CN101075264A (en) * | 2007-07-20 | 2007-11-21 | 中国建设银行股份有限公司 | Method and device for displaying UNIX/LINUX character terminal file |
CN101430685A (en) * | 2007-11-06 | 2009-05-13 | 施耐德电器工业公司 | Downloading method and system |
-
2009
- 2009-11-30 CN CN2009101885177A patent/CN102082964A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030187954A1 (en) * | 2002-03-29 | 2003-10-02 | Inventec Appliances Corp. | Method and apparatus for downloading e-book via WAP |
CN101059800A (en) * | 2006-04-21 | 2007-10-24 | 上海晨兴电子科技有限公司 | Method and apparatus for displaying electronic book on mobile phone |
CN101075264A (en) * | 2007-07-20 | 2007-11-21 | 中国建设银行股份有限公司 | Method and device for displaying UNIX/LINUX character terminal file |
CN101430685A (en) * | 2007-11-06 | 2009-05-13 | 施耐德电器工业公司 | Downloading method and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186621A (en) * | 2011-12-30 | 2013-07-03 | 北大方正集团有限公司 | Catalogue generation method and device |
CN103186621B (en) * | 2011-12-30 | 2016-07-06 | 北大方正集团有限公司 | A kind of catalogue generates method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE602008004665D1 (en) | STORAGE OF SUBTITLES BY VIDEO TRANSCRIPTION | |
CN102647701B (en) | A kind of method and device upgrading the application message of mobile terminal | |
CN102724357A (en) | Light emitting diode (LED) dot matrix display screen control method and system based on mobile terminal | |
CN101404764B (en) | Internal memory management method in audio/video decoding course | |
WO2009108902A3 (en) | Storage system front end | |
CA2422252A1 (en) | Reduced synchronization reservation system and method for a shared memory buffer | |
AU2016323754B2 (en) | Transmission device, transmission method, reproduction device, and reproduction method | |
CN102082964A (en) | Method, system and set top box (STB) for displaying text file | |
CN102831933A (en) | Method for automatically burning MAC address through USB | |
CN102279820A (en) | Data storage device and control method based on SPI interface | |
CN101764916A (en) | Method for realizing set-top box e-books | |
CN102857833B (en) | Audio decoding system and method adapted to android stagefright multimedia framework | |
TW301100B (en) | ||
WO2008146483A1 (en) | Metadata recording apparatus and metadata recording method | |
CN103902529A (en) | Audio-video recording and broadcasting method capable of automatically annotating with Chinese and foreign language subtitles for foreign languages | |
CN105148519A (en) | Character rendering method and system in game program | |
CN100388776C (en) | Digital video storage system and related method of storing digital video data | |
CN101425096A (en) | File memory method for embedded equipment | |
TW200709029A (en) | An interface converting framework | |
CN105320684B (en) | The method for interchanging data of closed caption | |
CN104936015A (en) | Set top box language control method and system | |
CN202189558U (en) | SPI interface-based data storage device | |
CN101345531A (en) | Data processing method for ogg format stream | |
CN101917609B (en) | Format identification method of embedded streaming media file | |
CN105631917A (en) | Subtitle translation method in digital animation production process |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110601 |