CDN content caching method and device, equipment, storage medium and product

By using the heat prediction model in CDN to dynamically adjust the cache level, the problem that traditional CDN cache strategies cannot perceive user behavior is solved, and more efficient cache resource allocation and request processing are achieved.

CN120729949APending Publication Date: 2025-09-30AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510959687.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Traditional CDN caching strategies are unable to dynamically perceive changes in user behavior and regional traffic, resulting in insufficient caching of popular pages during e-commerce promotions, increasing latency and server load.

Method used

A popularity prediction model is used to predict the popularity of content accessed by users, and the user-accessed content data is stored in different cache levels according to the content popularity, including memory cache, disk cache and distributed cache, to reasonably allocate cache resources.

Benefits of technology

It improves the access content hit rate of CDN cache, reduces direct access to the source server, and improves the request processing efficiency of user access content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729949A_ABST
    Figure CN120729949A_ABST
Patent Text Reader

Abstract

The invention discloses a CDN content caching method, device and equipment, a storage medium and a product. The method can be applied to the technical field of artificial intelligence, is applied to any CDN node in a content distribution network CDN, and specifically comprises the following steps: obtaining user access content data in a first preset time period; inputting the user access content data into a popularity prediction model obtained by pre-training to obtain predicted content popularity of the user access content data output by the model; and determining a target cache hierarchy of the user access content data according to the predicted content popularity, and storing the user access content data to the target cache hierarchy. According to the technical scheme, the access content hit rate of the CDN cache is improved, the CDN performance is improved, and the request processing efficiency of the user access content is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a CDN content caching method, device, equipment, storage medium and product. Background Art

[0002] A Content Delivery Network (CDN) is a network architecture that distributes content to users more efficiently by placing node servers throughout the network. It caches website content on nodes close to users. When users request content, they retrieve it directly from these nodes, rather than from the source server. This significantly reduces data transmission distance and time, improves content access speed and responsiveness, and reduces the load on the source server.

[0003] Currently, traditional CDNs rely on static caching strategies like LRU and FIFO, which are unable to dynamically detect user behavior and regional traffic changes. For example, during e-commerce promotions, failing to predict regional content hotspots can lead to insufficient cache for popular pages, forcing users to access the origin server directly, increasing latency and server load.

[0004] Therefore, how to improve the access content hit rate of CDN cache, thereby improving CDN performance and improving the efficiency of processing user access content requests has become an urgent problem to be solved. Summary of the Invention

[0005] The present invention provides a CDN content caching method, apparatus, device, storage medium and product to improve the access content hit rate of the CDN cache, enhance CDN performance and improve the efficiency of processing user access content requests.

[0006] According to one aspect of the present invention, a CDN content caching method is provided, which is applied to any CDN node in a content delivery network (CDN). The method includes:

[0007] Acquiring user access content data within a first preset time period;

[0008] Inputting the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model;

[0009] A target cache level for the user-accessed content data is determined according to the predicted content popularity, and the user-accessed content data is stored in the target cache level.

[0010] According to another aspect of the present invention, a CDN content caching device is provided, which is configured at any CDN node in a content delivery network (CDN). The device includes:

[0011] An access content data acquisition module, configured to acquire user access content data within a first preset time period;

[0012] A content popularity prediction module is used to input the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model;

[0013] The cache level determination module is used to determine the target cache level of the user accessed content data according to the predicted content popularity, and store the user accessed content data in the target cache level.

[0014] According to another aspect of the present invention, an electronic device is provided, comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the CDN content caching method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the CDN content caching method according to any embodiment of the present invention when executed.

[0019] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the CDN content caching method according to any embodiment of the present invention is implemented.

[0020] The technical solution of the embodiment of the present invention obtains user access content data within a first preset time period, inputs the user access content data into a pre-trained heat prediction model, obtains the predicted content heat of the user access content data output by the model, determines the target cache level of the user access content data based on the predicted content heat, and stores the user access content data in the target cache level. The above technical solution uses a heat prediction model to predict the content heat of user access content, and stores the user access content in different cache levels based on the content heat, thereby achieving reasonable allocation of cache resources and improving the overall performance of the CDN cache. By setting the cache method, the hit rate of the access content of the CDN cache is improved, and direct access to the source server is reduced. By setting different cache levels to store content access data of different content heats, the efficiency of processing requests for user access content is improved.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 This is a flowchart of a CDN content caching method provided according to the first embodiment of the present invention;

[0024] Figure 2 This is a flowchart of a CDN content caching method provided according to the second embodiment of the present invention;

[0025] Figure 3 1 is a schematic diagram of the process structure of a CDN content caching method provided according to the third embodiment of the present invention;

[0026] Figure 4 This is a structural diagram of a CDN content caching device provided according to a fourth embodiment of the present invention;

[0027] Figure 5 It is a structural diagram of an electronic device that implements the CDN content caching method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] Figure 1 This is a flowchart of a CDN content caching method provided in Example 1 of the present invention. This embodiment is applicable to hierarchical caching of user access content data in a CDN to improve the request processing efficiency in the access content data acquisition stage. The method can be performed by a CDN content caching device, which can be implemented in the form of hardware and / or software, and the CDN content caching device can be configured in an electronic device.

[0032] like Figure 1 As shown, the method is applied to a content delivery network (CDN) and is executed by any CDN node in the CDN, specifically including:

[0033] S110: Obtain user access content data within a first preset time period.

[0034] S120 : Input the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model.

[0035] S130 : Determine a target cache level for user accessed content data based on the predicted content popularity, and store the user accessed content data in the target cache level.

[0036] The first preset time period can be pre-set by relevant technical personnel according to actual needs. For example, the first preset time period can be 24 hours. The user access content data may include the user's geographic location information, content access time, access content identifier, access content type, content access request time, and access request address.

[0037] The popularity prediction model is used to predict the popularity of content data accessed by users. Content popularity is used to characterize the frequency of access to data. For example, a higher content popularity indicates a higher frequency of access to the content data, indicating that the data was frequently accessed by a large number of users over a historical period. A lower content popularity indicates a lower frequency of access to the content data, indicating that the data was infrequently accessed by a small number of users over a historical period. The popularity prediction model can be pre-trained by relevant technical personnel.

[0038] By feeding user access content data into a pre-trained popularity prediction model, the model outputs the predicted content popularity of the user access content data. Based on the predicted content popularity, the target cache tier for the corresponding user access content data is determined and stored in the target cache tier.

[0039] Among them, the cache hierarchy can include memory cache, disk cache and distributed cache. Among them, memory cache usually uses high-speed memory as the storage medium, which has the advantages of fast reading and writing speeds, but relatively small storage capacity. It is used to cache content with high access frequency, such as clips of popular videos, frequently accessed web pages, etc., to achieve rapid response to user requests. Disk cache, as a storage medium, has a large storage capacity, but relatively slow reading and writing speeds. It is used to cache content with moderate access frequency. When the required content is not in the memory cache, it can be searched from the disk cache. Distributed cache distributes cached data across multiple nodes, stores and accesses data through the network, and is suitable for caching content with low access frequency, such as cold data, historical data, etc.

[0040] By setting up a multi-level cache architecture, cache resources can be reasonably allocated based on characteristics such as access hotspots of accessed content, thereby improving the overall performance of the CDN.

[0041] Specifically, for any piece of user-accessed content data, if the predicted content heat of the user-accessed content data is greater than the preset first heat threshold, the memory cache is used as the target cache level, and the user-accessed content data is stored in the memory cache; if the predicted content heat of the user-accessed content data is greater than the preset second heat threshold and not greater than the preset first heat threshold, the disk cache is used as the target cache level, and the user-accessed content data is stored in the disk cache; if the predicted content heat of the user-accessed content data is not greater than the preset second heat threshold, the distributed cache is used as the target cache level, and the user-accessed content data is stored in the distributed cache.

[0042] In the actual scenario of a user requesting content, when a CDN node receives a user request, it parses the request, determines the content requested, retrieves the content from the corresponding layer, and returns it to the requesting user. For example, it prioritizes searching the memory cache. If the content does not exist in memory, it searches the disk cache. If the content does not exist on disk, it searches the distributed cache. If the content does not exist in the distributed cache, it searches the origin server.

[0043] To further improve query efficiency, a mapping table between cache tiers and access content identifiers can be pre-generated. This mapping table stores the cache tiers corresponding to different access content identifiers. When a request for accessing content is received, the corresponding cache tier is preferentially searched from the mapping table based on the access content identifier. If the corresponding cache tier is not found in the mapping table, the request is directly queried from the origin server.

[0044] The technical solution of the embodiment of the present invention obtains user access content data within a first preset time period, inputs the user access content data into a pre-trained heat prediction model, obtains the predicted content heat of the user access content data output by the model, determines the target cache level of the user access content data based on the predicted content heat, and stores the user access content data in the target cache level. The above technical solution uses a heat prediction model to predict the content heat of user access content, and stores the user access content in different cache levels based on the content heat, thereby achieving reasonable allocation of cache resources and improving the overall performance of the CDN cache. By setting the cache method, the hit rate of the access content of the CDN cache is improved, and direct access to the source server is reduced. By setting different cache levels to store content access data of different content heats, the efficiency of processing requests for user access content is improved.

[0045] Furthermore, this embodiment also provides a model training method for the popularity prediction model. In an optional embodiment, the model training method for the popularity prediction model is as follows:

[0046] Obtain the historical access content data of its own CDN node within the historical time period and generate the standard content heat of the historical access content data; input the historical access content data and its corresponding standard access heat into the pre-built network model to obtain the predicted content heat of the historical access content data output by the model; according to the standard content heat and predicted content heat of the historical access content data, train the network model until the preset model training end conditions are met, and obtain the heat prediction model.

[0047] The historical access content data may include historical geographic location information, historical content access time, historical access content identifier, historical access content type, historical access content request time, and historical access request address, etc., obtained by historical users during historical access time periods.

[0048] The historically accessed content data is labeled with content popularity to obtain the standard content popularity of the historically accessed content data. This labeling method can be manual, semi-automatic, or fully automatic, and this embodiment does not limit this. The network model of this embodiment can be pre-set or pre-constructed by relevant technical personnel. For example, the network model can be an LSTM (Long Short-Term Memory) model or a Transformer (self-attention mechanism) model.

[0049] The historical access content data and its corresponding standard access popularity are input into a pre-built network model to obtain the predicted content popularity of the historical access content data output by the model; based on the standard content popularity of the historical access content data and the predicted content popularity, a current loss value is determined based on a preset loss function, and the network model is trained based on the current loss value until a preset model training end condition is met, thereby obtaining a popularity prediction model. The model training end condition can be pre-set by relevant technical personnel. For example, the model training end condition can be that the current loss value reaches a set threshold, the current loss value tends to be stable, the current number of iterations reaches a set iteration number threshold, etc.

[0050] The above technical solution improves the model training accuracy of the heat prediction model by comprehensively considering historical access content data of different dimensions during the model training process of the heat prediction model, thereby improving the heat prediction accuracy of the heat prediction model during use.

[0051] Example 2

[0052] Figure 2 This is a flowchart of a CDN content caching method provided in the second embodiment of the present invention. This embodiment is optimized and improved on the basis of the above technical solutions.

[0053] Furthermore, the user access content data includes the historical content hit rate; accordingly, the step of "determining the target cache level of the user access content data based on the predicted content popularity" is refined into "determining the content life cycle index of the historical access content data based on the predicted content popularity and the historical content hit rate; and determining the target cache level of the user access content data from the candidate cache levels based on the content life cycle index." This improves the method of determining the target cache level of the user access content.

[0054] It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the descriptions of other embodiments. Figure 2 As shown, the method includes the following specific steps:

[0055] S210: Obtain user access content data within a first preset time period; the user access content data includes historical content hit rates.

[0056] S220: Input the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model.

[0057] S230: Determine a content life cycle index of historically accessed content data based on the predicted content popularity and historical content hit rate.

[0058] S240 : Determine a target cache tier for the content data accessed by the user from the candidate cache tiers according to the content lifecycle index, and store the content data accessed by the user in the target cache tier.

[0059] Among them, the historical content hit rate is the cache hit rate of user-accessed content data in the historical time period. The cache hit rate is an important indicator for measuring CDN cache performance. It indicates the proportion of user-requested content that is found in the cache. The calculation formula is: cache hit rate = (number of cache hit requests / total number of requests) × 100%. For example, within a period of time, the total number of user requests to a CDN node is 1,000 times, of which 800 requests were found in the cache, then the cache hit rate of the node is 80%. A higher cache hit rate means that more user requests can be responded to directly from the cache, thereby reducing access to the source server and improving the system's response speed and performance.

[0060] For example, the content life cycle index of historically accessed content data can be calculated based on the predicted content popularity and historical content hit rate, using a content life cycle index evaluation function. The content life cycle index evaluation function is expressed as follows:

[0061] L = f(T,H);

[0062] Where T represents the predicted content popularity, H represents the historical content hit rate, and f(·) represents the content lifecycle index evaluation function that comprehensively considers the predicted content popularity and historical content hit rate. For example, f(·) can be expressed as follows:

[0063] L = αT + βH;

[0064] α and β are weighting parameters for predicting content popularity and historical content hit rate, respectively. These parameters can be pre-set by relevant technical personnel based on actual needs, ensuring that α + β = 1. The content lifecycle index is used to evaluate the popularity or activity of user-accessed content data throughout its lifecycle, thereby facilitating better cache tier classification.

[0065] Optionally, the candidate cache levels include memory cache, disk cache and distributed cache; accordingly, based on the content life cycle index, the target cache level for the user to access the content data is determined from the candidate cache levels, including: if the content life cycle index meets the first index range threshold judgment condition, the memory cache is determined as the target cache level for the user to access the content data; or, if the content life cycle index meets the second index range threshold judgment condition, the disk cache is determined as the target cache level for the user to access the content data; or, if the content life cycle index meets the third index range threshold judgment condition, the distributed cache is determined as the target cache level for the user to access the content data.

[0066] Among them, the first index range threshold judgment condition can be, for example, that the content life cycle index is greater than the preset first index threshold; that is, when the content life cycle index is greater than the preset first index threshold, the memory cache is determined as the target cache level for users to access content data.

[0067] Among them, the second index range threshold judgment condition can be, for example, that the content life cycle index is not greater than the preset first index threshold and is greater than the preset second index threshold; that is, when the content life cycle index is not greater than the preset first index threshold and is greater than the preset second index threshold, the disk cache is determined as the target cache level for users to access content data.

[0068] Among them, the third index range threshold judgment condition can be, for example, that the content life cycle index is not greater than the preset second index threshold; that is, when the content life cycle index is not greater than the preset second index threshold, the distributed cache is determined as the target cache level for users to access content data.

[0069] The technical solution of this embodiment determines the content life cycle index of historically accessed content data based on the predicted content popularity and historical content hit rate, and determines the target cache level for user accessed content data from candidate cache levels based on the content life cycle index. In the process of selecting the target cache level, the cache level is selected based on the content life cycle index evaluation parameters, thereby further improving the accuracy of determining the target cache level for user accessed content data.

[0070] It should be noted that in order to further improve the model accuracy of the heat prediction model of each CDN node, and to achieve collaborative sharing of optimized caching strategies among each CDN node while ensuring the data privacy of each CDN node, this embodiment also provides a model optimization method for the heat prediction model of the CDN node.

[0071] In an optional embodiment, the model training parameter data of the heat prediction model of its own CDN node in the model training stage is obtained; the model training parameter data of its own CDN node is uploaded to the central server, so that the central server can aggregate the parameter data according to the model training parameter data uploaded by each CDN node, obtain the aggregated training parameter data, and perform model training on the global heat prediction model deployed by the central server itself based on the aggregated training parameter data, obtain the global model training parameters of the trained global heat prediction model, and send the global model training parameters to each CDN node; obtain the global model training parameters sent by the central server, and update the heat prediction model of its own CDN node based on the global model training parameters.

[0072] Among them, the model training parameter data is the model training parameters that are continuously optimized during the model training process, such as model gradient and other parameter data.

[0073] Specifically, each CDN node uploads the model training parameter data of the popularity prediction model trained by its own CDN node to the central server. The central server aggregates the model training parameter data uploaded by each CDN node to generate aggregated training parameter data. This aggregated training parameter data is used to train the global popularity prediction model deployed by the central server. The global popularity prediction model is a global model deployed by the central server itself. The initial global model can be an LSTM model or a Transformer model, which is consistent with the model architecture of each CDN node.

[0074] The central server trains its own global popularity prediction model based on the aggregated training parameter data, obtaining the global model training parameters for the trained global popularity prediction model. The central server distributes the global model training parameters to each CDN node. After receiving the global model training parameters from the central server, the CDN node updates its own popularity prediction model based on the global model training parameters.

[0075] The above technical solution enables each CDN node to collaboratively optimize its own node's heat prediction model through federated learning parameter sharing, avoiding content redundancy between regions and improving cross-network access efficiency. It also enables collaborative sharing of optimized caching strategies between CDN nodes while ensuring the data privacy of each CDN node, thereby improving the model accuracy of the heat prediction model of each CDN node.

[0076] This embodiment also provides a method for updating a popularity prediction model for a CDN node. In an optional embodiment, reference access content data within a second preset time period is obtained, and a reference content hit rate of the reference access content data is determined; and based on the reference content hit rate of the reference access content data, the popularity prediction model of the CDN node itself is updated.

[0077] The second preset time period may be pre-set by relevant technical personnel according to actual needs. For example, the second preset time period may be greater than the first preset time period, and the second preset time period may be set to 7 days or 14 days.

[0078] Determine a reference content hit rate of the reference access content data obtained within the second preset time period, and update the popularity prediction model of the CDN node based on the reference content hit rate of the reference access content data. For example, the reference content hit rate of the reference access content data may be used to update the model training samples used for the popularity prediction model, as well as the standard content popularity of the label values ​​of the model training samples, and continuously optimize the popularity prediction model of the CDN node to obtain a more accurate popularity prediction model.

[0079] Example 3

[0080] Figure 3 This is a schematic diagram of the process structure of a CDN content caching method provided in Embodiment 3 of the present invention. This embodiment provides a preferred example based on the above embodiments.

[0081] like Figure 3 As shown, this method is described in detail from the following aspects:

[0082] Part 1: CDN intelligent cache management for any CDN node in the CDN system architecture, including the following steps:

[0083] Step 11: Input the acquired user access content data within a first preset time period into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model.

[0084] Step 12: Determine the content life cycle index of the historically accessed content data based on the predicted content popularity and the historical content hit rate.

[0085] Step 13: Determine the target cache tier for the user's accessed content data from the candidate cache tiers based on the content lifecycle index, and store the user's accessed content data in the target cache tier.

[0086] Cache level division: Build a multi-level cache architecture of "memory cache (high frequency) - disk cache (medium frequency) - distributed cache (low frequency)".

[0087] Dynamic Scheduling: Dynamically adjusts the content distribution of each cache level based on the target cache level corresponding to the content data accessed by the user. For example, content with high predicted popularity is prioritized in the memory cache for fast response; less popular content is stored in the disk cache or distributed cache.

[0088] Memory / disk / distributed cache: Passes access content ID and storage instructions, such as "store in memory cache", to trigger cache storage operations.

[0089] Extract response content from memory / disk / distributed cache: Deliver cache-hit content data, such as video clips or web page files, and return them directly to users, reducing access to the origin server.

[0090] Extract content data from the memory cache to the disk cache: pass cold data elimination instructions and access content identifiers to migrate infrequently accessed content from memory to disk, freeing up memory space.

[0091] Extract content data from disk cache to distributed cache: pass extremely cold data elimination instructions and content identifiers, and further migrate data to low-cost distributed storage.

[0092] Delete content data from the distributed cache: delete expired data instructions and content identifiers, clean up invalid content data that has not been accessed for a long time, and free up storage space.

[0093] Part 1: Federated learning optimizes the popularity prediction model of any CDN node in the CDN system architecture, including the following steps:

[0094] Step 21: Each CDN node uses local user access content data to train a popularity prediction model locally.

[0095] Step 22: Each CDN node calculates the model gradient parameters of the local popularity prediction model.

[0096] Step 23: Each CDN node uploads the model gradient parameters to the central server.

[0097] Step 24: The central server aggregates the model gradient parameters of all CDN nodes and updates its own global model parameters.

[0098] Step 25: The central server sends the updated global model parameters to each CDN node.

[0099] Step 26: Each CDN node updates the local popularity prediction model according to the issued global model parameters.

[0100] Part 3: Optimize the popularity prediction model of CDN nodes based on the content hit rate of reference access content data during the user's actual access process.

[0101] Acquire reference access content data within a second preset time period and determine a reference content hit rate of the reference access content data; and update a heat prediction model of its own CDN node according to the reference content hit rate of the reference access content data.

[0102] Example 4

[0103] Figure 4 This is a structural diagram of a CDN content caching device provided in the fourth embodiment of the present invention. The CDN content caching device provided in the embodiment of the present invention is applicable to hierarchical caching of user access content data in the CDN to improve the request processing efficiency in the access content data acquisition stage. The CDN content caching device can be implemented in the form of hardware and / or software, such as Figure 4 As shown, the device can be configured in any CDN node in the content delivery network CDN, and specifically includes: access content data acquisition module 401, content popularity prediction module 402 and cache level determination module 403.

[0104] Access content data acquisition module 401, used to acquire user access content data within a first preset time period;

[0105] The content popularity prediction module 402 is configured to input the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model;

[0106] The cache level determination module 403 is configured to determine a target cache level for the user accessing the content data according to the predicted content popularity, and store the user accessing the content data in the target cache level.

[0107] The technical solution of the embodiment of the present invention obtains user access content data within a first preset time period, inputs the user access content data into a pre-trained heat prediction model, obtains the predicted content heat of the user access content data output by the model, determines the target cache level of the user access content data based on the predicted content heat, and stores the user access content data in the target cache level. The above technical solution uses a heat prediction model to predict the content heat of user access content, and stores the user access content in different cache levels based on the content heat, thereby achieving reasonable allocation of cache resources and improving the overall performance of the CDN cache. By setting the cache method, the hit rate of the access content of the CDN cache is improved, and direct access to the source server is reduced. By setting different cache levels to store content access data of different content heats, the efficiency of processing requests for user access content is improved.

[0108] Optionally, the cache level determination module 403 includes:

[0109] a content life cycle index determining unit, configured to determine a content life cycle index of the historically accessed content data based on the predicted content popularity and the historical content hit rate;

[0110] The cache level determination unit is configured to determine a target cache level for the user to access the content data from candidate cache levels according to the content lifecycle index.

[0111] Optionally, the candidate cache levels include memory cache, disk cache, and distributed cache; accordingly, the cache level determination unit is specifically configured to:

[0112] If the content life cycle index satisfies the first index range threshold judgment condition, the memory cache is determined as the target cache level for the user to access the content data; or

[0113] If the content life cycle index satisfies the second index range threshold judgment condition, the disk cache is determined as the target cache level for the user to access the content data; or

[0114] If the content life cycle index satisfies the third index range threshold judgment condition, the distributed cache is determined as the target cache level for the user to access the content data.

[0115] Optionally, the popularity prediction model is trained as follows:

[0116] Obtain historical access content data of its own CDN node within a historical time period, and generate standard content popularity of the historical access content data;

[0117] Inputting the historical access content data and its corresponding standard access popularity into a pre-built network model to obtain the predicted content popularity of the historical access content data output by the model;

[0118] The network model is trained according to the standard content popularity of the historically accessed content data and the predicted content popularity until a preset model training end condition is met, thereby obtaining a popularity prediction model.

[0119] Optionally, the device further includes:

[0120] The training parameter data acquisition module is used to obtain the model training parameter data of the popularity prediction model of its own CDN node during the model training phase;

[0121] A training parameter data sending module is used to upload the model training parameter data of its own CDN node to the central server, so that the central server can aggregate the parameter data according to the model training parameter data uploaded by each CDN node, obtain aggregated training parameter data, and perform model training on the global popularity prediction model deployed by the central server itself based on the aggregated training parameter data, obtain the global model training parameters of the trained global popularity prediction model, and send the global model training parameters to each CDN node;

[0122] The global training parameter acquisition module is used to obtain the global model training parameters issued by the central server and update the popularity prediction model of its own CDN node based on the global model training parameters.

[0123] Optionally, the device further includes:

[0124] a reference hit rate determination module, configured to obtain reference access content data within a second preset time period and determine a reference content hit rate of the reference access content data;

[0125] The popularity prediction model updating module is used to update the popularity prediction model of its own CDN node according to the reference content hit rate of the reference access content data.

[0126] The CDN content caching device provided in the embodiment of the present invention can execute the CDN content caching method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] Example 5

[0128] Figure 5A schematic diagram of the structure of an electronic device 50 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0129] like Figure 5 As shown, the electronic device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., which is communicatively connected to the at least one processor 51. The memory stores a computer program that can be executed by the at least one processor. The processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 into the random access memory (RAM) 53. Various programs and data required for the operation of the electronic device 50 can also be stored in the RAM 53. The processor 51, ROM 52, and RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0130] Multiple components in the electronic device 50 are connected to the I / O interface 55, including an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a magnetic disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0131] The processor 51 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as the CDN content caching method.

[0132] In some embodiments, the CDN content caching method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 50 via ROM 52 and / or communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the CDN content caching method described above can be performed. Alternatively, in other embodiments, processor 51 can be configured to perform the CDN content caching method in any other suitable manner (e.g., via firmware).

[0133] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0137] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0138] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0139] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0140] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A CDN content caching method, characterized in that: Applicable to any CDN node in the content delivery network (CDN), including: Acquiring user access content data within a first preset time period; Inputting the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model; A target cache level for the user-accessed content data is determined according to the predicted content popularity, and the user-accessed content data is stored in the target cache level.

2. The method according to claim 1, characterized in that The user access content data includes a historical content hit rate; accordingly, determining a target cache level for the user access content data based on the predicted content popularity includes: Determining a content life cycle index of the historically accessed content data based on the predicted content popularity and the historical content hit rate; According to the content lifecycle index, a target cache tier for the user to access the content data is determined from candidate cache tiers.

3. The method according to claim 2, characterized in that The candidate cache levels include memory cache, disk cache, and distributed cache. Accordingly, determining the target cache level for the user to access the content data from the candidate cache levels based on the content lifecycle index includes: If the content life cycle index satisfies the first index range threshold judgment condition, the memory cache is determined as the target cache level for the user to access the content data; or If the content life cycle index satisfies the second index range threshold judgment condition, the disk cache is determined as the target cache level for the user to access the content data; or If the content life cycle index satisfies the third index range threshold judgment condition, the distributed cache is determined as the target cache level for the user to access the content data.

4. The method according to claim 1, wherein The model training method of the popularity prediction model is as follows: Obtain historical access content data of its own CDN node within a historical time period, and generate standard content popularity of the historical access content data; Inputting the historical access content data and its corresponding standard access popularity into a pre-built network model to obtain the predicted content popularity of the historical access content data output by the model; The network model is trained according to the standard content popularity of the historically accessed content data and the predicted content popularity until a preset model training end condition is met, thereby obtaining a popularity prediction model.

5. The method according to claim 1, wherein The method further comprises: Obtain the model training parameter data of the popularity prediction model of its own CDN node during the model training phase; Upload the model training parameter data of its own CDN node to the central server, so that the central server can aggregate the parameter data according to the model training parameter data uploaded by each CDN node, obtain aggregated training parameter data, and perform model training on the global popularity prediction model deployed by the central server itself based on the aggregated training parameter data, obtain the global model training parameters of the trained global popularity prediction model, and send the global model training parameters to each CDN node; Obtain the global model training parameters sent by the central server, and update the popularity prediction model of its own CDN node based on the global model training parameters.

6. The method according to claim 1, characterized in that The method further comprises: Acquiring reference access content data within a second preset time period, and determining a reference content hit rate of the reference access content data; The popularity prediction model of its own CDN node is updated according to the reference content hit rate of the reference access content data.

7. A CDN content caching device, characterized in that: Any CDN node configured in the content delivery network (CDN), including: An access content data acquisition module, configured to acquire user access content data within a first preset time period; A content popularity prediction module is used to input the user access content data into a pre-trained popularity prediction model to obtain the predicted content popularity of the user access content data output by the model; The cache level determination module is used to determine the target cache level of the user accessed content data according to the predicted content popularity, and store the user accessed content data in the target cache level.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the CDN content caching method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the CDN content caching method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the CDN content caching method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Aerial information query service method and system based on Internet channel

    CN121705340A

  • Page caching strategy switching method and device, electronic equipment and storage medium

    CN122195944A