CN108319417B - Page control method and device - Google Patents

Page control method and device Download PDF

Info

Publication number
CN108319417B
CN108319417B CN201710036340.3A CN201710036340A CN108319417B CN 108319417 B CN108319417 B CN 108319417B CN 201710036340 A CN201710036340 A CN 201710036340A CN 108319417 B CN108319417 B CN 108319417B
Authority
CN
China
Prior art keywords
scroll
scrolling
information
type
target page
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
CN201710036340.3A
Other languages
Chinese (zh)
Other versions
CN108319417A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710036340.3A priority Critical patent/CN108319417B/en
Publication of CN108319417A publication Critical patent/CN108319417A/en
Application granted granted Critical
Publication of CN108319417B publication Critical patent/CN108319417B/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/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/0485Scrolling or panning
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a page control method and device. Wherein, the method comprises the following steps: detecting a first scrolling operation in a current scrolling behavior of a target page, wherein the target page is a page on a client; acquiring a first rolling type of a current rolling behavior according to rolling information of a first rolling operation, wherein the first rolling type is used for indicating that the rolling direction of a target page under the current rolling behavior is a first direction; detecting a second scroll operation in the current scroll behavior; processing the rolling information of the second rolling operation according to a first rolling type to obtain current control information, wherein the current control information comprises information used for indicating a target page to roll according to a first direction; and responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information. The invention solves the technical problem that the rolling control of the related technology on the target page is easy to cause error rolling.

Description

Page control method and device
Technical Field
The invention relates to the field of page control, in particular to a page control method and device.
Background
At present, with the development of the mobile internet and the improvement of the performance of the mobile terminal device, more and more people are used to access the web pages by using the mobile terminal device, but at present, most of the web pages are designed for the PC end before.
Currently, an Android browser (Android Chrome) allows a webpage to scroll transversely and longitudinally in a bidirectional manner, so that diversified demands of users are facilitated. The main core flow is that when a user touches and scrolls a webpage, touch information of the user is firstly transferred to webpage elements of a part, in the webpage, in contact with a finger, and the webpage elements process the touch information transmitted by the user one by one, when the elements in the webpage can be scrolled, for example, when the webpage is very long and a browser does not intercept page scrolling operation, corresponding scrolling is performed according to the touch information transmitted by the user, a browser kernel does not define specific scrolling behaviors, and the following conditions can be triggered by controlling the webpage:
(1) and (4) transversely scrolling, wherein the touch information transmitted by the user only changes in the X-axis direction, and only the X-axis of the webpage element is scrolled.
(2) And (4) vertically scrolling, wherein the touch information transmitted by the user only changes in the Y-axis direction, and only the Y-axis of the webpage element is scrolled.
(3) And simultaneously scrolling in the horizontal direction and the vertical direction, and simultaneously scrolling the X axis and the Y axis of the webpage elements when the touch information transmitted by the user changes in both directions of the X axis and the Y axis.
(4) And the user can alternately perform horizontal scrolling, vertical scrolling and horizontal and vertical bidirectional simultaneous scrolling. For example, the operation may be repeated such as first scrolling in the horizontal direction, then scrolling in the vertical direction, then scrolling in the horizontal and vertical directions, and then continuing scrolling in the vertical direction.
The meaning of the prior art scheme is to meet the diversified scrolling requirements of the user, but the actual situation is that the common user does not need the diversified requirements under the common situation, and the user only needs to directly and effectively meet the own requirements. Although part of the web pages are adapted to the mobile terminal at present, due to the diversification of the screen and the resolution of the mobile terminal equipment, the situation that the web pages are not completely matched with the terminal equipment still exists, so that the web pages can be scrolled in any direction, the situation that the web pages are allowed to scroll horizontally and vertically at the same time exists, and the scroll control on the target page easily causes error scrolling. For example, when a user reads novels or news, the user can scroll up and down the web page by a single finger to achieve the goal of browsing the content, but the user cannot scroll vertically absolutely, which is highly desirable for the user. In addition, the scrolling operation in the normal case has a certain inclination angle, but there may be a deviation of the browsing content of the web page due to the horizontal and vertical bi-directional scrolling, which further affects the browsing experience of the user on the web page.
In view of the above-mentioned problem that the scroll control of the target page is likely to cause the wrong scroll, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a page control method and device, which at least solve the technical problem that the rolling control of a target page in the related technology is easy to cause error rolling.
According to an aspect of an embodiment of the present invention, a page control method is provided. The page control method comprises the following steps: detecting a first scrolling operation in a current scrolling behavior of a target page, wherein the target page is a page on a client; acquiring a first rolling type of a current rolling behavior according to rolling information of a first rolling operation, wherein the first rolling type is used for indicating that the rolling direction of a target page under the current rolling behavior is a first direction; detecting a second scroll operation in the current scroll behavior; processing the rolling information of the second rolling operation according to a first rolling type to obtain current control information, wherein the current control information comprises information used for indicating a target page to roll according to a first direction; and responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information.
According to another aspect of the embodiment of the invention, a page control device is also provided. The first detection unit is used for detecting a first scrolling operation in the current scrolling behavior of a target page, wherein the target page is a page on a client; the device comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring a first scroll type of a current scroll behavior according to scroll information of a first scroll operation, and the first scroll type is used for indicating that the scroll direction of a target page under the current scroll behavior is a first direction; a second detection unit configured to detect a second scroll operation in the current scroll behavior; the processing unit is used for processing the scrolling information of the second scrolling operation according to the first scrolling type to obtain current control information, wherein the current control information comprises information used for indicating a target page to scroll according to a first direction; and the response unit responds to the second scrolling operation and controls the scrolling of the target page according to the current control information.
In the embodiment of the invention, a first scroll type is obtained according to scroll information of a first scroll operation in a detected current scroll behavior, wherein the first scroll type is used for indicating that the scroll direction of a target page under the current scroll behavior is a first direction; processing a second scrolling operation in the detected current scrolling behavior according to a first scrolling type to obtain current control information, wherein the current control information comprises information for indicating a target page to scroll according to a first direction; the method comprises the steps of responding to a second scrolling operation, controlling the scrolling of a target page according to current control information, obtaining a first scrolling type of a current scrolling behavior according to the scrolling information of the first scrolling operation to realize the prejudgment of the scrolling operation next to the first scrolling operation, processing the detected second scrolling operation according to the first scrolling type to obtain the control information, wherein the control information can be used for indicating information for scrolling the target page according to a first direction, and controlling the scrolling of the target page according to the control information, so that the aim of strengthening the first direction of the current scrolling operation according to the first scrolling type is fulfilled, the accuracy of the scrolling control of the target page is improved, and the technical problem that the error scrolling is easily caused by the scrolling control of the target page in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment for a page control method according to an embodiment of the invention;
FIG. 2 is a flow chart of a method of page control according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for obtaining a first scroll type of a current scroll behavior based on scroll information of a first scroll operation according to an embodiment of the present invention;
FIG. 4 is a flow chart of another page control method according to an embodiment of the present invention;
FIG. 5 is a flow chart of another page control method according to an embodiment of the present invention;
fig. 6 is a flowchart of a method for filtering vertically scrolled information in scrolled information of a second scroll operation and retaining horizontally scrolled information in scrolled information according to an embodiment of the present invention;
FIG. 7 is a flow chart of another page control method according to an embodiment of the present invention;
FIG. 8 is a flow chart of another page control method according to an embodiment of the present invention;
FIG. 9 is a flow chart of another method for filtering horizontally scrolling information and retaining vertically scrolling information in the scrolling information, according to an embodiment of the present invention;
FIG. 10 is a flow chart of another page control method according to an embodiment of the present invention;
FIG. 11 is a flow chart of another page control method according to an embodiment of the present invention;
FIG. 12 is a flowchart of a method for obtaining a first scroll type of a current scroll behavior based on scroll information of a first scroll operation, according to an embodiment of the present invention;
FIG. 13 is a timing diagram of a page control according to an embodiment of the present invention;
FIG. 14 is a flow chart of another page control method according to an embodiment of the present invention;
FIG. 15 is a flow chart of a method of scroll anticipation in accordance with an embodiment of the present invention;
FIG. 16 is a diagram of a page control apparatus according to an embodiment of the present invention; and
fig. 17 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, an embodiment of a page control method is provided.
Alternatively, in the present embodiment, the page control method may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. Fig. 1 is a schematic diagram of a hardware environment of a page control method according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The page control method of the embodiment of the present invention may be executed by the server 102, or executed by the terminal 104, or executed by both the server 102 and the terminal 104. The terminal 104 may execute the page control method according to the embodiment of the present invention by a client installed thereon.
Fig. 2 is a flowchart of a page control method according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
in step S202, a first scroll operation in the current scroll behavior of the target page is detected.
In the technical solution provided by step S202 of the present invention, a first scrolling operation in a current scrolling behavior of a target page is detected, where the target page is a page on a client.
The target page may be a web page of a client installed on the mobile terminal device, for example, the target web page is a web page to be subjected to scroll control on a browser, and may be a news web page or a novel web page. The method includes that a user accesses a webpage through mobile terminal equipment, when the target webpage is browsed, the user can perform rolling operation on the target webpage, the rolling operation is operation behavior performed on the target webpage through a terminal when the user browses the target webpage, for example, the operation of transverse rolling operation, longitudinal rolling operation and transverse and longitudinal bidirectional simultaneous rolling is performed to browse different contents on the webpage, and the rolling operation can be achieved by touching a screen of a client side by the user. In the current scrolling behavior, a first scrolling operation of the target webpage is detected, where the first scrolling operation is a scrolling operation that a user starts to perform on the target webpage, and optionally, a scrolling operation that the target webpage starts to receive several times is determined as a first scrolling operation in the current scrolling behavior, and the first scrolling operation is used to pre-judge a next scrolling operation in the current behavior.
And step S204, acquiring a first scroll type of the current scroll behavior according to the scroll information of the first scroll operation.
In the technical solution provided by step S204 of the present invention, a first scroll type of the current scroll behavior is obtained according to scroll information of a first scroll operation, where the first scroll type is used to indicate that a scroll direction of a target page in the current scroll behavior is a first direction.
The scroll information of the first scroll operation may be a scroll angle, vertical scroll information, horizontal scroll information, and the like when the first scroll operation is performed on the target web page, wherein the vertical scroll information may be represented by vertical coordinate information in a coordinate system in the target web page, and the horizontal scroll information may be represented by horizontal coordinate information in the coordinate system in the target web page. After a first scroll operation in the current scroll behavior of the target page is detected, a first scroll type of the current scroll behavior is obtained according to scroll information of the first scroll operation. Optionally, the first scroll type in the current scroll behavior is calculated by interpreting the scroll angle. The first scroll type is used to indicate that the scroll direction of the target page in the current scroll behavior is the first direction, for example, the first scroll type is to allow only the target page to scroll horizontally, and is used to indicate that the scroll direction of the target page in the current scroll behavior is horizontal, the first scroll type is to allow only the target page to scroll vertically, and is used to indicate that the scroll direction of the target page in the current scroll behavior is vertical, and the first scroll type is to allow the target page to scroll horizontally and vertically, and is used to indicate that the scroll direction of the target page in the current scroll behavior is both horizontal and vertical. The state of the first scroll type is indicated by an initialization value, i.e. a value set by the first scroll type at the very beginning of the current scroll action.
And optionally, recording the first scroll type through a browser kernel, for example, recording through an X5 kernel, where the X5 kernel is an android browser engine that is deeply optimized based on an excellent open source Blink kernel, so as to determine the first scroll type as a scroll type for a next scroll operation on a target web page, thereby implementing prejudgment on the scroll operation of the target web page.
In step S206, a second scroll operation in the current scroll behavior is detected.
In the technical solution provided by step S206 of the present invention, a second scroll operation in the current scroll behavior is detected.
The second scroll operation is a scroll operation on the target page after the first scroll operation in the current scroll behavior. After the first scroll type of the current scroll behavior is acquired according to the scroll information of the first scroll operation, a second scroll operation in the current scroll behavior is detected, that is, after the target webpage starts to scroll, a subsequent scroll operation in the current scroll behavior is detected. The second scroll operation may be the same as or different from the first scroll operation.
And step S208, processing the rolling information of the second rolling operation according to the first rolling type to obtain the current control information.
In the technical solution provided by step S208 of the present invention, the scrolling information of the second scrolling operation is processed according to the first scrolling type, so as to obtain current control information, where the current control information includes information for instructing the target page to scroll according to the first direction.
After detecting the second scroll operation in the current scroll behavior, scroll information of the second scroll operation is acquired, for example, abscissa information and ordinate information in the second scroll information are acquired. The scroll information according to the second scroll operation is processed according to the first scroll type. The current control information includes information for instructing the target page to scroll in the first direction, and when the scroll information of the second scroll operation includes scroll information of the first scroll operation, information other than the scroll information of the first scroll operation is filtered according to the first scroll type, and the scroll information of the first scroll operation is retained, so that the current control information for controlling the target page to scroll in the first direction is obtained. And under the condition that the scroll information of the second scroll operation does not comprise the scroll information of the first scroll operation, processing the scroll information of the second scroll operation according to the first scroll type to obtain the current control information for controlling the target webpage not to scroll.
And step S210, responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information.
In the technical solution provided by step S210 of the present invention, the second scrolling operation is responded, and the scrolling of the target page is controlled according to the current control information.
And after the scrolling information of the second scrolling operation is processed according to the first scrolling type to obtain the current control information, sending the current control information to the browser to execute a corresponding scrolling behavior. And responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information. The target page can be controlled to roll according to the first direction in response to the second rolling operation, and the target page can also be controlled not to roll, so that even if the operation direction of the second rolling operation and the rolling direction of the first rolling operation have a certain inclination angle, the target page can be prevented from rolling transversely and longitudinally at the same time, the situation that the browsing content on the target page concerned by a user deviates is avoided, the user experience is reduced, the purpose of strengthening the first direction of the current rolling operation according to the first rolling type is achieved, the accuracy of the rolling control of the target page is further improved, and the user can directly and effectively meet the requirement of browsing the target page.
In an embodiment of the page control method, switching of the scroll type of the scroll operation must be performed after one scroll action is finished. In the process of one-time scrolling action, only one scrolling type is allowed to perform the scrolling action, and the scrolling type switching in the scrolling process is not allowed. After the target web page scrolling is over, the page control method may automatically exit.
Through the foregoing steps S202 to S210, in the embodiment of the present invention, a first scroll type is obtained according to detected scroll information of a first scroll operation in a current scroll behavior, where the first scroll type is used to indicate that a scroll direction of a target page in the current scroll behavior is a first direction; processing a second scrolling operation in the detected current scrolling behavior according to a first scrolling type to obtain current control information, wherein the current control information comprises information for indicating a target page to scroll according to a first direction; the method comprises the steps of responding to a second scrolling operation, controlling the scrolling of a target page according to current control information, obtaining a first scrolling type of a current scrolling behavior according to the scrolling information of the first scrolling operation to realize the prejudgment of the scrolling operation next to the first scrolling operation, processing the detected second scrolling operation according to the first scrolling type to obtain the control information, wherein the control information can be used for indicating information for scrolling the target page according to a first direction, and controlling the scrolling of the target page according to the control information, so that the aim of strengthening the first direction of the current scrolling operation according to the first scrolling type is fulfilled, the accuracy of the scrolling control of the target page is improved, and the technical problem that the error scrolling is easily caused by the scrolling control of the target page in the related technology is solved.
As an alternative implementation, in step S204, the obtaining the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation includes: judging whether a parameter for recording a first rolling type in the current rolling behavior is a preset initial value or not; under the condition that the parameter is judged to be a preset initial value, calculating the preset initial value according to a preset rule to obtain a first rolling type; and under the condition that the parameter is not judged to be a preset initial value, acquiring a first rolling type of the parameter record.
Fig. 3 is a flowchart of a method for obtaining a first scroll type of a current scroll behavior according to scroll information of a first scroll operation according to an embodiment of the present invention. As shown in fig. 3, the method for obtaining the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation includes the steps of:
step S301, acquiring parameters for recording a first scroll type in the current scroll behavior.
In the technical solution provided by step S301 of the present invention, a parameter for recording the first scroll type in the current scroll behavior is obtained.
The first SCROLL type is recorded by a parameter, and the parameter of the SCROLL type may represent an initialization value set when the target page starts to SCROLL by SCROLL _ UNKNOWN, and optionally, the initialization value of each SCROLL action is the same. The type of allowing only the target page to SCROLL horizontally is represented by "SCROLL _ HORIZONTAL", the type of allowing only the target page to SCROLL vertically is represented by "SCROLL _ VERTICAL", and the type of allowing the target page to SCROLL bidirectionally is represented by "SCROLL _ BOTH". Wherein the parameter is updated as the scroll type of the scroll operation in the current scroll behavior changes.
Step S302, determine whether the parameter is a preset initial value.
In the technical solution provided in step S302 of the present invention, it is determined whether the parameter is a preset initial value.
After the parameters for recording the first scrolling type in the current scrolling behavior are obtained, whether the parameters are preset initial values or not is judged. If the parameter is determined to be the preset initial value, the scrolling operation just starts to be generated and the parameter is not updated, step S303 is executed, and if the parameter is determined not to be the preset initial value, the scrolling operation is generated and the parameter is updated, step S304 is executed.
Step S303, a preset initial value is calculated according to a preset rule to obtain a first rolling type.
In the technical solution provided in step S303 of the present invention, if the parameter is determined to be a preset initial value, the preset initial value is calculated according to a preset rule, so as to obtain the first scrolling type.
After judging whether the parameter is a preset initial value or not, if the parameter is judged to be the preset initial value, calculating the preset initial value according to a preset rule, and calculating a first rolling type of the initial value according to a rolling prejudgment mechanism. And after the first scroll type is obtained, recording and storing the first scroll type.
Step S304, a first scroll type of the parameter record is obtained.
In the technical solution provided by step S304 of the present invention, if it is determined that the parameter is not the preset initial value, the first scroll type of the parameter record is obtained.
After judging whether the parameter is a preset initial value or not, if the parameter is judged not to be the preset initial value, the parameter records a first rolling type, the first rolling type recorded by the parameter is obtained, and information irrelevant to rolling information of the first rolling operation in the second rolling operation is further obtained according to the first rolling type.
The embodiment records the first scrolling type by acquiring the parameter used for recording the first scrolling type in the current scrolling behavior; judging whether the parameters are preset initial values or not; if the parameter is judged to be a preset initial value, calculating the preset initial value according to a preset rule to obtain a first rolling type; if the parameter is judged not to be the preset initial value, the first rolling type recorded by the parameter is obtained, the first rolling type of the current rolling behavior is obtained according to the rolling information of the first rolling operation, the rolling operation in the current rolling behavior is pre-judged, misoperation of a user on rolling of the target page is reduced, and the accuracy of rolling control on the target page is improved.
As an optional implementation manner, the first scrolling operation is a horizontal scrolling operation, wherein the step S204 of obtaining the first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation includes: and acquiring a horizontal scrolling type of the current scrolling behavior according to the scrolling information of the horizontal scrolling operation, wherein the horizontal scrolling type is used for indicating that only the scrolling direction of the target page under the current scrolling behavior is allowed to be horizontal, the first scrolling type comprises the horizontal scrolling type, and the first direction comprises the horizontal direction.
The first scroll operation is an operation in which the user starts to scroll the web page in the horizontal direction, and is also an operation in which the user only wants the target page to scroll in the first direction, and includes a horizontal scroll operation, for example, the first scroll operation is an operation in which the user scrolls the target web page in the left and right directions with a single finger. The scroll information of the horizontal scroll operation may be scroll information in which the abscissa information has a value and the ordinate information is 0. And when the first scroll operation is a horizontal scroll operation, the first scroll type is a horizontal scroll type, the horizontal scroll type of the current scroll behavior is obtained according to the scroll information of the horizontal scroll operation, and the horizontal scroll type indicates that the scroll direction of the target page under the current scroll behavior is horizontal.
As an alternative implementation manner, the second scrolling operation is a vertical scrolling operation, and in step S208, processing the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is a horizontal scrolling type, filtering longitudinal scrolling information of longitudinal scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; step S210, controlling the scrolling of the target page according to the current control information includes: and controlling the target page not to scroll according to the first current control information.
Fig. 4 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 4, the method further comprises the steps of:
step S401, when the first scrolling type is a horizontal scrolling type, filtering the vertical scrolling information of the vertical scrolling operation to obtain a first current control information.
In the technical solution provided in step S401 of the present invention, when the first scroll type is a horizontal scroll type, the vertical scroll information of the vertical scroll operation is filtered to obtain first current control information, where the first current control information is used to indicate that the target page does not scroll.
The second scroll operation is a vertical scroll operation. After detecting a second scroll operation in the current scroll behavior, when the first scroll type is a horizontal scroll type, filtering out vertical scroll information of the vertical scroll operation. Optionally, the vertical scroll information of the vertical scroll operation is represented by the abscissa information being 0 and the ordinate information having a value, and the ordinate information is reset to 0, so that the vertical scroll information is filtered, and the first current control information is obtained. Because the first scrolling type of the current scrolling behavior is acquired according to the scrolling information of the first scrolling operation and is the horizontal scrolling type, after the vertical scrolling information of the vertical scrolling operation is filtered, the acquired first current control information is used for indicating that the target webpage does not scroll.
Step S402, the target page is controlled not to be scrolled according to the first current control information.
In the technical solution provided by step S402 of the present invention, the target page is controlled not to scroll according to the first current control information.
And after the longitudinal rolling information of the longitudinal rolling operation is filtered to obtain first current control information, controlling the target page not to roll according to the first current control information.
In the embodiment, when the user starts to scroll the webpage transversely, the user scrolling behavior is recorded as a transverse scrolling type, and when the user subsequently scrolls the webpage longitudinally, because the previously recorded scrolling behavior is the transverse scrolling type, the webpage scrolling behavior cannot occur longitudinally at this time, so that the phenomenon that the browsing content concerned by the user deviates due to transverse and longitudinal scrolling, and the user experience is influenced is avoided.
In the embodiment, the second scrolling operation is a vertical scrolling operation, and when the first scrolling type is a horizontal scrolling type, vertical scrolling information of the vertical scrolling operation is filtered to obtain first current control information, wherein the first current control information is used for indicating that the target page does not scroll, and the target page is controlled not to scroll according to the first current control information, so that the accuracy of scrolling control on the target page is improved.
As an alternative implementation manner, the second scrolling operation is a horizontal and vertical scrolling operation, and step S208, processing the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scroll type is a horizontal scroll type, filtering longitudinal scroll information in the scroll information of the second scroll operation, and reserving the horizontal scroll information in the scroll information of the second scroll operation to obtain second current control information; step S210, controlling the scrolling of the target page according to the current control information includes: and controlling the target page to only horizontally scroll according to the second current control information.
Fig. 5 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 5, the page control method includes the steps of:
step S501, when the first scroll type is a horizontal scroll type, filtering the vertical scroll information in the scroll information of the second scroll operation, and reserving the horizontal scroll information in the scroll information of the second scroll operation to obtain the second current control information.
In the technical solution provided in step S501 of the present invention, when the first scroll type is a horizontal scroll type, the vertical scroll information in the scroll information of the second scroll operation is filtered, and the horizontal scroll information in the scroll information of the second scroll operation is retained, so as to obtain second current control information, where the second current control information is used to indicate that the target page is only horizontally scrolled.
The second scroll operation is a vertical scroll operation. After detecting a second scroll operation in the current scroll behavior, when the first scroll type is a horizontal scroll type, filtering out vertical scroll information in the horizontal and vertical scroll operation, and retaining horizontal scroll information in the scroll information of the second scroll operation. Optionally, the vertical scroll information of the vertical scroll operation is represented by the abscissa information being 0 and the ordinate information having a value, and the ordinate information is reset to 0, so that filtering of the vertical scroll information is achieved, the first current control information is obtained, and the coordinate information of the horizontal scroll information in the scroll information of the second scroll operation is retained. Because the first scroll type of the current scroll behavior is acquired according to the scroll information of the first scroll operation and is the horizontal scroll type, after the longitudinal scroll information of the longitudinal scroll operation is filtered, the acquired second current control information is used for indicating that the target webpage only horizontally scrolls and only triggering horizontal scroll of the target webpage subsequently.
Step S502, the target page is controlled to be only transversely scrolled according to the second current control information.
In the technical solution provided by step S502 of the present invention, the target page is controlled to be scrolled only in the horizontal direction according to the second current control information.
In the embodiment, when the user starts to scroll the webpage transversely, the user scrolling behavior is recorded as a transverse scrolling type, and when the user subsequently scrolls the webpage transversely and longitudinally, because the previously recorded scrolling behavior is the transverse scrolling type, the longitudinal scrolling information in the scrolling information is filtered, and only the transverse scrolling information is reserved, so that the behavior of scrolling the webpage longitudinally cannot occur at this time, and the phenomenon that the browsing content concerned by the user deviates due to transverse and longitudinal scrolling, and the user experience is influenced is avoided.
In the embodiment, when the first scrolling type is a horizontal scrolling type, the vertical scrolling information in the scrolling information of the second scrolling operation is filtered, and the horizontal scrolling information in the scrolling information is retained, so as to obtain the second current control information, wherein the second current control information is used for indicating that the target page only horizontally scrolls, and the target page is controlled only horizontally to scroll according to the second current control information, so that the accuracy of scrolling control on the target page is improved.
As an optional implementation manner, in step S501, the vertical scroll information in the scroll information of the second scroll operation is filtered, and the horizontal scroll information in the scroll information is retained, and obtaining the second current control information includes setting the vertical coordinate information corresponding to the vertical scroll information of the second scroll operation to 0, and retaining the horizontal coordinate information corresponding to the horizontal scroll information.
Fig. 6 is a flowchart of a method for filtering vertically scrolled information in scrolled information of a second scroll operation and retaining horizontally scrolled information in the scrolled information according to an embodiment of the present invention. As shown in fig. 6, the method for filtering the vertical scroll information in the scroll information and retaining the horizontal scroll information in the scroll information comprises the following steps:
step S601, setting the ordinate information corresponding to the vertical scroll information to 0, and reserving the abscissa information corresponding to the horizontal scroll information.
In the technical solution provided in step S601 of the present invention, the ordinate information corresponding to the vertical scroll information is set to 0, and the abscissa information corresponding to the horizontal scroll information is retained.
The scroll information of the second scroll operation includes vertical scroll information and horizontal scroll information. And when the vertical scroll information in the scroll information of the second scroll operation is filtered, setting the vertical coordinate information corresponding to the vertical scroll information as 0, and reserving the horizontal coordinate information corresponding to the horizontal scroll information.
Step S602, generating second current control information according to the abscissa information.
In the technical solution provided by step S602 of the present invention, the second current control information is generated according to the abscissa information.
And after the abscissa information corresponding to the horizontal scrolling information is reserved, generating second current control information according to the abscissa information, wherein the second current control information is used for indicating that the target page only scrolls horizontally.
In the embodiment, the ordinate information corresponding to the longitudinal scrolling information is set to be 0, and the abscissa information corresponding to the transverse scrolling information is reserved; and generating second current control information according to the abscissa information, so that the purposes of filtering longitudinal rolling information in the rolling information, and retaining transverse rolling information in the rolling information to obtain the second current control information are achieved.
As an optional implementation manner, the first scrolling operation is a vertical scrolling operation, wherein the step S204 of obtaining the first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation includes: and acquiring a vertical scroll type of the current scroll behavior according to scroll information of the vertical scroll operation, wherein the vertical scroll type is used for indicating that only the scroll direction of the target page under the current scroll behavior is allowed to be vertical, the first scroll type comprises the vertical scroll type, and the first direction comprises the vertical direction.
The first scroll operation is an operation in which the user starts to scroll the web page in the vertical direction, and is also an operation in which the user only wants the target page to scroll in the first direction, including a vertical scroll operation, for example, the first scroll operation is an operation in which the user scrolls the target web page up and down by a single finger. The scroll information of the horizontal scroll operation may be scroll information in which the ordinate information has a value and the abscissa information is 0. And when the first scroll operation is a longitudinal scroll operation, the first scroll type is a longitudinal scroll type, the longitudinal scroll type of the current scroll behavior is obtained according to the scroll information of the longitudinal scroll operation, and the longitudinal scroll type indicates that the scroll direction of the target page under the current scroll behavior is longitudinal.
As an alternative implementation manner, the second scrolling operation is a horizontal scrolling operation, and in step S208, processing the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is a longitudinal scrolling type, filtering transverse scrolling information of transverse scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; step S210, controlling the scrolling of the target page according to the current control information includes: and controlling the target page not to scroll according to the first current control information.
Fig. 7 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 7, the page control method includes the steps of:
and step S701, when the first scrolling type is a longitudinal scrolling type, filtering the transverse scrolling information of the transverse scrolling operation to obtain first current control information.
In the technical solution provided in step S701 of the present invention, when the first scroll type is a vertical scroll type, the horizontal scroll information of the horizontal scroll operation is filtered to obtain first current control information, where the first current control information is used to indicate that the target page does not scroll.
The second scroll operation is a lateral scroll operation. After detecting a second scroll operation in the current scroll behavior, when the first scroll type is a vertical scroll type, filtering out horizontal scroll information of the horizontal scroll operation. Optionally, the horizontal scroll information of the horizontal scroll operation is represented by the ordinate information being 0 and the abscissa information having a value, and the abscissa information is reset to 0, so that the horizontal scroll information is filtered, and the first current control information is obtained. Because the first scrolling type of the current scrolling behavior is acquired according to the scrolling information of the first scrolling operation and is the longitudinal scrolling type, after the transverse scrolling information of the transverse scrolling operation is filtered, the acquired first current control information is used for indicating that the target webpage does not scroll.
Step S702, the target page is controlled not to be scrolled according to the first current control information.
In the technical solution provided by step S702 of the present invention, the target page is controlled not to scroll according to the first current control information.
And after the transverse rolling information of the transverse rolling operation is filtered to obtain first current control information, controlling the target page not to roll according to the first current control information.
In the embodiment, the second scrolling operation is a horizontal scrolling operation, and when the first scrolling type is a vertical scrolling type, horizontal scrolling information of the horizontal scrolling operation is filtered to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; and controlling the target page not to roll according to the first current control information, thereby achieving the purpose of improving the accuracy of the rolling control of the target page.
As an alternative implementation manner, the second scrolling operation is a horizontal and vertical scrolling operation, and step S208, processing the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is a longitudinal scrolling type, filtering transverse scrolling information in the scrolling information, and reserving longitudinal scrolling information in the scrolling information to obtain third current control information, wherein the third current control information is used for indicating that the target page only longitudinally scrolls; step S210, controlling the scrolling of the target page according to the current control information includes: and controlling the target page to scroll only in the longitudinal direction according to the third current control information.
Fig. 8 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 8, the page control method includes the steps of:
step S801, when the first scroll type is a vertical scroll type, filtering horizontal scroll information in the scroll information, and retaining vertical scroll information in the scroll information to obtain third current control information.
In the technical solution provided in step S801 of the present invention, when the first scroll type is a vertical scroll type, filtering horizontal scroll information in the scroll information, and retaining vertical scroll information in the scroll information to obtain third current control information, where the third current control information is used to indicate that the target page only vertically scrolls.
The second scroll operation is a landscape scroll operation. After detecting a second scroll operation in the current scroll behavior, when the first scroll type is a longitudinal scroll type, filtering out transverse scroll information in the transverse and longitudinal scroll operation, and retaining longitudinal scroll information in the scroll information of the second scroll operation. Optionally, the horizontal scroll information of the horizontal scroll operation is represented by the ordinate information being 0 and the abscissa information having a value, and the abscissa information is reset to 0, so that filtering of the horizontal scroll information is achieved, the third current control information is obtained, and the coordinate information of the vertical scroll information in the scroll information of the second scroll operation is retained. Because the first scroll type of the current scroll behavior is acquired according to the scroll information of the first scroll operation and is the longitudinal scroll type, after the transverse scroll information of the transverse scroll operation is filtered, the obtained third current control information is used for indicating that the target webpage only longitudinally scrolls and only subsequently triggers the longitudinal scroll of the target webpage.
And step S802, controlling the target page to only vertically scroll according to the third current control information.
In the technical solution provided by step S802 of the present invention, the target page is controlled to scroll only in the vertical direction according to the third current control information.
In the embodiment, when the user starts to scroll the webpage longitudinally, the scrolling behavior of the user is recorded as a longitudinal scrolling type, and when the user subsequently scrolls the webpage transversely and longitudinally, because the previously recorded scrolling behavior is the longitudinal scrolling type, the transverse scrolling information in the scrolling information is filtered, and only the longitudinal scrolling information is reserved, so that the behavior of transversely scrolling the webpage cannot occur at this time, and the phenomenon that the browsing content concerned by the user deviates due to transverse and longitudinal scrolling, and the user experience is influenced is avoided.
In this embodiment, the second scrolling operation is a horizontal and vertical scrolling operation, and when the first scrolling type is a vertical scrolling type, the horizontal scrolling information in the scrolling information is filtered, and the vertical scrolling information in the scrolling information is retained, so as to obtain third current control information, where the third current control information is used to indicate that the target page is only vertically scrolled; and controlling the target page to scroll only in the longitudinal direction according to the third current control information.
As an optional implementation manner, in step S801, filtering horizontal scroll information in the scroll information, and retaining vertical scroll information in the scroll information, and obtaining the third current control information is implemented by setting horizontal coordinate information corresponding to the horizontal scroll information to 0, and retaining vertical coordinate information corresponding to the vertical scroll information.
Fig. 9 is a flowchart of another method for filtering horizontally scrolling information and retaining vertically scrolling information in the scrolling information according to an embodiment of the present invention. As shown in fig. 9, the method for filtering the horizontal scroll information and retaining the vertical scroll information in the scroll information includes the following steps:
step S901, sets the abscissa information corresponding to the horizontal scroll information to 0, and retains the ordinate information corresponding to the vertical scroll information.
In the technical solution provided in step S901 of the present invention, the abscissa information corresponding to the horizontal scroll information is set to 0, and the ordinate information corresponding to the vertical scroll information is retained.
The scroll information of the second scroll operation includes vertical scroll information and horizontal scroll information. And when the horizontal scroll information in the scroll information of the second scroll operation is filtered, setting the vertical coordinate information corresponding to the horizontal scroll information as 0, and reserving the vertical coordinate information corresponding to the vertical scroll information.
Step S902, generating third current control information according to the ordinate information.
In the technical solution provided in step S902 of the present invention, the third current control information is generated according to the ordinate information.
And after the abscissa information corresponding to the horizontal scrolling information is reserved, generating second current control information according to the abscissa information, wherein the second current control information is used for indicating that the target page only scrolls horizontally.
In the embodiment, the abscissa information corresponding to the horizontal scroll information is set to 0, and the ordinate information corresponding to the vertical scroll information is reserved; and generating third current control information according to the ordinate information, filtering the transverse rolling information in the rolling information, and retaining the longitudinal rolling information in the rolling information to obtain the third current control information, thereby achieving the purpose of improving the accuracy of the rolling control on the target page.
As an optional implementation manner, the first scrolling operation is a horizontal and vertical scrolling operation, wherein the step S204 of obtaining the first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation includes: and when the first scroll type is a horizontal and vertical scroll type, acquiring the horizontal and vertical scroll type of the current scroll behavior according to the scroll information of the horizontal and vertical scroll operation, wherein the horizontal and vertical scroll type is used for indicating that the scroll direction of the target page under the current scroll behavior is allowed to be horizontal and vertical, the first scroll type comprises the horizontal and vertical scroll type, and the first direction comprises the horizontal and vertical direction.
The first scroll operation is an operation in which the user starts to scroll the web page horizontally and vertically, and also an operation in which the user only wants the target page to scroll in the first direction, including a horizontal scroll operation and a vertical scroll operation, for example, the first scroll operation is an operation in which the user scrolls the target web page both horizontally and vertically with a single finger. The scroll information of the horizontal and vertical scroll operation may be scroll information in which the horizontal coordinate information has a value and the vertical coordinate information also has a value. And when the first scrolling operation is a horizontal and vertical scrolling operation, the first scrolling type is a horizontal and vertical scrolling type, the horizontal and vertical scrolling type of the current scrolling behavior is obtained according to the scrolling information of the horizontal and vertical scrolling operation, and the horizontal and vertical scrolling type indicates that the scrolling direction of the target page under the current scrolling behavior is horizontal and vertical.
As an alternative implementation, in step S208, processing the scroll information of the second scroll operation according to the first scroll type, and obtaining the current control information includes: when the first scrolling type is a horizontal and vertical scrolling type, the scrolling information of the second scrolling operation is reserved to obtain fourth current control information, wherein the fourth current control information is used for indicating the target page to scroll according to the second scrolling operation; step S210, controlling the scrolling of the target page according to the current control information includes: and controlling the scrolling of the target page according to the fourth current control information.
Fig. 10 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 10, the page control method further includes the following steps:
and S1001, when the first scroll type is a horizontal and vertical scroll type, reserving scroll information of the second scroll operation to obtain fourth current control information.
In the technical solution provided in step S1001 above of the present invention, when the first scroll type is a horizontal scroll type, the scroll information of the second scroll operation is retained, and fourth current control information is obtained, where the fourth current control information is used to instruct the target page to scroll according to the second scroll operation, and the fourth current control information is used to instruct the target page to scroll according to the second scroll operation.
And when the first scrolling type is a horizontal and vertical scrolling type, the first scrolling operation information is reserved and not filtered to obtain fourth current control information, and the target page is indicated to scroll according to the second scrolling operation through the fourth current control information.
And step S1002, controlling the scrolling of the target page according to the fourth current control information.
In the technical solution provided by step S1002 of the present invention, the scrolling of the target page is controlled according to the fourth current control information.
According to the embodiment, when the first scrolling type is a horizontal and vertical scrolling type, the scrolling information of the second scrolling operation is reserved to obtain the fourth current control information, wherein the fourth current control information is used for indicating the target page to scroll according to the second scrolling operation, and the scrolling of the target page is controlled according to the fourth current control information, so that misoperation on the target page is avoided, and the accuracy of scrolling control on the target page is improved.
As an optional implementation, after controlling the scrolling of the target page according to the current control information, the method further includes: detecting a third scrolling operation in a next scrolling behavior of the target page; acquiring a second scroll type of a next scroll behavior according to the scroll information of the third scroll operation, wherein the second scroll type of the next scroll behavior is used for indicating that the scroll direction of the target page under the next scroll behavior is a second direction; detecting a fourth scroll operation in a next scroll behavior; processing the scrolling information of the fourth scrolling operation according to a second scrolling type to obtain next control information, wherein the next control information comprises information for indicating that the target page is scrolled according to a second direction; and responding to the fourth scrolling operation, and controlling the scrolling of the target page according to the next control information.
Fig. 11 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 11, the page control method further includes the following steps:
in step S1101, a third scroll operation in the next scroll behavior to the target page is detected.
In the technical solution provided by step S1101 described above, a third scroll operation in the next scroll action on the target page is detected.
In an embodiment of the page control method, switching of the scroll type of the scroll operation must be performed after one scroll action is finished. In the process of one-time scrolling action, only one scrolling type is allowed to perform the scrolling action, and the scrolling type switching in the scrolling process is not allowed. After the current scrolling behavior is ended, a third scrolling operation in a next scrolling behavior on the target page is detected.
In the next scrolling behavior, a third scrolling operation of the target webpage is detected, where the third scrolling operation is a scrolling operation that the user starts to perform on the target webpage in the next scrolling behavior, and optionally, the scrolling operation that the target webpage receives several times at the beginning is determined as the third scrolling operation in the next scrolling behavior, and the third scrolling operation is used to pre-judge the next scrolling operation in the current behavior.
In step S1102, a second scroll type of the next scroll behavior is obtained according to the scroll information of the third scroll operation.
In the technical solution provided in step S1102 of the present invention, a second scroll type of a next scroll behavior is obtained according to scroll information of a third scroll operation, where the second scroll type of the next scroll behavior is used to indicate that a scroll direction of a target page in the next scroll behavior is a second direction.
The scroll information of the third scroll operation may be a scroll angle, vertical scroll information, horizontal scroll information, and the like when the third scroll operation is performed on the target web page. And after detecting a third scroll operation in the next scroll behavior of the target page, acquiring a third scroll type of the next scroll behavior according to scroll information of the third scroll operation. Optionally, the two scroll types in the next scroll behavior are calculated by interpreting the scroll angle. The second scroll type is used to indicate that the scroll direction of the target page in the next scroll behavior is the second direction, for example, the third scroll type is to allow only the target page to scroll horizontally, and is used to indicate that the scroll direction of the target page in the next scroll behavior is the horizontal direction, the third scroll type is to allow only the target page to scroll vertically, and is used to indicate that the scroll direction of the target page in the next scroll behavior is the vertical direction, and the first scroll type is to allow the target page to scroll horizontally and vertically, and is used to indicate that the scroll direction of the target page in the next scroll behavior is both the horizontal direction and the vertical direction. The state of this third scroll type is indicated by an initialization value, i.e. the value set by the first scroll type at the very beginning of the next scroll action.
And acquiring a second scroll type of the current scroll behavior according to the scroll information of the third scroll operation, and recording the second scroll type, and optionally, recording the first scroll type through a browser kernel, for example, recording through an X5 kernel, so as to determine the second scroll type as the scroll type of the next scroll operation performed on the target web page in the next scroll behavior, thereby implementing prejudgment on the scroll operation of the target web page.
In step S1103, a fourth scroll operation in the next scroll behavior is detected.
In the technical solution provided by step S1103 of the present invention, a fourth scroll operation in the next scroll behavior is detected.
The fourth scroll operation is a scroll operation on the target page after the third scroll operation in the next scroll behavior. After the third scroll type of the next scroll behavior is obtained according to the scroll information of the third scroll operation, a fourth scroll operation in the current scroll behavior is detected, that is, after the target webpage starts to scroll, a subsequent scroll operation in the next scroll behavior is detected. The fourth scroll operation may be the same as or different from the third scroll operation.
And step S1104, processing the scroll information of the fourth scroll operation according to the second scroll type, to obtain next control information.
In the foregoing step S1104 of the present invention, a technical solution is provided, in which scroll information of a fourth scroll operation is processed according to a second scroll type, so as to obtain next control information, where the next control information includes information for instructing a target page to scroll according to a second direction.
After detecting a fourth scroll operation in the next scroll behavior, scroll information of the fourth scroll operation is acquired, for example, abscissa information and ordinate information in the fourth scroll information are acquired. Scroll information according to the fourth scroll operation is processed according to the second scroll type. The next control information includes information for instructing the target page to scroll in the second direction, and when the scroll information of the fourth scroll operation includes scroll information of the third scroll operation, information other than the scroll information of the third scroll operation is filtered according to the third scroll type, and the scroll information of the third scroll operation is retained, so that the next control information for controlling the target page to scroll in the second direction is obtained. And under the condition that the scroll information of the fourth scroll operation does not comprise the scroll information of the third scroll operation, processing the scroll information of the fourth scroll operation according to a third scroll type to obtain next control information for controlling the target webpage not to be scrolled.
And step S1105, responding to the fourth scroll operation and controlling the scroll of the target page according to the next control information.
In the technical solution provided by step S1105 of the present invention, the fourth scrolling operation is responded, and the scrolling of the target page is controlled according to the next control information.
And after processing the scrolling information of the fourth scrolling operation according to the second scrolling type to obtain next control information, responding to the fourth scrolling operation and controlling the scrolling of the target page according to the next control information. The target page can be controlled to roll according to the second direction in response to the fourth rolling operation, and the target page can also be controlled not to roll, so that even if the operation direction of the fourth rolling operation and the rolling direction of the third rolling operation have a certain inclination angle, the target page can be prevented from rolling transversely and longitudinally at the same time, the situation that the browsing content on the target page concerned by a user deviates is avoided, the user experience is reduced, the purpose of strengthening the second direction of the current rolling operation according to the second rolling type is achieved, the accuracy of the rolling control of the target page is further improved, and the user can directly and effectively meet the requirement of browsing the target page.
The embodiment is characterized in that after controlling the scrolling of the target page according to the current control information, the method further comprises: detecting a third scrolling operation in a next scrolling behavior of the target page; acquiring a second scroll type of a next scroll behavior according to the scroll information of the third scroll operation, wherein the second scroll type of the next scroll behavior is used for indicating that the scroll direction of the target page under the next scroll behavior is a second direction; detecting a fourth scroll operation in a next scroll behavior; processing the scrolling information of the fourth scrolling operation according to a second scrolling type to obtain next control information, wherein the next control information comprises information for indicating that the target page is scrolled according to a second direction; and responding to the fourth scrolling operation, and controlling the scrolling of the target page according to the next control information, so as to improve the accuracy of the scrolling control of the target page.
As an alternative implementation, in step S204, the obtaining the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation includes: under the condition that the first rolling operation is the rolling operation on the page element of the target page, acquiring a first rolling type of the current rolling behavior on the page element according to rolling information of the first rolling operation; and under the condition that the first scroll operation is not the scroll operation on the page elements of the target page, acquiring a first scroll type of the current scroll behavior on the whole page according to the scroll information of the first scroll operation.
Fig. 12 is a flowchart of a method for obtaining a first scroll type of a current scroll behavior according to scroll information of a first scroll operation according to an embodiment of the present invention. As shown in fig. 12, the method of acquiring the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation includes the steps of:
in step S1201, it is determined whether the first scroll operation is a scroll operation on a page element of the target page.
In the technical solution provided in step S1201 above, it is determined whether the first scrolling operation is a scrolling operation on a page element of the target page.
The scrolling operation on the target page includes an operation on a page element and an operation on the entire page. The page elements can be information such as hyperlinks, characters, pictures, audio, animation, videos, characters and the like. After the first scroll type of the current scroll behavior is acquired according to the scroll information of the first scroll operation, the page element is preferentially scrolled in the case where both the page element and the entire page can be scrolled. And judging whether the first scrolling operation is a scrolling operation on the page element of the target page.
Step S1202, a first scroll type of the current scroll behavior on the page element is obtained according to the scroll information of the first scroll operation.
In the technical solution provided by step S1202 of the present invention, if it is determined that the first scrolling operation is a scrolling operation on a page element of the target page, the first scrolling type of the current scrolling behavior on the page element is obtained according to the scrolling information of the first scrolling operation.
After judging whether the first scrolling operation is the scrolling operation on the page element of the target page, if the first scrolling operation is judged to be the scrolling operation on the page element of the target page, acquiring a first scrolling type of the current scrolling behavior on the page element according to the scrolling information of the first scrolling operation, namely, preferentially scrolling on the page element.
In step S1203, a first scroll type of the current scroll behavior on the whole page is obtained according to the scroll information of the first scroll operation.
In the technical solution provided in step S1203 of the present invention, if it is determined that the first scrolling operation is not the scrolling operation on the page element of the target page, the first scrolling type of the current scrolling behavior on the entire page is obtained according to the scrolling information of the first scrolling operation.
After judging whether the first scrolling operation is the scrolling operation on the page element of the target page, if the first scrolling operation is judged not to be the scrolling operation on the page element of the target page, acquiring a first scrolling type of the current scrolling behavior on the whole page according to the scrolling information of the first scrolling operation. That is, in the case where the first scroll operation is not a scroll operation on a page element of the target page, if the scroll operation can be performed on the entire page, the scroll of the entire page is performed.
The embodiment judges whether the first scrolling operation is a scrolling operation on a page element of a target page; if the first rolling operation is judged to be the rolling operation on the page element of the target page, acquiring a first rolling type of the current rolling behavior on the page element according to the rolling information of the first rolling operation; if the first rolling operation is judged not to be the rolling operation on the page element of the target page, the first rolling type of the current rolling behavior on the whole page is obtained according to the rolling information of the first rolling operation, the purpose of obtaining the first rolling type of the current rolling behavior according to the rolling information of the first rolling operation is achieved, and the accuracy of rolling control on the target page is improved.
As an optional implementation manner, before processing the scroll information of the second scroll operation according to the first scroll type to obtain the current control information, the page control method further includes one of: acquiring equipment information of a terminal for displaying a target page, and acquiring a first rolling type according to the equipment information; acquiring page information of a target page, and acquiring a first rolling type according to the page information; and acquiring browsing behavior data for browsing the target page, and acquiring a first rolling type according to the browsing behavior data.
Optionally, the mechanism for obtaining the prejudgment of the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation is not limited to the prejudgment mechanism in the above embodiment, and the embodiment further includes other methods for realizing the prejudgment of the user behavior. For example, the user behavior is pre-judged according to the mobile phone equipment information, the webpage information and the daily behavior habit of the user. Acquiring equipment information of a terminal for displaying a target page, wherein the acquisition of the equipment information of the terminal for displaying the target page comprises the acquisition of the resolution of the terminal, and the determination of a scrolling type of a scrolling operation suitable for the terminal in a current scrolling behavior according to the resolution; the page information of the target page can be acquired, and the scrolling type of the scrolling operation is determined according to the information such as the type of the target page, the layout of the target page and the like; the browsing behavior data of the target page for browsing can be acquired, for example, the user frequently browses the scrolling operation of the target page, and the type of the scrolling operation with the largest execution times is determined as the first scrolling type of the current scrolling behavior, so that a pre-judging mechanism of the first scrolling type of the current northeast is realized, the unidirectional scrolling of the user is enhanced, the mistaken scrolling of the user is reduced, and the experience of the user for browsing the webpage is enhanced.
As an optional implementation manner, processing the scroll information of the second scroll operation according to the first scroll type, and obtaining the current control information includes: and processing the rolling information of the second rolling operation according to the first rolling type based on the preset browser kernel to obtain the current control information.
This embodiment is optimized on a browser-based basis, which may be based on the X5 kernel. It should be noted that, in this embodiment, the processing of the scroll information of the second scroll operation according to the first scroll type based on the X5 kernel includes, but is not limited to, the X5 kernel, the X5 kernel is only a preferred implementation manner of the embodiment of the present invention, and is not limited to that the preset browser of the embodiment of the present invention is only the X5 kernel, and may also be applied to other browser kernels.
The embodiment sends the filtered scroll information to the browser to execute the corresponding scroll action.
The embodiment integrates information such as user rolling behaviors and the like, and provides a set of mechanism for automatically pre-judging the user rolling behaviors so as to reduce misoperation of the user and improve the rolling experience of the user for browsing the target page.
Example 2
The technical solution of the present invention will be described below with reference to preferred embodiments.
The embodiment is applied to a specific application scene of an android browser.
When a user starts to perform a scrolling operation on a target webpage, as long as the target webpage scrolls, a scrolling pre-judging mechanism is required to record a scrolling type of a roll-to operation when the target webpage scrolls.
And when the user continues to perform the scrolling operation on the target webpage, filtering the scrolling behavior currently on the target webpage according to the previously recorded scrolling type for starting the scrolling operation.
FIG. 13 is a timing diagram of a page control according to an embodiment of the present invention. As shown in fig. 13, the method includes the steps of:
in step S1301, the user performs a scrolling operation on the target web page.
Step S1302, pre-determining the scroll type of the scroll operation, and recording the scroll type.
Step S1303, the control target web page scrolls.
In step S1304, the user continues the scrolling operation on the target web page.
Step S1305, filtering the scrolling operation through a scrolling anticipation mechanism according to the recorded scrolling type.
For example, the user starts a scrolling operation for scrolling the web page laterally on the target web page, and the X5 kernel records that the scrolling behavior of the user is a lateral scrolling type. And the user subsequently scrolls the webpage longitudinally, and at the moment, because the previously recorded scrolling behavior is a horizontal movement type, the webpage longitudinal scrolling behavior cannot occur at this time. And (3) the user continues to scroll the webpage in the horizontal and vertical directions, at the moment, because the previously recorded scrolling behavior is a horizontal scrolling type, the vertical scrolling information in the scrolling information is filtered by a scrolling pre-judging mechanism, only the horizontal scrolling information is reserved, and only the horizontal scrolling of the webpage is triggered subsequently. After the target webpage scrolling is finished, the mechanism of the scheme automatically exits.
The above example only illustrates the page control flow of the horizontal scrolling type, and the vertical scrolling is basically consistent with the horizontal and vertical scrolling flow, but the recorded scrolling types are different, and the filtering behavior of the scrolling information is different. For the vertical scroll type, the horizontal scroll information needs to be filtered, and only the vertical scroll information is retained. For the horizontal and vertical scroll type, the scroll operation is directly performed on the target webpage without filtering the scroll information. The switching of the scroll type of each scroll operation must be performed after one scroll action is finished, and only one scroll type is allowed to be performed on the target webpage during one scroll action, and the switching of the scroll type is not allowed during the scroll action.
The following are descriptions of the current settings for scrolling types:
SCROLL _ UNKNOWN, which is used to indicate the initial value set at the beginning of scrolling.
SCROLL _ HORIZONTAL to identify that only HORIZONTAL scrolling operations are allowed.
SCROLL _ VERTICAL, which is used to indicate that only VERTICAL SCROLL operation is allowed.
And SCROLL _ BOTH used for indicating that the horizontal and vertical scrolling is allowed.
The overall idea of the page control method of the embodiment in the technical aspect is as follows:
In the first step, at the beginning of the scrolling operation on the target webpage, when the scrolling is not really performed, the type of the recorded scrolling is SCROLL _ UNKNOWN.
And secondly, when the rolling on the target webpage really starts, checking the recorded rolling type, if the rolling type is SCROLL _ UNKNOWN, calculating the rolling type according to a rolling prejudging mechanism, storing the rolling type, and if the rolling type is not SCROLL _ UNKNOWN, filtering rolling information according to the recorded rolling type.
And thirdly, sending the filtered scroll information to the browser to execute corresponding scroll behaviors.
Fig. 14 is a flowchart of another page control method according to an embodiment of the present invention. As shown in fig. 14, the page control method includes the steps of:
in step S1401, a scroll operation in the current scroll behavior for the target page is detected.
In step S1402, it is determined whether the scroll operation is a scroll operation on a page element of the target page.
Step S1403, prejudge the scroll type of the scroll operation on the page element, and perform the scroll operation on the page element.
In step S1404, the scroll type of the scroll operation on the entire page is determined in advance, and the scroll operation on the entire page is performed.
The embodiment receives touch rolling information of a user, judges whether the page element is rolled according to the touch rolling information, and rolls the page element if the page element is rolled, wherein rolling prejudgment of rolling operation is carried out according to the page element, and the rolling prejudgment comprises transverse rolling, longitudinal rolling and transverse and longitudinal two-way simultaneous rolling; and if the page element is judged not to be scrolled, scrolling the whole page, wherein the scrolling prejudgment of the scrolling operation is carried out on the whole page.
The rolling anticipation mechanism is described as follows:
first, according to the input scroll information, the scroll type can be calculated by interpreting the scroll angle, and the scroll type is recorded.
In the second step, the scrolling information is filtered according to the recorded scrolling type and is forwarded to the X5 kernel for processing. Wherein, the specific filtering rule is as follows:
1) when the current SCROLL type is SCROLL _ HORIZONTAL, setting Y-axis information in the transferred SCROLL information as 0;
2) when the current rolling type is SCROLL _ VERTICAL, setting X-axis information in the transferred rolling information as 0;
3) when the current SCROLL type is SCROLL _ BOTH, the currently transferred SCROLL information is not filtered.
Fig. 15 is a flow chart of a method of scroll anticipation in accordance with an embodiment of the present invention. As shown in fig. 15, the method for rolling anticipation includes the following steps:
In step S1501, a scroll operation in the current scroll behavior for the target page is detected.
In step S1502, it is determined whether a scroll type is recorded.
If the record scroll type is judged, step S1503 is performed, and if it is judged that no record scroll type is present, step S1504 is performed.
And S1503, filtering the scrolling operation according to the scrolling type to obtain control information.
After judging whether the rolling type is recorded or not, if so, filtering the rolling operation according to the rolling type to obtain control information, wherein the control information is used for performing rolling control on the target page and comprises the step of performing rolling according to the rolling direction corresponding to the rolling type.
And step S1504, calculating the rolling type according to the rolling prejudgment algorithm and the initialization value.
After judging whether the rolling type is recorded or not, if the rolling type is not recorded, calculating the rolling type according to a rolling prejudging algorithm and an initialization value.
In step S1505, the scroll type is recorded.
After the scroll type is calculated according to the scroll anticipation algorithm and the initialization value, the scroll type is recorded, and step S1503 is performed.
And step S1506, performing scroll control on the target page according to the control information.
And after filtering the scrolling operation according to the scrolling type to obtain the control information, performing scrolling control on the target page according to the control information.
The scheme of the embodiment is optimized on the basis of the browser, and can be based on an X5 kernel, but is not only suitable for an X5 kernel, but also suitable for other browser kernels. The basic idea is to synthesize information such as user rolling behaviors aiming at the incompletely-adapted pages, provide a set of mechanism for automatically pre-judging the user rolling behaviors so as to reduce misoperation of the user, improve user rolling experience, effectively solve the problem that browsing contents shift when the user rolls the pages under normal conditions, enhance the user experience, strengthen the user unidirectional rolling experience and weaken the irregular rolling experience.
According to the embodiment, a set of pre-judging mechanism of the user behavior is provided according to the information transferred by the user touch, so that the browsing experience of the user when the user rolls the webpage is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 3
According to the embodiment of the invention, the invention also provides a page control device for implementing the page control method. Fig. 16 is a schematic diagram of a page control apparatus according to an embodiment of the present invention. As shown in fig. 16, the page control means may include: a first detection unit 10, an acquisition unit 20, a second detection unit 30, a processing unit 40 and a response unit 50.
The first detecting unit 10 is configured to detect a first scrolling operation in a current scrolling behavior of a target page, where the target page is a page on a client.
The obtaining unit 20 is configured to obtain a first scroll type of the current scroll behavior according to scroll information of the first scroll operation, where the first scroll type is used to indicate that a scroll direction of the target page in the current scroll behavior is a first direction.
A second detecting unit 30, configured to detect a second scroll operation in the current scroll behavior.
And the processing unit 40 is configured to process the scroll information of the second scroll operation according to the first scroll type to obtain current control information, where the current control information includes information for instructing the target page to scroll according to the first direction.
And the response unit 50 responds to the second scrolling operation and controls the scrolling of the target page according to the current control information.
It should be noted that the first detecting unit 10 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the obtaining unit 20 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, the second detecting unit 30 in this embodiment may be configured to execute step S206 in embodiment 1 of this application, the processing unit 40 in this embodiment may be configured to execute step S208 in embodiment 1 of this application, and the responding unit 50 in this embodiment may be configured to execute step S210 in embodiment 1 of this application.
The embodiment is configured to obtain, by the obtaining unit 20, a first scroll type of a current scroll behavior according to scroll information of a first scroll operation, where the first scroll type is used to indicate that a scroll direction of a target page in the current scroll behavior is a first direction. A second detecting unit 30, configured to detect a second scroll operation in the current scroll behavior. And the processing unit 40 is configured to process the scroll information of the second scroll operation according to the first scroll type to obtain current control information, where the current control information includes information for instructing the target page to scroll according to the first direction. The response unit 50 responds to the second scrolling operation and controls the scrolling of the target page according to the current control information, so that the technical problem that the scrolling control of the target page in the related art easily causes mistaken scrolling can be solved, and the accuracy of the scrolling control of the target page can be improved.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware. Wherein the hardware environment comprises a network environment.
Example 4
According to the embodiment of the invention, the invention also provides a server or a terminal for implementing the page control method.
Fig. 17 is a block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 17, the terminal may include: one or more processors 171 (only one shown), a memory 173, and a transmission means 175, as shown in fig. 17, the terminal may further include an input-output device 177.
The memory 173 may be used to store software programs and modules, such as program instructions/modules corresponding to the page control method and apparatus in the embodiments of the present invention, and the processor 171 executes various functional applications and data processing by running the software programs and modules stored in the memory 173, that is, implements the page control method. The memory 173 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 173 can further include memory located remotely from the processor 171, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 175 is used for receiving or transmitting data via a network, and may also be used for data transmission between the processor and the memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 175 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 175 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 173 is used to store an application program, in particular.
The processor 171 may call the application stored in the memory 173 through the transmission device 175 to perform the following steps:
detecting a first scrolling operation in a current scrolling behavior of a target page, wherein the target page is a page on a client;
acquiring a first rolling type of a current rolling behavior according to rolling information of a first rolling operation, wherein the first rolling type is used for indicating that the rolling direction of a target page under the current rolling behavior is a first direction;
detecting a second scroll operation in the current scroll behavior; processing the rolling information of the second rolling operation according to a first rolling type to obtain current control information, wherein the current control information comprises information used for indicating a target page to roll according to a first direction;
And responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information.
The processor 171 is further configured to perform the following steps: acquiring parameters for recording a first rolling type in the current rolling behavior; judging whether the parameters are preset initial values or not; if the parameter is judged to be a preset initial value, calculating the preset initial value according to a preset rule to obtain a first rolling type; and if the parameter is not judged to be the preset initial value, acquiring a first rolling type of the parameter record.
The processor 171 is further configured to perform the following steps: and acquiring a horizontal scrolling type of the current scrolling behavior according to the scrolling information of the horizontal scrolling operation, wherein the horizontal scrolling type is used for indicating that only the scrolling direction of the target page under the current scrolling behavior is allowed to be horizontal, the first scrolling type comprises the horizontal scrolling type, and the first direction comprises the horizontal direction.
The processor 171 is further configured to perform the following steps: when the first scrolling type is a horizontal scrolling type, filtering longitudinal scrolling information of longitudinal scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; and controlling the target page not to scroll according to the first current control information.
The processor 171 is further configured to perform the following steps: when the first scrolling type is a horizontal scrolling type, filtering longitudinal scrolling information in the scrolling information of the second scrolling operation, and reserving horizontal scrolling information in the scrolling information to obtain second current control information, wherein the second current control information is used for indicating that the target page only horizontally scrolls; and controlling the target page to only horizontally scroll according to the second current control information.
The processor 171 is further configured to perform the following steps: setting the ordinate information corresponding to the longitudinal rolling information as 0, and reserving the abscissa information corresponding to the transverse rolling information; and generating second current control information according to the abscissa information.
The processor 171 is further configured to perform the following steps: and acquiring a vertical scroll type of the current scroll behavior according to scroll information of the vertical scroll operation, wherein the vertical scroll type is used for indicating that only the scroll direction of the target page under the current scroll behavior is allowed to be vertical, the first scroll type comprises the vertical scroll type, and the first direction comprises the vertical direction.
The processor 171 is further configured to perform the following steps: when the first scrolling type is a longitudinal scrolling type, filtering transverse scrolling information of transverse scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; and controlling the target page not to scroll according to the first current control information.
The processor 171 is further configured to perform the following steps: when the first scrolling type is a longitudinal scrolling type, filtering transverse scrolling information in the scrolling information, and reserving longitudinal scrolling information in the scrolling information to obtain third current control information, wherein the third current control information is used for indicating that the target page only longitudinally scrolls; and controlling the target page to scroll only in the longitudinal direction according to the third current control information.
The processor 171 is further configured to perform the following steps: setting the horizontal coordinate information corresponding to the horizontal rolling information as 0, and reserving the vertical coordinate information corresponding to the vertical rolling information; and generating third current control information according to the ordinate information.
The processor 171 is further configured to perform the following steps: and when the first scroll type is a horizontal and vertical scroll type, acquiring the horizontal and vertical scroll type of the current scroll behavior according to the scroll information of the horizontal and vertical scroll operation, wherein the horizontal and vertical scroll type is used for indicating that the scroll direction of the target page under the current scroll behavior is allowed to be horizontal and vertical, the first scroll type comprises the horizontal and vertical scroll type, and the first direction comprises the horizontal and vertical direction.
The processor 171 is further configured to perform the following steps: when the first scrolling type is a horizontal and vertical scrolling type, the scrolling information of the second scrolling operation is reserved to obtain fourth current control information, wherein the fourth current control information is used for indicating the target page to scroll according to the second scrolling operation; and controlling the scrolling of the target page according to the fourth current control information.
The processor 171 is further configured to perform the following steps: after the rolling of the target page is controlled according to the current control information, detecting a third rolling operation in the next rolling behavior of the target page; acquiring a second scroll type of a next scroll behavior according to the scroll information of the third scroll operation, wherein the second scroll type of the next scroll behavior is used for indicating that the scroll direction of the target page under the next scroll behavior is a second direction; detecting a fourth scroll operation in a next scroll behavior; processing the scrolling information of the fourth scrolling operation according to a second scrolling type to obtain next control information, wherein the next control information comprises information for indicating that the target page is scrolled according to a second direction; and responding to the fourth scrolling operation, and controlling the scrolling of the target page according to the next control information.
The processor 171 is further configured to perform the following steps: judging whether the first scrolling operation is the scrolling operation on the page elements of the target page or not; if the first rolling operation is judged to be the rolling operation on the page element of the target page, acquiring a first rolling type of the current rolling behavior on the page element according to the rolling information of the first rolling operation; and if the first rolling operation is judged not to be the rolling operation on the page elements of the target page, acquiring a first rolling type of the current rolling behavior on the whole page according to the rolling information of the first rolling operation.
The processor 171 is further configured to perform one of the following steps: acquiring equipment information of a terminal for displaying a target page, and acquiring a first rolling type according to the equipment information; acquiring page information of a target page, and acquiring a first rolling type according to the page information; and acquiring browsing behavior data for browsing the target page, and acquiring a first rolling type according to the browsing behavior data.
The embodiment of the invention provides a page control scheme. In the embodiment of the invention, a first scroll type is obtained according to scroll information of a first scroll operation in a detected current scroll behavior, wherein the first scroll type is used for indicating that the scroll direction of a target page under the current scroll behavior is a first direction; processing a second scrolling operation in the detected current scrolling behavior according to a first scrolling type to obtain current control information, wherein the current control information comprises information for indicating a target page to scroll according to a first direction; the method comprises the steps of responding to a second scrolling operation, controlling the scrolling of a target page according to current control information, obtaining a first scrolling type of a current scrolling behavior according to the scrolling information of the first scrolling operation to realize the prejudgment of the scrolling operation next to the first scrolling operation, processing the detected second scrolling operation according to the first scrolling type to obtain the control information, wherein the control information can be used for indicating information for scrolling the target page according to a first direction, and controlling the scrolling of the target page according to the control information, so that the aim of strengthening the first direction of the current scrolling operation according to the first scrolling type is fulfilled, the accuracy of the scrolling control of the target page is improved, and the technical problem that the error scrolling is easily caused by the scrolling control of the target page in the related technology is solved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 17 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 17 is a diagram illustrating the structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 17, or have a different configuration than shown in FIG. 17.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 5
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be used to execute a program code of the page control method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
detecting a first scrolling operation in a current scrolling behavior of a target page, wherein the target page is a page on a client;
acquiring a first rolling type of a current rolling behavior according to rolling information of a first rolling operation, wherein the first rolling type is used for indicating that the rolling direction of a target page under the current rolling behavior is a first direction;
detecting a second scroll operation in the current scroll behavior; processing the rolling information of the second rolling operation according to a first rolling type to obtain current control information, wherein the current control information comprises information used for indicating a target page to roll according to a first direction;
and responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring parameters for recording a first rolling type in the current rolling behavior; judging whether the parameters are preset initial values or not; if the parameter is judged to be a preset initial value, calculating the preset initial value according to a preset rule to obtain a first rolling type; and if the parameter is not judged to be the preset initial value, acquiring a first rolling type of the parameter record.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and acquiring a horizontal scrolling type of the current scrolling behavior according to the scrolling information of the horizontal scrolling operation, wherein the horizontal scrolling type is used for indicating that only the scrolling direction of the target page under the current scrolling behavior is allowed to be horizontal, the first scrolling type comprises the horizontal scrolling type, and the first direction comprises the horizontal direction.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the first scrolling type is a horizontal scrolling type, filtering longitudinal scrolling information of longitudinal scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; and controlling the target page not to scroll according to the first current control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the first scrolling type is a horizontal scrolling type, filtering longitudinal scrolling information in the scrolling information of the second scrolling operation, and reserving horizontal scrolling information in the scrolling information to obtain second current control information, wherein the second current control information is used for indicating that the target page only horizontally scrolls; and controlling the target page to only horizontally scroll according to the second current control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: setting the ordinate information corresponding to the longitudinal rolling information as 0, and reserving the abscissa information corresponding to the transverse rolling information; and generating second current control information according to the abscissa information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and acquiring a vertical scroll type of the current scroll behavior according to scroll information of the vertical scroll operation, wherein the vertical scroll type is used for indicating that only the scroll direction of the target page under the current scroll behavior is allowed to be vertical, the first scroll type comprises the vertical scroll type, and the first direction comprises the vertical direction.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the first scrolling type is a longitudinal scrolling type, filtering transverse scrolling information of transverse scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that a target page does not scroll; and controlling the target page not to scroll according to the first current control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the first scrolling type is a longitudinal scrolling type, filtering transverse scrolling information in the scrolling information, and reserving longitudinal scrolling information in the scrolling information to obtain third current control information, wherein the third current control information is used for indicating that the target page only longitudinally scrolls; and controlling the target page to scroll only in the longitudinal direction according to the third current control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: setting the horizontal coordinate information corresponding to the horizontal rolling information as 0, and reserving the vertical coordinate information corresponding to the vertical rolling information; and generating third current control information according to the ordinate information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and when the first scroll type is a horizontal and vertical scroll type, acquiring the horizontal and vertical scroll type of the current scroll behavior according to the scroll information of the horizontal and vertical scroll operation, wherein the horizontal and vertical scroll type is used for indicating that the scroll direction of the target page under the current scroll behavior is allowed to be horizontal and vertical, the first scroll type comprises the horizontal and vertical scroll type, and the first direction comprises the horizontal and vertical direction.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the first scrolling type is a horizontal and vertical scrolling type, the scrolling information of the second scrolling operation is reserved to obtain fourth current control information, wherein the fourth current control information is used for indicating the target page to scroll according to the second scrolling operation; and controlling the scrolling of the target page according to the fourth current control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the rolling of the target page is controlled according to the current control information, detecting a third rolling operation in the next rolling behavior of the target page; acquiring a second scroll type of a next scroll behavior according to the scroll information of the third scroll operation, wherein the second scroll type of the next scroll behavior is used for indicating that the scroll direction of the target page under the next scroll behavior is a second direction; detecting a fourth scroll operation in a next scroll behavior; processing the scrolling information of the fourth scrolling operation according to a second scrolling type to obtain next control information, wherein the next control information comprises information for indicating that the target page is scrolled according to a second direction; and responding to the fourth scrolling operation, and controlling the scrolling of the target page according to the next control information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: judging whether the first scrolling operation is the scrolling operation on the page elements of the target page or not; if the first rolling operation is judged to be the rolling operation on the page element of the target page, acquiring a first rolling type of the current rolling behavior on the page element according to the rolling information of the first rolling operation; and if the first rolling operation is judged not to be the rolling operation on the page elements of the target page, acquiring a first rolling type of the current rolling behavior on the whole page according to the rolling information of the first rolling operation.
Optionally, the storage medium is further arranged to store program code for performing one of the following steps: acquiring equipment information of a terminal for displaying a target page, and acquiring a first rolling type according to the equipment information; acquiring page information of a target page, and acquiring a first rolling type according to the page information; and acquiring browsing behavior data for browsing the target page, and acquiring a first rolling type according to the browsing behavior data.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (19)

1. A page control method is characterized by comprising the following steps:
detecting a first scrolling operation in a current scrolling behavior of a target page, wherein the target page is a page on a client;
acquiring a first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation, wherein the first scrolling type is used for indicating that the scrolling direction of the target page under the current scrolling behavior is a first direction;
detecting a second scrolling operation in the current scrolling behavior;
Filtering the rolling information of the second rolling operation according to the first rolling type to obtain current control information;
under the condition that the direction indicated by the filtered scrolling information of the second scrolling operation is consistent with the first direction, determining that the current control information indicates that the target page is scrolled in the first direction;
determining that the current control information indicates that the target page does not scroll under the condition that the direction indicated by the filtered scrolling information of the second scrolling operation is inconsistent with the first direction;
and responding to the second scrolling operation, and controlling the scrolling of the target page according to the current control information.
2. The method of claim 1, wherein obtaining the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation comprises:
acquiring parameters for recording the first scrolling type in the current scrolling behavior;
judging whether the parameter is a preset initial value or not;
if the parameter is judged to be the preset initial value, calculating the preset initial value according to a preset rule to obtain the first rolling type;
And if the parameter is judged not to be the preset initial value, acquiring the first rolling type recorded by the parameter.
3. The method of claim 1, wherein the first scrolling operation is a horizontal scrolling operation, and wherein obtaining the first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation comprises:
and obtaining a horizontal scroll type of the current scroll behavior according to scroll information of the horizontal scroll operation, wherein the horizontal scroll type is used for indicating that only the scroll direction of the target page under the current scroll behavior is allowed to be a horizontal direction, the first scroll type includes the horizontal scroll type, and the first direction includes the horizontal direction.
4. The method of claim 3, wherein the second scrolling operation is a vertical scrolling operation,
filtering the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is the horizontal scrolling type, filtering the vertical scrolling information of the vertical scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that the target page does not scroll;
Controlling the scrolling of the target page according to the current control information includes: and controlling the target page not to roll according to the first current control information.
5. The method of claim 3, wherein the second scrolling operation is a landscape scrolling operation,
filtering the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is the horizontal scrolling type, filtering longitudinal scrolling information in the scrolling information of the second scrolling operation, and reserving the horizontal scrolling information in the scrolling information of the second scrolling operation to obtain second current control information, wherein the second current control information is used for indicating that the target page only horizontally scrolls;
controlling the scrolling of the target page according to the current control information includes: and controlling the target page to only transversely scroll according to the second current control information.
6. The method according to claim 5, wherein filtering the vertical scroll information in the scroll information of the second scroll operation and retaining the horizontal scroll information in the scroll information of the second scroll operation, and obtaining the second current control information comprises:
Setting the ordinate information corresponding to the longitudinal rolling information as 0, and reserving the abscissa information corresponding to the transverse rolling information;
and generating the second current control information according to the abscissa information.
7. The method of claim 1, wherein the first scrolling operation is a vertical scrolling operation, and wherein obtaining the first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation comprises:
and acquiring a vertical scroll type of the current scroll behavior according to scroll information of the vertical scroll operation, wherein the vertical scroll type is used for indicating that only the scroll direction of the target page under the current scroll behavior is allowed to be vertical, the first scroll type comprises the vertical scroll type, and the first direction comprises the vertical direction.
8. The method of claim 7, wherein the second scrolling operation is a lateral scrolling operation,
filtering the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is the longitudinal scrolling type, filtering the transverse scrolling information of the transverse scrolling operation to obtain first current control information, wherein the first current control information is used for indicating that the target page does not scroll;
Controlling the scrolling of the target page according to the current control information includes: and controlling the target page not to roll according to the first current control information.
9. The method of claim 7, wherein the second scrolling operation is a landscape scrolling operation,
filtering the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scroll type is the longitudinal scroll type, filtering the transverse scroll information in the scroll information of the second scroll operation, and reserving the longitudinal scroll information in the scroll information of the second scroll operation to obtain third current control information, wherein the third current control information is used for indicating that the target page only longitudinally scrolls;
controlling the scrolling of the target page according to the current control information includes: and controlling the target page to only longitudinally scroll according to the third current control information.
10. The method according to claim 9, wherein filtering the horizontal scroll information in the scroll information of the second scroll operation and retaining the vertical scroll information in the scroll information of the second scroll operation, and obtaining the third current control information comprises:
Setting the horizontal coordinate information corresponding to the horizontal rolling information as 0, and reserving the vertical coordinate information corresponding to the vertical rolling information;
and generating the third current control information according to the ordinate information.
11. The method according to claim 1, wherein the first scrolling operation is a horizontal and vertical scrolling operation, and wherein obtaining the first scrolling type of the current scrolling behavior according to the scrolling information of the first scrolling operation comprises:
when the first scroll type is the horizontal and vertical scroll type, acquiring the horizontal and vertical scroll type of the current scroll behavior according to the scroll information of the horizontal and vertical scroll operation, wherein the horizontal and vertical scroll type is used for indicating that the scroll direction of the target page under the current scroll behavior is allowed to be horizontal and vertical, the first scroll type comprises the horizontal and vertical scroll type, and the first direction comprises the horizontal and vertical direction.
12. The method of claim 11,
filtering the scrolling information of the second scrolling operation according to the first scrolling type, and obtaining the current control information includes: when the first scrolling type is the horizontal and vertical scrolling type, reserving scrolling information of the second scrolling operation to obtain fourth current control information, wherein the fourth current control information is used for indicating the target page to scroll according to the second scrolling operation;
Controlling the scrolling of the target page according to the current control information includes: and controlling the scrolling of the target page according to the fourth current control information.
13. The method of claim 1, wherein after controlling scrolling of the target page in accordance with the current control information, the method further comprises:
detecting a third scrolling operation in a next scrolling behavior of the target page;
acquiring a second scroll type of the next scroll behavior according to the scroll information of the third scroll operation, wherein the second scroll type of the next scroll behavior is used for indicating that the scroll direction of the target page under the next scroll behavior is a second direction;
detecting a fourth scroll operation in the next scroll behavior;
processing the scrolling information of the fourth scrolling operation according to the second scrolling type to obtain next control information, wherein the next control information comprises information for indicating the target page to scroll according to the second direction;
and responding to the fourth scrolling operation, and controlling the scrolling of the target page according to the next control information.
14. The method of claim 1, wherein obtaining the first scroll type of the current scroll behavior according to the scroll information of the first scroll operation comprises:
judging whether the first scrolling operation is the scrolling operation on the page elements of the target page or not;
if the first rolling operation is judged to be the rolling operation on the page element of the target page, acquiring a first rolling type of the current rolling behavior on the page element according to rolling information of the first rolling operation;
and if the first rolling operation is judged not to be the rolling operation on the page element of the target page, acquiring a first rolling type of the current rolling behavior on the whole page according to the rolling information of the first rolling operation.
15. The method of claim 1, wherein prior to filtering the scrolling information for the second scrolling operation according to the first scrolling type to obtain current control information, the method further comprises one of:
acquiring equipment information of a terminal for displaying the target page, and acquiring the first rolling type according to the equipment information;
Acquiring page information of the target page, and acquiring the first rolling type according to the page information;
and acquiring browsing behavior data for browsing the target page, and acquiring the first scrolling type according to the browsing behavior data.
16. The method according to any one of claims 1 to 15, wherein filtering the scroll information of the second scroll operation according to the first scroll type to obtain the current control information comprises: and processing the scrolling information of the second scrolling operation according to the first scrolling type based on a preset browser kernel to obtain the current control information.
17. A page control apparatus, comprising:
the device comprises a first detection unit, a second detection unit and a display unit, wherein the first detection unit is used for detecting a first scrolling operation in the current scrolling behavior of a target page, and the target page is a page on a client;
an obtaining unit, configured to obtain a first scroll type of the current scroll behavior according to scroll information of the first scroll operation, where the first scroll type is used to indicate that a scroll direction of the target page in the current scroll behavior is a first direction;
A second detection unit configured to detect a second scroll operation in the current scroll behavior;
the processing unit is used for filtering the rolling information of the second rolling operation according to the first rolling type to obtain current control information;
under the condition that the direction indicated by the filtered scrolling information of the second scrolling operation is consistent with the first direction, determining that the current control information indicates that the target page is scrolled in the first direction;
determining that the current control information indicates that the target page does not scroll under the condition that the direction indicated by the filtered scrolling information of the second scrolling operation is inconsistent with the first direction;
and the response unit responds to the second scrolling operation and controls the scrolling of the target page according to the current control information.
18. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any one of claims 1 to 16.
19. A terminal comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 16 by means of the computer program.
CN201710036340.3A 2017-01-17 2017-01-17 Page control method and device Active CN108319417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710036340.3A CN108319417B (en) 2017-01-17 2017-01-17 Page control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710036340.3A CN108319417B (en) 2017-01-17 2017-01-17 Page control method and device

Publications (2)

Publication Number Publication Date
CN108319417A CN108319417A (en) 2018-07-24
CN108319417B true CN108319417B (en) 2021-04-09

Family

ID=62891684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710036340.3A Active CN108319417B (en) 2017-01-17 2017-01-17 Page control method and device

Country Status (1)

Country Link
CN (1) CN108319417B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035678A (en) * 2013-01-30 2014-09-10 三星电子株式会社 Scrolling method and electronic device using same
CN104166494A (en) * 2014-08-01 2014-11-26 百度在线网络技术(北京)有限公司 Page control method and device
CN105573625A (en) * 2015-12-14 2016-05-11 魅族科技(中国)有限公司 Page display control method and device
US9471216B2 (en) * 2009-12-30 2016-10-18 Lg Electronics Inc. Circle type display device for a mobile terminal having a scroll bar at the edge of its display and method of controlling the same
CN106155524A (en) * 2015-03-23 2016-11-23 阿里巴巴集团控股有限公司 Page control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9471216B2 (en) * 2009-12-30 2016-10-18 Lg Electronics Inc. Circle type display device for a mobile terminal having a scroll bar at the edge of its display and method of controlling the same
CN104035678A (en) * 2013-01-30 2014-09-10 三星电子株式会社 Scrolling method and electronic device using same
CN104166494A (en) * 2014-08-01 2014-11-26 百度在线网络技术(北京)有限公司 Page control method and device
CN106155524A (en) * 2015-03-23 2016-11-23 阿里巴巴集团控股有限公司 Page control method and device
CN105573625A (en) * 2015-12-14 2016-05-11 魅族科技(中国)有限公司 Page display control method and device

Also Published As

Publication number Publication date
CN108319417A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN105786352B (en) The method, device and mobile terminal of quick positioning webpage content
EP2854372B1 (en) Method and device for displaying pushed information
KR101541811B1 (en) Apparatus and method for providing bookmark service in communication terminal
CN105426080B (en) A kind of picture switching method and terminal
CN105320417B (en) Page switching method and client
CN111949181B (en) Display adjustment method and device, storage medium and electronic equipment
WO2015172507A1 (en) Method, device and mobile terminal for starting applications
CN105933772B (en) Exchange method, interactive device and interactive system
CN108469973B (en) Interface content display method and device and intelligent display equipment
US10852927B2 (en) Browser function bar display method, apparatus, and processing device
CN108121493B (en) Display control method and related product
CN110308860B (en) Screen capturing method and related device
CN112149025B (en) Media resource display method and device, storage medium and electronic equipment
CN105159548B (en) A kind of list interface operating method and electric terminal
CN111324275B (en) Broadcasting method and device for elements in display picture
CN107678640A (en) A kind of long screenshotss method, apparatus, mobile terminal and computer-readable recording medium
CN104778007A (en) Screen capturing method and screen capturing device
CN114356266A (en) Interaction method and device and electronic equipment
WO2017067204A1 (en) Method, device and system for controlling device networking state
CN111966273A (en) Information display processing method and device
CN108319417B (en) Page control method and device
CN115146146A (en) Information display method and device, terminal equipment and storage medium
US20140129927A1 (en) Page browsing method and browser
CN103345362A (en) Method and system for saving web pages in batch
KR20140132938A (en) Method for displaying web page and device thereof

Legal Events

Date Code Title Description
PB01 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