Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A cache update method, device, equipment and storage medium

An update method and caching technology, which is applied in the server field, can solve problems such as cache fullness, low cache hit rate, and meaningless cache, and achieve the effect of improving the cache hit rate

Active Publication Date: 2020-08-18
GUANGZHOU HUYA INFORMATION TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] But in actual use, the biggest problem with this solution is that the fixed-size cache is easily filled by massive requests, and the resources that really need to be cached are quickly eliminated and deleted, resulting in a low cache hit rate and the cache becomes empty. significance

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
  • A cache update method, device, equipment and storage medium
  • A cache update method, device, equipment and storage medium
  • A cache update method, device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] figure 1 It is a flow chart of a cache update method provided by Embodiment 1 of the present invention. The technical solution of this embodiment is optionally applicable to the background service of the live broadcast platform, facing a large number of service users, and processing tens of millions of QPS ( Query PerSecond, query rate per second) requests, especially in the event and competition stage, the request volume is very large during the peak period, and these requests are often concentrated in a small number of hot users (such as popular anchors, hot data, etc.). However, it can be understood that this technical solution can also be applied to other application scenarios, as long as there is a problem that some data needs to be cached locally to improve the local query hit rate. The method can be executed by a cache update device, which can be implemented by software and / or software, and is usually configured in an electronic device, typically in a processor, ...

Embodiment 2

[0045] figure 2 It is a flow chart of a cache update method provided by Embodiment 2 of the present invention. This embodiment is a refinement based on the first embodiment, and mainly describes in detail how to determine the corresponding relationship between the first frequency and the two search methods. refer to figure 2 , this embodiment specifically includes the following steps:

[0046] S201. Receive a resource request for a target resource.

[0047] Specifically, the cache update device receives resource request information sent by the user. And determine the target resource corresponding to the resource request according to the resource request information.

[0048] S202. Find the token bucket set for the target resource in the preset request queue.

[0049] Wherein, the request queue is a preset queue with a limited length. A token bucket with a fixed size can generate tokens continuously at a constant rate by itself. If tokens are not consumed, or are consu...

Embodiment 3

[0080] Figure 3A It is a flow chart of a cache update method provided by Embodiment 3 of the present invention. This embodiment is a detailed description based on the first and second embodiments. refer to Figure 3A , this embodiment specifically includes the following steps:

[0081] S301. Receive a resource request for a resource with id=a.

[0082] S302. Determine whether there is a token bucket of the resource with id=a in the request queue. If yes, execute step S304; if not, execute step S303.

[0083] S303. Create a new token bucket with id=a, and adjust it to the head of the request queue.

[0084] S304. Adjust the token bucket of the resource with id=a to the head of the request queue.

[0085] S305. Determine whether the token can be taken out from the token bucket with id=a. If yes, execute step S311; if not, execute step S306.

[0086] S306. Determine that the resource request for the resource with id=a belongs to the second category.

[0087] S307. Searc...

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 cache updating method and device, equipment and a storage medium. The method comprises the following steps: receiving a resource request for a target resource; Determining arequest frequency category of the target resource according to the resource request; Searching the target resource according to the request frequency category; And updating the cache of the server according to the request frequency category and the target resource. By means of the method, the problem that the cache hit rate is very low due to the fact that resources really needing to be cached arequickly eliminated and deleted due to the LRU algorithm is solved, and the beneficial effect that the resources really needing to be cached are stored as much as possible in a cache of a fixed size so as to improve the cache hit rate is achieved.

Description

technical field [0001] Embodiments of the present invention relate to server technology, and in particular, to a cache update method, device, device, and storage medium. Background technique [0002] With the development of computer technology, more and more people are used to querying information through the Internet. In the face of massive service users, the server has to handle a large number of requests. Especially for interactive video websites, taking the live broadcast platform as an example, in the background service, facing a large number of service users, it needs to process tens of millions of requests per second. Especially during activities and competitions, the amount of requests during the peak period is very large. These requests are often concentrated in a small number of hot users (such as popular anchors, hot data, etc.), or repeated requests. In business services, how to handle user requests has become an urgent problem to be solved. [0003] The commo...

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): G06F16/23G06F16/2455
Inventor 古培昌
Owner GUANGZHOU HUYA INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products