Method, device and electronic equipment for data index construction and data reading
A data indexing and data reading technology, which is applied in database indexing, structured data retrieval, digital data protection, etc., can solve the problems of reducing the probability of cache being penetrated, and the cache is easy to be penetrated, so as to reduce the penetration The effect of the probability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0075] Please refer to figure 1 , the embodiment of the present application provides a method for constructing a data index, which is applied to an electronic device. The electronic device may be a client terminal or a server. The method includes:
[0076] S11: When storing data into the memory, generate the first data index of the stored data and add it to the Bloom filter to establish a full data index;
[0077] S12: When deleting data from the memory, generating a second data index of deleted data and establishing a deleted data index;
[0078] Wherein, the full data index and the deleted data index are used to determine whether the data to be read is in the memory before reading the data, and if the data to be read is not in the memory, it is forbidden to execute the The operation of reading the data to be read in the memory, otherwise, the operation of reading the data to be read is performed.
[0079] In a specific implementation process, the memory may be a cache and / ...
Embodiment 2
[0105] Based on the same inventive concept, for the data index construction method provided in Embodiment 1, the embodiment of the present application also provides a corresponding data index construction device, please refer to Figure 5 , the device consists of:
[0106] The first generation unit 51 is configured to generate a first data index of the stored data and add it to the Bloom filter to establish a full data index when storing the data in the memory;
[0107] The second generating unit 52 is configured to generate a second data index of deleted data and establish a deleted data index when data is deleted from the memory;
[0108] Wherein, the full data index and the deleted data index are used to determine whether the data to be read is in the memory before reading the data, and if the data to be read is not in the memory, it is forbidden to execute the The operation of reading the data to be read in the memory. Specifically, the memory may include a cache and / or ...
Embodiment approach
[0116] As an optional implementation, the device also includes:
[0117] A reading unit 63, configured to read the data to be read from the cache when the data to be read is in the memory and the memory is a database; if the data is read from the cache Failed to read the data to be read from the database.
[0118] In the specific implementation process, the judging unit 61 is configured to: judge whether there is an index of the data to be read in the deleted data index; if there is an index of the data to be read in the deleted data index, It is determined that the data to be read is not in the memory. Further, the judging unit 61 is further configured to: when there is no index of the data to be read in the deleted data index, judge whether there is an index of the data to be read in the full data index; if An index of the data to be read exists in the full data index, and it is determined that the data to be read is in the memory; otherwise, it is determined that the data...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


