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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com