Summary of the invention
In view of this, the embodiment of the invention discloses a kind of digital television data storage method and Digital Television, can realize preserving automatically or manually webpage that the user browses or multimedia file in storage medium, so that user's collection or use in this locality.
The embodiment of the invention provides a kind of digital television data storage method, comprising:
Built-in browser obtains browsing data from front-end server;
Monitor described built-in browser, intercept the described browsing data that described built-in browser obtains from described front-end server;
According to the routing information in the described browsing data that is truncated to the storage path is set;
Store described browsing data according to the described storage path that is provided with.
Correspondingly the embodiment of the invention also provides a kind of Digital Television, and this Digital Television comprises:
Built-in browser is used for obtaining browsing data from front-end server;
Monitoring unit is used to monitor described built-in browser, intercepts the described browsing data that described built-in browser obtains from described front-end server;
Path setting element, the routing information that is used for the described browsing data that is truncated to according to described monitoring unit are provided with and store the path;
Storage element is used for storing described browsing data according to the storage path of described path setting element setting.
The present invention obtains the web page browsing data by the built-in browser of monitoring Digital Television, and then store, webpage that the user browses or multimedia file have been realized preserving automatically or manually in storage medium, so that user's collection or use in this locality has strengthened user experience.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described.
Fig. 1 is that the structure of a kind of Digital Television in the embodiment of the invention is formed schematic diagram, and this Digital Television comprises as shown in Figure 1:
Built-inbrowser 101 is used for obtaining browsing data from front-end server;
Monitoring unit 102 is used to monitor described built-in browser, intercepts the described browsing data that described built-in browser obtains from described front-end server; Routing information in the described browsing data can comprise the url address of webpage, for example http://www.163.com/news/index.htm.
Path setting element 103, the routing information that is used for the described browsing data that is truncated to according to described monitoring unit are provided with and store the path; Theunit 103 that described further path is provided with can comprise:
The path analysis module, the routing information analysis that is used for the described browsing data that gets access to according to described monitoring unit obtains corresponding storage path; Described storage path can comprise storage catalogue and filename, routing information comprises the url address of webpage in the browsing data that for example obtains: http://www.163.com/news/index.htm, 103 of path setting elements can obtain corresponding catalogue and be " news ", and file is called " index.htm ".
The path creation module, the storage path that comprises path catalogue and filename is created in the storage path that is used for obtaining according to described path analysis module at storage element.Be specifically as follows, for example path analysis module obtains storing the path and comprises that catalogue is after " news ", file are called " index.htm ", the path creation module is then created " news " catalogue automatically in storage medium, and creates the file of file " index.htm " by name under this catalogue.When described Digital Television has a plurality of storage medium simultaneously (for example a plurality of hard disk sectors, or several hard disk also comprise portable hard drive or flash disk), then therefrom select one and Make Path by the path creation module.Finding in constructive process has catalogue of the same name or filename, then adds suffix to distinguish behind catalogue or filename, for example " news_1 ", " index_1.htm " etc.
Storage element 104 is used for storing described browsing data according to the storage path that describedpath setting element 103 is provided with.Describedstorage element 104 can be mobile storages such as the built-in flash nonvolatile storage medium of Digital Television or external portable hard drive, flash disk.For examplepath setting element 103 has been created " index.htm " file under " news " catalogue and this catalogue according to the routing information in the browsing data in storage medium, andstorage element 104 promptly writes browsing data in " index.htm " file under " news " in this storage medium according to this path.
Further, described Digital Television can also comprise:
The storage area detecting unit, whether have enough storage area, then notify 102 pairs of described built-inbrowsers 101 of described monitoring unit to monitor when the test results is yes if being used to detect described storage element 104.Described storage area detecting unit can detect whether enough storage areas are arranged by storage medium built-in to Digital Television and outside connection, described enough storage areas can be the storage area of certain amount of capacity, 100MB for example, or the free space of all storage areas accounts for the gross space magnitude proportion, for example the free space ratio does not then allow 102 pairs of described built-inbrowsers 101 of described monitoring unit to monitor less than 10%.
Further, described Digital Television can also comprise:
The control command acquiring unit is used to obtain user's control commands and triggers 102 pairs of described built-inbrowsers 101 of described monitoring unit according to user's control commands and monitor.In the specific implementation, the control command acquiring unit can be by obtaining user key-press instruction or user's remote control command of Digital Television, obtain the control command that user's desire is preserved the current webpage of browsing or multimedia file, and trigger 102 pairs of built-inbrowsers 101 of monitoring unit according to this control command and monitor.Further this Digital Television can be provided with two kinds of storage modes, a kind of for giving tacit consent to storage, promptly will store from the browsing information of built-in browser intercepting automatically, a kind of is manually to store, just store after promptly getting access to user's control commands, the user can change this storage mode by being provided with of change Digital Television.
Fig. 2 is the schematic flow sheet of a kind of digital television data storage method in the embodiment of the invention.This method comprises:
S201, built-in browser obtains browsing data from front-end server;
S202 monitors described built-in browser, intercepts the described browsing data that described built-in browser obtains from described front-end server; Routing information in the described browsing data can comprise the url address of webpage, for example http://www.163.com/news/index.htm.
S203 is provided with the storage path according to the routing information in the described browsing data that is truncated to; Routing information in the described browsing data that described further basis is truncated to is provided with the storage path and can comprises:
Obtain the path analysis module in corresponding storage path according to the routing information analysis in the described browsing data that is truncated to; Described storage path can comprise storage catalogue and filename, routing information comprises the url address of webpage in the browsing data that for example obtains: http://www.163.com/news/index.htm, then can obtain corresponding catalogue and be " news ", file is called " index.htm ".
In the Digital Television storage element, create the storage path that comprises path catalogue and filename according to the storage path that analysis obtains.Be specifically as follows, for example obtain storing the path and comprise that catalogue is after " news ", file are called " index.htm ", Digital Television then can be created " news " catalogue automatically in storage medium, and creates the file of file " index.htm " by name under this catalogue.When described Digital Television has a plurality of storage mediums when (for example a plurality of hard disk sectors, or several hard disk also comprise portable hard drive or flash disk) simultaneously, then therefrom select one and Make Path by the path creation module.Finding in constructive process has catalogue of the same name or filename, then adds suffix to distinguish behind catalogue or filename, for example " news_1 ", " index_1.htm " etc.
S204 stores described browsing data according to the described storage path that is provided with.Described browsing data can be stored in the mobile storages such as built-in flash nonvolatile storage medium of Digital Television or external portable hard drive, flash disk.For example S203 has created " index.htm " file under " news " catalogue and this catalogue according to the routing information in the browsing data in storage medium, and promptly store path according to this browsing data is write in " index.htm " file under " news " in this storage medium this moment.
Further, the described built-in browser of described monitoring intercepts described built-in browser and can also comprise before from the described browsing data that described front-end server obtains:
Whether the storage element that detects described Digital Television has enough storage areas, if testing result for being then to monitor described built-in browser, intercepts the described browsing data that described built-in browser obtains from described front-end server.In the specific implementation, can detect whether enough storage areas are arranged by storage medium built-in to Digital Television and outside connection, described enough storage areas can be the storage area of certain amount of capacity, 100MB for example, or the free space of all storage areas accounts for the gross space magnitude proportion, for example the free space ratio does not then allow described built-inbrowser 101 is monitored less than 10%.
Further, the described built-in browser of described intercepting also comprises from the described browsing data that described front-end server obtains before:
Obtain user's control commands and trigger the described built-in browser of monitoring, intercept the described browsing data that described built-in browser obtains from described front-end server according to user's control commands.In the specific implementation, Digital Television can be by user key-press instruction or the user's remote control command of obtaining, obtain the control command that user's desire is preserved the current webpage of browsing or multimedia file, and trigger according to this control command built-in browser is monitored.Further this Digital Television can be provided with two kinds of storage modes, a kind of for giving tacit consent to storage, promptly will store from the browsing information of built-in browser intercepting automatically, a kind of is manually to store, just store after promptly getting access to user's control commands, the user can change this storage mode by being provided with of change Digital Television.
By the foregoing description, Digital Television of the present invention and digital television system have realized preserving automatically or manually webpage that the user browses or multimedia file in storage medium, so that user's collection or use in this locality has strengthened user experience.