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

Data caching method and device, electronic equipment and storage medium

A data caching and data technology, applied in database query, electronic digital data processing, structured data retrieval, etc., can solve the problems of wasting storage media and short caching time, and achieve the goal of protecting database, improving response speed, and saving storage media. Effect

Pending Publication Date: 2021-03-09
BEIKE TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The existing caching methods commonly used are active caching and passive caching. Among them, active caching is to cache data regardless of whether there is user access. However, because this caching method needs to cache all data, some large-scale access It needs to waste a lot of storage media; passive caching is cached only when users access it, but this caching method has a short cache time, which may lead to multiple accesses to the database

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
  • Data caching method and device, electronic equipment and storage medium
  • Data caching method and device, electronic equipment and storage medium
  • Data caching method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0103] see image 3 , image 3 It is a schematic diagram of the data request processing flow in Embodiment 1 of the present application. The specific steps are:

[0104] Step 301, receiving a data request sent by a user.

[0105] Step 302, query the corresponding data from the passive cache medium according to the KEY carried in the data request.

[0106] After receiving the data request, first query the data corresponding to the KEY in the passive cache medium.

[0107] The KEY here is the unique identifier of the data corresponding to the data request, such as the listing number, etc.

[0108] Step 303, if the passive cache medium fails, query corresponding data from the active cache medium.

[0109] At this time, if the passive cache medium fails, you need to use the active cache medium to implement cache degradation, that is, query the corresponding data in the active cache medium.

[0110] Step 304, if the corresponding data is queried from the active cache medium, ...

Embodiment 2

[0123] see Figure 4 , Figure 4 It is a schematic diagram of the data request processing flow in Embodiment 2 of the present application. The specific steps are:

[0124] Step 401, receiving a data request sent by a user.

[0125] Step 402, query the corresponding data from the passive cache medium according to the KEY carried in the data request.

[0126] Step 403, if the corresponding data is not queried from the passive cache medium and the database connection fails, then query the data from the active cache medium.

[0127] If the connection to the database fails, you cannot query the database, and use the cache downgrade method to query the corresponding data in the active cache medium.

[0128] Step 404: If the corresponding data is queried from the active cache medium, use the data to respond. End this process.

[0129] Step 405: If no corresponding data is found from the active cache medium, respond that no corresponding data is found. End this process.

[013...

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 invention provides a data caching method and device, electronic equipment and a storage medium. The method comprises the following steps: if it is determined that data corresponding to a keyword KEY is accessed by a user and the corresponding data is changed, querying the data corresponding to the KEY from a database; and updating the data queried from the database to an active cache medium, and determining the cache time of the data corresponding to the KEY in the active cache medium according to the access times corresponding to the KEY, the access time of the last access and the currenttime. According to the method, under the condition of large data volume, the storage medium can be saved, and the response speed can be increased.

Description

technical field [0001] The present invention relates to the technical field of data storage, in particular to a data caching method, device, electronic equipment and storage medium. Background technique [0002] Now in a high-speed Internet era, there are high requirements for the response speed of the Internet. The service provider is limited by the response efficiency of data provision. [0003] In order to ensure that users can query information in a timely manner, most of them use caching for data caching, which can improve the response speed of the interface, and can also avoid the access pressure of sudden high concurrent traffic on the database or third-party interface. [0004] The existing caching methods commonly used are active caching and passive caching. Among them, active caching is to cache data regardless of whether there is user access. However, because this caching method needs to cache all data, some large-scale access A lot of storage media needs to be ...

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): G06F16/24G06F16/2455
CPCG06F16/24G06F16/24552
Inventor 卫海波
Owner BEIKE TECH 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