Summary of the invention
The invention provides a kind of automatic roll screen of energy that effectively overcomes above-mentioned deficiency, clear display is stable and interactive dynamic browser of manual apparatus and the display control method thereof that can be controlled by user's Autonomous Control time-outs, playback etc.
The object of the present invention is achieved like this: it comprises communication module, parsing module, display module, keyboard response module, communication module reads in info web and sends it to parsing module, parsing module constructing graphic element sends to the composition module, display module is chosen graphic element and graphing on physical screen from the composition module, the keyboard response module display module that sends control information, it is characterized in that: it also comprises sliding window updating module and timer
The sliding window updating module connects the keyboard respond module and accepts the button control information, adjusts displaying contents and also sends lastest imformation to display module, make displaying contents according to button control information upgrade;
Timer provides system clock, is connected with the sliding window updating module, and sends trigger pip periodically for the sliding window updating module with pre-set time interval, and periodic triggers is slided the automatic update displayed content of window module, also writes down the temporal information of actuation of keys.
The invention also discloses a kind of display control method of interactive dynamic browser of manual apparatus, it comprises following content:
Be written into the original web page web page files;
Generate and store constructing elements;
The position and the dimensional parameters of the initialization display module page, sliding window;
Initialization sliding window updating module page display mode and static displacement amount and dynamic displacement parameter;
Start timer;
Start the input of keyboard respond module monitoring users;
Receive the button control information according to the keyboard response module, the sliding window updating module is provided with the page and changes between static and dynamic two kinds of patterns, and the transmission update instruction arrives display module:
During static schema, screen display content along the button controlling party to a static displacement amount of relative slip length, during dynamic mode, under the triggering of timer, screen display content along the button controlling party to refreshing for the unit continuous rolling with the dynamic displacement;
Under the dynamic mode, the keyboard response module receives the information that stops key in real time, and sends to the sliding window updating module, and the sliding window updating module is a static schema with the present dynamic mode switch.
In the said method, renewal of the page static schema and dynamic mode are independently controlled by predefined two groups of buttons respectively, i.e. static schema key groups and dynamic mode key groups.
In the said method, the renewal of the page static schema is controlled by the different modes that impact by predefined same group of button with dynamic mode conversion; Click button, the sliding window updating module enters static schema; Double-click button, the sliding window updating module switches to dynamic mode.
In the said method, during user key-press, the keyboard response module receives this control information, and add timestamp for each key information, then current button and the preceding timestamp of this button are compared, the surrounding time difference is less than the preset time segment, and then the sliding window updating module enters static schema; Greater than the preset time segment, the sliding window updating module switches to dynamic mode.
In the said method, the timestamp record time is button release time.
In the said method, button timestamp comparison time segment is 300 milliseconds.
In the said method, button can be defined as upper and lower both direction, or is defined as left and right both direction, or is defined as the upper and lower, left and right four direction.
The concrete implementation step of said method is as follows:
Communication module is written into the original web page file, analysis interpretation through parsing module, generate all constructing elements that constitute graphical display page, and it is stored in the composition module, parameter in the initialization display module, as the position of the page, sliding window and size (W, H), (Xp, Yp), (Wp, Hp), the parameter of initialization sliding window updating module, as page display mode and static displacement amount (Δ X1, Δ Y1) and dynamic displacement (Δ X2, Δ Y2), start timer, start the input of keyboard respond module monitoring users;
The keyboard response module listens to user's input, and key information is sent to the sliding window updating module; Key information comprises key name and state, and state is divided into to be pressed or discharge two kinds;
The sliding window updating module receives and the analysis user key information, and gives offset variable (Δ X, Δ Y) assignment:
When pressing predefined downward-direction key, page display mode is set at the static page pattern as the key information state, Δ Y=Δ Y1, and with Yp+ Δ Y, promptly Yp+ Δ Y1 upgrades Yp, sends update instruction to display module and upgrades screen and enter a new line downwards;
As the key information state is when discharging predefined downward-direction key, add timestamp for this key information, last historical time stamp with this key information compares then, if the surrounding time difference is less than a predetermined time segment, then setting page display mode is scroll display mode, Δ Y=Δ Y2, with Yp+ Δ Y, be that Yp+ Δ Y2 upgrades Yp, send update instruction to display module and upgrade screen, otherwise do not do operation;
The sliding window updating module receives the periodic triggers signal of timer, at first judges current page display mode:
If static display mode is not done any renewal operation; If scroll display mode, Y upgrades Yp with the Yp+ Δ, sends update instruction to display module then, and screen rolls downwards;
When scrolling up and upwards entering a new line, offset variable Δ Y=-Δ Y1 in the sliding window updating module and Δ Y=-Δ Y2 upgrade Yp with Yp+ Δ Y equally and get final product;
During the move left and right page, the sliding window updating module will be upgraded Xp, promptly upgrade Xp with Xp+ Δ X; During static display mode, Δ X=± Δ X1, dynamically during display mode, Δ X=± Δ X2.
In the said method, the sliding window updating module is upgraded the back and is judged the whether out-of-bounds of sliding window, promptly whether satisfies 0≤Xp≤W-Wp and 0≤Yp≤H-Hp, and as not satisfying, then setting page display mode is static display mode or the symbol of changing current offset variable Δ X or Δ Y.
In sum, when utilizing the webpage of interactive dynamic browser of manual apparatus of the present invention on watching mobile device, on this direction, move one section viewing area by clicking direction bond energy control webpage, double during by next directionkeys, can realize the automatic rolling of webpage on this direction, and the control screen carries out automatic rolling with the speed that is suitable for watching, because principle of operation mainly is based on the multiplexing of singly-bound, so make the user arbitrarily carry out page control with the simplest and the most direct button interactive mode, with minimum operation, finish the page browsing of maximum degree of freedom.
Embodiment
Below with reference to process flow diagram shown in Figure 8 and in conjunction with concrete accompanying drawing in detail detail of the present invention is described in detail.
As shown in Figure 2, an embodiment who on the Nokia7610 mobile phone, browses the interactive dynamic browser of html page, present embodiment is with the mobile phone version-MIDP of the Java language realization of programming.It comprises communication module 1, parsing module 2, composition module 3, display module 4 and keyboard response module 5, also comprises a timer 6 and a sliding window updating module 7.
Communication module reads in a html text from local resource, the text is followed the W3C international standard, and part of original code is as follows:
<HTML>
<HEAD>
<TITLE〉Hong Kong guide book</TITLE 〉
</HEAD>
<BODY>
<P〉[Hong Kong tourist handbook]</P 〉
<CENTER〉<A href=" T00.htm "〉0 phone</A 〉: first aid complaint<BR 〉
<CENTER〉<A href=" T01.htm "〉1 summary</A 〉: geography and history<BR 〉
<CENTER〉<A href=" T02.htm "〉2 sightseeing</A 〉: Wei Gang mountain top<BR 〉
<CENTER〉<A href=" T03.htm "〉3 culture</A 〉: natural science exhibitions<BR 〉
<CENTER〉<A href=" T04.htm "〉4 shopping</A 〉: market sale monopoly<BR 〉
……
Parsing module carries out grammatical analysis with above-mentioned web page text, according to mark html source file is divided into a plurality of data cells, each data cell contains relatively independent data, as literal, image, hypertext link etc., add in the html source file composition information to each data definition, as font, color or the like information, constitute basic constructing elements.Constructing elements is arranged in order on a virtual page by its composition information, obtain each constructing elements position coordinates on final display page, provide the partially patterned element that parsing module produces below, the relation of each constructing elements and final display page, as shown in Figure 3.
First constructing elements: literal-" [Hong Kong tourist handbook] ", font-normal, position-(0,0)
Second constructing elements: literal-" 0 phone " connects-" T00.htm " font-normal, position-(12,16)
The 3rd constructing elements: literal-": first aid is complained ", font-normal, position-(44,16)
The 4th constructing elements: literal-" 1 summary " connects-" T01.htm " font-normal, position-(12,24)
The 5th constructing elements: literal-": geography and history ", font-normal, position-(44,24)
……
The composition module stores has above-mentioned all constructing elements that comprise composition information, can determine after all constructing elements are arranged by composition information whole Webpage physical size (W, H), as W=176, H=560.
The size and the position of display module record physics display screen, it also comprises a sliding window of virtual rectangle, and this cunning window is the mapping position of physics viewing area at whole Webpage.Under mode standard.Can be of a size of on the Noki a7610 mobile phone that (Wp Hp), is initialized as (176,140), and the position of sliding window is designated as that (Xp Yp), is initialized as (0,0), as shown in Figure 4 for the physics viewing area that java applet uses.
The keyboard response module is monitored keyboard, and this mobile phone comprises one common 5 to key, and as shown in Figure 5, it comprises stops 5 sub-buttons up and down.In case the user has actuation of keys, key information will directly be delivered to the sliding window updating module, and key information comprises key name and state, and state is divided into to be pressed or discharge two kinds.
Timer provides system clock, and periodically triggers the sliding window updating module with the predefined time interval, and the too short time interval will be strengthened the number of times of system update screen, makes system overhead become big easily; The long time interval will reduce the number of times that upgrades screen, but in the continuity variation when playing of rolling.The time interval of setting in the present embodiment is 66 milliseconds, promptly upgrades screen a second 15 times.
Sliding window updating module records page display mode information, specifically be divided into static page pattern and scroll through pages pattern, the static displacement of initialization simultaneously amount (Δ X1, Δ Y1) and dynamic displacement (Δ X2, Δ Y2), present embodiment initialization page display mode is the static page pattern, Δ Y1=8, Δ Y2=1, because the move left and right of the no page in the present embodiment, thereby Δ X1, Δ X2 are useless.
Behind the initialization above-mentioned parameter, the system start-up timer starts the input of keyboard respond module monitoring users, and the top area of the whole Webpage of screen display keeps transfixion.
If the user presses 5 down Arrows in key, the keyboard response module listens to user's input, and key information is sent to the sliding window updating module.The sliding window updating module enters the branched program that response " is pressed down Arrow ", and carry out following operation: setting page display mode is the static page pattern, and be the static displacement amount with the offset variable assignment, promptly get Δ Y=Δ Y1, upgrade Yp with Yp+ Δ Y, send update instruction for display module 4 and upgrade screen, display module 4 selects to fall into the constructing elements when advancing slip window, on physical screen, draw one by one, at this moment on screen, demonstration has been moved down the content of pages of Y1=8 pixel of Δ Y=Δ (height of delegation), screen continues to keep transfixion, as shown in Figure 6;
If the user presses 5 down Arrows twice in key fast, the keyboard response module listens to user's input, and this twice key information all sent to the sliding window updating module successively.The sliding window updating module enters the branched program of response " release down Arrow ", and carry out following operation: all add timestamp for twice " release down Arrow " information in front and back, then this twice timestamp compared, if the surrounding time difference is less than a predetermined time segment (selecting 300 milliseconds in the present embodiment), then setting page display mode is scroll display mode, and is dynamic displacement with the offset variable assignment, promptly gets Δ Y=Δ Y2, upgrade Yp with Yp+ Δ Y, otherwise do not do operation.As seen, when the user presses twice down Arrow fast, if the time interval enough little (less than above-mentioned preset time segment), system will become scroll display mode by static display mode, and its effect will show in the timer response branch below.
Timer period property ground triggers sliding window updating module 7, after the sliding window updating module enters timer response branch, at first judge current page display mode, if scroll-up/down display mode, upgrade Yp with Yp+ Δ Y, send update instruction to display module then, display module 4 selects to fall into the constructing elements when advancing slip window, on physical screen, draw one by one, at this moment on screen, demonstration has been moved down the content of pages of Y2=1 pixel of Δ Y=Δ, because timer is sent out a trigger pip for per 66 milliseconds in the present embodiment, per 66 milliseconds can be upgraded the content of pages that a width of cloth has moved down a pixel on the display screen, just on display screen with 1 seconds 15 frame the speed that moves with single pixel of frequency scroll through pages from bottom to up, form steadily clearly page rolling effect automatically, betwixt, the user needn't do any button operation.Select the timer triggered time will form the different automatic page rolling effect of speed with sliding window dynamic displacement.
When scrolling up and upwards entering a new line, the offset variable in the sliding window updating module 7 is respectively Δ Y=-Δ Y
1With Δ Y=-Δ Y2, the method for upgrading Yp is constant-upgrades Yp with Yp+ Δ Y equally to get final product;
During the move left and right page, the sliding window updating module will be upgraded Xp, promptly upgrade Xp with Xp+ Δ X; During static display mode, Δ X=± Δ X1, dynamically during display mode, Δ X=± Δ X2.
Under page automatic rolling state, if the user presses directionkeys up or down, the sliding window updating module enters at once that response " is pressed upwarding key " or " pressing down Arrow " branched program, carries out the operation of above describing.It should be noted that it is the static page pattern that page display mode is at first set in the operation of this group, just enter the effect that button enters a new line up and down about the response then naturally.As seen, be by up and down arrow keys equally, result sometimes is that screen enters a new line up and down, result sometimes be screen carry out up and down roll screen-the present invention multiplexing the direction button! Certainly, another technical scheme be with up and down the line feed and up and down roll screen be defined on the different buttons, be used for entering a new line up and down as up and down arrow keys, #/* key be used for about roll screen.But it is very not directly perceived to use non-directionkeys to define directionality operations (as the roll screen up and down here), and the user forgets easily or mixes up unrest.In addition, the definition of multikey must bring the extra motion of user's thumb, is easy to generate in a rush sensation in one-handed performance, reduces operating efficiency.Yet, the two or more different functions of definition on same button, this seems unlikely.
The temporal information of utilization of the present invention on same button solved the problem of button multiplexing, as described in the explanation in above-mentioned system architecture and the workflow, when the user connects by twice down Arrow, if the time interval is enough little, system enters roll screen state up and down, button in other cases, system enters the state that enters a new line up and down, as shown in Figure 7.
From user's experience, connect and to be similar to " double-click " of mouse in using by twice button and (click) to operate.There are such experience-" clicking " mouse, select File in general computer user; " double-click " mouse opens file.Thereby, technical scheme-" clicking " button that the present invention proposes, line feed up and down; " double-click " button, scroll-up/down.This technical scheme meets big multi-user's use habit.
From the technical standpoint analysis, the present invention is similar to Chinese character input method.The various Chinese character input methods that design on 101 QWERTY keyboard are input equipment with limited button all, import specific Chinese character in large character set by the orderly combination of definition push key.The present invention uses the click action (as pressing continuously twice) on same button (as down Arrow), defines the different viewing mode (as entering a new line up and down and scroll-up/down) in the page browsing.From the angle of single key stroke, the present invention is similar to the sending box that adopts the Morse sign indicating number again, comes multiplexing button, extend information according to the rhythm and pace of moving things that knocks keyboard.
Thereby record also judges that the time interval of pressing same button is the key of above-mentioned button multiplexing/mode switch.In actual system design, " the pressing " that can write down button compares constantly.But in the present invention, we use the writing time in the moment that discharges button, and this has special benefit.Consider that the user may carry out continuous line feed by " normal pressing " (pinning for a long time) directionkeys, in this case, the keyboard monitoring module is sent frequent " pressing " message possibly, easily obscures with normal " double-click ".Thereby, have the multinomial function of " line feed ", " line feed continuously ", " automatic rolling " on button, for addressing this problem, the general normal method that additional state variable and determining program solve conflict of introducing that adopts in system realizes.Yet the present invention abandons having high risk " pressing " message, and uses the writing time in the moment that discharges button, has avoided the conflict with traditional keypress function, effectively reduces the implementation complexity of system.
Be clear description, above-mentioned process flow diagram and explanation are example with the downward line feed of the page or rolling downwards all, if scroll up or upwards the situation of line feed is noted parameter Δ Y=-Δ Y1 and Δ Y=-Δ Y2 in the sliding window updating module, utilizes same flow process to upgrade Yp with Yp+ Δ Y then and gets final product.Said method is equally applicable to the move left and right of the page, unique different be that the sliding window updating module will be upgraded Xp rather than Yp, for example, X upgrades Xp with the Xp+ Δ, Δ X get predefined left and right displacement parameter ± Δ X1 or ± Δ X2.
In actual use, consider that the sliding window after the renewal may shift out full page, thereby can add the border as required and judge, for example, all judge the whether out-of-bounds of sliding window after each the renewal, promptly whether satisfied
0≤Xp≤W-Wp and 0≤Yp≤H-Hp,
As not satisfying, then setting page display mode is the symbol of static display mode or change Δ X, Δ Y.The latter forms the page and is rolled to the special-effect of returning automatically behind the border.
Present embodiment is write with Java language, debugs on the Nokia7610 mobile phone and passes through.Present embodiment can be written into basic html web page and correct the demonstration, the user can enter a new line and select hypertext link in the page by the up and down arrow keys of mobile phone five in key, even will scrolling up automatically by twice down Arrow, (be equivalent to form rolls downwards the page, see the content of page bottom), to stop automatic rolling by five stop keys in key, whole process shows the smoothness that links up, the sound mode switch freely, all operations only uses a thumb 5 to finish nature simple to operation on key at this.
Present WAP or the HTTP web browser in the mobile phone can only static display page, and manually by key line feed page turning up and down, complex operation is bothersome, the interface dullness.
The present invention is on the basis of the environment for use of fully studying the cellphone subscriber and experience, an a kind of timer and sliding window updating control module of adding on existing browser basis proposed, thereby have static page and browse the function of browsing with dynamic page, make things convenient for handheld device user on the small screen, to browse large format information, reduce user's operation, enrich display effect.
When concrete Interactive function designed, the present invention emphasized to reduce user's operation and memory burden, utilized the historical information of record button, reach the difference in functionality of on same button, finishing line feed and rolling, meet user's use habit, flexibly mutual, simple to operate, raise the efficiency.
When the temporal information of record button, the present invention uses the writing time in the moment that discharges button, avoid conflict with traditional keypress function, on a button, realize the multinomial function of " line feed ", " line feed continuously ", " automatic rolling ", needn't additionally introduce state variable and determining program manages conflict, effectively reduce the implementation complexity of system.
In addition, only introduce limited several Control parameter Δ X, Δ Y in designed system of the present invention and the flow process and parameter Δ X1, Δ X2, Δ Y1, Δ Y2 are set, corresponding constantly necessary at button, to Δ X and Δ Y assignment, directional information comprises (represent to move down as positive number, move on the negative number representation) naturally, under the automatic rolling pattern, system need not set up the state variable record again, simplifies logic, multiplexing structure effectively, makes the not malfunctioning again activity of clear in structure compactness of system.