Method for caching data

A data cache and data technology, applied in the field of network communication, can solve the problems of random IO reading ability, random reading and writing ability limitation, etc., and achieve the effects of reducing occupation, realizing separation, and improving storage capacity

Active Publication Date: 2014-01-15
ULTRAPOWER SOFTWARE
View PDF3 Cites 31 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] With the increase in the number of users of instant messaging products and the increase in user activity, the number of friends in instant messaging products has grown exponentially, and the pressure on the system for data access is bound to increase, and a large number of concurrent ra

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 for caching data
  • Method for caching data
  • Method for caching data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The core idea of ​​the present invention is: serialize the data put into the cache, reduce the occupied memory, cache as much data as possible, and adopt a new cache management method to realize the separation of hot and cold data, avoiding the Random access makes hot data obsolete.

[0039] In addition, after the data is cached, because the memory cache is lost after the service starts abnormally, a large number of business accesses will "penetrate" the cache to directly access the database.

[0040] In this regard, the present invention further periodically persists the cached hot data to the disk to form a dmp file, and then records the update of the cache into a log (log) file. If the service restarts, use the dmp file to restore the hot zone data in the cache, read the log file (recording the modification of the cache after persistence), and delete the corresponding modification record in the log file from the restored cache, that is The correctness of the cache c...

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 discloses a method for caching data. The method includes the steps that serialization processing is conducted on data placed in a cache; the cache is divided into a cold zone and a hot zone, and both the cold zone and the hot zone are of a bi-directional linked list structure; when the data are inserted into the cache, the data are firstly placed in the cold zone; when the data in the cache are hit, if the hit data are in the cold zone, whether the data are hit by preset times or not is judged, if yes, the data are transferred to the tail of the hot zone, if not, the data are transferred to the head of a linked list of the cold zone; if the hit data are in the hot zone, the data are transferred into the head of a linked list of the hot zone. By the adoption of the technical scheme, caching efficiency of the hot data is effectively improved.

Description

technical field [0001] The invention relates to the technical field of network communication, in particular to a data caching method. Background technique [0002] With the increase in the number of users of instant messaging products and the increase in user activity, the number of friends in instant messaging products has grown exponentially, and the pressure on the system for data access is bound to increase, and a large number of concurrent random accesses to the database are usually It is the bottleneck of the system, because it is a very random access for users to obtain relevant data of all their friends, and the random IO read ability of the database to the disk is limited by the random read and write ability of the disk itself. [0003] Therefore, only by finding a way to determine hot data and caching as much hot data as possible (hot data refers to data that has been accessed more times, it can also be called active data, relatively, inactive data is called cold d...

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): G06F12/08G06F3/06G06F17/30
Inventor 王洪泽
Owner ULTRAPOWER SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products