Disclosure of Invention
In order to solve the technical problem, the invention provides a terminal device, a page control device and a page control method, which can avoid blocking the moving content when controlling the page content to move, and improve browsing experience.
According to an aspect of the present invention, there is provided a terminal device including: a memory, a touch-sensitive display screen and a processor,
the memory stores the content of a page displayed on the touch display screen;
in response to a preset trigger operation of a page on the touch display screen by a user, the processor executes an operation of displaying a second area independently of the page and enabling a touch operation on the second area to be equivalent to a corresponding touch operation on the first area;
in response to the touch operation of the second area, the processor performs an operation of performing the same control on the content displayed in the first area as in response to the corresponding touch operation of the first area.
Preferably, the processor performs, in response to a touch operation of the second area, an operation of performing the same control on the content displayed in the first area as in response to a corresponding touch operation of the first area by converting the touch coordinates of the second area into equivalent coordinates of the first area.
According to another aspect of the present invention, there is provided a page control apparatus including:
the first processing module is used for responding to a preset trigger operation, displaying a second area independently of the page and enabling the touch operation on the second area to be equivalent to the corresponding touch operation on the first area;
and the second processing module is used for responding to the touch operation of the second area and performing the same control on the content displayed in the first area as the content responding to the corresponding touch operation of the first area.
Preferably, the first processing module includes:
the receiving submodule is used for receiving triggering operation in a first area of a page;
and the display sub-module is used for responding to the trigger operation received by the receiving sub-module in the first area of the page, displaying a second area independently of the page, and enabling the touch operation on the second area to be equivalent to the corresponding touch operation on the first area, wherein the second area is a draggable second area or a fixed position second area, and the fixed position is located outside the first area.
Preferably, the first processing module includes:
the receiving submodule is used for receiving triggering operation;
the condition confirming submodule is used for confirming that the triggering operation received by the receiving submodule is a sliding operation in the slidable first area or a sliding operation in the slidable first area, and the height of a page to which the first area belongs is smaller than or equal to the height of a screen;
and the display sub-module is used for independently displaying a second area on the page according to the result of the condition confirmation sub-module, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area.
Preferably, the second processing module includes:
the receiving submodule is used for receiving touch operation;
a condition confirming submodule for confirming that the touch operation received by the receiving submodule is a sliding operation in the slidable second area;
and the control processing submodule is used for performing the same control on the content displayed in the first area as the corresponding touch operation responding to the first area according to the result of the condition confirmation submodule.
Preferably, the control processing sub-module includes:
the coordinate conversion submodule is used for converting the touch coordinate of the second area into an equivalent coordinate of the first area;
and the synchronous processing submodule is used for controlling the content displayed in the first area to be the same as the corresponding touch operation responding to the first area according to the equivalent coordinate converted by the coordinate conversion submodule.
Preferably, the coordinate conversion sub-module converts the touch point coordinate or the touch trajectory curve of the second area into an equivalent coordinate or an equivalent trajectory curve of the first area; and the synchronous processing submodule is used for carrying out page control operation on the content displayed in the first area based on the equivalent coordinate or the equivalent track curve.
According to another aspect of the present invention, there is provided a page control method for controlling display of content in a first area of a page, including:
responding to a preset trigger operation, displaying a second area independently of the page, and enabling the touch operation on the second area to be equivalent to the corresponding touch operation on the first area;
and responding to the touch operation of the second area, and performing the same control on the content displayed in the first area as the content responding to the corresponding touch operation of the first area.
Preferably, the predetermined triggering operation includes: a predetermined trigger operation of a first region in the page.
Preferably, the second area is a draggable second area; or, the second area is a fixed position second area, wherein the fixed position is outside the first area.
Preferably, the predetermined triggering operation includes: a sliding operation in the first region that is slidable; or, the sliding operation in the slidable first area is performed, and the height of the page to which the first area belongs is less than or equal to the height of the screen.
Preferably, the touch operation of the second area includes: a sliding operation in the second region that is slidable.
Preferably, the sliding operation includes: scrolling up or down, or moving left or right.
Preferably, the controlling the content displayed in the first area in the same way as the corresponding touch operation in response to the first area includes:
and performing the same control on the content displayed by the first area as in response to the corresponding touch operation of the first area by converting the touch coordinates of the second area into equivalent coordinates of the first area.
Preferably, the performing the same control on the content displayed in the first area by converting the touch coordinates of the second area into equivalent coordinates of the first area as in response to the corresponding touch operation of the first area includes:
and converting the touch point coordinates or the touch track curve of the second area into equivalent coordinates or an equivalent track curve of the first area, and performing page control operation on the content displayed in the first area based on the equivalent coordinates or the equivalent track curve.
It can be found that according to the technical solution of the embodiment of the present invention, when browsing the page content of the web page, the second area can be displayed independently of the page according to the predetermined trigger operation, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area of the page, when the touch operation is performed on the second area, the same control as the corresponding touch operation in response to the first area can be performed on the content displayed on the first area in response to the touch operation on the second area, and since the second area can be outside the first area of the page, the content of the first area of the page can be controlled by the touch operation on the second area to move, thereby avoiding the content of the first area of the page being blocked by fingers, and improving the browsing experience.
Furthermore, the second area displayed in the embodiment of the present invention may be draggable or fixed, and if the second area is fixed, the second area only needs to be located outside the first area of the page to avoid blocking, and if the second area is draggable, the second area may be displayed in the first area of the page and then dragged to other locations, or directly displayed outside the first area of the page.
Further, in order to respond more accurately, the second area may be displayed independently of the page when the trigger operation is a sliding operation in the slidable first area or a sliding operation in the slidable first area and the height of the page to which the first area belongs is less than or equal to the height of the screen.
Further, embodiments of the present invention may be applicable to a variety of touch slide scenarios, such as scrolling up or down, or moving left or right, etc.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The invention provides a terminal device which can avoid blocking moving contents when the contents of a page are controlled to move, and improves browsing experience.
Fig. 1 is a schematic block diagram of a terminal device according to an embodiment of the present invention.
As shown in fig. 1, the terminal device 10 may include: memory 11, touch-sensitive display 12 and processor 13.
The memory 11 stores the content of the page displayed on the touch display screen;
in response to a predetermined trigger operation of the user on the page on the touch-sensitive display 12, the processor 13 performs an operation of displaying the second area independently of the page, and making the touch operation on the second area equivalent to the corresponding touch operation on the first area;
in response to the touch operation of the second area, the processor 13 performs an operation of performing the same control on the content displayed in the first area as in response to the corresponding touch operation of the first area.
Wherein the processor 13 performs an operation of performing the same control on the content displayed in the first area by converting the touch coordinates of the second area into equivalent coordinates of the first area in response to the touch operation of the second area as in response to the corresponding touch operation of the first area.
The processor 13 in the terminal device 10 may be implemented as a separate device structure, which may be referred to as a page control device, and the page control device may include a plurality of sub-modules, which will be described in detail below.
Fig. 2 is a schematic block diagram of a page control apparatus according to an embodiment of the present invention.
As shown in fig. 2, a page control apparatus 20 may include: a first processing module 21 and a second processing module 22.
And the first processing module 21 is configured to, in response to a predetermined trigger operation, display the second area independently of the page, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area.
And the second processing module 22 is configured to, in response to the touch operation of the second area, perform the same control on the content displayed in the first area as in response to the corresponding touch operation of the first area.
It can be found that according to the technical solution of the embodiment of the present invention, when browsing the page content of the web page, the second area can be displayed independently of the page according to the predetermined trigger operation, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area of the page, when the touch operation is performed on the second area, the same control as the corresponding touch operation in response to the first area can be performed on the content displayed on the first area in response to the touch operation on the second area, and since the second area can be outside the first area of the page, the content of the first area of the page can be controlled by the touch operation on the second area to move, thereby avoiding the content of the first area of the page being blocked by fingers, and improving the browsing experience.
Fig. 3 is another schematic block diagram of a page control apparatus according to an embodiment of the present invention.
As shown in fig. 3, a page control apparatus 20 may include: the functions of the first processing module 21 and the second processing module 22 can be described with reference to fig. 2, and are not described herein again.
Further, the first processing module 21 may include: a receiving sub-module 211 and a display sub-module 212.
And the receiving sub-module 211 is configured to receive a trigger operation in the first area of the page.
The display sub-module 212 is configured to, in response to the trigger operation received by the receiving sub-module 211 in the first area of the page, display a second area independent of the page, so that the touch operation in the second area is equivalent to the corresponding touch operation in the first area, where the second area is a draggable second area, or is a fixed-position second area and the fixed position is located outside the first area.
The second area displayed in the embodiment of the invention can be draggable or fixed, if the second area is fixed, the second area is only required to be positioned outside the first area of the page to avoid blocking, and if the second area is draggable, the second area can be displayed in the first area of the page and then dragged to other positions, or directly displayed outside the first area of the page.
Alternatively, the first processing module 21 may include: a receiving sub-module 211, a condition confirming sub-module 213, and a display sub-module 212.
And a receiving submodule 211, configured to receive a trigger operation.
And the condition confirming submodule 213 is configured to determine that the trigger operation received by the receiving submodule is a sliding operation in the slidable first area or a sliding operation in the slidable first area, and the height of the page to which the first area belongs is less than or equal to the screen height.
And a display sub-module 212 for displaying the second area independently of the page according to the result of the condition confirmation sub-module 213, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area.
Wherein the second processing module 22 comprises: a receiving sub-module 221, a condition confirming sub-module 222, and a control processing sub-module 223.
The receiving sub-module 221 is configured to receive a touch operation.
A condition confirming submodule 222 for confirming that the touch operation received by the receiving submodule 221 is a slide operation in the slidable second area.
And a control processing sub-module 223 for performing the same control on the content displayed in the first area as the corresponding touch operation in response to the first area, according to the result of the condition confirmation sub-module 222.
Wherein, the control processing sub-module 223 includes: a coordinate conversion sub-module 2231 and a synchronization processing sub-module 2232.
And a coordinate conversion sub-module 2231, configured to convert the touch coordinates of the second area into equivalent coordinates of the first area.
And the synchronization processing sub-module 2232 is configured to perform the same control on the content displayed in the first area as the corresponding touch operation in response to the first area according to the equivalent coordinates converted by the coordinate conversion sub-module 2231.
The coordinate conversion sub-module 2231 converts the touch point coordinates or the touch trajectory curve of the second area into equivalent coordinates or an equivalent trajectory curve of the first area; the synchronization processing sub-module 2232 performs a page control operation on the content displayed in the first area based on the equivalent coordinates or the equivalent trajectory curve.
FIG. 4 is a schematic flow chart diagram of a page control method according to one embodiment of the invention.
As shown in fig. 4, in step 401, in response to a predetermined trigger operation, the first processing module of the page control apparatus displays a second area independently of the page, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area.
The page control device can be arranged in a browser and used for controlling the browsing of the page.
In this step, the predetermined trigger operation may include: a predetermined trigger operation of a first region in the page. In this step, the second area may be a draggable second area; or, the second area is a fixed position second area, wherein the fixed position is outside the first area.
That is to say, the displayed second area may be draggable or fixed, if the second area is fixed, the second area only needs to be located outside the first area of the page to avoid blocking, if the second area is draggable, the second area may be displayed in the first area of the page and then dragged to other positions, or directly displayed outside the first area of the page.
In this step, the predetermined triggering operation may further include: a sliding operation in the slidable first region; or, the sliding operation is positioned in the slidable first area, and the height of the page to which the first area belongs is less than or equal to the height of the screen.
In step 402, the second processing module of the page control device responds to the touch operation of the second area, and performs the same control on the content displayed in the first area as that in response to the corresponding touch operation of the first area.
Wherein the touch operation of the second area may include: a sliding operation in the second region that is slidable. The sliding operation may include: scrolling up or down, or moving left or right, that is, embodiments of the present invention may be applied to a variety of scenarios, including scrolling through pages, etc.
Wherein the same control of the content displayed in the first area as the corresponding touch operation in response to the first area may include: the content displayed in the first area is controlled by converting the touch coordinates of the second area into equivalent coordinates of the first area, for example, the touch point coordinates or touch trajectory curve of the second area is converted into equivalent coordinates or equivalent trajectory curve of the first area, and the content displayed in the first area is controlled by a page based on the equivalent coordinates or equivalent trajectory curve.
It can be found that according to the technical solution of the embodiment of the present invention, when browsing the page content of the web page, the second area can be displayed independently of the page according to the predetermined trigger operation, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area of the page, when the touch operation is performed on the second area, the same control as the corresponding touch operation in response to the first area can be performed on the content displayed on the first area in response to the touch operation on the second area, and since the second area can be outside the first area of the page, the content of the first area of the page can be controlled by the touch operation on the second area to move, thereby avoiding the content of the first area of the page being blocked by fingers, and improving the browsing experience.
FIG. 5 is another schematic flow chart diagram of a page control method according to an embodiment of the present invention.
Fig. 5 describes the solution of the embodiment of the invention in more detail with respect to fig. 4. This embodiment may generate a second draggable region for display independent of the page, such as a synchronization region that floats above the first region of the page, such as a scrollable region, or floats elsewhere on the page, and all scrolling operations of the synchronization region are synchronized to the scrollable region.
As shown in fig. 5, in step 501, a first processing module of the page control apparatus receives a predetermined trigger operation in a first area of a page.
The first region of the page may be a slidable region in the page, such as a scrollable region that is scrollable up and down, or a panning region that is movable left and right. The slidable area may be, for example, a text content area.
It should be noted that, this step is illustrated as a trigger operation occurring in the first area, but is not limited to this, and may be in other positions of the page.
The trigger operation may be a scroll operation of scrolling up and down, or a pan operation of moving left and right. The first area of the page is taken as the scrollable area for illustration but not limitation.
In step 502, the first processing module responds to a predetermined trigger operation, displays the second area independently of the page, and enables the touch operation on the second area to be equivalent to the corresponding touch operation on the first area.
The predetermined triggering operation according to the embodiment of the present invention may include: a sliding operation in the slidable first region; or, the sliding operation is positioned in the slidable first area, and the height of the page to which the first area belongs is less than or equal to the height of the screen. Note that, in addition to the slide operation, other operations such as a click operation may be performed.
The following describes, but is not limited to, the determination process of the trigger operation by taking the first area as the scrollable area and the trigger operation as the sliding operation:
after receiving the sliding operation, firstly judging whether the area where the received sliding operation is located is a scrollable area or not, if not, not responding; if the page is the scrollable area, further judging whether the height of the page to which the scrollable area belongs is less than or equal to the screen height, if not, not responding, and if so, generating a scrollable synchronous area floating on the upper layer of the page independently of the page.
If the page height is greater than the screen height, the entire page may need to be scrolled when a sliding operation is performed outside the scrollable area. If a floating synchronization region is still being generated at this time, then all of the swipe operations may be received by the floating synchronization region for responding to the scrollable area, at which time the page may not be able to swipe. Therefore, when the height of the page to which the scrollable area belongs is less than or equal to the height of the screen, a floating synchronous area can be generated for display.
It should be noted that the scrollable synchronization area is an area generated by the browser and not an area of the page itself. The scrolling operation generated in the scrollable synchronization area is synchronized to the scrollable area in the page, resulting in scrolling of the contents of the scrollable area in the page.
The synchronization area generated in this step can be seen in fig. 6, and fig. 6 is a schematic diagram of a synchronization area displayed independently on a page in a page control method according to an embodiment of the present invention. The second area, i.e. the synchronization area 601, displayed in the figure may be draggable or fixed, and if the second area is fixed, the second area only needs to be located outside the first area of the page to avoid blocking, and if the second area is draggable, the second area may be displayed in the first area of the page and then dragged to other positions, or directly displayed outside the first area of the page.
In step 503, the second processing module of the page control apparatus receives a touch operation in the second area.
The touch operation of the second area may include: a sliding operation in the slidable second region. The sliding operation may include: scrolling up or down, or moving left or right, etc.
In step 504, the second processing module responds to the touch operation of the second area, and performs the same control on the content displayed in the first area as that in response to the corresponding touch operation of the first area.
This step may perform the same control on the content displayed in the first area as the corresponding touch operation in response to the first area by converting the touch coordinates of the second area into equivalent coordinates of the first area, for example, converting the touch point coordinates or touch trajectory curve of the second area into equivalent coordinates or equivalent trajectory curve of the first area, and performing a page control operation on the content displayed in the first area based on the equivalent coordinates or equivalent trajectory curve.
The following description is given by taking the touch operation at this step as a scroll operation as an example, but not limited thereto.
After receiving the rolling operation, firstly judging whether the received rolling event occurs in a synchronous area or not, and if not, not responding; if the touch event occurs in the synchronous area, the scroll event coordinate of the synchronous area is converted into the actual scroll area coordinate (namely, the touch coordinate of the synchronous area (the second area) is converted into the equivalent coordinate of the scrollable area (the first area)), and then the scroll event is transmitted for response.
Assuming absolute coordinates x0, y0 (relative to the absolute coordinates of the whole page) of the scrollable area of the web page, the generated synchronization area records coordinates x0, y0 of the scrollable area, and after the synchronization area is dragged by the user, the coordinates of the synchronization area are x1, y1, and the width and height of the synchronization area are w, h, the process of converting the coordinates of the scroll event in the synchronization area into the coordinates of the actual scroll area and then transferring the scroll event includes:
1) and detecting that the user scrolls the page, and generating a scrolling event.
2) Determining that the coordinates (ex, ey) of the scrolling event meet the following condition: x1< ex < x1+ w and y1< ey < y1+ h, then the scroll event is considered to occur within the synchronization region.
3) The coordinates of the scroll event are converted into the coordinates of the scroll area, i.e., ex1 ═ x0+ ex, ey0 ═ y0+ ey.
4) A scroll event is passed that includes the converted coordinates.
Then the scrollable area synchronizes the position of the scrollable area based on the translated coordinates of the passed scroll event, i.e., the absolute coordinates x0 of the scrollable area is shifted ex in the horizontal direction, i.e., the x-axis, and y0 is shifted in the vertical direction, i.e., the y-axis. It can be found that the browsing experience of the user can be better because the scrolling area is not occluded during scrolling.
The following is further illustrated by an application example.
If a user opens a page, the page comprises a scrollable area, when the finger of the user is detected to fall in the scrollable area, the browser generates a synchronous area independent of the page, the user can drag the synchronous area to the position of the scrolled page without influencing operation, then the subsequent scrolling operation of the user in the synchronous area is directly synchronized in the scrollable area, namely, the content of the scrollable area can be scrolled along with the scrolling operation in the synchronous area, and the scrolled area is not shielded during scrolling.
It should be noted that the predetermined trigger operation described in the embodiment of the present invention may also be, for example, a specific action of a specific location, a specific duration, a specific mode, or a specific operation of a certain key of the mobile terminal, and a second area is specified by the specific action or the specific operation, so that the operation of the second area corresponds to the operation of the first area. The operations in the two regions may also be different, for example, clicking on a certain location in the second region may have the effect of sliding towards a certain region in the first region. In addition, the operation in the second region may be, for example, page turning, closing, cancellation of text display, or the like, in addition to the slide operation.
In summary, according to the technical solution of the embodiments of the present invention, when browsing the page content of the web page, the second area may be displayed independently of the page according to a predetermined trigger operation, so that the touch operation on the second area is equivalent to the corresponding touch operation on the first area of the page, when the touch operation is performed on the second area, the same control as the corresponding touch operation in response to the first area may be performed on the content displayed on the first area in response to the touch operation on the second area, and since the second area may be outside the first area of the page, the content of the first area of the page may be controlled by the touch operation on the second area to move, thereby avoiding the content of the first area of the page being blocked by a finger, and improving the browsing experience.
Furthermore, the second area displayed in the embodiment of the present invention may be draggable or fixed, and if the second area is fixed, the second area only needs to be located outside the first area of the page to avoid blocking, and if the second area is draggable, the second area may be displayed in the first area of the page and then dragged to other locations, or directly displayed outside the first area of the page.
The technical solution according to the present invention has been described in detail above with reference to the accompanying drawings.
Furthermore, the method according to the invention may also be implemented as a computer program comprising computer program code instructions for carrying out the above-mentioned steps defined in the above-mentioned method of the invention. Alternatively, the method according to the present invention may also be implemented as a computer program product comprising a computer readable medium having stored thereon a computer program for executing the above-mentioned functions defined in the above-mentioned method of the present invention. Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.