Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and system for preventing cache penetration by customizing hash

A self-defining and caching technology, applied in the field of computer communication, can solve the problems of waste of resources, large storage, etc., and achieve the effect of solving traffic pressure

Pending Publication Date: 2021-12-14
FUJIAN TQ DIGITAL
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, although this method avoids query penetration to the database, it will cause a large number of useless nulls to be stored in the cache, resulting in waste of resources

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
  • Method and system for preventing cache penetration by customizing hash
  • Method and system for preventing cache penetration by customizing hash
  • Method and system for preventing cache penetration by customizing hash

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The present invention will be further described below in conjunction with the accompanying drawings.

[0032] see figure 1 Shown, a kind of self-defined hash of the present invention prevents the method of cache penetration, and described method comprises the following steps:

[0033] Step S1, prepare a plurality of different hash functions, and generate a plurality of different hash values ​​to identify commodities;

[0034] Step S2. According to the product code of the product, the number n of required hash functions is obtained;

[0035] Step S3, cyclically execute the hash function n times to obtain the corresponding n hash values;

[0036] Step S4, judging whether n hash values ​​exist in the bigset binary array;

[0037] Step S5, read commodity redis cache;

[0038] Step S6, reading the commodity database;

[0039] Step S7, storing the commodity data in the commodity database into the redis cache;

[0040] Step S8, return product data information to the user...

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 method for preventing cache penetration by customizing hash, and the method comprises the following steps: S1, preparing a plurality of different hash functions, and generating a plurality of different hash values to identify commodities; S2, according to the commodity code of the commodity, obtaining the number n of times of a required hash function; S3, circularly executing the hash function for n times to obtain corresponding n hash values; S4, judging whether the n hash values exist in a biset binary array; S5, reading the redis cache of the commodity; S6, reading a commodity database; S7, storing the commodity data in the commodity database into a redis cache; and S8, returning the commodity data information to the user, thereby solving the traffic pressure caused by cache penetration to the cache and the data; according to the method, a plurality of hash values can be generated through the hash function to represent whether the data exists, so that the problem of flow pressure brought to the cache and the database by cache penetration is effectively solved.

Description

technical field [0001] The invention relates to the technical field of computer communication, in particular to a method and system for preventing cache penetration by customizing hash. Background technique [0002] Cache is a layer of protection added before database query in order to relieve the pressure on the database. When the data we need cannot be queried from the cache, we must go to the database to query. However, if the rules are exploited by the attacker to continuously access non-existing data by imitating the request address, the system will continue to request the database through the cache because it cannot get the data in the cache, and finally cause the database to crash. through. The existing solution to cache penetration is to store an empty identifier null in the cache when the data in the database cannot be read. If null is fetched in the cache, it means that the data does not exist, then do not continue to read the database and return directly Data is...

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/22G06F16/2455
CPCG06F16/2255G06F16/24552
Inventor 刘德建叶伟陈宏展
Owner FUJIAN TQ DIGITAL