Cache updating method, system and device

By introducing a synchronous cache server into the CDN system, the edge cache server reports hot cache feature information, solving the problem of low cache update efficiency of the parent cache server and achieving more efficient and accurate cache updates.

CN119520612AActive Publication Date: 2025-02-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411753689.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-02-25
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

In the existing multi-level CDN network architecture, the cache update efficiency of the parent cache server is inefficient.

Method used

By introducing a synchronous cache server into the CDN system, the edge cache server periodically obtains the number of cache hits requested by the user and the most recent cache hit time, generates hot cache feature information, and reports it to the synchronous cache server. The synchronous cache server generates a report feature table and incremental cache hits based on this information, and updates the cache sort in the parent lru linked list to the parent tier cache server.

Benefits of technology

It improves the cache update efficiency of the parent cache server, reduces the loss of cache information, reduces the amount of data that the parent cache server needs to process, and thus improves the accuracy and efficiency of cache updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520612A_ABST
    Figure CN119520612A_ABST
Patent Text Reader

Abstract

The invention relates to a cache updating method, system and device. The method comprises the following steps: a synchronous cache server receives hot cache feature information and ip address information of two adjacent periods sent by each edge cache server, and the hot cache feature information is used as cache feature information by the edge cache server periodically acquiring cache hit times and latest cache hit time requested by a user; the method comprises the following steps of: acquiring IP address information and hot cache feature information, correspondingly storing each piece of cache feature information into an edge lru linked list, performing edge lru sequencing determination according to each piece of cache feature information, generating a corresponding report feature list and acquiring incremental cache hit times based on each piece of ip address information and hot cache feature information, and sending the report feature list and the incremental cache hit times to a parent layer cache server. And the parent layer cache server updates the parent layer lru sequence of each cache according to the reported feature table and the incremental cache hit times, and finally updates the cache stored in the parent layer lru linked list based on the updated parent layer lru sequence. According to the method, the cache updating efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cache update technology, and in particular to a cache update method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art

[0002] In a CDN (Content Delivery Network), files such as on-demand videos or website images need to be cached on a cache server. Caching means copying the required static resource files and storing them on the CDN cache server. Since the storage capacity of a single cache server is actually limited, the files that need to be cached can actually be considered unlimited. In order to improve the quality of CDN services, ensure the cache hit rate, and reduce a large number of back-to-sources caused by cache loss, the general practice in the industry is to set up a multi-level CDN network architecture: edge-layer cache servers and parent-layer cache servers, and multiple edge cache servers will share the same parent-layer server.

[0003] However, the currently used multi-level CDN network architecture has the problem of low cache update efficiency of the parent layer cache server. Summary of the invention

[0004] Based on this, it is necessary to provide a cache update method, apparatus, computer device, computer-readable storage medium and computer program product that can improve the cache update efficiency of the parent cache server in response to the above technical problems.

[0005] In a first aspect, the present application provides a cache update method, which is applied to a synchronous cache server in a CDN system in a target area, wherein the CDN system includes a parent cache server, a synchronous cache server, and multiple edge cache servers, wherein the synchronous cache server is an edge cache server whose IP address information meets a set condition, including:

[0006] Receive hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of the user request as cache feature information, and stores each cache feature information in the edge LRU linked list, and determines the edge LRU sorting according to each cache feature information in the edge LRU linked list;

[0007] A corresponding reporting feature table is generated based on each IP address information and hot cache feature information, and the incremental cache hit count is obtained based on the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0008] In one embodiment, a corresponding reporting feature table is generated based on each IP address information and hot cache feature information, including:

[0009] Using each IP address information and hot cache feature information, construct the corresponding initial reporting feature table;

[0010] A plurality of cache URLs are obtained from the initial reporting feature table, and for each cache, based on the most recent access time of the cache URL, a plurality of cache URLs are deduplicated to obtain a reporting feature table.

[0011] In one embodiment, deduplication processing is performed on multiple cached URLs based on the most recent access time of the cached URLs, including:

[0012] Determine the duplicate cache URLs to be processed from multiple cache URLs;

[0013] Get the last access time and current time of the cached URL to be processed, and get the time distance between the last access time and the current time;

[0014] Keep the pending cache URL corresponding to the minimum time distance and remove other duplicate pending cache URLs.

[0015] Second method, the present application also provides a cache update method, which is applied to any edge cache server in the CDN system of the target area, the CDN system includes a parent cache server, a synchronization cache server and multiple edge cache servers, the synchronization cache server is an edge cache server whose IP address information meets the set conditions, including:

[0016] Periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information in the edge lru linked list;

[0017] According to the edge LRU sorting of each cache feature information in the edge LRU linked list, hot cache feature information is determined from multiple cache feature information, and hot cache feature information and IP address information of two adjacent periods are sent to the synchronous cache server; the synchronous cache server is used to receive each hot cache feature information and IP address information, and generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent periods, and send the reporting feature table and the incremental cache hit count to the parent cache server;

[0018] The parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0019] In one embodiment, hot cache feature information is determined from a plurality of cache feature information according to the edge lru ordering of each cache feature information in the edge lru linked list, including:

[0020] The cache feature information whose edge lru ranking is greater than a preset ranking threshold is determined as hot cache feature information.

[0021] In a third aspect, the present application further provides a cache update method, which is applied to a parent cache server in a CDN system in a target area, wherein the CDN system includes a parent cache server, a synchronization cache server, and multiple edge cache servers, wherein the synchronization cache server is an edge cache server whose IP address information meets the set conditions, including:

[0022] Receive the reporting feature table and the incremental cache hit count sent by the synchronous cache server; the reporting feature table is generated by the synchronous cache server based on the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server after receiving the hot cache feature information and IP address information of each edge cache server, and the incremental cache hit count is obtained by the synchronous cache server according to the hot cache feature information of two adjacent cycles; the hot cache feature information is obtained by the edge cache server periodically obtaining the cache hit count and the most recent cache hit time of the user request as cache feature information, and storing each cache feature information in the edge lru linked list, and determining the edge lru sorting according to each cache feature information in the edge lru linked list;

[0023] According to the reported feature table and the incremental cache hit count, the parent layer lru sort of each cache in the parent layer lru linked list is updated, and the cache stored in the parent layer lru linked list is updated based on the updated parent layer lru sort.

[0024] In an exemplary embodiment, updating the parent layer lru order of each cache in the parent layer lru linked list according to the reported feature table and the incremental cache hit count includes:

[0025] Traverse the reporting feature table to obtain multiple cache URLs and the current time;

[0026] Get the corresponding cache from the cache table of the parent cache server according to the cache URL;

[0027] Based on the most recent cache hit time, current time and incremental cache hit count associated with the cache URL, the decayed cache hit count is obtained;

[0028] The reference value of the cache is updated according to the number of cache hits after decay, and the parent layer lru sorting of each cache in the parent layer lru linked list is updated based on the updated reference value.

[0029] In a fourth aspect, the present application further provides a cache update system, the system comprising a parent cache server of a target area CDN system, a synchronization cache server, and a plurality of edge cache servers; the synchronization cache server is an edge cache server whose IP address information meets a set condition;

[0030] The edge cache server is used to periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information in the edge LRU linked list; according to the edge LRU sorting of each cache feature information in the edge LRU linked list, determine the hot cache feature information from multiple cache feature information, and send the hot cache feature information and IP address information of two adjacent periods to the synchronization cache server;

[0031] The synchronous cache server is used to generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server;

[0032] The parent layer cache server is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

[0033] In a fifth aspect, the present application further provides a cache update device, which is applied to a synchronous cache server in a CDN system in a target area, wherein the CDN system includes a parent cache server, a synchronous cache server, and multiple edge cache servers, and the synchronous cache server is an edge cache server whose IP address information meets the set conditions, including:

[0034] The information receiving module is used to receive the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of the user request as cache feature information, and storing each cache feature information in the edge LRU linked list, and determining the edge LRU sorting according to each cache feature information in the edge LRU linked list;

[0035] The feature sending module is used to generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count based on the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0036] In a sixth aspect, the present application further provides a cache update device, which is applied to any edge cache server in a CDN system in a target area, wherein the CDN system includes a parent cache server, a synchronization cache server, and multiple edge cache servers, wherein the synchronization cache server is an edge cache server whose IP address information meets a set condition, including:

[0037] The information construction module is used to periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information into the edge lru linked list;

[0038] An information sending module is used to determine hot cache feature information from multiple cache feature information according to the edge LRU sorting of each cache feature information in the edge LRU linked list, and send the hot cache feature information and IP address information of two adjacent cycles to the synchronous cache server; the synchronous cache server is used to receive each hot cache feature information and IP address information, and generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server;

[0039] The parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0040] In a seventh aspect, the present application further provides a cache update device, which is applied to a parent cache server in a CDN system in a target area, wherein the CDN system includes a parent cache server, a synchronization cache server, and multiple edge cache servers, wherein the synchronization cache server is an edge cache server whose IP address information meets a set condition, including:

[0041] The feature receiving module is used to receive the reporting feature table and the incremental cache hit count sent by the synchronous cache server; the reporting feature table is generated by the synchronous cache server based on the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server after receiving the hot cache feature information and IP address information of each edge cache server, and the incremental cache hit count is obtained by the synchronous cache server according to the hot cache feature information of two adjacent cycles; the hot cache feature information is obtained by the edge cache server periodically from the cache hit count and the most recent cache hit time of the user request as cache feature information, and each cache feature information is stored in the edge lru linked list accordingly, and the edge lru order of each cache feature information in the edge lru linked list is determined;

[0042] The cache update module is used to update the parent layer lru sorting of each cache in the parent layer lru linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer lru linked list based on the updated parent layer lru sorting.

[0043] In an eighth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0044] Receive hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of the user request as cache feature information, and stores each cache feature information in the edge LRU linked list, and determines the edge LRU sorting according to each cache feature information in the edge LRU linked list;

[0045] A corresponding reporting feature table is generated based on each IP address information and hot cache feature information, and the incremental cache hit count is obtained based on the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0046] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0047] Receive hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of the user request as cache feature information, and stores each cache feature information in the edge LRU linked list, and determines the edge LRU sorting according to each cache feature information in the edge LRU linked list;

[0048] A corresponding reporting feature table is generated based on each IP address information and hot cache feature information, and the incremental cache hit count is obtained based on the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0049] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0050] Receive hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of the user request as cache feature information, and stores each cache feature information in the edge LRU linked list, and determines the edge LRU sorting according to each cache feature information in the edge LRU linked list;

[0051] A corresponding reporting feature table is generated based on each IP address information and hot cache feature information, and the incremental cache hit count is obtained based on the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0052] The cache update method, device, computer equipment, computer-readable storage medium and computer program product, the synchronous cache server receives the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server, the hot cache feature information is obtained by the edge cache server periodically The number of cache hits and the most recent cache hit time of the user request is used as cache feature information, and each cache feature information is stored in the edge LRU linked list accordingly, and the edge LRU sorting of each cache feature information in the edge LRU linked list is determined, and then a corresponding reporting feature table is generated based on each IP address information and the hot cache feature information, and the incremental cache hit count is obtained based on the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server. The parent cache server updates the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and finally updates the cache stored in the parent LRU linked list based on the updated parent LRU sorting. By forming cache feature information, the loss of cache information is avoided, and the synchronization cache server reported by the region is increased, which reduces the data that the parent cache server needs to process, thereby improving the cache update efficiency. The parent cache server decays the hotspot based on the number of accesses + the most recent hit time, and determines the decay of the number of hits based on the deviation value between the hit time and the current time, thereby improving the accuracy of cache updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0054] FIG1 is an application environment diagram of a cache update method in one embodiment;

[0055] FIG2 is a schematic diagram of a flow chart of a cache update method applied to a synchronous cache server in one embodiment;

[0056] FIG3 is a schematic flow chart of a cache update method applied to an edge cache server in another embodiment;

[0057] FIG4 is a schematic diagram of a flow chart of a cache update method applied to a parent cache server in one embodiment;

[0058] FIG5 is a schematic diagram of a process of reporting a feature table in one embodiment;

[0059] FIG6 is a schematic diagram of a process flow of a user request in another embodiment;

[0060] FIG7 is a structural block diagram of a cache updating device applied to a synchronous cache server in one embodiment;

[0061] FIG8 is a structural block diagram of a cache updating device applied to an edge cache server in another embodiment;

[0062] FIG9 is a structural block diagram of a cache updating device applied to a parent cache server in one embodiment;

[0063] FIG. 10 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0065] The cache update method provided in the embodiment of the present application can be applied in the application environment shown in FIG1 . Among them, the user can initiate a user request to the CDN system in region i through the terminal 102. While initiating the user request, the CDN system performs a consistent hash election based on the user request and the IP address information of each edge cache server, and determines the synchronous cache server used this time from multiple edge cache servers. Each region corresponds to a CDN (Content Delivery Network) system, and the CDN system includes a parent cache server 108, a synchronous cache server 106, and multiple edge cache servers 104. The edge cache server n104 communicates with the synchronous cache server 106 through the communication network. The edge cache server n104 can also communicate with the parent cache server 108 through the communication network. The synchronous cache server 106 and the parent cache server can exchange information.

[0066] The edge cache server n104 periodically obtains the number of cache hits and the most recent cache hit time of user requests as cache feature information, and stores each cache feature information in the edge lru linked list, determines the hot cache feature information from the multiple cache feature information according to the edge lru ranking of each cache feature information in the edge lru linked list, and sends the hot cache feature information and IP address information of two adjacent cycles to the synchronization cache server 106. The synchronization cache server 106 generates a corresponding reporting feature table according to each IP address information and the hot cache feature information, and obtains the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and sends the reporting feature table and the incremental cache hit count to the parent cache server 108. Finally, the parent cache server 108 updates the parent lru ranking of each cache in the parent lru linked list according to the reporting feature table and the incremental cache hit count, and updates the cache stored in the parent lru linked list based on the updated parent lru ranking.

[0067] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The edge cache server n104, the synchronous cache server 106, and the parent cache server 108 may be independent physical servers, or server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide cloud computing services.

[0068] In an exemplary embodiment, as shown in FIG2 , a cache update method is provided, which is described by taking the method applied to the synchronous cache server 106 in FIG1 as an example, and includes the following steps S201 and S202. Among them:

[0069] Step S201, receiving hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically, namely, the number of cache hits and the most recent cache hit time requested by the user as cache feature information, and each cache feature information is stored in the edge lru linked list accordingly, and the edge lru sorting is determined according to each cache feature information in the edge lru linked list.

[0070] Among them, the edge cache server can be understood as a server that directly connects with the user, and is used to respond to the user request initiated by the user to the CDN through the terminal. The synchronous cache server is a certain edge cache server. Every time a user request is received, it will re-select the only edge cache server based on the IP address information of each edge cache server through consistent hashing. As the intermediate medium for the edge cache server to report information to the parent cache server, the consistent hashing election is to calculate the hash value of each IP address and determine its position in the hash ring, as well as the positions of other nodes. Then, the specific data request will be located clockwise to the corresponding node according to its hash value.

[0071] Among them, the edge lru linked list (which includes the lru algorithm, Least Recently Used algorithm) can be understood as a doubly linked list for temporarily storing cache, which stores the cache, the corresponding hit count and the most recent hit time. The closer to the head of the doubly linked list, the closer the most recent hit time of the cache is to the current time, and vice versa, the closer to the tail of the doubly linked list, the farther the most recent hit time of the cache is from the current time; the cache hit time can be understood as the time when the cache is successfully accessed.

[0072] Hot cache feature information can be simply understood as the cache feature information of the front part of the LRU list. Cache feature information can be understood as the number of cache hits and the most recent cache hit time at the request granularity. IP (Internet Protocol) address information can be understood as the unique identifier assigned to each device in the network (such as computers, mobile phones, routers, etc.).

[0073] Optionally, the edge cache server n104 periodically obtains the number of cache hits and the most recent cache hit time of user requests as cache feature information, and stores each cache feature information in the edge lru linked list, determines the hot cache feature information according to the edge lru sorting of each cache feature information in the edge lru linked list, and sends the hot cache feature information and IP address information of two adjacent cycles to the synchronous cache server 106, and the synchronous cache server 106 receives the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server. The cache feature information is stored in the form of a disk, which avoids the loss of cache information caused by device restart, and the communication channel only transmits the hot cache feature information, which reduces the information transmission cost and lays a data foundation for the subsequent formation of feature tables and incremental hit times.

[0074] Step S202, generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count based on the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0075] Among them, the reporting feature table can be understood as the synchronization cache server integrating the received hot cache feature information and IP address information to generate a feature information hash table. Each edge cache server corresponds to a reporting feature table, and the IP address of each edge cache server is used as the key to distinguish different hash tables; the incremental cache hit count can be understood as the difference between the cache hit counts of the same cache between two adjacent cycles. The increment here can be a positive value or a negative value.

[0076] For example, the synchronous cache server 106 generates a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtains the difference between the cache hit counts for the same cache between two adjacent caches as the incremental cache hit count, and sends the reporting feature table and the incremental cache hit count to the parent cache server 108. The parent cache server 108 updates the parent LRU sorting of each cache in the parent LRU linked list based on the received reporting feature table and the incremental cache hit count, and finally deletes the cache stored in the parent LRU linked list with the lower sorting based on the updated parent LRU sorting, and deletes the corresponding cache file stored in the disk of the parent cache server 108. The synchronous cache server 106 integrates the received IP address information and hot cache feature information to generate a reporting feature table, and obtains the corresponding incremental cache hit count based on the hot cache feature information of the adjacent period, and then reports it to the parent cache server 108, which reduces the data processing amount of the parent cache server 108, and also lays a data foundation for the cache update in the parent cache server 108, and speeds up the cache update efficiency of the parent cache server 108.

[0077] In the above cache update method, the synchronous cache server receives the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server. The hot cache feature information is obtained by the edge cache server periodically, and the cache hit count and the most recent cache hit time of the user request are used as cache feature information, and each cache feature information is stored in the edge LRU linked list accordingly, and the edge LRU sorting of each cache feature information in the edge LRU linked list is determined, and then a corresponding reporting feature table is generated based on each IP address information and the hot cache feature information, and the incremental cache hit count is obtained according to the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server. The parent cache server updates the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and finally updates the cache stored in the parent LRU linked list based on the updated parent LRU sorting. By forming cache feature information, the loss of cache information is avoided, and the synchronization cache server reported by the region is increased, which reduces the data that the parent cache server needs to process, thereby improving the cache update efficiency. The parent cache server decays the hotspot based on the number of accesses + the most recent hit time, and determines the decay of the number of hits based on the deviation value between the hit time and the current time, thereby improving the accuracy of cache updates.

[0078] In one embodiment, a corresponding reporting feature table is generated based on each IP address information and hot cache feature information, including: using each IP address information and hot cache feature information to construct a corresponding initial reporting feature table; obtaining multiple cache URLs from the initial reporting feature table, and for each cache, deduplicating multiple cache URLs based on the most recent access time of the cache URL to obtain a reporting feature table.

[0079] Among them, the cache URL (Uniform Resource Locator) can be understood as a specific address pointing to a resource on the Internet, which is usually used to locate web pages, API interfaces or files. It contains information such as protocol (such as HTTP / HTTPS), domain name, path and query parameters. When a URL is requested, the server or client can store the response associated with the URL in the cache. The next time the same URL is requested, the system can get the data directly from the cache without recalculating or accessing the original content. Using the IP address as the key, a hash table is built to store the contents of multiple cached URLs associated with the IP address. The access time can be understood as the time when the URL was last accessed, regardless of whether it was successfully hit.

[0080] Optionally, the synchronous cache server 106 uses each IP address information as a hash key for constructing a feature report, and constructs multiple cache URLs associated with the IP address based on the hot cache feature information and the IP, that is, one cache may correspond to multiple cache URLs, and constructs an initial feature table. Further, multiple cache URLs are obtained from the initial reporting feature table, and for each cache, multiple cache URLs are deduplicated based on the most recent access time of the cache URL to obtain a reporting feature table. By deduplicating the cache URLs of each cache, the number of reporting feature tables is reduced, thereby reducing the amount of data that the parent cache server 108 needs to process, thereby speeding up the cache update efficiency in the parent cache server.

[0081] In one of the embodiments, based on the most recent access time of the cached URLs, multiple cached URLs are deduplicated, including: determining duplicate cached URLs to be processed from multiple cached URLs; obtaining the most recent access time and current time of the cached URLs to be processed, and obtaining the time distance between the most recent access time and the current time; retaining the cached URL to be processed corresponding to the minimum time distance, and removing other duplicate cached URLs to be processed.

[0082] For example, the synchronous cache server 106 determines the duplicate cache URLs to be processed from the cache URLs included in each cache, then obtains the last access time and current time of the cache URLs to be processed, and obtains the time distance between the last access time and the current time, retains the cache URLs to be processed corresponding to the minimum time distance, and removes other duplicate cache URLs to be processed. Using the access time and current time to remove duplicate cache URLs saves disk storage space, while also ensuring the timeliness of the cache URLs, thereby ensuring the cache update effect of the parent cache server 108, which is conducive to improving the cache hit rate.

[0083] In an exemplary embodiment, as shown in FIG3 , a cache update method is provided, which is described by taking the method applied to the edge cache server n104 in FIG1 as an example, and includes the following steps S301 and S302. Among them:

[0084] Step S301, periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information into the edge lru linked list accordingly.

[0085] For example, the edge cache server n104 periodically obtains the number of cache hits and the most recent cache hit time of user requests as cache feature information, and stores each cache feature information into the edge lru linked list, and periodically writes it to the disk of the edge cache server n104, ensuring that the relevant cache data will not be lost when the device is restarted. The periodic acquisition of cache feature information ensures the timeliness of the feature information update.

[0086] Step S302: According to the edge LRU sorting of each cache feature information in the edge LRU linked list, hot cache feature information is determined from multiple cache feature information, and hot cache feature information and IP address information of two adjacent periods are sent to the synchronous cache server; the synchronous cache server is used to receive each hot cache feature information and IP address information, and generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent periods, and send the reporting feature table and the incremental cache hit count to the parent cache server;

[0087] The parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0088] Optionally, the edge cache server n104 determines the hot cache feature information from the multiple cache feature information according to the edge LRU sorting of each cache feature information in the edge LRU linked list, and sends the hot cache feature information and IP address information of two adjacent cycles to the synchronous cache server 106. The synchronous cache server 106 receives each hot cache feature information and IP address information, generates a corresponding reporting feature table based on each IP address information and the hot cache feature information, and obtains the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and sends the feature table and the incremental cache hit count to the parent cache server 108. The parent cache server updates the parent LRU sorting of each cache in the parent LRU linked list according to the reporting feature table and the incremental cache hit count, and finally updates the cache stored in the parent LRU linked list based on the updated parent LRU sorting. By using the LRU sorting of the cache feature information to select the hot cache feature information, the hot cache feature information can be quickly determined from the multiple cache feature information, thereby accelerating the update efficiency of the cache in the parent cache server.

[0089] In one embodiment, hot cache feature information is determined from multiple cache feature information according to the edge lru ranking of each cache feature information in the edge lru linked list, including: determining cache feature information whose edge lru ranking is greater than a preset ranking threshold as hot cache feature information.

[0090] For example, the edge cache server n104 determines the cache feature information whose edge lru ranking is greater than the preset ranking threshold as hot cache feature information. For example, the cache feature information whose lru ranking is the top X% of the total can be determined as hot cache feature information, or the cache feature information greater than the sequence number A can be determined as hot cache feature information. It can be known that the greater than in the queue is not a conventional greater than comparison method, that is, the higher the ranking, the higher the heat, that is, the smaller the ranking. The greater than here is actually a large heat value, but the number itself may not necessarily be greater than the sequence number A. By setting appropriate screening conditions, more accurate hot cache feature information can be determined from multiple cache feature information, thereby improving the cache update effect and subsequent cache hit rate.

[0091] In an exemplary embodiment, as shown in FIG4 , a cache update method is provided, which is described by taking the method applied to the parent cache server 108 in FIG1 as an example, and includes the following steps S401 and S402. Among them:

[0092] Step S401, receiving the reporting feature table and the incremental cache hit count sent by the synchronous cache server; the reporting feature table is generated by the synchronous cache server based on the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server after the synchronous cache server receives the hot cache feature information and IP address information, and the incremental cache hit count is obtained by the synchronous cache server according to the hot cache feature information of two adjacent cycles; the hot cache feature information is obtained by the edge cache server periodically, and the cache hit count and the most recent cache hit time of the user request are used as cache feature information, and each cache feature information is stored in the edge lru linked list, and is determined according to the edge lru sorting of each cache feature information in the edge lru linked list.

[0093] Optionally, the parent cache server 108 receives the reporting feature table and the incremental cache hit count sent by the synchronous cache server 106. The reporting feature table includes the hot cache feature information and IP address information of two adjacent cycles received by the synchronous cache server 106 from each edge cache server, and is generated based on each hot cache feature information and IP address. The incremental cache hit count is obtained by the synchronous cache server 106 according to the hot cache feature information of two adjacent cycles. The hot cache feature information is the cache hit count and the latest cache hit time of the periodic Huqiu user request of the edge cache server n104 as cache feature information, and each cache feature information is stored in the edge lru linked list accordingly, and the edge lru ranking of each cache feature information in the edge lru linked list is determined. By receiving the reporting feature table and the incremental cache hit count reported by the synchronous cache server 106, a data foundation is laid for the subsequent update of the parent layer lru ranking of the cache, and at the same time, it is avoided to directly obtain the cache feature information from the edge cache server n104, which reduces the amount of data acquisition, thereby improving the security of the cache feature information.

[0094] Step S402: update the parent layer lru ranking of each cache in the parent layer lru linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer lru linked list based on the updated parent layer lru ranking.

[0095] For example, the parent cache server 108 updates the parent LRU sorting of each cache in the parent LRU linked list according to the reported feature table and the incremental cache hit count, and deletes the caches with lower sorting in the parent LRU linked list based on the updated parent LRU sorting. At the same time, it deletes the corresponding cache files stored in the disk, uses the acquired variable information to predict the cache hit of the next cycle, and makes corresponding adjustments in the parent cache server 108 in advance to improve the cache hit rate. At the same time, it eliminates infrequently used caches in a timely manner to save storage space and avoid system crashes due to storage space overflow.

[0096] In one embodiment, the parent layer lru ranking of each cache in the parent layer lru linked list is updated according to the reported feature table and the incremental cache hit count, including: traversing the reported feature table to obtain multiple cache urls and obtaining the current time; obtaining the corresponding cache from the cache table of the parent layer cache server according to the cache url; obtaining the decayed cache hit count based on the most recent cache hit time, current time and incremental cache hit count associated with the cache url; updating the cache reference value according to the decayed cache hit count, and updating the parent layer lru ranking of each cache in the parent layer lru linked list based on the updated reference value.

[0097] Optionally, the parent cache server 108 traverses the reporting feature table to obtain multiple cache URLs and obtains the current time, and then obtains the corresponding cache from the cache table in the parent cache server according to the cache URL, and determines the number of cache hits after decay based on the most recent cache hit time, current time and incremental cache hit times associated with the cache URL. A specific example is given below to help understand decay:

[0098] Last hit time (last_hit_time) = 10:00 AM;

[0099] Current time (current_time) = 10:30 AM;

[0100] Increment cache hit count (increment_hits) = 5;

[0101] Decay factor (decay_factor) = 0.1, this factor is set according to the actual situation;

[0102] Assume the most recent hit count (previous_hits) = 0;

[0103] Calculate the time difference:

[0104] time_since_last_hit = 10:30-10:00 = 30 minutes = 30 minutes × 60 seconds / minute = 1800 seconds time_since_last_hit = 10:30-10:00 = 30 minutes = 30 minutes × 60 seconds / minute = 1800 seconds

[0105] Calculate the decay value:

[0106] decay_value=e-0.1×1800≈e-180≈0 (almost zero) decay_value=e-0.1×1800≈e-180≈0 (almost zero)

[0107] (Due to the large time difference, the attenuation value will be very small.)

[0108] Calculate the number of hits after decay:

[0109] If only incremental hit counts are considered:

[0110] decayed_hits=5×0≈0decayed_hits=5×0≈0

[0111] If we consider the previous hit count:

[0112] decayed_hits=(20×0)+5=5decayed_hits=(20×0)+5=5

[0113] It can be known that according to the above process, the predicted value of the cache hit count of the cache is obtained. After obtaining the cache hit count after decay, the difference of the decay cache hit count is obtained according to the most recent cache hit count and the cache hit count after decay. If it is increased, the reference value of the cache in the cache table is increased accordingly using the difference of the decay cache hit count; if it is decreased, the reference value of the cache in the cache table is decreased accordingly using the difference of the decay cache hit count, and the parent layer lru ranking of each cache in the parent layer lru linked list is updated based on the updated reference value of each cache. The decay of the cache hit count is realized by using the incremental cache hit count, the most recent cache hit time of the cache, and the current time, and the predicted cache reference value is obtained. The parent layer lru ranking of each cache is updated, and the following technical effects are achieved:

[0114] 1. Automatically adjust the reference value of cache entries based on actual usage to ensure that frequently used caches remain in efficient access locations.

[0115] 2. Through the decay mechanism, the priority of cache entries that are no longer used can be effectively reduced, thereby improving the overall cache hit rate.

[0116] 3. Dynamically update the lru linked list to make frequently accessed data faster and improve user experience.

[0117] In one embodiment, a cache update system is provided, the system comprising a parent cache server, a synchronization cache server and a plurality of edge cache servers of a target area CDN system; the synchronization cache server is an edge cache server whose IP address information meets a set condition;

[0118] The edge cache server is used to periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information in the edge LRU linked list; according to the edge LRU sorting of each cache feature information in the edge LRU linked list, determine the hot cache feature information from multiple cache feature information, and send the hot cache feature information and IP address information of two adjacent periods to the synchronization cache server;

[0119] The synchronous cache server is used to generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server;

[0120] The parent layer cache server is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

[0121] For example, a user can initiate a user request to the CDN system in the target area through a terminal, and the edge cache server responds to the user request. While initiating the user request, the CDN system performs a consistent hash election based on the user request and the IP address information of each edge cache server, and determines the synchronous cache server to be used this time from multiple edge cache servers.

[0122] The edge cache server periodically obtains the number of cache hits and the most recent cache hit time of user requests as cache feature information, and stores each cache feature information in the edge LRU linked list, and periodically writes it to the disk of the edge cache server n104, and determines the cache feature information with an edge LRU sorting greater than the set sorting threshold as hot cache feature information, and sends the hot cache feature information and IP address information of two adjacent cycles to the synchronization cache server. The synchronous cache server uses each IP address information as the hash key for constructing a feature report, and constructs multiple cache URLs associated with the IP address based on the hot cache feature information and the IP. That is to say, one cache may correspond to multiple cache URLs, and constructs an initial feature table. Further, multiple cache URLs are obtained from the initial reporting feature table. For each cache, the repeated cache URLs to be processed are determined from the cache URLs included in each cache, and then the most recent access time and current time of the cache URL to be processed are obtained, and the time distance between the most recent access time and the current time is obtained. The cache URL to be processed corresponding to the minimum time distance is retained, and other repeated cache URLs to be processed are removed to obtain the reporting feature table, and the difference between the cache hit counts for the same cache between two adjacent ones is calculated as the incremental cache hit count, and the reporting feature table and the incremental cache hit count are sent to the parent cache server.

[0123] The parent cache server traverses the reported feature table to obtain multiple cache URLs and the current time, and then obtains the corresponding cache from the cache table in the parent cache server according to the cache URL, and determines the number of cache hits after decay based on the most recent cache hit time, current time and incremental cache hits associated with the cache URL, and obtains the predicted value of the cache hit number of the cache. After obtaining the number of cache hits after decay, the difference in the number of decay cache hits is obtained based on the most recent cache hit number and the number of cache hits after decay. If it is an increase, the reference value of the cache in the cache table is increased accordingly using the difference in the number of decay cache hits; if it is a decrease, the reference value of the cache in the cache table is reduced accordingly using the difference in the number of decay cache hits, and the parent lru sort of each cache in the parent lru linked list is updated based on the updated reference value of each cache. The incremental cache hit count, the cache's most recent cache hit time, and the current time are used to realize the decay of the cache hit count, obtain the predicted cache reference value, and update the parent layer lru sorting of each cache, while deleting the corresponding cache files stored in the disk.

[0124] Through the operation of the above cache update system, the following technical effects can be achieved:

[0125] 1. The edge cache server periodically obtains cache feature information and stores it on disk regularly to avoid cache data loss related to device restart, thereby improving the response speed of request responses and the robustness of the entire system.

[0126] 2. When a request is triggered, a hash consistency election is performed based on the IP address information of the edge cache server and the request itself to determine a synchronous cache server as a data transfer hub. At the same time, the data is also processed to reduce the amount of data that the parent cache server needs to process, thereby speeding up the update efficiency of the cache update of the parent cache server.

[0127] 3. By deduplicating the cached URLs and removing duplicate cached URLs using access time and current time, disk storage space is saved. At the same time, the timeliness of the cached URLs is also ensured, thereby ensuring the cache update effect of the parent cache server, which is beneficial to improving the cache hit rate.

[0128] 4. Through the decay mechanism, the priority of cache entries that are no longer used can be effectively reduced, and corresponding adjustments can be made in the parent cache server in advance to improve the cache hit rate. At the same time, infrequently used caches can be eliminated in a timely manner to save storage space and avoid system crashes due to storage space overflow.

[0129] In an exemplary embodiment, as shown in FIG. 5 and FIG. 6 , a specific implementation method for implementing cache update is provided (it can be understood that the numbers given below are settings in this example, and it is not limited to the present application that cache update can be implemented only under this condition):

[0130] 1. When the edge cache server container is started, the three edge nodes A, B, and C in the regional cache machine list are pulled through the k8s label, and the IP addresses of A, B, and C are consistently hashed to select one to report to the edge node A.

[0131] 2. The edge cache server counts the number of cache hits at the request granularity + the time point of the most recent cache hit as feature information, writes it into the metadata, and periodically writes it to the disk to ensure that the data is not lost when the service is restarted.

[0132] 3. The cache servers at nodes B and C send the feature information of the hot cache (the first 20% of the lru linked list) on the disk to the cache server at node A. The cache server at node A periodically (configurable) sends it to the corresponding parent server D.

[0133] Node A will build a hash table. The key of each hash table is the IP address of the edge cache server. The hash value is a feature object array s[2] (size=2) that stores the feature information reported by node B + the timestamp reported by node B. When node A reports, it will incrementally report the number of hits of node B: s[1]-s[0] (the change in the number of hits of the same cache between two adjacent cycles). Node C operates in the same way. Then the trait_table hash table will be built. The hash Key is the cache URL. The hot feature information of B+C will be deduplicated. For example, for repeated URLs, the most recent access time of the two will be taken. The data in the trait_table table will be reported to the parent layer. Avoid excessive computation on the parent server.

[0134] 4. The parent server D will traverse the trait_table hash table based on the obtained characteristic information. First, it will take out the hash key, that is, the cache URL information, match the cache table store_table (all cache hash tables) according to the URL, and obtain the cache store, and then convert it into hot information, that is, feature decay. According to the trait, the farther the most recent hit time is from the current time, the larger the decay number (here it can be understood as the number of hits after decay, the longer the time difference is, the lower the possibility of the cache being accessed), which means that the number of hits will change from many to few (the specific decay can be determined by the configuration to determine the decay ratio), and then increase the Reference value of the cache store to affect the heat of the parent cache, to update the lru sorting of the parent cache, and finally to organize the disk space according to the updated lru sorting of the parent cache to eliminate the cold cache.

[0135] Compared with the prior art, this application has the following advantages:

[0136] 1. The edge cache server builds cacheable feature information (cache URL, number of visits, and most recent hit time) and aggregates it by region. Because the request content of edge cache servers in the same region is highly correlated, consistent hashing is performed and reported by a management cache node to reduce synchronization requests to the parent server.

[0137] 2. The edge layer cache service can store the feature information on disk. When the service is restarted, the lru table of hot and cold caches can be rebuilt to avoid the loss of hot and cold information.

[0138] 3. The parent layer can update and adjust the cache hot and cold lru table based on the number of accesses + the most recent hit time to prevent the parent layer from being unable to perceive the heat of the edge layer cache and treating the hot cache as a cold cache.

[0139] 4. The parent layer decays the hot spots based on the number of accesses + the most recent hit time. The parent layer determines the decay of the number of hits based on the deviation between the hit time and the current time to improve the accuracy of the hot cache.

[0140] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0141] Based on the same inventive concept, the embodiment of the present application also provides a cache update device for implementing the cache update method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cache update device embodiments provided below can refer to the limitations on the cache update method above, and will not be repeated here.

[0142] In an exemplary embodiment, as shown in FIG. 7 , a cache update device is provided, which is applied to a synchronous cache server in a CDN system in a target area. The CDN system includes a parent cache server, a synchronous cache server, and multiple edge cache servers. The synchronous cache server is an edge cache server whose IP address information meets a set condition, including: an information receiving module 701 and a feature reporting module 702, wherein:

[0143] The information receiving module 701 is used to receive the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically from the number of cache hits and the most recent cache hit time requested by the user as cache feature information, and each cache feature information is stored in the edge LRU linked list accordingly, and the edge LRU sorting is determined according to each cache feature information in the edge LRU linked list.

[0144] The feature sending module 703 is used to generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count based on the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent layer cache server; the parent layer cache server is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reporting feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

[0145] In one embodiment, the feature sending module 702 further includes an initial feature construction submodule and a feature generation submodule, wherein:

[0146] The initial feature construction module is used to use the IP address information and hot cache feature information to construct the corresponding initial reporting feature table.

[0147] The feature generation submodule is used to obtain multiple cache URLs from the initial reporting feature table, and for each cache, deduplicate the multiple cache URLs based on the most recent access time of the cache URL to obtain a reporting feature table.

[0148] In one of the embodiments, the feature generation submodule is also used to determine duplicate cache URLs to be processed from multiple cache URLs; obtain the last access time and current time of the cache URLs to be processed, and obtain the time distance between the last access time and the current time; retain the cache URL to be processed corresponding to the minimum time distance, and remove other duplicate cache URLs to be processed.

[0149] In an exemplary embodiment, as shown in FIG8 , a cache update device is provided, which is applied to any edge cache server in a CDN system in a target area. The CDN system includes a parent cache server, a synchronization cache server, and multiple edge cache servers. The synchronization cache server is an edge cache server whose IP address information meets a set condition, including: an information construction module 801 and an information sending module 802, wherein:

[0150] The information construction module 801 is used to periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information into the edge lru linked list;

[0151] The information sending module 802 is used to determine the hot cache feature information from the multiple cache feature information according to the edge LRU sorting of each cache feature information in the edge LRU linked list, and send the hot cache feature information and IP address information of two adjacent periods to the synchronous cache server; the synchronous cache server is used to receive each hot cache feature information and IP address information, and generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent periods, and send the reporting feature table and the incremental cache hit count to the parent cache server;

[0152] The parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

[0153] In one embodiment, the information sending module 802 is further configured to determine cache feature information whose edge lru ranking is greater than a preset ranking threshold as hot cache feature information.

[0154] In an exemplary embodiment, as shown in FIG9 , a cache update device is provided, which is applied to a parent cache server in a CDN system in a target area. The CDN system includes a parent cache server, a synchronization cache server, and multiple edge cache servers. The synchronization cache server is an edge cache server whose IP address information meets a set condition, including: a feature receiving module 901, a cache update module 902, wherein:

[0155] The feature receiving module 901 is used to receive the reporting feature table and the incremental cache hit count sent by the synchronous cache server; the reporting feature table is generated by the synchronous cache server based on the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server after receiving the hot cache feature information and IP address information of each edge cache server, and the incremental cache hit count is obtained by the synchronous cache server according to the hot cache feature information of two adjacent cycles; the hot cache feature information is obtained by the edge cache server periodically obtaining the cache hit count and the most recent cache hit time of the user request as cache feature information, and storing each cache feature information in the edge lru linked list, and determining the edge lru sorting according to each cache feature information in the edge lru linked list;

[0156] The cache update module 902 is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

[0157] In one of the exemplary embodiments, the cache update module 902 is also used to traverse the reporting feature table to obtain multiple cache URLs and obtain the current time; obtain the corresponding cache from the cache table of the parent cache server according to the cache URL; obtain the number of cache hits after decay based on the most recent cache hit time, current time and incremental cache hit times associated with the cache URL; update the cache reference value according to the number of cache hits after decay, and update the parent LRU sorting of each cache in the parent LRU linked list based on the updated reference value.

[0158] Each module in the cache update device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0159] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store cache feature information, IP address information, an LRU linked list, a reporting feature table and incremental cache hit count data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a cache update method is implemented.

[0160] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0161] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the cache updating apparatus of the above embodiment when executing the computer program.

[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the cache updating device of the above embodiment is implemented.

[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the cache updating device of the above embodiment when executed by a processor.

[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0165] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0166] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0167] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A cache update method, characterized in that: A synchronous cache server in a CDN system applied to a target area, wherein the CDN system includes a parent cache server, a synchronous cache server, and a plurality of edge cache servers, wherein the synchronous cache server is an edge cache server whose IP address information satisfies a set condition, and the method includes: Receive hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of user requests as cache feature information, and storing each cache feature information in an edge LRU linked list, and determining the edge LRU sorting in the edge LRU linked list according to each cache feature information; A corresponding reporting feature table is generated based on each of the IP address information and the hot cache feature information, and an incremental cache hit count is obtained based on the hot cache feature information of two adjacent cycles, and the reporting feature table and the incremental cache hit count are sent to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list based on the reporting feature table and the incremental cache hit count, and update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

2. The method according to claim 1, characterized in that The generating a corresponding reporting feature table based on each of the IP address information and the hot cache feature information includes: Using each of the IP address information and hot cache feature information, construct a corresponding initial reporting feature table; A plurality of cache URLs are obtained from the initial reporting feature table, and for each cache, based on the most recent access time of the cache URL, a plurality of cache URLs are deduplicated to obtain the reporting feature table.

3. The method according to claim 2, characterized in that The deduplication processing of the plurality of cached URLs based on the most recent access time of the cached URLs includes: Determine a duplicate cache URL to be processed from the multiple cache URLs; Obtain the last access time and current time of the cached URL to be processed, and obtain the time distance between the last access time and the current time; The cached URL to be processed corresponding to the minimum time distance is retained, and other duplicate cached URLs to be processed are removed.

4. A cache update method, characterized in that: Any edge cache server in a CDN system applied to a target area, the CDN system comprising a parent cache server, a synchronization cache server and a plurality of edge cache servers, the synchronization cache server being the edge cache server whose IP address information satisfies a set condition, the method comprising: Periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information in the edge lru linked list; According to the edge LRU sorting of each cache feature information in the edge LRU linked list, hot cache feature information is determined from the multiple cache feature information, and the hot cache feature information and IP address information of two adjacent cycles are sent to the synchronous cache server; the synchronous cache server is used to receive each hot cache feature information and IP address information, and generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain an incremental cache hit count according to the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server; The parent layer cache server is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

5. The method according to claim 4, characterized in that The step of sorting the edge LRUs in the edge LRU linked list according to the cache feature information and determining the hot cache feature information from the plurality of cache feature information comprises: The cache feature information whose edge lru ranking is greater than a preset ranking threshold is determined as the hot cache feature information.

6. A cache update method, characterized in that: A parent cache server in a CDN system applied to a target area, wherein the CDN system includes a parent cache server, a synchronization cache server, and a plurality of edge cache servers, wherein the synchronization cache server is an edge cache server whose IP address information satisfies a set condition, and the method includes: Receive a reporting feature table and an incremental cache hit count sent by a synchronous cache server; the reporting feature table is generated by the synchronous cache server based on the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server after receiving the hot cache feature information and IP address information of each edge cache server, and the incremental cache hit count is obtained by the synchronous cache server according to the hot cache feature information of two adjacent cycles; the hot cache feature information is obtained by the edge cache server periodically obtaining the cache hit count and the most recent cache hit time of the user request as cache feature information, and storing each cache feature information in an edge lru linked list, and determining the edge lru sorting in the edge lru linked list according to each cache feature information; According to the reported feature table and the incremental cache hit count, the parent layer LRU sorting of each cache in the parent layer LRU linked list is updated, and the cache stored in the parent layer LRU linked list is updated based on the updated parent layer LRU sorting.

7. The method according to claim 6, characterized in that The updating of the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count includes: Traverse the reporting feature table to obtain multiple cache URLs and obtain the current time; According to the cache URL, obtain the corresponding cache from the cache table of the parent cache server; Based on the most recent cache hit time associated with the cache URL, the current time and the incremental cache hit count, obtaining the decayed cache hit count; The reference value of the cache is updated according to the number of cache hits after the decay, and the parent layer lru order of each cache in the parent layer lru linked list is updated based on the updated reference value.

8. A cache update system, characterized in that: The system includes a parent cache server, a synchronization cache server and a plurality of edge cache servers of the target area CDN system; the synchronization cache server is the edge cache server whose IP address information meets the set conditions; The edge cache server is used to periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information in an edge LRU linked list; sort the edge LRUs in the edge LRU linked list according to each cache feature information, determine hot cache feature information from multiple cache feature information, and send the hot cache feature information and IP address information of two adjacent cycles to the synchronization cache server; The synchronous cache server is used to generate a corresponding reporting feature table based on each of the IP address information and the hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server; The parent layer cache server is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

9. A cache update device, characterized in that: A synchronous cache server in a CDN system applied to a target area, wherein the CDN system includes a parent cache server, a synchronous cache server, and a plurality of edge cache servers, wherein the synchronous cache server is an edge cache server whose IP address information satisfies a set condition, and the device includes: An information receiving module is used to receive hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server; the hot cache feature information is obtained by the edge cache server periodically obtaining the number of cache hits and the most recent cache hit time of user requests as cache feature information, and storing each cache feature information in an edge LRU linked list, and determining the edge LRU sorting in the edge LRU linked list according to each cache feature information; A feature sending module is used to generate a corresponding reporting feature table based on each of the IP address information and hot cache feature information, and to obtain an incremental cache hit count based on the hot cache feature information of two adjacent cycles, and to send the reporting feature table and the incremental cache hit count to the parent cache server; the parent cache server is used to update the parent LRU sorting of each cache in the parent LRU linked list based on the reporting feature table and the incremental cache hit count, and to update the cache stored in the parent LRU linked list based on the updated parent LRU sorting.

10. A cache update device, characterized in that: Any edge cache server in a CDN system applied to a target area, the CDN system comprising a parent cache server, a synchronization cache server and a plurality of edge cache servers, the synchronization cache server being the edge cache server whose IP address information satisfies a set condition, the device comprising: An information construction module, used to periodically obtain the number of cache hits and the most recent cache hit time of user requests as cache feature information, and store each cache feature information into an edge lru linked list; An information sending module, used to sort the edge LRU in the edge LRU linked list according to each cache feature information, determine the hot cache feature information from the multiple cache feature information, and send the hot cache feature information and IP address information of two adjacent cycles to the synchronous cache server; the synchronous cache server is used to receive each hot cache feature information and IP address information, and generate a corresponding reporting feature table based on each IP address information and hot cache feature information, and obtain the incremental cache hit count according to the hot cache feature information of two adjacent cycles, and send the reporting feature table and the incremental cache hit count to the parent cache server; The parent layer cache server is used to update the parent layer LRU sorting of each cache in the parent layer LRU linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer LRU linked list based on the updated parent layer LRU sorting.

11. A cache update device, characterized in that: A parent cache server in a CDN system applied to a target area, wherein the CDN system includes a parent cache server, a synchronization cache server, and multiple edge cache servers, wherein the synchronization cache server is an edge cache server whose IP address information meets a set condition, and the device includes A feature receiving module, used to receive a reported feature table and an incremental cache hit count sent by a synchronous cache server; The reporting feature table is generated by the synchronous cache server based on the hot cache feature information and IP address information of two adjacent cycles sent by each edge cache server after receiving the hot cache feature information and IP address information of each edge cache server. The incremental cache hit count is obtained by the synchronous cache server according to the hot cache feature information of two adjacent cycles. The hot cache feature information is obtained by the edge cache server periodically obtaining the cache hit count and the most recent cache hit time of the user request as cache feature information, and storing each cache feature information in the edge lru linked list accordingly, and determining the edge lru sorting in the edge lru linked list according to each cache feature information. The cache update module is used to update the parent layer lru ranking of each cache in the parent layer lru linked list according to the reported feature table and the incremental cache hit count, and update the cache stored in the parent layer lru linked list based on the updated parent layer lru ranking.

Citation Information

Patent Citations

  • APK dynamic rewriting method and system based on CDN edge computing network

    CN114500515A

  • Data caching method, device and equipment and readable storage medium

    CN116321303A

  • AR (Augmented Reality) application calculation unloading strategy for mobile edge calculation

    CN117896781A

  • Caching method, system and equipment of edge server and storage medium

    CN118264713A

  • Method and system for improving cache hit rate of edge CDN sink node

    CN118353910A