CN105843958A - Cache-based server paging method and system - Google Patents
Cache-based server paging method and system Download PDFInfo
- Publication number
- CN105843958A CN105843958A CN201610236299.XA CN201610236299A CN105843958A CN 105843958 A CN105843958 A CN 105843958A CN 201610236299 A CN201610236299 A CN 201610236299A CN 105843958 A CN105843958 A CN 105843958A
- Authority
- CN
- China
- Prior art keywords
- query object
- list
- caching
- data
- inquiry
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a cache-based server paging method and system. The method comprises steps as follows: S1, a first query request sent by a service request party is received; the first query request comprises a query object and query data corresponding to the query object; S2, a list is generated according to the query object and stored in a cache system; S3, corresponding query objects are queried in the list according to the received page number requested by the service request party and the record number of each page, corresponding query data are called from the database according to the queried query objects and returned to the service request party to be displayed. According to the cache-based server paging method and system, data are not required to be called from the database, the conditions that a lot of intermediate charts are generated due to paging storage of the database, data of the intermediate charts are required to be specially cleared through manularity or procedures, and the query speed can be increased.
Description
Technical field
The present invention relates to service end paging, be specifically related to a kind of service end paging method based on caching and be
System.
Background technology
In real work and life, often use inquiry business, and when inquiry business processes, one
As be all from data base, inquire all of result data, then result data is stored in and builds up in advance
Data base's middle table in, be then ranked up paging;But this database paging mode underaction,
Be required for different business scenarios and build different middle table, such data base be accomplished by safeguarding a lot of in
Between table, in addition it is also necessary to supporting timing routine goes to clear up specially the data of middle table, and this inquiry mode effect
Rate is the highest.
Summary of the invention
The technical problem to be solved be to provide a kind of based on caching service end paging method and
System, it is not necessary to set up middle table, it is possible to increase inquiry velocity.
The technical scheme is that a kind of service end paging based on caching
Method, including:
S1, receives the first inquiry request that service requester sends;Described first inquiry request comprises inquiry
Object and the inquiry data corresponding with described query object;
S2, generates list according to described query object, and stores to caching system;
S3, the number of pages asked according to the service requester received and the record number of every page are in described list
The query object that inquiry is corresponding, and from data base, the inquiry of correspondence is called according to the query object inquired
Data also return to service requester and show.
The invention has the beneficial effects as follows: right by the inquiry in the inquiry request that sends according to service requester
As generating list, and store to caching system;Then according to the page of the service requester request received
The number record number with every page inquires about the query object of correspondence in described list, and according to the inquiry inquired
Object calls the inquiry data of correspondence from data base and returns to service requester and show, it is to avoid data
Storehouse paging warehousing, generates a lot of middle table, needs craft or program to go specially and clears up middle table data, and
And inquiry velocity can be improved.
On the basis of technique scheme, the present invention can also do following improvement: described S2 particularly as follows:
S21, extracts corresponding data according to described query object from data base;
S22, according to the corresponding data genaration list extracted.
Further, described step S3 particularly as follows:
S31, calculates according to the number of pages in described second request received and inquires about described in caching system
The beginning sequence number of object;
S32, the record number of every page in asking according to described beginning sequence number and described second is from described list
The query object of middle this page of extraction, and in data base, the number of results of correspondence is called according to described query object
According to.
Further, the storage time of list in service end arranges caching system, when exceeding the storage time,
The list of storage is deleted by caching system.
The another kind of technical scheme that the present invention solves above-mentioned technical problem is as follows: a kind of service based on caching
End paging system, including:
Receiver module, for receiving the first inquiry request that service requester sends;Described first inquiry please
Ask and comprise query object and the inquiry data corresponding with described query object;
List generation and memory module, for generating list according to described query object, and store to caching
In system;
Enquiry module, for existing according to the number of pages of service requester request received and the record number of every page
Described list is inquired about the query object of correspondence, and calls from data base according to the query object inquired
Corresponding inquiry data also return to service requester and show.
The invention has the beneficial effects as follows: sent according to service requester by list generation and memory module
Query object in inquiry request generates list, and stores to caching system;Then by enquiry module root
Inquire about corresponding in described list according to the number of pages record number with every page of the service requester request received
Query object, and according to the query object inquired call from data base correspondence inquiry data and return
Show back to service requester, it is to avoid database paging warehousing, generate a lot of middle table, need craft
Or program goes to clear up middle table data specially, and inquiry velocity can be improved.
On the basis of technique scheme, the present invention can also do following improvement: described list generate and
Memory module is implemented the most in accordance with the following methods:
S21, extracts corresponding data according to described query object from data base;
S22, according to the corresponding data genaration list extracted.
Further, described enquiry module obtains the most in accordance with the following methods and inquires about data:
S31, calculates according to the number of pages in described second request received and inquires about described in caching system
The beginning sequence number of object;
S32, the record number of every page in asking according to described beginning sequence number and described second is from described list
The query object of middle this page of extraction, and in data base, the number of results of correspondence is called according to described query object
According to.
Further, also include arranging and removing module, for list in service end arranges caching system
The storage time, and when exceeding the storage time, the list of storage is deleted by caching system.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of a kind of service end paging method based on caching of the present invention;
Fig. 2 is the schematic diagram of specific embodiment in the inventive method;
Fig. 3 is the structural representation one of a kind of service end paging system based on caching of the present invention;
Fig. 4 is the structural representation two of a kind of service end paging system based on caching of the present invention.
Detailed description of the invention
Being described principle and the feature of the present invention below in conjunction with accompanying drawing, example is served only for explaining this
Invention, is not intended to limit the scope of the present invention.
Embodiment:
As depicted in figs. 1 and 2, a kind of service end paging method based on caching, including:
S1, receives the first inquiry request that service requester sends;Described first inquiry request comprises inquiry
Object and the inquiry data corresponding with described query object;
S2, generates list according to described query object, and stores to caching system;
S3, the number of pages asked according to the service requester received and the record number of every page are in described list
The query object that inquiry is corresponding, and from data base, the inquiry of correspondence is called according to the query object inquired
Data also return to service requester and show.
Described S2 particularly as follows:
S21, extracts corresponding data according to described query object from data base;
S22, according to the corresponding data genaration list extracted.
Described step S3 particularly as follows:
S31, calculates according to the number of pages in described second request received and inquires about described in caching system
The beginning sequence number of object;
S32, the record number of every page in asking according to described beginning sequence number and described second is from described list
The query object of middle this page of extraction, and in data base, call corresponding data according to described query object,
Calculate the result data that service end is finally shown.
Specifically, it is also possible to the storage time of list in service end arranges caching system, when exceeding storage
During the time, the list of storage is deleted by caching system.
When inquiring about data by the method for the present invention, specifically may is that such as: the first inquiry request is
Inquire about the telephone expenses of all members under certain group, and paging is shown.So, first by all under this group
Member be stored in list Li st, then this list is stored caching in.When inquiry for the first time
Only return telephone expenses and the total page number of the member of page 1, and return the service end page and show, specially paging
Display, shows data strip number and the total page number of every page, when inquiring about nth page, inquires about certain one page at needs
The calling charge information of member time, first in caching system, data strip number according to number of pages and every one page calculates
Start sequence number, then extract in caching system according to the data strip number starting sequence number and every page of needs displaying
Corresponding member's sequence number, and in data base, the calling charge information of correspondence is called according to member's sequence number, return to
Service end shows.
As shown in Figure 3 and Figure 4, a kind of service end paging system based on caching, including:
Receiver module, for receiving the first inquiry request that service requester sends;Described first inquiry please
Ask and comprise query object and the inquiry data corresponding with described query object;
List generation and memory module, for generating list according to described query object, and store to caching
In system;
Enquiry module, for existing according to the number of pages of service requester request received and the record number of every page
Described list is inquired about the query object of correspondence, and calls from data base according to the query object inquired
Corresponding inquiry data also return to service requester and show.
Described list generation and memory module are implemented the most in accordance with the following methods:
S21, extracts corresponding data according to described query object from data base;
S22, according to the corresponding data genaration list extracted.
Described enquiry module obtains the most in accordance with the following methods inquires about data:
S31, calculates according to the number of pages in described second request received and inquires about described in caching system
The beginning sequence number of object;
S32, the record number of every page in asking according to described beginning sequence number and described second is from described list
The query object of middle this page of extraction, and in data base, call corresponding data according to described query object,
Calculate the result data that service end is finally shown.
Also include arranging and removing module, when the storage of list in service end arranges caching system
Between, and when exceeding the storage time, the list of storage is deleted by caching system.
In Fig. 4, Q1 represents the first inquiry request, and M1 represents the query object in list, List<M>:
(M1、M2……Mn);M is list;R1 is the inquiry corresponding with Q1 returning to service requester
Data;DB is data base;Cache is caching system;
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all in the present invention
Spirit and principle within, any modification, equivalent substitution and improvement etc. made, should be included in this
Within bright protection domain.
Claims (8)
1. a service end paging method based on caching, it is characterised in that including:
S1, receives the first inquiry request that service requester sends;Described first inquiry request comprises inquiry
Object and the inquiry data corresponding with described query object;
S2, generates list according to described query object, and stores to caching system;
S3, the number of pages asked according to the service requester received and the record number of every page are in described list
The query object that inquiry is corresponding, and from data base, the inquiry of correspondence is called according to the query object inquired
Data also return to service requester and show.
A kind of service end paging method based on caching, it is characterised in that
Described S2 particularly as follows:
S21, extracts corresponding data according to described query object from data base;
S22, according to the corresponding data genaration list extracted.
A kind of service end paging method based on caching, it is characterised in that
Described step S3 particularly as follows:
S31, calculates described in caching system according to the number of pages in described second inquiry request received
The beginning sequence number of query object;
S32, according to the record number of every page in described beginning sequence number and described second inquiry request from described
List is extracted the query object of this page, and in data base, calls corresponding number according to described query object
According to, calculate the result data that service end is finally shown.
A kind of service end paging method based on caching, it is characterised in that
The storage time of list in service end arranges caching system, when exceeding the storage time, caching system will
The list of storage is deleted.
5. a service end paging system based on caching, it is characterised in that including:
Receiver module, for receiving the first inquiry request that service requester sends;Described first inquiry please
Ask and comprise query object and the inquiry data corresponding with described query object;
List generation and memory module, for generating list according to described query object, and store to caching
In system;
Enquiry module, for existing according to the number of pages of service requester request received and the record number of every page
Described list is inquired about the query object of correspondence, and calls from data base according to the query object inquired
Corresponding inquiry data also return to service requester and show.
A kind of service end paging system based on caching, it is characterised in that
Described list generation and memory module are implemented the most in accordance with the following methods:
S21, extracts corresponding data according to described query object from data base;
S22, according to the corresponding data genaration list extracted.
A kind of service end paging system based on caching, it is characterised in that
Described enquiry module obtains the most in accordance with the following methods inquires about data:
S31, calculates described in caching system according to the number of pages in described second inquiry request received
The beginning sequence number of query object;
S32, according to the record number of every page in described beginning sequence number and described second inquiry request from described
List is extracted the query object of this page, and in data base, calls corresponding number according to described query object
According to, calculate the result data that service end is finally shown.
A kind of service end paging system based on caching, it is characterised in that
Also include arranging and removing module, be used for the storage time of list in service end arranges caching system, with
And when exceeding the storage time, the list of storage is deleted by caching system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610236299.XA CN105843958A (en) | 2016-04-15 | 2016-04-15 | Cache-based server paging method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610236299.XA CN105843958A (en) | 2016-04-15 | 2016-04-15 | Cache-based server paging method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105843958A true CN105843958A (en) | 2016-08-10 |
Family
ID=56589529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610236299.XA Pending CN105843958A (en) | 2016-04-15 | 2016-04-15 | Cache-based server paging method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105843958A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153847A (en) * | 2017-12-20 | 2018-06-12 | 北京奇艺世纪科技有限公司 | A kind of list paging method, device and electronic equipment |
CN108153874A (en) * | 2017-12-26 | 2018-06-12 | 福建星瑞格软件有限公司 | A kind of big data height takes the quick paging method of query results |
CN108595487A (en) * | 2018-03-14 | 2018-09-28 | 摇了购(武汉)电子商务有限公司 | The method and system of data are accessed under a kind of big data high concurrent |
CN109241099A (en) * | 2018-08-22 | 2019-01-18 | 中国平安人寿保险股份有限公司 | A kind of data query method and terminal device |
CN109947827A (en) * | 2018-12-27 | 2019-06-28 | 航天信息股份有限公司 | A kind of response method and device of inquiry operation |
CN112069207A (en) * | 2020-08-27 | 2020-12-11 | 重庆攸亮科技股份有限公司 | Multi-table combined query efficiency improving method |
WO2021087679A1 (en) * | 2019-11-04 | 2021-05-14 | 深圳市欢太科技有限公司 | Paging data query method and apparatus, electronic device, and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216840A (en) * | 2008-01-21 | 2008-07-09 | 金蝶软件(中国)有限公司 | Data enquiry method and data enquiry system |
CN101640848A (en) * | 2008-07-29 | 2010-02-03 | 中兴通讯股份有限公司 | Method for querying states of cluster group members, and mobile terminal |
US20100057847A1 (en) * | 2008-09-04 | 2010-03-04 | Alibaba Group Holding Limited | Method, Device, and system for acquiring a web page |
CN103699699A (en) * | 2014-01-16 | 2014-04-02 | 常州工学院 | Method for browsing decoded ticket file |
CN104573035A (en) * | 2015-01-16 | 2015-04-29 | 杭州犀照科技有限公司 | Caching service method and device and news information obtaining method and system |
-
2016
- 2016-04-15 CN CN201610236299.XA patent/CN105843958A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216840A (en) * | 2008-01-21 | 2008-07-09 | 金蝶软件(中国)有限公司 | Data enquiry method and data enquiry system |
CN101640848A (en) * | 2008-07-29 | 2010-02-03 | 中兴通讯股份有限公司 | Method for querying states of cluster group members, and mobile terminal |
US20100057847A1 (en) * | 2008-09-04 | 2010-03-04 | Alibaba Group Holding Limited | Method, Device, and system for acquiring a web page |
CN103699699A (en) * | 2014-01-16 | 2014-04-02 | 常州工学院 | Method for browsing decoded ticket file |
CN104573035A (en) * | 2015-01-16 | 2015-04-29 | 杭州犀照科技有限公司 | Caching service method and device and news information obtaining method and system |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153847A (en) * | 2017-12-20 | 2018-06-12 | 北京奇艺世纪科技有限公司 | A kind of list paging method, device and electronic equipment |
CN108153874A (en) * | 2017-12-26 | 2018-06-12 | 福建星瑞格软件有限公司 | A kind of big data height takes the quick paging method of query results |
CN108595487A (en) * | 2018-03-14 | 2018-09-28 | 摇了购(武汉)电子商务有限公司 | The method and system of data are accessed under a kind of big data high concurrent |
CN108595487B (en) * | 2018-03-14 | 2022-04-29 | 武汉村助手科技有限公司 | Method and system for accessing data under high concurrency of big data |
CN109241099A (en) * | 2018-08-22 | 2019-01-18 | 中国平安人寿保险股份有限公司 | A kind of data query method and terminal device |
CN109947827A (en) * | 2018-12-27 | 2019-06-28 | 航天信息股份有限公司 | A kind of response method and device of inquiry operation |
WO2021087679A1 (en) * | 2019-11-04 | 2021-05-14 | 深圳市欢太科技有限公司 | Paging data query method and apparatus, electronic device, and storage medium |
CN114286995A (en) * | 2019-11-04 | 2022-04-05 | 深圳市欢太科技有限公司 | Paging data query method, paging data query device, electronic equipment and storage medium |
CN112069207A (en) * | 2020-08-27 | 2020-12-11 | 重庆攸亮科技股份有限公司 | Multi-table combined query efficiency improving method |
CN112069207B (en) * | 2020-08-27 | 2023-10-03 | 重庆攸亮科技股份有限公司 | Multi-table joint query efficiency improving method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843958A (en) | Cache-based server paging method and system | |
CN105243169B (en) | A kind of data query method and system | |
CN105843956A (en) | Paging query method and system | |
CN101710320A (en) | Statistical index data processing method and device | |
WO2006052541A3 (en) | Methods, systems, and computer-readable mediums for indexing and rapidly searching data records | |
CN102467525A (en) | Document associating method and system | |
US20140351273A1 (en) | System and method for searching information | |
CN105989084A (en) | Question answering method and device | |
WO2005074590A3 (en) | System and method for automatically updating business information reports | |
CN103684980A (en) | Method and system for synchronizing chatting records in instant chat tool | |
CN105100050A (en) | User permission management method and system | |
CN103226780A (en) | Method for determining advertisement space channel and advertisement release server | |
CN107528761A (en) | A kind of method and system of wechat public number automatic information reply | |
CN103731682A (en) | Method, device and system for keeping synchronous watching record among multiple film watching devices | |
CN108874946A (en) | A kind of ID management method and device | |
CN102117340A (en) | Dynamic data storage method | |
CN103327041B (en) | A kind of method and system obtaining user content | |
CN109002973A (en) | The distribution of customer service resource, customer service resource data methods of exhibiting and device | |
CN110659971B (en) | Transaction data processing method and device | |
CN112131338A (en) | Method and device for establishing question-answer pairs | |
CN104615645A (en) | Search implementation method, device and system and computer equipment | |
CN106250501B (en) | Report processing method and reporting system | |
CN108415748A (en) | Method for information display and system, computer storage media and equipment | |
US9641674B1 (en) | Identifying website activities as being those of a telephone caller | |
CN104281620A (en) | Contact person data query method and device supporting polyphones |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160810 |
|
RJ01 | Rejection of invention patent application after publication |