CN106527955B - Method and device for controlling page sliding - Google Patents

Method and device for controlling page sliding Download PDF

Info

Publication number
CN106527955B
CN106527955B CN201611202157.8A CN201611202157A CN106527955B CN 106527955 B CN106527955 B CN 106527955B CN 201611202157 A CN201611202157 A CN 201611202157A CN 106527955 B CN106527955 B CN 106527955B
Authority
CN
China
Prior art keywords
sliding
page
axis direction
distance
speed
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.)
Active
Application number
CN201611202157.8A
Other languages
Chinese (zh)
Other versions
CN106527955A (en
Inventor
柯杰燕
戚炎兴
孟梁军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201611202157.8A priority Critical patent/CN106527955B/en
Publication of CN106527955A publication Critical patent/CN106527955A/en
Application granted granted Critical
Publication of CN106527955B publication Critical patent/CN106527955B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Abstract

The invention discloses a method for controlling page sliding, which comprises the following steps: detecting sliding operation based on a terminal page, and acquiring a starting point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system; determining a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate; determining a page sliding speed according to the page sliding direction and the sliding distance of the sliding operation; and controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction. The invention also discloses a device for controlling the page sliding. The invention can realize effective control on the sliding of the terminal page, thereby enabling a user to conveniently and quickly locate the target page and improving the operation efficiency.

Description

Method and device for controlling page sliding
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a method and a device for controlling page sliding.
Background
At present, touch screen electronic devices such as smart phones and tablet computers basically support page sliding, and the sliding operation mode is mainly realized through two modes: firstly, the user slides fingers or an operating pen on a screen at a certain speed, and the faster the sliding speed is, the more pages slide; and secondly, the user performs dragging operation through a sliding bar displayed on the screen.
The above method has the following defects: for the finger screen sliding mode, the finger sliding speed is not well controlled, for example, when the finger slides too fast, a desired page can be missed, and when the number of pages is large, the desired page can be found by frequently sliding the screen for many times; for the dragging mode of the sliding strip, the sliding strip needs to occupy a certain screen display space, the sliding strip is too large in display, the display space can be wasted, and the sliding strip is too small in display, so that dragging of points dragged by a user in difficulty during finger operation can be caused, and particularly, the sliding strip is inconvenient to use for a user with a small electronic display screen.
Disclosure of Invention
The invention mainly aims to provide a method and a device for controlling page sliding, and aims to effectively control the page sliding of a terminal, so that a user can conveniently and quickly position a target page, and the operation efficiency is improved.
In order to achieve the above object, the present invention provides a method for controlling page sliding, comprising the steps of:
detecting sliding operation based on a terminal page, and acquiring a starting point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system;
determining a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate;
determining a page sliding speed according to the page sliding direction and the sliding distance of the sliding operation;
and controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction.
Optionally, the step of determining a page sliding direction and a sliding distance of the sliding operation according to the start point coordinate and the end point coordinate includes:
respectively calculating the sliding distance of the sliding operation in the X-axis direction and the sliding distance of the sliding operation in the Y-axis direction in the coordinate system according to the starting point coordinate and the ending point coordinate;
if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, determining that the page sliding direction is the X-axis direction, otherwise, determining that the page sliding direction is the Y-axis direction;
and calculating the distance between the starting point and the end point according to the coordinates of the starting point and the coordinates of the end point, and taking the calculation result as the sliding distance of the sliding operation.
Optionally, the step of determining the page sliding rate according to the page sliding direction and the sliding distance of the sliding operation includes:
acquiring the offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the page sliding direction;
calculating the ratio of the obtained offset to the sliding distance of the sliding operation;
acquiring a rate factor corresponding to the ratio;
and multiplying the speed factor by a preset speed base number to obtain the page sliding speed.
Optionally, the step of obtaining, according to the page sliding direction, an offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system includes:
if the page sliding direction is the X-axis direction, acquiring the offset of the sliding operation in the Y-axis direction;
and if the page sliding direction is the Y-axis direction, acquiring the offset of the sliding operation in the X-axis direction.
Optionally, the step of obtaining the rate factor corresponding to the ratio comprises:
and querying a preset ratio and rate factor relation mapping table to obtain a rate factor corresponding to the ratio.
In addition, to achieve the above object, the present invention further provides an apparatus for controlling page sliding, including:
the terminal comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for detecting sliding operation based on a terminal page and acquiring a starting point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system;
the first determining module is used for determining the page sliding direction and the sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate;
the second determining module is used for determining the page sliding speed according to the page sliding direction and the sliding distance of the sliding operation;
and the control module is used for controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction.
Optionally, the first determining module is further configured to:
respectively calculating the sliding distance of the sliding operation in the X-axis direction and the sliding distance of the sliding operation in the Y-axis direction in the coordinate system according to the starting point coordinate and the ending point coordinate;
if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, determining that the page sliding direction is the X-axis direction, otherwise, determining that the page sliding direction is the Y-axis direction;
and calculating the distance between the starting point and the end point according to the coordinates of the starting point and the coordinates of the end point, and taking the calculation result as the sliding distance of the sliding operation.
Optionally, the second determining module is further configured to:
acquiring the offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the page sliding direction;
calculating the ratio of the obtained offset to the sliding distance of the sliding operation;
acquiring a rate factor corresponding to the ratio;
and multiplying the speed factor by a preset speed base number to obtain the page sliding speed.
Optionally, the second determining module is further configured to:
if the page sliding direction is the X-axis direction, acquiring the offset of the sliding operation in the Y-axis direction;
and if the page sliding direction is the Y-axis direction, acquiring the offset of the sliding operation in the X-axis direction.
Optionally, the second determining module is further configured to query a preset ratio-to-rate-factor relation mapping table to obtain a rate factor corresponding to the ratio.
The method comprises the steps of detecting sliding operation based on a terminal page, and acquiring a starting point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system; determining a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate; determining a page sliding speed according to the page sliding direction and the sliding distance of the sliding operation; and controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction. Through the mode, the speed of sliding the screen can be controlled only by adjusting the sliding angle of the finger of the user, compared with the prior art, when the number of the pages is large, the user does not need to perform screen sliding operation for many times, and meanwhile, the inconvenience of using a sliding strip to perform screen sliding is avoided, so that the user can conveniently and quickly locate the target page, and the operation efficiency is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for controlling page sliding according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario of a first embodiment of the method for controlling page sliding according to the present invention;
FIG. 3 is a flowchart illustrating a method for controlling page sliding according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a refinement step of step S30 in FIG. 3;
FIG. 5 is a functional block diagram of a device for controlling page sliding according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a method for controlling page sliding.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for controlling page sliding according to a first embodiment of the present invention. The method comprises the following steps:
step S10, detecting a sliding operation based on the terminal page, and acquiring a start point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system.
In this embodiment, the terminal, that is, the mobile terminal includes touch screen electronic devices such as a smart phone and a tablet computer, and the electronic devices all support page turning operations such as page sliding. The page sliding in this embodiment mainly refers to page sliding up and down (e.g., reading an electronic document) and page sliding left and right (e.g., switching photos, viewing a multi-page lateral thumbnail, etc.).
In this step, when the terminal touch area, i.e. the terminal touch screen, is implemented, a coordinate system of the terminal touch area may be first established, and the terminal touch area is located in the first quadrant, so that the coordinate data of all touch points on the terminal touch area is 0 or a positive number.
The mobile terminal detects the sliding operation based on the terminal page in real time, when the finger of the user slides on the terminal page, the terminal obtains the coordinates of the starting point and the ending point of the sliding operation, and of course, the mobile terminal can also obtain two different sliding screen touch points corresponding to the sliding operation of the user according to a preset time interval, and obtain the coordinate values of the two touch points in the terminal touch area coordinate system.
And step S20, determining the page sliding direction and the sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate.
The sliding directions of the user's finger include horizontal left, horizontal right, vertical up, vertical down, and oblique up, oblique down, etc. In this embodiment, the page sliding direction refers to a page sliding direction allowed by the system, and includes a horizontal left direction, a horizontal right direction, a vertical upward direction, and a vertical downward direction. For example, if the start point coordinates are (X0, Y0), the end point coordinates are (X1, Y0), and X0< X1, it may be determined that the operation intention of the user on the page is a swipe in the positive X-axis direction, at which time it may be determined that the page swipe direction is a horizontal right swipe. In addition, the sliding distance of the user sliding operation can be determined according to the coordinates of the starting point and the coordinates of the end point of the user sliding operation, for example, the distance between the coordinates of the starting point and the coordinates of the end point is used as the sliding distance of the user sliding operation.
And step S30, determining the page sliding speed according to the page sliding direction and the sliding distance of the sliding operation.
The terminal can determine the page sliding speed according to the determined page sliding direction and the sliding distance of the user sliding operation. For example, if the determined page sliding direction is horizontal rightward sliding, the offset of the sliding operation of the user in the X-axis direction can be obtained, and the ratio between the offset of the X-axis direction and the sliding distance is calculated, so as to measure the inclination degree of the sliding track. Then, the terminal calculates the page sliding rate according to the ratio by a preset algorithm, for example, if the ratio and the page sliding rate are preset to be in a proportional relationship, the larger the ratio is, the larger the calculated page sliding rate is, and the smaller the ratio is, the smaller the calculated page sliding rate is. Of course, the ratio and the page sliding rate may be set to be in inverse proportion or in other mapping relations in advance, and the specific implementation may be flexibly set.
And step S40, controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction.
After the page sliding speed and the page sliding direction are respectively determined, the mobile terminal controls the terminal page to slide according to the determined page sliding speed and the determined page sliding direction. Referring to fig. 2, fig. 2 is a schematic view of an application scenario of a first embodiment of a method for controlling page sliding according to the present invention, in which a coordinate system is established with a center of a display screen as an origin, and if a user is currently reading a document, the user operates to slide obliquely upward on the display screen, and a sliding distance in an X-axis direction is smaller than a sliding distance in a Y-axis direction, the page slides a corresponding number of lines of text in a positive Y-axis direction, where the number of lines of text sliding is determined by a page sliding rate.
It should be noted that, after the page sliding rate and the page sliding direction are determined, if the page can slide in the determined direction (some page-turning modes may only support sliding in one direction, or the page has reached the bottom end, etc.), the terminal executes page sliding; if the page can not slide towards the determined direction, the terminal can output prompt information or does not process the prompt information.
In addition, the user may also set a sliding page-turning effect, for example, if the sliding page-turning effect is set to be directly displayed, the mobile terminal directly obtains the page content that needs to be displayed finally to display.
In this embodiment, a sliding operation based on a terminal page is detected, and a start point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system are obtained; determining a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate; determining a page sliding speed according to the page sliding direction and the sliding distance of the sliding operation; and controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction. Through the mode, the speed of sliding the screen can be controlled only by adjusting the sliding angle of the finger of the user, compared with the prior art, when the number of the pages is large, the user does not need to perform screen sliding operation for many times, and meanwhile, the inconvenience of using a sliding strip to perform screen sliding is avoided, so that the user can conveniently and quickly locate the target page, and the operation efficiency is improved.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a method for controlling page sliding according to a second embodiment of the present invention. Based on the above-mentioned embodiment shown in fig. 1, the step S20 may include:
step S21, respectively calculating the sliding distance of the sliding operation in the X-axis direction and the sliding distance of the sliding operation in the Y-axis direction in the coordinate system according to the starting point coordinate and the ending point coordinate;
step S22, if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, determining that the page sliding direction is the X-axis direction, otherwise, determining that the page sliding direction is the Y-axis direction;
step S23, calculating a distance between the start point and the end point according to the start point coordinate and the end point coordinate, and taking a calculation result as a sliding distance of the sliding operation.
In this embodiment, the mobile terminal may respectively calculate a sliding distance in the X-axis direction and a sliding distance in the Y-axis direction corresponding to the sliding operation in the coordinate system according to the start point coordinate and the end point coordinate, and if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, it may be determined that the user is biased to slide in the X-axis direction, that is, slide in the horizontal direction, and at this time, the terminal determines that the page sliding direction is the X-axis direction; if the sliding distance in the X-axis direction is less than the sliding distance in the Y-axis direction, it can be determined that the user is biased to slide in the Y-axis direction, i.e. slide in the vertical direction, and at this time, it is determined that the page sliding direction is the Y-axis direction. Then, the terminal can directly calculate the distance between the starting point and the ending point according to the coordinate values as the sliding distance of the sliding operation of the user.
According to the method and the device, the terminal can accurately distinguish the user sliding operation intention by calculating according to the starting point coordinate and the ending point coordinate, so that the page sliding direction of the terminal is determined.
Further, referring to fig. 4, fig. 4 is a schematic diagram of a refinement step of step S30 in fig. 3. Based on the above embodiment, the step S30 may include:
step S31, acquiring the offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the page sliding direction;
step S32, calculating the ratio of the obtained offset to the sliding distance of the sliding operation;
step S33, obtaining a rate factor corresponding to the ratio;
and step S34, multiplying the speed factor by a preset speed base number to obtain the page sliding speed.
In this embodiment, the mobile terminal may obtain an offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the determined page sliding direction, and specifically, the step S31 may include:
step S311, if the page sliding direction is the X-axis direction, acquiring the offset of the sliding operation in the Y-axis direction;
in step S312, if the page sliding direction is the Y-axis direction, the offset of the sliding operation in the X-axis direction is obtained.
The step S32 may include:
step S321, querying a preset ratio-rate factor relationship mapping table to obtain a rate factor corresponding to the ratio.
In the second embodiment of the method for controlling page sliding according to the present invention, the mobile terminal determines the page sliding direction, and the following description is given by taking the determined page sliding direction as the X-axis direction:
if the page sliding direction is the X-axis direction, the mobile terminal can acquire the offset of the sliding operation in the Y-axis direction, then calculate the ratio between the offset and the sliding distance, acquire the rate factor corresponding to the ratio, and multiply the rate factor by the preset rate base number to obtain the page sliding rate. If the offset in the Y-axis direction is 5 and the sliding distance is 10, the ratio is 5/10, namely 0.5, then the terminal queries a preset slope and rate factor relation mapping table, and the rate factor corresponding to the ratio of 2 in the table is 2, so that the page sliding rate is obtained by multiplying the preset rate base number by 2.
The mobile terminal may preset a velocity component of the sliding operation in the X-axis direction as a velocity base, or may set a velocity base according to a setting instruction of the user. For example, if the page is slid by 4 lines of text at the rate of the rate base, and the rate factor is 5, the new sliding rate is 5 times the original sliding rate, and the page is slid by 20 lines of text.
It should be noted that the mapping relationship between the ratio and the rate factor can be flexibly set according to the visual habits of the user, so as to ensure that the finally calculated page sliding rate is within a reasonable range.
Further, since the sliding direction of the sliding operation performed by the user may deviate from the actual sliding direction, the slope-rate factor mapping table can be simplified. Specifically, the ratio in the ratio-to-rate-factor mapping table may be divided into a plurality of slope intervals according to a preset rule in advance, and a rate factor may be set for each slope interval. Because the offset is smaller than the sliding distance, the ratio of the offset to the sliding distance ranges from 0 to 1, and according to the size of the ratio, the ratio can be averagely divided into 10 grades from 0 to 1, each 0.1 is a grade, 0-0.1 is a first grade, 0.1-0.2 is a second grade, and so on. The page sliding rate is based on the rate base, and the page sliding rate is doubled with each level increase of the ratio, if the ratio is 0.4 to 0.5, and is at the 5 th level, the page sliding rate is 5 times of the rate base.
The page sliding speed is determined through the ratio relation between the offset and the sliding distance, and the user can control the page sliding speed by controlling the angle of the sliding screen track.
The invention also provides a device for controlling the page sliding.
Referring to fig. 5, fig. 5 is a functional module diagram of the apparatus for controlling page sliding according to the first embodiment of the present invention. The device comprises:
the acquisition module 10 is configured to detect a sliding operation based on a terminal page, and acquire a start point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system;
in this embodiment, the terminal, that is, the mobile terminal includes touch screen electronic devices such as a smart phone and a tablet computer, and the electronic devices all support page turning operations such as page sliding. The page sliding in this embodiment mainly refers to page sliding up and down (e.g., reading an electronic document) and page sliding left and right (e.g., switching photos, viewing a multi-page lateral thumbnail, etc.).
In this step, when the terminal touch area, i.e. the terminal touch screen, is implemented, a coordinate system of the terminal touch area may be first established, and the terminal touch area is located in the first quadrant, so that the coordinate data of all touch points on the terminal touch area is 0 or a positive number.
The obtaining module 10 detects a sliding operation based on a terminal page in real time, and when a finger of a user slides on the terminal page, the obtaining module 10 obtains a start point coordinate and an end point coordinate of the sliding operation, and of course, the obtaining module 10 may also obtain two different sliding screen touch points corresponding to the sliding operation of the user according to a preset time interval, and obtain coordinate values of the two touch points in a terminal touch area coordinate system.
A first determining module 20, configured to determine a page sliding direction and a sliding distance of the sliding operation according to the start point coordinate and the end point coordinate;
the sliding directions of the user's finger include horizontal left, horizontal right, vertical up, vertical down, and oblique up, oblique down, etc. In this embodiment, the page sliding direction refers to a page sliding direction allowed by the system, and includes a horizontal left direction, a horizontal right direction, a vertical upward direction, and a vertical downward direction, and in the coordinate system of the terminal touch area, the first determining module 20 may determine the page sliding direction according to the start point coordinate and the end point coordinate of the user sliding operation. For example, if the start point coordinates are (X0, Y0), the end point coordinates are (X1, Y0), and X0< X1, it may be determined that the operation intention of the user on the page is a swipe in the positive X-axis direction, at which time it may be determined that the page swipe direction is a horizontal right swipe. In addition, the first determining module 20 may further determine the sliding distance of the user sliding operation according to the start point coordinate and the end point coordinate of the user sliding operation, for example, a distance between the start point coordinate and the end point coordinate is taken as the sliding distance of the user sliding operation.
A second determining module 30, configured to determine a page sliding rate according to the page sliding direction and the sliding distance of the sliding operation;
the second determination module 30 may determine the page sliding rate according to the determined page sliding direction and the sliding distance of the user sliding operation. For example, if the page sliding direction determined by the first determining module 20 is horizontal rightward sliding, the second determining module 30 may obtain an offset of the sliding operation of the user in the X-axis direction, and calculate a ratio between the offset of the X-axis direction and the sliding distance, thereby measuring the inclination degree of the sliding track. Then, the second determining module 30 calculates the page sliding rate according to the ratio by a preset algorithm, for example, if the ratio and the page sliding rate are preset to be in a direct proportion relationship, the larger the ratio is, the larger the calculated page sliding rate is, and the smaller the ratio is, the smaller the calculated page sliding rate is. Of course, the ratio and the page sliding rate may be set to be in inverse proportion or in other mapping relations in advance, and the specific implementation may be flexibly set.
And the control module 40 is configured to control the terminal page to slide according to the determined page sliding rate and the determined page sliding direction.
After the page sliding rate and the page sliding direction are respectively determined, the control module 40 controls the terminal page to slide according to the determined page sliding rate and the determined page sliding direction. Referring to fig. 2, fig. 2 is a schematic view of an application scenario of a first embodiment of a method for controlling page sliding according to the present invention, in which a coordinate system is established with a center of a display screen as an origin, and if a user is currently reading a document, the user operates to slide obliquely upward on the display screen, and a sliding distance in an X-axis direction is smaller than a sliding distance in a Y-axis direction, the page slides a corresponding number of lines of text in a positive Y-axis direction, where the number of lines of text sliding is determined by a page sliding rate.
It should be noted that, after determining the page sliding rate and the page sliding direction, if the page can slide to the determined direction (some page-turning modes may only support sliding in one direction, or the page has reached the bottom end, etc.), the control module 40 executes page sliding; if the page can not slide to the determined direction, the prompt message can be output or no processing is carried out.
In addition, the user may also set a sliding page-turning effect, for example, if the sliding page-turning effect is set to be directly displayed, the mobile terminal directly obtains the page content that needs to be displayed finally to display.
In this embodiment, the obtaining module 10 detects a sliding operation based on a terminal page, and obtains a start point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system; the first determining module 20 determines a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate; the second determining module 30 determines the page sliding rate according to the page sliding direction and the sliding distance of the sliding operation; and the control module 40 controls the terminal page to slide according to the determined page sliding speed and the determined page sliding direction. Through the mode, the speed of sliding the screen can be controlled only by adjusting the sliding angle of the finger of the user, compared with the prior art, when the number of the pages is large, the user does not need to perform screen sliding operation for many times, and meanwhile, the inconvenience of using a sliding strip to perform screen sliding is avoided, so that the user can conveniently and quickly locate the target page, and the operation efficiency is improved.
Further, with continued reference to fig. 5, the first determining module 20 is further configured to:
respectively calculating the sliding distance of the sliding operation in the X-axis direction and the sliding distance of the sliding operation in the Y-axis direction in the coordinate system according to the starting point coordinate and the ending point coordinate;
if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, determining that the page sliding direction is the X-axis direction, otherwise, determining that the page sliding direction is the Y-axis direction;
and calculating the distance between the starting point and the end point according to the coordinates of the starting point and the coordinates of the end point, and taking the calculation result as the sliding distance of the sliding operation.
In this embodiment, the first determining module 20 may respectively calculate a sliding distance in the X-axis direction and a sliding distance in the Y-axis direction corresponding to the sliding operation in the coordinate system according to the start point coordinate and the end point coordinate, and if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, it may be determined that the user is biased to slide in the X-axis direction, that is, slide in the horizontal direction, and at this time, the terminal determines that the page sliding direction is the X-axis direction; if the sliding distance in the X-axis direction is less than the sliding distance in the Y-axis direction, it can be determined that the user is biased to slide in the Y-axis direction, i.e. slide in the vertical direction, and at this time, it is determined that the page sliding direction is the Y-axis direction. Then, the first determining module 20 may directly calculate a distance between the start point and the end point according to the coordinate values as a sliding distance of the user sliding operation.
According to the method and the device, the terminal can accurately distinguish the user sliding operation intention by calculating according to the starting point coordinate and the ending point coordinate, so that the page sliding direction of the terminal is determined.
Further, with continued reference to fig. 5, the second determining module 30 is further configured to: acquiring the offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the page sliding direction; calculating the ratio of the obtained offset to the sliding distance of the sliding operation; acquiring a rate factor corresponding to the ratio; and multiplying the speed factor by a preset speed base number to obtain the page sliding speed.
In this embodiment, the mobile terminal may obtain an offset of the sliding operation in the X-axis direction or the Y-axis direction in the coordinate system according to the determined page sliding direction, and specifically, when obtaining the offset of the sliding operation in the X-axis direction or the Y-axis direction in the coordinate system according to the page sliding direction, the second determining module 30 is further configured to: if the page sliding direction is the X-axis direction, acquiring the offset of the sliding operation in the Y-axis direction; and if the page sliding direction is the Y-axis direction, acquiring the offset of the sliding operation in the X-axis direction. In obtaining the rate factor corresponding to the ratio, the second determining module 30 is further configured to: and querying a preset ratio and rate factor relation mapping table to obtain a rate factor corresponding to the ratio.
In the foregoing embodiment, the first determining module 20 determines the page sliding direction, and the determined page sliding direction is taken as the X-axis direction as an example:
if the page sliding direction is the X-axis direction, the second determining module 30 may obtain an offset of the sliding operation in the Y-axis direction, then calculate a ratio between the offset and the sliding distance, obtain a rate factor corresponding to the ratio, and multiply the rate factor by a preset rate base number to obtain the page sliding rate. If the offset in the Y-axis direction is 5 and the sliding distance is 10, the ratio is 5/10, that is, 0.5, and then the second determining module 30 queries a preset slope-rate factor relationship mapping table, where the rate factor corresponding to the ratio 2 in the table is 2, so that the page sliding rate is obtained by multiplying the preset rate base by 2.
The speed component of the sliding operation in the X-axis direction may be preset as a speed base, or a speed base may be set according to a setting instruction of a user. For example, if the page is slid by 4 lines of text at the rate of the rate base, and the rate factor is 5, the new sliding rate is 5 times the original sliding rate, and the page is slid by 20 lines of text.
It should be noted that the mapping relationship between the ratio and the rate factor can be flexibly set according to the visual habits of the user, so as to ensure that the finally calculated page sliding rate is within a reasonable range.
Further, since the sliding direction of the sliding operation performed by the user may deviate from the actual sliding direction, the slope-rate factor mapping table can be simplified. Specifically, the ratio in the ratio-to-rate-factor mapping table may be divided into a plurality of slope intervals according to a preset rule in advance, and a rate factor may be set for each slope interval. Because the offset is smaller than the sliding distance, the ratio of the offset to the sliding distance ranges from 0 to 1, and according to the size of the ratio, the ratio can be averagely divided into 10 grades from 0 to 1, each 0.1 is a grade, 0-0.1 is a first grade, 0.1-0.2 is a second grade, and so on. The page sliding rate is based on the rate base, and the page sliding rate is doubled with each level increase of the ratio, if the ratio is 0.4 to 0.5, and is at the 5 th level, the page sliding rate is 5 times of the rate base.
The page sliding speed is determined through the ratio relation between the offset and the sliding distance, and the user can control the page sliding speed by controlling the angle of the sliding screen track.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of controlling page sliding, the method comprising the steps of:
detecting sliding operation based on a terminal page, and acquiring a starting point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system;
determining a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the end point coordinate;
determining a page sliding speed according to the page sliding direction and the sliding distance of the sliding operation, wherein the page sliding speed is obtained by obtaining the offset of the sliding operation on the X axis or the Y axis according to the sliding direction, calculating the ratio of the offset to the sliding distance, obtaining a speed factor corresponding to the ratio, and multiplying the speed factor by a speed base number;
and controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction.
2. The method of claim 1, wherein the step of determining a page sliding direction and a sliding distance of the sliding operation based on the start point coordinates and the end point coordinates comprises:
respectively calculating the sliding distance of the sliding operation in the X-axis direction and the sliding distance of the sliding operation in the Y-axis direction in the coordinate system according to the starting point coordinate and the ending point coordinate;
if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, determining that the page sliding direction is the X-axis direction, otherwise, determining that the page sliding direction is the Y-axis direction;
and calculating the distance between the starting point and the end point according to the coordinates of the starting point and the coordinates of the end point, and taking the calculation result as the sliding distance of the sliding operation.
3. The method of claim 2, wherein the step of determining a page sliding rate based on the page sliding direction and the sliding distance of the sliding operation comprises:
acquiring the offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the page sliding direction;
calculating the ratio of the obtained offset to the sliding distance of the sliding operation;
acquiring a rate factor corresponding to the ratio;
and multiplying the speed factor by a preset speed base number to obtain the page sliding speed.
4. The method of claim 3, wherein the step of obtaining the offset of the sliding operation in the corresponding X-axis direction or Y-axis direction in the coordinate system according to the page sliding direction comprises:
if the page sliding direction is the X-axis direction, acquiring the offset of the sliding operation in the Y-axis direction;
and if the page sliding direction is the Y-axis direction, acquiring the offset of the sliding operation in the X-axis direction.
5. The method of claim 3 or 4, wherein the step of obtaining a rate factor corresponding to the ratio comprises:
and querying a preset ratio and rate factor relation mapping table to obtain a rate factor corresponding to the ratio.
6. An apparatus for controlling page sliding, the apparatus comprising:
the terminal comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for detecting sliding operation based on a terminal page and acquiring a starting point coordinate and an end point coordinate of the sliding operation in a preset terminal touch area coordinate system;
the first determining module is used for determining a page sliding direction and a sliding distance of the sliding operation according to the starting point coordinate and the ending point coordinate, wherein the page sliding speed is obtained by obtaining the offset of the sliding operation on an X axis or a Y axis according to the sliding direction, calculating the ratio of the offset to the sliding distance, obtaining a speed factor corresponding to the ratio, and multiplying the speed factor by a speed base number;
the second determining module is used for determining the page sliding speed according to the page sliding direction and the sliding distance of the sliding operation;
and the control module is used for controlling the terminal page to slide according to the determined page sliding speed and the determined page sliding direction.
7. The apparatus of claim 6, wherein the first determination module is further to:
respectively calculating the sliding distance of the sliding operation in the X-axis direction and the sliding distance of the sliding operation in the Y-axis direction in the coordinate system according to the starting point coordinate and the ending point coordinate;
if the sliding distance in the X-axis direction is greater than the sliding distance in the Y-axis direction, determining that the page sliding direction is the X-axis direction, otherwise, determining that the page sliding direction is the Y-axis direction;
and calculating the distance between the starting point and the end point according to the coordinates of the starting point and the coordinates of the end point, and taking the calculation result as the sliding distance of the sliding operation.
8. The apparatus of claim 7, wherein the second determining module is further to:
acquiring the offset of the sliding operation in the X-axis direction or the Y-axis direction corresponding to the coordinate system according to the page sliding direction;
calculating the ratio of the obtained offset to the sliding distance of the sliding operation;
acquiring a rate factor corresponding to the ratio;
and multiplying the speed factor by a preset speed base number to obtain the page sliding speed.
9. The apparatus of claim 8, wherein the second determining module is further for:
if the page sliding direction is the X-axis direction, acquiring the offset of the sliding operation in the Y-axis direction;
and if the page sliding direction is the Y-axis direction, acquiring the offset of the sliding operation in the X-axis direction.
10. The apparatus according to claim 8 or 9, wherein the second determining module is further configured to query a preset ratio-to-rate-factor mapping table to obtain the rate factor corresponding to the ratio.
CN201611202157.8A 2016-12-21 2016-12-21 Method and device for controlling page sliding Active CN106527955B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611202157.8A CN106527955B (en) 2016-12-21 2016-12-21 Method and device for controlling page sliding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611202157.8A CN106527955B (en) 2016-12-21 2016-12-21 Method and device for controlling page sliding

Publications (2)

Publication Number Publication Date
CN106527955A CN106527955A (en) 2017-03-22
CN106527955B true CN106527955B (en) 2020-07-14

Family

ID=58337393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611202157.8A Active CN106527955B (en) 2016-12-21 2016-12-21 Method and device for controlling page sliding

Country Status (1)

Country Link
CN (1) CN106527955B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132753A (en) * 2017-12-21 2018-06-08 广州阿里巴巴文学信息技术有限公司 A kind of recognition methods, device and the terminal device of user gesture operation
WO2020243940A1 (en) * 2019-06-06 2020-12-10 深圳海付移通科技有限公司 Transaction interface control method, electronic transaction device, and storage medium
CN110658974B (en) * 2019-08-01 2022-08-16 平安科技(深圳)有限公司 Page sliding method and device, electronic equipment and storage medium
CN110493624A (en) * 2019-08-28 2019-11-22 上海云视科技股份有限公司 Touching telecontrol method, apparatus, remote controler, intelligent TV set and storage medium
CN113110786B (en) * 2021-06-15 2021-09-03 南京统信软件技术有限公司 Page sliding control method and mobile terminal
CN114115678B (en) * 2021-11-30 2023-06-27 深圳市锐尔觅移动通信有限公司 Content display control method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096513A (en) * 2011-02-23 2011-06-15 惠州Tcl移动通信有限公司 Solution for sliding of touch screen and electronic device using the same
CN103135909A (en) * 2011-11-23 2013-06-05 腾讯科技(深圳)有限公司 Display method, device and terminal for page
CN103699289A (en) * 2013-12-13 2014-04-02 广州华多网络科技有限公司 Method and device for responding to sliding operation
CN104777986A (en) * 2015-03-20 2015-07-15 广东欧珀移动通信有限公司 Navigation processing method and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096513A (en) * 2011-02-23 2011-06-15 惠州Tcl移动通信有限公司 Solution for sliding of touch screen and electronic device using the same
CN103135909A (en) * 2011-11-23 2013-06-05 腾讯科技(深圳)有限公司 Display method, device and terminal for page
CN103699289A (en) * 2013-12-13 2014-04-02 广州华多网络科技有限公司 Method and device for responding to sliding operation
CN104777986A (en) * 2015-03-20 2015-07-15 广东欧珀移动通信有限公司 Navigation processing method and mobile terminal

Also Published As

Publication number Publication date
CN106527955A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106527955B (en) Method and device for controlling page sliding
TWI483200B (en) Apparatus and method for processing handwriting input
TWI284274B (en) Method for controlling intelligent movement of touch pad
US9477403B2 (en) Drawing on a touchscreen
CN104991696B (en) A kind of information processing method and electronic equipment
CN103064627B (en) A kind of application management method and device
CN103294401A (en) Icon processing method and device for electronic instrument with touch screen
JP2015153420A (en) Multitask switching method and system and electronic equipment having the same system
US20140118291A1 (en) Electronic apparatus and drawing method
US10185442B2 (en) Method for controlling display of touchscreen, and mobile device
TW201426513A (en) Apparatus and method for processing handwriting input
CN104461312A (en) Display control method and electronic equipment
US20150347000A1 (en) Electronic device and handwriting-data processing method
CN105353933A (en) Capacitive touch screen control method
US20130271419A1 (en) Transforming mobile device sensor interaction to represent user intent and perception
JP2014215750A (en) Electronic device, calibration method, and program
CN105159552A (en) Page flipping control method for browsing web page and user terminal
CN103365444A (en) Terminal equipment and touch method for touch screen thereon
CN105988700B (en) Terminal screen display method and device
CN108932089B (en) Target object adjusting method and device, electronic equipment and storage medium
JP2016110604A (en) Page turning system and method
CN106598435A (en) Page locating method and apparatus
EP2876540B1 (en) Information processing device
CN103914228A (en) Mobile terminal and touch screen operating method thereof
CN103543824B (en) Gesture input system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant