Filtering type cache replacement method and related device based on reinforcement learning
Патент · CN B
Полный текст
The invention discloses a filtering type cache replacement method based on reinforcement learning and a related device, wherein the method adopts a dynamic learning rate technology, pays attention to the cache miss condition when the method operates, the miss condition is quantized into a loss value, and the learning rate is adjusted towards the direction of reducing the loss value by using a gradient descent method, so that the cache replacement method is always in better performance. The cache replacement problem is abstracted into a multi-arm slot machine problem, and the LRU and LFU algorithms with weight values are used for guiding the cache replacement. And adjusting the weight of the expert algorithm according to the cache miss condition so as to adapt to the changed workload. For the cache structure, the cache structure is logically divided into three layers, the first two layers of the cache rapidly filter the infrequently accessed data, and the third layer of the cache can keep the frequently accessed data in the future as far as possible so as to improve the hit rate of the cache replacement algorithm. The method can also dynamically adjust the buffer structure, and further enhance the adaptability of the method.