CN106886548A - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN106886548A
CN106886548A CN201610629496.8A CN201610629496A CN106886548A CN 106886548 A CN106886548 A CN 106886548A CN 201610629496 A CN201610629496 A CN 201610629496A CN 106886548 A CN106886548 A CN 106886548A
Authority
CN
China
Prior art keywords
data
target pages
client
server
inquiry request
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.)
Granted
Application number
CN201610629496.8A
Other languages
Chinese (zh)
Other versions
CN106886548B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610629496.8A priority Critical patent/CN106886548B/en
Publication of CN106886548A publication Critical patent/CN106886548A/en
Application granted granted Critical
Publication of CN106886548B publication Critical patent/CN106886548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Abstract

The application provides data query method and device, and methods described includes:The data inquiry request for target pages that client sends is received, id set and the quantity of the target pages display data of client data from the target pages that local data source reads are carried in the data inquiry request;The 2nd id set of data in the target pages is inquired about according to the quantity;The 2nd id set that will be inquired is compared with id set in the data inquiry request;In the case where comparing and showing that id set and the 2nd id set have identical id, when returning to Query Result to the client, the data with identical id are not returned to.Using the embodiment of the present application, not only realize when client data is inquired about and reduce Flux Loss, and because server need not return to the data for being present in client and server simultaneously, the data volume for returning to client is reduced, so as to shorten the data query response time.

Description

Data query method and device
Technical field
The application is related to field of computer technology, more particularly to data query method and device.
Background technology
As the development of computer technology, the data recorded in internet are more and more, can all there is magnanimity number all the time According to generation.
Generally, in the case where data are more, for example flowing water type data (such as bill information, sequence information, micro-blog information, Wechat circle of friends information etc.), cannot disposably be shown in client, common customer ends are carried by the way of Pagination Display What supply user checked.It is such to be advantageous in that, during each client query data, the number that need to only inquire about in a paging page According to without once all inquiring about all data one time, so reducing the data interaction between client and server so as to carry Search efficiency high, shorten the data query response time.
However, in this mode, user checks or during refresh page that client can all initiate a data query every time Request, even if specifically inquiring about in the case of the data identical that the data for obtaining and last inquiry are obtained, server can also be returned Whole data, institute can consume a large amount of flows for client by this way.Especially for mobile client, due to The flow of every month is limited, and the problem of the Flux Loss can become more to protrude.
The content of the invention
The application provides a kind of data query method and device, with solve it is existing there are client query data when flow damage The larger problem of consumption.
According to a kind of data query method that the embodiment of the present application is provided, methods described includes:
Client is received for inquiring about in target pages after the query statement of data, and the target is read from local data source The id set of data and the data in the page, when last inquiry target pages are preserved in the local data source The data that server is returned;
The user end to server sends data inquiry request, and an id collection is carried in the data inquiry request Close the quantity with the target pages display data;
After the server receives the data inquiry request, data in the target pages are inquired about according to the quantity The 2nd id set;
The 2nd id set that the server will be inquired is compared with id set;
In the case where comparing and showing that id set and the 2nd id set have identical id, the server is to visitor When family end returns to Query Result, the data with identical id are not returned;
After the client receives the Query Result that the server is returned, with described from being somebody's turn to do that local data source reads Show after data are merged in target pages.
According to a kind of data query method that the embodiment of the present application is provided, methods described is applied to client, methods described Including:
Receive for inquiring about in target pages after the query statement of data, read in the target pages from local data source The first id set of data and the data, server when last inquiry target pages are preserved in the local data source The data of return;
Data inquiry request is sent to server, the id set and the mesh are carried in the data inquiry request Mark the quantity of page presentation data;
After receiving the Query Result that the server is returned, with described from the target pages that local data source reads Data show after merging.
According to a kind of data query method that the embodiment of the present application is provided, methods described is applied to server, methods described Including:
The data inquiry request for target pages that client sends is received, is carried in the data inquiry request State id set and target pages display data of client data from the target pages that local data source reads Quantity;
The 2nd id set of data in the target pages is inquired about according to the quantity;
The 2nd id set that will be inquired is compared with id set in the data inquiry request;
In the case where comparing and showing that id set and the 2nd id set have identical id, returned to the client When returning Query Result, the data with identical id are not returned.
According to a kind of data query arrangement that the embodiment of the present application is provided, described device is applied to client, described device Including:
Reading unit, receives for inquiring about in target pages after the query statement of data, and being read from local data source should The id set of data and the data in target pages, preserves last inquiry page object in the local data source The data that server is returned during face;
Transmitting element, data inquiry request is sent to server, and an id collection is carried in the data inquiry request Close the quantity with the target pages display data;
Display unit, after receiving the Query Result that the server is returned, with described from being somebody's turn to do that local data source reads Show after data are merged in target pages.
According to a kind of data query arrangement that the embodiment of the present application is provided, described device is applied to server, described device Including:
Receiving unit, receives the data inquiry request for target pages that client sends, the data inquiry request In carry client data from the target pages that local data source reads an id set and the page object The quantity of face display data;
Query unit, the 2nd id set of data in the target pages is inquired about according to the quantity;
Comparing unit, the 2nd id set that will be inquired is compared with id set in the data inquiry request Compared with;
Returning unit, in the case where comparing and showing that id set and the 2nd id set have identical id, to institute When stating client return Query Result, the data with identical id are not returned.
In the embodiment of the present application, by comparing the data inquired on local data that client reads and server, For simultaneous data in client and server, server need not return to the data, and client is directly using local The data for reading.In this way, not only realize when client data is inquired about that Flux Loss is reduced, and due to server It is present in the data of client and server simultaneously without returning, the data volume for returning to client is reduced, so as to shorten number According to query responding time.
Brief description of the drawings
Fig. 1 is the schematic diagram of client end interface under the bill inquiry scene that the application is provided;
Fig. 2 is the schematic diagram of client end interface under the circle of friends inquiry scene that the application is provided;
Fig. 3 is the flow chart of the data query method that the embodiment of the application one is provided;
Fig. 4 is that user's operation client pull-up and drop-down data list are shown in the circle of friends inquiry scene that the application is provided It is intended to;
Fig. 5 be the application provide circle of friends inquiry scene in user operation client pull-up data list after page presentation Schematic diagram;
Fig. 6 be the application provide circle of friends inquiry scene in user operation client pull-up data list after another page Face shows schematic diagram;
Fig. 7 is the flow chart of the data query method that the embodiment of the application one is provided;
Fig. 8 is the flow chart of the data query method that the embodiment of the application one is provided;
Fig. 9 is a kind of hardware structure diagram of equipment where the data query arrangement that the embodiment of the application one is provided;
Figure 10 is the module diagram of the data query arrangement that the embodiment of the application one is provided;
Figure 11 is a kind of hardware structure diagram of equipment where the data query arrangement that the embodiment of the application one is provided;
Figure 12 is the module diagram of the data query arrangement that the embodiment of the application one is provided.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in implementation method do not represent all implementation methods consistent with the application.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind ", " described " and " being somebody's turn to do " of singulative used in the application and appended claims is also intended to include majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wraps May be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for being distinguished from each other open same type of information.For example, not departing from In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
The application provide embodiment in, client as data inquiry request sender, server is used as data The recipient of inquiry request, the client can be specially mobile phone, panel computer, notebook computer, desktop computer etc..Its In, client can send data inquiry request when the data display page or refresh data displayed page is entered to server, The data that inquiry is obtained are inquired about and returned to server after the data inquiry request is received, and client receives return Data after be shown.
Example below in conjunction with a specific flowing water type data is illustrated, as shown in figure 1, inquiring about fund branch at one In the scene for going out/taking in, user opens the stored value card app (Application, using journey installed on mobile phone (i.e. client) Sequence), check nearest payment funding/income data by clicking on " bill " on mobile phone screen.Now, mobile phone can be to the electricity The server of sub- wallet app sends billing data inquiry request, and billing data is returned after the server lookup, and the mobile phone connects Show the billing data of return after receipts on screen.
The example in conjunction with a specific pipeline data is illustrated below, as shown in Fig. 2 inquiring about circle of friends at one In the scene that good friend releases news, user opens the chat software installed on mobile phone (i.e. client), passes through on mobile phone screen " circle of friends " is clicked on to check the information of nearest good friend's issue.Now, mobile phone can send friend to the server of the chat software Circle information inquiring request, returns to circle of friends information after the server lookup, the mobile phone shows return after receiving on screen Circle of friends information.
It should be noted that pipeline data is without modification function, once i.e. data genaration, can only be deleted, and Can not modify.
Fig. 3 is referred to, is the flow chart of the data query method that the embodiment of the application one is provided, comprised the following steps:
Step 110:Client is received for inquiring about in target pages after the query statement of data, is read from local data source The id set of data and the data in the target pages is taken, last inquiry mesh is preserved in the local data source The data that server is returned during the mark page.
It is described to be typically what is triggered by user for inquiring about the query statement of data in target pages in the present embodiment, such as In Fig. 2, after user clicks on " circle of friends ", it is possible to the query statement of data in triggering inquiry homepage (i.e. target pages), make Client receives query statement for inquiring about data in homepage.
Again for example, in fig. 4, user want to know the information of " flying bird " issue before other friends issue information When, lower page of data query statement, the refresh page if one page is not descended can be triggered by way of drop-down data list Face.Similar, when user wants to know the information of other friends issue after the information of " Zhang San " issue, can also be by upper Draw the mode of data list, triggering page up data query instruction, if without page up, triggering refresh page.
The data that server is returned when last inquiry target pages are preserved in the local data source.
General, each data can have an id, the unique mark of corresponding generation when the id is server record data. Server return inquiry obtain data when can also carry the id so that in the local data source id of data with It is consistent on server.
Generally, target pages can show multiple data, so data in the target pages under reading local data source Id also can be multiple, the multiple id read under the local data source can be referred to as into an id collection in the present embodiment Close.
Step 120:The user end to server sends data inquiry request, is carried in the data inquiry request described First id gathers the quantity with the target pages display data.
Generally, the quantity for display data being capable of in target pages is limited.The bill page as shown in Figure 1 can show number According to quantity be 5.The quantity for being capable of display data in the circle of friends page as shown in Figure 2 only has 3.
Step 130:After the server receives the data inquiry request, the page object is inquired about according to the quantity The 2nd id set of data in face.
In the present embodiment, the server is receiving the data inquiry request for target pages of client transmission Afterwards, so can according in the data inquiry request carry quantity target pages are inquired about in the server storage Data, and obtain the 2nd id set of data.
The memory space of the server can be the memory space such as database of server itself, can also be and institute State the external data base that the external memory space of server association is for example associated with server.
The inquiry can be with data in paging query, i.e. the server target pages according to the quantity paging query 2nd id gathers.It is assumed that the data are 3, target pages are page 2, then server enters with 3 for one page carries out paging And search the 2nd id set of data in page 2.
Step 140:The 2nd id set that the server will be inquired is compared with id set.
In actual applications, it is same that the data for being recorded on server (such as newly-increased data, delete data) for some reason Data can be with the difference of record in client in target pages.
Hereinafter refer to described in Fig. 5, before 5 minutes user enter circle of friends when as shown in the figure on the left side in Fig. 4, after 5 minutes If user is by upper stroke data list refresh page, then homepage content is just in the local data source that client reads " Zhang San ... ", " little Bai ... " and " flying fish ... ", it is assumed that id is respectively 7,6,5, then the client is to clothes The id set that the data inquiry request that business device sends is carried is { 7,6,5 }.Generally, by after 5 minutes, may be different Good friend issued new information, so the difference that the data that homepage is inquired on server will read with client.It is false " elder sister " has issued an information " beans are had a meal quickly beans today in kindergarten, it is stated that also praised by teacher " before being located at 1 minute, Information id is 8, then the 2nd id collection of server lookup to circle of friends homepage is combined into { 8,7,6 }.
Step 150:In the case where comparing and showing that id set and the 2nd id set have identical id, the clothes When business device returns to Query Result to client, the data of the identical id are not returned.
The example in previous step is continued to use, because the 2nd id set { 8,7,6 } and id set { 7,6,5 } is with identical Id:7 and 6;So when server returns to Query Result to client, the data that id is 7 and 6 are not returned to, it is 8 only to return to id Data are " beans are had a meal quickly beans today in kindergarten, it is stated that also praised by teacher " of " elder sister " and " before one minute " issue.
Step 160:After the client receives the Query Result that the server is returned, read from local data source with described Show after data are merged in the target pages got.
In the present embodiment, continue to continue to use the example with previous step, client receives the inquiry of server return Result is " beans are had a meal quickly beans today in kindergarten, it is stated that also praised by teacher " of " elder sister " issue, and the id of the information is 8。
Client reads in local data source and obtains data and be:
Id is 7, " Zhang San ... ";
Id is 6, " little Bai ... ";
Id is 5, " flying fish ... ".
After the client merging data, because the Query Result surface for returning increased newly one " elder sister " before 1 minute " beans are had a meal quickly beans today in kindergarten, it is stated that also praised by teacher " information of issue, and due to not returning to other numbers According to, illustrate that the data that id is 7,6,5 are still present, and due to being only able to display 3 data in mobile phone screen, after being sorted according to id, As shown in the figure on the right in Fig. 5, the information of displaying is " elder sister ... ";" Zhang San ... ";" little Bai ... ".
In the embodiment of the present application, by comparing the data inquired on local data that client reads and server, For simultaneous data in client and server, server need not return to the data, and client is directly using local The data for reading.In this way, not only realize when client data is inquired about that Flux Loss is reduced, and due to server It is present in the data of client and server simultaneously without returning, the data volume for returning to client is reduced, so as to shorten number According to query responding time.
If it is noted that client receive inquiry target pages data query instruction after, in local data The data of the fall short page are read in source, illustrates that client first enters into target pages, then the client just it is direct to Server sends the data inquiry request for target pages.It is unlike the embodiments above, nothing in asking in this case Id set need to be carried.It is no longer specific herein to launch because this data query is same as the prior art.But, it is and existing Unlike technology, after server returns to Query Result, Query Result can be stored in local data source by the client In, when being easy to next client query, data in local data source can be read.
In actual applications, except the data for increasing newly in server, it is also possible to there are the data of deletion.In the reality of the application Apply in example, the Query Result that the server lookup is obtained can be obtained in the following way:
In the case where comparing and showing that an id is existed only in the 2nd id set, by the corresponding data notes of the id In entering Query Result;
In the case where comparing and showing that an id is existed only in id set, the id is charged into Query Result.
In the present embodiment, server in the case where comparing and showing that an id is existed only in the 2nd id set, explanation The data of the id exist, do not exist on the client on the server, i.e., the data of the id are the data increased newly on server, institute Need for the corresponding data of the id to charge to Query Result with the server, to cause that client knows the number of the newly-increased id According to.
Server illustrates that the data of the id exist in the case where comparing and showing that an id is existed only in id set Do not exist on server, exist on the client, i.e., the data of the id are the data deleted on server, so the server The id is charged to Query Result by needs, to cause that client knows that the corresponding data of the id have been deleted.
Have been described above in the above-described embodiments, draw the id set and the 2nd id set with identical comparing In the case of id, the data of the identical id are not returned.That is, for the data all existed on server and client side, The data for not recording the identical id in Query Result do not record identical id in itself yet.
Below with one specifically example be illustrated, as shown in fig. 6, user refreshes circle of friends by upper stroke data list Homepage, due to increasing the information " elder sister ... " that id is 8 in server lookup to homepage newly, deletes the information that id is 7 and " opens Three ... ";So server gathers the 2nd id set that { 7,6,5 } and inquiry are obtained in the id that relatively client is provided After { 8,6,5 }, the final Query Result for obtaining is:Id is 8 " elder sister ... ";Id is 7.In this way, client is received returning After the Query Result for returning, it is recognised that having increased the information " elder sister ... " that id is 8 on server newly, the letter that id is 7 is deleted Breath, and id is 6 and 5 Information invariability, so that the data shown after merging with the data read in local data source are such as Shown in figure on the right of Fig. 6.
In one of the application specifically embodiment, the Query Result that the server is returned is received in the client Afterwards, with it is described show after data are merged from the target pages that local data source reads after, methods described is also wrapped Include:
The client updates data in the local data source according to the Query Result.
In the present embodiment, still it is illustrated with the example of Fig. 6, the data recorded in the client local data source For:
Id is 7, " Zhang San ... ";
Id is 6, " little Bai ... ";
Id is 5, " flying fish ... ".
According to the Query Result, that is, increase the information that id is 8 newly, delete the information that id is 7, the local data after renewal The data of record are in source:
Id is 8, " elder sister ... ";
Id is 6, " little Bai ... ";
Id is 5, " flying fish ... ".
In actual use, data storage can excessively cause client to be run relatively slowly in local data source, or Person's client interim card etc. experiences poor situation, in order to solve the problems, such as because data storage excessively causes in local data source. In embodiments herein, the option for deleting data in local data source can also be provided.
By the present embodiment, user can be by deleting the data preserved in local data source, so as to avoid client The problem of storing excess data, so improves Consumer's Experience in local data source.
In actual applications, carry out paging query need consumption time and resource than larger, in order to solve this problem, One of the application is specifically in embodiment, described from local in the step 110 on the basis of embodiment illustrated in fig. 3 Data source reads the id set of data and the data in the target pages, can specifically include:
Data in the target pages, the id set of the data and last number in page up are read from local data source According to id.
Correspondingly, except carrying the id set and target pages displaying in the data inquiry request Outside the quantity of data, in addition it is also necessary to carry positioning id, the positioning id is the id of last data in the page up.
After the server receives the data inquiry request, the number of data after the inquiry positioning id 2nd id gathers.
It is assumed that in the case that current page is homepage, if lower stroke of data list of user, due to the mesh The mark page is not homepage, the client read in local data source data in the target pages, the data id set 4, 3,2 } and in page up the id of last data is 5;Positioning id is also carried in the data inquiry request that the client sends is 5.Server need to only inquire about the 2nd id set that positioning id is 3 data after 5 in inquiry.
It is noted that in the case where target pages are homepage, due to no page up, so just in the absence of positioning Id, its query process is identical with above-described embodiment, and server directly inquires about second of number of data described in first page Id gathers.
By the present embodiment, because server need not carry out paging query, the query process of server is optimized, so as to carry The search efficiency of server high.
Fig. 7 is referred to, is the flow chart of the data query method that the embodiment of the application one is provided, the embodiment is from client Side is described, and the embodiment can be comprised the following steps with corresponding diagram 3:
Step 210:Receive for inquiring about in target pages after the query statement of data, the mesh is read from local data source The id set of data and the data in the mark page, preserves last inquiry target pages in the local data source When server return data;
Step 220:Data inquiry request is sent to server, the id set is carried in the data inquiry request With the quantity of the target pages display data;
Step 230:After receiving the Query Result that the server is returned, with described mesh read from local data source Data show after merging in the mark page.
If it is noted that client receive inquiry target pages data query instruction after, in local data The data of the fall short page are read in source, illustrates that client first enters into target pages, then the client just it is direct to Server sends the data inquiry request for target pages.It is unlike the embodiments above, data query in this case Id set need not be carried in request.It is no longer specific herein to launch because this data query is same as the prior art.But It is that unlike the prior art, after server returns to Query Result, Query Result can be stored in this by the client In ground data source, when being easy to next client query, data in local data source are read.
It is noted that after the client receives the Query Result that the server is returned, with described from local After showing after data are merged in the target pages that data source reads, methods described also includes:
The client updates data in the local data source according to the Query Result.
In actual use, data storage can excessively cause client to be run relatively slowly in local data source, or Person's client interim card etc. experiences poor situation, in order to solve the problems, such as because data storage excessively causes in local data source. In embodiments herein, the option for deleting data in local data source can also be provided.
By the present embodiment, user can be by deleting the data preserved in local data source, so as to avoid client The problem of storing excess data, so improves Consumer's Experience in local data source.
One of the application is specifically in embodiment, on the basis of embodiment illustrated in fig. 7, in the step 210, and institute The id set that data and the data in the target pages are read from local data source is stated, can specifically be included:
Data in the target pages, the id set of the data and last number in page up are read from local data source According to id.
Correspondingly, except carrying the id set and target pages displaying in the data inquiry request Outside the quantity of data, in addition it is also necessary to carry positioning id, the positioning id is the id of last data in the page up.
Fig. 8 is referred to, is the flow chart of the data query method that the embodiment of the application one is provided, the embodiment is from server Side is described, and the embodiment can be comprised the following steps with corresponding diagram 3:
Step 310:The data inquiry request for target pages that client sends is received, in the data inquiry request Carry id set and target pages of client data from the target pages that local data source reads The quantity of display data;
Step 320:The 2nd id set of data in the target pages is inquired about according to the quantity;
Step 330:The 2nd id set that will be inquired is compared with id set in the data inquiry request Compared with;
Step 340:In the case where comparing and showing that id set and the 2nd id set have identical id, to described When client returns to Query Result, the data with identical id are not returned.
In actual applications, except the data for increasing newly in server, it is also possible to there are the data of deletion.It is described in the application Embodiment in, the Query Result that the server lookup is obtained, can following manner combination obtain:
Show that an id is existed only under the request during the 2nd id gathers comparing, by the corresponding data notes of the id In entering Query Result;
In the case where comparing and showing that an id is only existed in id set, the id is charged into Query Result.
Certainly, also including having been described above:Show that the id set and the 2nd id set have identical id comparing In the case of, the data of the identical id are not returned.That is, for the data all existed on server and client side, The data for not recording the identical id in Query Result do not record identical id in itself yet.
In one of the application specifically embodiment, on the basis of embodiment illustrated in fig. 8, the data inquiry request Also carry positioning id, the positioning id be the client from the target pages page up that local data source reads most The latter id of data;
Then the step 320, specifically includes:
The 2nd id set of the number of data after the inquiry positioning id.
It is corresponding with aforementioned data querying method embodiment, present invention also provides the embodiment of data query arrangement.
The embodiment of the application data query arrangement can be applied in client respectively.Device embodiment can be by software Realize, it is also possible to realized by way of hardware or software and hardware combining.As a example by implemented in software, as on a logical meaning Device, be in by the processor of equipment where it, corresponding computer program instructions in nonvolatile memory are read Deposit what middle operation was formed.From for hardware view, as shown in figure 9, one kind of equipment where the application data query arrangement is hard Part structure chart, in addition to the processor shown in Fig. 9, network interface, internal memory and nonvolatile memory, device in embodiment The equipment at place can also include other hardware generally according to the actual functional capability of the data query, and this is repeated no more.
It is the module map of the data query arrangement that the embodiment of the application one is provided referring to Figure 10, the embodiment is from client Side is described, and described device includes:Reading unit 410, transmitting element 420 and display unit 430.
Wherein, reading unit 410, receive for inquiring about in target pages after the query statement of data, from local data The id set of data and the data in the target pages is read in source, and last inquiry is preserved in the local data source The data that server is returned during the target pages;
Transmitting element 420, data inquiry request is sent to server, and an id is carried in the data inquiry request Set and the quantity of the target pages display data;
Display unit 430, after receiving the Query Result that the server is returned, reads with described from local data source The target pages in data merge after show.
In an optional implementation:
Described device can also include:
Updating block, according to the Query Result, updates data in the local data source.
In an optional implementation:
The reading unit 410, specifically includes:
From local data source read data in the target pages, the data an id set and page up in last The id of individual data,
The transmitting element 420, specifically includes:
Data inquiry request is sent to server, the id set, the mesh are carried in the data inquiry request The quantity and positioning id of page presentation data are marked, the positioning id is the id of last data in the page up.
It is corresponding with aforementioned data querying method embodiment, present invention also provides the embodiment of data query arrangement.
The embodiment of the application data query arrangement can be applied in server respectively.Device embodiment can be by software Realize, it is also possible to realized by way of hardware or software and hardware combining.As a example by implemented in software, as on a logical meaning Device, be in by the processor of equipment where it, corresponding computer program instructions in nonvolatile memory are read Deposit what middle operation was formed.It is that one kind of equipment where the application data query arrangement is hard as shown in figure 11 from for hardware view Part structure chart, in addition to the processor shown in Figure 11, network interface, internal memory and nonvolatile memory, fills in embodiment Equipment where putting can also include other hardware generally according to the actual functional capability of the data query, and this is repeated no more.
It is the module map of the data query arrangement that the embodiment of the application one is provided referring to Figure 12, the embodiment is from server Side is described, and described device includes:Receiving unit 510, query unit 520, comparing unit 530 and returning unit 540.
Wherein, receiving unit 510, receive the data inquiry request for target pages that client sends, the data Carried in inquiry request client data from the target pages that local data source reads an id set and The quantity of the target pages display data;
Query unit 520, the 2nd id set of data in the target pages is inquired about according to the quantity;
Comparing unit 530, will inquire the 2nd id set and an id in the data inquiry request gather into Row compares;
Returning unit 540, in the case where comparing and showing that id set and the 2nd id set have identical id, to When the client returns to Query Result, the data with identical id are not returned.
In an optional implementation:
The Query Result, in the following way combination is obtained:
Show that an id is existed only under the request during the 2nd id gathers comparing, by the corresponding data notes of the id In entering Query Result;
In the case where comparing and showing that an id is only existed in id set, the id is charged into Query Result.
In an optional implementation:
In the receiving unit 510, it is the client that the data inquiry request also carries positioning id, the positioning id Hold the id of last data from the target pages page up that local data source reads;
Then, the query unit 520, specifically includes:
The 2nd id set of the number of data after the inquiry positioning id.
In sum, the embodiment for being provided by the application, in local data and server that relatively client reads On after the data that inquire, for simultaneous data in client and server, server need not return to the data, and Client directly uses the data for locally reading.In this way, not only realize when client data is inquired about reducing flow Loss, and it is present in the data of client and server simultaneously without returning due to server, reduce and return to client Data volume, so as to shorten the data query response time.
The function of unit and the implementation process of effect correspond to step in specifically referring to the above method in said apparatus Implementation process, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is referring to method reality Apply the part explanation of example.Device embodiment described above is only schematical, wherein described as separating component The unit of explanation can be or may not be physically separate, and the part shown as unit can be or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Selection some or all of module therein is needed to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
Those skilled in the art will readily occur to its of the application after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the application, these modifications, purposes or Person's adaptations follow the general principle of the application and including the undocumented common knowledge in the art of the application Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the application and spirit are by following Claim is pointed out.
It should be appreciated that the application is not limited to the precision architecture for being described above and being shown in the drawings, and And can without departing from the scope carry out various modifications and changes.Scope of the present application is only limited by appended claim.

Claims (16)

1. a kind of data query method, it is characterised in that methods described includes:
Client is received for inquiring about in target pages after the query statement of data, and the target pages are read from local data source The first id set of middle data and the data, services when last inquiry target pages are preserved in the local data source The data that device is returned;
The user end to server sends data inquiry request, carried in the data inquiry request id set and The quantity of the target pages display data;
After the server receives the data inquiry request, the of data in the target pages is inquired about according to the quantity Two id gather;
The 2nd id set that the server will be inquired is compared with id set;
In the case where comparing and showing that id set and the 2nd id set have identical id, the server is to client When returning to Query Result, the data with identical id are not returned;
After the client receives the Query Result that the server is returned, with described target read from local data source Show after data are merged in the page.
2. method according to claim 1, it is characterised in that the Query Result is obtained in the following way, including:
In the case where comparing and showing that an id is existed only in the 2nd id set, the corresponding data of the id are charged to and is looked into In inquiry result;
In the case where comparing and showing that an id is existed only in id set, the id is charged into Query Result.
3. method according to claim 2, it is characterised in that methods described also includes:
The client updates data in the local data source according to the Query Result.
4. method according to claim 1, it is characterised in that described to read data in the target pages from local data source An id with the data gathers, and specifically includes:
Data in the target pages, the id set of the data and last number in page up are read from local data source According to id;
Correspondingly, it is last in the page up that positioning id, the positioning id are also carried in the data inquiry request The id of data;
After the server receives the data inquiry request, the second of the number of data after the inquiry positioning id Id gathers.
5. a kind of data query method, it is characterised in that methods described is applied to client, and methods described includes:
Receive for inquiring about in target pages after the query statement of data, data in the target pages are read from local data source An id with the data gathers, and server is returned when last inquiry target pages are preserved in the local data source Data;
Data inquiry request is sent to server, the id set and the page object are carried in the data inquiry request The quantity of face display data;
After receiving the Query Result that the server is returned, with the data from the target pages that local data source reads Show after merging.
6. method according to claim 5, it is characterised in that methods described also includes:
According to the Query Result, data in the local data source are updated.
7. method according to claim 5, it is characterised in that described to read data in the target pages from local data source An id with the data gathers, and can specifically include:
Data in the target pages, the id set of the data and last number in page up are read from local data source According to id;
Correspondingly, it is last number in the page up that the data inquiry request also carries positioning id, the positioning id According to id.
8. a kind of data query method, it is characterised in that methods described is applied to server, and methods described includes:
The data inquiry request for target pages that client sends is received, the visitor is carried in the data inquiry request The first id set of family end data from the target pages that local data source reads and the number of the target pages display data Amount;
The 2nd id set of data in the target pages is inquired about according to the quantity;
The 2nd id set that will be inquired is compared with id set in the data inquiry request;
In the case where comparing and showing that id set and the 2nd id set have identical id, returned to the client and looked into When asking result, the data with identical id are not returned.
9. method according to claim 8, it is characterised in that the Query Result is obtained in the following way, including:
In the case where comparing and showing that an id is existed only in the 2nd id set, the corresponding data of the id are charged to and is looked into In inquiry result;
In the case where comparing and showing that an id is existed only in id set, the id is charged into Query Result.
10. method according to claim 8, it is characterised in that the data inquiry request also carries positioning id, described Positioning id is the id of the client last data from the target pages page up that local data source reads;
The 2nd id set that data in the target pages are inquired about according to the quantity, specifically includes:
The 2nd id set of the number of data after the inquiry positioning id.
11. a kind of data query arrangements, it is characterised in that described device is applied to client, described device includes:
Reading unit, is received for inquiring about in target pages after the query statement of data, and the target is read from local data source The id set of data and the data in the page, when last inquiry target pages are preserved in the local data source The data that server is returned;
Transmitting element, data inquiry request is sent to server, carried in the data inquiry request id set and The quantity of the target pages display data;
Display unit, after receiving the Query Result that the server is returned, with described target read from local data source Show after data are merged in the page.
12. devices according to claim 11, it is characterised in that described device also includes:
Updating block, according to the Query Result, updates data in the local data source.
13. devices according to claim 11, it is characterised in that the reading unit, specifically include:
Data in the target pages, the id set of the data and last number in page up are read from local data source According to id,
The transmitting element, specifically includes:
Data inquiry request is sent to server, the id set, the page object are carried in the data inquiry request The quantity and positioning id of face display data, the positioning id is the id of last data in the page up.
14. a kind of data query arrangements, it is characterised in that described device is applied to server, described device includes:
Receiving unit, receives the data inquiry request for target pages that client sends, and is taken in the data inquiry request Id set and the target pages exhibition with client data from the target pages that local data source reads The quantity of registration evidence;
Query unit, the 2nd id set of data in the target pages is inquired about according to the quantity;
Comparing unit, the 2nd id set that will be inquired is compared with id set in the data inquiry request;
Returning unit, in the case where comparing and showing that id set and the 2nd id set have identical id, to the visitor When family end returns to Query Result, the data with identical id are not returned.
15. devices according to claim 14, it is characterised in that the Query Result, obtain in the following way:
Show that an id is existed only under the request during the 2nd id gathers comparing, the corresponding data of the id are charged to and is looked into In inquiry result;
In the case where comparing and showing that an id is only existed in id set, the id is charged into Query Result.
16. devices according to claim 14, it is characterised in that in the receiving unit, the data inquiry request is also It is the client last from the target pages page up that local data source reads to carry positioning id, the positioning id One id of data;
Then, the query unit, specifically includes:
The 2nd id set of the number of data after the inquiry positioning id.
CN201610629496.8A 2016-08-03 2016-08-03 Data query method and device Active CN106886548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610629496.8A CN106886548B (en) 2016-08-03 2016-08-03 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610629496.8A CN106886548B (en) 2016-08-03 2016-08-03 Data query method and device

Publications (2)

Publication Number Publication Date
CN106886548A true CN106886548A (en) 2017-06-23
CN106886548B CN106886548B (en) 2020-06-30

Family

ID=59176717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610629496.8A Active CN106886548B (en) 2016-08-03 2016-08-03 Data query method and device

Country Status (1)

Country Link
CN (1) CN106886548B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451204A (en) * 2017-07-10 2017-12-08 阿里巴巴集团控股有限公司 A kind of data query method, apparatus and equipment
CN107798135A (en) * 2017-11-22 2018-03-13 阿里巴巴集团控股有限公司 Paging query method and device and electronic equipment
CN108959501A (en) * 2018-06-26 2018-12-07 新华三大数据技术有限公司 Delete the method and device of ES index
CN109313642A (en) * 2018-09-07 2019-02-05 威富通科技有限公司 Bill information caching method, bill information querying method and terminal device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852137A (en) * 2005-07-20 2006-10-25 华为技术有限公司 Method for realizing synchronization of client end data and server end data
US20090094212A1 (en) * 2007-10-09 2009-04-09 Jon Scott Zaccagnino Natural local search engine
US20100174703A1 (en) * 2009-01-07 2010-07-08 Microsoft Corporation Relevance improvements for implicit local queries
CN102999628A (en) * 2012-12-07 2013-03-27 北京网秦天下科技有限公司 Search method and information search terminal
CN104182252A (en) * 2014-08-13 2014-12-03 墨仕(厦门)电子商务有限公司 App version incremental updating method
CN104994179A (en) * 2015-05-14 2015-10-21 深圳市腾讯计算机系统有限公司 Data processing method and server
US9342553B1 (en) * 2012-05-13 2016-05-17 Google Inc. Identifying distinct combinations of values for entities based on information in an index

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852137A (en) * 2005-07-20 2006-10-25 华为技术有限公司 Method for realizing synchronization of client end data and server end data
US20090094212A1 (en) * 2007-10-09 2009-04-09 Jon Scott Zaccagnino Natural local search engine
US20100174703A1 (en) * 2009-01-07 2010-07-08 Microsoft Corporation Relevance improvements for implicit local queries
US9342553B1 (en) * 2012-05-13 2016-05-17 Google Inc. Identifying distinct combinations of values for entities based on information in an index
CN102999628A (en) * 2012-12-07 2013-03-27 北京网秦天下科技有限公司 Search method and information search terminal
CN104182252A (en) * 2014-08-13 2014-12-03 墨仕(厦门)电子商务有限公司 App version incremental updating method
CN104994179A (en) * 2015-05-14 2015-10-21 深圳市腾讯计算机系统有限公司 Data processing method and server

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451204A (en) * 2017-07-10 2017-12-08 阿里巴巴集团控股有限公司 A kind of data query method, apparatus and equipment
CN107798135A (en) * 2017-11-22 2018-03-13 阿里巴巴集团控股有限公司 Paging query method and device and electronic equipment
CN108959501A (en) * 2018-06-26 2018-12-07 新华三大数据技术有限公司 Delete the method and device of ES index
CN108959501B (en) * 2018-06-26 2021-09-17 新华三大数据技术有限公司 Method and device for deleting ES index
CN109313642A (en) * 2018-09-07 2019-02-05 威富通科技有限公司 Bill information caching method, bill information querying method and terminal device
WO2020047840A1 (en) * 2018-09-07 2020-03-12 威富通科技有限公司 Bill information caching method, bill information query method and terminal device

Also Published As

Publication number Publication date
CN106886548B (en) 2020-06-30

Similar Documents

Publication Publication Date Title
AU2021202128B2 (en) Method and system for providing domain-specific incremental search results with a customer self-service system for a financial management system
US11055325B2 (en) System and method for context enhanced mapping
CA3040101C (en) Method and system for searching for and navigating to user content and other user experience pages in a financial management system with a customer self-service system for the financial management system
US10104164B2 (en) Aggregating plug-in requests for improved client performance
US8700540B1 (en) Social event recommendations
US9858348B1 (en) System and method for presentation of media related to a context
US9026917B2 (en) System and method for context enhanced mapping within a user interface
US20170359446A1 (en) Computer Application Promotion
US20090089322A1 (en) Loading predicted tags onto electronic devices
CN108292206A (en) Workflow development system with feature easy to use
US20130046778A1 (en) System and method for automated service recommendations
CN109787948A (en) Access method, right management method and the device of the communal space
US20100082403A1 (en) Advocate rank network & engine
US8838610B2 (en) Listing tune-up system
US11487730B2 (en) Storage resource utilization analytics in a heterogeneous storage system environment using metadata tags
US20170192625A1 (en) Data managing and providing method and system for the same
CN106886548A (en) Data query method and device
CN108170731A (en) Data processing method, device, computer storage media and server
US10397322B2 (en) Mobile and computer applications, systems and methods for large group travel and event management
US20200403949A1 (en) Method and system for providing answer message to query message
US20130268529A1 (en) Systems and Methods for Contact Management and Referral Engine
CN109600724A (en) A kind of method and apparatus that short message is sent
US20200034893A1 (en) Social infusion of media content
US8954864B1 (en) Contact list integrated with social network
US10511717B1 (en) Directed customer support

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right