Summary of the invention
The technical problem to be solved in the present invention provides a kind of IPTV sectional drawing implementation method and device based on set-top box, adopts this method and device, can carry out sectional drawing to the IPTV based on set-top box effectively.
For solving the problems of the technologies described above, the IPTV sectional drawing implementation method that the present invention is based on set-top box comprises the steps:
Steps A, be that benchmark is several zones with page division with HTML (HyperText Mark-up Language, HTML) protocol label, described label is corresponding one by one with described zone;
Step B, select one or more described zone as the sectional drawing zone by remote controller key;
Image in step C, the described sectional drawing of the intercepting zone.
Further, in the described steps A, described label explanation is divided into zones of different by the JavaScript interface.
Further, among the described step B, be that form by focus frame realizes selected to described sectional drawing zone.
Further, among the described step B, area can not be selected to separately less than the zone of the default minimum cut area of pictural surface and be the sectional drawing zone.
Further, the inventive method also comprises step: the full page image is intercepted by the full screen printscreen order of remote controller input according to the user.
For solving the problems of the technologies described above, the IPTV sectional drawing implement device that the present invention is based on set-top box comprises:
It is that benchmark is several zones with page division that area dividing module, this module are used for the HTML protocol label, and described label is corresponding one by one with described zone;
Sectional drawing zone chosen module, this module is used for selecting one or more described zone as the sectional drawing zone by remote controller key;
Image interception module, this module are used to intercept the image in the described sectional drawing zone.
Further, described area dividing module is divided into zones of different by the JavaScript interface with described label explanation.
Further, described sectional drawing zone chosen module is that form by focus frame realizes selected to described sectional drawing zone.
Further, area can not be selected to separately less than the zone of the default minimum cut area of pictural surface and be the sectional drawing zone.
Further, apparatus of the present invention also comprise the full screen printscreen module, and this module is used for the full page image being intercepted by the full screen printscreen order of remote controller input according to the user.
Beneficial effect of the present invention is:
The present invention realizes IPTV sectional drawing based on set-top box with the HTML protocol label as benchmark, is different from the page screenshotss that are as the criterion and carry out with physical coordinates on the PC.The present invention is handed down to browser to parameter by the vaScript interface of the WEB page, carries out analyzing and processing according to each parameter after the browser-interpreted and sends the data cached of graphics engine intercepting current region to, at last with data cached this locality or the ancillary equipment of being saved in.The present invention brings great convenience for user's sectional drawing, can solve to realize the intelligent sectional drawing of window under the situation that does not have mouse in the set-top box, and picture can distortion simultaneously.The present invention also has user-friendly for operation, customized characteristics.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
Prove through a host of facts, the picture of general custom on intercept page, video, flash, page literal etc. during people's sectional drawing, and the existing way of these things in the page is exactly the label of HTML agreement with the eye of technology in fact, as: table (form), div (piece), object (object plug-in unit, comprise video, picture, flash animation etc.), the present invention proposes a kind of implementation that carries out the screenshotss on the meaning of one's words with the label of HTML agreement as benchmark for this reason.
The present invention includes full screen printscreen and window sectional drawing, wherein full screen printscreen is full frame data cutout is got off and to preserve, the window sectional drawing then is that the people is the part in the intercept page, and for example some personal information, irrelevant information are unwilling to pass to others and are seen and need and intercept.
The browser major function is downloading page, explains the page, composing, display page, the present invention is by coming the label on the page (table, div, object etc.) explained and be divided into different zones and carry out mark embedding JavaScript (a kind of embed browser and can dynamically change the script of the page) EXPANDING DISPLAY AREA in the browser, certainly can self-defined in advance as required minimum value to these zones, having only can be separately by sectional drawing above the zone of this minimum value.When the user presses function key (screenshotss key, can be self-defined) time these zones respectively frame get up, by remote controller directionkeys (upper and lower, left and right) each zone is carried out freely selecting back and forth then, browser can be made as focus frame to selected zone with the focus form.The selected back of user begins sectional drawing is carried out in the zone of choosing by the OK key.
Fig. 1 is the inventive method principle schematic, as shown in the figure, after built-in browser is received the sectional drawing instruction that issues by remote controller, the view data of sectional drawing zone (two kinds of branch full screen printscreen and window sectional drawings) is sent to graphics engine, graphics engine intercepts the data cached of this zone, and it is turned back to this browser, preserve by ancillary equipment at last.
Below the IPTV sectional drawing implementation method flow process that the present invention is based on set-top box is specifically described:
The course of work is once at first briefly described:
1, reads a html file by network;
2, give the webpage rendering engine and resolve, if in the process of resolving, find new URL address (mainly being picture, style sheet and JavaScript external code), then by this URL address of network download;
3, the requirement according to DOM (Document Object Model, DOM Document Object Model) standard forms a dom tree (being the set of object model) in the process of resolving;
4, in forming the process of dom tree, form one and play up tree (play up set not necessarily identical) with the structure of dom tree for each DOM node forms Render (a composings) node and plays up node;
5, set type to playing up tree, export at last;
6, give rendering engine the JavaScript code in the resolving and go to explain execution.
Lifting an example below is specifically described:
For example, the page 1 of an EPG is arranged, the concrete page code of this page is omitted:
<html><body>
<table?border=1?id=″table1″>
<tr><td>Shady?Grove</td>
<td>Aeolian</td></tr>
<tr><td>Over?the?River,Charlie</td>
<td>Dorian</td></tr>
</table>
<script>
var?obj_td=document.getElementById(″table1″);
obj_td.captureScreen(0);
</script>
</body></html>
In this example JavaScript has been increased newly an additional interface captureScreen and be used for sectional drawing, parameter s etImgType is used for being provided with the sectional drawing type, wherein 0 be full frame, 1 be window.
Fig. 2 is the browser handles schematic flow sheet, as shown in the figure, at first issue the sectional drawing order by remote controller, browser receives that this order back makes an explanation to it, carry out parameter recognition then, browser can determine to carry out full screen printscreen or window sectional drawing according to the difference of parameter value, if the full frame graphics engine of directly giving is handled, if then at first carrying out the page, the words of window sectional drawing explain, is that benchmark is divided into several zones with the page according to the HTML protocol label, and the view data with selection area sends to the image engine processing then.Window sectional drawing operating process is specifically seen Fig. 3.
As shown in Figure 3, window sectional drawing flow process specifically comprises the steps:
1, the sectional drawing pattern is made as window sectional drawing pattern;
2, begin to carry out the sectional drawing operation by calling the JavaScript interface;
3, protocol label (table, div, object etc.) is made an explanation be divided into the zone of each correspondence and carry out mark;
4, be made as the focus form by the selected zone that oneself will intercept of remote controller key, and selected zone, have yellow housing; The size of self-defined selection area, position if desired, then execution in step 5, if do not need the size, position of self-defined selection area then direct execution in step 6;
5, carry out area size and Position Control by buttons such as remote controller directionkeys, execution in step 6 then;
6, the view data with selection area sends to graphics engine, reads the view data buffer memory of this selection area then and is saved in this locality or ancillary equipment.
Fig. 4 is apparatus of the present invention structural representations, and as shown in the figure, the IPTV sectional drawing implement device that the present invention is based on set-top box comprises area dividing module, sectional drawing zone chosen module, image interception module and full screen printscreen module.
Wherein the area dividing module is used for by the interface of JavaScript engine correspondence the explanation of HTML protocol label being divided into each corresponding label area;
Sectional drawing zone chosen module is used for select one or more label area as the sectional drawing zone by remote controller key and with the form of focus frame, and wherein area can not be selected to separately less than the zone of the minimum cut area of pictural surface of presetting and be the sectional drawing zone;
The image interception module is used to intercept the image in the sectional drawing zone;
The full screen printscreen module is used for the full page image being intercepted by the full screen printscreen order of remote controller input according to the user.
Above-described specific embodiment, purpose of the present invention, technical scheme and beneficial effect are further described, institute it should be noted, the above only is specific embodiments of the invention, and 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 the technical scheme of claim record of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.