Data jump display method, system, terminal and readable storage medium
Through the page cursor collection and page number sliding window technology, the starting position of the data query results is directly positioned, and the problem of low page display efficiency when the data volume is large in the existing technology is solved, and fast query and efficient display are achieved.
Patent Information
- Application Number
- CN202411354122.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In the prior art, when the data volume is large, the page display query takes a long time and is inefficient, and it is necessary to traverse a large amount of data to find the starting data content of the query result page.
By determining the page page number and data identification of the data query results, the page cursor collection is obtained, and the page cursor corresponding to the page number is obtained from the page cursor collection based on the page number selected by the user, and the target data content is directly obtained from the data query results. .
It greatly reduces the retrieval time of data content, improves the query efficiency of pagination display, and avoids the problem of traversing a large amount of data to find the target page.
Smart Images

Figure CN118885680B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing, and in particular, relates to a data jump display method, system, terminal and readable storage medium. Background Art
[0002] Paging is an important data processing and display technology that improves data manageability by dividing a large amount of data into multiple smaller subsets, namely "pages". Paging display is usually used in query scenarios. According to the query conditions set by the user, the data content that meets the query conditions is queried and paging display is realized. After the query, the prior art obtains and displays the paging data content by traversing the database. However, when the amount of data is large, the database needs to traverse a lot of data to find the starting data content of the query result page. This method is time-consuming and inefficient. Summary of the invention
[0003] The embodiments of the present application provide a data jump display method, system, terminal and readable storage medium to solve the problem that paging display query is time-consuming and inefficient when the data volume is large.
[0004] A first aspect of an embodiment of the present application provides a data jump display method, including:
[0005] Based on the number of data items in the data query results that meet the query conditions, determine the page numbers for paging the data query results and the data identifiers of the data contents to be paginated under each page number;
[0006] Acquire a page cursor set, the page cursor set including a page cursor corresponding to each page number in the page number set determined from the data identifier, the page number set being a set that matches the window size of the page number sliding window;
[0007] Based on the jump page number selected by the user from the page number sliding window, determining a jump page cursor corresponding to the jump page number from the page cursor set;
[0008] Based on the jump page cursor, target data content is obtained from the data query result and displayed.
[0009] A second aspect of an embodiment of the present application provides a data jump display system, including:
[0010] A first determination module is used to determine the page numbers of the data query results to be displayed in pages and the data identifiers of the data contents to be displayed in pages under each page number based on the number of data items in the data query results that meet the query conditions;
[0011] An acquisition module, used for acquiring a page cursor set, wherein the page cursor set includes a page cursor corresponding to each page number in a page number set determined from the data identifier, and the page number set is a set that matches the window size of the page number sliding window;
[0012] A second determining module is used to determine a jump page cursor corresponding to the jump page number from the page cursor set based on the jump page number selected by the user from the page number sliding window;
[0013] The display module is used to obtain and display target data content from the data query result based on the jump page cursor.
[0014] A third aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0015] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] A fifth aspect of the present application provides a computer program product, which, when executed on a terminal, enables the terminal to execute the steps of the method described in the first aspect.
[0017] As can be seen from the above, the present application first determines the page numbers of the data query results to be displayed in pages and the data identifiers of the data content displayed in pages under each page number based on the number of data items in the data query results that meet the query conditions. Subsequently, a page cursor set is obtained, which contains the page cursors corresponding to each page number in the page number set determined from the data identifier. The page number set is a set that matches the window size of the page number sliding window. The page cursor set effectively presets the page navigation information that the user may access based on the page number sliding window. The page number sliding window provides the user with selectable page numbers. When the user chooses to jump to a certain page number through the page number sliding window, a jump page cursor that matches the selected jump page number is found from the page cursor set. With the navigation information of the jump page cursor, the target data content required by the user is directly obtained from the data query results and displayed. By directly locating the starting position of the target data with the page cursor, the problem of traversing a large amount of data to find the target page in the traditional paging display method is avoided, which greatly reduces the retrieval time of data content, reduces the query time of paging display, and improves the efficiency of paging display. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 It is a flow chart of a data jump display method provided by an embodiment of the present application;
[0020] Figure 2 This is a schematic diagram of the sliding direction of a page number sliding window provided in an embodiment of the present application;
[0021] Figure 3 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 1 ;
[0022] Figure 4 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 2 ;
[0023] Figure 5 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 3 ;
[0024] Figure 6 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 4 ;
[0025] Figure 7 This is a display schematic diagram of a page navigation area provided in an embodiment of the present application;
[0026] Figure 8 This is a page cursor cache representation provided by an embodiment of the present application;
[0027] Fig. 9 It is a schematic diagram of cache content comparison of a page cursor cache interface provided in an embodiment of the present application;
[0028] Fig.10 It is a structural diagram of a data jump display system provided in an embodiment of the present application;
[0029] Fig.11 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0031] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0032] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0033] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0034] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0035] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).
[0036] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.
[0037] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.
[0038] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.
[0039] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0040] The data jump display method provided in the present application can reduce the query time of paged display and improve the efficiency of paged display. The effect is particularly prominent when the amount of paged data is large, and it can solve the deep paging problem of paged display of large amounts of data.
[0041] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0042] See also Figure 1 , Figure 1 1 is a flow chart of a data jump display method provided by an embodiment of the present application. Figure 1 As shown, a data jump display method comprises the following steps:
[0043] Step 101 , based on the number of data items in the data query results that meet the query conditions, determine the page numbers for paging the data query results and the data identifiers of the data contents for paging under each page number.
[0044] According to the query conditions input by the user, data contents meeting the query conditions are searched to obtain a data set including the data contents, namely, a data query result, and the number of data items in the data query result is counted.
[0045] In some embodiments, the data query result, ie, the data content, is stored in a database.
[0046] Divide the number of data items by the number of data items that can be displayed on each page and round up to the integer, and then calculate the total number of pages when paging is displayed, and get the page number accordingly. The page number starts from 1 and stops when the page number reaches the total number of pages. The number of data items is a user-set value or a system default value.
[0047] For example, the data query result obtained based on the query conditions contains 20012 data items. When displayed in pages, the number of data items displayed is 20, that is, a maximum of 20 data items are displayed per page. After division and rounding up, the total number of pages is calculated to be 1001, and the page numbers are 1 to 1001.
[0048] Assign a data identifier, such as a primary key ID, to each piece of data content, so that the corresponding data content can be quickly located or accessed through the data identifier. The data identifiers of the data content included in the data query result form a monotonic sequence, which is monotonically increasing or monotonically decreasing in sequence.
[0049] This application retains all data content found under the query conditions for users to review, ensuring the integrity of the data content.
[0050] In some embodiments, when the query conditions change, the page number sliding window and the following cache, i.e., the page cursor set, need to be reset.
[0051] Step 102, obtaining a page cursor set, wherein the page cursor set includes a page cursor corresponding to each page number in a page number set determined from the data identifier, and the page number set is a set that matches the window size of the page number sliding window.
[0052] After the user enters the query conditions for the first query and each time the page number is selected, a page cursor set is obtained to assist in obtaining the data content of the corresponding page.
[0053] A page cursor, also known as a page cursor (PageCursor), refers to a data structure used to uniquely identify and locate a page when displaying data in pages.
[0054] In some embodiments, the data identifier of the first data content in the page corresponding to each of the page numbers is determined as the page cursor of the page number; or, the data identifier of the last data content in the page corresponding to each of the page numbers is determined as the page cursor of the page number; or, the data identifier of the last data content in the page corresponding to the previous adjacent page number of each of the page numbers is determined as the page cursor of the page number.
[0055] In some embodiments, the data identifier of the first data content in the page corresponding to each of the page numbers is the primary key id, or, the data identifier of the last data content in the page corresponding to each of the page numbers is the primary key id, or, the data identifier of the last data content in the page corresponding to the previous adjacent page number of each of the page numbers is the primary key id, and accordingly, the page cursor is also the primary key id.
[0056] In some embodiments, the data identifier of the last piece of data content in the page corresponding to each of the page numbers is determined as the page cursor of the page number. It should be noted that the number of data content items in the last page corresponding to the last page number is less than or equal to the number of data displays. Therefore, the last page cursor of the last page number and the page cursors of the page numbers before it do not completely constitute a monotonic series. For example, the total number of pages is n, the number of data displayed is 10, the last page corresponding to the last page number n corresponds to a data content, n and a are positive integers, a≤10, the page cursors corresponding to the pages (n-5), (n-4), (n-3), (n-2) and (n-1) are 1023430, 1023440, 1023450, 1023460 and 1023470 respectively, and accordingly, the last page cursor corresponding to the last page number n is (1023470+a), and the last page cursor is 1023471, 1023472, 1023473, 1023474, 1023475, 1023476, 1023477, 1023478, 1023479 or 1023480.
[0057] In some embodiments, the data identifier of the last data content in the page corresponding to the previous adjacent page number of each of the page numbers is determined as the page cursor of the page number. It should be noted that there is no previous adjacent page number for the home page number. At this time, it is necessary to determine the page cursor corresponding to the home page number based on the data identifier of the first data content in the home page corresponding to the home page number and the data identifier of the second data content. The difference between the home page cursor corresponding to the home page number and the data identifier of the first data content in the home page is equal to the difference between the data identifier of the first data in the home page and the data identifier of the second data content. The home page cursor, the data identifier of the first data content in the home page, and the data identifier of the second data content in the home page constitute an increasing sequence or a decreasing sequence. For example, the data identifier of the first data in the home page is "10010231", and the data identifier of the second data is "10010232", then the home page cursor of the home page is determined to be "10010230" according to the above content.
[0058] The page cursor set stores page cursors corresponding to page numbers. The page cursor set obtained for the first time only contains page cursors corresponding to some page numbers. As the page number range requested by the user expands, the page cursors stored in the page cursor set are updated accordingly, and the number of page cursors increases accordingly to cover a larger page number range and meet the user's query needs.
[0059] The page number sliding window is a page number navigation window containing multiple selectable page numbers, and the page numbers in the window can be updated by sliding. The window size (WindowSize) of the page number sliding window is the capacity of the window, which refers to the number of page numbers that can be accommodated in the window. It is a user-set value or a system default value. For example, if it is set to 10, it means that the page number sliding window can accommodate up to 10 page numbers.
[0060] Data jump includes page number jump in the page number window. The page number in the page number sliding window changes with the user's page number selection operation, realizing positive or negative sliding of the page number, which can also be called right sliding or left sliding. Among them, the definition of page number enlargement is positive direction, positive sliding means that the page number at the same position in the window becomes larger than the original page number, and negative sliding means that the page number at the same position in the window becomes smaller than the original page number.
[0061] like Figure 2 As shown, Figure 2 This is a schematic diagram of the sliding direction of a page number sliding window provided in an embodiment of the present application. Figure 2 The page number sliding window contains multiple selectable page numbers. The shadow cursor in the figure is the page number indicator. The page number indicated by the cursor is the page number selected by the user, which is the jump page number in this article. The conditions under which the page number sliding is triggered, whether the page number slides forward or backward, and how many page numbers slide under different conditions depend on actual needs and will not be explained here.
[0062] It should be noted that the update and change of page numbers, i.e. sliding, is implemented in the order of page number size. In the same window, there will be no situation where the updated page numbers are discontinuous.
[0063] The user can jump to adjacent pages or non-adjacent pages based on the page number sliding window, that is, any page number jump can be achieved within the page number sliding window. At the same time, the page number displayed in the page number sliding window is updated with the user's page number selection operation, and the flexibility of page number selection is greatly improved.
[0064] After the user inputs the query condition for the first query, the page number set initially displayed in the window is determined according to the window size of the page number sliding window, and the page cursor corresponding to each page number is determined from the data identifier according to the initially displayed page number set, thereby obtaining a page cursor set. At this time, the page cursor set only includes the page cursor corresponding to the page number initially displayed in the page number sliding window, and then, more page cursors are determined according to the selected page number and updated to the page cursor set.
[0065] If the total number of pages is n, the page numbers are 1 to n, where n is a positive integer.
[0066] In some embodiments, the initially displayed page number set includes the home page number. Accordingly, the page number sliding window provides the user with the home page number and a group of subsequent consecutive page numbers for selection at the initial stage of paging display. Figure 3 As shown, Figure 3 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 1 . Figure 3 The page number sliding window in is constructed based on the first page number.
[0067] In some embodiments, the initially displayed page number set includes the last page number, and accordingly, the page number sliding window provides the user with the last page number and a set of consecutive page numbers before it for selection in the initial stage of paging display. Figure 4 As shown, Figure 4 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 2 . Figure 4 The page number sliding window in is constructed based on the last page number.
[0068] In some embodiments, the smallest page number in the initially displayed page number set is not the first page number, or the largest page number is not the last page number, that is, the page number sliding window is constructed starting from the middle page number. Figure 5 As shown, Figure 5 This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 3 At this time, n>50, Figure 5 The page number sliding window in is constructed based on the intermediate page numbers.
[0069] In some embodiments, the page number sliding window includes one page number navigation window, two page number navigation windows, or more than two page number navigation windows. The page numbers in each page number navigation window are continuous page numbers.
[0070] In some embodiments, before obtaining the page cursor set, it also includes: based on the window size of the first page number sliding window, selecting a first page number set with increasing coding order from the page numbers; based on each page number in the first page number set, extracting the corresponding page cursor from the data identifier; and / or, based on the window size of the second page number sliding window, selecting a second page number set with increasing coding order from the page numbers; based on each page number in the second page number set, extracting the corresponding page cursor from the data identifier; wherein the maximum page number in the first page number set is less than the minimum page number in the second page number set, and there are multiple page number intervals between the maximum page number in the first page number set and the minimum page number in the second page number set.
[0071] In some embodiments, when the page number sliding window includes a page number navigation window, the page number navigation window is a first page number sliding window or a second page number sliding window. The first page number set includes the home page number, and the first page number sliding window is a page number navigation window constructed according to the first page number set, see Figure 3 ; or, the second page number set includes the home page number, and the second page number sliding window is a page number navigation window constructed according to the second page number set, see Figure 3 ; or, the first page number set includes the last page number, and the first page number sliding window is a page number navigation window constructed according to the first page number set, see Figure 4 ; or, the second page number set includes the last page number, and the second page number sliding window is a page number navigation window constructed according to the second page number set, see Figure 4 ; or, the first page number set contains only intermediate pages, and the first page number sliding window is a page number navigation window constructed according to the first page number set, see Figure 5 ; or, the second page number set contains only intermediate page numbers, and the second page number sliding window is a page number navigation window constructed according to the second page number set, see Figure 5 In this embodiment, the number of pages in the page set is equal to the window size of the page sliding window.
[0072] In some embodiments, when the page number sliding window includes two page number navigation windows, the page number navigation window is a first page number sliding window and a second page number sliding window. The first page number set includes the first page number, the second page number set includes the last page number, the first page number sliding window is a page number navigation window constructed according to the first page number set, and the second page number sliding window is a page number navigation window constructed according to the second page number set.
[0073] like Figure 6 As shown, Figure 6This is a schematic diagram of a page number sliding window in the initial stage of paging display provided by an embodiment of the present application. Figure 4 . The total number of pages is n, Figure 6 There are two page number sliding windows, namely, the first page number sliding window (the window contains 10 page numbers from 1 to 10 in ascending order) and the second page number sliding window (the window contains 10 page numbers from n-9 to n in ascending order). The first page number sliding window in the schematic diagram is constructed based on the page number set containing the first page number, and the second page number sliding window is constructed based on the page number set containing the last page number. Figure 6 The page number sliding window shown supports forward page turning query from the first page, and reverse page turning query from the last page. In the initial display stage of paging, the page number indicator cursor indicates the first page number "1", and the data content corresponding to the first page is displayed to the user, and the data content of the starting page is provided to the user first. Figure 6 The page number sliding window shown is displayed in the page number navigation area. The page number navigation area can be added with a "next page" function option. The user can jump to the next page by clicking the "next page" option or selecting a page number from the page number sliding window.
[0074] In addition, when the page number indicator cursor does not indicate the home page number, the page number navigation area can also display the "Previous Page" function option. The page number navigation area provides page number display and page number selection functions. Figure 7 As shown, Figure 7 : is a display schematic diagram of a page navigation area provided in an embodiment of the present application, wherein m is a positive integer. Figure 7 The page number indicator cursor indicates neither the first page number nor the last page number. At this time, the page number navigation area includes a page number sliding window, "Previous Page" and "Next Page" function options. The user jumps to the previous page by clicking the "Previous Page" option or selecting a page number from the page number sliding window.
[0075] Based on the page number navigation area, the page number jump in the page number sliding window of adjacent pages and non-adjacent pages and the jump of the data content displayed on the page are realized.
[0076] In some embodiments, when the page number sliding window includes two page number navigation windows, the page number navigation windows are a first page number sliding window and a second page number sliding window, the first page number sliding window is a page number navigation window constructed according to a first page number set, and the second page number sliding window is a page number navigation window constructed according to a second page number set. The first page number set includes home page numbers, and the second page number set includes middle page numbers; or the first page number set includes middle page numbers, and the second page number set includes the last page number; or both the first page number set and the second page number set include middle page numbers.
[0077] Regardless of the page number range based on which the page number sliding window is constructed, the maximum page number in the first page number sliding window constructed at the initial stage of paging display is smaller than the minimum page number in the second page number sliding window. In order to realize the page number sliding towards each other based on the two windows, the maximum page number in the first page number sliding window and the minimum page number in the second page number sliding window are usually separated by multiple consecutive page numbers.
[0078] In some embodiments, when the page number sliding window includes two page number navigation windows, the window size of the first page number sliding window is equal to the window size of the second page number sliding window.
[0079] In some embodiments, when the page number sliding window includes two page number navigation windows, the number of pages in the first page number set of the first page number sliding window is equal to the window size of the first page number sliding window. The number of pages in the second page number set of the second page number sliding window is less than or equal to the window size of the second page number sliding window.
[0080] In the previous embodiment, the situation that the number of page numbers in the second page number set of the second page number sliding window is less than the window size of the second page number sliding window usually occurs in the scenario where the second page number set corresponding to the second page number sliding window is a page number set including the last page number, and the page number is not an integer multiple of the window size. Since the page number is not an integer multiple of the window size, and in order to achieve that the number of page cursors corresponding to the updated page number corresponds to the window size when the page cursor is updated, so that the page cursor update is more orderly, the page number set is set according to the window size starting from the home page number. At this time, the number of page numbers in the second page number set of the second page number sliding window is less than or equal to the window size of the second page number sliding window. For example, there are 105 page numbers in total, and the window size is 10. If the second page number sliding window is a page number navigation window constructed based on the page number set including the last page number, then the page number set initially displayed by the second page number sliding window at this time includes 5 page numbers.
[0081] In some embodiments, after determining the page number set to be initially displayed, the page cursor of each page number in the page number set is determined first, and the page cursor set is constructed, that is, the page cursor set is constructed before the page number sliding window is displayed.
[0082] In some embodiments, based on the window size of the first page number sliding window or the window size of the second page number sliding window, a page number set with increasing coding order is selected from the page numbers, i.e., the page number set initially displayed, and then the page cursor corresponding to each page number in the page number set is determined based on the data identifier and placed in the page cursor set.
[0083] In some embodiments, the data identifiers of the data content constitute a monotonic sequence. The step of extracting the corresponding page cursor from the data identifiers includes: extracting the data identifier of a data content in the first page corresponding to the first page number or the data identifier of a data content in the last page corresponding to the last page number from the data identifiers, and then calculating the page cursor of each page number in the page number set based on the data identifier, the number of data displayed, and the data identifier indicated by the page cursor.
[0084] For example, the page number set contains page numbers from 1 to 10. The data identifier of the first data content in the first page page corresponding to the first page number is extracted from the data identifier, which is 24310082. The data identifier of the data content in each page increases with the increase of the page number. The difference between the data identifiers of two adjacent data contents is 2. The data identifier referred to by the page cursor is the data identifier of the first data content of the page corresponding to each page number. The number of data displayed is 10. Then, through calculation, the page cursors corresponding to each page number in the page number set containing page numbers from 1 to 10 are 24310082, 24310102, 24310122, 24310142, 24310162, 24310182, 24310202, 24310222, 24310242 and 24310262 respectively.
[0085] For example, the page number set contains page numbers from 1 to 10. The data identifier of the last data content in the first page corresponding to the first page number is extracted from the data identifier, which is 24310100. The data identifier of the data content in each page increases with the increase of the page number. The difference between the data identifiers of two adjacent data contents is 2. The data identifier referred to by the page cursor is the data identifier of the last data content of the page corresponding to each page number. The number of data displayed is 10. Then, through calculation, the page cursors corresponding to each page number in the page number set containing page numbers from 1 to 10 are 24310100, 24310120, 24310140, 24310160, 24310180, 24310200, 24310220, 24310240, 24310260 and 24310280 respectively.
[0086] In some embodiments, the page number and the page cursor are stored in a cache or memory. In the initial stage of paging display, only the cache window displays the page cursor of the page number.
[0087] In some embodiments, the management of page cursors is implemented using a remote dictionary server (Redis) cache. A Redis hash table is used to store the page cursors for each page. The page number is regarded as the key of the hash table, and the page cursor is the value corresponding to the page number. When Key=0, the Value is the number of data items. The hash table can also be called a page cursor cache table, that is, a page cursor collection.
[0088] In some embodiments, the page cursor cache table is as follows: Figure 8 As shown, Figure 8 This is a page cursor cache representation provided by an embodiment of the present application. Figure 8 The left column in the diagram is the page number, the right column is the page cursor corresponding to the page number, and when the page number is 0, it corresponds to the number of data items. In the initial stage of paging display, the diagram caches the page cursors of pages 1 to 10 in the first page number sliding window, and the page cursors of pages n-9 to n in the second page number sliding window. Among them, the starting id is the data identifier of the first data item of each page.
[0089] When the page number sliding window includes two windows, namely, the first page number sliding window and the second page number sliding window, the first page number sliding window is constructed based on the first page number set, the second page number sliding window is constructed based on the second page number set, the first page number set includes the first page number, and the second page number set includes the last page number, after the page cursor set is constructed, the page number navigation area is as follows Figure 6 As shown, the data contents in the home page corresponding to the home page number are displayed to the user at the same time.
[0090] In some embodiments, the number of data displayed is 20. First, the home page cursor of the home page number is determined, and the home page cursor is used as navigation information to query the home page data content. The query statement is where id>= pageCursor(1) limit 20. The returned home page data content is obtained and displayed.
[0091] The page cursor set and the page number sliding window are constructed by using the initially displayed page number set corresponding to the page number sliding window. The page number sliding window provides the user with multiple selectable page numbers, and the user can jump to query and browse.
[0092] Step 103: Based on the jump page number selected by the user from the page number sliding window, a jump page cursor corresponding to the jump page number is determined from the page cursor set.
[0093] The jump page number is the page number selected by the user from the page number sliding window, which can be the adjacent page number of the last selected page number or the page number separated from the last selected page number by multiple pages. Alternatively, the jump page number is the page number triggered by the "previous page" or "next page" function options.
[0094] The user selects a page number in the page number sliding window, which is an initial sliding window constructed in the initial stage of paging display, or a sliding window that has been updated by page number sliding based on the initial sliding window.
[0095] The determination time of the page cursor is earlier than the display time of the page number in the window. The page cursors of the page numbers displayed in the page number sliding window can be found in the page cursor set. Therefore, the jump page cursor corresponding to the jump page number can be determined from the page cursor set. For example, the page cursor is determined by looking up the page cursor cache table.
[0096] After obtaining the jump page number selected by the user, it is also necessary to determine whether the page cursor set needs to be updated.
[0097] In some embodiments, after the user selects the jump page number from the page number sliding window, it also includes: if the jump page number is greater than the difference between the maximum page number in the current page number set and a preset number of pages, then based on the window size of the page number sliding window, a third page number set with increasing coding order is selected from the page numbers; wherein the page numbers in the third page number set are all greater than the maximum page number in the current page number set, and the minimum page number in the third page number set and the maximum page number in the current page number set are adjacent page numbers; based on the first page cursor corresponding to the maximum page number in the current page number set, the page cursor corresponding to each page number in the third page number set is determined from the data identifier.
[0098] The current page number set is a page number set where the jump page number is located and the page number is continuous and has the largest number of page numbers. The minimum page number in the current page number set is the minimum page number of the page cursor that has been cached in the reverse direction in the page number sliding window corresponding to it, and the maximum page number is the maximum page number of the page cursor that has been cached in the forward direction in the page number sliding window corresponding to it.
[0099] In some embodiments, the page number sliding window displays 10 page numbers from 1 to 10. At this time, there are only page cursors for pages 1 to 10 in the page cursor set. The number of data displayed is 20, and the preset number of pages is 5. The jump page number is 2, and the current page number set contains page numbers from 1 to 10. 2<10-5, so there is no need to update the page cursor at this time. Execute the where statement. If the data identifier of the first data content of the page corresponding to each page number is determined as the page cursor, and the data identifier increases with the increase of the page number, then the corresponding where statement is where id>= pageCursor(2) limit 20, and the data content of the second page is displayed to the user.
[0100] If the data identifier of the last data content of the page corresponding to each page number is determined as the page cursor, when obtaining the data content of the page corresponding to page number b, the page cursor corresponding to page number (b-1) can be directly used as the index navigation information of the data content to obtain the corresponding number of data contents after the page cursor, that is, the data identifier. If the data identifier of the last data content of the page corresponding to the previous adjacent page number of each page number is determined as the page cursor of the page number, when obtaining the data content of the page corresponding to page number b, the page cursor corresponding to page number b can be directly used as the index navigation information of the data content to obtain the corresponding number of data contents after the page cursor, that is, the data identifier. Wherein, b is a positive integer.
[0101] Based on the previous embodiment, the window size of the page number sliding window is 10, and the page cursor of the maximum page number in the current page number set is referred to by the string fwdWindowEndCursor. The jump page number is 6. At this time, 6>10-5, and a new page cursor needs to be stored in the page cursor set. It is determined that the page cursors of pages 11 to 20 need to be stored in the page cursor set. The where statement is executed, where id>fwdWindowEndCursor limit 200, and the page cursors of pages 11 to 20 are obtained and stored in the page cursor set. After that, the where statement is executed, where id>= pageCursor(6) limit 20, and the data content of page 6 is displayed to the user. At the same time, the page number sliding in the page number sliding window is realized, such as the page numbers of pages 2 to 11 are displayed sequentially in the page number sliding window, and the page number indicator cursor moves to the position of the current page number 6.
[0102] In some embodiments, after the user selects the jump page number from the page number sliding window, the following steps are further included: if the jump page number is less than the sum of the smallest page number in the current page number set and the preset number of pages, then based on the window size of the page number sliding window, a fourth page number set with sequentially increasing coding order is selected from the page numbers; wherein, the page numbers in the fourth page number set are all less than the smallest page number in the current page number set, and the largest page number in the fourth page number set and the smallest page number in the current page number set are adjacent page numbers; based on the second page cursor corresponding to the smallest page number in the current page number set, the page cursor corresponding to each page number in the fourth page number set is determined from the data identifiers.
[0103] In some embodiments, the page number sliding window displays 10 page numbers from n - 9 to n. At this time, there are only page cursors for pages n - 9 to n in the page cursor set. The number of data display lines is 20, and the preset number of pages is 5. The jump page number is n - 3, and the page numbers included in the current page number set are from n - 9 to n. Since n - 3 > n - 9 + 5, there is no need to update the page cursor at this time. Execute the where statement. If the data identifier of the first data content on each page is determined as the page cursor and the data identifier increases as the page number increases, then the where statement is accordingly where id >= pageCursor(n - 3) limit 20, and the data content of page n - 3 is displayed to the user.
[0104] Based on the previous embodiment, the window size of the page number sliding window is 10, and the page cursor of the smallest page number in the current page number set is represented by the string rvsWindowEndCursor. The jump page number is n - 5. At this time, n - 5 < n - 9 + 5, and new page cursors need to be stored in the page cursor set. It is determined that the page cursors for pages n - 19 to n - 10 need to be stored in the page cursor set. Execute the where statement, where id > rvsWindowEndCursor limit 200, to obtain the page cursors for pages n - 19 to n - 10 and store them in the page cursor set. Then, execute the where statement, where id >= pageCursor(n - 5) limit 20, to display the data content of page n - 5 to the user. At the same time, the page number sliding in the page number sliding window is realized. For example, the page numbers from n - 10 to n - 1 are sequentially displayed in the page number sliding window, and the page number indicator cursor moves to the position of the current page number n - 5.
[0105] In some embodiments, when the action of determining the third page number set occurs, the page number sliding window slides forward; when the action of determining the fourth page number set occurs, the page number sliding window slides backward.
[0106] In some embodiments, when the page cursors of all page numbers are stored in the page cursor set, the page cursors are no longer updated.
[0107] The page cursor + limit query method does not require data traversal, has better query performance than the offset query method, and is not affected by the page depth.
[0108] Step 104: based on the jump page cursor, obtain target data content from the data query result and display it.
[0109] After obtaining the jump page cursor corresponding to the jump page number, the target data content in the jump page can be obtained according to the jump page cursor and displayed to the user.
[0110] In some embodiments, based on the jump page cursor, the target data content is obtained from the data query results and displayed, including: based on the jump page cursor and the number of data displays, determining the target data identifier of each target data content in the jump page corresponding to the jump page number; obtaining the target data content indicated by the target data identifier and displaying it.
[0111] In some embodiments, if the jump page cursor is the data identifier of the first data of the jump page, that is, 100193281, the number of data displayed is 20, and the data identifiers are in ascending order, then the target data identifiers of the target data content in the jump page are determined to be 100193281, 100193282, 100193283, 100193284, ..., 100193297, 100193298, 100193299 and 100193300, respectively, and these target data identifiers are used as navigation index information to obtain the target data content indicated by these target data identifiers from the data query results or a database containing the data query results, and display it to the user.
[0112] At the same time, if the jump page number is located after the set position in the page number sliding window, and the page number difference between the jump page number and the currently displayed page number at the set position is smaller than the page number difference between the currently displayed maximum page number in the page number sliding window and the maximum page number that can be displayed in the page number sliding window, then the jump page number is moved forward to the set position in sequence; or, if the jump page number is located before the set position in the page number sliding window, and the page number difference between the jump page number and the currently displayed page number at the set position is smaller than the page number difference between the currently displayed minimum page number in the page number sliding window and the minimum page number that can be displayed in the page number sliding window, then the jump page number is moved backward to the set position in the page number sliding window in sequence.
[0113] In some embodiments, the set position is a middle position of the page number sliding window.
[0114] In some embodiments, if only one page number sliding window is provided, the maximum page number that can be displayed is the last page number, and the minimum page number that can be displayed is the first page number.
[0115] In some embodiments, if the page number sliding window includes a first page number sliding window and a second page number sliding window, the maximum displayable page number corresponding to the first page number sliding window is equal to the difference between the last page number and the window size of the second page number sliding window, that is, the difference between the total number of pages and the window size of the second page number sliding window, the minimum displayable page number corresponding to the first page number sliding window is the first page number, the maximum displayable page number corresponding to the second page number sliding window is the last page number, and the minimum displayable page number corresponding to the second page number sliding window is equal to the sum of the first page number and the window size of the first page number sliding window.
[0116] This step determines whether there is a margin of page numbers, that is, whether there are sufficient page numbers to achieve the sliding update of the jump page number in the page number sliding window to the page number at the set position by comparing the numerical relationship between the jump page number, the currently displayed page number at the set position, the currently displayed maximum page number in the page number sliding window and the maximum page number that can be displayed in the page number sliding window, and by comparing the numerical relationship between the jump page number, the currently displayed page number at the set position, the currently displayed minimum page number in the page number sliding window and the minimum page number that can be displayed in the page number sliding window.
[0117] By moving the jump page numbers to the set positions in sequence, there are page numbers available for users to select before and after the jump page numbers in the page number sliding window, so that forward and reverse sliding can be achieved based on the jump page numbers.
[0118] In some embodiments, when the operation of confirming and caching the page cursor occurs, a page number sliding operation will occur in the page number sliding window, and the page data content will be correspondingly updated to the data content of the jump page.
[0119] This application can realize the jump of page numbers in the page number sliding window and the jump of paging display data content.
[0120] The following content is a comparison example of the existing paging display method and the data jump display method of the present application during data query.
[0121] (1) Existing paging display method:
[0122] Each time you query, you first query the number of data items. The Structured Query Language (SQL) statement and query time are as follows:
[0123] INFO-667d1709e6143|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect count(*) as aggregate from 'tb_account' where ('tb_account'.'status'=0and 'tb_account'.'queue_id' in (27)) [4099.51ms];
[0124] This operation took 4099.51ms.
[0125] When querying the data content of a certain page, the SQL statement and query time are as follows:
[0126] INFO-667d1709e6143|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect tb_account.* from 'tb_account' where ('tb_account'.'status'=0 and 'tb_account'.'queue_id' in (27)) order by 'tb_account'.'id' desc, 'tb_account'.'queue_id' desc limit 20 offset 0 [4954.77ms];
[0127] This operation took 4954.77ms.
[0128] When querying the data content of the last page, the SQL statement and query time are as follows:
[0129] INFO-667d172d4fce1|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect tb_account.* from 'tb_account' where ('tb_account'.'status'=0 and 'tb_account'.'queue_id' in (27)) order by 'tb_account'.'id' desc, 'tb_account'.'queue_id' desc limit 20 offset 1114980 [10500.11ms];
[0130] This operation took 10500.11ms.
[0131] In the existing paging display method, as the page turning depth increases, that is, the page number increases, the query performance continues to decline, the query time of the paging display gradually increases, and the paging display efficiency is low.
[0132] (2) Data jump display method of this application:
[0133] First, query the number of data entries, then build the page number sliding windows in both the forward and reverse directions, i.e. the first page number sliding window and the second page number sliding window, and cache the page cursors of the pages to be initially displayed in the first and last page number sliding windows. The corresponding SQL statement and query time for this process are as follows:
[0134] INFO-667d1c0e43e98|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect count(*) as aggregate from 'tb_account' where ('tb_account'.'status'=0and 'tb_account'.'queue_id' in (27)) [4448.04ms];
[0135] INFO-667d1c0e43e98|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect 'tb_account'.'id' from 'tb_account' where ('tb_account'.'status'=0 and'tb_account'.'queue_id' in (27)) order by 'tb_account'.'id' desc limit 200[8.25ms];
[0136] INFO-667d1c0e43e98|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect 'tb_account'.'id' from 'tb_account' where ('tb_account'.'status'=0 and'tb_account'.'queue_id' in (27)) order by 'tb_account'.'id' asc limit 200[4.57ms];
[0137] INFO-667d1c0e43e98|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect tb_account.* from 'tb_account' where ('tb_account'.'status'=0 and 'tb_account'.'queue_id' in (27)) and 'tb_account'.'id'<=11056471 order by 'tb_account'.'id' desc limit 20 [4.66ms];
[0138] It takes 4448.04ms to query the number of data entries, 8.25ms and 4.57ms to query the page cursors corresponding to the initially displayed page sets of the first and second page number sliding windows respectively, and 4.66ms to query the data content of the home page.
[0139] Click the next page. At this time, the number of data items will no longer be queried. The SQL statement and query time are as follows:
[0140] INFO-667d1c6c5f4f4|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect tb_account.* from 'tb_account' where ('tb_account'.'status'=0 and 'tb_account'.'queue_id' in (27)) and 'tb_account'.'id'<=11056451 order by 'tb_account'.'id' desc limit 20 [1.11ms];
[0141] This operation took 1.11ms.
[0142] When you click on the large page number in the second page number sliding window, the SQL statement and query time are as follows:
[0143] INFO-667d1cab99379|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect tb_account.* from 'tb_account' where ('tb_account'.'status'=0 and 'tb_account'.'queue_id' in (27)) and 'tb_account'.'id'<=2039630 order by 'tb_account'.'id' desc limit 20 [1.19ms];
[0144] This operation took 1.19ms.
[0145] When clicking the next page, triggering the page cursor update operation, query the data content of the page corresponding to the jump page number. The SQL statement and query time are as follows:
[0146] INFO-667d1cfdbdb09|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect tb_account.* from 'tb_account' where ('tb_account'.'status'=0 and 'tb_account'.'queue_id' in (27)) and 'tb_account'.'id'<=2039930 order by 'tb_account'.'id' desc limit 20 [1.09ms];
[0147] This operation took 1.09ms.
[0148] At the same time, the page cursor to be cached is queried, which takes 0.85ms and is stored in the Redis cache. Fig. 9 As shown, Fig. 9 This is a schematic diagram of cache content comparison of a page cursor cache interface provided by an embodiment of the present application, wherein the cache page cursors are page cursors of 10 pages from page 55731 to page 55740. The SQL statement and query time of this operation are as follows:
[0149] INFO-667d1cfdbdb09|file:DBQueryListener.php-line:31-^[[92m[SQL]^[[0mselect 'tb_account'.'id' from 'tb_account' where ('tb_account'.'status'=0 and'tb_account'.'queue_id' in (27)) and 'tb_account'.'id'<=2039990 order by 'tb_account'.'id' asc limit 200 [0.85ms];
[0150] This operation takes 0.85ms.
[0151] According to practical data, the query speed of the present application is faster than that of the existing paging display method, especially in the scenario with more page numbers and data content, the speed is much faster than that of the existing paging display method.
[0152] When faced with massive amounts of data, this application can provide users with flexible page jump functions without abandoning data content. Most importantly, the introduction of page cursors as navigation retrieval information for data content can reduce query time and improve paging display efficiency.
[0153] In the embodiment of the present application, firstly, based on the number of data items in the data query result that meet the query condition, the page number of the page displayed in the paging of the data query result and the data identifier of the data content displayed in the paging under each page number are determined. Subsequently, a page cursor set is obtained, which contains the page cursor corresponding to each page number in the page number set determined from the data identifier. The page number set is a set that matches the window size of the page number sliding window. The page cursor set effectively presets the page navigation information that the user may access based on the page number sliding window. The page number sliding window provides the user with selectable page numbers. When the user chooses to jump to a certain page number through the page number sliding window, the jump page cursor matching the selected jump page number is found from the page cursor set. With the navigation information of the jump page cursor, the target data content required by the user is directly obtained from the data query result and displayed. By directly locating the starting position of the target data by the page cursor, the problem of needing to traverse a large amount of data to find the target page in the traditional paging display method is avoided, which greatly reduces the retrieval time of the data content, reduces the query time of the paging display, and improves the paging display efficiency.
[0154] See also Fig.10 , Fig.10This is a structural diagram of a data jump display system provided in an embodiment of the present application. For the sake of ease of explanation, only the parts related to the embodiment of the present application are shown.
[0155] The data jump display system 1000 includes: a first determination module 1001 , an acquisition module 1002 , a second determination module 1003 , and a display module 1004 .
[0156] The first determination module 1001 is used to determine the page numbers for paginated display of the data query results and the data identifiers of the data contents for paginated display under each page number based on the number of data items in the data query results that meet the query conditions.
[0157] The acquisition module 1002 is used to acquire a page cursor set, wherein the page cursor set includes a page cursor corresponding to each page number in the page number set determined from the data identifier, and the page number set is a set that matches the window size of the page number sliding window.
[0158] The second determining module 1003 is used to determine a jump page cursor corresponding to the jump page number from the page cursor set based on the jump page number selected by the user from the page number sliding window.
[0159] The display module 1004 is used to obtain and display target data content from the data query result based on the jump page cursor.
[0160] In some embodiments, the system further includes a page cursor management module, which is used to:
[0161] Based on the window size of the first page number sliding window, selecting a first page number set whose coding order is increasing in sequence from the page numbers;
[0162] Based on each page number in the first page number set, extracting the corresponding page cursor from the data identifier; and / or,
[0163] Based on the window size of the second page number sliding window, selecting a second page number set whose coding order is increasing in sequence from the page numbers;
[0164] Based on each page number in the second page number set, extracting the corresponding page cursor from the data identifier;
[0165] The maximum page number in the first page number set is smaller than the minimum page number in the second page number set, and there are multiple page number intervals between the maximum page number in the first page number set and the minimum page number in the second page number set.
[0166] If the jump page number is greater than the difference between the maximum page number in the current page number set and the preset number of pages, then based on the window size of the page number sliding window, a third page number set with increasing coding order is selected from the page numbers; wherein the page numbers in the third page number set are all greater than the maximum page number in the current page number set, and the minimum page number in the third page number set and the maximum page number in the current page number set are adjacent page numbers;
[0167] Based on the first page cursor corresponding to the largest page number in the current page number set, the page cursor corresponding to each page number in the third page number set is determined from the data identifier.
[0168] If the jump page number is smaller than the sum of the minimum page number in the current page number set and the preset number of pages, a fourth page number set whose coding order is increasing in sequence is selected from the page numbers based on the window size of the page number sliding window; wherein the page numbers in the fourth page number set are all smaller than the minimum page number in the current page number set, and the maximum page number in the fourth page number set and the minimum page number in the current page number set are adjacent page numbers;
[0169] Based on the second page cursor corresponding to the minimum page number in the current page number set, the page cursor corresponding to each page number in the fourth page number set is determined from the data identifier.
[0170] Determine the data identifier of the first data content in the page corresponding to each of the page numbers as the page cursor of the page number; or,
[0171] Determine the data identifier of the last data content in the page corresponding to each of the page numbers as the page cursor of the page number; or,
[0172] The data identifier of the last piece of data content in the page corresponding to the previous adjacent page number of each of the page numbers is determined as the page cursor of the page number.
[0173] In some embodiments, the system further includes a page number management module, which is used to:
[0174] If the jump page number is located after the set position in the page number sliding window, and the page number difference between the jump page number and the currently displayed page number at the set position is smaller than the page number difference between the currently displayed maximum page number in the page number sliding window and the maximum page number that can be displayed in the page number sliding window, then the jump page number is sequentially moved forward to the set position; or,
[0175] If the jump page number is located before the set position in the page number sliding window, and the page number difference between the jump page number and the currently displayed page number at the set position is smaller than the page number difference between the currently displayed minimum page number in the page number sliding window and the minimum page number that can be displayed in the page number sliding window, then the jump page number is moved back to the set position in the page number sliding window in sequence.
[0176] In some embodiments, the display module is specifically used for:
[0177] Determine the target data identifier of each target data content in the jump page corresponding to the jump page number based on the jump page cursor and the number of data display items;
[0178] The target data content indicated by the target data identifier is acquired and displayed.
[0179] The data jump display system provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned data jump display method and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0180] Fig.11 1 is a structural diagram of a terminal provided in an embodiment of the present application. As shown in the figure, the terminal 11 of the embodiment includes: at least one processor 110 ( Fig.11 Only one is shown in the figure), a memory 111 and a computer program 112 stored in the memory 111 and executable on the at least one processor 110, wherein the processor 110 implements the steps of any of the above-mentioned method embodiments when executing the computer program 112.
[0181] The terminal 11 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 11 may include, but is not limited to, a processor 110 and a memory 111. Those skilled in the art will appreciate that Fig.11 It is only an example of the terminal 11 and does not constitute a limitation on the terminal 11. The terminal 11 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0182] The processor 110 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0183] The memory 111 may be an internal storage unit of the terminal 11, such as a hard disk or memory of the terminal 11. The memory 111 may also be an external storage device of the terminal 11, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the terminal 11. Further, the memory 111 may also include both an internal storage unit of the terminal 11 and an external storage device. The memory 111 is used to store the computer program and other programs and data required by the terminal. The memory 111 may also be used to temporarily store data that has been output or is to be output.
[0184] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0185] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0186] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0187] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0188] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0189] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0190] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0191] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on a terminal, the terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0192] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data jump display method, characterized in that: include: Based on the number of data items in the data query results that meet the query conditions, determine the page numbers for paging the data query results and the data identifiers of the data contents to be paginated under each page number; Acquire a page cursor set, the page cursor set including a page cursor corresponding to each page number in the page number set determined from the data identifier, the page number set being a set that matches the window size of the page number sliding window; Before obtaining the page cursor set, the method further includes: selecting a first page number set whose coding sequence is successively increased from the page numbers based on the window size of the first page number sliding window; extracting the corresponding page cursor from the data identifier based on each page number in the first page number set; and selecting a second page number set whose coding sequence is successively increased from the page numbers based on the window size of the second page number sliding window; extracting the corresponding page cursor from the data identifier based on each page number in the second page number set; wherein the maximum page number in the first page number set is less than the minimum page number in the second page number set, and there are multiple page number intervals between the maximum page number in the first page number set and the minimum page number in the second page number set; Based on the jump page number selected by the user from the page number sliding window, determining a jump page cursor corresponding to the jump page number from the page cursor set; the page cursors included in the page cursor set are stored in a cache; Based on the jump page cursor, obtaining target data content from the data query result and displaying it; After the user selects the jump page number from the page number sliding window, the method further includes: If the jump page number is greater than the difference between the maximum page number in the current page number set and the preset number of pages, then based on the window size of the page number sliding window, a third page number set with increasing coding order is selected from the page numbers; wherein the page numbers in the third page number set are all greater than the maximum page number in the current page number set, and the minimum page number in the third page number set and the maximum page number in the current page number set are adjacent page numbers; based on the first page cursor corresponding to the maximum page number in the current page number set, the page cursor corresponding to each page number in the third page number set is determined from the data identifier; the page cursor corresponding to each page number in the third page number set is stored in the cache; or, If the jump page number is smaller than the sum of the minimum page number in the current page number set and the preset number of pages, then based on the window size of the page number sliding window, a fourth page number set with increasing coding order is selected from the page numbers; wherein the page numbers in the fourth page number set are all smaller than the minimum page number in the current page number set, and the maximum page number in the fourth page number set and the minimum page number in the current page number set are adjacent page numbers; based on the second page cursor corresponding to the minimum page number in the current page number set, the page cursor corresponding to each page number in the fourth page number set is determined from the data identifier; and the page cursor corresponding to each page number in the fourth page number set is stored in a cache.
2. The method according to claim 1, characterized in that The method further comprises: If the jump page number is located after the set position in the page number sliding window, and the page number difference between the jump page number and the currently displayed page number at the set position is smaller than the page number difference between the currently displayed maximum page number in the page number sliding window and the maximum page number that can be displayed in the page number sliding window, then the jump page number is sequentially moved forward to the set position; or, If the jump page number is located before the set position in the page number sliding window, and the page number difference between the jump page number and the currently displayed page number at the set position is smaller than the page number difference between the currently displayed minimum page number in the page number sliding window and the minimum page number that can be displayed in the page number sliding window, then the jump page number is moved back to the set position in the page number sliding window in sequence.
3. The method according to claim 1, characterized in that The method further comprises: Determine the data identifier of the first data content in the page corresponding to each of the page numbers as the page cursor of the page number; or, Determine the data identifier of the last data content in the page corresponding to each of the page numbers as the page cursor of the page number; or, The data identifier of the last piece of data content in the page corresponding to the previous adjacent page number of each of the page numbers is determined as the page cursor of the page number.
4. The method according to claim 1, characterized in that: The step of acquiring target data content from the data query result based on the jump page cursor and displaying the target data content includes: Determine the target data identifier of each target data content in the jump page corresponding to the jump page number based on the jump page cursor and the number of data display items; The target data content indicated by the target data identifier is acquired and displayed.
5. A data jump display system, characterized in that: include: A first determination module is used to determine the page numbers of the data query results to be displayed in pages and the data identifiers of the data contents to be displayed in pages under each page number based on the number of data items in the data query results that meet the query conditions; An acquisition module, used for acquiring a page cursor set, wherein the page cursor set includes a page cursor corresponding to each page number in a page number set determined from the data identifier, and the page number set is a set that matches the window size of the page number sliding window; A second determining module is used to determine a jump page cursor corresponding to the jump page number from the page cursor set based on the jump page number selected by the user from the page number sliding window; The page cursors included in the page cursor set are stored in a cache; A display module, used for acquiring target data content from the data query result based on the jump page cursor and displaying the target data content; The system also includes a page cursor management module, which is used to: Based on the window size of the first page number sliding window, a first page number set whose coding sequence is increasing in sequence is selected from the page numbers; based on each page number in the first page number set, the corresponding page cursor is extracted from the data identifier; and, based on the window size of the second page number sliding window, selecting a second page number set whose coding order is increasing in sequence from the page numbers; based on each page number in the second page number set, extracting the corresponding page cursor from the data identifier; wherein the maximum page number in the first page number set is less than the minimum page number in the second page number set, and there are multiple page number intervals between the maximum page number in the first page number set and the minimum page number in the second page number set; If the jump page number is greater than the difference between the maximum page number in the current page number set and the preset number of pages, then based on the window size of the page number sliding window, a third page number set with increasing coding order is selected from the page numbers; wherein the page numbers in the third page number set are all greater than the maximum page number in the current page number set, and the minimum page number in the third page number set and the maximum page number in the current page number set are adjacent page numbers; based on the first page cursor corresponding to the maximum page number in the current page number set, the page cursor corresponding to each page number in the third page number set is determined from the data identifier; the page cursor corresponding to each page number in the third page number set is stored in the cache; or, If the jump page number is smaller than the sum of the minimum page number in the current page number set and the preset number of pages, then based on the window size of the page number sliding window, a fourth page number set with increasing coding order is selected from the page numbers; wherein the page numbers in the fourth page number set are all smaller than the minimum page number in the current page number set, and the maximum page number in the fourth page number set and the minimum page number in the current page number set are adjacent page numbers; based on the second page cursor corresponding to the minimum page number in the current page number set, the page cursor corresponding to each page number in the fourth page number set is determined from the data identifier; and the page cursor corresponding to each page number in the fourth page number set is stored in a cache.
6. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Data query method, device and equipment and storage medium
CN112182040A
Elastic search paging query method and device based on cache
CN116049103A