CN110765158A - Paging query method, system and device - Google Patents

Paging query method, system and device Download PDF

Info

Publication number
CN110765158A
CN110765158A CN201911051751.5A CN201911051751A CN110765158A CN 110765158 A CN110765158 A CN 110765158A CN 201911051751 A CN201911051751 A CN 201911051751A CN 110765158 A CN110765158 A CN 110765158A
Authority
CN
China
Prior art keywords
data
query
client
server
acquired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911051751.5A
Other languages
Chinese (zh)
Inventor
于振永
邹明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911051751.5A priority Critical patent/CN110765158A/en
Publication of CN110765158A publication Critical patent/CN110765158A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The embodiment of the application provides a paging query method, a paging query system and a paging query device, and relates to the technical field of databases. The method is applied to a server communicated with a client, a database is configured in the server, a plurality of pieces of data are stored in the database, firstly, a data query request sent by the client is received, and the data query request carries the number of the data to be acquired. And then, acquiring a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired. And finally, sending the query content data to the client so that the client displays the received query content data on the same display page. Therefore, the server can process the query service with large data volume in a grading way, and the working efficiency of the server is improved.

Description

Paging query method, system and device
Technical Field
The invention relates to the technical field of databases, in particular to a paging query method, a paging query system and a paging query device.
Background
The method is characterized in that partial enterprise information display on a risk control platform project mainly takes enterprises as dimensions, and industrial and commercial data information disclosed by the enterprises, such as lists of patent details, honor awards, pledge projects, product trademarks and the like obtained by the enterprises, is searched, and the data of one enterprise cannot be too large, but generally, only 5 to 10 pieces of data are displayed on a single page of a webpage typesetting, so that a paging technology is required. As for a general management system, a relational database is used to store such data, and a Structured Query Language (SQL) is used to store, Query, update and manage the data, so that a paging function can be conveniently completed. However, if the large data platform is used, the number of related enterprises is huge, and the traditional relational database is difficult to support massive data query.
Currently, in order to obtain the paging effect of a similar relational database based on an Hbase database, when the number of the results of one query can be estimated, paging is usually selected at a client, that is, the client sends a request to a server based on a large data platform, retrieves all data result sets, obtains the number of the results, and performs paging according to the current paging size. However, because the amount of data is too large, the method of querying a lot of data at a time occupies more computing resources, wastes resources of the server, and causes the server to be unable to process other services in time. How to process query services with large data volume and improve the working efficiency of the server is a problem worthy of research at present.
Disclosure of Invention
In view of the above, embodiments of the present application provide a method, a system, and an apparatus for paging query to solve the above problem.
In a first aspect, an embodiment provides a paging query method, which is applied to a server in communication with a client, where a database is configured in the server, and multiple pieces of data are stored in the database, and the paging query method includes:
receiving a data query request sent by the client, wherein the data query request carries the quantity of data to be acquired;
acquiring a corresponding amount of query content data from a target data set in the database according to the amount of the data to be acquired;
and sending the query content data to the client so that the client displays the received query content data on the same display page.
In an optional implementation manner, the data query request further carries a query field, and before the step of obtaining a corresponding amount of query content data from a target data set in the database according to the amount of the data to be obtained, the method further includes:
acquiring the query field;
and filtering the data in the database according to the query field to obtain a target data set.
In an alternative embodiment, the plurality of pieces of data in the target data set are stored in a form of a data table, each row of the data table is marked with a row key, and the step of acquiring a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired includes:
judging whether the data query request comprises an initial row key or not, and if so, determining a target row in the data table according to the initial row key;
if the initial row key is not included, determining a target row in the data table according to a preset default initial row key;
and extracting the query content data with the same number as the data to be acquired from each line starting from the target line of the data table.
In an optional embodiment, the step of extracting, from each row starting from the target row of the data table, the query content data having the same number as the number of the data to be acquired includes:
comparing the quantity of the data in all the rows starting from the target row of the data table with the quantity of the data to be acquired;
if the number of the data in all the rows is smaller than or equal to the number of the data to be acquired, taking the data in all the rows as corresponding query content data;
if the number of the data in all the rows is larger than the number of the data to be acquired, extracting the query content data with the same number as the number of the data to be acquired from each row starting from the target row of the data table, taking a row key of a next row of the extracted last data as a new starting row key, and returning the new starting row key to the client.
In an alternative embodiment, the method further comprises:
acquiring the current residual calculated amount of the server;
comparing the residual calculation amount with a preset residual calculation threshold;
if the residual calculation amount is larger than the preset residual calculation threshold, acquiring a corresponding amount of query content data from the target data set according to the amount of the data to be acquired;
and actively sending the query content data to the client.
In a second aspect, an embodiment provides a paging query method, applied to a client communicating with a server, the method including:
sending a data query request to the server, wherein the data query request carries the number of data to be acquired;
and receiving the returned query content data of the corresponding quantity obtained by the server based on the quantity of the data to be obtained in the data query request, and displaying the query content data on the same display page.
In a third aspect, an embodiment provides a paging query system, including a client and a server in communication with the client, where the server is configured with a database;
the client sends a data query request to the server, wherein the data query request carries the quantity of data to be acquired;
the server receives a data query request sent by the client, acquires a corresponding amount of query content data from a target data set in the database according to the amount of data to be acquired, and sends the query content data to the client;
and the client receives the query content data returned by the server based on the data query request and displays the query content data on the same display page.
In a fourth aspect, an embodiment provides a paging query apparatus, which is applied to a server in communication with a client, where a database is configured in the server, and the database stores a plurality of pieces of data, and the paging query apparatus includes:
the receiving module is used for receiving a data query request sent by the client, wherein the data query request carries the quantity of data to be acquired;
the query module is used for acquiring a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired;
and the sending module is used for sending the query content data to the client so that the client can display the received query content data on the same display page.
In a fifth aspect, an embodiment provides a server, which includes a processor, a memory and a bus, where the memory stores machine-readable instructions executable by the processor, and when an electronic device runs, the processor and the memory communicate with each other through the bus, and the processor executes the machine-readable instructions to perform the steps of the paging query method according to any one of the foregoing embodiments.
In a sixth aspect, an embodiment provides a readable storage medium, in which a computer program is stored, and the computer program, when executed, implements the steps of the paging query method according to any one of the foregoing embodiments.
The embodiment of the invention provides a paging query method, a paging query system and a paging query device, wherein the paging query method is applied to a server communicated with a client, a database is configured in the server, a plurality of pieces of data are stored in the database, firstly, a data query request sent by the client is received, and the data query request carries the number of the data to be acquired. And then, acquiring a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired. And finally, sending the query content data to the client so that the client displays the received query content data on the same display page. Therefore, the server can process the query service with large data volume in a grading way, and the working efficiency of the server is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram illustrating a structure of a paging query system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a paging query method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of another paging query method according to an embodiment of the present disclosure;
fig. 4 is a functional block diagram of a paging query device according to an embodiment of the present disclosure.
Icon: 1-paging inquiry system; 100-a server; 130-paging query means; 131-a receiving module; 132-a query module; 133-a sending module; 200-client.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
The inventor researches and discovers that in order to obtain the paging effect of a similar relational database based on an Hbase database, for the situation that the quantity of the results of one query can be estimated, the paging is usually selected at a client side, namely, the client side sends a request to a server based on a large data platform, all data result sets are retrieved, the quantity of the results is obtained, and the paging is carried out according to the current paging size. However, because the amount of data is too large, the method of querying a lot of data at a time occupies more computing resources, wastes resources of the server, and causes the server to be unable to process other services in time. How to process query services with large data volume and improve the working efficiency of the server is a problem worthy of research at present.
Based on the above research, the embodiment of the present application provides a paging query method, system and device, the method is applied to a server in communication with a client, a database is configured in the server, a plurality of pieces of data are stored in the database, and a corresponding number of query content quantities are obtained from a target data set according to a data query request sent by the client and according to a to-be-obtained number of data carried in the data query request, that is, the server queries query content data with a fixed data quantity at a time and returns the query content data to the client, so that the client displays on the same page. The above method is explained in detail below.
Referring to fig. 1, fig. 1 is a paging query system 1 provided in an embodiment of the present application, including a client 200 and a server 100 communicating with the client 200, wherein the server 100 is configured with a database.
The client 200 sends a data query request to the server 100, where the data query request carries the number of data to be acquired.
The server 100 receives the data query request sent by the client 200, acquires a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired, and sends the query content data to the client 200. The number of the data to be acquired is the number of data displayed in the same page, that is, the number of data displayed in the typesetting single page of the web page may be 5, 10, 15 or 20.
The client 200 receives the query content data returned by the server 100 based on the data query request, and displays the query content data on the same display page.
Referring to FIG. 2, the server 100 responds to the data query request sent by the client 200 through steps S1-S3. The specific process shown in FIG. 2 is described in detail below.
The embodiment of the present application provides a paging query method, which is applied to a server 100 in communication with a client 200, where the server 100 is configured with a database, and the database stores a plurality of pieces of data, and the paging query method includes:
s1, receiving a data query request sent by the client 200, where the data query request carries the number of data to be acquired.
And S2, acquiring corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired.
In this embodiment, the database configured by the server 100 may be an HBase database. The HBase is a Hadoop database, can provide random and real-time read-write access functions for big data, has the characteristics of open source, distribution, expandability and column-oriented storage, and aims to store and process large-scale data, and more particularly, can process thousands of rows and columns of data by using common hardware configuration.
The HBase database stores data in the form of a data table (referred to as HBase table herein), and the HBase table may be composed of rows and columns, as shown in table 1, which is an example of the HBase table. And the row key (RowKey) is an index of the HBase table, when a query request is received, if the RowKey carried by the query request is 001, the content queried from the HBase table is first row data, and the first row data is returned. In addition, the column family (columnamaly) may be composed of one or more columns, where in table 1, name, address, age, phone number, mailbox, etc. are metadata, and each metadata corresponds to a plurality of attribute values, for example, the attribute value corresponding to the metadata "name" may be: three, four, five, six, etc., and the attribute value corresponding to the metadata "mobile phone number" may be: 150 XXXXXXXXX, 189 XXXXXXXXX, 186XXXXXXX, etc.
TABLE 1HBase TABLE (data sheet)
Figure BDA0002255499480000101
Optionally, before S2, for a case that the data query request further carries a query field, the embodiment of the present application may further include the following steps:
first, the query field is obtained.
And secondly, filtering the data in the database according to the query field to obtain the target data set.
For example, the data query request carries a query field, such as an attribute value (e.g., beijing) of certain metadata (e.g., address). Through the steps, a query field-Beijing is obtained firstly, then, data in the database are filtered according to the query field, and a target data set with addresses of both Beijing is obtained.
As an embodiment, the following steps may be performed to obtain a corresponding amount of query content data from the target data set in the database according to the amount of the data to be obtained.
Firstly, judging whether the data query request comprises a starting row key, and if the data query request comprises the starting row key, determining a target row in the data table according to the starting row key.
And secondly, if the initial row key is not included, determining a target row in the data table according to a preset default initial row key.
And finally, extracting the query content data with the same number as the data to be acquired from each line starting from the target line of the data table.
Referring to table 1 again, when the client 200 first sends a data query request to the server 100, the data query request generally does not include the start row key, and at this time, a data row corresponding to the target row key 001 in the data table is determined according to a preset default start row key, for example, 001. Meanwhile, it is assumed that the number of data to be acquired is 10. From the data row corresponding to the row key 001, the data corresponding to the row key 001-.
Alternatively, the number of pieces of query content data equal to the number of pieces of data to be acquired may be extracted in the following steps.
First, the number of data in all rows from the target row of the data table is compared with the size of the number of data to be acquired.
And if the number of the data in all the rows is less than or equal to the number of the data to be acquired, taking the data in all the rows as corresponding query content data.
If the number of the data in all the rows is greater than the number of the data to be acquired, extracting the query content data with the same number as the number of the data to be acquired from each row starting from the target row of the data table, taking the row key of the next row of the extracted last data as a new starting row key, and returning the new starting row key to the client 200.
If the number of the data to be acquired is 10, the data table includes 98 pieces of data, and the number of the data in all the rows starting from the target row of the data table is compared with the number of the data to be acquired, so that it can be known that the number of the data in all the rows is greater than the number of the data to be acquired, the data corresponding to the row key 001-. And simultaneously, taking the row key 011 corresponding to the next row of data of 010 as a new initial row key, and returning the new initial row key to the client 200.
And circulating in this way, when the initial row key is 091 in the acquired data query request, comparing the number of data in all rows where the target row 091 of the data table starts with the number of the data to be acquired to know, and if the number of data in all rows in the data table is equal to the number of the data to be acquired, taking all data in the data table as corresponding query content data.
As another case, assuming that the number of the data to be acquired is 10, the data table includes 8 pieces of data, and comparing the number of the data in all the rows with the number of the data to be acquired, and if the number of the data in all the rows in the data table is smaller than the number of the data to be acquired, all the data in the data table is used as the corresponding query content data.
Optionally, in this embodiment of the application, when the number of data in all rows in the data table is less than or equal to the number of data to be acquired, the position of the back page flag may also be set to 1, and the data is returned to the client 200. That is, it indicates that there is no acquirable data, so that the client 200 performs corresponding processing according to the post-page flag.
When the number of data in all rows in the data table is greater than the number of data to be acquired, the back page flag position may be set to 0, and returned to the client 200. That is, it indicates that there is data available for the client 200 to perform corresponding processing according to the post-page flag.
S3, sending the query content data to the client 200, so that the client 200 displays the received query content data on the same display page.
According to the paging query method, the data to be queried are acquired in a plurality of times according to the data query request and the number of the data to be acquired, so that the paging complexity is reduced, the bandwidth consumption of interface network communication can be improved, and the service efficiency of a large data platform is greatly improved.
Optionally, as an implementation manner, the server 100 and the client 200 are connected through a websocket, and are currently connected based on a conventional Transmission Control Protocol (TCP), when the above paging query method is implemented, after a client sends a data query request, the server 100 and the client 200 are disconnected, and this process still takes a certain time, so that the server 100 can actively push within a preset calculation threshold by combining the following steps in a websocket connection manner, and the purpose of improving paging query efficiency is achieved. The method comprises the following specific steps:
first, the current remaining calculation amount of the server 100 is acquired. The remaining calculation amount may be determined according to the CPU usage amount, the remaining memory, and the remaining disk usage rate of the server 100.
Secondly, the residual calculation amount is compared with a preset residual calculation threshold value. And if the residual calculation amount is larger than the preset residual calculation threshold, acquiring a corresponding amount of query content data from the target data set according to the amount of the data to be acquired.
Finally, the query content data is actively sent to the client 200.
Taking the number of data to be acquired as 10 as an example, after the client 200 sends a data query request to the server 100, the server 100 acquires the current remaining calculation amount, and when the remaining calculation amount is greater than the preset remaining calculation threshold, the server 100 actively sends a plurality of groups of data to the client 200 in a plurality of times according to the number of the data to be acquired as one group of data.
Referring to fig. 3, the client 200 sends a data query request to the server 100 through steps S100 to S200, and receives query data content returned by the server 100 based on the data query request. The specific process shown in FIG. 3 is described in detail below.
S100, sending a data query request to the server 100, wherein the data query request carries the number of data to be acquired.
S200, receiving the corresponding amount of returned query content data obtained by the server 100 based on the amount of the data to be obtained in the data query request, and displaying the query content data on the same display page.
After receiving the query content data returned by the server 100, if more data needs to be acquired, the data query request may be sent to the server 100 again, at this time, the start row key carried in the query content data obtained last time may be sent to the server 100 together with the data query request sent second time, so that the server 100 executes the content disclosed in steps S1-S3 in fig. 2.
When the received query content data includes the front page flag and the back page flag, the display page of the client 200 is also adjusted according to the front page flag and the back page flag. For example, if the flag bit of the current page is 1, it indicates that there is a previous page at this time, and if not, there is no previous page. When the flag bit of the next page is 0, it indicates that the next page exists at this time, otherwise, the next page does not exist.
The client 200 may perform corresponding processing on the corresponding virtual display key according to the flag bit. For example, when the current page flag is 1, the virtual display key corresponding to the previous page is displayed in blue, and the virtual display key is enabled to be clicked. And when the flag bit of the current page is 0, displaying the virtual display key corresponding to the previous page as grey, and enabling the virtual display key not to be clicked.
And when the flag bit of the back page is 1, displaying the virtual display key corresponding to the next page as blue, and enabling the virtual display key to be capable of clicking. And when the flag bit of the back page is 0, displaying the virtual display key corresponding to the next page as grey, and enabling the virtual display key not to be clicked.
The query content data returned by the server 100 may be realized through steps S1-S3 in fig. 2.
The specific type of the client 200 is not limited, and may be, for example, but not limited to, a device having a processing function, such as a smart phone, a Personal Computer (PC), a tablet computer, a Personal Digital Assistant (PDA), and a Mobile Internet Device (MID).
On the basis, as shown in fig. 4, an embodiment of the present application further provides a paging query device 130, which is applied to a server 100 in communication with a client 200, where a database is configured in the server 100, and the database stores a plurality of pieces of data, and the paging query device 130 includes:
the receiving module 131 is configured to receive a data query request sent by the client 200, where the data query request carries the number of data to be acquired.
And the query module 132 is configured to obtain a corresponding amount of query content data from the target data set in the database according to the amount of the data to be obtained.
The sending module 133 is configured to send the query content data to the client 200, so that the client 200 displays the received query content data on the same display page.
It can be understood that, for the specific operation method of each functional module in the embodiment of the present application, reference may be made to the detailed description of the corresponding step in the foregoing method embodiment, and repeated descriptions are not repeated here.
The embodiment of the present application further provides a server 100, where the server 100 includes a processor, a memory and a bus, where the memory stores machine-readable instructions executable by the processor, and when an electronic device runs, the processor and the memory communicate with each other through the bus, and the processor executes the machine-readable instructions to perform the steps of the paging query method in any of the above-mentioned implementation manners.
The memory, processor and other components are electrically connected to each other, directly or indirectly, to enable signal transmission or interaction.
For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The paging inquiry apparatus 130 includes at least one software functional module which can be stored in the memory in the form of software or firmware (firmware). The processor is used to execute an executable module stored in the memory, such as a software functional module or a computer program included in the paging inquiry apparatus 130.
The Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor may be an integrated circuit chip having signal processing capabilities. The processor may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like.
But may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In this embodiment, the memory is configured to store a program, and the processor is configured to execute the program after receiving the execution instruction. The method defined by the process disclosed in any of the embodiments of the present application may be applied to or implemented by a processor.
It will be appreciated that the server 100 may have more or fewer components or a different configuration than shown in the above-described compositions. The components may be implemented in hardware, software, or a combination thereof.
An embodiment of the present application further provides a readable storage medium, in which a computer program is stored, and when the computer program is executed, the steps of the above paging query method are implemented. In summary, embodiments of the present invention provide a paging query method, a paging query system, an apparatus, a server 100, and a readable storage medium, where the method is applied to a server 100 in communication with a client 200, where the server 100 is configured with a database, and the database stores a plurality of pieces of data, and first, receives a data query request sent by the client 200, where the data query request carries a quantity of data to be obtained. And then, acquiring a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired. And finally, sending the query content data to the client 200, so that the client 200 displays the received query content data on the same display page. Therefore, the server 100 can process the query service with a large data volume in a plurality of times, and the working efficiency of the server 100 is improved.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. The paging query method is applied to a server which is communicated with a client, wherein a database is configured in the server, and a plurality of pieces of data are stored in the database, and comprises the following steps:
receiving a data query request sent by the client, wherein the data query request carries the quantity of data to be acquired;
acquiring a corresponding amount of query content data from a target data set in the database according to the amount of the data to be acquired;
and sending the query content data to the client so that the client displays the received query content data on the same display page.
2. The paging query method according to claim 1, wherein the data query request further carries a query field, and before the step of obtaining a corresponding amount of query content data from a target data set in the database according to the amount of the data to be obtained, the method further comprises:
acquiring the query field;
and filtering the data in the database according to the query field to obtain a target data set.
3. The paging query method as claimed in claim 1, wherein the plurality of pieces of data in the target data set are stored in a form of a data table, each row of the data table is marked with a row key, and the step of obtaining a corresponding amount of query content data from the target data set in the database according to the amount of the data to be obtained comprises:
judging whether the data query request comprises an initial row key or not, and if so, determining a target row in the data table according to the initial row key;
if the initial row key is not included, determining a target row in the data table according to a preset default initial row key;
and extracting the query content data with the same number as the data to be acquired from each line starting from the target line of the data table.
4. The paging query method as claimed in claim 3, wherein the step of extracting query content data with the same number as the number of the data to be acquired from each row starting from the target row of the data table comprises:
comparing the quantity of the data in all the rows starting from the target row of the data table with the quantity of the data to be acquired;
if the number of the data in all the rows is smaller than or equal to the number of the data to be acquired, taking the data in all the rows as corresponding query content data;
if the number of the data in all the rows is larger than the number of the data to be acquired, extracting the query content data with the same number as the number of the data to be acquired from each row starting from the target row of the data table, taking a row key of a next row of the extracted last data as a new starting row key, and returning the new starting row key to the client.
5. The paging query method as claimed in claim 1, further comprising:
acquiring the current residual calculated amount of the server;
comparing the residual calculation amount with a preset residual calculation threshold;
if the residual calculation amount is larger than the preset residual calculation threshold, acquiring a corresponding amount of query content data from the target data set according to the amount of the data to be acquired;
and actively sending the query content data to the client.
6. A paging query method applied to a client communicating with a server, the method comprising:
sending a data query request to the server, wherein the data query request carries the number of data to be acquired;
and receiving the corresponding amount of query content data which is returned by the server and is obtained based on the amount of the data to be obtained in the data query request, and displaying the query content data on the same display page.
7. The paging inquiry system is characterized by comprising a client and a server communicated with the client, wherein the server is provided with a database;
the client sends a data query request to the server, wherein the data query request carries the quantity of data to be acquired;
the server receives a data query request sent by the client, acquires a corresponding amount of query content data from a target data set in the database according to the amount of data to be acquired, and sends the query content data to the client;
and the client receives the query content data returned by the server based on the data query request and displays the query content data on the same display page.
8. A paging inquiry apparatus, which is applied to a server communicating with a client, the server having a database configured therein, the database storing a plurality of pieces of data, the paging inquiry apparatus comprising:
the receiving module is used for receiving a data query request sent by the client, wherein the data query request carries the quantity of data to be acquired;
the query module is used for acquiring a corresponding amount of query content data from the target data set in the database according to the amount of the data to be acquired;
and the sending module is used for sending the query content data to the client so that the client can display the received query content data on the same display page.
9. A server, comprising a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when an electronic device is running, the processor and the memory communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the paging query method according to any one of claims 1 to 6.
10. A readable storage medium, in which a computer program is stored, which, when executed, implements the steps of the paging query method according to any one of claims 1 to 6.
CN201911051751.5A 2019-10-31 2019-10-31 Paging query method, system and device Pending CN110765158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911051751.5A CN110765158A (en) 2019-10-31 2019-10-31 Paging query method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911051751.5A CN110765158A (en) 2019-10-31 2019-10-31 Paging query method, system and device

Publications (1)

Publication Number Publication Date
CN110765158A true CN110765158A (en) 2020-02-07

Family

ID=69334930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911051751.5A Pending CN110765158A (en) 2019-10-31 2019-10-31 Paging query method, system and device

Country Status (1)

Country Link
CN (1) CN110765158A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400347A (en) * 2020-03-20 2020-07-10 北京思特奇信息技术股份有限公司 Paging query method, system and electronic equipment
CN114697296A (en) * 2020-12-29 2022-07-01 深圳旦倍科技有限公司 Network distribution method, device, storage medium and collector
CN115098215A (en) * 2022-07-19 2022-09-23 重庆紫光华山智安科技有限公司 Data paging method, system, electronic device and storage medium based on multiple services

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617232A (en) * 2013-11-26 2014-03-05 北京京东尚科信息技术有限公司 Paging inquiring method for HBase table
CN105843956A (en) * 2016-04-14 2016-08-10 北京搜狐新媒体信息技术有限公司 Paging query method and system
CN106326361A (en) * 2016-08-10 2017-01-11 中国农业银行股份有限公司 HBase database-based data inquiry method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617232A (en) * 2013-11-26 2014-03-05 北京京东尚科信息技术有限公司 Paging inquiring method for HBase table
CN105843956A (en) * 2016-04-14 2016-08-10 北京搜狐新媒体信息技术有限公司 Paging query method and system
CN106326361A (en) * 2016-08-10 2017-01-11 中国农业银行股份有限公司 HBase database-based data inquiry method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400347A (en) * 2020-03-20 2020-07-10 北京思特奇信息技术股份有限公司 Paging query method, system and electronic equipment
CN114697296A (en) * 2020-12-29 2022-07-01 深圳旦倍科技有限公司 Network distribution method, device, storage medium and collector
CN114697296B (en) * 2020-12-29 2023-12-05 深圳旦倍科技有限公司 Distribution network method, device, storage medium and collector
CN115098215A (en) * 2022-07-19 2022-09-23 重庆紫光华山智安科技有限公司 Data paging method, system, electronic device and storage medium based on multiple services

Similar Documents

Publication Publication Date Title
US20200372007A1 (en) Trace and span sampling and analysis for instrumented software
CN110765158A (en) Paging query method, system and device
US8898200B2 (en) Insight generation from statistical measure/dimension combinations
CN110020086B (en) User portrait query method and device
US10922361B2 (en) Identifying and structuring related data
WO2017096892A1 (en) Index construction method, search method, and corresponding device, apparatus, and computer storage medium
CN111046034A (en) Method and system for managing memory data and maintaining data in memory
CN108897874B (en) Method and apparatus for processing data
WO2017189269A1 (en) Ranking contextual metadata to generate relevant data insights
CN109669980B (en) Cross-database access method and device for data
CN107315753B (en) Paging method and device across multiple databases
CN115438087B (en) Data query method, device, storage medium and equipment based on cache library
CN111339171A (en) Data query method, device and equipment
US20230185816A1 (en) Columnar Techniques for Big Metadata Management
CN112307264A (en) Data query method and device, storage medium and electronic equipment
US20220121638A1 (en) Index data structures and graphical user interface
US20220253764A1 (en) Systems and methods for distributed risk analysis
CN110928900B (en) Multi-table data query method, device, terminal and computer storage medium
CN111259056A (en) Block chain data query method, system and related equipment
AU2009280854A1 (en) Method to send a short message service (SMS) campaign to a related object by selecting the base object
US7725468B2 (en) Improving efficiency in processing queries directed to static data sets
CN108536763B (en) Pull-down prompting method and device
CN112699187B (en) Associated data processing method, device, equipment, medium and product
WO2023197865A1 (en) Information storage method and apparatus
CN110874365B (en) Information query method and related equipment thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200207