Data paging query method and device, electronic equipment and storage medium

By using a window sliding method that queries within a small time range, the problem of reduced query efficiency in paginated queries of massive amounts of data is solved, achieving stable query performance in scenarios with uneven data distribution, thus ensuring query efficiency and user experience.

CN119202328BActive Publication Date: 2026-06-19中国邮政储蓄银行股份有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
中国邮政储蓄银行股份有限公司
Filing Date
2024-10-29
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies suffer from reduced query efficiency in paginated queries of massive amounts of data, especially when the data is unevenly distributed. The performance degradation caused by deep pagination, resource waste, and timeout issues in returning data are difficult to resolve.

Method used

A window sliding method with a small period query time range is adopted. By adjusting the query time range and index identifier, the amount of data in a single query is reduced. Time period partitioning and window shrinking techniques are used to ensure stable query performance.

Benefits of technology

In cases of uneven data distribution, this reduces the time required for a single query, improves query efficiency, avoids performance degradation caused by deep pagination, and ensures query stability and a seamless user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202328B_ABST
    Figure CN119202328B_ABST
Patent Text Reader

Abstract

This application discloses a data pagination query method, apparatus, electronic device, and storage medium. The method includes, in response to a page query request, querying the time range of a target data source within a short-cycle query when flipping through data in ascending or descending order; calculating the total number of queries based on the time range of the target data source within the short-cycle query; if the total number of queries exceeds a preset threshold, narrowing the time range of the target data source within the short-cycle query to obtain an adjusted time range of the target data source within the short-cycle query; querying based on the adjusted time range of the target data source within the short-cycle query, starting from a short-cycle data index identifier, and returning the query results; or, when flipping through data in ascending or descending order, starting the query using the short-cycle query start time of the previous page record and the short-cycle data index identifier, and returning the query results. This application achieves data pagination query on one hand, and ensures stable query performance on the other.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pagination query technology, and in particular to a data pagination query method, apparatus, electronic device, and storage medium. Background Technology

[0002] The advent of the digital age has led to the storage of massive amounts of data in databases for subsequent queries and analysis, while pagination query technology is mainly used to address the limitations of visual interfaces and meet the requirements for data query efficiency.

[0003] Specifically, data pagination query refers to the process of retrieving data from a large database, calculating the number of data entries to be displayed per page and the number of pages to be retrieved, based on the user's specified number of entries. For example, if a customer needs to retrieve n data entries from a database and requests that they be displayed as m entries per page, the customer can view a total of [n / m] pages of data, with the last page displaying only n%m entries. However, as the amount of data retrieved by the customer increases, the efficiency of retrieving data per page decreases, and the problem of deep pagination becomes significant. Summary of the Invention

[0004] This application provides a data pagination query method, apparatus, electronic device, and storage medium to enable data to slide through a window according to a sequence or time dimension, thereby achieving data pagination query.

[0005] The embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, embodiments of this application provide a data pagination query method, wherein the method includes:

[0007] In response to a page query request, when browsing in ascending order and querying the homepage data, the target data source is queried within a short period of time.

[0008] Calculate the total number of queries based on the time range of the target data source in the short-cycle query;

[0009] If the total number of queries exceeds a preset threshold, the time range of the target data source in short-cycle queries is narrowed to obtain the adjusted time range of the target data source in short-cycle queries.

[0010] Based on the adjusted target data source within the time range of the short-cycle query, the query starts from the short-cycle data index identifier and returns the query results;

[0011] Alternatively, when browsing in ascending order and querying the first page of data, use the start time of the small-cycle query of the previous page's records and the small-cycle data index identifier to start the query and return the query results.

[0012] In some embodiments, the method further includes: when scrolling through data in ascending order and querying data that is not on the first page, using the start time of the small-cycle query and the small-cycle data index identifier of the previous page record;

[0013] Based on the start time of the small-cycle query recorded on the previous page, the time span of the small cycle is determined, and the page is displayed according to the data identified by the small-cycle data index.

[0014] If the number of data entries displayed on the page according to the data index of the small cycle does not meet the preset number of queries, then the small cycle will be moved to perform the data query.

[0015] In some embodiments, the step of querying based on the adjusted target data source within the time range of a short-cycle query, starting from the short-cycle data index identifier, and returning the query results, includes:

[0016] When starting a query from the small cycle data index identifier, determine whether the preset number of query records have been retrieved in the current small cycle;

[0017] If so, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count, update the global data index identifier to the global data index identifier + preset query count, and keep the small-cycle query start time unchanged;

[0018] When starting the query from the small cycle data index identifier, determine whether the current small cycle has retrieved n1 data entries and whether n1 is less than the preset number of data entries. If so, the time range for moving the small cycle query is the first time.

[0019] When starting a query from the small period data index identifier, determine whether the current small period meets the preset query count - n1 data records;

[0020] If satisfied, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1, update the global data index identifier to the global data index identifier + preset query count, and update the small-cycle query start time to the second time;

[0021] If the conditions are not met, then retrieve all data for the current small cycle and continue to move the time range of the small cycle query.

[0022] When querying from the small period data index identifier, determine whether the current small period meets the preset query count of -n1-n2 data.

[0023] If the conditions are met, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1 - n2, update the global data index identifier to the global data index identifier + preset query count, and set the small-cycle query start time to the third time.

[0024] If the condition is not met, the cycle will continue to move until the number of queries in this query meets the preset number of queries or the end time of the cycle is greater than the end time of the global query.

[0025] In some embodiments, when navigating forward in ascending order and querying the first page of data, the query is initiated using the start time of the small-cycle query for the previous page's records and the small-cycle data index identifier, and the query results are returned, including:

[0026] When starting a query using the small-cycle data index identifier of the previous page, determine whether each small-cycle data index identifier - 1 satisfies the preset query count + the previous page request count;

[0027] If the conditions are met, the data from the current small-cycle query data index will be displayed on the page, the small-cycle data index identifier will be updated to the small-cycle data index identifier - the number of requests on the previous page, the global data index identifier will be updated to the global data index identifier - the number of requests on the previous page, and the small-cycle query start time will remain unchanged.

[0028] If not, retrieve all remaining records in the current small cycle, move the small cycle forward, calculate the total number of records in the small cycle after the move, and determine whether it meets the preset query count + number of records requested on the previous page - number of records remaining in the current small cycle;

[0029] If the conditions are met, the current small cycle index is the total number of the current small cycle minus (preset query count + previous page request count - previous small cycle query count - 1). Otherwise, all data in the current cycle is retrieved and the cycle is moved forward until the query data meets the preset query count or the small cycle query start time is less than the global query start time, at which point the query ends.

[0030] In some embodiments, the method further includes: in order to update pagination parameters,

[0031] Determine if the middle node of the previous page appears;

[0032] If the current number of queried records exceeds the number of records requested on the previous page for the first time, update the start time of the current small-cycle query to the start time of the current small-cycle, update the small-cycle data index identifier to the total number of records in the current small-cycle - (number of records requested on the previous page - number of records queried currently) + 1, and update the global data index identifier to the global data index identifier - number of records requested on the previous page.

[0033] In some embodiments, the method further includes:

[0034] In response to a page query request, when flipping through the page in reverse order and querying the homepage data, the query target data source is queried within a short period of time: from the end date to the preset time span and back to the end date.

[0035] In some embodiments, the method further includes:

[0036] In response to a page query request, when flipping through the page in reverse order and starting the query from the last page, the query target data source is queried within a short period of time: from the start date to the start date + a preset time span.

[0037] Secondly, embodiments of this application also provide a data pagination query device, wherein the device includes:

[0038] The response module is used to respond to page query requests, and when browsing in ascending order and querying the homepage data, it queries the target data source within a short period of time.

[0039] The calculation module is used to calculate the total number of queries based on the time range of the target data source in the short-period query.

[0040] The narrowing module is used to narrow the time range of the target data source in short-cycle queries when the total number of queries exceeds a preset threshold, so as to obtain the adjusted time range of the target data source in short-cycle queries.

[0041] The first query module is used to query based on the adjusted target data source within the time range of the small-cycle query, starting from the small-cycle data index identifier, and return the query results;

[0042] The second query module is used to start the query using the start time of the small-cycle query of the previous page record and the small-cycle data index identifier when flipping forward in ascending order and querying the first page data, and then return the query results.

[0043] Thirdly, embodiments of this application also provide an electronic device, including: a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the above-described method.

[0044] Fourthly, embodiments of this application also provide a computer-readable storage medium that stores one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the above-described method.

[0045] The at least one technical solution adopted in this application embodiment can achieve the following beneficial effects: In response to a page query request, when scrolling forward in ascending order and querying the homepage data, the time range of the target data source in the short-cycle query is queried. Then, based on the time range of the target data source in the short-cycle query, the total number of queries is calculated. If the total number of queries exceeds a preset threshold, the time range of the target data source in the short-cycle query is narrowed to obtain an adjusted time range of the target data source in the short-cycle query. Finally, based on the adjusted time range of the target data source in the short-cycle query, the query starts from the short-cycle data index identifier and returns the query results. Alternatively, when scrolling forward in ascending order and querying the homepage data, the query starts using the short-cycle query start time and the short-cycle data index identifier of the previous page record and returns the query results. Through the above method, in scenarios where data is unevenly distributed along the time dimension, the total amount of data in the current query cycle is reduced by using time cycle partitioning and window shrinking. This achieves the functional effect that even in scenarios with a large query time span, uneven data distribution, and a large amount of data, the query return time per page is not affected by the query depth and the query performance remains stable. Attached Figure Description

[0046] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0047] Figure 1 This is a schematic diagram of the data pagination query method in the embodiments of this application;

[0048] Figure 2 This is a schematic diagram of the forward sequence flipping in the embodiments of this application;

[0049] Figure 3 This is a schematic diagram of the forward flipping in the embodiments of this application;

[0050] Figure 4 This is a schematic diagram of the reverse order flipping in the embodiments of this application;

[0051] Figure 5 This is a schematic diagram of reverse order flipping in the embodiments of this application;

[0052] Figure 6 This is a schematic diagram illustrating the implementation process of page turning in this embodiment of the application;

[0053] Figure 7 This is a schematic diagram illustrating the implementation process of page turning forward in this embodiment of the application;

[0054] Figure 8 This is a schematic diagram of the data pagination query device in the embodiments of this application;

[0055] Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] Currently, if a customer needs to retrieve n records from the database and requests them to be displayed as m records per page, the customer can browse a total of [n / m] pages of data, with the last page displaying only n%m records. As the amount of data retrieved by the customer increases, the efficiency of retrieving data per page decreases, and the problem of deep pagination becomes significant. However, due to the special nature of databases, the implementation process of paginated data retrieval is complex. Here, we take a MySQL database as an example. This type of database uses the TOP method for data retrieval. When a user retrieves records n1 to n2 from the database, the database first retrieves the first n2 records, sorts them according to a certain field, and then extracts records n1 to n2, thus achieving the purpose of data pagination. Therefore, in most cases, the amount of data retrieved from the database is much larger than the actual amount requested by the user, and sometimes even the entire set of data that meets the conditions is retrieved for pagination, resulting in a significant waste of resources and data return timeout issues.

[0058] During their research, the inventors discovered a method and terminal for improving database deep pagination query efficiency. The method involves first reading business data from the original data table based on preset business conditions; then sequentially writing the business data into multiple sub-tables based on preset sub-table data thresholds; next, calculating the target sub-table number and data offset of the sub-table where the target data is stored based on the page number and page capacity included in the pagination query request; and finally, directly locating the sub-table where the target data is located based on the sub-table information to query the target data.

[0059] Other solutions employ deep pagination technology for massive time-series data, which uses a statistical analysis followed by querying approach. By moving the start and end intervals of each query, the query interval containing the data to be queried is precisely located, reducing the amount of data processing and improving the query speed of time-series data in time aggregation.

[0060] In other solutions, to reduce the result set of each query, a time-intensive, large-scale B / S interval pagination query method is proposed. This method stores the start and end times of each page query in a cache file to record time conditions. Based on these time conditions, the data for that page is queried from the database and returned. This achieves database query by partitioning tables and then concatenating the results by time points to obtain the final result.

[0061] For systems that require paginated queries on large amounts of data, existing technologies primarily address the reduced query efficiency caused by deep pagination by narrowing down the range of data to be queried. However, existing pagination query technologies still have the following drawbacks:

[0062] In a method and terminal for improving the efficiency of deep pagination queries in a database, the range of data is located by creating a table for the data or adding a page number field to the data record. This requires pre-setting business conditions, which makes data pagination inflexible and consumes a lot of additional storage resources.

[0063] In the deep pagination fast query technology for massive time series data, the data is searched for in the query interval by first statistically analyzing the intervals and then querying them. Each time, the search needs to start from the start or end time, which adds extra search time to the query time. The length of the search time is related to the size of the query interval. If the size of the query interval is adjusted only by the query depth, the problem of deep pagination is difficult to avoid when the data is not uniformly distributed in time series.

[0064] In a time-intensive, large-scale B / S interval pagination query method, storing the start and end times of each page query in a cache file to record time conditions consumes a lot of storage resources. Furthermore, during the initial query, it is necessary to rely on parameters such as the shortest time interval between two data points and all time points in the interval to calculate the start and end times of the next page query, which also consumes a lot of computation time. When the data is sparsely distributed in time sequence, the query performance is not significantly improved.

[0065] By using the method in this application embodiment, when the total amount of time-series data for paginated queries is large and the data distribution is uneven, the time consumed in a single query can be reduced to avoid the problem of reduced query efficiency caused by deep pagination, thereby making the system's single query performance tend to be stable.

[0066] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0067] This application provides a data pagination query method, such as... Figure 1 The diagram illustrates a data pagination query method in this embodiment of the application. The method includes at least the following steps S110 to S150:

[0068] It's important to note that when introducing paginated data queries, we'll use data source A as an example. Data source A can be considered as the data source for massive queries.

[0069] Specifically, the query time range is [beginDate, endDate], and the time span of a single query period is singleCycleDate (here, 30 days). It is understood that the time span of a single query period can be configured according to actual circumstances and is not intended to limit the scope of protection in this application's embodiments.

[0070] The time range for the short-cycle query is [startDateAn, dlineDateAn), and 10 data entries are displayed per page (this can be adjusted according to actual needs). Displaying 10 data entries per page can be configured according to actual needs and is not intended to limit the scope of protection in the embodiments of this application.

[0071] The global start and end time is divided into multiple smaller periods for parallel querying to calculate the total number of rows (totalNum), and the global data index is identified as dbQueryIndex.

[0072] The index for each small period is identified as nextQueryIndex, and the start time for each small period query is nextQueryDate.

[0073] For the current request, the global data index is indexNo. When indexNo is greater than dbQueryIndex, it can be determined that it is a page to the next page; when indexNo is less than dbQueryIndex, it can be determined that it is a page to the previous page.

[0074] It should be noted that, unless otherwise specified, the following detailed explanation is based on the example of displaying 10 data entries per page and a single query period of 30 days.

[0075] Step S110: In response to the page query request, when browsing in ascending order and querying the homepage data, query the target data source within the time range of a small-cycle query.

[0076] In response to a page query request, the first step is to query the target data source within a short-term query time range when scrolling through the page in ascending order and querying the homepage data. Specifically, when querying the homepage data, the short-term time range [startDateA1, dlineDateA1) for data source A is [beginDate, beginDate+30).

[0077] At this point, the nextQueryIndex identifier for each small period of data is initialized to 1, and the dbQueryIndex identifier for the global data is initialized to 0.

[0078] Step S120: Calculate the total number of queries based on the time range of the target data source in the short-cycle query.

[0079] Based on the time range of the target data source in the short-cycle query, calculate the total number of records in [beginDate, beginDate+30).

[0080] Step S130: If the total number of queries exceeds a preset threshold, the time range of the target data source in the short-cycle query is narrowed to obtain the adjusted time range of the target data source in the short-cycle query.

[0081] First, calculate the total number of records in the range [beginDate, beginDate+30). If the total number of records exceeds the threshold, the data distribution within that time range is considered dense. In this case, the query interval is reduced to half of the original range [beginDate, beginDate+15), until the total number of records in the small period is less than the threshold or the start and end times of the small period are the same day, meaning the data for a certain day has exceeded the threshold. This prevents dense queries from occurring.

[0082] By flexibly adjusting the size of small periods according to the data distribution, i.e., automatically shrinking the window size, the problem of deep pagination in dense data distribution scenarios is effectively avoided.

[0083] Meanwhile, under small-cycle partitioned queries, flexible forward and backward page turning is achieved through cycle movement, and the global arrangement order of the queried data is ensured. The display of the same page number is kept consistent when turning forward and backward, thus ensuring a seamless customer experience under periodic queries.

[0084] Step S140: Based on the adjusted target data source within the time range of the small-cycle query, start the query from the small-cycle data index identifier and return the query results.

[0085] After adjusting the window size, first query 10 data entries starting from nextQueryIndex. If 10 data entries can be retrieved and displayed on the page in the current small period, then update nextQueryIndex to nextQueryIndex+10 and update dbQueryIndex to dbQueryIndex+10. The start time of the small period query is still recorded as startDateA1. Note that here we take beginDate.

[0086] Step S150, or, when flipping through the data in ascending order and querying the first page, start the query using the start time of the small-cycle query of the previous page record and the small-cycle data index identifier, and return the query results.

[0087] If the query on the current page is accessing the database for the first time, no cross-period processing is performed. Instead, the start time of the small-period query from the previous page, nextQueryDate, and the small-period data index identifier, nextQueryIndex, are used.

[0088] Similarly, when flipping through the page in ascending order and querying the first page of data, it is necessary to perform the query based on the start time of the small-cycle query of the previous page record and the small-cycle data index identifier, and then return the query results.

[0089] By employing the above method and designing four dedicated pagination parameters—the start time of the small-cycle query (nextQueryDate), the identifier of the small-cycle data index (nextQueryIndex), the identifier of the global data index (dbQueryIndex), and the total number of records (totalNum)—it is possible to quickly retrieve the range of data within the next page, reducing the search time for the next page and the total amount of data queried in a single query. This avoids the deep pagination problem that easily occurs in global queries, thereby improving query efficiency. Furthermore, the aforementioned parameters—the start time of the small-cycle query (nextQueryDate), the identifier of the small-cycle data index (nextQueryIndex), the identifier of the global data index (dbQueryIndex), and the total number of records (totalNum)—are all retained in the cache each time.

[0090] In one embodiment of this application, the method further includes: when scrolling back in ascending order and querying data that is not on the first page, using the start time of the small-cycle query recorded on the previous page and the small-cycle data index identifier; determining the small-cycle time span based on the start time of the small-cycle query recorded on the previous page, and displaying the page according to the data in the small-cycle data index identifier; if the number of data entries displayed on the page according to the data in the small-cycle data index identifier does not meet the preset number of query entries, then moving the small cycle to perform data query.

[0091] like Figure 2 As shown, when querying data that is not on the first page, cross-period processing is not performed first. Instead, the start time of the small-period query of the previous page record, nextQueryDate, and the index identifier of the small-period data, nextQueryIndex, are used.

[0092] In other words, under normal circumstances, the query period is...

[0093] The time span of the smaller period is [nextQueryDate, nextQueryDate+30), where nextQueryDate+30 is greater than endDate.

[0094] Data with index [nextQueryIndex, nextQueryIndex+10) is displayed on the page.

[0095] If the current smaller timeframe has fewer than 10 data points, the same principle applies to moving the smaller timeframe for data retrieval.

[0096] In one embodiment of this application, the step of querying based on the adjusted target data source within the time range of a small-cycle query, starting from the small-cycle data index identifier, and returning the query results includes: when querying from the small-cycle data index identifier, determining whether the current small cycle has retrieved a preset number of query records; if so, updating the small-cycle data index identifier to the small-cycle data index identifier + the preset number of query records, updating the global data index identifier to the global data index identifier + the preset number of query records, and keeping the small-cycle query start time unchanged; when querying from the small-cycle data index identifier, determining whether the current small cycle has retrieved n1 data records and n1 is less than the preset number of query records, then shifting the time range of the small-cycle query to the first time; when querying from the small-cycle data index identifier, determining whether the current small cycle satisfies the preset number of query records - n1 data records; if so, updating the small-cycle data index identifier to the preset number of query records - n1 data records. The small-cycle data index identifier is set to the small-cycle data index identifier + preset query count - n1. The global data index identifier is updated to the global data index identifier + preset query count, and the small-cycle query start time is updated to the second time. If the condition is not met, all data in the current small cycle is queried and the time range of the small-cycle query is shifted. When querying from the small-cycle data index identifier, it is determined whether the current small cycle satisfies the preset query count - n1 - n2 data. If it does, the small-cycle data index identifier is updated to the small-cycle data index identifier + preset query count - n1 - n2, the global data index identifier is updated to the global data index identifier + preset query count, and the small-cycle query start time is updated to the third time. If the condition is not met, the small cycle is shifted until the current query count satisfies the preset query count or the small-cycle end time is greater than the global query end time.

[0097] like Figure 2 As shown, after adjusting the window size, first query 10 records starting from nextQueryIndex.

[0098] If the current short cycle can retrieve 10 data entries for display on the page, then update nextQueryIndex to nextQueryIndex+10 and update dbQueryIndex to dbQueryIndex+10. The start time of the short cycle query is still recorded as startDateA1 (here, beginDate is taken).

[0099] Optionally, if the current small period retrieves n1 data entries and n1 is less than 10, then the small period [startDateA2, dlineDateA2) needs to be shifted to [dlineDateA1, dlineDateA1+30). After shifting the small period, nextQueryIndex will be 1, and 10-n1 data entries will be retrieved in the current small period.

[0100] Optionally, if the current small period satisfies 10-n1 data entries, then update nextQueryIndex to nextQueryIndex+10-n1, update dbQueryIndex to dbQueryIndex+10, and update the small period query start time from startDateA1 to startDateA2.

[0101] Optionally, if the current small period does not satisfy 10-n1 data entries, then all n2 data entries of the current small period are retrieved, and the small period [startDateA3, dlineDateA3) is shifted to [dlineDateA2, dlineDateA2+30). After shifting the small period, nextQueryIndex is 1.

[0102] Optionally, if the current small period satisfies 10-n1-n2 data entries, then update nextQueryIndex to nextQueryIndex+10-n1-n2, update dbQueryIndex to dbQueryIndex+10, and update the small period query start time from startDateA2 to startDateA3. Otherwise, continue moving the small period until the current query count is 10 or the small period end time is greater than the global query end time endDate, at which point the small period movement ends.

[0103] It is understandable that the first, second, and third times mentioned above refer to startDate.

[0104] It should be noted that the preset number of queries is 30 days, which can be selected according to actual needs. The preset number of queries is 10, but this can also be configured according to actual needs; it is not specifically limited in the embodiments of this application.

[0105] In one embodiment of this application, when scrolling forward in ascending order and querying the first page data, the query is started using the start time of the small-cycle query of the previous page record and the small-cycle data index identifier, and the query results are returned. This includes: when starting the query using the small-cycle data index identifier of the previous page record, determining whether each small-cycle data index identifier - 1 satisfies the preset query count + the previous page request count; if so, displaying the data from the current small-cycle query data index, updating the small-cycle data index identifier to the small-cycle data index identifier - the previous page request count, and updating the global data index identifier to the global data index identifier - the previous page request count. The query count is set to the number of records and the start time of the small-cycle query remains unchanged. If this condition is not met, all remaining records in the current small-cycle are retrieved, the small-cycle is moved forward, and the total number of records in the small-cycle after the move is calculated. It is then determined whether the preset query count + the number of records requested on the previous page - the number of records remaining in the current small-cycle is satisfied. If satisfied, the current small-cycle index is retrieved as the total number of records in the current small-cycle - (preset query count + the number of records requested on the previous page - the number of records queried in the previous small-cycle - 1). Otherwise, all data in the current cycle is retrieved and the cycle is moved forward until the query data satisfies the preset query count or the start time of the small-cycle query is less than the start time of the global query, at which point the query ends.

[0106] like Figure 3 As shown, since paging forward requires skipping the currently displayed page, the number of queries is the number of queries requested on the current page (10) plus the number of queries requested on the previous page (lastSize). Considering the number of queries requested on the previous page, this is generally taken as 10 for non-first pages, but it may be less than 10 for the last page. When paging forward, it is equivalent to querying two pages at once, requiring the start time of the smaller cycle and the index, as well as the starting point of the next page for the current page.

[0107] First, determine if the current number of data records that Xiao Zhou expects to query, nextQueryIndex-1, satisfies 10 + lastSize records:

[0108] Optionally, if satisfied, the data index is queried from the current small cycle.

[0109] The data in [nextQueryIndex-10-lastSize, nextQueryIndex-lastSize) is displayed on the page. NextQueryIndex is updated to nextQueryIndex-lastSize, and dbQueryIndex is updated to dbQueryIndex-lastSize. The start time of the small cycle query is still nextQueryDate.

[0110] Optionally, if the condition is not met, retrieve all remaining records in the current small period (currentQry), i.e., the data index is [1, nextQueryIndex). Then, move the small period forward and calculate the total number of records in the small period after the move (singleTotalNum). Determine if the condition is met (10 + lastSize - currentQry).

[0111] Optionally, if satisfied, query the current small-cycle index.

[0112] If the query returns data of [singleTotalNum-(10+lastSize-currentQry)+1,singleTotalNum], then retrieve all data for the current period and continue moving forward through the current period until the query returns 10 records or the start time of the smaller period query, nextQueryDate, is less than the start time of the global query, beginDate.

[0113] In one embodiment of this application, the method further includes: in order to update the pagination parameters, determining whether the intermediate node of the previous page appears; if the current number of queried items is greater than the number of requested items on the previous page for the first time, updating the start time of the small cycle query to the start time of the current small cycle, updating the small cycle data index identifier to the total number of the current small cycle - (number of requested items on the previous page - number of currently queried items) + 1, and updating the global data index identifier to the global data index identifier - number of requested items on the previous page.

[0114] Preferably, in order to update the pagination parameters, it is necessary to determine whether the intermediate node of the previous page appears. That is, when the current number of queries currentQry is greater than lastSize for the first time, update nextQueryDate to the start time of the current small period, update nextQueryIndex to the total number of the current small period - (lastSize - the number of queries already performed) + 1, and update dbQueryIndex to dbQueryIndex - lastSize.

[0115] In one embodiment of this application, the method further includes: in response to a page query request, querying the target data source within a short period of time when flipping through the page in reverse order and querying the homepage data: from the end date to a preset time span and back to the end date.

[0116] like Figure 4As shown, reverse order flipping: When querying the homepage data, the small period time range of the query data source A ([startDateA1,dlineDateA1)) is initialized to [endDate-30,endDate), nextQueryIndex is initialized to 1, and dbQueryIndex is initialized to 0. The subsequent query method is the same as the aforementioned forward order flipping.

[0117] In one embodiment of this application, the method further includes: in response to a page query request, querying the target data source within a short period of time when flipping through the page in reverse order and starting to query data from the last page: from the start date to the start date + a preset time span.

[0118] like Figure 5 As shown, reverse forward scrolling: when scrolling from the last page to the front, the small period time range [startDateAn, dlineDateAn) of the query data source A is [beginDate, beginDate+30). The subsequent query method is the same as the aforementioned forward scrolling.

[0119] However, since paging forward requires retrieving 10+lastSize data entries for truncation, each query for paging forward requires flipping the data retrieved in each small cycle before splicing them together. In the final data processing, forward paging in ascending order requires flipping all the queried data first and then truncating the first 10 data entries, while forward paging in descending order requires truncating the first 10 data entries before flipping and displaying them.

[0120] like Figure 6 The diagram shown is a schematic representation of the implementation process of page turning in this embodiment of the application.

[0121] Get the next index n of the previous page, and query the n to n+10 records of the current period.

[0122] Determine if the number of entries is sufficient; otherwise, date processing (shifting one cycle forward) cannot cross the original cycle.

[0123] Check if the number of records is sufficient. If so, record the position of the last data record and update the index marker.

[0124] like Figure 7 The diagram shown is a schematic representation of the implementation process of page forwarding in this embodiment of the application.

[0125] Get the current index of the previous page, check if the number of index entries is greater than 10, and if so, find entries n-10 to n in the current period.

[0126] If not, then query the first n records of the current period. Date processing (moving forward one period) cannot cross the original period.

[0127] Find all data in the new period, determine if the number of records is sufficient, and if so, extract the last 10-n records of the new period, record their positions, and then update the index markers.

[0128] In one embodiment of this application, the first query module 840 is further used for

[0129] When scrolling through data in ascending order and querying data that is not on the first page, the start time of the small-cycle query and the index identifier of the small-cycle data recorded on the previous page are used.

[0130] Based on the start time of the small-cycle query recorded on the previous page, the time span of the small cycle is determined, and the page is displayed according to the data identified by the small-cycle data index.

[0131] If the number of data entries displayed on the page according to the data index of the small cycle does not meet the preset number of queries, then the small cycle will be moved to perform the data query.

[0132] In one embodiment of this application, the first query module 840 is further used for

[0133] When starting a query from the small cycle data index identifier, determine whether the preset number of query records have been retrieved in the current small cycle;

[0134] If so, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count, update the global data index identifier to the global data index identifier + preset query count, and keep the small-cycle query start time unchanged;

[0135] When starting the query from the small cycle data index identifier, determine whether the current small cycle has retrieved n1 data entries and whether n1 is less than the preset number of data entries. If so, the time range for moving the small cycle query is the first time.

[0136] When starting a query from the small period data index identifier, determine whether the current small period meets the preset query count - n1 data records;

[0137] If satisfied, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1, update the global data index identifier to the global data index identifier + preset query count, and update the small-cycle query start time to the second time;

[0138] If the conditions are not met, then retrieve all data for the current small cycle and continue to move the time range of the small cycle query.

[0139] When querying from the small period data index identifier, determine whether the current small period meets the preset query count of -n1-n2 data.

[0140] If the conditions are met, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1 - n2, update the global data index identifier to the global data index identifier + preset query count, and set the small-cycle query start time to the third time.

[0141] If the condition is not met, the cycle will continue to move until the number of queries in this query meets the preset number of queries or the end time of the cycle is greater than the end time of the global query.

[0142] In one embodiment of this application, the first query module 840 is further used for

[0143] When starting a query using the small-cycle data index identifier of the previous page, determine whether each small-cycle data index identifier - 1 satisfies the preset query count + the previous page request count;

[0144] If the conditions are met, the data from the current small-cycle query data index will be displayed on the page, the small-cycle data index identifier will be updated to the small-cycle data index identifier - the number of requests on the previous page, the global data index identifier will be updated to the global data index identifier - the number of requests on the previous page, and the small-cycle query start time will remain unchanged.

[0145] If not, retrieve all remaining records in the current small cycle, move the small cycle forward, calculate the total number of records in the small cycle after the move, and determine whether it meets the preset query count + number of records requested on the previous page - number of records remaining in the current small cycle;

[0146] If the condition is met, the current small cycle index is the total number of the current small cycle minus (preset query count + previous page request count - previous small cycle query count - 1). Otherwise, all data in the current cycle is retrieved and the cycle is moved forward until the query data meets the preset query count or the small cycle query start time is less than the global query start time, at which point the query ends.

[0147] In one embodiment of this application, a pagination parameter update module is also included, for...

[0148] Determine if the middle node of the previous page appears;

[0149] If the current number of queried records exceeds the number of records requested on the previous page for the first time, update the start time of the current small-cycle query to the start time of the current small-cycle, update the small-cycle data index identifier to the total number of records in the current small-cycle - (number of records requested on the previous page - number of records queried currently) + 1, and update the global data index identifier to the global data index identifier - number of records requested on the previous page.

[0150] In one embodiment of this application, a sequence-flipping module is also included, for use in order to flip back the order.

[0151] In response to a page query request, when flipping through the page in reverse order and querying the homepage data, the query target data source is queried within a short period of time: from the end date to the preset time span and back to the end date.

[0152] In one embodiment of this application, it further includes reverse order flipping, for...

[0153] In response to a page query request, when flipping through the page in reverse order and starting the query from the last page, the query target data source is queried within a short period of time: from the start date to the start date + a preset time span.

[0154] This application embodiment also provides a data pagination query device 800, such as... Figure 8 The diagram shows a schematic representation of a data pagination query device in an embodiment of this application. The data pagination query device 800 includes at least: a response module 810, a calculation module 820, a zoom-out module 830, a first query module 840, and a second query module 850, wherein:

[0155] In one embodiment of this application, the acquisition module 810 is specifically used to: in response to a page query request, query the target data source within a short period of time when browsing in ascending order and querying the homepage data.

[0156] In response to a page query request, the first step is to query the target data source within a short-term query time range when scrolling through the page in ascending order and querying the homepage data. Specifically, when querying the homepage data, the short-term time range [startDateA1, dlineDateA1) for data source A is [beginDate, beginDate+30).

[0157] At this point, the nextQueryIndex identifier for each small period of data is initialized to 1, and the dbQueryIndex identifier for the global data is initialized to 0.

[0158] In one embodiment of this application, the acquisition module 820 is specifically used to: calculate the total number of queries based on the time range of the target data source in a short-cycle query.

[0159] Based on the time range of the target data source in the short-cycle query, calculate the total number of records in [beginDate, beginDate+30).

[0160] In one embodiment of this application, the acquisition module 830 is specifically used to: when the total number of queries exceeds a preset threshold, reduce the time range of the target data source in the short-cycle query to obtain the adjusted time range of the target data source in the short-cycle query.

[0161] First, calculate the total number of records in the range [beginDate, beginDate+30). If the total number of records exceeds the threshold, the data distribution within that time range is considered dense. In this case, the query interval is reduced to half of the original range [beginDate, beginDate+15), until the total number of records in the small period is less than the threshold or the start and end times of the small period are the same day, meaning the data for a certain day has exceeded the threshold. This prevents dense queries from occurring.

[0162] By flexibly adjusting the size of small periods according to the data distribution, i.e., automatically shrinking the window size, the problem of deep pagination in dense data distribution scenarios is effectively avoided.

[0163] Meanwhile, under small-cycle partitioned queries, flexible forward and backward page turning is achieved through cycle movement, and the global arrangement order of the queried data is ensured. The display of the same page number is kept consistent when turning forward and backward, thus ensuring a seamless customer experience under periodic queries.

[0164] In one embodiment of this application, the acquisition module 840 is specifically used to: query from the small-cycle data index identifier based on the adjusted target data source within the time range of the small-cycle query, and return the query results.

[0165] After adjusting the window size, first query 10 data entries starting from nextQueryIndex. If 10 data entries can be retrieved and displayed on the page in the current small period, then update nextQueryIndex to nextQueryIndex+10 and update dbQueryIndex to dbQueryIndex+10. The start time of the small period query is still recorded as startDateA1. Note that here we take beginDate.

[0166] In one embodiment of this application, the acquisition module 850 is specifically used to: when flipping through the data in ascending order and querying the first page data, start the query using the small-cycle query start time of the previous page record and the small-cycle data index identifier, and return the query results.

[0167] If the query on the current page is accessing the database for the first time, no cross-period processing is performed. Instead, the start time of the small-period query from the previous page, nextQueryDate, and the small-period data index identifier, nextQueryIndex, are used.

[0168] Similarly, when flipping through the page in ascending order and querying the first page of data, it is necessary to perform the query based on the start time of the small-cycle query of the previous page record and the small-cycle data index identifier, and then return the query results.

[0169] It is understood that the above-described data pagination query device can implement all the steps of the data pagination query method provided in the foregoing embodiments. The relevant explanations of the data pagination query method are applicable to the data pagination query device and will not be repeated here.

[0170] Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 9 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0171] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0172] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0173] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a data paging and querying mechanism at the logical level. The processor executes the program stored in memory and specifically performs the following operations:

[0174] In response to a page query request, when browsing in ascending order and querying the homepage data, the target data source is queried within a short period of time.

[0175] Calculate the total number of queries based on the time range of the target data source in the short-cycle query;

[0176] If the total number of queries exceeds a preset threshold, the time range of the target data source in short-cycle queries is narrowed to obtain the adjusted time range of the target data source in short-cycle queries.

[0177] Based on the adjusted target data source within the time range of the short-cycle query, the query starts from the short-cycle data index identifier and returns the query results;

[0178] Alternatively, when browsing in ascending order and querying the first page of data, use the start time of the small-cycle query of the previous page's records and the small-cycle data index identifier to start the query and return the query results.

[0179] The above is as stated in this application. Figure 1 The data paging query device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0180] The electronic device can also perform Figure 1 The method for executing a data pagination query device, and the implementation of the data pagination query device in... Figure 1 The functions of the embodiments shown are not described in detail here.

[0181] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform... Figure 1 The method executed by the data pagination query device in the illustrated embodiment is specifically used to perform the following:

[0182] In response to a page query request, when browsing in ascending order and querying the homepage data, the target data source is queried within a short period of time.

[0183] Calculate the total number of queries based on the time range of the target data source in the short-cycle query;

[0184] If the total number of queries exceeds a preset threshold, the time range of the target data source in short-cycle queries is narrowed to obtain the adjusted time range of the target data source in short-cycle queries.

[0185] Based on the adjusted target data source within the time range of the short-cycle query, the query starts from the short-cycle data index identifier and returns the query results;

[0186] Alternatively, when browsing in ascending order and querying the first page of data, use the start time of the small-cycle query of the previous page's records and the small-cycle data index identifier to start the query and return the query results.

[0187] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0188] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0189] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0190] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0191] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0192] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0193] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0194] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0195] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0196] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A data pagination query method, wherein, The method includes: In response to a page query request, when browsing in ascending order and querying the homepage data, the target data source is queried within a short period of time. Calculate the total number of queries based on the time range of the target data source in the short-cycle query; If the total number of queries exceeds a preset threshold, the time range of the target data source in short-cycle queries is narrowed to obtain the adjusted time range of the target data source in short-cycle queries. Based on the adjusted target data source within the time range of the short-cycle query, the query starts from the short-cycle data index identifier and returns the query results; When browsing in ascending order and querying the first page of data, the query starts with the start time of the small-cycle query of the previous page's records and the small-cycle data index identifier, and then returns the query results. The process of querying based on the adjusted target data source within a short-cycle query time range, starting from the short-cycle data index identifier, and returning the query results includes: When starting a query from the small cycle data index identifier, determine whether the preset number of query records have been retrieved in the current small cycle; If so, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count, update the global data index identifier to the global data index identifier + preset query count, and keep the small-cycle query start time unchanged; When starting the query from the small cycle data index identifier, determine whether the current small cycle has retrieved n1 data and n1 is less than the preset number of data to be retrieved. If so, move the time range of the small cycle query to the first time. When starting a query from the small period data index identifier, determine whether the current small period meets the preset query count - n1 data records; If satisfied, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1, update the global data index identifier to the global data index identifier + preset query count, and update the small-cycle query start time to the second time; If the conditions are not met, then retrieve all data for the current small cycle and continue to move the time range of the small cycle query. When querying from the small period data index identifier, determine whether the current small period meets the preset query count of -n1-n2 data. If the conditions are met, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1 - n2, update the global data index identifier to the global data index identifier + preset query count, and set the small-cycle query start time to the third time. If the condition is not met, the cycle will continue to move until the number of queries in this query meets the preset number of queries or the end time of the cycle is greater than the end time of the global query.

2. The method as described in claim 1, wherein, The method further includes: when flipping through the page in ascending order and querying data that is not on the first page, the starting time of the small-cycle query and the index identifier of the small-cycle data recorded on the previous page are used. Based on the start time of the small-cycle query recorded on the previous page, the time span of the small cycle is determined, and the page is displayed according to the data identified by the small-cycle data index. If the number of data entries displayed on the page according to the data index of the small cycle does not meet the preset number of queries, then the small cycle will be moved to perform the data query.

3. The method as described in claim 1, wherein, When navigating in ascending order and querying the first page of data, the query begins using the start time of the previous page's short-term query and the short-term data index identifier, and the query results are returned, including: When starting a query using the small-cycle data index identifier of the previous page, determine whether each small-cycle data index identifier - 1 satisfies the preset query count + the previous page request count; If the conditions are met, the data from the current small-cycle query data index will be displayed on the page, the small-cycle data index identifier will be updated to the small-cycle data index identifier - the number of requests on the previous page, the global data index identifier will be updated to the global data index identifier - the number of requests on the previous page, and the small-cycle query start time will remain unchanged. If not, retrieve all remaining records in the current small cycle, move the small cycle forward, calculate the total number of records in the small cycle after the move, and determine whether it meets the preset query count + number of records requested on the previous page - number of records remaining in the current small cycle; If the condition is met, the current small cycle index is queried as the total number of the current small cycle - (preset query count + previous page request count - previous small cycle query count - 1). Otherwise, all data in the current cycle is retrieved and the cycle is moved forward until the query data meets the preset query count or the small cycle query start time is less than the global query start time, at which point the query ends.

4. The method as described in claim 3, wherein, The method further includes: in order to update pagination parameters, Determine if the middle node of the previous page appears; If the current number of queried records exceeds the number of records requested on the previous page for the first time, update the start time of the current small-cycle query to the start time of the current small-cycle, update the small-cycle data index identifier to the total number of records in the current small-cycle - (number of records requested on the previous page - number of records queried currently) + 1, and update the global data index identifier to the global data index identifier - number of records requested on the previous page.

5. The method as described in claim 1, wherein, The method further includes: In response to a page query request, when flipping through the page in reverse order and querying the homepage data, the query target data source is queried within a short period of time: from the end date to the preset time span and back to the end date.

6. The method of claim 1, wherein, The method further includes: In response to a page query request, when flipping through the page in reverse order and starting the query from the last page, the query target data source is queried within a short period of time: from the start date to the start date + a preset time span.

7. A data pagination query device, wherein, The device includes: The response module is used to respond to page query requests, and when browsing in ascending order and querying the homepage data, it queries the target data source within a short period of time. The calculation module is used to calculate the total number of queries based on the time range of the target data source in the short-period query. The narrowing module is used to narrow the time range of the target data source in short-cycle queries when the total number of queries exceeds a preset threshold, so as to obtain the adjusted time range of the target data source in short-cycle queries. The first query module is used to query based on the adjusted target data source within the time range of the small-cycle query, starting from the small-cycle data index identifier, and return the query results; The second query module is used to start the query using the start time of the small-cycle query of the previous page record and the small-cycle data index identifier when flipping forward in ascending order and querying the first page data, and then return the query results. The process of querying based on the adjusted target data source within a short-cycle query time range, starting from the short-cycle data index identifier, and returning the query results includes: When starting a query from the small cycle data index identifier, determine whether the preset number of query records have been retrieved in the current small cycle; If so, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count, update the global data index identifier to the global data index identifier + preset query count, and keep the small-cycle query start time unchanged; When starting the query from the small cycle data index identifier, determine whether the current small cycle has retrieved n1 data and n1 is less than the preset number of data to be retrieved. If so, move the time range of the small cycle query to the first time. When starting a query from the small period data index identifier, determine whether the current small period meets the preset query count - n1 data records; If satisfied, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1, update the global data index identifier to the global data index identifier + preset query count, and update the small-cycle query start time to the second time; If the conditions are not met, then retrieve all data for the current small cycle and continue to move the time range of the small cycle query. When querying from the small period data index identifier, determine whether the current small period meets the preset query count of -n1-n2 data. If the conditions are met, update the small-cycle data index identifier to the small-cycle data index identifier + preset query count - n1 - n2, update the global data index identifier to the global data index identifier + preset query count, and set the small-cycle query start time to the third time. If the condition is not met, the cycle will continue to move until the number of queries in this query meets the preset number of queries or the end time of the cycle is greater than the end time of the global query.

8. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the method of any one of claims 1 to 6.