Caching method and device, computer equipment, readable storage medium and program product

By receiving resource acquisition requests at edge nodes and obtaining hardware resource configurations, and determining cache identifiers based on disk I/O utilization and access frequency, the problem of resource waste in traditional caching methods is solved, achieving more efficient resource utilization and improved service quality.

CN121509512APending Publication Date: 2026-02-10CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511768103.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional caching methods lead to resource waste, affect user service quality, and fail to effectively utilize the processing resources of edge nodes.

Method used

By receiving resource acquisition requests, the system obtains local hardware resource configurations, determines the cache identifier of the target resource based on factors such as disk I/O utilization and access frequency, and reasonably controls cache operations to avoid resource waste.

Benefits of technology

It improved the utilization of processing resources at edge nodes, increased single-machine service bandwidth, reduced machine resource requirements, and improved server utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509512A_ABST
    Figure CN121509512A_ABST
Patent Text Reader

Abstract

The invention relates to a caching method and device, computer equipment, a readable storage medium and a program product. The method comprises the steps that a first resource obtaining request is received, the first resource obtaining request is used for requesting a target resource from an edge node, and the first resource obtaining request comprises resource indication information of the target resource; under the condition that the resource indication information indicates to perform cache control on the target resource, acquiring local hardware resource configuration; based on the local hardware resource configuration, determining a cache identifier of the target resource; the cache identifiers comprise cacheable and non-cacheable identifiers; and processing the target resource according to the cache identifier. By judging whether the target resource is subjected to cache control or not, the influence of the business service on the processing resource of the edge node is reduced, and the utilization rate of the processing resource of the edge node is improved, so that the effects of improving the stand-alone service bandwidth and the like are achieved, more business services can be provided by using less machine resources, and the utilization rate of a server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of content delivery network technology, and in particular to a caching method, apparatus, computer device, readable storage medium, and program product. Background Technology

[0002] A Content Delivery Network (CDN) utilizes server nodes at various levels to cache resources from the origin server to nodes located near the user's geographical location or with fast network access speeds. This allows users to access resources directly from the nearest node, thereby improving access speed, reducing access pressure on the origin server, and optimizing the customer experience. However, for each disk within each node, excessive write operations can lead to abnormal disk I / O metrics, resulting in an increase in the overall machine health value and ultimately impacting the quality of service for users.

[0003] In traditional technology, adding more servers is used to ensure that the service quality is not reduced.

[0004] However, traditional caching methods suffer from resource waste. Summary of the Invention

[0005] Therefore, it is necessary to provide a caching method, apparatus, computer device, readable storage medium, and program product that can avoid resource waste in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides a caching method applied to an edge node of a content delivery network, the method comprising:

[0007] Receive a first resource acquisition request, the first resource acquisition request is used to request a target resource from the edge node, and the first resource acquisition request includes resource indication information of the target resource;

[0008] When the resource indication information indicates that caching control should be performed on the target resource, the local hardware resource configuration is obtained;

[0009] Based on the local hardware resource configuration, a cache identifier for the target resource is determined; the cache identifier includes cacheable and non-cacheable.

[0010] The target resource is processed according to the cache identifier.

[0011] In one embodiment, the local hardware resource configuration includes disk I / O utilization, and determining the cache identifier of the target resource based on the local hardware resource configuration includes:

[0012] If the disk I / O utilization is greater than the utilization threshold, the cache identifier is determined based on the access frequency of the target resource;

[0013] If the disk I / O utilization is not greater than the utilization threshold, then the cache identifier is determined to be cacheable.

[0014] In one embodiment, before determining the cache identifier based on the access frequency of the target resource, the method further includes:

[0015] Obtain the access popularity of the target resource;

[0016] Determining the cache identifier based on the access frequency of the target resource includes:

[0017] If the access popularity is greater than the popularity threshold, the cache identifier is determined to be cacheable;

[0018] If the access popularity is not greater than the popularity threshold, the cache identifier is determined to be non-cacheable.

[0019] In one embodiment, obtaining the access popularity of the target resource includes:

[0020] Read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue to be cached;

[0021] If the resource identifier of the target resource is in the cache queue, then update the access count of the target resource in the cache queue, and determine the access popularity of the target resource based on the access count.

[0022] In one embodiment, the method further includes:

[0023] If the resource identifier of the target resource is not in the cache queue, then add the resource identifier of the target resource to the cache queue.

[0024] Update the access count of the target resource in the queue to be cached.

[0025] In one embodiment, the local hardware resource configuration includes disk I / O utilization and remaining cache space, and determining the cache identifier of the target resource based on the local hardware resource configuration includes:

[0026] Determine whether the disk I / O utilization is greater than the utilization threshold;

[0027] If the disk I / O utilization is greater than the utilization threshold, then the cache identifier of the target resource is determined based on the remaining cache space and the space threshold.

[0028] If the disk I / O utilization is less than the utilization threshold, then the cache identifier is determined to be cacheable.

[0029] In one embodiment, processing the target resource according to the cache identifier includes:

[0030] Obtain the target resource;

[0031] The target resource is processed based on the data volume of the target resource and the cache identifier.

[0032] In one embodiment, processing the target resource based on the data volume of the target resource and the cache identifier includes:

[0033] If the cache identifier is cacheable, then the target resource is cached;

[0034] If the cache identifier is not cacheable, then the target resource is cached when the data volume of the target resource is within a preset data volume range.

[0035] In one embodiment, acquiring the target resource includes:

[0036] Request the target resource from the parent node according to the first resource acquisition request;

[0037] The target resource is received by the parent node from the source node.

[0038] In one embodiment, the resource indication information includes: a domain name; after receiving the first resource acquisition request, and before acquiring the local hardware resource configuration and the access popularity of the target resource when the resource indication information indicates caching control for the target resource, the method further includes:

[0039] Obtain the status identifier corresponding to the cache control function stored for the domain name;

[0040] When the status indicator control function is enabled, it is determined that cache control is performed on the target resource;

[0041] When the status indicator indicates that the control function is off, the target resource is acquired and the target resource is cached directly.

[0042] In one embodiment, the method further includes:

[0043] Obtain the target number of accesses to the target resource within a preset time period;

[0044] If the target access count is less than the access count threshold, then the target resource is deleted.

[0045] Secondly, this application also provides a caching device, comprising:

[0046] The receiving module is used to receive a first resource acquisition request, which is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0047] The acquisition module is used to acquire local hardware resource configuration when the resource indication information indicates that the target resource is subject to caching control;

[0048] The determination module is used to determine the cache identifier of the target resource based on the local hardware resource configuration; the cache identifier includes cacheable and non-cacheable.

[0049] A caching module is used to process the target resource according to the cache identifier.

[0050] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0051] Receive a first resource acquisition request, the first resource acquisition request is used to request a target resource from the edge node, and the first resource acquisition request includes resource indication information of the target resource;

[0052] When the resource indication information indicates that caching control should be performed on the target resource, the local hardware resource configuration is obtained;

[0053] Based on the local hardware resource configuration, a cache identifier for the target resource is determined; the cache identifier includes cacheable and non-cacheable.

[0054] The target resource is processed according to the cache identifier.

[0055] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0056] Receive a first resource acquisition request, the first resource acquisition request is used to request a target resource from the edge node, and the first resource acquisition request includes resource indication information of the target resource;

[0057] When the resource indication information indicates that caching control should be performed on the target resource, the local hardware resource configuration is obtained;

[0058] Based on the local hardware resource configuration, a cache identifier for the target resource is determined; the cache identifier includes cacheable and non-cacheable.

[0059] The target resource is processed according to the cache identifier.

[0060] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0061] Receive a first resource acquisition request, the first resource acquisition request is used to request a target resource from the edge node, and the first resource acquisition request includes resource indication information of the target resource;

[0062] When the resource indication information indicates that caching control should be performed on the target resource, the local hardware resource configuration is obtained;

[0063] Based on the local hardware resource configuration, a cache identifier for the target resource is determined; the cache identifier includes cacheable and non-cacheable.

[0064] The target resource is processed according to the cache identifier.

[0065] The aforementioned caching method, apparatus, computer device, readable storage medium, and program product receive a first resource acquisition request, which requests a target resource from an edge node. The first resource acquisition request includes resource indication information of the target resource. If the resource indication information indicates that caching control should be applied to the target resource, the method acquires local hardware resource configuration. Based on the local hardware resource configuration, it determines a cache identifier for the target resource. The cache identifier includes cacheable and non-cacheable identifiers. The method processes the target resource according to the cache identifier. By determining whether to apply caching control to the target resource, the impact of business services on the processing resources of the edge node is reduced, and the utilization rate of the edge node's processing resources is improved. This achieves effects such as increasing single-machine service bandwidth, enabling more business services to be provided with fewer machine resources, and improving server utilization. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is a diagram illustrating the application environment of a caching method in one embodiment;

[0068] Figure 2 This is a flowchart illustrating a caching method in one embodiment;

[0069] Figure 3 This is a flowchart illustrating the caching method in another embodiment;

[0070] Figure 4 This is a flowchart illustrating the caching method in another embodiment;

[0071] Figure 5 This is a flowchart illustrating the caching method in another embodiment;

[0072] Figure 6 This is a flowchart illustrating the caching method in another embodiment;

[0073] Figure 7 This is a flowchart illustrating the caching method in another embodiment;

[0074] Figure 8 This is a flowchart illustrating the caching method in another embodiment;

[0075] Figure 9 This is a flowchart illustrating the caching method in another embodiment;

[0076] Figure 10 This is a flowchart illustrating the caching method in another embodiment;

[0077] Figure 11 This is a flowchart illustrating the caching method in another embodiment;

[0078] Figure 12 This is a flowchart illustrating the caching method in another embodiment;

[0079] Figure 13 This is a structural block diagram of a cache device in one embodiment;

[0080] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0081] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0082] The caching method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, the client origin server is source node 104, edge node 102 communicates with parent node 103, and parent node 103 communicates with source node 104. Edge node 102 receives a first resource acquisition request, determines the cache identifier of the target resource based on the first resource acquisition request and local hardware resource configuration, and after obtaining the target resource from source node 104 through parent node 103, processes the target resource according to the cache identifier. Edge node 102, parent node 103, and source node 104 can all be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.

[0083] In one embodiment, such as Figure 2 As shown, a caching method is provided, which can be applied to... Figure 1 Taking edge node 102 as an example, the explanation includes:

[0084] S201, Receive a first resource acquisition request. The first resource acquisition request is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0085] The resource indication information is used to indicate whether caching control should be applied to the target resource. Applying caching control to the target resource requires further determination of whether to cache the target resource, while not applying caching control to the target resource is the default setting for caching the target resource. Optionally, the resource indication information may include whether caching control should be applied to the target resource or not; or, the determination of whether caching control should be applied to the target resource may be based on the resource indication information, meaning the resource indication information may directly or indirectly indicate whether caching control should be applied to the target resource.

[0086] In this embodiment of the application, the client sends a first resource acquisition request corresponding to the target resource to the edge node. The edge node determines whether the target resource is cached locally based on the first resource request. If it is cached, it sends the target resource back to the client. If it is not cached, it performs the following steps to determine whether the target resource needs to be cached, acquires the target resource, and then sends the target resource back to the client.

[0087] S202, when the resource indication information indicates that the target resource should be cached, obtain the local hardware resource configuration.

[0088] The local resource configuration includes at least one of the following: CPU utilization, available memory, available bandwidth, disk I / O utilization, and remaining cache space.

[0089] In this embodiment of the application, if the resource indication information indicates that no caching control is performed on the target resource, the target resource is obtained but not cached locally; if the resource indication information indicates that caching control is performed on the target resource, the local hardware resource configuration is obtained based on the preset monitoring component.

[0090] For example, if the CPU utilization is greater than a first threshold, the resource indication information is determined to be cache control for the target resource; if the CPU utilization is not greater than the first threshold, the resource indication information is determined to be no cache control for the target resource. Alternatively, if the available bandwidth is greater than a second threshold, the resource indication information is determined to be cache control for the target resource; if the available bandwidth is not greater than the second threshold, the resource indication information is determined to be no cache control for the target resource.

[0091] S203 determines the cache identifier of the target resource based on the local hardware resource configuration; the cache identifier includes cacheable and non-cacheable.

[0092] In this embodiment of the application, when the local hardware resource configuration represents the processing capability of the edge node not close to the load, the cache identifier of the target resource is determined to be cacheable; when the local hardware resource configuration represents the processing capability of the edge node close to the load, the cache identifier of the target resource is determined to be non-cacheable, or the cache identifier of the target resource is further determined based on other information.

[0093] For example, if the CPU utilization is greater than a first threshold, the cache is identified as uncacheable; if the CPU utilization is not greater than the first threshold, the cache is identified as cacheable. Alternatively, if the available bandwidth is greater than a second threshold, the cache is identified as uncacheable; if the available bandwidth is not greater than the second threshold, the cache is identified as cacheable.

[0094] S204, process the target resource based on the cache identifier.

[0095] In this embodiment, when the cache identifier is cacheable, the edge node sends the target resource to the client and caches the target resource; when the cache identifier is non-cacheable, the edge node sends the target resource to the client but does not cache the target resource.

[0096] In the aforementioned caching method, a first resource acquisition request is received, which requests a target resource from the edge node. The first resource acquisition request includes resource indication information for the target resource. If the resource indication information indicates that caching control should be implemented for the target resource, the local hardware resource configuration is obtained. Based on the local hardware resource configuration, a cache identifier for the target resource is determined. The cache identifier includes cacheable and non-cacheable types. The target resource is then processed according to the cache identifier. By determining whether to implement caching control for the target resource, the impact of business services on the processing resources of the edge node is reduced, and the utilization rate of the edge node's processing resources is improved. This achieves effects such as increasing single-machine service bandwidth, enabling more business services to be provided with fewer machine resources, and improving server utilization.

[0097] In one embodiment, an implementation of the above-described S203 is provided, wherein the local hardware resource configuration includes disk I / O utilization, such as... Figure 3 As shown, the above "determining the cache identifier of the target resource based on local hardware resource configuration" includes:

[0098] S301, if the disk I / O utilization is greater than the utilization threshold, the cache identifier is determined based on the access frequency of the target resource.

[0099] In this embodiment of the application, if the disk I / O utilization rate is greater than the utilization rate threshold, indicating that the processing performance of the edge node is close to the processing limit, the local historical read and write records are read to determine the access popularity of the target resource, and the target resource is determined to be a cold resource or a hot resource based on the access popularity of the target resource. When the target resource is a cold resource, the cache identifier is determined to be non-cacheable, and when the target resource is a hot resource, the cache identifier is determined to be cacheable.

[0100] Optionally, the minimum access frequency among the cached resources can be determined first. If the access frequency of the target resource is greater than or equal to the minimum access frequency, the target resource is determined to be a hot resource; if the access frequency of the target resource is less than the minimum access frequency, the target resource is determined to be a cold resource.

[0101] S302, if the disk I / O utilization is not greater than the utilization threshold, then the cache is identified as cacheable.

[0102] In this embodiment of the application, if the disk I / O utilization is not greater than the utilization threshold, indicating that the processing capacity of the edge node is not close to the load, the cache is identified as cacheable.

[0103] In the above-mentioned application embodiments, based on disk I / O utilization and the hot / cold status of resources, cache control decisions are made for missed resources to determine whether the target resource needs to be cached, thereby improving disk space utilization.

[0104] In one embodiment, such as Figure 4As shown, before determining the cache identifier based on the access popularity of the target resource, the method also includes:

[0105] S401, obtain the access popularity of the target resource.

[0106] The access popularity can be the total number of visits to the target resource, or the number of visits to the target resource within a preset time period.

[0107] In this embodiment of the application, the first acquisition request may include a resource identifier of the target resource, thereby obtaining the access popularity of the target resource from a local or third-party device based on the resource identifier.

[0108] Optionally, the edge node may include historical read and write records, so that the access popularity of the target resource can be obtained from the historical read and write records based on the resource identifier; or, the edge node may send each access record of the resource to a third-party device for storage, so that when it is necessary to obtain the access popularity of the target resource, an access popularity acquisition request is generated based on the resource identifier and sent to the third-party device to obtain the access popularity of the target resource.

[0109] The aforementioned "determining the cache identifier based on the access frequency of the target resource" includes:

[0110] S402, if the access popularity is greater than the popularity threshold, the cache identifier is determined to be cacheable.

[0111] S403 If the access popularity is not greater than the popularity threshold, the cache is identified as non-cacheable.

[0112] In this embodiment of the application, if the access popularity is greater than the popularity threshold, the target resource is a hot resource and the cache identifier is determined to be cacheable; if the access popularity is not greater than the popularity threshold, the target resource is a cold resource and the cache identifier is determined to be non-cacheable.

[0113] In the above application embodiments, cache control decisions are made for missed resources based on the heat threshold to determine whether the target resource needs to be cached, thereby improving the disk space utilization.

[0114] In one embodiment, one implementation of the above S401 is provided, such as... Figure 5 As shown, the above "obtaining the access popularity of the target resource" includes:

[0115] S501, read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue to be cached.

[0116] The queue to be cached can be a Uniform Resource Locator (URL) queue.

[0117] S502, if the resource identifier of the target resource is in the cache queue, then update the access frequency of the target resource based on the access frequency in the cache queue, and determine the access popularity of the target resource based on the access frequency.

[0118] In this embodiment, the cache queue is read locally, and it is determined whether the target resource's resource identifier exists in the cache queue. If the cache queue includes the target resource's resource identifier, the access count is updated based on the access count of the target resource in the cache queue, i.e., incremented by one. Further, the access count can be determined as the access popularity of the target resource.

[0119] Optional, such as Figure 6 As shown, the above caching method also includes:

[0120] S503 If the resource identifier of the target resource is not in the cache queue, then add the resource identifier of the target resource to the cache queue.

[0121] S504, Update the access count of the target resource in the cache queue.

[0122] In this embodiment of the application, if the resource identifier of the target resource is not included in the queue to be cached, the resource identifier of the target resource is added to the queue to be cached, and the corresponding access count is incremented by one.

[0123] In the above application embodiments, the access popularity of the target resource is determined based on the queue to be cached, which improves the accuracy and reliability of the access popularity.

[0124] In one embodiment, one implementation of the above-described S203 is provided, wherein the local hardware resource configuration includes disk I / O utilization and remaining cache space, such as... Figure 7 As shown, the above "determining the cache identifier of the target resource based on local hardware resource configuration" includes:

[0125] S601 determines whether the disk I / O utilization is greater than the utilization threshold.

[0126] S602, if the disk I / O utilization rate is greater than the utilization threshold, then the cache identifier of the target resource is determined based on the remaining cache space and the space threshold.

[0127] S603: If the disk I / O utilization is less than the utilization threshold, then the cache is identified as cacheable.

[0128] In this embodiment, if the disk I / O utilization rate is greater than the utilization threshold, indicating that the processing performance of the edge node is approaching its processing limit, the local historical read / write records are read to determine the access frequency of the target resource, and the cache identifier of the target resource is determined based on the remaining cache space and the space threshold. If the remaining cache space is greater than the space threshold, the cache identifier is determined to be cacheable; if the remaining cache space is not greater than the space threshold, the cache identifier is determined to be non-cacheable.

[0129] In this embodiment of the application, if the disk I / O utilization is not greater than the utilization threshold, indicating that the processing capacity of the edge node is not close to the load, the cache is identified as cacheable.

[0130] In the above-mentioned application embodiments, the accuracy of cache identification is improved by using both disk I / O utilization and remaining cache space for dual determination.

[0131] In one embodiment, one implementation of the above-described S204 is provided, such as... Figure 8 As shown, the above "processing target resources based on cache identifiers" includes:

[0132] S701, acquire the target resource.

[0133] In this embodiment, edge nodes can obtain target resources from parent nodes or source nodes. For example, if the parent node caches the target resource, the edge node can request the target resource from the floating layer nodes.

[0134] Optional, such as Figure 9 As shown, the above "acquiring the target resource" includes:

[0135] S801, request the target resource from the parent node based on the first resource acquisition request.

[0136] S802, Receive the target resource sent by the parent node; the target resource is obtained by the parent node from the source node.

[0137] In this embodiment of the application, the edge node generates a second resource acquisition request based on the first resource acquisition request and sends the second resource acquisition request to the parent node to request the target resource. The parent node generates a third resource acquisition request based on the second resource acquisition request and sends the third resource acquisition request to the source node. In response to the third resource acquisition request, the source node sends the target resource to the parent node, and the parent node sends the target resource to the edge node.

[0138] S702 processes the target resource based on the data volume and cache identifier of the target resource.

[0139] In this embodiment, after acquiring the target resource, the data size corresponding to the target resource is determined, and the cache identifier is updated according to the data size of the target resource to obtain the updated cache identifier. Further, when the updated cache identifier indicates that the target resource is cacheable, the target resource is cached and sent to the client; when the updated cache identifier indicates that the target resource is not cacheable, the target resource is not cached and sent to the client.

[0140] For example, if the cache is marked as non-cacheable, the target resource is not cached after being obtained, and the target resource is sent directly to the client; if the cache is marked as cacheable, the target resource is cached after being obtained, and the data volume is less than the data volume threshold, and the target resource is sent to the client.

[0141] Optional, such as Figure 10 As shown, the above-mentioned S702 "processing the target resource according to the data volume and cache identifier of the target resource" includes:

[0142] S901: If the cache is marked as cacheable, then cache the target resource.

[0143] S902, if the cache is marked as non-cached, then the target resource is cached when the data volume of the target resource is within the preset data volume range.

[0144] In this embodiment of the application, if the cache identifier is cacheable, the target resource is cached and sent to the client after the target resource is obtained; if the cache identifier is non-cacheable, the target resource is cached and sent to the client when the data volume of the target resource is within a preset data volume range; if the cache identifier is non-cacheable, the target resource is not cached and is sent directly to the client when the data volume of the target resource is not within the preset data volume range.

[0145] Optionally, when the cache is marked as non-cacheable and the data volume is less than the data volume threshold, the target resource can be cached and sent to the client.

[0146] In the above application embodiments, the cache identifier is updated according to the data volume of the target resource, making the determined cache identifier more accurate, further determining the caching necessity of the target resource, thereby improving the device utilization of the edge node.

[0147] In one embodiment, resource indication information includes: a domain name; such as Figure 11 As shown, after receiving the first resource acquisition request, and when the resource indication information indicates that caching control should be performed on the target resource, before acquiring the local hardware resource configuration and the access frequency of the target resource, the above caching method further includes:

[0148] S205, obtain the status identifier corresponding to the cache control function stored for the domain name.

[0149] S206, when the status indicator indicates that the control function is enabled, determine that cache control is performed on the target resource.

[0150] S207: When the status indicator indicates that the control function is off, the target resource is obtained and the target resource is cached directly.

[0151] In this embodiment of the application, the configuration of the corresponding domain name, i.e. the status identifier, is checked to determine whether the function of enabling cache control based on the resource file suffix is ​​available. If not, the target resource is obtained and the target resource is cached directly.

[0152] Optionally, if the function of enabling cache control based on the resource file extension is not enabled, the resource identifier of the target resource, i.e., the cache key, can be determined based on the Uniform Resource Identifier (URI) of the target resource. If the cache key exists in the URL, the access count corresponding to the target resource is incremented by one, and it is determined whether the current access count is greater than the cache count threshold. If it is not greater, the cache key is determined to be non-cacheable. If the cache key does not exist in the URL, the current cache key is added to the URL queue, and the cached resource of the target resource is recorded as non-cacheable.

[0153] In the above application embodiments, the target resource is pre-judged based on the status identifier corresponding to the domain name. When the status identifier indicates that the control function is off, the target resource is obtained and directly cached without further judgment on whether the target resource needs to be cached, thereby improving caching efficiency.

[0154] In one embodiment, such as Figure 12 As shown, the above caching method also includes:

[0155] S1001, obtain the target number of accesses to the target resource within a preset time period.

[0156] S1002, If the target access count is less than the access count threshold, then delete the target resource.

[0157] In this embodiment, files containing historical access records or URL queues stored locally are read, and the target access count corresponding to the target resource is extracted according to a preset time period. For example, the access count of the target resource in the most recent 1 second can be extracted as the target access count. Further, it is determined whether the target access count is less than an access count threshold. If the target access count is less than the access count threshold, it is determined that the access popularity of the target resource has been low in the recent period, and the target resource can be deleted from the local storage.

[0158] In the above application embodiments, when the target access count is less than the access count threshold, the target resource is deleted from the local storage, thereby saving local storage space.

[0159] In one embodiment, a complete caching method is provided, including:

[0160] S1, Receive a first resource acquisition request. The first resource acquisition request is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0161] S2, when the resource indication information indicates that the target resource should be cached, obtain the local hardware resource configuration.

[0162] S3. If the disk I / O utilization is greater than the utilization threshold, then execute S4-S7.

[0163] S4, read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue to be cached.

[0164] S5. If the resource identifier of the target resource is in the cache queue, update the access frequency of the target resource based on the access frequency in the cache queue, and determine the access popularity of the target resource based on the access frequency.

[0165] S6. If the resource identifier of the target resource is not in the cache queue, add the resource identifier of the target resource to the cache queue; update the access count of the target resource in the cache queue.

[0166] S7. If the access popularity is greater than the popularity threshold, the cache is identified as cacheable; if the access popularity is not greater than the popularity threshold, the cache is identified as non-cacheable.

[0167] S8. If the disk I / O utilization is not greater than the utilization threshold, then the cache is identified as cacheable.

[0168] S9, request the target resource from the parent node based on the first resource acquisition request.

[0169] S10, Receive the target resource sent by the parent node; the target resource is obtained by the parent node from the source node.

[0170] S11 If the cache is marked as cacheable, then cache the target resource; if the cache is marked as non-cacheable, then cache the target resource if the data volume of the target resource is within the preset data volume range.

[0171] In the aforementioned caching method, a first resource acquisition request is received, which requests a target resource from the edge node. The first resource acquisition request includes resource indication information for the target resource. If the resource indication information indicates that caching control should be implemented for the target resource, the local hardware resource configuration is obtained. Based on the local hardware resource configuration, a cache identifier for the target resource is determined. The cache identifier includes cacheable and non-cacheable types. The target resource is then processed according to the cache identifier. By determining whether to implement caching control for the target resource, the impact of business services on the processing resources of the edge node is reduced, and the utilization rate of the edge node's processing resources is improved. This achieves effects such as increasing single-machine service bandwidth, enabling more business services to be provided with fewer machine resources, and improving server utilization.

[0172] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0173] Based on the same inventive concept, this application also provides a caching device for implementing the caching method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more caching device embodiments provided below can be found in the limitations of the caching method described above, and will not be repeated here.

[0174] In one embodiment, such as Figure 13 As shown, a caching device is provided, including: a receiving module 10, an acquiring module 11, a determining module 12, and a caching module 13, wherein:

[0175] The receiving module 10 is used to receive a first resource acquisition request, which is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0176] The acquisition module 11 is used to acquire the local hardware resource configuration when the resource indication information indicates that the target resource is subject to caching control.

[0177] The determination module 12 is used to determine the cache identifier of the target resource based on the local hardware resource configuration; the cache identifier includes cacheable and non-cacheable.

[0178] Cache module 13 is used to process target resources based on cache identifiers.

[0179] In one embodiment, the determining module 12 includes: a first determining unit and a second determining unit, wherein:

[0180] The first determining unit is used to determine the cache identifier based on the access frequency of the target resource when the disk I / O utilization is greater than the utilization threshold.

[0181] The second determining unit is used to determine that the cache identifier is cacheable when the disk I / O utilization is not greater than the utilization threshold.

[0182] In one embodiment, the determining module 12 further includes an acquisition unit for acquiring the access popularity of the target resource.

[0183] The first determining unit is specifically used to determine that the cache identifier is cacheable when the access popularity is greater than the popularity threshold, and to determine that the cache identifier is not cacheable when the access popularity is not greater than the popularity threshold.

[0184] In one embodiment, the aforementioned acquisition unit is specifically used to read the queue to be cached and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue; if the resource identifier of the target resource is in the queue, then update the access frequency of the target resource based on the access frequency and determine the access popularity of the target resource based on the access frequency.

[0185] In one embodiment, the aforementioned acquisition unit is specifically used to add the resource identifier of the target resource to the cache queue when the resource identifier of the target resource is not in the cache queue; and to update the access count of the target resource in the cache queue.

[0186] In one embodiment, the above-mentioned caching device further includes: a second determining module, a third determining module, and a fourth determining module, wherein:

[0187] The second determination module is used to determine whether the disk I / O utilization rate is greater than the utilization threshold.

[0188] The third determination module is used to determine the cache identifier of the target resource based on the remaining cache space and the space threshold when the disk I / O utilization is greater than the utilization threshold.

[0189] The fourth determination module is used to determine whether a cache is cacheable when the disk I / O utilization is less than the utilization threshold.

[0190] In one embodiment, the processing module 13 includes: an acquisition unit and a processing unit, wherein:

[0191] The acquisition unit is used to acquire the target resource.

[0192] The processing unit is used to process the target resource based on the data volume and cache identifier of the target resource.

[0193] In one embodiment, the processing unit is specifically used to cache the target resource when the cache is identified as cacheable, and to cache the target resource when the cache is identified as non-cacheable and the amount of data in the target resource is within a preset data range.

[0194] In one embodiment, the aforementioned acquisition unit is specifically configured to request a target resource from the parent node according to the first resource acquisition request; receive the target resource sent by the parent node; and the target resource is obtained by the parent node from the source node.

[0195] In one embodiment, the above-mentioned caching device further includes: a second acquisition module, a fifth determination module, and a caching module, wherein:

[0196] The second acquisition module is used to acquire the status identifier corresponding to the cache control function stored for the domain name.

[0197] The fifth determination module is used to determine whether to perform cache control on the target resource when the status indicator indicates that the control function is enabled.

[0198] The caching module is used to retrieve the target resource and cache it directly when the status indicator indicates that the control function is off.

[0199] In one embodiment, the above-mentioned caching device further includes: a third acquisition module and a deletion module, wherein:

[0200] The third acquisition module is used to acquire the target number of accesses to the target resource within a preset time period.

[0201] The delete module is used to delete a target resource if the number of accesses to the target resource is less than the access threshold.

[0202] Each module in the aforementioned cache device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0203] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores cached data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a caching method.

[0204] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0205] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0206] Receive a first resource acquisition request. The first resource acquisition request is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0207] When the resource indication information indicates that the target resource should be cached, obtain the local hardware resource configuration;

[0208] Based on local hardware resource configuration, determine the cache identifier of the target resource; the cache identifier includes cacheable and non-cacheable.

[0209] Process the target resource based on the cache identifier.

[0210] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0211] If disk I / O utilization exceeds the utilization threshold, the cache identifier is determined based on the access frequency of the target resource.

[0212] If the disk I / O utilization is not greater than the utilization threshold, then the cache is identified as cacheable.

[0213] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0214] Obtain the access popularity of the target resource;

[0215] The cache identifier is determined based on the access frequency of the target resource, including:

[0216] If the access popularity exceeds the popularity threshold, the cache is identified as cacheable.

[0217] If the access frequency is not greater than the frequency threshold, the cache is marked as non-cacheable.

[0218] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0219] Read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue;

[0220] If the resource identifier of the target resource is in the cache queue, then update the access frequency of the target resource based on the access frequency in the cache queue, and determine the access frequency of the target resource based on the access frequency.

[0221] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0222] If the resource identifier of the target resource is not in the cache queue, then add the resource identifier of the target resource to the cache queue.

[0223] Update the access count of the target resource in the cache queue.

[0224] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0225] Determine if disk I / O utilization exceeds the utilization threshold;

[0226] If the disk I / O utilization is greater than the utilization threshold, the cache identifier of the target resource is determined based on the remaining cache space and the space threshold.

[0227] If disk I / O utilization is less than the utilization threshold, the cache is identified as cacheable.

[0228] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0229] Acquire the target resource;

[0230] The target resource is processed based on its data volume and cache identifier.

[0231] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0232] If the cache is marked as cacheable, then cache the target resource;

[0233] If the cache is marked as non-cached, the target resource will be cached if the amount of data in the target resource is within the preset data range.

[0234] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0235] Request the target resource from the parent node based on the first resource acquisition request;

[0236] Receive the target resource sent by the parent node; the target resource is obtained by the parent node from the source node.

[0237] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0238] Get the status flag of the cache control function corresponding to the domain name;

[0239] When the status indicator indicates that the control function is enabled, it is determined that caching control is performed on the target resource;

[0240] When the status indicator indicates that the control function is off, the target resource is obtained and the target resource is cached directly.

[0241] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0242] Get the target number of accesses to the target resource within a preset time period;

[0243] If the target access count is less than the access count threshold, then the target resource is deleted.

[0244] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0245] Receive a first resource acquisition request. The first resource acquisition request is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0246] When the resource indication information indicates that the target resource should be cached, obtain the local hardware resource configuration;

[0247] Based on local hardware resource configuration, determine the cache identifier of the target resource; the cache identifier includes cacheable and non-cacheable.

[0248] Process the target resource based on the cache identifier.

[0249] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0250] If disk I / O utilization exceeds the utilization threshold, the cache identifier is determined based on the access frequency of the target resource.

[0251] If the disk I / O utilization is not greater than the utilization threshold, then the cache is identified as cacheable.

[0252] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0253] Obtain the access popularity of the target resource;

[0254] The cache identifier is determined based on the access frequency of the target resource, including:

[0255] If the access popularity exceeds the popularity threshold, the cache is identified as cacheable.

[0256] If the access frequency is not greater than the frequency threshold, the cache is marked as non-cacheable.

[0257] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0258] Read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue;

[0259] If the resource identifier of the target resource is in the cache queue, then update the access frequency of the target resource based on the access frequency in the cache queue, and determine the access frequency of the target resource based on the access frequency.

[0260] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0261] If the resource identifier of the target resource is not in the cache queue, then add the resource identifier of the target resource to the cache queue.

[0262] Update the access count of the target resource in the cache queue.

[0263] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0264] Determine if disk I / O utilization exceeds the utilization threshold;

[0265] If the disk I / O utilization is greater than the utilization threshold, the cache identifier of the target resource is determined based on the remaining cache space and the space threshold.

[0266] If disk I / O utilization is less than the utilization threshold, the cache is identified as cacheable.

[0267] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0268] Acquire the target resource;

[0269] The target resource is processed based on its data volume and cache identifier.

[0270] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0271] If the cache is marked as cacheable, then cache the target resource;

[0272] If the cache is marked as non-cached, the target resource will be cached if the amount of data in the target resource is within the preset data range.

[0273] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0274] Request the target resource from the parent node based on the first resource acquisition request;

[0275] Receive the target resource sent by the parent node; the target resource is obtained by the parent node from the source node.

[0276] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0277] Get the status flag of the cache control function corresponding to the domain name;

[0278] When the status indicator indicates that the control function is enabled, it is determined that caching control is performed on the target resource;

[0279] When the status indicator indicates that the control function is off, the target resource is obtained and the target resource is cached directly.

[0280] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0281] Get the target number of accesses to the target resource within a preset time period;

[0282] If the target access count is less than the access count threshold, then the target resource is deleted.

[0283] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0284] Receive a first resource acquisition request. The first resource acquisition request is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource.

[0285] When the resource indication information indicates that the target resource should be cached, obtain the local hardware resource configuration;

[0286] Based on local hardware resource configuration, determine the cache identifier of the target resource; the cache identifier includes cacheable and non-cacheable.

[0287] Process the target resource based on the cache identifier.

[0288] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0289] If disk I / O utilization exceeds the utilization threshold, the cache identifier is determined based on the access frequency of the target resource.

[0290] If the disk I / O utilization is not greater than the utilization threshold, then the cache is identified as cacheable.

[0291] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0292] Obtain the access popularity of the target resource;

[0293] The cache identifier is determined based on the access frequency of the target resource, including:

[0294] If the access popularity exceeds the popularity threshold, the cache is identified as cacheable.

[0295] If the access frequency is not greater than the frequency threshold, the cache is marked as non-cacheable.

[0296] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0297] Read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue;

[0298] If the resource identifier of the target resource is in the cache queue, then update the access frequency of the target resource based on the access frequency in the cache queue, and determine the access frequency of the target resource based on the access frequency.

[0299] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0300] If the resource identifier of the target resource is not in the cache queue, then add the resource identifier of the target resource to the cache queue.

[0301] Update the access count of the target resource in the cache queue.

[0302] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0303] Determine if disk I / O utilization exceeds the utilization threshold;

[0304] If the disk I / O utilization is greater than the utilization threshold, the cache identifier of the target resource is determined based on the remaining cache space and the space threshold.

[0305] If disk I / O utilization is less than the utilization threshold, the cache is identified as cacheable.

[0306] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0307] Acquire the target resource;

[0308] The target resource is processed based on its data volume and cache identifier.

[0309] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0310] If the cache is marked as cacheable, then cache the target resource;

[0311] If the cache is marked as non-cached, the target resource will be cached if the amount of data in the target resource is within the preset data range.

[0312] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0313] Request the target resource from the parent node based on the first resource acquisition request;

[0314] Receive the target resource sent by the parent node; the target resource is obtained by the parent node from the source node.

[0315] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0316] Get the status flag of the cache control function corresponding to the domain name;

[0317] When the status indicator indicates that the control function is enabled, it is determined that caching control is performed on the target resource;

[0318] When the status indicator indicates that the control function is off, the target resource is obtained and the target resource is cached directly.

[0319] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0320] Get the target number of accesses to the target resource within a preset time period;

[0321] If the target access count is less than the access count threshold, then the target resource is deleted.

[0322] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0323] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0324] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A caching method, characterized in that, The method is applied to edge nodes of a content delivery network, and the method includes: Receive a first resource acquisition request, the first resource acquisition request is used to request a target resource from the edge node, and the first resource acquisition request includes resource indication information of the target resource; When the resource indication information indicates that caching control should be performed on the target resource, the local hardware resource configuration is obtained; Based on the local hardware resource configuration, a cache identifier for the target resource is determined; the cache identifier includes cacheable and non-cacheable identifiers. The target resource is processed according to the cache identifier.

2. The method according to claim 1, characterized in that, The local hardware resource configuration includes disk I / O utilization, and determining the cache identifier of the target resource based on the local hardware resource configuration includes: If the disk I / O utilization is greater than the utilization threshold, the cache identifier is determined based on the access frequency of the target resource; If the disk I / O utilization is not greater than the utilization threshold, then the cache identifier is determined to be cacheable.

3. The method according to claim 2, characterized in that, Before determining the cache identifier based on the access frequency of the target resource, the method further includes: Obtain the access popularity of the target resource; Determining the cache identifier based on the access frequency of the target resource includes: If the access popularity is greater than the popularity threshold, the cache identifier is determined to be cacheable; If the access popularity is not greater than the popularity threshold, the cache identifier is determined to be non-cacheable.

4. The method according to claim 3, characterized in that, The process of obtaining the access popularity of the target resource includes: Read the queue to be cached, and determine whether the resource identifier of the target resource is in the queue based on the resource identifier in the queue to be cached; If the resource identifier of the target resource is in the cache queue, then update the access count of the target resource in the cache queue, and determine the access popularity of the target resource based on the access count.

5. The method according to claim 4, characterized in that, The method further includes: If the resource identifier of the target resource is not in the cache queue, then add the resource identifier of the target resource to the cache queue. Update the access count of the target resource in the queue to be cached.

6. The method according to claim 1, characterized in that, The local hardware resource configuration includes disk I / O utilization and remaining cache space. Determining the cache identifier of the target resource based on the local hardware resource configuration includes: Determine whether the disk I / O utilization is greater than the utilization threshold; If the disk I / O utilization is greater than the utilization threshold, then the cache identifier of the target resource is determined based on the remaining cache space and the space threshold. If the disk I / O utilization is less than the utilization threshold, then the cache identifier is determined to be cacheable.

7. The method according to claim 1, characterized in that, The step of processing the target resource according to the cache identifier includes: Obtain the target resource; The target resource is processed based on the data volume of the target resource and the cache identifier.

8. The method according to claim 7, characterized in that, The step of processing the target resource based on the data volume of the target resource and the cache identifier includes: If the cache identifier is cacheable, then the target resource is cached; If the cache identifier is not cacheable, then the target resource is cached when the data volume of the target resource is within a preset data volume range.

9. The method according to claim 7, characterized in that, The acquisition of the target resource includes: Request the target resource from the parent node according to the first resource acquisition request; The target resource is received by the parent node from the source node.

10. The method according to claim 1, characterized in that, The resource indication information includes: a domain name; after receiving the first resource acquisition request, and before acquiring the local hardware resource configuration and the access popularity of the target resource when the resource indication information indicates that caching control is performed on the target resource, the method further includes: Obtain the status identifier corresponding to the cache control function stored for the domain name; When the status indicator control function is enabled, it is determined that cache control is performed on the target resource; When the status indicator indicates that the control function is off, the target resource is acquired and the target resource is cached directly.

11. The method according to any one of claims 1-10, characterized in that, The method further includes: Obtain the target number of accesses to the target resource within a preset time period; If the target access count is less than the access count threshold, then the target resource is deleted.

12. A buffer device, characterized in that, The device includes: The receiving module is used to receive a first resource acquisition request, which is used to request a target resource from the edge node. The first resource acquisition request includes resource indication information of the target resource. The acquisition module is used to acquire local hardware resource configuration when the resource indication information indicates that the target resource is subject to caching control; The determination module is used to determine the cache identifier of the target resource based on the local hardware resource configuration; the cache identifier includes cacheable and non-cacheable. A caching module is used to process the target resource according to the cache identifier.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.