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

Method and device for caching data

A technology of data cache and cache pool, which is applied in the direction of electronic digital data processing, memory system, memory address/allocation/relocation, etc., and can solve problems that affect system performance, cannot be changed by the client, and poor compatibility, etc.

Active Publication Date: 2015-11-25
ALIBABA GRP HLDG LTD
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] For the first method: you need to rely on the server to set the attribute value. After the attribute value is set, the client cannot control it. For example, the client cannot change or extend the data storage time, so this method is more flexible. Difference
[0009] For the second method: poor compatibility, not all browsers support the html5 standard, especially older browsers, for example, versions below ie9 do not support html5
[0010] For the third method: due to the limitations of the client platform, language and resources of the WEB system, the algorithm that the client can adopt is generally relatively simple, so that when the user accesses an element in the cache pool, the element may already be is cleaned, so the hit rate is low, which affects the performance of the entire system
[0011] To sum up, in the prior art, the client based on the WEB system has poor flexibility when caching data, and has a low hit rate when data is accessed while occupying low system resources, which makes the performance of the system poor. poor

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Embodiment 1 of the present application proposes a data caching method here, such as figure 1 As shown, the specific process is as follows:

[0027] Step 101 , record the number of hits of elements already stored in the cache pool being accessed, and record each time a new element is added to the cache pool.

[0028] Wherein, each element stored in the buffer pool corresponds to it with a unique identifier. The number of hits refers to the number of times the user terminal accesses the elements stored in the buffer pool. Every time an element stored in the buffer pool is accessed, the number of hits recorded for the element that should be accessed increases by 1. Since the elements stored in the buffer pool are constantly updated dynamically, the judgment of newly added elements can be judged according to the time when the element is added to the buffer pool, and the element with the latest update time can be determined as the newly added element to the buffer pool. F...

Embodiment 2

[0053] Correspondingly, in order to implement the data caching method described in the first embodiment above, the second embodiment of the present application proposes a data caching device, such as Figure 4 shown, including:

[0054] The importance information maintenance unit 401 is configured to maintain importance information for each element in the cache pool according to each new element added to the cache pool and the number of hits for elements already added to the cache pool.

[0055] Specifically, the above-mentioned importance information maintenance unit 401 is specifically configured to set a default value as the importance information of the newly added element when a new element is added to the cache pool, and remove the new element from the cache pool. The importance information maintained by each element other than the added element is updated to the original importance information minus a first preset value; and when an element in the buffer pool is hit by ...

Embodiment 3

[0063] Furthermore, Embodiment 3 of the present application takes the process of a user terminal accessing a website as an example to further elaborate the data caching method proposed in the embodiment of the present application. Such as Figure 5 As shown, the specific process is as follows:

[0064] Step 501, record the number of hits of elements already stored in the cache pool being accessed, and record the situation of each new element added to the cache pool, according to the recorded situation of each newly added element in the cache pool and the elements already added to the cache pool The number of hits accessed, maintaining importance information separately for each element in the buffer pool. Assume that there are currently five elements K1...K5 stored in the buffer pool, and the importance information corresponding to the five elements is W1...W5.

[0065] Step 502: Receive an access request from the user terminal, and include data information that the user term...

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 and a device for data caching. The method includes: maintaining importance information for each element in a caching pool according to elements newly added into the caching pool each time and hit counts of added elements in the caching pool; and when the elements in the caching pool need to be cleaned each time, referencing to sorted results of the elements in the caching pool, and cleaning the elements stored in the caching pool, wherein the sorted results are obtained by sorting the elements in the caching pool according to the importance information maintained for each element in the caching pool, and according to preset rules. By the method and the device, flexibility of data caching of a client side based on a WEB system can be well improved, high hit rate when data are accessed under the circumstance of low system resource occupancy is achieved, and accordingly system performance is improved.

Description

technical field [0001] The present application relates to the technical field of data storage, and in particular to a data caching method and device. Background technique [0002] With the continuous maturity of database technology, the storage capacity of the database is increasing day by day, so that users can be provided with richer data resources, and users can obtain the required data from the database. In practical applications, for a system with a large number of users, such as a website with millions of daily visits, since each user's hobbies and needs are different, a large amount of data analysis and access needs to be processed within a unit of time. Work will also have an impact on system performance and user browsing speed, creating a bottleneck for the user's data browsing speed. [0003] In order to solve the above problems, generally, the data that the user needs to browse is initialized into the memory and cached, and the user can obtain the data from the m...

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 Patents(China)
IPC IPC(8): G06F12/08G06F12/0877
Inventor 殷琳君殷俊杰
Owner ALIBABA GRP HLDG LTD