Method and device for increasing retrieval speed in database retrieval system
A retrieval system and database technology, applied in the field of database retrieval, can solve the problems of multiple system resources for I/O operations, single server resources, and less hardware investment, so as to optimize the record removal operation, reduce system resources, and improve utilization. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0065] Embodiment 1: as figure 1 As shown, it is the main flowchart of the method for improving retrieval speed in the database retrieval system of the present embodiment, including:
[0066] S101 establishes a data cache in memory.
[0067] Preferably, the cache records include: search terms, access times, write cache time, and search result sets corresponding to the search terms.
[0068] Preferably, the data cache is further divided into two areas, wherein the records in the first cache area include search terms representing the cache records, number of visits, write cache time, and record IDs of database tables corresponding to the search result set; The record ID is the global unique identifier of the database table record; the record of the second cache area is the record of the database table, including: record ID and record information; the record of the first cache area and the record of the second cache area are one-to-many Relationship.
[0069] If the records in...
Embodiment 2
[0088] Embodiment 2: as figure 2 Shown is the process of writing the search term and the search result set into the data cache in this embodiment:
[0089] S201 After searching the database each time, if the result set is not empty, judge whether the data cache is full, if not, execute S204, otherwise execute the next step S202.
[0090] In this embodiment, the judgment of whether the data cache is full is realized by judging whether the number of cached records in the first cache area exceeds the preset number of records.
[0091] S202 If the data cache is full, calculate the access frequency, and find out the data cache record with the lowest access frequency
[0092] Preferably, the access frequency f is defined as:
[0093]
[0094] Among them, N is the number of visits, T now is the current time, T cached is the write cache time.
[0095] Usually, the unit of time can be "second", "minute", "hour" or "day". Generally, the time unit for frequency calculation in ho...
Embodiment 3
[0103] Embodiment 3: as image 3 Shown is a device 300 for improving retrieval speed in a database retrieval system of this embodiment, including:
[0104] Cache construction unit 301 is used to set up a data cache in memory; cache records include: search terms, access times, write cache time and a set of retrieval results corresponding to search terms; the size of the data cache is determined by a predetermined maximum cache record The data cache is further divided into two areas: the first cache area and the second cache area; the records in the first cache area and the records in the second cache area are in a one-to-many relationship; the first cache area, the second cache area The second cache area is composed of two hash tables, the key of the hash table in the first cache area is a search term and the value includes: the record ID of the database table corresponding to the search term, the number of visits, the write cache time and the search result set; The key of the h...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com