Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Cache data updating method and device

A technology for caching data and updating methods, applied in the field of data processing, can solve the problems of database paralysis, difficult maintenance, bloated code, etc., to achieve the effect of improving security, reducing the amount of calculation, and avoiding performance bottlenecks

Inactive Publication Date: 2017-06-09
ALIBABA (CHINA) CO LTD
View PDF3 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] In this scheme, when writing data, a lot of additional calculation operations are added to couple the writing data with the calculation and reading logic. When there are many types of business, the code will become bloated, difficult to maintain, and not queried in the cache When the data is received, the cache penetrates to the database to query the required data, which will cause the database to be paralyzed when the concurrency is high. At the same time, the cache penetration design allows illegal users to directly attack the database by using the identifier of the cached data that does not exist, causing the database to paralysis

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Cache data updating method and device
  • Cache data updating method and device
  • Cache data updating method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0069] When step 201 is specifically implemented, when the data in the cache needs to be updated, the identifier of the cache data to be updated is added to the queue. In order to update the data in the cache in a timely manner and improve the validity of the data in the cache, in the embodiment of the present invention, the identifier of the cache data to be updated is added to the queue, including the following two implementation modes, specifically:

Embodiment approach 1

[0070] Embodiment 1. When writing the target data into the database, the identifier of the target data is added as the identifier of the cache data to be updated to the queue for storing the cache data information to be updated.

[0071]In this embodiment, when data is written into the database, the identifier of the data is added to the queue as the identifier of the cache data to be updated at the same time, and when the identifier of the cache data to be updated in the queue is written, it is triggered to acquire the The identification of the data, and query the data from the database according to the acquired identification of the cached data to be updated, and update the data corresponding to the identification of the cached data to be updated in the cache, so that when the data is written into the database, the data in the cache is updated in time , to improve the validity of data in the cache.

Embodiment approach 2

[0072] Embodiment 2: When the target data is queried in the cache and the target data is not queried, the identifier of the target data is added as the identifier of the cache data to be updated to the queue for storing information of the cache data to be updated.

[0073] In this embodiment, when the data is queried in the cache and the data is not queried, the identifier of the data is added to the queue as the identifier of the cached data to be updated, and when the identifier of the cached data to be updated in the queue is written, it is triggered to obtain from the queue The identifier of the cached data to be updated, and query data from the database according to the acquired identifier of the cached data to be updated, and update the data corresponding to the identifier of the cached data to be updated in the cache, thereby updating the data in the cache in time, so that the next time from When the same data is queried in the cache, the data can be queried, and in the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a cache data updating method. The cache data updating method includes: adding an identification of cache data to be updated to a queue for storing information of the cache data to be updated; acquiring the identification of the cache data to be updated from the queue, and querying data from a database according to the acquired identification of the cache data to be updated; using the acquired data to update data, corresponding to the identification of the cache data to be updated, in a cache. The cache data updating method can timely update data in the cache, can reduce the calculation load, and can improve the security of the database. In addition, the embodiment of the invention provides a cache data updating device.

Description

technical field [0001] Embodiments of the present invention relate to the field of data processing technologies, and more specifically, embodiments of the present invention relate to a method and device for updating cached data. Background technique [0002] This section is intended to provide a background or context for implementations of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section. [0003] The cache is also the buffer (Cache) for data exchange. When the computer reads data, it will first query the required data from the cache. If the required data is queried in the cache, the queried data will be returned directly. If the required data is not queried, it is queried from the database (or memory). Since the cache runs much faster than the database, the cache's role is to help the computer run faster. [0004] In order to improve the running speed of the computer, the data with high fr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30G06F9/54
CPCG06F9/546G06F16/23G06F16/24539G06F2209/548
Inventor 黄武汉
Owner ALIBABA (CHINA) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products