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

Empty cache prevention method and device

A cache and corresponding location technology, applied in the field of database query, can solve problems such as large space occupation, increased memory burden, and inability to delete

Active Publication Date: 2014-06-04
SHENZHEN TENCENT COMP SYST CO LTD
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when using a bitmap to build an air defense cache, in the continuous storage space, each bit indicates whether a piece of data has been created, which takes up too much space and increases the memory burden; when using a Bloom filter to build an air defense cache, in the continuous In the storage space, each piece of data corresponds to k different bits through k hash functions. These bits together represent the state of the data list. If all 1s indicate that the data list is non-empty, if not all 1 means that the data list is empty, and the Bloom filter only supports writing and cannot be deleted

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
  • Empty cache prevention method and device
  • Empty cache prevention method and device
  • Empty cache prevention method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The technical solutions of the anti-empty cache method and device will be described in detail below in conjunction with specific embodiments and accompanying drawings, so as to make it more clear.

[0029] Such as image 3 As shown, in one embodiment, a kind of anti-empty cache method comprises the following steps:

[0030] Step S102, dividing the data identifier into multiple intervals.

[0031] Specifically, the data identifier is a sign used to distinguish the uniqueness of data, such as instant messaging account number, student number, bank card number, employee work number, etc., but not limited thereto. In this embodiment, the data identifier is an instant messaging account. Divide the instant messaging account number into 3 intervals according to the number sequence, for example, divide 10000 to 9999999 into a range, 10000000 to 2099999999 into a range, and 2.1 billion to 4.2 billion into a range. In addition, when the data is identified as a student number, 1...

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 relates to an empty cache prevention method and device. The empty cache prevention method comprises the following steps that data marks are divided into a plurality of sections, the density of data marks with a preset function in each section is counted, corresponding compression ratios are respectively configured according to the density of each section, and the data marks of a compression ratio number in each section correspond to one storage space. According to the empty cache prevention method and device, the data marks are sectioned, corresponding compression ratios are configured according to the density of each section, the data marks of a compression ratio number correspond to one storage space rather than the fact that in a Bloom filter, each data mark is represented by several random digits and no one digit can be deleted, and corresponding change operation can be carried out by utilizing a storage space corresponding to the compression ratio.

Description

technical field [0001] The invention relates to database query technology, in particular to an anti-empty cache method and device. Background technique [0002] There are a large amount of data recorded in the database. In order to check whether a piece of data exists in the database, a traversal query is required. This traversal query is expensive and time-consuming. If the user information to be queried does not exist, a traversal query is also required, which will waste a lot of time and resources. [0003] For this reason, if the air defense cache is used to record the existence of each piece of data in the memory, only the data in the air defense cache is queried in the database, which can effectively reduce the overhead caused by the empty record query. Traditional air-defense caching technologies generally use bitmaps or Bloom filters to construct data air-defense caches for information, so as to achieve the purpose of reducing a large number of empty queries of the ...

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
IPC IPC(8): G06F17/30
CPCG06F16/24539G06F16/24552
Inventor 张丹枫
Owner SHENZHEN TENCENT COMP SYST CO LTD