CN106055612B - Data paging display method and terminal equipment - Google Patents
Data paging display method and terminal equipment Download PDFInfo
- Publication number
- CN106055612B CN106055612B CN201610356513.5A CN201610356513A CN106055612B CN 106055612 B CN106055612 B CN 106055612B CN 201610356513 A CN201610356513 A CN 201610356513A CN 106055612 B CN106055612 B CN 106055612B
- Authority
- CN
- China
- Prior art keywords
- data information
- data
- offset
- pieces
- server
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/904—Browsing; Visualisation therefor
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a data paging display method and terminal equipment, wherein the method comprises the following steps: after a lower page viewing instruction input by a user on a current page is obtained, data information with the offset from P x K to P x K + K is requested to be obtained from a data server according to the page number P of the current page and the maximum data information number K which can be displayed on the current page, when the data information with the offset from P x K to P x K + K and the same data information in the P x K pieces of data information obtained by the terminal equipment are determined, the data information with the offset from 0 to P x K + K is requested to be obtained from the data server, and the data information which is different from the obtained P x K pieces of data information in the data information with the offset from 0 to P x K + K is determined as the data information to be displayed corresponding to the next page. For avoiding the presentation of duplicate data information to the user.
Description
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a data paging display method and terminal equipment.
background
With the continuous development of information technology, data information which can be provided by a data server (such as an instant comment information server) to a user is more and more, and in order to facilitate viewing, the user typically views the data information in the data server in a paginated form in a terminal device.
The data server can store a plurality of pieces of data information, the plurality of pieces of data information are sorted according to the sequence of the generation time from near to far so as to form a data information queue, and the latest data information at the generation time can be added in the data server at any time. In the process that a user views data information through a terminal device, the number of pieces of data information that can be displayed in one page of the terminal device is usually fixed (for example, 10 pieces), when the user needs to view more data information, the user can click a button "next page" of a current page, the terminal device requests a data server to acquire data information of P × K to P × K + K in a message queue according to the page number P of the current page and the maximum number K of data information that can be actually viewed in one page, and displays the data information of P × K to P × K + K on the next page of the terminal device.
however, if new data information is added to the data server in the process of browsing the data information of the current page by the user, the data information displayed in the next page and the data information displayed in the current page include repeated data information, so that the user experience is poor.
Disclosure of Invention
The embodiment of the invention provides a data paging display method and terminal equipment, which are used for avoiding displaying repeated data information to a user.
In a first aspect, an embodiment of the present invention provides a data paging display method, which is applied to a terminal device, and the method includes:
After a lower page viewing instruction input by a user on a current page is acquired, requesting a data server to acquire data information with offset from P x K to P x K + K according to the page number P of the current page and the maximum data information number K which can be displayed on the current page, wherein P is an integer which is greater than or equal to 1, and K is an integer which is greater than or equal to 1;
when the data information with the offset from P x K to P x K + K and the data information with the offset from P x K + K acquired by the terminal equipment have the same data information, requesting the data server to acquire the data information with the offset from 0 to P x K + K;
and determining data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K as the data information to be displayed corresponding to the next page of the current page.
In a possible embodiment, the requesting, from the data server, data information with an offset from P × K to P × K + K includes:
sending a first data request message to the data server, wherein the first data request message comprises a first offset and a first data information number, the first offset is P x K, and the first data information number is K;
And receiving a first data response message sent by the data server, wherein the first data response message comprises data information with the offset from P × K to P × K + K.
In another possible embodiment, the requesting, from the data server, data information with an offset of 0 to P × K + K includes:
sending a second data request message to the data server, where the second data request message includes a second offset and a second data information number, the second offset is 0, and the second data information number is P × K + K;
And receiving a first data response message sent by the data server, wherein the first data response message comprises data information with the offset of 0-P x K + K.
In another possible implementation manner, the determining, as the data information to be displayed corresponding to the next page, data information that is different from the acquired pieces of data information, in the data information with the offset between 0 and P × K + K includes:
Respectively comparing the identification of the data information with the offset of 0 to P x K + K with the identification of the acquired P x K pieces of data information to obtain the data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K;
And determining data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K as the data information to be displayed corresponding to the next page.
in another possible implementation manner, after determining, as the data information to be displayed corresponding to the next page, data information that is different from the acquired pieces of data information, in the data information with the offset between 0 and P × K + K, the method further includes:
acquiring the offset of each piece of data information to be displayed;
And displaying the data information to be displayed in the next page according to the increasing sequence of the offset.
in a second aspect, an embodiment of the present invention provides a terminal device, including:
the data information acquisition method comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for requesting a data server to acquire data information with offset from P x K to P x K + K according to the page number P of a current page and the maximum data information number K which can be displayed by the current page after acquiring a lower page viewing instruction input by a user on the current page, P is an integer which is greater than or equal to 1, and K is an integer which is greater than or equal to 1;
A second obtaining module, configured to request the data server to obtain data information with offsets from 0 to P × K + K when it is determined that the same data information exists in the data information with offsets from P × K to P × K + K and in the P × K pieces of data information already obtained by the terminal device;
And the determining module is used for determining data information which is different from the acquired P x K pieces of data information and has an offset of 0 to P x K + K as the data information to be displayed corresponding to the next page of the current page.
In one possible implementation, the first obtaining module includes a first sending unit and a first receiving unit, wherein,
the first sending unit is configured to send a first data request message to the data server, where the first data request message includes a first offset and a first data information number, the first offset is P × K, and the first data information number is K;
The first receiving unit is configured to receive a first data response message sent by the data server, where the first data response message includes data information with an offset from P × K to P × K + K.
In another possible implementation, the second obtaining module includes a second sending unit and a second receiving unit, wherein,
The second sending unit is configured to send a second data request message to the data server, where the second data request message includes a second offset and a second data information number, the second offset is 0, and the second data information number is P × K + K;
The second receiving unit is configured to receive a first data response message sent by the data server, where the first data response message includes data information with an offset of 0 to P × K + K.
In another possible implementation manner, the determining module is specifically configured to:
Respectively comparing the identification of the data information with the offset of 0 to P x K + K with the identification of the acquired P x K pieces of data information to obtain the data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K;
and determining data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K as the data information to be displayed corresponding to the next page.
In another possible implementation manner, the terminal device further includes a third obtaining module and a display module, wherein,
the third obtaining module is configured to obtain the offset of each piece of data information to be displayed after the determining module determines, as the data information to be displayed corresponding to the next page, the data information that is different from the obtained pieces of data information P × K + K in the data information with the offset of 0 to P × K + K;
and the display module is used for displaying the data information to be displayed in the next page according to the increasing sequence of the offset.
After the terminal device obtains a lower page viewing instruction input by a user on a current page, the terminal device requests the data server to obtain data information with an offset from P × K to P × K + K, judges whether the data information with the offset from P × K to P × K + K and the P × K pieces of data information obtained by the terminal device have the same data information, if yes, the terminal device requests the data server to obtain data information with the offset from 0 to P × K + K, determines the data information, which is different from the obtained P × K pieces of data information, of the data information with the offset from 0 to P × K + K as the data information to be displayed corresponding to the next page, so that the data information to be displayed and the obtained pieces of data information do not have the same data information, repeated data information is prevented from being displayed to the user, and user experience is improved.
Drawings
in order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of the data paging display method according to the present invention;
FIG. 2 is a flowchart illustrating a data paging display method according to the present invention;
FIG. 3 is a flowchart of a method for determining information of data to be displayed according to the present invention;
fig. 4 is a first schematic structural diagram of a terminal device provided in the present invention;
Fig. 5 is a schematic structural diagram of a terminal device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
fig. 1 is a schematic view of an application scenario of a data paging display method provided by the present invention, please refer to fig. 1, which includes a data server 101 and a terminal device 102, where multiple pieces of data information are stored in the data server 101, and are arranged in order from near to far according to a generation time to form a data information queue, the terminal device 102 may be a computer, a mobile phone, and other devices, and the terminal device 102 may view the data information in the data server 101, and the number of pieces of data information displayable in one page of the terminal device 102 is usually fixed, and when a user needs to view more data information in the data server, the user may click a "next page" button in a current page to request the data server to obtain more data information and display the data information on the next page. In the application, the data information displayed in the next page and the data information displayed in the current page do not include repeated data information, and if new data information is added to the data server in the process of browsing the current page by the user, the user can view the newly added data information in the next page. The technical means shown in the present application will be described in detail below with reference to specific examples.
it should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a schematic flow chart of a data paging display method provided by the present invention, an execution subject of the method is a terminal device, please refer to fig. 2, and the method may include:
S201, after a lower page viewing instruction input by a user on a current page is obtained, requesting a data server to obtain data information with the offset from P x K to P x K + K according to the page number P of the current page and the maximum data information number K which can be displayed on the current page;
Wherein P is an integer greater than or equal to 1, and K is an integer greater than or equal to 1;
S202, when the data information with the offset from P to P + K and the same data information in the P + K pieces of data information acquired by the terminal equipment exist, requesting the data server to acquire the data information with the offset from 0 to P + K;
and S203, determining data information which is different from the acquired P x K pieces of data information and is in the offset of 0 to P x K + K as the data information to be displayed corresponding to the next page of the current page.
in the application, a plurality of data messages are stored in a data server, the data messages are arranged according to the sequence of the generation time from near to far so as to form a data message queue, each data message in the data message queue has its corresponding offset, the larger the time difference between the generation time of the data message and the current time, the larger the offset of the data message, when adding new data message in the data server, because the generation time of the newly added data information is nearest to the current time, the newly added data information is positioned in front of the data information queue, and correspondingly, the offset of the data information existing in the data information queue before is changed according to the number of the newly added data information, when X data messages are added to the data server, X is required to be added to all the offsets of the data messages existing in the data message queue.
for example, assuming that the data server includes L data messages at a first time, which are respectively denoted as data message 1-data message L, and the time difference between the generation time of data message 1-data message L and the current time is sequentially decreased, at the first time, the data message queue in the data server and the offset of each data message in the data message queue are as shown in table 1:
TABLE 1
Identification of data information | Offset amount |
Data information L | 0 |
Data information L-1 | 1 |
Data information L-2 | 2 |
…… | …… |
data information 2 | L-2 |
data information 1 | L-1 |
Assuming that 3 pieces of data information are newly added in the data server between the first time and the second time, and are respectively recorded as data information L + 1-data information L +3, and the time difference between the generation time of the data information L + 1-data information L +3 and the current time is sequentially decreased, at the second time, the data information queue in the data server and the offset of each data information in the data information queue are as shown in table 2:
TABLE 2
Identification of data information | Offset amount |
data information L +3 | 0 |
Data information L +2 | 1 |
Data information L +1 | 2 |
Data information L | 0+3=3 |
Data information L-1 | 1+3=4 |
Data information L-2 | 2+3=5 |
…… | …… |
Data information 2 | L-2+3=L+1 |
Data information 1 | L-1+3=L+2 |
In the practical application process, in the process that a user views data information in the data server through a current page of the terminal device, when the user needs to view more data information in the data server, the user inputs a next page viewing instruction in the current page, optionally, a "next page" button can be set in the current page, and the user can click the "next page" button to input the next page viewing instruction in the current page.
After the terminal device obtains a lower page view instruction input by the user on the current page, the terminal device obtains the page number P of the current page and the maximum data information number K that can be displayed on the current page, and requests the data server to obtain data information with offsets P × K to P × K + K according to P and K, for example, assuming that the page number P of the current page is 3 and the maximum data information number K that can be displayed on the current page is 10, when the terminal device obtains the lower page view instruction input by the user on the 3 rd page, the terminal device requests the data server to obtain data information with offsets P × K3 × 10 to P + K3 × 10+ 40. It should be noted that, if the number of pieces of data information existing in the data server is greater than P × K + K pieces, the terminal device may obtain K pieces of data information, and if the number of pieces of data information existing in the data server is greater than P × K and less than P × K + K, the number of pieces of data information that the terminal device may obtain is less than K.
after the terminal device obtains data information with an offset from P × K to P × K + K, the terminal device determines whether the data information with the offset from P × K to P × K + K and the P × K pieces of data information obtained by the terminal device have the same data information, where the P × K pieces of data information obtained by the terminal device are: the terminal device may determine whether the same data information exists in the data information with the offset from P × K to P × K + K and the P × K pieces of data information acquired by the terminal device according to the identifier of each data information in the data information with the offset from P × K to P × K + K and the identifier of each data information in the acquired P × K pieces of data information.
If the data information does not exist, the terminal device may determine the data information to be displayed according to the data information with the offset from P × K to P × K + K.
if the data information exists, the terminal requests the data server to acquire the data information with the offset of 0 to P × K + K, and determining data information which is different from the acquired P × K pieces of data information in the data information with the offset of 0 to P × K + K as the data information to be displayed corresponding to the next page, optionally, the terminal device may compare the identifier of the data information with the offset of 0 to P × K + K with the identifier of the acquired P × K pieces of data information, to obtain data information which is different from the acquired P X K pieces of data information in the data information with the offset of 0 to P X K + K, and determining data information which is different from the acquired P × K pieces of data information in the data information with the offset of 0 to P × K + K as the data information to be displayed corresponding to the next page.
Further, after the terminal device determines to obtain the data information to be displayed corresponding to the next page, optionally, the terminal device may obtain an offset of each data information to be displayed, and display each data information to be displayed in the next page according to the sequence in which the offsets are increased progressively, because the offset of the newly added data information in the data server is smaller, each data information to be displayed is displayed in the next page according to the sequence in which the offsets are increased progressively, the latest data information may be preferentially displayed to the user, and further, the user experience may be further improved.
In the data paging display method provided by the embodiment of the invention, after the terminal device obtains the lower page viewing instruction input by the user on the current page, the terminal equipment requests the data server to acquire data information with the offset from P × K to P × K + K, and judging whether the data information with the offset from P x K to P x K + K and the P x K pieces of data information acquired by the terminal equipment have the same data information or not, if so, the terminal device requests the data server to obtain data information with an offset of 0 to P x K + K, and determining data information which is different from the acquired P × K pieces of data information in the data information with the offset of 0 to P × K + K as the data information to be displayed corresponding to the next page, the data information to be displayed and the acquired data information do not have the same data information, so that repeated data information is prevented from being displayed for a user, and user experience is improved.
on the basis of the embodiment shown in fig. 2, optionally, the terminal device may request the data server to acquire the data information with the offset from P × K to P × K + K through the following feasible implementation manner (S201 in the embodiment shown in fig. 2), specifically, please refer to the embodiment shown in fig. 3.
fig. 3 is a flowchart of a method for acquiring data information according to the present invention, referring to fig. 3, the method may include:
S301, sending a first data request message to a data server, wherein the first data request message comprises a first offset and a first data information number, the first offset is P x K, and the first data information number is K;
S302, receiving a first data response message sent by the data server, wherein the first data response message comprises data information with the offset from P × K to P × K + K.
In the embodiment shown in fig. 3, when the terminal device needs to request the data server to acquire data information with offsets P × K to P × K + K, the terminal device first determines the first offset P × K and the first number of data information K that needs to be acquired, and sends a first data request message including the first offset P × K and the first number of data information K to the data server.
After the data server receives the first data request message, the data server first determines, according to the first data request message, whether K data messages starting from the offset P × K exist in the data message queue, if so, the data server obtains the K data messages starting from the offset P × K in the data message queue, and sends the K data messages starting from the offset P × K to the terminal device, if not, the data server obtains N (N is less than K) data messages starting from the offset P × K in the data message queue, and sends the N data messages starting from the offset P × K to the terminal device, and specifically, the data server may send, to the terminal device, a first data response message including the data messages starting from the offset P × K to P × K + K.
On the basis of any of the foregoing embodiments, optionally, the terminal device may request the data server to acquire the data information with the offset from 0 to P × K + K through the following feasible implementation manners, specifically: and sending a second data request message to the data server, wherein the second data request message comprises a second offset and a second data information number, the second offset is 0, the second data information number is P x K + K, and receiving a first data response message sent by the data server, and the first data response message comprises data information with the offset from 0 to P x K + K.
It should be noted that the process of the terminal device requesting the data server to obtain the data information with the offset from 0 to P × K + K is similar to the process of the terminal device requesting the data server to obtain the data information with the offset from P × K to P × K + K shown in the embodiment of fig. 3, and is not repeated here.
The method shown in the embodiment of fig. 2-3 is described in detail below by way of specific examples.
For example, it is assumed that a user can view data information in a data server through a terminal device, and at most 5 pieces of data information can be displayed in one page in the terminal device; further, assume that the data server includes 10 pieces of data information at 1 st, 9 st, month, and the offset and generation time of the 10 pieces of data information are shown in table 3:
TABLE 3
identification of data information | offset amount | Generating time of day |
Data information 10 | 0 | 9:00 |
Data information 9 | 1 | 8:30 |
Data information 8 | 2 | 8:00 |
…… | …… | …… |
Data information 2 | 8 | 6:10 |
Data information 1 | 9 | 6:00 |
Assuming that at 9, when a user needs to view data information in a data server through a first page in a terminal device, the terminal device sends a data request message to the data server, where the data offset included in the data request message is 0, and the number of requested data pieces is 5, and after the data server receives the data request message sent by the terminal device, the data server sends data information with an offset from 0 to 4 to the terminal device, specifically, as shown in table 4:
TABLE 4
identification of data information | offset amount | Generating time of day |
data information 10 | 0 | 9:00 |
data information 9 | 1 | 8:30 |
data information 8 | 2 | 8:00 |
Data information 7 | 3 | 7:45 |
data information 6 | 4 | 7:30 |
after the terminal device receives the data information shown in table 4, the terminal device displays the data information 10-the data information 6 in the first page in order.
Assuming that 2 pieces of data information, namely data information 11 and data information 12, are newly added to the data server in the time period from 9 o ' clock to 9 o ' clock and 10 o ' clock, correspondingly, the offset and the generation time of the 12 pieces of data information in the data server are shown in table 5:
TABLE 5
Identification of data information | Offset amount | generating time of day |
Data information 12 | 0 | 9:10 |
Data information 11 | 1 | 9:05 |
Data information 10 | 2 | 9:00 |
…… | …… | …… |
data information 2 | 10 | 6:10 |
Data information 1 | 11 | 6:00 |
Assuming that at 9 o 10 o' clock, the user finishes viewing the data information 10-data information 6 in the first page and needs to view more data information in the data server, the user may click on the "next page" button on the first page to send a first data request message to the data server, where the data offset included in the first data request message is 1 × 5 — 5, and the number of requested data pieces is 5, and after the data server receives the first data request message, the data server sends the data information with the offset from 5 to 9 to the terminal device, which is specifically shown in table 6:
TABLE 6
Identification of data information | Offset amount | generating time of day |
data information 7 | 5 | 7:45 |
Data information 6 | 6 | 7:30 |
Data information 5 | 7 | 7:00 |
Data information 4 | 8 | 6:45 |
data information 3 | 9 | 6:30 |
After the terminal device obtains 5 pieces of data information corresponding to the second page shown in table 6, the terminal device compares the 5 pieces of data information shown in table 6 with the obtained data information shown in table 4, and determines that 2 pieces of the same data information (data information 6 and data information 7) exist in the 5 pieces of data information shown in table 6 and the data information shown in table 4, the terminal device sends a second data request message to the data server, the data offset included in the second data request message is 0, the number of requested data pieces is 1 × 5+ 10, and after the data server receives the second data request message, the data server sends the data information with the offset from 0 to 1 to the terminal device, specifically, as shown in table 7:
TABLE 7
identification of data information | offset amount | generating time of day |
Data information 12 | 0 | 9:10 |
Data information 11 | 1 | 9:05 |
data information 10 | 2 | 9:00 |
Data information 9 | 1 | 8:30 |
Data information 8 | 2 | 8:00 |
data information 7 | 3 | 7:45 |
Data information 6 | 4 | 7:30 |
Data information 5 | 7 | 7:00 |
Data information 4 | 8 | 6:45 |
data information 3 | 9 | 6:30 |
After the terminal device obtains the data information shown in table 7, the terminal device obtains the data information 12-11 and the data information 5-3 which are not included in the data information shown in table 4 from the data information shown in table 7, and determines the data information to be displayed corresponding to the second page according to the data information 12-11 and the data information 5-3 shown in table 7, specifically, the data information to be displayed corresponding to the second page is shown in table 8:
TABLE 8
Identification of data information | Offset amount | generating time of day |
Data information 12 | 0 | 9:10 |
Data information 11 | 1 | 9:05 |
Data information 5 | 7 | 7:00 |
data information 4 | 8 | 6:45 |
Data information 3 | 9 | 6:30 |
after the terminal device obtains the data information shown in table 8, the data information shown in table 8 is sequentially displayed in the order of the smaller to larger data information offset.
fig. 4 is a schematic structural diagram of a terminal device provided in the present invention, referring to fig. 4, the terminal device may include:
A first obtaining module 401, configured to, after obtaining a lower page view instruction input by a user on a current page, request a data server to obtain data information with offsets P × K to P × K + K according to a page number P of the current page and a maximum data information number K that can be displayed on the current page, where P is an integer greater than or equal to 1, and K is an integer greater than or equal to 1;
a second obtaining module 402, configured to request the data server to obtain data information with offsets from 0 to P × K + K when it is determined that the same data information exists in the data information with offsets from P × K to P × K + K and in the P × K pieces of data information already obtained by the terminal device;
the determining module 403 is configured to determine, as the data information to be displayed corresponding to the next page, data information that is different from the acquired P × K pieces of data information in the data information with the offset between 0 and P × K + K.
The terminal device provided by the embodiment of the present invention may execute the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects thereof are similar, and are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal device according to a second embodiment of the present invention, and referring to fig. 5, a first obtaining module 401 includes a first sending unit 4011 and a first receiving unit 4012, wherein,
The first sending unit 4011 is configured to send a first data request message to the data server, where the first data request message includes a first offset and a first data information number, the first offset is P × K, and the first data information number is K;
the first receiving unit 4012 is configured to receive a first data response message sent by the data server, where the first data response message includes data information with an offset from P × K to P × K + K.
Optionally, the second obtaining module 402 includes a second sending unit 4021 and a second receiving unit 4022, wherein,
The second sending unit 4021 is configured to send a second data request message to the data server, where the second data request message includes a second offset and a second data information number, the second offset is 0, and the second data information number is P × K + K;
the second receiving unit 4022 is configured to receive a first data response message sent by the data server, where the first data response message includes data information with an offset of 0 to P × K + K.
In an actual application process, the determining module 403 may specifically be configured to:
Respectively comparing the marks of the data information with the offset of 0 to P x K + K with the marks of the acquired P x K pieces of data information to obtain the data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K;
And determining data information which is different from the acquired P × K pieces of data information in the data information with the offset of 0 to P × K + K as the data information to be displayed corresponding to the next page.
further, the terminal device further comprises a third obtaining module 404 and a display module 405, wherein,
The third obtaining module 404 is configured to, after the determining module 403 determines, as the data information to be displayed corresponding to the next page, the data information that is different from the obtained P × K pieces of data information and is in the data information with the offset between 0 and P × K + K, obtain the offset of each piece of data information to be displayed;
The display module 405 is configured to display the data information to be displayed in the next page according to the ascending order of the offset.
The terminal device provided by the embodiment of the present invention may execute the technical solutions shown in the above method embodiments, and the implementation principles and beneficial effects thereof are similar, and are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. a data paging display method is applied to terminal equipment and comprises the following steps:
after a lower page viewing instruction input by a user on a current page is acquired, requesting a data server to acquire data information with offset from P x K to P x K + K according to the page number P of the current page and the maximum data information number K which can be displayed on the current page, wherein P is an integer which is greater than or equal to 1, and K is an integer which is greater than or equal to 1;
When the data information with the offset from P x K to P x K + K and the data information with the offset from P x K + K acquired by the terminal equipment have the same data information, requesting the data server to acquire the data information with the offset from 0 to P x K + K;
determining data information which is different from the acquired P x K pieces of data information and is in the offset of 0 to P x K + K as data information to be displayed corresponding to the next page of the current page, wherein the data information to be displayed comprises newly added data information of the data server between a first time and a second time, the first time is the time when the terminal equipment requests to acquire the data information in the current page, and the second time is the time when the terminal equipment requests to acquire the data information with the offset of P x K to P x K + K from the data server.
2. The method of claim 1, wherein the requesting data information with an offset P x K to P x K + K from the data server comprises:
sending a first data request message to the data server, wherein the first data request message comprises a first offset and a first data information number, the first offset is P x K, and the first data information number is K;
And receiving a first data response message sent by the data server, wherein the first data response message comprises data information with the offset from P × K to P × K + K.
3. the method according to claim 1 or 2, wherein the requesting the data server for obtaining the data information with an offset of 0 to P × K + K comprises:
Sending a second data request message to the data server, wherein the second data request message comprises a second offset and a second data information number, the second offset is 0, and the second data information number is P × K + K;
And receiving a first data response message sent by the data server, wherein the first data response message comprises data information with the offset of 0-P x K + K.
4. The method according to claim 1 or 2, wherein the determining, as the data information to be displayed corresponding to the next page of the current page, data information that is different from the acquired pieces of data information, from among the pieces of data information with the offset of 0 to P × K + K, includes:
Respectively comparing the identification of the data information with the offset of 0 to P x K + K with the identification of the acquired P x K pieces of data information to obtain the data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K;
And determining data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K as the data information to be displayed corresponding to the next page.
5. the method according to claim 4, wherein after determining, as the data information to be displayed corresponding to the next page, data information that is different from the acquired pieces of data information among the pieces of data information with the offset amount of 0 to P × K + K, the method further comprises:
Acquiring the offset of each piece of data information to be displayed;
and displaying the data information to be displayed in the next page according to the increasing sequence of the offset.
6. A terminal device, comprising:
the data information acquisition method comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for requesting a data server to acquire data information with offset from P x K to P x K + K according to the page number P of a current page and the maximum data information number K which can be displayed by the current page after acquiring a lower page viewing instruction input by a user on the current page, P is an integer which is greater than or equal to 1, and K is an integer which is greater than or equal to 1;
a second obtaining module, configured to request the data server to obtain data information with offsets from 0 to P × K + K when it is determined that the same data information exists in the data information with offsets from P × K to P × K + K and in the P × K pieces of data information already obtained by the terminal device;
The determining module is configured to determine, as to-be-displayed data information corresponding to a next page of the current page, data information that is different from the acquired P × K pieces of data information and is in an offset range from 0 to P × K + K, where the to-be-displayed data information includes data information that is newly added by the data server between a first time and a second time, the first time is a time when the terminal device requests to acquire the data information in the current page, and the second time is a time when the terminal device requests the data server to acquire the data information in the offset range from P × K to P × K + K.
7. the terminal device of claim 6, wherein the first obtaining module comprises a first sending unit and a first receiving unit, wherein,
The first sending unit is configured to send a first data request message to the data server, where the first data request message includes a first offset and a first data information number, the first offset is P × K, and the first data information number is K;
The first receiving unit is configured to receive a first data response message sent by the data server, where the first data response message includes data information with an offset from P × K to P × K + K.
8. the terminal device according to claim 6 or 7, wherein the second obtaining module comprises a second sending unit and a second receiving unit, wherein,
The second sending unit is configured to send a second data request message to the data server, where the second data request message includes a second offset and a second data information number, the second offset is 0, and the second data information number is P × K + K;
The second receiving unit is configured to receive a first data response message sent by the data server, where the first data response message includes data information with an offset of 0 to P × K + K.
9. the terminal device according to claim 6 or 7, wherein the determining module is specifically configured to:
Respectively comparing the identification of the data information with the offset of 0 to P x K + K with the identification of the acquired P x K pieces of data information to obtain the data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K;
and determining data information which is different from the acquired P x K pieces of data information in the data information with the offset of 0 to P x K + K as the data information to be displayed corresponding to the next page.
10. the terminal device of claim 9, further comprising a third acquisition module and a display module, wherein,
The third obtaining module is configured to obtain the offset of each piece of data information to be displayed after the determining module determines, as the data information to be displayed corresponding to the next page, the data information that is different from the obtained pieces of data information P × K + K in the data information with the offset of 0 to P × K + K;
And the display module is used for displaying the data information to be displayed in the next page according to the increasing sequence of the offset.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610356513.5A CN106055612B (en) | 2016-05-25 | 2016-05-25 | Data paging display method and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610356513.5A CN106055612B (en) | 2016-05-25 | 2016-05-25 | Data paging display method and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106055612A CN106055612A (en) | 2016-10-26 |
CN106055612B true CN106055612B (en) | 2019-12-17 |
Family
ID=57174520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610356513.5A Active CN106055612B (en) | 2016-05-25 | 2016-05-25 | Data paging display method and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055612B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107016045A (en) * | 2017-02-17 | 2017-08-04 | 阿里巴巴集团控股有限公司 | A kind of method and device of paged data inquiry |
CN108509529A (en) * | 2018-03-14 | 2018-09-07 | 武汉斗鱼网络科技有限公司 | Data page sort method, device and readable storage medium storing program for executing |
CN108965389B (en) * | 2018-06-13 | 2021-07-06 | 南京尚网网络科技有限公司 | Method for displaying information |
CN110673902B (en) * | 2018-07-02 | 2021-11-02 | 腾讯科技(深圳)有限公司 | Page display method and device and storage medium |
CN110943970B (en) * | 2019-10-09 | 2022-12-20 | 视联动力信息技术股份有限公司 | Data request method and device |
CN112559890B (en) * | 2020-12-25 | 2024-02-09 | 深圳市富途网络科技有限公司 | Display method, server, electronic device and storage medium |
CN115098215B (en) * | 2022-07-19 | 2024-06-04 | 重庆紫光华山智安科技有限公司 | Multi-service-based data paging method, system, electronic equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7683943B2 (en) * | 2005-12-22 | 2010-03-23 | Canon Kabushiki Kaisha | Image recording apparatus, image reproducing apparatus, method of controlling image recording apparatus, method of controlling image reproducing apparatus, computer program, and recording medium |
CN103778135B (en) * | 2012-10-18 | 2018-01-02 | 厦门雅迅网络股份有限公司 | A kind of distribution storage of real time data and paging query method |
CN103942196B (en) * | 2013-01-17 | 2019-09-13 | 腾讯科技(深圳)有限公司 | Method, equipment and the system of data query |
CN103744847A (en) * | 2013-09-25 | 2014-04-23 | 宁波大学 | Data download method applicable to SQL Server database |
-
2016
- 2016-05-25 CN CN201610356513.5A patent/CN106055612B/en active Active
Non-Patent Citations (1)
Title |
---|
MongoDB 中数据分页优化技术;王振辉,王振铎;《计算机系统应用》;20150615;第24卷(第6期);第243-246页 * |
Also Published As
Publication number | Publication date |
---|---|
CN106055612A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055612B (en) | Data paging display method and terminal equipment | |
RU2704495C1 (en) | Method and device for sending an electronic book | |
US11038975B2 (en) | Information pushing method and device | |
CN110362266B (en) | Prompt information display method, system, electronic equipment and computer readable medium | |
WO2016173436A1 (en) | Information presentation method and apparatus | |
CN104038908B (en) | Push message sending method and device | |
CN110213614B (en) | Method and device for extracting key frame from video file | |
CN110505141B (en) | Instant messaging message processing method and device, readable medium and electronic equipment | |
US20200333930A1 (en) | Information processing method, terminal, server, and computer storage medium | |
US20110294479A1 (en) | System and method for assigning a senderid | |
US10860280B2 (en) | Display method and device | |
CN111597467A (en) | Display method and device and electronic equipment | |
EP3287973A1 (en) | Method and device for information processing | |
CN113138827A (en) | Method, device, electronic equipment and medium for displaying data | |
CN111597107B (en) | Information output method and device and electronic equipment | |
CN108764866B (en) | Method and equipment for allocating resources and drawing resources | |
CN106789277B (en) | User behavior determination method and device based on state machine model | |
CN108966034B (en) | Virtual article display method, device and storage medium | |
CN114417214A (en) | Information display method and device and electronic equipment | |
CN107566364A (en) | A kind of information-pushing method and device | |
CN108494982B (en) | Method and apparatus for generating information | |
CN106844502B (en) | Data consistency processing method and equipment | |
CN104936046A (en) | Method and device for generating abstract picture of video collection | |
CN110716699A (en) | Method and apparatus for writing data | |
CN107666497B (en) | Data access method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |