CN108984763B - Query method, client, server and computer readable medium - Google Patents

Query method, client, server and computer readable medium Download PDF

Info

Publication number
CN108984763B
CN108984763B CN201810801916.5A CN201810801916A CN108984763B CN 108984763 B CN108984763 B CN 108984763B CN 201810801916 A CN201810801916 A CN 201810801916A CN 108984763 B CN108984763 B CN 108984763B
Authority
CN
China
Prior art keywords
query
client
task
request
query task
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.)
Expired - Fee Related
Application number
CN201810801916.5A
Other languages
Chinese (zh)
Other versions
CN108984763A (en
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.)
Shenzhen Maiqi Big Data Technology Co ltd
Original Assignee
Shenzhen Maiqi Big Data Technology 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 Shenzhen Maiqi Big Data Technology Co ltd filed Critical Shenzhen Maiqi Big Data Technology Co ltd
Priority to CN201810801916.5A priority Critical patent/CN108984763B/en
Publication of CN108984763A publication Critical patent/CN108984763A/en
Application granted granted Critical
Publication of CN108984763B publication Critical patent/CN108984763B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a query method, a client, a server and a computer readable medium, wherein a task to be queried is sent to the server through the client, and the server processes the query task and then returns the query task to the client; the computer readable medium stores a computer program; the method comprises the steps that the server conducts screening and duplicate removal processing on query tasks needing to be queried by a client so as to reduce the query quantity of the client, the processed tasks needing to be queried are returned to the client to be queried by a main server, and the efficiency of the query tasks is improved according to the processing of the server.

Description

Query method, client, server and computer readable medium
Technical Field
The present invention relates to the field of data processing, and more particularly, to a query method, a client, a server, and a computer-readable medium.
Background
At present, a plurality of clients send query requests to a main server, and the main server feeds query results back to the plurality of clients respectively, so that the problem that some clients are low in query quantity and even in an idle state, and the query quantity of some clients exceeds the bearable load, which causes imbalance of network resource utilization, even leads to the problem that the clients with excessive task quantity cannot work normally, and causes low query efficiency easily occurs.
Disclosure of Invention
The invention provides a query method, a client, a server and a computer readable medium, which can improve the query efficiency.
In a first aspect, an embodiment of the present invention provides a query method, including:
receiving a query request sent by at least one client in first clients to form a first query request, wherein the first query request comprises N query tasks, and N is a positive integer greater than or equal to 1;
determining a first query task according to the first query request, wherein the first query task is a query task having a query result locally in the first query request, and sending the first query result to a second client corresponding to the first query task in the at least one first client;
determining a second query task according to the first query request and the first query task, wherein the second query task is a query task which is left by the first query task and is removed from the first query request;
determining a third query task according to the second query task, and determining a fourth query task according to the second query task and the third query task, wherein the fourth query task is a query task which is left by the third query task and is removed from the second query task;
determining a second query request according to the third query task, determining a third client corresponding to the second query request, and returning the second query request to a fourth client in the third clients, so that the fourth client queries the main server;
determining a query task of a third client corresponding to a fourth query task to generate a third query request, and returning the third query request to the third client so that the third client queries a main server;
determining a fifth query task according to the fourth query task and the third query request, wherein the fifth query task is a query task left by removing the third query request from the fourth query task;
determining a fifth client corresponding to a query task in a fifth query task, generating a fourth query request according to the query task of the fifth client corresponding to the fifth query task, and returning the fourth query request to the fifth client so that the fifth client queries the main server;
and receiving query results sent by the third client and the fourth client according to the third query request and the second query request, and returning the query results of the second query request to other clients in the third client except the fourth client.
Further, the third query task is the same query task in the second query task sent by the at least one first client.
Further, when the number of the query tasks of the third query request exceeds the query limit of the third client, the query tasks exceeding the query limit are distributed to a sixth client for query.
Further, the fourth client is a client with fewer query tasks for the third query request in the third client.
Further, the query result of the second query request is returned to other clients of the third client, where the other clients are the remaining clients of the third client excluding the fourth client.
In a second aspect, an embodiment of the present invention provides a query method, including:
sending a first query request to a server, wherein the first query request comprises N query conditions, and N is a positive integer greater than or equal to 1;
receiving a second query request returned by a server, wherein the second query request is a query request generated by redistributing a query task in the first query request sent by at least one client according to a preset rule by the server;
sending the query task in the second query request to a main server for querying;
receiving a query result returned by the main server;
sending the query result to a server;
and receiving a query result of the query task in the second query request returned by the server.
In a third aspect, an embodiment of the present invention provides a server, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a client, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of the second aspects.
In a fifth aspect, the present invention provides a computer-readable storage medium, wherein the computer storage medium stores a computer program, and the computer program includes program instructions, which, when executed by a processor, cause the processor to execute the method according to any one of the first aspect.
In a sixth aspect, the present invention provides a computer-readable storage medium, wherein the computer storage medium stores a computer program, and the computer program includes program instructions, which, when executed by a processor, cause the processor to execute the method according to any one of the second aspect.
According to the embodiment of the invention, through the query request sent by the client, the server screens and checks the query request for duplicate, and the query times of repeated query tasks are reduced, so that the number of servers of the main server does not need to be increased, or the capacity of the servers of the main server is expanded, and numerous tasks are distributed to the existing client for processing by utilizing the existing client and servers, thereby improving the query processing efficiency.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention.
In the drawings:
FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram of a method of querying in an embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram of a method of querying in an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a client according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantageous technical effects of the present invention more clearly and completely apparent, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Certain terms are used throughout the description and claims to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. The present specification and the appended claims are not to be interpreted as including any means for differentiating elements in terms of name but rather as a function of the difference between elements. "first," second, "" third, "and the like, as used in the following description and claims, are for distinguishing between similar elements and not necessarily for describing a particular order, but rather for indicating or implying a particular importance, such that" comprising "is used in an open-ended fashion, and thus should be interpreted to mean" including, but not limited to.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system.
As shown in fig. 2, an embodiment of the present invention provides a query method, including:
s01: receiving a query request sent by at least one client in first clients to form a first query request, wherein the first query request comprises N query tasks, and N is a positive integer greater than or equal to 1;
s02: determining a first query task according to the first query request, wherein the first query task is a query task having a query result locally in the first query request, and sending the first query result to a second client corresponding to the first query task in the at least one first client;
s03: determining a second query task according to the first query request and the first query task, wherein the second query task is a query task which is left by the first query task and is removed from the first query request;
s04: determining a third query task according to the second query task, and determining a fourth query task according to the second query task and the third query task, wherein the fourth query task is a query task which is left by the third query task and is removed from the second query task;
s05: determining a second query request according to the third query task, determining a third client corresponding to the second query request, and returning the second query request to a fourth client in the third clients, so that the fourth client queries the main server;
s06: determining a query task of a third client corresponding to a fourth query task to generate a third query request, and returning the third query request to the third client to enable the third client to query a main server;
s07: determining a fifth query task according to the fourth query task and the third query request, wherein the fifth query task is a query task left by removing the third query request from the fourth query task;
s08: determining a fifth client corresponding to a query task in a fifth query task, generating a fourth query request according to the query task of the fifth client corresponding to the fifth query task, and returning the fourth query request to the fifth client so that the fifth client queries the main server;
s09: and receiving query results sent by the third client and the fourth client according to the third query request and the second query request, and returning the query results of the second query request to other clients in the third client without the fourth client.
According to the embodiment of the invention, through the query request sent by the client, the server screens and checks the query request to reduce the query times of repeated query tasks, so that the number of servers of the main server does not need to be increased or the capacity of the servers of the main server is expanded, and numerous tasks are distributed to the existing client to be processed by utilizing the existing client and the existing servers, thereby improving the query processing efficiency.
The technical scheme of the embodiment of the invention can be applied to a data system. Fig. 1 is a schematic diagram of an application scenario of an embodiment of the present invention.
In fig. 1, the server 300 is configured to receive a query request of the client 200, process the query request of the client 200, return a part of query results and the processed query request to the corresponding client, and receive and store the query results obtained by the client according to the query request. For example, the server processes and converts the received query request into a database query request local to the server, so as to query the database data local to the server.
In fig. 1, the client 200 may be any one of a laptop, a desktop, a tablet, a mobile client, and the like, the number of the clients is not limited, but at least one of the clients 200 is configured to send a query request to the server 300 and receive a processed query request from the server 300, and send the processed query request and a returned query result to the main server 100.
It should be understood that the client and the server may be physical devices, or may be devices, units or modules disposed in the physical devices; in addition, the client and the server can be realized on the same physical device, or can be realized on different physical devices respectively.
FIG. 2 shows a schematic flow diagram of a query method according to an embodiment of the invention. The server may be the server in fig. 1.
Step S01: receiving a query request sent by at least one client in first clients to form a first query request, wherein the first query request comprises N query tasks, and N is a positive integer greater than or equal to 1; specifically, the query request includes query conditions sent to the main server, information to be queried, IP (internet protocol ) address information of the client, and the like, the query task includes information to be queried as needed, for example, querying a plurality of couriers, a courier site needs to query courier information in the same area, query weather information in a plurality of areas, and a student's score needs to be queried by an individual or a school, and the like, the first client is a client with a query task, and the first client includes one or more, but at least one.
Step S02: determining a first query task according to the first query request, wherein the first query task is a query task having a query result locally in the first query request, and sending the first query result to a second client corresponding to the first query task in the at least one first client; specifically, the processor of the server queries the query task of the first query request in the local database of the server, lists the query result in the local database of the server as the first query result, and lists the query task in the first query request with the first query result in the local database of the server as the first query task, where the second client is a client corresponding to the query task in the first query task and is included in the first client. It can be understood that the local database of the server may not have the first query task, because the local database of the server does not include all the main server databases, the local database of the server only stores the query result of the first query request sent by the first client to the main server, and when the local database of the server does not have the query result of the first query request, that is, does not have the first query task, the first query result is not sent to the second client, and the next step is directly performed. It will be appreciated that as the server local database stores more query results for the first query request, more query tasks will occur for its first query task. It is understood that the storage period of the server local database is adjusted according to the local query pressure of the server, for example, the storage period of the server local database is one week, the local database stores the data of the query results retained for one week, and the data of the query results received in the first day is deleted on the eighth day, so as to reduce the storage and query pressure of the local database.
Step S03: determining a second query task according to the first query request and the first query task, wherein the second query task is a query task which is left by the first query task and is removed from the first query request; specifically, the first query task returns the query result to the second client corresponding to the query task, so that the first query task does not need to be queried again, the query task of the first query task is deleted from the query tasks of the first query request, and the remaining query tasks of the first query request are listed as the second query task. It will be appreciated that in the absence of the first query task, the first query request is the second query task.
Step S04: determining a third query task according to the second query task, and determining a fourth query task according to the second query task and the third query task, wherein the fourth query task is a query task which is left by the third query task and is removed from the second query task; specifically, the third query task is the same query task in the second query task, the server determines the third query task in the second query task, the server deletes the query task of the third query task from the query tasks of the second query task, and lists the remaining query tasks in the second query task as the fourth query task.
Step S05: determining a second query request according to the third query task, determining a third client corresponding to the second query request, and returning the second query request to a fourth client in the third clients, so that the fourth client queries the main server; specifically, the server processes the third query task into a second query request, determines a client corresponding to the query task of the second query request and lists the client as a third client, where the fourth client is one of the third clients, and returns the second query request to the fourth client, so that the fourth client sends the second query request to the main service area. It is to be understood that if there is no third query task, the third client is the client corresponding to the query task in the fourth query task, and there is no fourth client.
Step S06: determining a query task of a third client corresponding to a fourth query task to generate a third query request, and returning the third query request to the third client to enable the third client to query a main server; specifically, the server lists, as a third query request, query tasks remaining after the query task corresponding to the second query request is removed from the query tasks of the third client, returns the third query request to the third client, and the third client sends the third query request to the main server. It is to be understood that, if there is no third query task, the third query request is a query task of a corresponding client in the fourth query task.
Step S07: determining a fifth query task according to the fourth query task and the third query request, wherein the fifth query task is a query task left by removing the third query request from the fourth query task; specifically, the server lists the query task in the fourth query task except the query task corresponding to the third query request as a fifth query task.
Step S08: determining a fifth client corresponding to a query task in a fifth query task, generating a fourth query request according to the query task of the fifth client corresponding to the fifth query task, and returning the fourth query request to the fifth client so that the fifth client queries the main server; specifically, the server determines a corresponding fifth client according to the query task in the fifth query task, determines the fourth query request according to the query task of the fifth query task, returns the fourth query request to the fifth client, and sends the fourth query request to the main server by the fifth client.
Step S09: receiving query results sent by the third client and the fourth client according to the third query request and the second query request, and returning the query results of the second query request to other clients in the third client without the fourth client; specifically, the server receives a query result according to the third query request sent by the third client, the server receives a query result according to the second query request sent by the fourth client, and the server returns the query result of the second query request to other clients except for one fourth client in the third client. It will be appreciated that the distribution service will not return the received query result if there is no third query task, i.e. no second query request.
Further, the third query task is the same query task in the second query task sent by the at least one first client, specifically, the query task that is the same in the second query task received and processed by the server is listed as the third query task, and the second query task is a part or all of the first query request sent by the at least one first client received and processed by the server. The third query task is screened out by the server, other clients with the same query task can query the result again, and the query quantity and the query pressure of other clients are reduced.
Further, when the number of the query tasks of the third query request exceeds the query limit of the third client, the query tasks exceeding the query limit are allocated to a sixth client for query, specifically, the query limit is set by limiting the IP access frequency of each client by the main server, and the query pressure of the main server is reduced by limiting the query limit, that is, the main server limits access prohibition to the client when the query number exceeds the query limit, the sixth client is a client that does not exceed the limit or a client that does not have a query task, and the client that does not have a query task includes a client that does not send a query request to the server or a client that does not allocate a query task to the server. By distributing the query tasks exceeding the limit to other clients in idle states again, the utilization of network resources is more balanced, and the query efficiency is higher.
Further, the fourth client is a client with fewer third query request query tasks in the third clients, specifically, the fourth client is one of the third clients, and the client with the least number of third query request query tasks in the third clients is the fourth client. By distributing the query task of the third query request to the fourth client with less query quantity, the query pressure of the client with more query quantity is reduced, and the query efficiency among the clients is balanced.
Further, the query result of the second query request is returned to other clients of the third client, where the other clients are the remaining clients of the third client except for the fourth client, specifically, the server returns the query result of the second query request to other clients of the third client, and the server returns the query result of the second query request to other clients of the third client except for one fourth client. By returning the query result with the second query request to the corresponding client, the corresponding client does not need to send the query request to the main server, so that the pressure of a query system of the main server is reduced, and the number of query tasks of the client is further increased.
Further, the present embodiment provides a query method, including:
step S01: sending a first query request to a server, wherein the first query request comprises N query conditions, and N is a positive integer greater than or equal to 1;
step S02: receiving a second query request returned by a server, wherein the second query request is a query request generated by redistributing a query task in the first query request sent by at least one client according to a preset rule by the server;
step S03: sending the query task in the second query request to a main server for querying;
step S04: receiving a query result returned by the main server;
step S05: sending the query result to a server;
step S06: and receiving a query result of the query task in the second query request returned by the server.
The preset rule of step S02 is according to the server processing method described above, where the second query request is a query task that is repeated among query tasks remaining from query tasks already in the local database in the first query request received by the server, and then the corresponding client is determined to be the third client by the second query request server, and the third client only needs to query by one of the clients, that is, the fourth client, because the third client has repeated query tasks, and the fourth client sends the query result of the second query request to the server and then returns the query result to the other clients in the third client.
The query result received in step S04 is the query result of the primary server sending the second query request according to the client.
The query result sent in step S05 is the query result of the second query request received by the client.
Wherein, the other clients except the fourth client in the third clients of step S06 receive the query result of the second query request returned by the server.
The embodiments of the present patent will be described in detail below with reference to specific examples. It should be noted that these examples are only for helping those skilled in the art better understand the embodiments of the present invention, and do not limit the scope of the embodiments of the present invention.
In the first scenario, assuming that the client has A, B, C, D, the host server queries for a credit of 50 pieces, where:
the query tasks of A are 0001, 0002 and 0003(0001, 0002 and 0003 can respectively represent 3 express waybill numbers).
And B, querying tasks are 0005, 0006, 0010, 0015 and 0020.
C is the query tasks of 0001, 0002, 0004, 0005, 0006 and 0007.
And D, querying tasks are 0010, 0011 and 0012.
Client A, B, C, D constitutes a first client.
Query tasks 0001, 0002, 0003, 0005, 0006, 0010, 0015, 0001, 0002, 0004, 0005, 0006, 0007, 0010, 0011, 0012 of the client A, B, C, D constitute the query tasks in the first query request, wherein a, 0001, 0002, 0003, B, 0005, 0006, 0010, 0015, 0020, C, 0001, 0002, 0004, 0005, 0006, 0007, D, 0010, 0011, 0012.
Assume that the local database of the server already stores data for the query results of 0001, 0002, 0004, 0100, 0200.
The server determines the first query tasks 0001, 0002, 0004.
The server determines second clients A and C corresponding to the first query tasks 0001, 0002 and 0004, wherein the original requests of A comprise 0001, 0002 and 0003, and the original requests of C comprise 0001, 0002, 0004, 0005, 0006 and 0007.
And the server sends the query results of the query tasks 0001, 0002 and 0004 corresponding to the first query task to the second clients A and C.
The server determines second query tasks 0003, 0005, 0006, 0010, 0015, 0005, 0006, 0007, 0010, 0011 and 0012 according to the first query request and the first query task, wherein the second query tasks remove the rest of the first query tasks for all the query tasks in the first query request, the second query task 0003 is the query task of a, the second query tasks 0005, 0006, 0010, 0015 and 0020 are the query tasks of B, the second query tasks 0005, 0006 and 0007 are the query tasks of C, and the second query tasks 0010, 0011 and 0012 are the query tasks of D.
The server determines a third query task 0005, 0006, 0010, which is the same query task of all query tasks of the second query task.
The server determines fourth query tasks 0003, 0015, 0007, 0010, 0011, 0012, 0020, the fourth query task removing the remaining query tasks of the third query task for all query tasks of the second query task.
The server determines the second query request 0005, 0006, 0010 according to the third query task.
The server determines the third client B, C and D to which the second query request corresponds.
The server determines that one of the third clients B, C and D is the fourth client, i.e., fourth client B or fourth client C or fourth client D.
The server determines that the corresponding query tasks of third client B, C and D in the fourth query task generated a third query request, where third query requests 0015, 0020 are query tasks of B, where third query request 0007 is a query task of C, and where third query requests 0011, 0012 are query tasks of D.
And the server determines a fourth client C according to the fact that the fourth client is a client with fewer query tasks of a third query request in the third clients.
The server returns the second query requests 0005, 0006 and 0010 to the fourth client C, the query tasks of the client C are 0005, 0006 and 0010, and the fourth client C queries the second query requests from the main server.
The server returns a third query request to the third client B, C and D, where B has query tasks of 0015 and 0020, C has query tasks of 0007, D0011 and 0012, and D has query tasks of 0011 and 0012.
The server determines a fifth query task 0003, wherein the second non-query task is a query task remaining after the third query request is removed from the fourth query task.
The server determines a fourth query request 0003.
The server determines a fifth client a, wherein the query task of a is 0003, and the fifth client a queries the main server for the fourth query request.
In the second scenario, assuming that the client has A, B, C, D, E, F, the host server queries for a credit of 50 pieces, where:
the query tasks of A are 0001, 0002 and 0003(0001, 0002 and 0003 can respectively represent 3 express waybill numbers).
And B, querying tasks are 0005, 0006, 0010, 0015 and 0020.
C is the query tasks of 0001, 0002, 0004, 0005, 0006 and 0007.
And D, querying tasks are 0010, 0011 and 0012.
The query tasks of E are 0001, 0002, 0003 … … 0010, 0050 … … 0120.
The query tasks for F are 0100, 0200, 0300, 0400.
Client A, B, C, D, E, F constitutes a first client.
Query tasks 0001, 0002, 0003, 0005, 0006, 0010, 0015, 0001, 0002, 0004, 0005, 0006, 0007, 0010, 0011, 0012, 0001, 0002, 0003 … … 0010, 0050 … … 0120, 0100, 0200, 0300, 0400 of client A, B, C, D, E, F constitute a first query request, wherein a0001, 0002, 0003, B0005, 0006, 0010, 0015, 0020, C0001, 0002, 0004, 0005, 0006, 0007, D0010, 0011, 0012, E0001, 0002, 0003 … … 0010, 0050 … … 0120, F0100, 0200, 0300, 0400.
Assume that the server's local database already has data for 0001, 0002, 0004, 0015, 0100, 0200.
The server determines the first query task 0001, 0002, 0004, 0015, 0100, 0200.
The server determines a second client A, B, C, E, F corresponding to the first query task, where the original request of a includes 0001, 0002, 0003, the original request of B includes 0005, 0006, 0010, 0015, 0020, the original request of C includes 0001, 0002, 0004, 0005, 0006, 0007, the original request of E includes 0001, 0002, 0003 … … 0010, 0050 … … 0120, and the original request of F includes 0100, 0200, 0300, 0400.
The server sends the query results of the query tasks 0001, 0002, 0004, 0015, 0100, 0200 corresponding to the first query task to the second client A, B, C, E, F.
The server determines, according to the first query request and the first query task, second query tasks 0003, 0005, 0006, 0010, 0005, 0006, 0007, 0010, 0011, 0012, 0003, 0005 … … 0010, 0050 … … 0099, 0101 … … 0120, 0300, 0400, which remove the query tasks remaining from the first query task for all query tasks in the first query request, wherein the second query task 0003 is the query task of a, wherein the second query tasks 0005, 0006, 0010, 0020 are the query tasks of B, wherein the second query tasks 0005, 0006, 0007 are the query tasks of C, wherein the second query tasks 0010, 0011, 0012 are the query tasks of D, wherein the second query tasks 0003, … … 0010, 0050 … … 0099, 010360120 are the query tasks of E, wherein the second query tasks 0300, 0400 are the query tasks of 030f.
The server determines a third query task 0003, 0005, 0006, 0007, 0010, which is the same query task of all query tasks of the second query task.
The server determines fourth query tasks 0008, 0009, 0011, 0012, 0020, 0050 … … 0099, 0101 … … 0120, 0300, 0400, which remove the remaining query tasks of the third query task for all query tasks of the second query task.
The server determines a second query request 0003, 0005, 0006, 0007, 0010 according to the third query task.
The server determines the third client A, B, C, D, E to which the second query request corresponds,
the server determines that one of the third clients A, B, C, D, E is a fourth client, i.e., fourth client a, fourth client B, fourth client C, fourth client D, or fourth client E.
The server determines that the corresponding query task of the third client A, B, C, D, E in the fourth query task generates a third query request, wherein the third query request does not have a query task of a, wherein the third query request 0020 is a query task of B, wherein the third query request does not have a query task of C, wherein the third query requests 0011, 0012 are query tasks of D, wherein the third query requests 0008, 0009, 0050 … … 0099, 0101 … … 0120 are query tasks of E.
And the server determines a fourth client A or C according to the fact that the fourth client is a client with fewer third query request query tasks in the third clients.
The server returns the second query request 0003, 0005, 0006, 0007, 0010 to the fourth client a0003, 0005, 0006, 0007, 0010 or C0003, 0005, 0006, 0007, 0010, which queries the second query request from the main server.
The server returns a third query request to the third client A, B, C, D, E, where the query task of B is 0020, and the query tasks of D are 0011, 0012, and E are 0008, 0009, 0050 … … 0099, 0101 … … 0120.
The server distributes 22 pieces of client E exceeding the inquiry quota to a sixth client for inquiry.
The server determines fifth query tasks 0300 and 0400, and the second non-query task is the query task which is left by removing the third query request from the fourth query task.
The server determines the fourth query request 0300, 0400.
The server determines a fifth client F, wherein F0300, 0400, said fifth client F queries said fourth query request from the host server.
Further, as shown in fig. 5, an embodiment of the present invention provides a server 300, which includes a processor 310, an input device 330, an output device 340, and a memory 320, where the processor 310, the input device 330, the output device 340, and the memory 320 are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the allocation method of the server in each of the above embodiments. Specifically, the processor processes a query request of a client into a query task, the input device includes a touch pad, a keyboard, a microphone, and the like, the output device is configured to return the query request of the client, the output device may be a display, a touch screen, and the like, the memory is configured to store and receive a query result of the client, the processor, the input device, the output device, and the memory complete mutual communication through a communication bus 250, and the computer program is configured to control the server to execute the server allocation method.
Further, as shown in fig. 4, an embodiment of the present invention provides a client 200, which includes a processor 210, an input device 230, an output device 240, and a memory 220, where the processor 210, the input device 230, the output device 240, and the memory 220 are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to invoke the program instructions, and the query method of the client in the foregoing embodiments. Specifically, the processor processes a query request of a client into a query task, the input device is configured to receive the query request of the client, the input device includes a touch pad, a keyboard, a microphone, and the like, the output device is configured to return the query request of the client, the output device may be a display, a touch screen, and the like, the memory is configured to store and receive a query result of the client, the processor, the input device, the output device, and the memory complete mutual communication through a communication bus 250, and the computer program is configured to control the server to execute the query method of the client.
Further, a computer-readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the allocation method of the server. The computer readable storage medium may be, for example, the hard disk or memory of the server. The computer readable storage medium may also be an external storage device of the server, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the server. Further, the computer-readable storage medium is used for storing the computer program and other programs and data required by the server. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Further, a computer-readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform a query method of the client. The computer readable storage medium may be, for example, the hard disk or memory of the client. The computer readable storage medium may also be an external storage device of the client, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the client. Further, the computer-readable storage medium is used for storing the computer program and other programs and data required by the client. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (5)

1. A method of querying, comprising:
receiving a query request sent by at least one client in first clients to form a first query request, wherein the first query request comprises N query tasks, and N is a positive integer greater than or equal to 1;
determining a first query task according to the first query request, wherein the first query task is a query task having a query result locally in the first query request, and sending the first query result to a second client corresponding to the first query task in the at least one first client;
determining a second query task according to the first query request and the first query task, wherein the second query task is a query task which is left by the first query task and is removed from the first query request;
determining a third query task according to the second query task, and determining a fourth query task according to the second query task and the third query task, wherein the third query task is the same query task in the second query task sent by the at least one first client, and the fourth query task is the query task which is left by the third query task and is removed from the second query task;
determining a second query request according to the third query task, determining a third client corresponding to the second query request, and returning the second query request to a fourth client in the third clients, so that the fourth client queries a main server, wherein the fourth client is a client with fewer query tasks of the third query request in the third clients;
determining a query task of a third client corresponding to a fourth query task to generate a third query request, and returning the third query request to the third client to enable the third client to query a main server;
determining a fifth query task according to the fourth query task and the third query request, wherein the fifth query task is a query task left by removing the third query request from the fourth query task;
determining a fifth client corresponding to a query task in a fifth query task, generating a fourth query request according to the query task of the fifth client corresponding to the fifth query task, and returning the fourth query request to the fifth client so that the fifth client queries the main server;
and receiving query results sent by the third client and the fourth client according to the third query request and the second query request, and returning the query results of the second query request to other clients in the third client except the fourth client.
2. The query method of claim 1, wherein when the number of the query tasks of the third query request exceeds the query limit of the third client, the query tasks exceeding the query limit are allocated to a sixth client for query.
3. A server comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of claim 2.
4. A client comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of claim 2.
5. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any of the claims 2.
CN201810801916.5A 2018-07-20 2018-07-20 Query method, client, server and computer readable medium Expired - Fee Related CN108984763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810801916.5A CN108984763B (en) 2018-07-20 2018-07-20 Query method, client, server and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810801916.5A CN108984763B (en) 2018-07-20 2018-07-20 Query method, client, server and computer readable medium

Publications (2)

Publication Number Publication Date
CN108984763A CN108984763A (en) 2018-12-11
CN108984763B true CN108984763B (en) 2021-10-01

Family

ID=64548517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810801916.5A Expired - Fee Related CN108984763B (en) 2018-07-20 2018-07-20 Query method, client, server and computer readable medium

Country Status (1)

Country Link
CN (1) CN108984763B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814102B2 (en) * 2005-12-07 2010-10-12 Lexisnexis, A Division Of Reed Elsevier Inc. Method and system for linking documents with multiple topics to related documents
CN102081626A (en) * 2009-11-30 2011-06-01 中国移动通信集团北京有限公司 Data inquiring method and data inquiring server
CN102209047A (en) * 2011-05-24 2011-10-05 苏州阔地网络科技有限公司 Instant messaging system and method for realizing information sharing
CN103390061A (en) * 2013-07-31 2013-11-13 浙江大学 Multi-level cache-based sea spatio-temporal data accessing method taking user as center
CN103678520A (en) * 2013-11-29 2014-03-26 中国科学院计算技术研究所 Multi-dimensional interval query method and system based on cloud computing
CN105843900A (en) * 2016-03-23 2016-08-10 腾讯科技(深圳)有限公司 Information inquiry method and device
US9542451B2 (en) * 2014-09-05 2017-01-10 Google Inc. Mobile application search ranking
CN106407250A (en) * 2015-07-28 2017-02-15 阿里巴巴集团控股有限公司 Information query method, device and system, server and client side
CN107229623A (en) * 2016-03-23 2017-10-03 泰康保险集团股份有限公司 Data query processing method and processing device
CN107402926A (en) * 2016-05-18 2017-11-28 华为技术有限公司 A kind of querying method and query facility

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2731040B1 (en) * 2012-11-08 2017-04-19 CompuGroup Medical SE Computer system for storing and retrieval of encrypted data items, client computer, computer program product and computer-implemented method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814102B2 (en) * 2005-12-07 2010-10-12 Lexisnexis, A Division Of Reed Elsevier Inc. Method and system for linking documents with multiple topics to related documents
CN102081626A (en) * 2009-11-30 2011-06-01 中国移动通信集团北京有限公司 Data inquiring method and data inquiring server
CN102209047A (en) * 2011-05-24 2011-10-05 苏州阔地网络科技有限公司 Instant messaging system and method for realizing information sharing
CN103390061A (en) * 2013-07-31 2013-11-13 浙江大学 Multi-level cache-based sea spatio-temporal data accessing method taking user as center
CN103678520A (en) * 2013-11-29 2014-03-26 中国科学院计算技术研究所 Multi-dimensional interval query method and system based on cloud computing
US9542451B2 (en) * 2014-09-05 2017-01-10 Google Inc. Mobile application search ranking
CN106407250A (en) * 2015-07-28 2017-02-15 阿里巴巴集团控股有限公司 Information query method, device and system, server and client side
CN105843900A (en) * 2016-03-23 2016-08-10 腾讯科技(深圳)有限公司 Information inquiry method and device
CN107229623A (en) * 2016-03-23 2017-10-03 泰康保险集团股份有限公司 Data query processing method and processing device
CN107402926A (en) * 2016-05-18 2017-11-28 华为技术有限公司 A kind of querying method and query facility

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
大数据查询性能优化的研究与实现;孙建洲;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180415(第4期);全文 *
海量关系型数据查询优化技术研究;张宝权;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180615(第6期);全文 *

Also Published As

Publication number Publication date
CN108984763A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
EP3210134B1 (en) Composite partition functions
CN106055706A (en) Cache resource storage method and device
US9851960B2 (en) Tenant allocation in multi-tenant software applications
CN110244901B (en) Task allocation method and device and distributed storage system
US11693686B2 (en) Enhanced management of storage repository availability in a virtual environment
CN106533961B (en) Flow control method and device
CN111427670A (en) Task scheduling method and system
CN105045762A (en) Management method and apparatus for configuration file
CN114615340A (en) Request processing method and device, computer equipment and storage device
CN109582439B (en) DCN deployment method, device, equipment and computer readable storage medium
CN106940712B (en) Sequence generation method and device
CN108989072B (en) Method and device for deploying, managing and calling assembly
CN108388409B (en) Print request processing method, apparatus, computer device and storage medium
CN114036031A (en) Scheduling system and method for resource service application in enterprise digital middleboxes
CN108984763B (en) Query method, client, server and computer readable medium
CN106682198B (en) Method and device for realizing automatic database deployment
CN102970349A (en) Distributed hash table (DHT) network storage load balancing method
CN112398892A (en) Service distribution method, device and equipment
CN110427390B (en) Data query method and device, storage medium and electronic device
CN111683164B (en) IP address configuration method and VPN service system
CN114020430A (en) Distributed task scheduling method and device, electronic equipment and storage medium
CN114328439A (en) Data storage method and device, electronic equipment and storage medium
CN110046040B (en) Distributed task processing method and system and storage medium
CN112380040A (en) Message processing method and device, electronic equipment and storage medium
US11379409B2 (en) System and method for managing file system references at scale

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210906

Address after: 518000 307, building e, functional supporting area, Taohuayuan Zhichuang Town, Tiegang community, Xixiang street, Bao'an District, Shenzhen, Guangdong

Applicant after: Shenzhen Maiqi Big Data Technology Co.,Ltd.

Address before: 362400 No. 39, Yi Road, Guangde village, Chengxiang Town, Anxi County, Quanzhou City, Fujian Province

Applicant before: Xu Zhicai

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211001