CN107122410A - A kind of buffering updating method and device - Google Patents
A kind of buffering updating method and device Download PDFInfo
- Publication number
- CN107122410A CN107122410A CN201710199179.1A CN201710199179A CN107122410A CN 107122410 A CN107122410 A CN 107122410A CN 201710199179 A CN201710199179 A CN 201710199179A CN 107122410 A CN107122410 A CN 107122410A
- Authority
- CN
- China
- Prior art keywords
- data
- local
- version
- version information
- cache
- 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
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0804—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0866—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
-
- 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
- G06F16/2308—Concurrency control
- G06F16/2336—Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
- G06F16/2343—Locking methods, e.g. distributed locking or locking implementation details
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
- H04L67/5682—Policies or rules for updating, deleting or replacing the stored data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
- G06F2212/1021—Hit rate improvement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1032—Reliability improvement, data loss prevention, degraded operation etc
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/15—Use in a specific computing environment
- G06F2212/154—Networked environment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/16—General purpose computing application
- G06F2212/163—Server or database system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention provides a kind of buffering updating method and device, and described method includes:S1, receives the access request that client is sent, wherein, the access request includes Data Identification to be visited and corresponding tables of data identification information;S2, searches the version information of corresponding with Data Identification to be visited data result and data result from local data cache;And search the version information corresponding with tables of data identification information from local version caching;S3, judges the version information searched from local data cache and whether the version information searched is consistent from local version caching, and determines according to judged result the update mode of local data cache.By the present invention, by the triggering of user access request, automatically updating for local cache data is realized so that local cache data is consistent with the data in server database.
Description
Technical field
The present invention relates to Data cache technology, more particularly, to a kind of buffering updating method and device.
Background technology
At present, caching (caching refers to a kind of key assignments data storage scheme for being stored in internal memory, such as MEMCACHE or
REDIS etc.) by substantial amounts of use into WEB application.In order to provide the Consumer's Experience of stability and high efficiency, the WEB of many high accesses
Using can all consider to place data into local cache.This mode from background server database than directly reading data meeting
It is fast a lot, so as to support higher visit capacity with less server.
During being constantly updated with the data in background server database, the data in local cache are also required to more
Newly, common update mode is that manually local cache is updated according to the update cycle at present.
For the data for needing access for user in the way of the update cycle is updated to local cache, without pin
To property, updated for the different data of access frequency according to the update cycle so that data resource is wasted.
The content of the invention
The present invention provides a kind of buffering updating method and device, overcomes existing buffer update opportunity according to the update cycle
It is updated the problem of specific aim is not strong.
According to an aspect of the invention, there is provided a kind of buffering updating method, including:
S1, receives the access request that client is sent, wherein, the access request includes Data Identification to be visited and right
The tables of data identification information answered;
S2, searched and the corresponding data result of Data Identification to be visited and the data from local data cache
As a result version information;And search the version information corresponding with the tables of data identification information from local version caching;
S3, judges the version information searched from local data cache and the version information searched from local version caching
Whether unanimously, and according to judged result the update mode of local data cache is determined.
Beneficial effects of the present invention are:According to the access request of client, correspondence is searched from local data cache respectively
Data result and version information, and search corresponding version information from local version caching, and compare two versions letters
Whether breath is consistent, and the update mode of local data cache is determined according to two whether consistent results of version information, and the present invention is logical
The access request for crossing client triggers the renewal of local data cache, regular to local cache according to the update cycle compared to existing
It is updated, more targetedly, can also realizes automatically updating for local cache data so that local cache data and service
Data in device database are consistent.
On the basis of above-mentioned technical proposal, the present invention can also make following improvement.
Optionally, determine that the update mode of local data cache is specifically included according to judged result in the step S3:
If judging, the version information searched from local data cache is believed with the version searched from local version caching
When ceasing consistent, then data result corresponding with the Data Identification to be visited will be found from local data cache and described
The version information of data result is re-write in local data cache, to increase the caching period of the data result, and will be from
The data result searched in local data cache returns to client.
It is described optionally to have the beneficial effect that:The version information searched from local data cache with from local version caching
When the version information of lookup is consistent, the data result in local data cache is reset, increases the caching period of the data, Neng Goubao
The temperature of the data is held, the hit rate of caching is improved.
Optionally, determine that the update mode of local data cache is specifically included according to judged result in the step S3:
If judging the version information searched from local data cache and the version found from local version caching
When information is inconsistent, then searched and the corresponding data result of Data Identification to be visited and the number from server database
According to the version information of result, local data cache is write, and the data result searched from server database is returned into visitor
Family end.
Optionally, the step S3 also includes:
When the version information for judging to search from local data cache and the version found from local version caching
When information is inconsistent, current access request is locked;
When finding corresponding with the Data Identification to be visited data result and version information from server database,
Write after local data cache, the current access request is unlocked, and the data result of lookup is returned into client.
It is described optionally to have the beneficial effect that:The version information searched from local data cache with from local version caching
When the version information found is inconsistent, current access request is locked, now only current access request is able to carry out operation,
Avoid substantial amounts of access request pressure on the database, cause burden too big to database.
Optionally, also include before the step S1:
The data content in server database is updated according to the update frequency corresponding update cycle, and recorded more
Version information after new, meanwhile, the version information in being cached to local version synchronizes renewal.
According to another aspect of the present invention, a kind of buffer update device is additionally provided, including:
Receiving module, the access request for receiving client transmission, wherein, the access request includes number to be visited
According to mark and corresponding tables of data identification information;
Searching modul, for searched from local data cache data result corresponding with the Data Identification to be visited and
The version information of the data result;And search the version corresponding with the tables of data identification information from local version caching
Information;
Judge module, for version information and the lookup from local version caching for judging to search from local data cache
Version information it is whether consistent;
Local cache update module, the renewal for determining local data cache according to the judged result of the judge module
Mode.
Optionally, the update module includes:
First updates subelement, if the version information for judging to search from local data cache for the judge module
When consistent with the version information searched in being cached from local version, then it will be found from local data cache and wait to visit with described
Ask that the version information of the corresponding data result of Data Identification and the data result is re-write in local data cache, to increase
Plus the caching period of the data result, and the data result searched from local data cache is returned into client.
Optionally, the local cache update module includes:
Second updates subelement, if the version information for judging to search from local data cache for the judge module
With the version information that is found in being cached from local version it is inconsistent when, then corresponding data knot is searched from server database
Fruit and the version information of the data result, write local data cache, and by the data knot searched from server database
Fruit returns to client.
Optionally, in addition to module and unlocked state are locked;
The locking module, for when the judge module judge the version information searched from local data cache with
When the version information found from local version caching is inconsistent, current access request is locked;
The unlocked state, for when finding number corresponding with the Data Identification to be visited from server database
According to result and the version information of the data result, write after local data cache, the current access request is unlocked.
Optionally, in addition to database update module;
Database update module, for according to the update frequency corresponding update cycle in the data in server database
Appearance is updated, and records the version information after updating;
The local cache update module is additionally operable to:
Version information in being cached while server database updates to local version synchronizes renewal.
Brief description of the drawings
Fig. 1 is the buffering updating method flow chart of one embodiment of the invention;
Fig. 2 connects block diagram for the buffer update device of another embodiment of the present invention;
Fig. 3 is connected block diagram for the buffer update device of another embodiment of the present invention;
Fig. 4 connects frame for the inside of local cache update module in the buffer update device of another embodiment of the present invention
Figure;
Fig. 5 is the connection block diagram of the test equipment of the buffer update device of another embodiment of the invention.
Embodiment
With reference to the accompanying drawings and examples, the embodiment to the present invention is described in further detail.Implement below
Example is used to illustrate the present invention, but is not limited to the scope of the present invention.
Referring to Fig. 1, it is the buffering updating method of one embodiment of the invention, mainly includes:S1, receives what client was sent
Access request, wherein, the access request includes Data Identification to be visited and corresponding tables of data identification information;S2, from this
The version information of corresponding with accessing Data Identification data result and data result is searched in ground data buffer storage;And from city edition
The version information corresponding with tables of data identification information is searched in this caching;S3, judges the version searched from local data cache
Whether information is consistent with the version information searched from local version caching, and determines local data cache according to judged result
Update mode.
It is typically the data access request sent according to client during data access, the lookup pair from server
The data result answered returns to client.In order to improve the Consumer's Experience of stability and high efficiency, the WEB application of many high accesses all can
Consideration is placed data into local cache, with the renewal of data, and the data in local cache are also required to update.
In the present embodiment, local cache includes local data cache and local version caches two classes caching, wherein, locally
Data buffer storage mainly deposits main storage version letter in specific data content and corresponding version information, local version caching
Breath.The present embodiment carries the tables of data at Data Identification to be visited and place according to the access request of client in access request
Information, searches the version of corresponding with data identification information to be visited data result and data result from local data cache respectively
This information, and the version information corresponding with tables of data identification information is searched from local version caching, and compare two versions
Whether information is consistent, and the update mode of local data cache is determined according to two whether consistent results of version information.The present invention
The renewal of local data cache is triggered by the access request of client, periodically delayed compared to existing according to the update cycle to local
Deposit and be updated, more targetedly, can also realize automatically updating for local cache data so that local cache data and clothes
Data in business device database are consistent.
In one embodiment of the invention, the renewal of local data cache is determined in the step S3 according to judged result
Mode is specifically included:If judging the version information searched from local data cache and the version searched from local version caching
When this information is consistent, then will be found from local data cache data result corresponding with data identification information to be visited and
The version information of data result is re-write in local data cache, to increase the caching period of the data result, and will be from
The data result searched in local data cache returns to client.
In the present embodiment, when the version information searched from local data cache and the version searched from local version caching
When this information is consistent, illustrate that the data belong to the high data of access frequency, need not this time update.It should be noted that local
The data cached in data buffer storage all have caching period, generally set a caching period to the data in local cache, when
When caching period reaches, the data in local cache are timed out.It is right in the present embodiment when receiving the access request of client
Data in local data cache are updated.It is not vertical to the data if the access frequency of the data of current accessed is higher
It is updated, the data can be reset, the data result and version information that will be searched from local data cache re-writes
In local data cache, the data result in local data cache is reset, increases the caching period of the data, the number can be kept
According to temperature, improve caching hit rate.Such as, the caching period set for the data is 10 minutes, when the 6th minute
The access request of client is received, and is looked into when the version information searched from local data cache and from local version caching
When the version information looked for is consistent, the data are reset, then the data are just expired after 10 minutes from current time, if not resetting,
Then from updating the last time 10 minutes, the data are timed out, and thus maintain the temperature for changing data, improve the hit of caching
Rate.
If step S3 judges the version information searched from local data cache with being found from local version caching
Version information it is inconsistent when, then the data result corresponding with identification information to be visited and data are searched from server database
As a result version information, writes local data cache, and the data result searched from server database is returned into client
End.
When the version information found from local data cache and the version information found from local version caching
When inconsistent, show that the data in server database are updated, but the corresponding data in local data cache does not have also
Have renewal, therefore, the Data Identification to be visited in the access request sent according to client, from server database search with
In the version information of the corresponding data result of data identification information to be visited and data result, write-in local data cache, and will
The data result found from server database returns to client.
In another embodiment of the present invention, when the version information for judging to search from local data cache and from originally
When the version information found in ground version caching is inconsistent, current access request is locked;When being looked into from server database
Find after the version information of corresponding with Data Identification to be visited data result and data result, write-in local data cache, it is right
The current access request unblock, and the data result of lookup is returned into client.
When the version information searched from local data cache with the version information that is found from local version caching not
When consistent, current access request is locked, now only current access request is able to carry out subsequent operation, it is other without allowing
Access request performs operation, it is to avoid substantial amounts of access request penetrates local cache, is all pressed on server database, to database
Cause burden too big.Wait finds data corresponding with the Data Identification to be visited in access request from server database
As a result with the version information of data result, after write-in local data cache, then current access request is unlocked, now just allows it
Its access request performs operation.
It should be noted that being carried out according to the update frequency corresponding update cycle to the data content in server database
Update, and record the version information after updating, meanwhile, the version information in being cached to local version synchronizes renewal.
In the present embodiment, the data in server database are periodically updated according to update frequency, to service
After data in device database are updated, record the version information updated, such as, and timestamp when data update.Meanwhile,
When data in server database update, the version information in being cached to local version synchronizes renewal, i.e. local version
Version information in caching is also periodically to be updated.And the data in edition data caching are asked according to the access of client
Triggering is asked, only when client have sent access request, the data in local data cache can be just updated.
Be the buffer update device of another embodiment of the present invention referring to Fig. 2, including receiving module 21, searching modul 22,
Judge module 23 and local cache update module 24.
Receiving module 21, the access request for receiving client transmission, wherein, the access request includes to be visited
Data Identification and corresponding tables of data identification information;
Searching modul 22, for searching data result corresponding with the Data Identification to be visited from local data cache
With the version information of the data result;And search the version corresponding with the tables of data identification information from local version caching
This information;
Judge module 23, for the version information that judges to search from local data cache with being looked into from local version caching
Whether the version information looked for is consistent;
Local cache update module 24, for determining local data cache more according to the judged result of the judge module
New paragon.
Referring to Fig. 3, local cache update module 24, which includes the local cache update module 24, includes the first renewal son list
Member 241 and second updates subelement 242.
First updates subelement 241, if the version for judging to search from local data cache for the judge module 23
When this information is consistent with the version information searched from local version caching, then it will be found from local data cache and institute
The version information for stating the corresponding data result of Data Identification to be visited and data result is re-write in local data cache, to increase
Plus the caching period of the data result, and the data result searched from local data cache is returned into client.
Second updates subelement 242, if the version for judging to search from local data cache for the judge module 23
This information with when the version information that finds is inconsistent from local version caching, then searched from server database with it is described
The corresponding data result of Data Identification to be visited and version information, write local data cache, and will be from server database
The data result of lookup returns to client.
Referring to Fig. 4, the buffer update device that the present embodiment is provided also includes locking module 25, unlocked state 26 and database
Update module 27.
The locking module 25, for judging that the version searched from local data cache is believed when the judge module 23
When breath and the inconsistent version information found from local version caching, current access request is locked;
The unlocked state 26, data corresponding with Data Identification to be visited are found for working as from server database
As a result with the version information of data result, after write-in local data cache, the current access request is unlocked.
Described database update module 27, for according to the update frequency corresponding update cycle in server database
Data content be updated, and record update after version information;
The local cache update module 24 is additionally operable to:
Version information in being cached while server database updates to local version synchronizes renewal.
The buffer update device provided based on above-mentioned Fig. 2, Fig. 3 embodiment corresponding with Fig. 4, it is slow the invention provides one kind
Deposit the test equipment of updating device.Referring to Fig. 5, the test equipment of the buffer update device includes:Processor (processor)
501st, memory (memory) 502, communication interface (Communications Interface) 503 and bus 504;
Wherein, processor 501, memory 502 and communication interface 503 complete mutual communication by bus 504 respectively;
The information transfer that communication interface 503 is used between the test equipment and the communication equipment of buffer update device;
Processor 501 is used to call the programmed instruction in memory 502, is provided with performing above-mentioned Fig. 1 correspondences embodiment
Application fluency evaluation method, for example including:The access request that client is sent is received, wherein, wrapped in the access request
Include Data Identification to be visited and corresponding tables of data identification information;Searched and the data mark to be visited from local data cache
Know the version information of corresponding data result and the data result;And searched and the tables of data from local version caching
Version information corresponding to identification information;Judge the version information searched from local data cache with being looked into from local version caching
Whether the version information looked for is consistent, and determines according to judged result the update mode of local data cache.
The present invention discloses a kind of computer program product, and the computer program product can including being stored in non-transient computer
The computer program on storage medium is read, the computer program includes programmed instruction, when programmed instruction is computer-executed, meter
Calculation machine is able to carry out the application fluency evaluation method that above-mentioned Fig. 1 correspondence embodiment is provided, for example including:Receive client hair
The access request sent, wherein, the access request includes Data Identification to be visited and corresponding tables of data identification information;From this
Searched and the corresponding data result of Data Identification to be visited and the version information of the data result in ground data buffer storage;With
And search the version information corresponding with the tables of data identification information from local version caching;Judge from local data cache
Whether the version information of lookup is consistent with the version information searched from local version caching, and determined locally according to judged result
The update mode of data buffer storage.
The present invention provides a kind of non-transient computer readable storage medium storing program for executing, non-transient computer readable storage medium storing program for executing storage
Computer instruction, the computer instruction makes computer perform the application fluency evaluation side that above-mentioned Fig. 1 correspondences embodiment is provided
Method, for example including:Receive client send access request, wherein, the access request include Data Identification to be visited and
Corresponding tables of data identification information;Searched from local data cache data result corresponding with the Data Identification to be visited and
The version information of the data result;And search the version corresponding with the tables of data identification information from local version caching
Information;Judge the version information searched from local data cache with from local version caching the version information searched whether one
Cause, and determine according to judged result the update mode of local data cache.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program
Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
The embodiments such as the test equipment of buffer update device described above are only schematical, wherein being used as separation
The unit of part description can be or may not be it is physically separate, the part shown as unit can be or
It can not be physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality
Some or all of module therein is selected to realize the purpose of this embodiment scheme the need for border.Those of ordinary skill in the art
In the case where not paying performing creative labour, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Understood based on such, on
The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should
Computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers
Order is to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation
Some Part Methods of example or embodiment.
A kind of buffering updating method and device that the present invention is provided, according to the access request of client, respectively from local number
Corresponding version information is searched according to searching corresponding data result and version information in caching, and from local version caching,
And whether consistent, determine local data cache more according to two whether consistent results of version information if comparing two version informations
New paragon, the present invention triggers the renewal of local data cache by the access request of client, all according to updating compared to existing
Phase is periodically updated to local cache, more targetedly, can also realize automatically updating for local cache data so that this
The data cached data with server database in ground are consistent.When the data in local data cache need not update,
Local data cache is reset, data temperature is kept, cache hit rate is improved;And when local data cache needs to update
When, current access request is locked, now only current access request is able to carry out operation, it is to avoid substantial amounts of access request is pressed in
On database, cause burden too big to database.
Finally, the present processes are only preferably embodiment, are not intended to limit the scope of the present invention.It is all
Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc. should be included in the protection of the present invention
Within the scope of.
Claims (10)
1. a kind of buffering updating method, it is characterised in that including:
S1, receives the access request that client is sent, wherein, the access request includes Data Identification to be visited and corresponding
Tables of data identification information;
S2, is searched and the corresponding data result of Data Identification to be visited and the data result from local data cache
Version information;And search the version information corresponding with the tables of data identification information from local version caching;
S3, whether the version information searched in judging the version information searched from local data cache and being cached from local version
Unanimously, and according to judged result the update mode of local data cache is determined.
2. buffering updating method as claimed in claim 1, it is characterised in that this is determined according to judged result in the step S3
The update mode of ground data buffer storage is specifically included:
If judging the version information searched from local data cache and the version information one searched from local version caching
During cause, then it will be found from local data cache and the corresponding data result of Data Identification to be visited and the data
As a result version information is re-write in local data cache, to increase the caching period of the data result, and will be from local
The data result searched in data buffer storage returns to client.
3. buffering updating method as claimed in claim 1, it is characterised in that this is determined according to judged result in the step S3
The update mode of ground data buffer storage is specifically included:
If judging the version information searched from local data cache and the version information found from local version caching
When inconsistent, then searched and the corresponding data result of Data Identification to be visited and the data knot from server database
The version information of fruit, writes local data cache, and the data result searched from server database is returned into client.
4. buffering updating method as claimed in claim 3, it is characterised in that the step S3 also includes:
When the version information for judging to search from local data cache and the version information found from local version caching
When inconsistent, current access request is locked;
When the version that corresponding with the Data Identification to be visited data result and data result are found from server database
After this information, write-in local data cache, the current access request is unlocked, and the data result of lookup is returned into client
End.
5. buffering updating method as claimed in claim 4, it is characterised in that also include before the step S1:
The data content in server database is updated according to the update frequency corresponding update cycle, and recorded after renewal
Version information, meanwhile, to local version cache in version information synchronize renewal.
6. a kind of buffer update device, it is characterised in that including:
Receiving module, the access request for receiving client transmission, wherein, the access request includes data mark to be visited
Know and corresponding tables of data identification information;
Searching modul, for searching data result corresponding with the Data Identification to be visited from local data cache and described
The version information of data result;And the version letter corresponding with the tables of data identification information is searched from local version caching
Breath;
Judge module, for the version information for judging to search from local data cache and the version searched from local version caching
Whether this information is consistent;
Local cache update module, the renewal side for determining local data cache according to the judged result of the judge module
Formula.
7. buffer update device as claimed in claim 6, it is characterised in that the update module includes:
First updates subelement, if for the judge module judge the version information searched from local data cache with from
When the version information searched in local version caching is consistent, then it will be found from local data cache and the number to be visited
Re-write according to the version information for identifying corresponding data result and the data result in local data cache, to increase
The caching period of data result is stated, and the data result searched from local data cache is returned into client.
8. buffer update device as claimed in claim 6, it is characterised in that the local cache update module includes:
Second updates subelement, if for the judge module judge the version information searched from local data cache with from
When the version information found in local version caching is inconsistent, then searched and the mark to be visited from server database
The version information of corresponding data result and the data result, writes local data cache, and will be from server database
The data result of lookup returns to client.
9. buffer update device as claimed in claim 8, it is characterised in that also including locking module and unlocked state;
The locking module, for when the judge module judge the version information searched from local data cache with from this
When the version information found in ground version caching is inconsistent, current access request is locked;
The unlocked state, for when finding data knot corresponding with the Data Identification to be visited from server database
After fruit and the version information of the data result, write-in local data cache, the current access request is unlocked.
10. buffer update device as claimed in claim 9, it is characterised in that also including database update module;
Database update module, for entering according to the update frequency corresponding update cycle to the data content in server database
Row updates, and records the version information after updating;
The local cache update module is additionally operable to:
Version information in being cached while server database updates to local version synchronizes renewal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710199179.1A CN107122410A (en) | 2017-03-29 | 2017-03-29 | A kind of buffering updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710199179.1A CN107122410A (en) | 2017-03-29 | 2017-03-29 | A kind of buffering updating method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107122410A true CN107122410A (en) | 2017-09-01 |
Family
ID=59717488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710199179.1A Pending CN107122410A (en) | 2017-03-29 | 2017-03-29 | A kind of buffering updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107122410A (en) |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107862040A (en) * | 2017-11-06 | 2018-03-30 | 中国银行股份有限公司 | The update method of data, device and a kind of cluster in a kind of caching of application example |
CN108200127A (en) * | 2017-12-20 | 2018-06-22 | 东软集团股份有限公司 | Data transmission method for uplink, device, server, terminal and storage medium |
CN108650318A (en) * | 2018-05-10 | 2018-10-12 | 北京奇艺世纪科技有限公司 | A kind of data capture method and device |
CN108647357A (en) * | 2018-05-17 | 2018-10-12 | 阿里巴巴集团控股有限公司 | The method and device of data query |
CN108959341A (en) * | 2018-04-04 | 2018-12-07 | 阿里巴巴集团控股有限公司 | A kind of method, device and equipment that data are synchronous |
CN109388764A (en) * | 2018-09-11 | 2019-02-26 | 阿里巴巴集团控股有限公司 | A kind of update method of local cache, device, equipment and system |
CN109582684A (en) * | 2018-11-30 | 2019-04-05 | 深圳市盟天科技有限公司 | A kind of update method of local cache data, device, server and storage medium |
CN109828980A (en) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | Data cache method, device, terminal and storage medium |
CN109885786A (en) * | 2019-01-23 | 2019-06-14 | 聚好看科技股份有限公司 | Data buffer storage processing method, device, electronic equipment and readable storage medium storing program for executing |
CN110046167A (en) * | 2019-02-18 | 2019-07-23 | 阿里巴巴集团控股有限公司 | Data-updating method and system |
CN110413679A (en) * | 2019-07-31 | 2019-11-05 | 深圳前海微众银行股份有限公司 | Database information processing method, device, equipment and readable storage medium storing program for executing |
CN110515959A (en) * | 2019-07-25 | 2019-11-29 | 北京奇艺世纪科技有限公司 | Data consistency implementation method, device and readable storage medium storing program for executing |
CN110597739A (en) * | 2019-06-03 | 2019-12-20 | 上海云盾信息技术有限公司 | Configuration management method, system and equipment |
CN110598138A (en) * | 2018-06-12 | 2019-12-20 | 北京京东尚科信息技术有限公司 | Cache-based processing method and device |
CN110633324A (en) * | 2019-09-18 | 2019-12-31 | 中化信息技术有限公司 | Method, apparatus, electronic device and computer readable medium for synchronizing data |
CN110727892A (en) * | 2019-09-24 | 2020-01-24 | 北京奇艺世纪科技有限公司 | Cache data updating method and device and electronic equipment |
CN110941568A (en) * | 2019-10-23 | 2020-03-31 | 支付宝(杭州)信息技术有限公司 | Cache updating method, device, system, electronic equipment and medium |
CN111221861A (en) * | 2019-12-31 | 2020-06-02 | 武汉中海庭数据技术有限公司 | Method and device for synchronizing local cache and database data |
CN112053207A (en) * | 2020-09-01 | 2020-12-08 | 珠海随变科技有限公司 | Order information acquisition method and device, computer equipment and storage medium |
CN112839008A (en) * | 2019-11-22 | 2021-05-25 | 北京沃东天骏信息技术有限公司 | Access monitoring method, device and system |
CN114253988A (en) * | 2022-03-01 | 2022-03-29 | 维塔科技(北京)有限公司 | Version-based data updating method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101329681A (en) * | 2007-06-20 | 2008-12-24 | 国际商业机器公司 | Distributed lock manager for file system objects in a shared file system |
CN101771723A (en) * | 2010-01-05 | 2010-07-07 | 深圳中兴网信科技有限公司 | Data synchronization method |
CN104537013A (en) * | 2014-12-18 | 2015-04-22 | 北京京东尚科信息技术有限公司 | Data processing method and device |
CN106453500A (en) * | 2016-09-07 | 2017-02-22 | 努比亚技术有限公司 | Cache generation and control method, cache server and interface server |
-
2017
- 2017-03-29 CN CN201710199179.1A patent/CN107122410A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101329681A (en) * | 2007-06-20 | 2008-12-24 | 国际商业机器公司 | Distributed lock manager for file system objects in a shared file system |
CN101771723A (en) * | 2010-01-05 | 2010-07-07 | 深圳中兴网信科技有限公司 | Data synchronization method |
CN104537013A (en) * | 2014-12-18 | 2015-04-22 | 北京京东尚科信息技术有限公司 | Data processing method and device |
CN106453500A (en) * | 2016-09-07 | 2017-02-22 | 努比亚技术有限公司 | Cache generation and control method, cache server and interface server |
Cited By (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107862040B (en) * | 2017-11-06 | 2021-07-30 | 中国银行股份有限公司 | Method and device for updating data in cache of application instance and cluster |
CN107862040A (en) * | 2017-11-06 | 2018-03-30 | 中国银行股份有限公司 | The update method of data, device and a kind of cluster in a kind of caching of application example |
CN108200127A (en) * | 2017-12-20 | 2018-06-22 | 东软集团股份有限公司 | Data transmission method for uplink, device, server, terminal and storage medium |
CN108959341B (en) * | 2018-04-04 | 2020-06-19 | 阿里巴巴集团控股有限公司 | Data synchronization method, device and equipment |
CN108959341A (en) * | 2018-04-04 | 2018-12-07 | 阿里巴巴集团控股有限公司 | A kind of method, device and equipment that data are synchronous |
WO2019192258A1 (en) * | 2018-04-04 | 2019-10-10 | 阿里巴巴集团控股有限公司 | Data synchronization method, device and apparatus |
TWI735845B (en) * | 2018-04-04 | 2021-08-11 | 開曼群島商創新先進技術有限公司 | Method, device and equipment for data synchronization |
CN108650318A (en) * | 2018-05-10 | 2018-10-12 | 北京奇艺世纪科技有限公司 | A kind of data capture method and device |
CN108650318B (en) * | 2018-05-10 | 2021-04-30 | 北京奇艺世纪科技有限公司 | Data acquisition method and device |
CN108647357A (en) * | 2018-05-17 | 2018-10-12 | 阿里巴巴集团控股有限公司 | The method and device of data query |
CN110598138A (en) * | 2018-06-12 | 2019-12-20 | 北京京东尚科信息技术有限公司 | Cache-based processing method and device |
CN109388764A (en) * | 2018-09-11 | 2019-02-26 | 阿里巴巴集团控股有限公司 | A kind of update method of local cache, device, equipment and system |
CN109582684A (en) * | 2018-11-30 | 2019-04-05 | 深圳市盟天科技有限公司 | A kind of update method of local cache data, device, server and storage medium |
CN109885786A (en) * | 2019-01-23 | 2019-06-14 | 聚好看科技股份有限公司 | Data buffer storage processing method, device, electronic equipment and readable storage medium storing program for executing |
CN109885786B (en) * | 2019-01-23 | 2021-06-08 | 聚好看科技股份有限公司 | Data caching processing method and device, electronic equipment and readable storage medium |
CN110046167B (en) * | 2019-02-18 | 2024-03-26 | 创新先进技术有限公司 | Data updating method and system |
CN110046167A (en) * | 2019-02-18 | 2019-07-23 | 阿里巴巴集团控股有限公司 | Data-updating method and system |
CN109828980A (en) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | Data cache method, device, terminal and storage medium |
CN110597739A (en) * | 2019-06-03 | 2019-12-20 | 上海云盾信息技术有限公司 | Configuration management method, system and equipment |
CN110515959A (en) * | 2019-07-25 | 2019-11-29 | 北京奇艺世纪科技有限公司 | Data consistency implementation method, device and readable storage medium storing program for executing |
CN110413679B (en) * | 2019-07-31 | 2023-01-24 | 深圳前海微众银行股份有限公司 | Database information processing method, device, equipment and readable storage medium |
CN110413679A (en) * | 2019-07-31 | 2019-11-05 | 深圳前海微众银行股份有限公司 | Database information processing method, device, equipment and readable storage medium storing program for executing |
CN110633324A (en) * | 2019-09-18 | 2019-12-31 | 中化信息技术有限公司 | Method, apparatus, electronic device and computer readable medium for synchronizing data |
CN110633324B (en) * | 2019-09-18 | 2022-07-26 | 中化信息技术有限公司 | Method, apparatus, electronic device and computer readable medium for synchronizing data |
CN110727892A (en) * | 2019-09-24 | 2020-01-24 | 北京奇艺世纪科技有限公司 | Cache data updating method and device and electronic equipment |
CN110941568A (en) * | 2019-10-23 | 2020-03-31 | 支付宝(杭州)信息技术有限公司 | Cache updating method, device, system, electronic equipment and medium |
CN112839008A (en) * | 2019-11-22 | 2021-05-25 | 北京沃东天骏信息技术有限公司 | Access monitoring method, device and system |
CN112839008B (en) * | 2019-11-22 | 2024-02-06 | 北京沃东天骏信息技术有限公司 | Access monitoring method, device and system |
CN111221861A (en) * | 2019-12-31 | 2020-06-02 | 武汉中海庭数据技术有限公司 | Method and device for synchronizing local cache and database data |
CN111221861B (en) * | 2019-12-31 | 2023-06-02 | 武汉中海庭数据技术有限公司 | Method and device for synchronizing local cache and database data |
CN112053207A (en) * | 2020-09-01 | 2020-12-08 | 珠海随变科技有限公司 | Order information acquisition method and device, computer equipment and storage medium |
CN114253988A (en) * | 2022-03-01 | 2022-03-29 | 维塔科技(北京)有限公司 | Version-based data updating method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107122410A (en) | A kind of buffering updating method and device | |
CN105630823B (en) | Data cached monitoring method, device and system based on distributed system | |
CN106294772B (en) | The buffer memory management method of distributed memory columnar database | |
US20160154590A1 (en) | Memory Access Processing Method, Apparatus, and System | |
CN104794228B (en) | A kind of search result provides method and device | |
CN108810041A (en) | A kind of data write-in of distributed cache system and expansion method, device | |
CN105224255B (en) | A kind of storage file management method and device | |
US11595427B2 (en) | Systems and methods for rapidly generating security ratings | |
CN110008197A (en) | A kind of data processing method, system and electronic equipment and storage medium | |
CN108111325A (en) | A kind of resource allocation methods and device | |
US10289345B1 (en) | Contention and metadata write amplification reduction in log structured data storage mapping | |
US11099998B2 (en) | Method and device for optimization of data caching | |
US10210067B1 (en) | Space accounting in presence of data storage pre-mapper | |
US10747773B2 (en) | Database management system, computer, and database management method | |
CN106991059B (en) | access control method for data source | |
CN109597707A (en) | Clone volume data copying method, device and computer readable storage medium | |
CN109086462A (en) | The management method of metadata in a kind of distributed file system | |
US10416901B1 (en) | Storage element cloning in presence of data storage pre-mapper with multiple simultaneous instances of volume address using virtual copies | |
CN102819570B (en) | A kind of data access method, Apparatus and system | |
CN106021414B (en) | A kind of method and system accessing multi-level buffer parameter information | |
CN107430546A (en) | A kind of file updating method and storage device | |
CN116627331B (en) | Cache verification device, method and system | |
US10209909B1 (en) | Storage element cloning in presence of data storage pre-mapper | |
CN106407347A (en) | Data caching method and apparatus | |
KR101419428B1 (en) | Apparatus for logging and recovering transactions in database installed in a mobile environment and method thereof |
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: 20170901 |