CN106934057A - A kind of data cached update method of paging and device - Google Patents
A kind of data cached update method of paging and device Download PDFInfo
- Publication number
- CN106934057A CN106934057A CN201710174007.9A CN201710174007A CN106934057A CN 106934057 A CN106934057 A CN 106934057A CN 201710174007 A CN201710174007 A CN 201710174007A CN 106934057 A CN106934057 A CN 106934057A
- Authority
- CN
- China
- Prior art keywords
- data
- paging
- record
- inquiry request
- cached
- 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/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- 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/23—Updating
Abstract
The present invention provides a kind of data cached update method of paging and device, after the data inquiry request of receiving terminal, according to fresh information of the data more new record pond comprising data record in database, judge paging corresponding with the data inquiry request in data cached with the presence or absence of the data record for needing to be updated, if in the presence of, then paging described in inquiry database update is data cached, then data cached to the corresponding paging of terminal returned data inquiry request.After the data inquiry request for receiving terminal, actively check whether whether corresponding paging is expired in data cached, i.e., need to be updated, and then paging is data cached in timely synchronization caching system.
Description
Technical field
The present invention relates to data processing field, more specifically to a kind of data cached update method of paging and dress
Put.
Background technology
At present, for can in the terminal be shown with the list type page as the larger information of this kind of data volume of news information.
User can be different by switching access to web page paging.Meanwhile, in order to improve information reading speed, can be in terminal and server end
Between caching system is set, read Large Copacity information list data when, using caching system directly be terminal service, can subtract
Few data interaction between terminal and server end.In order to reduce the database of server end and the resource pressure of caching system,
Paging caching is built in caching system.But, the renewal operation to data in the database of server end (is added, changed
Or delete the operation of the content of information list) and all it is individually operated for a certain data, it is difficult to positioning and renewal are single with page
Data in the caching system of position, after causing the data in the database of server end to update, the paging caching in caching system
Data do not update.
The content of the invention
In view of this, the present invention proposes a kind of data cached update method of paging and device, is intended to realize synchronous in time slow
The data cached purpose of paging in deposit system.
To achieve these goals, it is proposed that scheme it is as follows:
A kind of data cached update method of paging, including:
The data inquiry request of receiving terminal;
According to fresh information of the data more new record pond comprising data record in database, judging please with the data query
With the presence or absence of the data record for needing to be updated in asking corresponding paging data cached, if in the presence of inquiry database update institute
State paging data cached;
It is data cached the corresponding paging of the data inquiry request to be returned to the terminal.
Preferably, before the data inquiry request of the receiving terminal, also include:
The fresh information of the data record being updated in the database is preserved to the data more new record pond.
Preferably, the fresh information is:Renewal time timestamp.
Preferably, it is described according to fresh information of the data more new record pond comprising data record in database, judge and institute
State the corresponding paging of data inquiry request it is data cached in the presence or absence of the data record that is updated is needed, specifically include:
Judge the data record stabbed more than the very first time with the presence or absence of renewal time timestamp during the paging is data cached,
If in the presence of, it is determined that the corresponding paging of the data inquiry request is data cached middle in the presence of the data record for needing to be updated, if
Do not exist, it is determined that in the absence of the data record for needing to be updated during the corresponding paging of the data inquiry request is data cached,
Corresponding generation time timestamp when the very first time stamp is generated for the paging is data cached.
A kind of data cached updating device of paging, including:
Request reception unit, for the data inquiry request of receiving terminal;
Judging unit is updated, for according to fresh information of the data more new record pond comprising data record in database, sentencing
With the presence or absence of the data record for needing to be updated during paging corresponding with the data inquiry request of breaking is data cached, if in the presence of,
Data updating unit, data returning unit are then performed according to this;If not existing, the data returning unit is performed;
The data updating unit, it is data cached for inquiring about paging described in database update;
The data returning unit, for returning to the corresponding paging caching number of the data inquiry request to the terminal
According to.
Preferably, described device, also includes:
Record pond updating device, for before the data inquiry request of the receiving terminal, by the database by more
The fresh information of new data record is preserved to the data more new record pond.
Preferably, the fresh information is:Renewal time timestamp.
Preferably, the renewal judging unit, specifically for:
Judge the data record stabbed more than the very first time with the presence or absence of renewal time timestamp during the paging is data cached,
If in the presence of, it is determined that the corresponding paging of the data inquiry request is data cached middle in the presence of the data record for needing to be updated, if
Do not exist, it is determined that in the absence of the data record for needing to be updated during the corresponding paging of the data inquiry request is data cached,
Corresponding generation time timestamp when the very first time stamp is generated for the paging is data cached.
Compared with prior art, technical scheme has advantages below:
A kind of data cached update method of paging and device that above-mentioned technical proposal is provided, the data query of receiving terminal
After request, according to fresh information of the data more new record pond comprising data record in database, judging please with the data query
With the presence or absence of the data record for needing to be updated in asking corresponding paging data cached, if in the presence of inquiry database update institute
State paging data cached, it is then data cached to the corresponding paging of terminal returned data inquiry request.Receiving the number of terminal
After according to inquiry request, actively check whether whether corresponding paging is expired in data cached, i.e., need to be updated, so it is synchronous in time
Paging is data cached in caching system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of the data cached update method of paging provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the data cached update method of another paging provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of the data cached updating device of paging provided in an embodiment of the present invention;
Fig. 4 is the structural representation of the data cached updating device of another paging provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The present embodiment provides a kind of paging data cached update method, and shown in Figure 1, the method can include:
Step S11:The data inquiry request of receiving terminal;
When a certain page of user's switching access to web page, terminal to server end sends corresponding data inquiry request.
Step S12:According to fresh information of the data more new record pond comprising data record in database, judge and the number
According to the corresponding paging of inquiry request in data cached with the presence or absence of needing the data record that is updated, if in the presence of performing step
S13, if not existing, performs step S14;
Step S13:Paging described in inquiry database update is data cached;
Database is made up of tables of data, and, " field " or " field ", the row of table is " record ", data record for the row of table
It refer to one group of complete relevant information corresponding to a row information in data source.Comprising every in database in data more new record pond
The fresh information of data record.Each data record, utilizes during paging corresponding for data inquiry request is data cached
The fresh information of the respective data record in the database included in more new record pond, judge whether it is expired, as long as can judge
Any one data during paging is data cached records expired, that is, judge there is the data record for needing to be updated, then inquire about
Database update paging is data cached, realizes the data cached timely synchronization of paging in caching system.
Step S14:It is data cached the corresponding paging of the data inquiry request to be returned to the terminal.
If not existing expired data record during paging is data cached, directly can return to corresponding paging to terminal and delay
Deposit data, and it is after being not used in the data cached synchronization of paging then data cached to the paging after terminal return synchronization.
The data cached update method of a kind of paging that the present embodiment is provided, after the data inquiry request of receiving terminal, root
According to fresh information of the data more new record pond comprising data record in database, corresponding with the data inquiry request point is judged
With the presence or absence of the data record for needing to be updated in caching of page data, if in the presence of paging caching described in inquiry database update
Data, it is then data cached to the corresponding paging of terminal returned data inquiry request.Receiving the data inquiry request of terminal
Afterwards, actively check whether whether corresponding paging is expired in data cached, i.e., need to be updated, and then realize timely synchronization caching
Paging is data cached in system.
Further, it is shown in Figure 2, before the data inquiry request of the receiving terminal, can also include:
Step S10:The fresh information of the data record being updated in the database is preserved to the data to update and is remembered
Record pond.
(addition, modification or deletion please renewal request of the terminal for certain data in database is received for server end
Ask) after, when renewal request is performed, the corresponding fresh information of respective data record can be also preserved in data more new record pond,
It can be specifically renewal time timestamp.This number is preserved as key using the unique identifier (ItemID) of data record
According to the renewal time timestamp (updating the value of time) of record.
After the data inquiry request for receiving terminal, judge paging in data cached with the presence or absence of renewal time timestamp
More than the data record that the very first time stabs, if in the presence of, it is determined that deposited during the corresponding paging of the data inquiry request is data cached
In the data record that is updated of needs, if not existing, it is determined that during the corresponding paging of the data inquiry request is data cached not
In the presence of the data record that needs are updated, when the very first time stamp is generated for the paging is data cached during corresponding generation
Between timestamp.
A certain paging is data cached be generated comprising it when corresponding generation time timestamp (generating the value of time).
The unique identifier recorded using the data cached every data for including of paging inquires unique with this in data more new record pond
The corresponding renewal time timestamp of identifier, if the renewal time timestamp generation time time data cached more than paging
Stamp, then explanation data record is expired, it is necessary to the synchronous paging is data cached.
For foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but
It is that those skilled in the art should know, the present invention is not limited by described sequence of movement, because according to the present invention, certain
A little steps can sequentially or simultaneously be carried out using other.
Following is apparatus of the present invention embodiment, can be used for performing the inventive method embodiment.For apparatus of the present invention reality
The details not disclosed in example is applied, the inventive method embodiment is refer to.
The present embodiment provides a kind of paging data cached updating device, and shown in Figure 3, the device can include:
Request reception unit 11, for the data inquiry request of receiving terminal;
Judging unit 12 is updated, the fresh information for including data record in database according to data more new record pond,
The data record being updated with the presence or absence of needs during paging corresponding with the data inquiry request is data cached is judged, if depositing
Data updating unit 13, data returning unit 14 are then being performed according to this;If not existing, the data returning unit 14 is performed;
The data updating unit 13, it is data cached for inquiring about paging described in database update;
The data returning unit 14, for returning to the corresponding paging caching number of the data inquiry request to the terminal
According to.
The data cached updating device of a kind of paging that the present embodiment is provided, the data of the receiving terminal of request reception unit 11
After inquiry request, judging unit 12 is updated according to fresh information of the data more new record pond comprising data record in database, sentence
With the presence or absence of the data record for needing to be updated during paging corresponding with the data inquiry request of breaking is data cached, if in the presence of,
Then paging described in the inquiry of data updating unit 13 database update is data cached, and then data returning unit 14 returns to number to terminal
It is data cached according to the corresponding paging of inquiry request.After the data inquiry request for receiving terminal, actively check that corresponding paging is delayed
It is whether expired in deposit data, i.e., whether need to be updated, and then paging is data cached in realizing timely synchronization caching system.
The present embodiment provides another paging data cached updating device, shown in Figure 4, public with respect to above-described embodiment
The device opened, the device can also include:
Record pond updating device 10, for before the data inquiry request of the receiving terminal, by quilt in the database
The fresh information of the data record of renewal is preserved to the data more new record pond.
Preferably, the fresh information can be:Renewal time timestamp.
Judging unit 12 is updated, specifically for:Judge the paging in data cached with the presence or absence of renewal time timestamp
More than the data record that the very first time stabs, if in the presence of, it is determined that deposited during the corresponding paging of the data inquiry request is data cached
In the data record that is updated of needs, if not existing, it is determined that during the corresponding paging of the data inquiry request is data cached not
In the presence of the data record that needs are updated, when the very first time stamp is generated for the paging is data cached during corresponding generation
Between timestamp
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, the part shown as unit can be or may not be physics list
Unit, you can with positioned at a place, or can also be distributed on multiple NEs.It can according to the actual needs be selected
In some or all of module realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying creativeness
In the case of work, you can to understand and implement.
Herein, term " including ", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, from
And the process, method, article or the equipment that include a series of key elements is not only included those key elements, but also including not bright
Other key elements really listed, or it is this process, method, article or the intrinsic key element of equipment also to include.Do not having
In the case of more limitations, the key element limited by sentence "including a ...", it is not excluded that the process including the key element,
Also there is other identical element in method, article or equipment.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.
To the described above of disclosed embodiment of this invention, professional and technical personnel in the field is realized or use this
Invention.Various modifications to these embodiments will be apparent for those skilled in the art, institute herein
The General Principle of definition can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore,
The present invention is not intended to be limited to the embodiments shown herein, and is to fit to special with principles disclosed herein and novelty
The consistent scope most wide of point.
Claims (8)
1. the data cached update method of a kind of paging, it is characterised in that including:
The data inquiry request of receiving terminal;
According to fresh information of the data more new record pond comprising data record in database, judge and the data inquiry request pair
With the presence or absence of the data record for needing to be updated during the paging answered is data cached, if in the presence of described in inquiry database update point
Caching of page data;
It is data cached the corresponding paging of the data inquiry request to be returned to the terminal.
2. method according to claim 1, it is characterised in that before the data inquiry request of the receiving terminal, also wrap
Include:
The fresh information of the data record being updated in the database is preserved to the data more new record pond.
3. method according to claim 1 and 2, it is characterised in that the fresh information is:Renewal time timestamp.
4. method according to claim 3, it is characterised in that described that number in database is included according to data more new record pond
According to the fresh information of record, judge to be updated with the presence or absence of needs during paging corresponding with the data inquiry request is data cached
Data record, specifically include:
The data record stabbed more than the very first time with the presence or absence of renewal time timestamp during the paging is data cached is judged, if depositing
, it is determined that the corresponding paging of the data inquiry request is data cached middle in the presence of the data record for needing to be updated, if not depositing
, it is determined that it is described in the absence of the data record for needing to be updated during the corresponding paging of the data inquiry request is data cached
Corresponding generation time timestamp when very first time stamp is generated for the paging is data cached.
5. the data cached updating device of a kind of paging, it is characterised in that including:
Request reception unit, for the data inquiry request of receiving terminal;
Update judging unit, for according to fresh information of the data more new record pond comprising data record in database, judge with
With the presence or absence of the data record for needing to be updated during the corresponding paging of the data inquiry request is data cached, if in the presence of, according to
This performs data updating unit, data returning unit;If not existing, the data returning unit is performed;
The data updating unit, it is data cached for inquiring about paging described in database update;
The data returning unit, it is data cached for returning to the corresponding paging of the data inquiry request to the terminal.
6. device according to claim 5, it is characterised in that described device, also includes:
Record pond updating device, for before the data inquiry request of the receiving terminal, by what is be updated in the database
The fresh information of data record is preserved to the data more new record pond.
7. the device according to claim 5 or 6, it is characterised in that the fresh information is:Renewal time timestamp.
8. device according to claim 7, it is characterised in that the renewal judging unit, specifically for:
The data record stabbed more than the very first time with the presence or absence of renewal time timestamp during the paging is data cached is judged, if depositing
, it is determined that the corresponding paging of the data inquiry request is data cached middle in the presence of the data record for needing to be updated, if not depositing
, it is determined that it is described in the absence of the data record for needing to be updated during the corresponding paging of the data inquiry request is data cached
Corresponding generation time timestamp when very first time stamp is generated for the paging is data cached.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710174007.9A CN106934057A (en) | 2017-03-22 | 2017-03-22 | A kind of data cached update method of paging and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710174007.9A CN106934057A (en) | 2017-03-22 | 2017-03-22 | A kind of data cached update method of paging and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106934057A true CN106934057A (en) | 2017-07-07 |
Family
ID=59432247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710174007.9A Pending CN106934057A (en) | 2017-03-22 | 2017-03-22 | A kind of data cached update method of paging and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106934057A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108595487A (en) * | 2018-03-14 | 2018-09-28 | 摇了购(武汉)电子商务有限公司 | The method and system of data are accessed under a kind of big data high concurrent |
CN108897495A (en) * | 2018-06-28 | 2018-11-27 | 北京五八信息技术有限公司 | Buffering updating method, device, buffer memory device and storage medium |
CN110083763A (en) * | 2019-04-09 | 2019-08-02 | 上海车轮互联网服务有限公司 | Data query method and device |
CN111046070A (en) * | 2019-11-21 | 2020-04-21 | 深圳前海环融联易信息科技服务有限公司 | Intelligent data caching method and device, computer equipment and storage medium |
CN111367952A (en) * | 2020-03-02 | 2020-07-03 | 中国邮政储蓄银行股份有限公司 | Paging query method and system for cache data and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127783A (en) * | 2007-09-28 | 2008-02-20 | 北京金山软件有限公司 | A website buffering method and device |
CN104391862A (en) * | 2014-10-23 | 2015-03-04 | 北京锐安科技有限公司 | Method and device for updating cache data |
CN104573035A (en) * | 2015-01-16 | 2015-04-29 | 杭州犀照科技有限公司 | Caching service method and device and news information obtaining method and system |
CN105630819A (en) * | 2014-11-03 | 2016-06-01 | 阿里巴巴集团控股有限公司 | Cached data refreshing method and apparatus |
-
2017
- 2017-03-22 CN CN201710174007.9A patent/CN106934057A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127783A (en) * | 2007-09-28 | 2008-02-20 | 北京金山软件有限公司 | A website buffering method and device |
CN104391862A (en) * | 2014-10-23 | 2015-03-04 | 北京锐安科技有限公司 | Method and device for updating cache data |
CN105630819A (en) * | 2014-11-03 | 2016-06-01 | 阿里巴巴集团控股有限公司 | Cached data refreshing method and apparatus |
CN104573035A (en) * | 2015-01-16 | 2015-04-29 | 杭州犀照科技有限公司 | Caching service method and device and news information obtaining method and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN108897495A (en) * | 2018-06-28 | 2018-11-27 | 北京五八信息技术有限公司 | Buffering updating method, device, buffer memory device and storage medium |
CN108897495B (en) * | 2018-06-28 | 2023-10-03 | 北京五八信息技术有限公司 | Cache updating method, device, cache equipment and storage medium |
CN110083763A (en) * | 2019-04-09 | 2019-08-02 | 上海车轮互联网服务有限公司 | Data query method and device |
CN111046070A (en) * | 2019-11-21 | 2020-04-21 | 深圳前海环融联易信息科技服务有限公司 | Intelligent data caching method and device, computer equipment and storage medium |
CN111367952A (en) * | 2020-03-02 | 2020-07-03 | 中国邮政储蓄银行股份有限公司 | Paging query method and system for cache data and computer readable storage medium |
CN111367952B (en) * | 2020-03-02 | 2023-08-25 | 中国邮政储蓄银行股份有限公司 | Paging query method, system and computer readable storage medium for cache data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106934057A (en) | A kind of data cached update method of paging and device | |
CN103685590B (en) | Obtain the method and system of IP address | |
CN105897946B (en) | A kind of acquisition methods and system of access address | |
CN104301360B (en) | A kind of method of logdata record, log server and system | |
CN103853727B (en) | Improve the method and system of big data quantity query performance | |
CN104090889B (en) | Data processing method and system | |
CN105045932B (en) | A kind of data page querying method based on descending storage | |
CN107943951A (en) | A kind of search method and system of block chain business information | |
CN100543750C (en) | A kind of matrix type data caching method and device of using based on WEB | |
US20070124437A1 (en) | Method and system for real-time collection of log data from distributed network components | |
CN101442558B (en) | Method and system for providing index service for P2SP network | |
CN105955862A (en) | Abnormal problem monitoring positioning method and device | |
ATE521201T1 (en) | METHOD FOR OBTAINING CROSS-NETWORK ACCESSIBLE INFORMATION ON A MOBILE COMMUNICATIONS SYSTEM | |
CN105868231A (en) | Cache data updating method and device | |
CN110362632A (en) | A kind of method of data synchronization, device, equipment and computer readable storage medium | |
CN104317957B (en) | A kind of open platform of report form processing, system and report processing method | |
CN105989076A (en) | Data statistical method and device | |
CN104636477B (en) | The De-weight method of push list before a kind of information push | |
CN101202966A (en) | Method, system and apparatus for collecting user information | |
CN105159845A (en) | Memory reading method | |
CN104834700A (en) | Method for capturing movement data increment based on track change | |
CN104144223B (en) | A kind of data capture method and device | |
CN101106784A (en) | Information sorting and method, system and device for establishing initial network communication contact book | |
CN105787090A (en) | Index building method and system of OLAP system of electric data | |
CN102982034B (en) | The searching method and search system of Internet website information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170707 |