Jump page query method and device, storage medium and processor

By determining the node where the target page is located in Elasticsearch and querying in the front-end page cache data, the problem that Elasticsearch pagination query can only turn the page forward, achieving efficient page jump query and random access.

CN119520611AActive Publication Date: 2025-02-25CCB FINTECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411536665.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-25
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing Elasticsearch pagination query has the problem that it can only turn pages from front to back, but not from back to previous pages.

Method used

By obtaining the query target page, and determining the node where the target page is located based on the query target page, the data size per page and the node size, querying in the cached data of the front-end page, page jump query is realized, and random access is supported.

Benefits of technology

It improves query rate, realizes random access to experienced pages, reduces the pressure on back-end services, and does not affect the scalability of back-end services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520611A_ABST
    Figure CN119520611A_ABST
Patent Text Reader

Abstract

The invention provides a skip page query method and device, a storage medium and a processor, and relates to the technical field of computers. The method comprises the steps of obtaining a query target page; determining a node where the target page is located based on the query target page, a preset data size of each page and a node size; on the basis of a node where the target page is located, cache data of a front-end page is inquired to obtain an inquiry result, the cache data of the front-end page is obtained by loading corresponding block data in rear-end data to the front-end page to be cached on the basis of a current inquiry condition, the cache data of the front-end page comprises a plurality of nodes, and the nodes correspond to the block data in the rear-end data. Each node is used for storing different block data in the back-end data. And random access can also be realized for experienced pages, so that the query rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a page jump query method, a page jump query device, a machine-readable storage medium, a computer program product, and a processor. Background Art

[0002] In the field of data management, data query functions often use Elasticsearch as a data search engine to assist structured queries, and Elasticsearch's paging query mainly provides the following three methods: 1. from+size shallow paging method, the advantage is that it supports random page jumps, but the disadvantage is that it is limited by the max_result_window parameter of Elasticsearch, and cannot page indefinitely and the further back you go, the slower it is. 2. scroll method, the advantage is that it supports full traversal and is not limited by max_result_window, but the disadvantage is that the response time is not real-time, and sufficient memory space is required to retain the context, otherwise it is easy to overflow the memory. 3. searchAfter method, the advantage is that it is not limited by max_result_window and can page indefinitely, but the disadvantage is that it can only page backward and does not support random page turning.

[0003] Therefore, currently when using Elasticsearch as a data search engine to perform data query, there is a problem that pages can only be turned from the front to the back, but not from the back to the previous page. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a page jump query method, a page jump query device, a machine-readable storage medium, a computer program product and a processor. The page jump query method can also achieve random access to pages that have been visited, thereby improving the query rate.

[0005] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a page jump query method, comprising:

[0006] Get the query target page;

[0007] Based on the query target page, the preset data size per page and the node size, determine the node where the target page is located;

[0008] Based on the node where the target page is located, a query is performed in the cache data of the front-end page to obtain a query result. The cache data of the front-end page is obtained based on the current query conditions, and the corresponding block data in the back-end data is loaded into the front-end page cache. The cache data of the front-end page includes multiple nodes, and each node is used to store different block data in the back-end data.

[0009] In the embodiment of the present application, the query is performed in the cache data of the front-end page based on the node where the target page is located to obtain the query result, including:

[0010] A1: Determine whether the node where the target page is located is in the cache data of the front-end page;

[0011] A2: When it is determined that the node where the target page is located is in the cache data of the front-end page, query the cache data of the front-end page based on the node where the target page is located to obtain a query result;

[0012] A3: When it is determined that the node where the target page is located is not in the cache data of the front-end page, cache the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

[0013] In the embodiment of the present application, the step of caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page and jumping to execute A1 includes:

[0014] Based on the node number of the node where the target page is located and the node number of the current node, the number of forward nodes is calculated;

[0015] Determine whether the number of forward nodes exceeds the maximum allowed number of cache nodes;

[0016] In the case where it is determined that the number of forward-turned nodes exceeds the maximum allowed number of cached nodes, determining whether the number of forward-turned nodes exceeds the maximum number of forward-traversed nodes;

[0017] When it is determined that the number of forward-turned nodes does not exceed the maximum number of forward-traversed nodes, the block data corresponding to the next node in the back-end data is cached into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

[0018] In an embodiment of the present application, caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page includes:

[0019] Determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0020] Based on the number of valid cache nodes and the node size, calling the ElasticSearch API to query and obtain return data;

[0021] The returned data is cached as the block data corresponding to the next node in the cache data of the front-end page to update the cache data of the front-end page.

[0022] In the embodiment of the present application, the query is performed in the cache data of the front-end page based on the node where the target page is located to obtain the query result, including:

[0023] Determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0024] A first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page, and the node size, where the first parameter is used to indicate the number of data items that need to be skipped after reaching the node where the target page is located;

[0025] Based on the number of valid cache nodes and the first parameter, an ElasticSearch API is called to perform a query to obtain a query result.

[0026] In the embodiment of the present application, the first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page and the node size, including:

[0027] Substitute the node where the target page is located, the query target page, the data size of each page and the node size into the preset calculation formula for the range to be queried to obtain the first parameter. The preset calculation formula for the range to be queried is:

[0028] Size=gotoPage*pageSize-(gotoNode-1)*nodeSize,

[0029] Among them, gotoPage is the query target page, pageSize is the data size of each page, gotoNode is the node where the target page is located, nodeSize is the node size, and Size is the first parameter.

[0030] In the embodiment of the present application, it also includes:

[0031] Determine whether the cache of the front-end page is invalid;

[0032] When it is determined that the cache of the front-end page is invalid, the cache data is cleared.

[0033] In the embodiment of the present application, it also includes:

[0034] Determine whether the current query condition has changed;

[0035] When determining whether the current query condition has changed, the cache is initialized, and based on the changed current query condition, the corresponding block data in the backend data is loaded into the frontend page cache.

[0036] In an embodiment of the present application, the step of determining the node where the target page is located based on the query target page, the preset data size per page, and the node size includes:

[0037] Substitute the query target page, the preset data size per page and the node size into the preset node calculation formula to obtain the node where the target page is located. The preset node calculation formula is:

[0038] gotoNodeIdx=Ceiling(gotoPage*pageSize / nodeSize),

[0039] Among them, gotoNodeIdx is the node where the target page is located, gotoPage is the query target page, pageSize is the data size of each page, and nodeSize is the node size.

[0040] A second aspect of the present application provides a page jump query device, the page jump query device comprising:

[0041] The acquisition module is used to obtain the query target page;

[0042] A determination module, used to determine the node where the target page is located based on the query target page, the preset data size per page and the node size;

[0043] The query module is used to query the cache data of the front-end page based on the node where the target page is located to obtain the query result. The cache data of the front-end page is obtained by loading the corresponding block data in the back-end data into the front-end page cache based on the current query conditions. The cache data of the front-end page includes multiple nodes, each node is used to store different block data in the back-end data.

[0044] A third aspect of the present application provides a processor configured to execute the above-mentioned page jump query method.

[0045] A fourth aspect of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned page jump query method.

[0046] A fifth aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned page jump query method when executed by a processor.

[0047] Through the above technical scheme, by obtaining the query target page; based on the query target page, the preset data size per page and the node size, the node where the target page is located is determined; based on the node where the target page is located, the query is performed in the cache data of the front-end page to obtain the query result, the cache data of the front-end page is based on the current query condition, and the corresponding block data in the back-end data is loaded into the front-end page cache, and the cache data of the front-end page includes multiple nodes, each of which is used to store different block data in the back-end data. By determining the node where the target page is located, the nearest node of the query target page can be determined first, and then the query is started from the node where the target page is located when querying, so as to realize page jump query, and random access can also be realized for the pages that have been experienced, thereby improving the query rate. The key node information about the current query condition is cached by the front-end page, and the stateless architecture of the back-end service is maintained. The back-end does not need to cache the node information of each session condition, which reduces the pressure of the back-end service and does not affect the scalability of the back-end service. At the same time, according to the calculation, the front-end cache method can be known that the amount of data will not be large, and the impact on the user operation experience and page performance is minimized under the premise of meeting the requirements.

[0048] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:

[0050] Figure 1 A schematic diagram of an application environment of a page jump query method according to an embodiment of the present application is schematically shown;

[0051] Figure 2 The following is a schematic diagram showing a flow chart of a page jump query method according to an embodiment of the present application;

[0052] Figure 3 A detailed process diagram of page jump query according to an embodiment of the present application is schematically shown;

[0053] Figure 4 A schematic diagram of a structure of a page jump query device according to an embodiment of the present application is shown;

[0054] Figure 5 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown.

[0055] Description of Reference Numerals

[0056] 102-terminal; 104-server; 410-acquisition module; 420-determination module; 430-query module; A01-processor; A02-network interface; A03-internal memory; A04-display screen; A05-input device; A06-non-volatile storage medium; B01-operating system; B02-computer program. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0058] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0059] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0060] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In addition, it should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0061] The page jump query method provided by this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. By determining the node where the target page is located, the node closest to the query target page can be determined first, and then the query starts from the node where the target page is located when querying, realizing page jump query, and random access can also be realized for the pages that have been experienced, thereby improving the query rate. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0062] Figure 2 The flowchart of the page jump query method according to the embodiment of the present application is schematically shown. Figure 2 As shown, in one embodiment of the present application, a page jump query method is provided. This embodiment mainly applies this method to the above Figure 1 Taking the terminal 102 (or server 104) in FIG. 1 as an example, the following steps are included:

[0063] Step S210: Obtain the query target page;

[0064] In this embodiment, the query target page can be obtained by inputting the target page on the front-end page, and the query target page refers to the page to be queried. Through the user interface action, the interface event can be determined as a query event.

[0065] Step S220: determining the node where the target page is located based on the query target page, the preset data size per page and the node size;

[0066] In this embodiment, the node size refers to the data size that the node can store, which can be preset. The data size of each page can be known in advance. Then, according to the query target page, the preset data size of each page and the node size, the node where the target page is located can be calculated.

[0067] In some embodiments, the determining the node where the target page is located based on the query target page, the preset data size per page, and the node size includes: substituting the query target page, the preset data size per page, and the node size into a preset node calculation formula to obtain the node where the target page is located, and the preset node calculation formula is:

[0068] gotoNodeIdx=Ceiling(gotoPage*pageSize / nodeSize),

[0069] Among them, gotoNodeIdx is the node where the target page is located, gotoPage is the query target page, pageSize is the data size of each page, and nodeSize is the node size.

[0070] In this embodiment, Ceiling refers to a rounding function that rounds up the parameter, that is, after calculating the value of gotoPage*pageSize / nodeSize, rounding up to get the node number of the node where the target page is located, that is, getting the node where the target page is located. The node where the target page is located is the node whose value is closest to the target page.

[0071] By using the round-up function, the node number of the nearest node where the target page is located can be quickly and accurately calculated, and then the node where the target page is located can be determined. By determining the node where the target page is located, the approximate location of the data can be located, which helps to quickly find the query results.

[0072] Step S230: Based on the node where the target page is located, query the cache data of the front-end page to obtain the query result. The cache data of the front-end page is based on the current query conditions, and the corresponding block data in the back-end data is loaded into the front-end page cache. The cache data of the front-end page includes multiple nodes, each node is used to store different block data in the back-end data.

[0073] In this embodiment, the cache data of the front-end page is the data pre-loaded in the cache of the front-end page. After the last page jump query, the query conditions have not changed, and the data stored in the cache of the front-end page can also be obtained by caching the corresponding block data to the front-end page based on the current query conditions. Specifically, it can be obtained through a page loading event. When performing a page loading event, the cache node configuration is first obtained, including: the maximum number of cache nodes, which can be expressed as: maxCachedNodeSize; the maximum number of forward traversal nodes, which can be expressed as: maxPosGapSizeByNode. Then the cache can be initialized according to maxCachedNodeSize, thereby initializing the cache data. It should be noted that the above-mentioned cache data can be stored in the form of an array or in other data structures, which is not limited in this embodiment. When the cache data is stored in the form of a cache array, the cache array can be initialized based on the cache node configuration. The cache data includes multiple nodes, and each block data is stored in each node. Each node can be numbered to obtain each node number. After determining the node where the target page is located, a query can be performed in the cache data of the front-end page to find the corresponding data, and then obtain the query result.

[0074] In some embodiments, in order to improve the query rate, before performing the query, it can be determined whether the node where the target page is located is in the cache data of the front-end page, that is, based on the node where the target page is located, the query is performed in the cache data of the front-end page to obtain the query result, including the following steps:

[0075] Step A1: Determine whether the node where the target page is located is in the cache data of the front-end page;

[0076] In this embodiment, the above judgment can be to judge whether the node where the target page is located is a valid cache node. The valid cache node refers to the node in the cache of the front-end page that caches the block data. After the cache data of the front-end page is determined, the valid cache node can be determined. For example, in a specific implementation, the nodes can be numbered from 0, and the current number of valid cache nodes can be obtained, which is expressed as validCount. The node number where the target page is located is gotoNodeIdx. In the judgment, it can be judged whether gotoNodeIdx-1 exceeds the current number of valid cache nodes validCount.

[0077] Step A2: when it is determined that the node where the target page is located is in the cache data of the front-end page, query the cache data of the front-end page based on the node where the target page is located to obtain a query result;

[0078] In this embodiment, if the node where the target page is located is in the cache data of the front-end page, the query can be performed in the cache data of the front-end page. For example, in the above example, gotoNodeIdx-1 does not exceed the current valid cache node number validCount, which means that the key node information required for this query is already in the cache, and the query can be performed in the cache data of the front-end page.

[0079] In some embodiments, querying the cache data of the front-end page based on the node where the target page is located to obtain the query result includes:

[0080] First, determining the number of valid cache nodes in the cache data of the front-end page, wherein the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0081] In this embodiment, the node numbers in the cache data may be numbered in ascending order, and the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page.

[0082] Then, based on the node where the target page is located, the query target page, the data size of each page and the node size, a first parameter is calculated, where the first parameter is used to indicate the number of data items that need to be skipped after reaching the node where the target page is located;

[0083] In this embodiment, the first parameter may be used as a size parameter when calling the query API of ElasticSearch.

[0084] The first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page and the node size, including:

[0085] Substitute the node where the target page is located, the query target page, the data size of each page and the node size into the preset calculation formula for the range to be queried to obtain the first parameter. The preset calculation formula for the range to be queried is:

[0086] Size=gotoPage*pageSize-(gotoNode-1)*nodeSize,

[0087] Among them, gotoPage is the query target page, pageSize is the data size of each page, gotoNode is the node where the target page is located, nodeSize is the node size, and Size is the first parameter.

[0088] In this embodiment, the first parameter indicates the number of data that needs to be skipped after reaching the node where the target page is located, that is, the nearest node. The calculation formula for the range to be queried can quickly and accurately calculate the number of data that needs to be skipped after reaching the nearest node.

[0089] Finally, based on the number of valid cache nodes and the first parameter, the API of ElasticSearch is called to perform a query to obtain a query result.

[0090] In this embodiment, after determining the number of valid cache nodes, the cache information with the node number gotNodeIdx-1 can be obtained accordingly, and the information can be used as the searchAfter parameter of the request, and the first parameter can be used as the searchAfter parameter of the request, and then the ElasticSearch (ES) API is called to query, so as to call the ES query API to obtain data, and the last pageSize size of data of the returned result can be returned as the result of the page of this query to obtain the query result.

[0091] By obtaining the cache information with the index gotNodeIdx-1 as the searchAfter parameter of the request, calculating gotoPage*pageSize-(gotoNode-1)*nodeSize as the size parameter to be requested, calling the ES query API to obtain data, taking the last pageSize of the returned results as the result of the page of this query, so that the query results can be obtained quickly and accurately, and page jump query can be realized.

[0092] Step A3: When it is determined that the node where the target page is located is not in the cache data of the front-end page, cache the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page, and execute step A1.

[0093] In this embodiment, if the node where the target page is located is not in the cache data of the front-end page, the block data corresponding to the next node in the back-end data is cached in the cache data of the front-end page until the node where the target page is located is in the cache data of the front-end page. For example, in the above example, gotoNodeIdx-1 exceeds the current valid cache node number validCount, which means that there is no available cache and it is necessary to cross the page, that is, to obtain the subsequent node information, until the node where the target page is located is in the cache data of the front-end page.

[0094] By judging whether the node where the target page is located is in the cache data of the front-end page, that is, judging whether there is a queryable cache, if not, you can query in the cache data of the front-end page; if it is, continue to obtain subsequent node information until the node where the target page is located is in the cache data of the front-end page, thereby improving query efficiency and ensuring reliable query execution.

[0095] In some embodiments, the step of caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page and jumping to execute A1 includes the following steps:

[0096] First, based on the node number of the node where the target page is located and the node number of the current node, the number of forward nodes is calculated;

[0097] In this embodiment, the node where the target page is located is not in the cache data of the front-end page. Correspondingly, the node number of the node where the target page is located is not in the cache data of the front-end page. In order to make the node where the target page is located in the cache data of the front-end page, the number of nodes to be flipped forward can be calculated, that is, how many nodes need to be passed to reach the node where the target page is located. The node number of the above-mentioned current node refers to the node number in the current cache array. The above calculation can be obtained by calculating the difference between the node number of the node where the target page is located and the node number of the current node. For example, the calculation of the number of nodes to be flipped forward is: gapSizeByNode=gotoNodeIdx-currentNodeIdx, where gotoNodeIdx is the node number of the node where the target page is located, and currentNodeIdx is the node number of the current node.

[0098] Then, determining whether the number of forward flipping nodes exceeds the maximum allowed number of cache nodes;

[0099] In this embodiment, the maximum allowed number of cache nodes may be pre-configured. If the number of forward nodes exceeds the maximum allowed number of cache nodes, it indicates that the maximum cache limit is exceeded, and a prompt message may be generated to indicate that the maximum cache limit is exceeded.

[0100] Then, in the case where it is determined that the number of forward-turned nodes exceeds the maximum allowed number of cached nodes, it is determined whether the number of forward-turned nodes exceeds the maximum number of forward-traversed nodes;

[0101] In this embodiment, the maximum number of nodes traversed forward may be pre-configured. If the number of nodes turned forward exceeds the maximum number of nodes traversed forward, it indicates that the requirement is not met, and a prompt message may be generated to indicate that the maximum single page turning limit is exceeded. If the number of nodes turned forward does not exceed the maximum number of nodes traversed forward, the next step is executed.

[0102] Then, when it is determined that the number of forward-turned nodes does not exceed the maximum number of forward-traversed nodes, the block data corresponding to the next node in the back-end data is cached into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

[0103] In this embodiment, if the number of forward-turned nodes does not exceed the maximum number of forward-turned nodes, it means that the block data corresponding to the next node in the back-end data can continue to be cached in the cache data of the front-end page until the node where the target page is located is in the cache data of the front-end page.

[0104] By calculating the number of forward-turned nodes, it is determined in turn whether the number of forward-turned nodes exceeds the maximum number of allowed cached nodes and the maximum number of forward-traversed nodes. Only when the number of forward-turned nodes does not exceed the maximum number of allowed cached nodes and the maximum number of forward-traversed nodes, the block data corresponding to the next node in the back-end data will continue to be cached in the cache data of the front-end page until the node where the target page is located is in the cache data of the front-end page. If not, the query will not continue, and the corresponding reminder information will be generated to remind the user. This can improve the query efficiency and query reliability.

[0105] In some embodiments, caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page includes:

[0106] First, determining the number of valid cache nodes in the cache data of the front-end page, wherein the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0107] In this embodiment, the node numbers in the cache data may be numbered in ascending order, and the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page.

[0108] Then, based on the number of valid cache nodes and the node size, the API of ElasticSearch is called to perform a query to obtain return data;

[0109] In this embodiment, the currently valid maximum index, that is, the cache information of the valid cache node number, can be used as the search_after parameter in the ES request, and the node size nodeSize can be used as the size parameter to call the ES API request to obtain the returned data.

[0110] Finally, the returned data is cached in the cache data of the front-end page as the block data corresponding to the next node, so as to update the cache data of the front-end page.

[0111] In this embodiment, the sort parameter in the returned result can be cached into the data as the information of the next node to obtain the block data of the next node. At the same time, the number of valid cache nodes is increased by 1 to update the cache data of the front-end page.

[0112] By using the cache information of the number of valid cache nodes as the search_after parameter in the ES request, and the node size nodeSize as the size parameter, and calling the ES API request, the returned data can be obtained quickly and accurately.

[0113] It should be noted that the calling of the ElasticSearch API for query mentioned in this embodiment belongs to the prior art and will not be described in detail here.

[0114] The following is an example of the query rate using this solution:

[0115] The number of key nodes cached in the front-end page is node=1000. Assuming that the user views each record for 1 second, a maximum of 60*60*24=86400 records can be viewed in 24 hours. Generally, the maximum single page for convenient viewing is 500 data. A maximum of CEILING(86400 / 500)=173 nodes can be viewed in 24 hours. According to the cache of 1000 nodes, continuous viewing for one week is supported, which improves query efficiency. It can also be flexibly expanded through parameter configuration during specific implementation.

[0116] In the above implementation process, the query target page is obtained; based on the query target page, the preset data size per page and the node size, the node where the target page is located is determined; based on the node where the target page is located, the query is performed in the cache data of the front-end page to obtain the query result. The cache data of the front-end page is obtained by loading the corresponding block data in the back-end data into the front-end page cache based on the current query condition. The cache data of the front-end page includes multiple nodes, each of which is used to store different block data in the back-end data. By determining the node where the target page is located, the nearest node to the query target page can be determined first, and then the query is started from the node where the target page is located during the query, so as to realize the page jump query, and random access can also be realized for the pages that have been experienced, thereby improving the query rate. The key node information about the current query condition is cached by the front-end page, and the stateless architecture of the back-end service is maintained. The back-end does not need to cache the node information of each session condition, which reduces the pressure of the back-end service and does not affect the scalability of the back-end service. At the same time, according to the calculation, the front-end cache method can reduce the amount of data, which minimizes the impact on the user operation experience and page performance while meeting the requirements.

[0117] In some embodiments, the following steps are also included:

[0118] First, determine whether the cache of the front-end page is invalid;

[0119] Then, when it is determined that the cache of the front-end page is invalid, the cache data is cleared.

[0120] In this embodiment, a cache invalidation strategy can be set for data query, that is, when the user refreshes or closes the page, resets the query conditions, or exceeds a certain time, the cache can be invalidated and the cached data can be cleared to facilitate updating the cache during the next query.

[0121] In some embodiments, it also includes:

[0122] First, determine whether the current query condition has changed;

[0123] Then, when it is determined whether the current query condition has changed, the cache is initialized, and based on the changed current query condition, the corresponding block data in the backend data is loaded into the frontend page cache.

[0124] In this embodiment, when the value in the query condition changes, it is considered that the current query condition has changed, and the page can be reloaded to initialize the cache. Based on the changed current query condition, the corresponding block data in the backend data is loaded into the front-end page cache to update the cache in real time to suit different usage scenarios.

[0125] Please see Figure 3 , Figure 3 The detailed process diagram of page jump query according to the embodiment of the present application is schematically shown. The scheme is described in detail with a specific example below.

[0126] First, the interface event can be determined through the user interface action. When the interface event is the initial loading of the page, the cache node configuration is obtained and the cache array is initialized. When the interface event is a query event, the node gotoNodeIdx = Ceiling (gotoPage*pageSize / nodeSize) where gotoPage is located is calculated, and then it is determined whether gotoNodeIdx-1 is greater than validCount. If so, it means that there is no cache, and it is necessary to traverse forward to turn the page; if not, it means that the page of the cached node has been turned. In the case of turning the page of the cached node, obtain the cache information with the subscript gotNodeIdx-1 as the searchAfter parameter of the request, calculate gotoPage*pageSize-(gotoNode-1)*nodeSize as the size parameter to be requested, call the ES query API to obtain data, and take the last pageSize of the returned result. The number of data is returned as the result of the page of this query. When it is necessary to traverse forward and turn the page, first calculate the number of nodes to turn forward, gapSizeByNode = gotoNodeIdx-currentNodeIdx, and then determine whether gapSizeByNode exceeds the maxCachedNodeSize limit. If it exceeds, it will prompt that the maximum cache limit is exceeded. If it does not exceed, then determine whether it exceeds the maxPosGapSizeByNode limit. If it exceeds, it will prompt that the single maximum page turning limit {maxGapSizeByNode*nodeSize} is exceeded. If it does not exceed, get the current valid cache number validCount as the maximum valid index, get nodeCache[validCount] as the searchAfter parameter of the request, get nodeSize as the size parameter of the request, call ES query API to get data, and store the content of sort in the returned result as the information of the new node in the cache index not validCount+1 position, the validCount value increases by 1, and returns to determine whether gotoNodeIdx-1 is greater than validCount. When the query condition field changes, re-execute the page initial load event. When the interface event is page closing and exiting, clear the cache.

[0127] Figure 2 FIG. 1 is a flow chart of a page jump query method in one embodiment. It should be understood that although Figure 2The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0128] In one embodiment, Figure 4 As shown, a page jump query device is provided, including an acquisition module 410, a determination module 420 and a query module 430, wherein:

[0129] The acquisition module 410 is used to acquire the query target page;

[0130] A determination module 420, configured to determine the node where the target page is located based on the query target page, a preset data size per page, and a node size;

[0131] The query module 430 is used to query the cache data of the front-end page based on the node where the target page is located to obtain the query result. The cache data of the front-end page is obtained by loading the corresponding block data in the back-end data into the front-end page cache based on the current query conditions. The cache data of the front-end page includes multiple nodes, each node is used to store different block data in the back-end data.

[0132] Wherein, the query module 430 includes:

[0133] A first judgment unit, used to judge whether the node where the target page is located is in the cache data of the front-end page;

[0134] A first query unit, configured to query the cache data of the front-end page based on the node where the target page is located, and obtain a query result when it is determined that the node where the target page is located is in the cache data of the front-end page;

[0135] The second query unit is used to cache the block data corresponding to the next node in the back-end data into the cache data of the front-end page when it is determined that the node where the target page is located is not in the cache data of the front-end page, so as to update the cache data of the front-end page and call the first judgment unit.

[0136] Wherein, the second query unit includes:

[0137] A first calculation subunit, configured to calculate the number of forward nodes based on the node number of the node where the target page is located and the node number of the current node;

[0138] A first judgment subunit is used to judge whether the number of forward flipping nodes exceeds the maximum allowed number of cache nodes;

[0139] A second judgment subunit is used to judge whether the number of forward-turned nodes exceeds the maximum number of forward-traversed nodes when it is determined that the number of forward-turned nodes exceeds the maximum number of allowed cache nodes;

[0140] The update subunit is used to cache the block data corresponding to the next node in the back-end data into the cache data of the front-end page when it is determined that the number of forward-turned nodes does not exceed the maximum number of forward-traversed nodes, so as to update the cache data of the front-end page and call the first judgment unit.

[0141] Wherein, the second query unit includes:

[0142] A first determining subunit is used to determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0143] A first query subunit is used to call the ElasticSearch API to query based on the number of valid cache nodes and the node size to obtain return data;

[0144] The cache subunit is used to cache the returned data as the block data corresponding to the next node into the cache data of the front-end page to update the cache data of the front-end page.

[0145] Wherein, the first query unit includes:

[0146] A second determining subunit is used to determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0147] A second calculation subunit is used to calculate a first parameter based on the node where the target page is located, the query target page, the data size of each page and the node size, where the first parameter is used to indicate the number of data items that need to be skipped after reaching the node where the target page is located;

[0148] The second query subunit is used to call the API of ElasticSearch to perform a query based on the number of valid cache nodes and the first parameter to obtain a query result.

[0149] The second calculation subunit calculates the first parameter based on the node where the target page is located, the query target page, the data size of each page and the node size, including:

[0150] Substitute the node where the target page is located, the query target page, the data size of each page and the node size into the preset calculation formula for the range to be queried to obtain the first parameter. The preset calculation formula for the range to be queried is:

[0151] Size=gotoPage*pageSize-(gotoNode-1)*nodeSize,

[0152] Among them, gotoPage is the query target page, pageSize is the data size of each page, gotoNode is the node where the target page is located, nodeSize is the node size, and Size is the first parameter.

[0153] Among them, it also includes:

[0154] A first judgment module is used to judge whether the cache of the front-end page is invalid;

[0155] The clearing module is used to clear the cache data when it is determined that the cache of the front-end page is invalid.

[0156] Among them, it also includes:

[0157] A second judgment module is used to judge whether the current query condition has changed;

[0158] The initialization module is used to initialize the cache when determining whether the current query condition has changed, and load the corresponding block data in the backend data into the frontend page cache based on the changed current query condition.

[0159] Wherein, the determination module 420 includes:

[0160] The node calculation unit is used to substitute the query target page, the preset data size per page and the node size into a preset node calculation formula to obtain the node where the target page is located. The preset node calculation formula is: gotoNodeIdx=Ceiling(gotoPage*pageSize / nodeSize),

[0161] Among them, gotoNodeIdx is the node where the target page is located, gotoPage is the query target page, pageSize is the data size of each page, and nodeSize is the node size.

[0162] The page jump query device includes a processor and a memory. The acquisition module 410, the determination module 420 and the query module 430 are all stored in the memory as program units. The processor executes the program modules stored in the memory to implement corresponding functions.

[0163] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the page jump query method is implemented by adjusting kernel parameters.

[0164] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0165] An embodiment of the present application provides a machine-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned page jump query method is implemented.

[0166] An embodiment of the present application provides a processor, which is used to run a program, wherein the program executes the above-mentioned page jump query method when running.

[0167] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, a page jump query method is implemented. The display screen A04 of the computer device can be a liquid crystal display or an electronic ink display, and the input device A05 of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0168] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0169] In one embodiment, the process approval processing device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 5 The memory of the computer device can store various program modules that constitute the process approval processing device, such as: Figure 4 The acquisition module 410, determination module 420 and query module 430 are shown. The computer program composed of various program modules enables the processor to execute the steps of the process approval processing method of each embodiment of the present application described in this specification.

[0170] Figure 5 The computer device shown can be Figure 4 The acquisition module 410 in the process approval processing device shown executes step 210. The computer device may execute step 220 through the determination module 420 and execute step 230 through the query module 430.

[0171] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the following method steps:

[0172] Get the query target page;

[0173] Based on the query target page, the preset data size per page and the node size, determine the node where the target page is located;

[0174] Based on the node where the target page is located, a query is performed in the cache data of the front-end page to obtain a query result. The cache data of the front-end page is obtained based on the current query conditions, and the corresponding block data in the back-end data is loaded into the front-end page cache. The cache data of the front-end page includes multiple nodes, and each node is used to store different block data in the back-end data.

[0175] In one embodiment, the querying in the cache data of the front-end page based on the node where the target page is located to obtain the query result includes:

[0176] A1: Determine whether the node where the target page is located is in the cache data of the front-end page;

[0177] A2: When it is determined that the node where the target page is located is in the cache data of the front-end page, query the cache data of the front-end page based on the node where the target page is located to obtain a query result;

[0178] A3: When it is determined that the node where the target page is located is not in the cache data of the front-end page, cache the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

[0179] In one embodiment, the step of caching the block data corresponding to the next node in the backend data into the cache data of the frontend page to update the cache data of the frontend page and jumping to execute A1 includes:

[0180] Based on the node number of the node where the target page is located and the node number of the current node, the number of forward nodes is calculated;

[0181] Determine whether the number of forward nodes exceeds the maximum allowed number of cache nodes;

[0182] In the case where it is determined that the number of forward-turned nodes exceeds the maximum allowed number of cached nodes, determining whether the number of forward-turned nodes exceeds the maximum number of forward-traversed nodes;

[0183] When it is determined that the number of forward-turned nodes does not exceed the maximum number of forward-traversed nodes, the block data corresponding to the next node in the back-end data is cached into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

[0184] In one embodiment, caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page includes:

[0185] Determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0186] Based on the number of valid cache nodes and the node size, calling the ElasticSearch API to query and obtain return data;

[0187] The returned data is cached as the block data corresponding to the next node in the cache data of the front-end page to update the cache data of the front-end page.

[0188] In one embodiment, the querying in the cache data of the front-end page based on the node where the target page is located to obtain the query result includes:

[0189] Determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page;

[0190] A first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page, and the node size, where the first parameter is used to indicate the number of data items that need to be skipped after reaching the node where the target page is located;

[0191] Based on the number of valid cache nodes and the first parameter, an ElasticSearch API is called to perform a query to obtain a query result.

[0192] In one embodiment, the first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page and the node size, including:

[0193] Substitute the node where the target page is located, the query target page, the data size of each page and the node size into the preset calculation formula for the range to be queried to obtain the first parameter. The preset calculation formula for the range to be queried is:

[0194] Size=gotoPage*pageSize-(gotoNode-1)*nodeSize,

[0195] Among them, gotoPage is the query target page, pageSize is the data size of each page, gotoNode is the node where the target page is located, nodeSize is the node size, and Size is the first parameter.

[0196] In one embodiment, it further includes:

[0197] Determine whether the cache of the front-end page is invalid;

[0198] When it is determined that the cache of the front-end page is invalid, the cache data is cleared.

[0199] In one embodiment, it further includes:

[0200] Determine whether the current query condition has changed;

[0201] When determining whether the current query condition has changed, the cache is initialized, and based on the changed current query condition, the corresponding block data in the backend data is loaded into the frontend page cache.

[0202] In one embodiment, the step of determining the node where the target page is located based on the query target page, the preset data size per page, and the node size includes:

[0203] Substitute the query target page, the preset data size per page and the node size into the preset node calculation formula to obtain the node where the target page is located. The preset node calculation formula is:

[0204] gotoNodeIdx=Ceiling(gotoPage*pageSize / nodeSize),

[0205] Among them, gotoNodeIdx is the node where the target page is located, gotoPage is the query target page, pageSize is the data size of each page, and nodeSize is the node size.

[0206] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0207] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0208] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0209] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

[0211] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0212] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0213] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0214] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A page jump query method, characterized in that: The page jump query method comprises: Get the query target page; Based on the query target page, the preset data size per page and the node size, determine the node where the target page is located; Based on the node where the target page is located, a query is performed in the cache data of the front-end page to obtain a query result. The cache data of the front-end page is obtained based on the current query conditions, and the corresponding block data in the back-end data is loaded into the front-end page cache. The cache data of the front-end page includes multiple nodes, and each node is used to store different block data in the back-end data.

2. The method according to claim 1, characterized in that The querying in the cache data of the front-end page based on the node where the target page is located to obtain the query result includes: A1: Determine whether the node where the target page is located is in the cache data of the front-end page; A2: When it is determined that the node where the target page is located is in the cache data of the front-end page, query the cache data of the front-end page based on the node where the target page is located to obtain a query result; A3: When it is determined that the node where the target page is located is not in the cache data of the front-end page, cache the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

3. The method according to claim 2, characterized in that The step of caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page, and jumping to execute A1, includes: Based on the node number of the node where the target page is located and the node number of the current node, the number of forward nodes is calculated; Determine whether the number of forward nodes exceeds the maximum allowed number of cache nodes; In the case where it is determined that the number of forward-turned nodes exceeds the maximum allowed number of cached nodes, determining whether the number of forward-turned nodes exceeds the maximum number of forward-traversed nodes; When it is determined that the number of forward-turned nodes does not exceed the maximum number of forward-traversed nodes, the block data corresponding to the next node in the back-end data is cached into the cache data of the front-end page to update the cache data of the front-end page, and jump to execute A1.

4. The method according to claim 2, characterized in that: The step of caching the block data corresponding to the next node in the back-end data into the cache data of the front-end page to update the cache data of the front-end page includes: Determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page; Based on the number of valid cache nodes and the node size, calling the ElasticSearch API to query and obtain return data; The returned data is cached as the block data corresponding to the next node in the cache data of the front-end page to update the cache data of the front-end page.

5. The method according to claim 2, characterized in that: The querying in the cache data of the front-end page based on the node where the target page is located to obtain the query result includes: Determine the number of valid cache nodes in the cache data of the front-end page, where the number of valid cache nodes is the maximum node number of the valid cache nodes in the cache data of the front-end page; A first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page, and the node size, where the first parameter is used to indicate the number of data items that need to be skipped after reaching the node where the target page is located; Based on the number of valid cache nodes and the first parameter, an ElasticSearch API is called to perform a query to obtain a query result.

6. The method according to claim 5, characterized in that The first parameter is calculated based on the node where the target page is located, the query target page, the data size of each page and the node size, including: Substitute the node where the target page is located, the query target page, the data size of each page and the node size into the preset calculation formula for the range to be queried to obtain the first parameter. The preset calculation formula for the range to be queried is: Size=gotoPage*pageSize-(gotoNode-1)*nodeSize, Among them, gotoPage is the query target page, pageSize is the data size of each page, gotoNode is the node where the target page is located, nodeSize is the node size, and Size is the first parameter.

7. The method according to claim 1, characterized in that Also includes: Determine whether the cache of the front-end page is invalid; When it is determined that the cache of the front-end page is invalid, the cache data is cleared.

8. The method according to claim 1, characterized in that Also includes: Determine whether the current query condition has changed; When determining whether the current query condition has changed, the cache is initialized, and based on the changed current query condition, the corresponding block data in the backend data is loaded into the frontend page cache.

9. The method according to claim 1, characterized in that: The step of determining the node where the target page is located based on the query target page, the preset data size per page, and the node size includes: Substitute the query target page, the preset data size per page and the node size into the preset node calculation formula to obtain the node where the target page is located. The preset node calculation formula is: gotoNodeIdx=Ceiling(gotoPage*pageSize / nodeSize), Among them, gotoNodeIdx is the node where the target page is located, gotoPage is the query target page, pageSize is the data size of each page, and nodeSize is the node size.

10. A page jump query device, characterized in that: The page jump query device comprises: The acquisition module is used to obtain the query target page; A determination module, used to determine the node where the target page is located based on the query target page, the preset data size per page and the node size; The query module is used to query the cache data of the front-end page based on the node where the target page is located to obtain the query result. The cache data of the front-end page is obtained by loading the corresponding block data in the back-end data into the front-end page cache based on the current query conditions. The cache data of the front-end page includes multiple nodes, each node is used to store different block data in the back-end data.

11. A processor, characterized in that: The method is configured to execute the page jump query method according to any one of claims 1 to 9.

12. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the page jump query method according to any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the page jump query method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Big data quick query method based on Presto and Elasticsearch

    CN107748766A

  • Cache data paging query method and system and computer readable storage medium

    CN111367952A

  • Elasticsearch paging data query method and device

    CN111680063A

  • Log data processing method and device, electronic equipment and storage medium

    CN114116615A

  • Paging query method and device and computer readable storage medium

    CN114117186A