CN110275661B - Data display method and device - Google Patents

Data display method and device Download PDF

Info

Publication number
CN110275661B
CN110275661B CN201810215261.3A CN201810215261A CN110275661B CN 110275661 B CN110275661 B CN 110275661B CN 201810215261 A CN201810215261 A CN 201810215261A CN 110275661 B CN110275661 B CN 110275661B
Authority
CN
China
Prior art keywords
scroll bar
paging
position information
page number
real
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
CN201810215261.3A
Other languages
Chinese (zh)
Other versions
CN110275661A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810215261.3A priority Critical patent/CN110275661B/en
Publication of CN110275661A publication Critical patent/CN110275661A/en
Application granted granted Critical
Publication of CN110275661B publication Critical patent/CN110275661B/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/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • 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
    • G06F3/04855Interaction with scrollbars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a data display method and a data display device, wherein the method comprises the following steps: performing page number division on data to be displayed according to the paging configuration information of the paging container to obtain paging data of each page; generating a scroll bar in the paging container, wherein scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page number sequence of the pages; monitoring real-time position information of a scroll bar slider on the scroll bar; judging a target page number corresponding to a scroll bar area to which the real-time position information belongs; and displaying the paging data corresponding to the target page number on the current page of the paging container. According to the invention, on the premise of reducing the use of plug-ins, the rolling page turning data display function based on the movement of the scroll bar slider is realized, the data display effect is enhanced, and the user experience is improved.

Description

Data display method and device
Technical Field
The invention relates to the technical field of computers, in particular to a data display method and device.
Background
At present, with the progress of network communication technology and the increasing speed of broadband networks, various network applications are increasingly applied and are increasingly popular. However, at the present stage, the performance of many network applications has already reached a bottleneck, for example, live webcast room performance has reached a bottleneck, the use of various plug-ins, various timers, various interface requests, video stream loading, and consumption of long connection establishment performance affect the overall loading speed of the master webcast, so that when any effect or function is made, the use of plug-ins is reduced, and it is of great significance to implement the required function and special effect by native codes.
In the prior art, the scroll bar function is specifically that the content of a page changes in real time along with the moving position of a scroll bar slider, when the scroll bar slider is dragged, there is no trigger point, and at what position the scroll bar slider is dragged, the data content corresponding to the position can be displayed, so that the scroll bar function in the prior art cannot realize a page-turning and scrolling data display function.
Disclosure of Invention
In view of the above, the present invention has been made to provide a data presentation method and apparatus that overcomes or at least partially solves the above problems.
In one aspect of the present invention, a data presentation method is provided, where the method includes:
performing page number division on data to be displayed according to the paging configuration information of the paging container to obtain paging data of each page;
generating a scroll bar in the paging container, wherein scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page number sequence of the pages;
monitoring real-time position information of a scroll bar slider on the scroll bar;
judging a target page number corresponding to a scroll bar area to which the real-time position information belongs;
and displaying the paging data corresponding to the target page number on the current page of the paging container.
Wherein the generating a scroll bar within the paginated container comprises:
and respectively determining the starting position information and the ending position information of the corresponding scroll bar area of the scroll bar slider on the scroll bar when the paging container shows each page according to the total page number of the paged after page number division.
Wherein the generating a scroll bar within the pagination container further comprises:
and binding the paging container with a mouse wheel event, and/or binding the paging container with a mouse wheel release event, and/or binding the scroll bar slider with a mouse dragging release event, and/or binding the scroll bar with a mouse clicking event.
Wherein, the determining the target page number corresponding to the scroll bar region to which the real-time position information belongs includes:
acquiring initial position information of the scroll bar slider on the scroll bar;
if the real-time position information is larger than the initial position information and the real-time position information is larger than the end position information of a scroll bar area corresponding to the current paging on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the next paging of the current paging;
if the real-time position information is smaller than the initial position information and the real-time position information is smaller than the initial position information of a scroll bar area corresponding to the current page on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the previous page of the current page;
otherwise, the target page number corresponding to the scroll bar area to which the real-time position information belongs is the current page.
Wherein, the displaying the paging data corresponding to the target page number on the current page of the paging container includes:
and displaying the paging data corresponding to the target page number on the current page of the paging container according to a preset special effect mode.
In another aspect of the present invention, there is provided a data presentation apparatus, comprising:
the configuration module is used for dividing the page number of the data to be displayed according to the paging configuration information of the paging container to obtain paging data of each page;
the generating module is used for generating a scroll bar in the paging container, and scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page number sequence of the pages;
the monitoring module is used for monitoring real-time position information of the scroll bar sliding block on the scroll bar;
the judging module is used for judging a target page number corresponding to a scroll bar area to which the real-time position information belongs;
and the display module is used for displaying the paging data corresponding to the target page number on the current page of the paging container.
The generating module is specifically configured to obtain a total page number of the pages after page number division, and respectively determine start position information and end position information of a corresponding scroll bar area of the scroll bar slider on the scroll bar when the paging container displays each page.
Wherein the determining module includes:
the acquisition unit is used for acquiring initial position information of the scroll bar slider on the scroll bar;
the judging unit is used for determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the next page of the current page when the real-time position information is larger than the initial position information and the real-time position information is larger than the end position information of the scroll bar area corresponding to the current page on the scroll bar; when the real-time position information is smaller than the initial position information and the real-time position information is smaller than the initial position information of a scroll bar area corresponding to the current paging on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the previous paging of the current paging; otherwise, determining that the target page number corresponding to the scroll bar area to which the real-time position information belongs is the current page.
Furthermore, the invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
Furthermore, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the program.
According to the data display method and device provided by the embodiment of the invention, the real-time position information of the scroll bar sliding block on the scroll bar is monitored in real time, wherein the scroll bar area of each page corresponds to the scroll bar, and the page data corresponding to the target page number is displayed on the current page of the page container according to the target page number corresponding to the scroll bar area to which the real-time position information belongs.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a data presentation method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a subdivision process of step S14 in a data presentation method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a data display device according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating an internal structure of a determination module of the data display apparatus according to the embodiment of the present invention;
FIG. 5 is a schematic diagram of a computer apparatus according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary 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.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Because the function of the conventional scroll bar plug-in is limited to the real-time change of the content of the page along with the moving position of the scroll bar slider, the data display function of page turning and scrolling cannot be realized, and the embodiment of the invention provides a data display method and a data display device for realizing the self-defined scroll bar through a native code. According to the embodiment of the invention, on the premise of not using the existing scroll bar plug-in, the user-defined scroll bar is realized by using the native code, so that the scrolling page-turning data display function based on the movement of the scroll bar slider is realized, the data display effect is enhanced, and the user experience is improved.
Fig. 1 schematically shows a flow chart of a data presentation method of an embodiment of the present invention. Referring to fig. 1, the data display method of the embodiment of the present invention specifically includes the following steps:
step S11, performing page number division on the data to be displayed according to the paging configuration information of the paging container, and obtaining paging data of each page.
In this embodiment, the paging container is a container for accommodating data to be displayed. The paging configuration information comprises the width and height occupied by each element data in the data to be displayed, the distance between a default scroll bar slider and the top of a paging container, the number of display element data in each row in the paging container, the number of display element data in each column, the height of a small scroll bar slider, the default display of the initial configuration information such as the page number and the like.
The paging configuration information can be configured by a user, the paging configuration information is flexible, the width and the height of a paging container are generated according to the width and the height of single element data which need to be displayed specifically by the user configuration, and the distance from the top of a scroll bar to the top of the paging container is configurable.
In the embodiment, the paging configuration information is transmitted into the paging container of the data display device, and the user needs to display the array data information to be displayed in the paging, the page number of the data to be displayed is divided according to the paging configuration information of the paging container, paging data of each paging is obtained, and the total paging page number of the data to be displayed is determined.
And step S12, generating a scroll bar in the paging container, wherein scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page number sequence of the pages.
In this embodiment, after the data to be displayed is subjected to page number division according to the array data information to be displayed and the paging configuration information of the paging container, which are displayed in the paging according to the user configuration, paging data of each page, that is, a paging information array, is obtained, and then each page and a custom scroll bar structure are rendered according to the paging information array. In this embodiment, the generating a scroll bar in the paging container specifically includes: and respectively determining the starting position information and the ending position information of the corresponding scroll bar area of the scroll bar slider on the scroll bar when the paging container shows each page according to the total page number of the paged after page number division. And scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page number sequence of the pages.
Further, the method also comprises the step of binding the paging container with a mouse wheel event, and/or binding the paging container with a mouse wheel release event, and/or binding the scroll bar slider with a mouse dragging release event, and/or binding the scroll bar with a mouse clicking event.
In this embodiment, after dividing the page number of the data to be displayed according to the paging configuration information of the paging container, the method further includes customizing a scroll bar in the paging container, where scroll bar regions of respective pages are sequentially corresponded to the scroll bar, and a user may display the paging data of the corresponding page number by moving a mouse or a scroll mouse wheel to drag a slider to the scroll bar region of the corresponding page number on the scroll bar.
And step S13, monitoring the real-time position information of the slider of the scroll bar on the scroll bar.
In practical application, after detecting a mouse wheel movement event, a mouse wheel release event, a mouse dragging release event, or a mouse click event, which may cause the position of the scroll bar slider on the scroll bar to move, real-time position information of the scroll bar slider on the scroll bar is monitored in real time.
Step S14, determining a target page number corresponding to the scroll bar area to which the real-time position information belongs;
and step S15, displaying the paging data corresponding to the target page number on the current page of the paging container.
In the embodiment, the paging configuration information is transmitted into the paging container of the data display device, and the user needs to display the array data information to be displayed in the paging, the page number of the data to be displayed is divided according to the paging configuration information of the paging container, paging data of each paging is obtained, and the total paging page number of the data to be displayed is determined. And defining a scroll bar in the paging container by self, and displaying the corresponding page number content by dragging a mouse slider to the position of the scroll bar of the corresponding page number to be displayed by a user.
In the embodiment, the paging container rolling page turning special effect triggering mode includes 3, a mouse roller, an up-down page turning button and a scroll bar slider are dragged. The mouse roller and the scroll bar slider are dragged by monitoring real-time position information of the scroll bar slider on the scroll bar when a corresponding event is triggered by a mouse, and displaying corresponding paging data on a current page of the paging container according to a target page number corresponding to a scroll bar area to which the real-time position information belongs so as to realize a special effect of scrolling and page turning of the paging container. In addition, in this embodiment, a page turning up and down button is further provided, and a page turning up and down button is clicked, so that a special effect of page turning by rolling of the paging container can be realized.
In this embodiment, after the determining the target page number corresponding to the scroll bar region to which the real-time position information belongs, the method further includes: and displaying the corresponding target page number in the scroll bar area to which the real-time position information belongs in a floating layer mode.
According to the data display method provided by the embodiment of the invention, the real-time position information of the scroll bar sliding block on the scroll bar is monitored in real time, wherein the scroll bar is correspondingly provided with each paging scroll bar area, and the paging data corresponding to the target page number is displayed on the current page of the paging container according to the target page number corresponding to the scroll bar area to which the real-time position information belongs.
In this embodiment of the present invention, referring to fig. 2, the determining a target page number corresponding to a scroll bar area to which the real-time position information belongs specifically includes the following steps:
step S141, acquiring initial position information of the scroll bar slider on the scroll bar;
step S142, if the real-time position information is greater than the initial position information and the real-time position information is greater than the end position information of the scroll bar area corresponding to the current page on the scroll bar, determining that the target page number corresponding to the scroll bar area to which the real-time position information belongs is the next page of the current page;
step S143, if the real-time position information is smaller than the initial position information and the real-time position information is smaller than the initial position information of the scroll bar area corresponding to the current page on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the previous page of the current page;
and S144, if not, the target page number corresponding to the scroll bar area to which the real-time position information belongs is the current page.
In this embodiment, displaying the paging data corresponding to the target page number on the current page of the paging container specifically includes displaying the paging data corresponding to the target page number on the current page of the paging container according to a preset special effect mode. In order to further enhance the data display effect and improve the user experience while realizing the special effect of the page turning by rolling of the paging container, the present embodiment can adopt a preset special effect mode to realize the display of the paging data when the paging data of the target page corresponding to the real-time position of the current scroll bar slider is displayed on the current page of the paging container.
The data display method provided by the embodiment of the invention is particularly a data display method based on scroll bar page turning, the data display method is characterized in that the data display method directly turns pages according to the scroll bar area moved by a scroll bar sliding block, and the position is just the position of the critical point of the last page and the next page, otherwise, the current page is still displayed, so that the whole screen rolling page turning is controlled, and the content of the page does not change along with the moving position of the sliding block in real time like the common scroll bar, but the whole screen rolling page turning is realized. The technical scheme of the invention is explained by taking the dragging of the scroll bar slider as a specific embodiment, namely three steps of dragging and paging are carried out, the initial coordinate of the mouse when the slider is dragged is recorded, and when the slider is released by the mouse, the initial coordinate is subtracted from the dragging ending coordinate of the slider, so that the moving distance of the slider can be obtained. And determining the relationship between the current real-time position information of the slider and the initial position information and the end position information of the corresponding scroll bar area of the current page on the scroll bar according to the moving distance of the slider.
1. Mouse-pressing scroll bar slider
And recording the initial coordinate of mouse pressing, and the distance between the scroll bar slider and the top of the paging container. And binding mouse clicking, moving and mouse releasing events in the current paging parent container and the scroll bar area, and binding mouse roller moving events in the current paging parent container.
2. Mouse dragging slide block
Determining the height of a slider of the scroll bar, wherein the height of the slider from the top of the paging container is the starting range value of the slider rolling, and calculating the maximum value of the finishing coordinate of the slider rolling, namely the distance of the slider from the top of the paging container plus the height of the slider (total paging page number-1).
And acquiring the ending coordinate of the scroll bar slider in the moving process of the mouse, wherein the initial coordinate before the slider moves is also the coordinate of the last dragging ending, and calculating the starting coordinate and the ending coordinate of the scroll bar area corresponding to each page of the scroll bar slider on the scroll bar. And updating the distance between the slider and the top of the paging container in real time in the moving process of the mouse, namely, the coordinate before the slider moves + (the slider movement ending coordinate-the coordinate before the slider moves), wherein the value range is required to set the distance between the slider and the top of the paging container between the starting range value of the slider rolling and the maximum value of the slider rolling ending coordinate.
And if the slider movement ending coordinate is smaller than the last slider movement ending coordinate, and the distance between the current slider and the top of the paging container is smaller than the starting range of the current page slider. Subtracting 1 from the page number, performing previous page paging logic processing, performing special effect of paging parent container area rolling, displaying the paging information in a floating layer, and fading.
And if the slider movement ending coordinate is larger than the last slider movement ending coordinate, and the distance between the current slider and the top of the paging container is larger than the ending range of the current page slider. Adding 1 to the page number, performing next page paging logic processing, performing special effect of paging parent container area rolling, displaying the paging information in a floating layer, and fading.
Implementation details: the slider moves in real time along with the position of the mouse, but the paging container is scrolled to determine whether to page according to whether the starting position and the ending position of the mouse slider on the scroll bar reach the range of the current paging starting position and the current paging ending position.
In the embodiment, the native mouse movement event is utilized to process the dragging, the operation is convenient and flexible, the operation details can be changed, the data calculation is convenient and simple, and the complicated logic of plug-in is not required to be modified. The performance is also high.
3. Mouse release slider
The height of the slider is obtained, the default distance between the slider and the top of the paging container is obtained, the initial coordinate of mouse pressing, the coordinate of mouse when releasing, the current page number, the distance between the scroll bar slider and the top of the paging container are obtained, and the initial coordinate and the end coordinate of the corresponding scroll bar area of each paging scroll bar slider on the scroll bar are calculated. The maximum value of the end coordinate of the slider rolling is the distance between the slider and the top of the paging container plus the height of the slider (total paging page number-1).
And updating the distance t between the slider and the top of the paging container in real time in the moving process of the mouse, namely the coordinate before the slider moves + (the slider movement ending coordinate-the coordinate before the slider moves), wherein the value range needs to set the distance between the slider and the top of the paging container between the starting range value of the slider rolling and the maximum value of the slider rolling ending coordinate.
The ending coordinate of the slider is less than the starting coordinate of the slider, and the distance from the slider to the top of the paging container is less than the starting coordinate corresponding to the slider of the current page. Subtracting 1 from the page number, performing previous paging logic processing, performing special effect of paging parent container area rolling, displaying the paging information in a floating layer, fading and disappearing mode, and setting the distance between the sliding block and the top of the paging container. The unbinding paging container drags a moving event, the unbinding paging container drags a mouse release event, the unbinding scroll bar slider drags a mouse release event, and the unbinding scroll bar drags a mouse release event.
The ending coordinate of the slider is greater than the starting coordinate of the slider and the distance of the slider from the top of the paging container is greater than the corresponding ending coordinate of the slider of the current page. Adding 1 to the page number, and performing next page paging logic processing; paging parent container area rolling special effect; displaying the paging information in a floating layer, and fading; and setting the distance between the sliding block and the top of the paging container. Unbinding the paging container and the mouse wheel event, unbinding the paging container and the mouse wheel release event, unbinding the scroll bar slider and the mouse drag release event, and unbinding the scroll bar and the mouse click event.
The judgment range of the distance between the sliding block and the top of the paging container is not the other two conditions. And calculating the distance between the slide block and the top of the paging container, wherein the value is the default distance between the slide block and the top of the paging container plus (the current paging number is-1) and the height of the slide block, and the distance between the slide block and the top of the paging container is set. Unbinding the paging container and the mouse wheel event, unbinding the paging container and the mouse wheel release event, unbinding the scroll bar slider and the mouse drag release event, and unbinding the scroll bar and the mouse click event.
Implementation details: the position of the slider is determined by the current page, the starting coordinate and the ending coordinate of the scroll bar of the slider, and if the position of the slider is smaller than the starting position of the scroll bar of the current page, the position of the slider is directly set as the starting position of the scroll bar of the current page slider; and if the position of the slider is larger than the ending position of the scroll bar where the current page slider is located, directly setting the position of the slider as the ending position of the scroll bar where the current page slider is located. Otherwise, the position of the sliding block is between the starting position and the ending position of the scroll bar where the sliding block of the current page is located.
In this embodiment, the interaction details when the mouse is released are good, there are a start range and an end range control, and if not, the start value or the end value is reset. When the mouse slider is dragged upwards and the position of the mouse slider is smaller than the starting position where the current page slider should be located, the previous page turning is triggered. When the mouse slider is dragged downwards and the position of the mouse slider is larger than the end position where the current page slider should be located, the next page turning is triggered. The user experience is good.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 3 schematically shows a schematic structural diagram of a data presentation apparatus according to an embodiment of the present invention. Referring to fig. 3, the data display apparatus of the embodiment of the present invention specifically includes a configuration module 301, a generation module 302, a monitoring module 303, a determination module 304, and a display module 305, where:
the configuration module 301 is configured to perform page number division on data to be displayed according to the paging configuration information of the paging container, so as to obtain paging data of each page;
a generating module 302, configured to generate a scroll bar in the paging container, where scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page order of the pages;
the monitoring module 303 is configured to monitor real-time position information of the slider of the scroll bar on the scroll bar;
a determining module 304, configured to determine a target page number corresponding to a scroll bar region to which the real-time position information belongs;
a displaying module 305, configured to display the paging data corresponding to the target page number on the current page of the paging container.
In this embodiment of the present invention, the generating module 302 is specifically configured to determine, according to the total page number of the paginated obtained after the page number division, starting position information and ending position information of a corresponding scroll bar area of the scroll bar slider on the scroll bar when the paginated container displays each paginated.
Further, the generating module 302 is specifically configured to bind the paging container with a mouse wheel event, and/or bind the paging container with a mouse wheel release event, and/or bind the scroll bar slider with a mouse drag release event, and/or bind the scroll bar with a mouse click event.
In this embodiment of the present invention, referring to fig. 4, the determining module 304 further includes an obtaining unit 3041 and a determining unit 3042, where:
the acquiring unit 3041 is configured to acquire initial position information of the scroll bar slider on the scroll bar;
the determining unit 3042 is configured to determine, when the real-time location information is greater than the initial location information and the real-time location information is greater than end location information of a scroll bar area corresponding to the current page on the scroll bar, that a target page number corresponding to the scroll bar area to which the real-time location information belongs is a next page of the current page; when the real-time position information is smaller than the initial position information and the real-time position information is smaller than the initial position information of a scroll bar area corresponding to the current paging on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the previous paging of the current paging; otherwise, determining that the target page number corresponding to the scroll bar area to which the real-time position information belongs is the current page.
In this embodiment of the present invention, the displaying module 305 is specifically configured to display the paging data corresponding to the target page number on the current page of the paging container according to a preset special effect manner.
In this embodiment of the present invention, the display module 305 is further configured to display a corresponding target page number in a floating layer manner in the scroll bar area to which the real-time position information belongs after the determination module 304 determines the target page number corresponding to the scroll bar area to which the real-time position information belongs.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above-described embodiments of the apparatus are merely illustrative, and 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
According to the data display method and device provided by the embodiment of the invention, the real-time position information of the scroll bar sliding block on the scroll bar is monitored in real time, wherein the scroll bar area of each page corresponds to the scroll bar, and the page data corresponding to the target page number is displayed on the current page of the page container according to the target page number corresponding to the scroll bar area to which the real-time position information belongs.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method as described above.
In this embodiment, the module/unit integrated with the data presentation apparatus may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Fig. 5 is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device provided in the embodiment of the present invention includes a memory 501, a processor 502, and a computer program that is stored in the memory 501 and can be run on the processor 502, where the processor 502 implements the steps in the data presentation method embodiments when executing the computer program, for example, step S11 shown in fig. 1, and performs page number division on data to be presented according to page configuration information of a page container to obtain page data of each page; step S12, generating scroll bars in the paging container, and sequentially arranging continuous scroll bar areas corresponding to the scroll bars on each page according to the page number sequence; step S13, monitoring real-time position information of a scroll bar slider on the scroll bar; step S14, determining a target page number corresponding to the scroll bar area to which the real-time position information belongs; and step S15, displaying the paging data corresponding to the target page number on the current page of the paging container. Alternatively, the processor 502 implements the functions of the modules/units in the data presentation apparatus embodiments when executing the computer program, such as the configuration module 301, the generation module 302, the monitoring module 303, the determination module 304, and the presentation module 305 shown in fig. 3.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the data presentation device. For example, the computer program may be divided into a configuration module 301, a generation module 302, a monitoring module 303, a determination module 304, and a presentation module 305, and the specific functions of each module are as follows: the configuration module 301 is configured to perform page number division on data to be displayed according to the paging configuration information of the paging container, so as to obtain paging data of each page; a generating module 302, configured to generate a scroll bar in the paging container, where each page sequentially has a corresponding continuous scroll bar area on the scroll bar according to a page number order; the monitoring module 303 is configured to monitor real-time position information of the slider of the scroll bar on the scroll bar; a determining module 304, configured to determine a target page number corresponding to a scroll bar region to which the real-time position information belongs; a displaying module 305, configured to display the paging data corresponding to the target page number on the current page of the paging container. The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that the schematic diagram 5 is merely an example of a computer device and is not intended to limit the computer device and may include more or fewer components than those shown, or some components may be combined, or different components, e.g., the computer device may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for presenting data, the method comprising:
performing page number division on data to be displayed according to the paging configuration information of the paging container to obtain paging data of each page, and determining the total paging page number of the data to be displayed;
generating a scroll bar in the paging container, wherein scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page order of the pages, and the generating of the scroll bar in the paging container comprises: according to the total page number of the pagination obtained after the page number division, respectively determining the initial position information and the end position information of a corresponding scroll bar area of the scroll bar slider on the scroll bar when the pagination container shows each pagination;
monitoring real-time position information of a scroll bar slider on the scroll bar;
judging a target page number corresponding to a scroll bar area to which the real-time position information belongs;
and displaying the paging data corresponding to the target page number on the current page of the paging container.
2. The method of claim 1, wherein generating a scrollbar within the paginated container further comprises:
and binding the paging container with a mouse wheel event, and/or binding the paging container with a mouse wheel release event, and/or binding the scroll bar slider with a mouse dragging release event, and/or binding the scroll bar with a mouse clicking event.
3. The method of claim 1, wherein the determining the target page number corresponding to the scroll bar region to which the real-time position information belongs comprises:
acquiring initial position information of the scroll bar slider on the scroll bar;
if the real-time position information is larger than the initial position information and the real-time position information is larger than the end position information of a scroll bar area corresponding to the current paging on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the next paging of the current paging;
if the real-time position information is smaller than the initial position information and the real-time position information is smaller than the initial position information of a scroll bar area corresponding to the current page on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the previous page of the current page;
otherwise, the target page number corresponding to the scroll bar area to which the real-time position information belongs is the current page.
4. The method according to any one of claims 1 to 3, wherein the exposing the paging data corresponding to the target page number to the current page of the paging container comprises:
and displaying the paging data corresponding to the target page number on the current page of the paging container according to a preset special effect mode.
5. A data presentation device, the device comprising:
the configuration module is used for dividing the page number of the data to be displayed according to the paging configuration information of the paging container to obtain paging data of each page and determining the total paging page number of the data to be displayed;
a generating module, configured to generate a scroll bar in the paging container, where scroll bar areas corresponding to the pages are sequentially distributed on the scroll bar according to the page order of the pages, and the generating of the scroll bar in the paging container includes: according to the total page number of the pagination obtained after the page number division, respectively determining the initial position information and the end position information of a corresponding scroll bar area of the scroll bar slider on the scroll bar when the pagination container shows each pagination;
the monitoring module is used for monitoring real-time position information of the scroll bar sliding block on the scroll bar;
the judging module is used for judging a target page number corresponding to a scroll bar area to which the real-time position information belongs;
and the display module is used for displaying the paging data corresponding to the target page number on the current page of the paging container.
6. The apparatus of claim 5, wherein the determining module comprises:
the acquisition unit is used for acquiring initial position information of the scroll bar slider on the scroll bar;
the judging unit is used for determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the next page of the current page when the real-time position information is larger than the initial position information and the real-time position information is larger than the end position information of the scroll bar area corresponding to the current page on the scroll bar; when the real-time position information is smaller than the initial position information and the real-time position information is smaller than the initial position information of a scroll bar area corresponding to the current paging on the scroll bar, determining that a target page number corresponding to the scroll bar area to which the real-time position information belongs is the previous paging of the current paging; otherwise, determining that the target page number corresponding to the scroll bar area to which the real-time position information belongs is the current page.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-4 are implemented when the program is executed by the processor.
CN201810215261.3A 2018-03-15 2018-03-15 Data display method and device Active CN110275661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810215261.3A CN110275661B (en) 2018-03-15 2018-03-15 Data display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810215261.3A CN110275661B (en) 2018-03-15 2018-03-15 Data display method and device

Publications (2)

Publication Number Publication Date
CN110275661A CN110275661A (en) 2019-09-24
CN110275661B true CN110275661B (en) 2021-04-27

Family

ID=67958079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810215261.3A Active CN110275661B (en) 2018-03-15 2018-03-15 Data display method and device

Country Status (1)

Country Link
CN (1) CN110275661B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527178B (en) * 2020-12-16 2023-04-07 平安银行股份有限公司 Page control method, device, equipment and storage medium
CN113032073A (en) * 2021-03-25 2021-06-25 数贸科技(北京)有限公司 Page display method and device based on operation behaviors
CN113536153A (en) * 2021-06-30 2021-10-22 北京达佳互联信息技术有限公司 Interest point acquisition method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963888A (en) * 2010-09-30 2011-02-02 宇龙计算机通信科技(深圳)有限公司 Electronic terminal and method thereof for controlling page scroll bar
CN102012813A (en) * 2010-11-24 2011-04-13 康佳集团股份有限公司 Implementation method for control of slider
CN103268189A (en) * 2013-05-30 2013-08-28 广东欧珀移动通信有限公司 Method and system for realizing scroll bar on user interface of player
CN103699296A (en) * 2013-12-13 2014-04-02 乐视网信息技术(北京)股份有限公司 Intelligent terminal and episode serial number prompt method
CN106202315A (en) * 2016-06-30 2016-12-07 北京奇虎科技有限公司 The method and device that data process

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150177916A1 (en) * 2013-12-23 2015-06-25 Tencent Technology (Shenzhen) Company Limited Devices and methods for providing feedback of an application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963888A (en) * 2010-09-30 2011-02-02 宇龙计算机通信科技(深圳)有限公司 Electronic terminal and method thereof for controlling page scroll bar
CN102012813A (en) * 2010-11-24 2011-04-13 康佳集团股份有限公司 Implementation method for control of slider
CN103268189A (en) * 2013-05-30 2013-08-28 广东欧珀移动通信有限公司 Method and system for realizing scroll bar on user interface of player
CN103699296A (en) * 2013-12-13 2014-04-02 乐视网信息技术(北京)股份有限公司 Intelligent terminal and episode serial number prompt method
CN106202315A (en) * 2016-06-30 2016-12-07 北京奇虎科技有限公司 The method and device that data process

Also Published As

Publication number Publication date
CN110275661A (en) 2019-09-24

Similar Documents

Publication Publication Date Title
CN110275661B (en) Data display method and device
US20160124638A1 (en) Method for touch input and device therefore
CN109445657B (en) Document editing method and device
CN108170342B (en) Application program interface display method and device, terminal and readable storage medium
KR20130103450A (en) Progress bar
US9569004B2 (en) Swipe toolbar to switch tabs
CN107203307B (en) Icon management method and mobile terminal
JP2008033695A (en) Display content scroll method, scroll device and scroll program
CN107704157B (en) Multi-screen interface operation method and device and storage medium
US8832591B2 (en) Grid display device and grid display method in mobile terminal
CN110597612B (en) Intelligent equipment task management method and device
CN112929748B (en) Video processing method, video processing device, electronic equipment and medium
CN112114734A (en) Online document display method and device, terminal and storage medium
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
CN107678813B (en) Desktop icon theme switching method and mobile terminal
EP4268913A1 (en) Position adjustment method and apparatus for operation controls, and terminal, and storage medium
CN114116098B (en) Application icon management method and device, electronic equipment and storage medium
CN114173175A (en) Media resource playing method, device, equipment and storage medium
CN112596643A (en) Application icon management method and device
CN115119064B (en) Video processing method, device, equipment and storage medium
CN108509125B (en) Page turning method, device, terminal and computer readable storage medium
US20120304122A1 (en) Movement reduction when scrolling for item selection during direct manipulation
US20150363101A1 (en) Video scrolling shortcuts for touchscreen display
CN110971956A (en) Video frame previewing method and device
CN115002551A (en) Video playing method and device, electronic equipment and medium

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