Specific embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and
Corresponding accompanying drawing is clearly and completely described to technical scheme.Obviously, described embodiment is only the application one
Section Example, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under the premise of creative work, belong to the scope of the application protection.
As it was previously stated, being briefly described to the problems of the prior art in background technology.In order to more intuitively understand
The problem, before the scheme for introducing the application, first illustrates and the problems of the prior art is described in detail.
Fig. 1 is a kind of item list displaying schematic diagram of the prior art.It is assumed that user is by performing pulling operation, to
Service end sends item list and obtains request, such as, for touch panel device, user can be by for representing item list
The page is let go (that is, perform pulling operation) after pulling a segment distance downwards, terminal after the pulling operation for detecting user, to
The item list that service end sends user obtains request.
It is assumed that the item list for obtaining every time includes at most m bars entry.Shown in Fig. 1 in the case where user performs certain once
After pulling process, the item list that terminal is obtained and represented, it can be seen that the item list contains nth bar mesh to the n-th+m-1 bars
Mesh, altogether m bars entry.
" checking more " button control in Fig. 1 is for being rendered with the presence or absence of more items of prompting according to service end
Represent.If also there are more entries after the entry for currently representing, terminal can be rendered and represent " checking more " button control
Part, conversely, then terminal can be rendered and represent " without more entries " button control.Further, user can also be by Fig. 1's
Pulling operation is performed on item list again, or, clicking operation is performed to " checking more " button control, triggering next time please
The process of item list is asked to start, service end correspondingly can be obtained and returned since the n-th+m entries, at most from database
The new entry of m bars.
In order that terminal gets and shows item list in Fig. 1.Service end mainly performs the following behaviour of database twice
Make:
For the first time, the entry of next group at most predetermined quantity is obtained from database.Specifically, service end is to data base querying
At most m bar entries since nth bar mesh.The SQL statement for using is usually as follows:
“select*from xx_table where startRow>=n limit m ";
Second, the total quantity of all entries from after the database acquisition next group entry and next group entry
Statistical value.Specifically, it is determined that up to the entry total quantity for terminating since nth bar mesh in database, for judging whether
More entries are obtained for next time, in order to subsequently prompt the user with.The SQL statement for using is usually as follows:
“select count(*)from xx_table where startRow>=n ";
Wherein, in two SQL statements more than, " xx_table " represents that database is used to store the tables of data of entry,
Every entry is respectively a record in the tables of data, and " startRow " represents the sequence number of entry.
But, the statistical operation being related to for the second time in above-mentioned database manipulation twice takes more (second SQL statement
Implementation procedure take it is more), then service end takes more to the processing procedure that the item list of user obtains request, and it is right to cause
The pulling operation response speed of user is slower.
Labor is carried out to prior art above, has started to introduce the scheme of the application below, and to the application's
How scheme solves the problems of the prior art illustrates.
A kind of schematic flow sheet of item list acquisition request processing method that Fig. 2 is provided for the embodiment of the present application.
The executive agent of the flow in Fig. 2 can be service end or terminal.Service end or the corresponding equipment of terminal include but
It is not limited to:Personal computer, big-and-middle-sized computer, computer cluster, mobile phone, panel computer, intelligent watch, vehicle-mounted mobile platform.
Executive agent does not constitute the restriction to the application, for the ease of description, mainly enters so that executive agent is service end as an example below
Row explanation.
Flow in Fig. 2 may comprise steps of:
S201:The item list for receiving user obtains request, the number of entries that the item list to be obtained is included
It is the first quantity.
In the embodiment of the present application, item list is that a kind of information common in applying represents form, and item list is initial
When be stored in the database of service end, when user in terminal using application, it is necessary to when checking item list, can be by end
End, sends item list and obtains request to the service end of application, and by interacting for terminal and service end, and service end is corresponding
Treatment, terminal can represent the item list that service end is returned in response to the request of user by user.
The particular content of the entry that the application is included to item list is not limited, can be with merchandise news, message, article
Etc..
It should be noted that the item list to be obtained in the embodiment of the present application " refer to:User passes through an entry column
Table obtains request, and the certain amount that can be got is (that is, " the first quantity " described in step S201;In prior art
In example, the first quantity is m, and certainly, in actual applications, the first quantity might be less that the list that entry m) is constituted.
Further, user obtains request by multiple item list, can correspondingly get multiple item lists.Terminal can be by
Multiple item lists that user has got constitute a long list and represent to user, or, terminal can also will be described more
Individual item list represents to user respectively independently of each other.
In the embodiment of the present application, item list obtains the specific operation for asking to be based on user and sends, described
Specific operation can be:Upper pulling process or pulling operation or with the interactive operation of button control (click on, long by etc.), etc..
S202:Obtained according to the item list and asked, to the entry of the quantity of data base querying second, second quantity
More than first quantity.
In the embodiment of the present application, service end is not as existing skill after the item list for receiving user obtains request
The entry of the such quantity of whereabouts data base querying first of art, but to the entry of the quantity of data base querying second.That is, service end
Attempt obtaining the entry more more than first.
Like this, service end only passes through a database manipulation, it becomes possible to gets user this item list and obtains
Each entry corresponding to request is taken, and can determine after this acquisition whether also there are more entries in database under again
Secondary acquisition.Compared to needing to perform database manipulation twice in the prior art, item list of the service end to user can be reduced
Obtain the time-consuming of request processing procedure.
In the embodiment of the present application, the entry for having been obtained for user, can typically cache or persistence is stored in terminal,
If user wants to check the entry for having obtained, without relying on service end;And for the entry that user not yet obtains, user then needs
To service end acquisition request.
Therefore, the item list that user sends obtains the entry corresponding to asking (that is, user is obtained by the item list
Take the entry that request is wanted to obtain) should be entry that user not yet obtains.It should be noted that also there is example in actual applications
Outward, such as, it is assumed that user has obtained and has been buffered in the entry of terminal and has been deleted, if then user wants to check these entries again,
Still need to service end acquisition request, in this case, the item list that user sends obtains the entry corresponding to request
It can be entry that user had obtained.
S203:According to the entry that the database response is returned in the inquiry, the entry is returned to the user
List, and whether there is more entries to user prompting.
In the embodiment of the present application, if user is to send item list by terminal to obtain request, terminal is can be with
Represent user.In this case, the item list is returned to the user, and to user prompting with the presence or absence of more
Many entries, be:The item list is returned to the terminal, and whether there is more entries to the terminal notifying.
In the embodiment of the present application, comprising how many entry in the item list that service end is returned to user, and prompting is
No to there are more entries, returned entry can be inquired about in step S202 depending on database response (can be referred to as:
The entry that database is returned).If the entry that database is returned removes the part for belonging to the item list, also remaining bar
Mesh, then it is considered that there are more entries, if without remaining entry, it is believed that in the absence of more entries.
It should be noted that under different application scenarios, " the more entries " described in the embodiment of the present application can be given
Assign different definition.Be exemplified below it is several be defined as example, be embodied the application scheme when can be according to reality
Situation is selected one or more therein.
Described " more entries " can refer to:It is currently present in database, but the entry that user not yet obtains;Can also
Refer to:Though user has obtained but terminal is not presented to the entry of user currently;Can also refer to:User not yet obtains but by next
The secondary entry for asking get;Etc..
In the embodiment of the present application, the specific embodiment that " whether there is more entries to user prompting " can be more
Kind.Such as, service end can return to intuitively prompt message (such as, returning to prompting text etc., prompting picture etc.) to user, eventually
End directly represents the prompt message to user;Service end can also return to the prompt message of non-intuitive to user, and terminal is according to non-
Intuitively prompt message (such as, indicating whether there is the identification informations such as more items of flag or identification field), generates straight
The prompt message (such as, rendering the button control of " checking more " etc.) of sight represents to user again;Etc..
By the above method, in the processing procedure that the item list to user obtains request, without carrying out prior art
In take more statistics of database operation, only need to carry out a database query operations, it is possible to reduce service end to
The item list at family obtains the time-consuming of the processing procedure of request, and then can improve the response speed to user, therefore, it can portion
Divide or fully solve the problems of the prior art.
Moreover, due to reducing the number of times of database manipulation, accordingly it is also possible to the resource consumption of database is reduced,
Reduce the pressure to database.
For a user, compared to prior art is used, can cause that user has using the scheme of the application following straight
The impression of sight:Service end is for user in the pulling operation performed by acquisition request item list or upper pulling process or to " looking into
See more " response speed of the specific operation such as the clicking operation of button control improves, and terminal quickly can represent use to user
The item list of family acquisition request, better user experience.
Based on the above method, the embodiment of the present application additionally provides some specific embodiments of the above method, and extension
Scheme, is illustrated below.
In the embodiment of the present application, it can be seen from analysis above, typically, for step S202, according to the entry
List obtains request, to the entry of the quantity of data base querying second, can specifically include:Being obtained according to the item list please
Ask, to the entry that the user not yet obtains the second quantity is inquired about in database.
How specific inquiry mode can specifically store each entry depending on database.In order to make it easy to understand, under
Two kinds of specific inquiry modes are enumerated as an example in face.
The first inquiry mode.It is assumed that database can be based on each request of user, dynamically to the storage position of each entry
Put and be adjusted so that the entry that user not yet obtains is stored respectively in different tables of data from the entry that user has obtained,
Then service end can randomly or sequentially inquire the second number in for the tables of data for storing the entry that user not yet obtains
The entry of amount.
Second inquiry mode.It is assumed that each entry stored in database has predefined procedure (such as, the sequence number of each entry
Order from small to large, nth bar purpose sequence number is n), and user is also the acquisition request bar according to being also based on this every time sequentially
Mesh list, then service end can be based on this sequentially to the bar that the user not yet obtains the second quantity is inquired about in database
Mesh.In this case, the entry that the user not yet obtains can be:The entry that order is located at before particular items (can be with
Corresponding to the scene of user's acquisition request entry from back to front, such as, user leaies through forward history message list etc.), or be located at
Entry after the particular items (can correspond to the scene of user's acquisition request entry from front to back, such as, user is backward
Leaf through newest model list etc.);Wherein, the particular items can obtain request according to the item list to determine.
Usually, the particular items can user newest got before this transmission item list obtains request
One entry.Item list can be included for showing which bar entry is the information of the particular items in obtaining request, such as,
Comprising a sequence number for entry, then the corresponding entry of the sequence number is the particular items.
It should be noted that no matter above-named which kind of mode, can only by a database manipulation (such as,
Perform a SQL statement) realize.
By taking above-named second inquiry mode as an example.Under the scene of example in the prior art, according to second
Plant inquiry mode, it is assumed that the entry that user not yet obtains includes:Order is located at the entry before particular items, then can specifically adopt
With such as following SQL statement to data base querying:
“select*from xx_table where startRow>=n limit m+x ";
Wherein, the (n-1)th entry is the particular items, and x is not less than 1, then m+x is the second quantity.
Further, in actual applications, also it is not necessarily intended to be started a query at from particular items, as long as ensureing the entry of inquiry
Include the entry of the user not yet obtains the second quantity, such as, it would however also be possible to employ such as following SQL statement
To data base querying:
“select*from xx_table where startRow>=n-y limit m+x ";
Wherein, the (n-1)th entry is the particular items, x-y>=1, then m+x-y is the second quantity.
In the embodiment of the present application, although to the entry of the quantity of data base querying second, but data in step S202
Storehouse may not can just return to the entry of the second quantity, the difference of the number of entries returned according to database, and step S203's is specific
Implementation method may be different.Include in step S203 " return item list " and " prompting with the presence or absence of more entries " this
Two sub-steps, the application is not limited the execution sequence of the two sub-steps, can be simultaneously perform, or
Successively perform.The two steps are further illustrated separately below.
In the embodiment of the present application, for step S203, according to the bar that the database response is returned in the inquiry
Mesh, the item list is returned to the user, can specifically be included:Determine what the database response was returned in the inquiry
The total quantity of entry;Judge the total quantity whether more than first quantity;If so, return including the number to the user
According to the item list of the entry of the first quantity in whole entries that storehouse returns in response to the inquiry;Otherwise, to the user
Return to the item list of the whole entries returned in the inquiry comprising the database response.
Still use the example above explanation, it is assumed that start a query at from the particular items, judge the sum of the entry that database is returned
Amount whether m;If so, each entry that this is returned for database, can be comprising nth bar mesh to the n-th+m-1 entries (m altogether
Bar entry) item list return to user, entry in addition can not return to user;Otherwise, returned to user and wrapped
Item list containing this whole entry for returning of database.
It should be noted that database is when entry is returned, entry can be already contained in item list, at this
In the case of kind, database is that entry is returned by returning to item list.
In the embodiment of the present application, for step S203, according to the bar that the database response is returned in the inquiry
Mesh, more entries are whether there is to user prompting, can specifically be included:Determine the database response in it is described inquiry and
The total quantity of the entry of return;Judge the total quantity whether more than first quantity;If so, pointing out presence to the user
More entries;Otherwise, do not exist more entries to user prompting.
In actual applications, service end typically can be used as identification information by returning to a Boolean-type field, to user
Prompting whether there is more entries.Such as, when the Boolean-type field is equal to 1, can represent there are more entries, as the boolean
When type-word section is equal to 0, can represent in the absence of more entries.
In the embodiment of the present application, in order to reduce the interaction times of service end and user, service end will can whether there is
The item list that more items of prompting and database are returned, this two parts content to be returned is included in same structure
In example, the structure example is returned to by user by once interaction.
For example, in actual applications, the corresponding structure of structure example can be with as follows:
Wherein, " Result " is the structure, and " items " item list to be returned, " hasMore " is boolean's type-word
Section.
Further, whether the Boolean-type field that terminal can be returned according to service end, more intuitively prompt the user with and deposit
In more entries.Such as, when the Boolean-type field is equal to 1, displaying " checking more " button control can be rendered, then user can be with
Asked by the item list for clicking on control and carrying out next time, when the Boolean-type field is not equal to 1, displaying can be rendered
Prompt message such as " in the absence of more ".
The scheme to the application has been described in detail above.In order to help reader more intuitively understand prior art and
The difference of the scheme of the application, the embodiment of the present application is also each provided under a kind of practical application scene, prior art and this Shen
The item list respectively of scheme please obtains request treatment multiterminal interaction schematic diagram, as shown in Figure 3, Figure 4.
Under a kind of practical application scene that Fig. 3 is provided for the embodiment of the present application, the item list of prior art obtains request
Treatment multiterminal interaction schematic diagram.
Interaction in Fig. 3 may comprise steps of:
User represents in terminal and performed on the page of item list pulling process, has requested that and checks more entries, wherein,
The current newest entry for representing of terminal is the (n-1)th entry;
After terminal detects the upper pulling process of user, send item list to service end and obtain request, have requested that acquisition n-th
The at most m bar entries that entry starts;
Service end obtains request, the at most m rules started to data base querying nth bar mesh according to the item list for receiving
Mesh;
Database response is returned comprising at most m rules purpose item list in the inquiry of service end to service end;
The entry total quantity that nth bar mesh starts in service end statistical query database;
Database returns to the entry total quantity for counting;
Whether service end judges entry total quantity more than m, if, it is determined that exist under more entries are available for user next time
Drawing checks, otherwise, it determines being available for that user is next time drop-down to be checked in the absence of more entries;
Service end returns to the item list that (that is, return to user) is inquired to terminal, and returns and be for prompting
It is no to there is more items of Boolean-type field;
Terminal renders the item list for representing service end return;If there are more entries, represent " checking more " button control
Part, if not existing more entries, represents " without more contents " button control.
Under a kind of practical application scene that Fig. 4 is provided for the embodiment of the present application, the item list of the scheme of the application is obtained
Request treatment multiterminal interaction schematic diagram.
Interaction in Fig. 4 may comprise steps of:
User represents in terminal and performed on the page of item list pulling process, has requested that and checks more entries, wherein,
The current newest entry for representing of terminal is the (n-1)th entry;
After terminal detects the upper pulling process of user, send item list to service end and obtain request, have requested that acquisition n-th
The at most m+1 bar entries that entry starts;
Service end obtains request, the at most m+1 bars started to data base querying nth bar mesh according to the item list for receiving
Entry;
Database response is returned comprising at most m+1 rules purpose item list in the inquiry of service end to service end;
Whether service end judges the total quantity of the entry that database is returned more than m, if, it is determined that there are more entries can
Checked for user is next time drop-down, otherwise, it determines being available for that user is next time drop-down to be checked in the absence of more entries;
If service end judges that total quantity, more than m (specially m+1), rejects last 1 entry, remaining for returning to
Terminal, if judging, total quantity is not more than m, is completely used for returning to terminal.
Service end to terminal return to that (that is, return to user) inquire comprising at most m rules purpose item list, with
And return for pointing out with the presence or absence of more items of Boolean-type field;
Terminal renders the item list for representing service end return;If there are more entries, represent " checking more " button control
Part, if not existing more entries, represents " without more contents " button control.
Be can see by the interaction flow of Fig. 3 and Fig. 4, the scheme of the application is reduced once compared to prior art
Database manipulation, it is thus possible to improve to the response speed of user, reducing the resource consumption of database.
Above mainly using service end as executive agent, flow in Fig. 1 is performed.In actual applications, it is also possible to
Using terminal as executive agent, the flow in Fig. 1 is performed, in such a case, it is possible to directly be handed over database by terminal
Mutually, obtaining item list and with the presence or absence of more items of prompting.
Above for a kind of item list that the embodiment of the present application is provided obtains request processing method, based on same thinking,
The embodiment of the present application also provides corresponding device, as shown in Figure 5.
Fig. 5 obtains the structural representation for asking processing unit for a kind of item list that the embodiment of the present application is provided, including:
Receiver module 501, the item list for receiving user obtains request, and the item list includes at most the first quantity
Entry;
Enquiry module 502, obtains according to the item list and asks, described to the entry of the quantity of data base querying second
Second quantity is more than first quantity;
Module 503 is returned, according to the entry that the database response is returned in the inquiry, institute is returned to the user
Item list is stated, and whether there is more entries to user prompting.
Alternatively, enquiry module 502, obtain according to the item list and ask, to inquiring about the user in database still
Entry do not obtain, the second quantity.
Alternatively, each entry has predefined procedure, and the entry that the user not yet obtains is:Order is located at specific bar
Entry before mesh, or the entry after the particular items;
Wherein, the particular items are to obtain request according to the item list to determine.
Alternatively, module 503 is returned, the total quantity of the entry that the database response is returned in the inquiry is determined;
Judge the total quantity whether more than first quantity;
If so, being returned comprising the database response first in whole entries that the inquiry is returned to the user
The item list of the entry of quantity;
Otherwise, the entry of the whole entries returned in the inquiry comprising the database response is returned to the user
List.
Alternatively, module 503 is returned, identification information is returned to the user, the identification information is used for the user
Prompting whether there is more entries.
Alternatively, module 503 is returned, the total quantity of the entry that the database response is returned in the inquiry is determined;
Judge the total quantity whether more than first quantity;
If so, there are more entries to user prompting;
Otherwise, do not exist more entries to user prompting.
Alternatively, it is that the following at least one operation based on the user sends that the item list obtains request:
Upper pulling process;Pulling operation;With the interactive operation of button control.
Device in Fig. 5 specifically may be located in service end or terminal.
The method that the device that the application is provided is with the application is provided is one-to-one, therefore, described device also have with
The similar Advantageous Effects of methods described, because the Advantageous Effects above to methods described have been carried out specifically
It is bright, therefore, the Advantageous Effects of described device are repeated no more here.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.And, the present invention can be used and wherein include the computer of computer usable program code at one or more
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) is produced
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructions
The combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices
The device of the function of being specified in present one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy
In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger
Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information Store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, can be used to store the information that can be accessed by a computing device.Defined according to herein, calculated
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
Also, it should be noted that term " including ", "comprising" or its any other variant be intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of key elements not only include those key elements, but also wrapping
Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment is intrinsic wants
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Also there is other identical element in process, method, commodity or the equipment of element.
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art
For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent
Replace, improve etc., within the scope of should be included in claims hereof.