The content of the invention
It is an object of the invention to propose that a kind of page zoom-in and zoom-out method and device, the method and device are based on current zoom ratio
Example and target scale ratio enter Mobile state adjustment to the scaling increment during scaling, and it is more stable to enable to scaling process,
Scaled results are more accurate.
Another object of the present invention is to propose a kind of terminal unit, the terminal unit includes above-mentioned page zoom-in and zoom-out device.
Another object of the present invention is to propose a kind of terminal unit, the terminal unit includes one or more processors,
One or more of processors are configured to perform above-mentioned page zoom-in and zoom-out method.According to an aspect of the present invention, there is provided
A kind of page zoom-in and zoom-out method, including:After Web page zoom-in and zoom-out instruction is received, institute on the display screen of terminal unit is obtained
The current zoom ratio of the scale objects in the Webpage of display;According to the current zoom ratio and target scale ratio,
Determine current zoom increment factor;The scale objects are zoomed in and out according to current zoom increment factor.
In one or more examples of above-mentioned aspect, the scaling increment factor is according to current zoom ratio and described
The absolute value of the difference of target scale ratio determines.
In one or more examples of above-mentioned aspect, the target scale ratio is based on the original of the scale objects
Width and preset width are calculated.
In one or more examples of above-mentioned aspect, the target scale ratio is set in advance.
In one or more examples of above-mentioned aspect, the scaling when scaling increment factor is each zoom operations
The incrementss of the scaling of object.
In one or more examples of above-mentioned aspect, the display screen is touch screen, and the Web page zoom-in and zoom-out refers to
Make in response to detecting finger moving and send on the touchscreen, the scaling increment factor is finger on the touch screen
Moving Unit apart from when the scale objects scaling incrementss.
In one or more examples of above-mentioned aspect, Webpage shown on the display screen of terminal unit is obtained
In the current zoom ratio of scale objects include:Detection displacement of the finger on the touch screen;Based on detected
Finger displacement determine the current zoom ratio of the scale objects.
In one or more examples of above-mentioned aspect, according to the current zoom ratio and target scale ratio, it is determined that
Current zoom increment factor includes:
Detected when moving on the touch screen according to the current zoom ratio and target scale ratio and finger
Resistance, determine current zoom increment factor.
According to an aspect of the invention, there is provided a kind of page zoom-in and zoom-out device, including:Current zoom ratio obtains single
Unit, for, after Web page zoom-in and zoom-out instruction is received, obtaining in Webpage shown on the display screen of terminal unit
Scale objects current zoom ratio;Scaling increment factor determining unit, for according to the current zoom ratio and target
Scaling, determines current zoom increment factor;Unit for scaling, for according to current zoom increment factor to the scale objects
Zoom in and out.
In one or more examples of above-mentioned aspect, the scaling increment factor determining unit is configured to according to current
The absolute value of the difference of scaling and the target scale ratio determines the scaling increment factor.
In one or more examples of above-mentioned aspect, described page zoom-in and zoom-out device is also obtained including target scale ratio
Unit, is calculated the target scale ratio for the original width and preset width based on the scale objects.
In one or more examples of above-mentioned aspect, the scaling when scaling increment factor is each zoom operations
The incrementss of the scaling of object.
In one or more examples of above-mentioned aspect, the display screen is touch screen, and the Web page zoom-in and zoom-out refers to
Make in response to detecting finger moving and send on the touchscreen, the scaling increment factor is finger on the touch screen
Moving Unit apart from when the scale objects scaling incrementss.
In one or more examples of above-mentioned aspect, described page zoom-in and zoom-out device also includes:Displacement is detected
Unit, for detecting displacement of the finger on the touch screen;The current zoom ratio acquisition unit is configured to base
The current zoom ratio of the scale objects is determined in detected finger displacement.
In one or more examples of above-mentioned aspect, described page zoom-in and zoom-out device also includes:Resistance detector unit,
For detecting resistance that finger is moved on the touch screen;The scaling increment factor determining unit is configured to according to current
Scaling, the target scale ratio and detected resistance determine current zoom increment factor.
According to an aspect of the invention, there is provided a kind of terminal unit, including display unit and above-mentioned page contracting
Put device.
According to an aspect of the invention, there is provided a kind of terminal unit, including:Display unit;Memory element;And one
Individual or multiple processors, one or more of processors are configured to perform above-mentioned page zoom-in and zoom-out method.
Above-mentioned page zoom-in and zoom-out method proposed by the present invention, device and terminal unit, by calculating current zoom ratio and mesh
The gap of mark scaling, is adjusted to scaling increment during scaling, and it is more stable to enable to scaling process, scaling
As a result more precisely, Consumer's Experience is good.
In order to realize above-mentioned related purpose, the one or more aspects of the present invention include will be explained in and in right below
The feature particularly pointed out in requirement.Description below and accompanying drawing are described in detail some illustrative aspects of the present invention.However,
Some modes in the various modes that can only use principle of the invention indicated in terms of these.Additionally, it is contemplated that
Including all these aspects and their equivalent.
Specific embodiment
Various aspects of the disclosure is described below.It is to be understood that teaching herein can have with varied form
Body embodies, and any concrete structure disclosed herein, function or both are only representational.Religion based on this paper
Lead, those skilled in the art it is to be understood that one aspect disclosed herein can be realized independently of any other aspect,
And the two or more aspects in terms of these can be combined in various manners.It is, for example possible to use described in this paper
Any number of aspect, realizes device or puts into practice method.Further, it is possible to use other structures, function or except described here
One or more aspects outside or be not one or more aspects described herein 26S Proteasome Structure and Function, realize this device
Or put into practice this method.Additionally, any aspect described herein can include at least one element of claim.
Each embodiment of the present invention is described below with reference to accompanying drawings.
The present invention proposes a kind of page zoom-in and zoom-out method, and Fig. 1 shows the stream of the page zoom-in and zoom-out method of embodiments of the invention
Cheng Tu, including step:
As shown in figure 1, in step S110, after Web page zoom-in and zoom-out instruction is received, obtaining the display screen of terminal unit
The current zoom ratio of the scale objects on curtain in shown Webpage.Wherein, the current zoom ratio is the contracting
It is rivals in a contest the current size of elephant and the ratio of original size.Uniform zoom is scaled due to described, so the scaling also may be used
With with the current width of the scale objects with the ratio of original width representing.
The present invention an example in, the terminal unit can be the equipment for carrying out web page browsing, including but do not limit
In mobile terminal device, PC equipment, it can also be non-touch screen that the display screen can be touch screen.
In an example of the present invention, scaling instruction can be triggered by various ways.Can be by clicking on Mus
Mark is clicked on the display screen by finger to trigger, or by operating the button on terminal unit triggering.
When the display screen is touch screen, can move on the display screen to trigger by double fingers.
In an example of the present invention, the scale objects can be the web page element of Webpage, such as on webpage
Text block, or the picture on webpage.As shown in Fig. 2A to Fig. 2 B, webpage is typically made up of many different content blocks,
The corresponding content of each Web page content block can regard a web page element as.Web page element can be the body text of webpage, can
Being the ad content on the picture, or webpage on webpage.When generally user is zoomed in and out to webpage, one can be selected
Scale objects, even if being sometimes that whole webpage is zoomed in and out, but the purpose of scaling is all by some webpage units in webpage
Element zooms to suitable size.For example:It is when user wants to see the pictures on webpage, then this picture is right as scaling
As;User think over reading certain then the text of news when, then using this text as scale objects.In an example of the present invention
In, when using finger, movement zooms in and out operation on the display screen, can be by double positions of the finger line central point on screen
The content for putting corresponding page area is defined as scale objects.
Next, in step S120, according to the current zoom ratio and target scale ratio, determining current zoom increment
The factor.
In an example of the present invention, the target scale ratio can be the original width based on the scale objects
It is calculated with preset width.The original width CW refers to the scale objects on the display screen not through scaling
The width shown during process.In another example of the present invention, the preset width is the width W of the display screen, institute
Target scale ratio ES=a*W/CW is stated, a can be the arithmetic number of any setting.In an example of the present invention, a values can be with
Take 1.
In an example of the present invention, the target scale ratio can be set in advance.
In an example of the present invention, the scale objects when scaling increment factor can be each zoom operations
Scaling incrementss.For example:When scaling instruction is, by clicking on the scale objects and when sending, often to click on one
It is secondary, the scaling of the scale objects is increased into a scaling increment factor, such as:It is 100% in the scaling increment factor
When, often click on once, the scaling of the scale objects is increased into 100%.
In an example of the present invention, when the display screen is touch screen, the Web page zoom-in and zoom-out instruction response
In finger moving and when sending on the touchscreen is detected, the scaling increment factor can be finger on the touch screen
Moving Unit apart from when the scale objects scaling incrementss.For example:Finger often moves 1mm, the scale objects
Scaling increase by one scaling increment factor, such as:When the scaling increment factor is 10%, finger is often moved
The scaling of the scale objects is increased by 10% by 1mm.
In an example of the present invention, the scaling increment factor V can be according to current zoom ratio and the mesh
The absolute value of the difference of mark scaling determines.The absolute value │ of the difference of current zoom ratio S and target scale ratio ES
S-ES │ are proportional, and │ S-ES │ are less, and the scaling increment factor V is less, and │ S-ES │ are bigger, the scaling increment factor V
It is bigger.The scaling increment factor V can be the function of │ S-ES │, be represented by formula V=f (│ S-ES │).For example:V= m│S-ES
│, wherein, m values are positive number.
In another example of the present invention, when the display screen is touch screen, the Web page zoom-in and zoom-out instruction rings
Ying Yu detect finger on the touchscreen when moving and sending, the scaling increment factor is can also be according to the current contracting
Put the resistance that the absolute value and finger of the difference of ratio and target scale ratio are detected when moving on the touch screen
It is determined that.
In an example of the present invention, the display screen of the terminal unit is made up of the material of adjustable resistance, described
Mobile device is provided with resistance regulation module, and the resistance regulation module is detecting current zoom ratio and target scale ratio
When the absolute value of difference changes, according to the absolute value of the current zoom ratio and the difference of target scale ratio with it is described
The corresponding relation of resistance adjusts resistance when finger is moved on the screen.The resistance of screen is bigger, and finger is moved on screen
It is dynamic to be just more difficult to.
In an example of the present invention, resistance F can be the difference of the current zoom ratio and target scale ratio
Absolute value │ S-ES │ function, F=f(│S-ES│), │ S-ES │ are less, and F is bigger, and │ S-ES │ are bigger, and F is less.Resistance F and │ S-
The relation of ES │ can be as shown in Fig. 3 A to 3B.As shown in Figure 3A, F=x/ │ S-ES │, x>0.In a preferred version of the present invention
In, x=1.As shown in Figure 3 B, F=y/ │ S-ES │ ^2, y>0.
In an example of the present invention, increment factor V=f is scaled(│ S-ES │, F), V-value is jointly true by │ S-ES │ and F
Fixed, when │ S-ES │ get over hour, V is bigger;When F is bigger, V is less.For example:V=m │ S-ES │/F ^n, wherein m>0, n>1.
In an example of the present invention, the current zoom ratio of the scale objects can be by first detecting that finger exists
Displacement on the touch screen, is then based on what detected finger displacement determined.For example, finger is often moved
Used as once scaling, current zoom ratio is equal to be the scaling before time scaling the operating effect that unit distance causes
The ratio of object and the scaling increment factor sum when secondary scaling.
Next, in step S130, being zoomed in and out to the scale objects according to current zoom increment factor.
In an example of the present invention, scaling increment factor will be first calculated during each zoom operations and is contracted again
Put.For example:Correspondence is clicked on screen or button using mouse or finger to send during scaling instruction, and scaling is calculated after clicking on every time
Then increment factor zooms in and out.
In an example of the present invention, for the mobile-initiated zoom operations of finger on touch screen, complete in finger
Once in continual moving process, finger is per Moving Unit distance, it is necessary to which calculating once scales increment factor, then utilizes
The increment factor carries out ensuing scaling, and this unit distance is infinitesimal distance, that is to say, that once moved in finger
In dynamic process, scaling increment factor is constantly to change.
According to the page zoom-in and zoom-out method of the present embodiment, the scale objects scaling closer to target scale ratio
When, scaling increment factor can become zooming in or out speed and becoming very slow for scale objects less, during scaling, be easy to user
The size of scale objects is finely adjusted, allows users to accurately achieve the scaling target sizes wanted.
Present invention also offers a kind of terminal unit, Fig. 4 shows the block diagram of the terminal unit 400 of the present invention.
As shown in figure 4, the terminal unit includes display unit 410 and page zoom-in and zoom-out device 420.
In an example of the present invention, the display unit 410 can be display screen.
In an example of the present invention, the page zoom-in and zoom-out device 420 includes:Current zoom ratio acquisition unit 421,
For, after Web page zoom-in and zoom-out instruction is received, obtaining the contracting in Webpage shown on the display screen of terminal unit
It is rivals in a contest the current zoom ratio of elephant;Scaling increment factor determining unit 422, for being contracted according to the current zoom ratio and target
Ratio is put, current zoom increment factor is determined;Unit for scaling 423, for right to the scaling according to current zoom increment factor
As zooming in and out.
In an example of the present invention, the 422 scaling increment factor determining unit is configured to according to current zoom
The absolute value of the difference of ratio and the target scale ratio determines the scaling increment factor.Wherein, it is described scaling increment because
The incrementss of the scaling of scale objects when son is each zoom operations.
In an example of the present invention, the page zoom-in and zoom-out device 420 also includes target scale ratio acquisition unit(Figure
Not shown in), the target scale ratio acquisition unit is configured to the original width based on the scale objects and pre- fixed width
Degree is calculated the target scale ratio.In another example of the present invention, the target scale ratio is to preset
's.
In an example of the present invention, the contracting of the scale objects when scaling increment factor is each zoom operations
Put the incrementss of ratio.In an example of the present invention, the display screen is touch screen, the Web page zoom-in and zoom-out instruction
In response to detecting finger moving and send on the touchscreen, the scaling increment factor is that finger is moved on the touch screen
The incrementss of the scaling of scale objects during dynamic unit distance.
In an example of the present invention, described page zoom-in and zoom-out device 420 also includes displacement detector unit(In figure
It is not shown), the displacement detector unit be used for detect displacement of the finger on the touch screen;The current zoom
Ratio acquisition unit 421 is configured to the current zoom ratio that the scale objects are determined based on detected finger displacement
Example.In an example of the present invention, the displacement detector unit can be the sensor on mobile device, such as distance
Sensor.
In an example of the present invention, described page zoom-in and zoom-out device 420 also includes:Resistance detector unit(In figure not
Illustrate), the resistance detector unit is used to detect resistance that finger is moved on the touch screen;The scaling increment factor is true
Order unit 422 is configured to be determined currently according to current zoom ratio, the target scale ratio and detected resistance
Scaling increment factor.
Present invention also offers a kind of terminal unit, Fig. 5 shows that another embodiment square frame of the terminal unit is illustrated
Figure.
As shown in figure 5, the terminal unit 500 includes display unit 510, memory element 520 and page zoom-in and zoom-out device
420。
In an example of the present invention, the display unit 510 can be display screen.
In an example of the present invention, the page zoom-in and zoom-out device 420 can be configured to process by one or more
Device is performing the page zoom-in and zoom-out method described in Fig. 1.
Additionally, typically, the mobile terminal of the present invention can be the various hand-held terminal devices with Bluetooth function, for example, have
There are mobile phone, the personal digital assistant of Bluetooth function(PDA).
Additionally, the method according to the invention is also implemented as by the processor in mobile terminal(Such as CPU)Perform
Computer program, and store in a memory in the mobile terminal.It is when executed by the computer program, performs sheet
The above-mentioned functions limited in the method for invention.
Additionally, the method according to the invention is also implemented as a kind of computer program, the computer program
Including computer-readable medium, it is stored with for performing limit in the method for the present invention above-mentioned on the computer-readable medium
The computer program of function.
Additionally, said method step and system unit can also utilize controller and cause controller reality for storage
The computer readable storage devices of the computer program of existing above-mentioned steps or Elementary Function are realized.
Those skilled in the art will also understand is that, the various illustrative logical blocks with reference to described by disclosure herein, mould
Block, circuit and algorithm steps may be implemented as the combination of electronic hardware, computer software or both.It is hard in order to clearly demonstrate
This interchangeability of part and software, enters to which with regard to the function of various exemplary components, square, module, circuit and step
General description is gone.This function is implemented as software and is also implemented as hardware depending on concrete application and applying
To the design constraint of whole system.Those skilled in the art can be directed to every kind of concrete application realize in a variety of ways it is described
Function, but this realize that decision should not be interpreted as causing a departure from the scope of the present.
Although content disclosed above shows the exemplary embodiment of the present invention, it should be noted that without departing substantially from power
On the premise of profit requires the scope of the present invention for limiting, may be many modifications and change.It is real according to invention described herein
Function, step and/or the action for applying the claim to a method of example is not required to perform with any particular order.Although additionally, the present invention
Element can be described with individual form or be required, it is also contemplated that multiple, be odd number unless explicitly limited.
Although describing each embodiment of the invention above with reference to figure to be described, people in the art
Member, can be doing on the basis of without departing from present invention it should be appreciated that each embodiment for being proposed to the invention described above
Go out various improvement.Therefore, protection scope of the present invention should be determined by the content of appending claims.