Data eviction method and apparatus, cache node, and cache system
AssigneeHuawei Cloud Computing Technologies Co., Ltd.
InventorsJiacai Liu, Weihua Shan, Yi Jing
Life of this patent
Estimating the term…
Abstract
Example data eviction methods and apparatus are described. One example method includes obtaining an access frequency and an access time of data, where the access frequency is a quantity of access times in a target time period, and the target time period is a part of an eviction period. An eviction priority of the data is determined based on the access frequency and the access time. The data is evicted in a cache system based on the eviction priority.
Claims17
A data eviction method, wherein the data eviction method comprises:
- obtaining an access frequency and an access time of data;
- dividing an eviction period of the data into a plurality of subperiods;
- determining a quantity of access times of the data during each of the plurality of subperiods based on the access frequency and the access time of the data;
- classifying each of the plurality of subperiods into a popularity level based on the quantity of access times of the data during a respective subperiod, wherein the popularity level corresponds to a predetermined range of the quantities of access times of the data during the respective subperiod;
- determining an access behavior time sequence of the data based on the popularity level of each of the plurality of subperiods;
- determining an eviction priority of the data based on the access behavior time sequence;
- and
- evicting the data in a cache system based on the eviction priority.
A cache node, wherein the cache node comprises:
- at least one processor;
- and
- one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to:
- obtain an access frequency and an access time of data;
- divide an eviction period of the data into a plurality of subperiods;
- determine a quantity of access times of the data during each of the plurality of subperiods based on the access frequency and the access time of the data;
- classify each of the plurality of subperiods into a popularity level based on the quantity of access times of the data during a respective subperiod, wherein the popularity level corresponds to a predetermined range of the quantities of access times of the data during the respective subperiod;
- determine an access behavior time sequence of the data based on the popularity level of each of the plurality of subperiods;
- determine an eviction priority of the data based on the access behavior time sequence;
- and
- evict the data in a cache system based on the eviction priority.
A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores programing instructions for execution by at least one processor to:
- obtain an access frequency and an access time of data;
- divide an eviction period of the data into a plurality of subperiods;
- determine a quantity of access times of the data during each of the plurality of subperiods based on the access frequency and the access time of the data;
- classify each of the plurality of subperiods into a popularity level based on the quantity of access times of the data during a respective subperiod, wherein the popularity level corresponds to a predetermined range of the quantities of access times of the data during the respective subperiod;
- determine an access behavior time sequence of the data based on the popularity level of each of the plurality of subperiods access frequency and the access time by dividing an eviction period of the data into a plurality of subperiods, wherein each of the plurality of subperiods is associated with a respective popularity level that is determined based on an access frequency of the data during a respective subperiod;
- determine an eviction priority of the data based on the access behavior time sequence;
- and
- evict the data in a cache system based on the eviction priority.
Dependencies are inferred from the claim text.