Cache system optimization method and device, optimization equipment, program product and medium

By using Count-Min Sketch and a deep Q-network model, the number of data object replicas and cache capacity of the caching system are dynamically adjusted, which solves the problems of high monitoring overhead and resource waste in the caching system and achieves efficient resource utilization and improved service quality.

CN121614416APending Publication Date: 2026-03-06CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511742606.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing caching system optimization solutions suffer from high monitoring overhead, wasted caching resources, and difficulty in balancing service quality and resource utilization.

Method used

A lightweight Count-Min Sketch data structure is used to count access frequency. The number of replicas of data objects is dynamically adjusted by calculating the access change rate. In addition, a deep Q-network model is used to optimize cache capacity, so as to achieve precise resource adjustment.

Benefits of technology

It reduces monitoring overhead, saves memory space, improves cache resource utilization efficiency, and enhances service quality and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121614416A_ABST
    Figure CN121614416A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cache system optimization method and device, optimization equipment, a program product and a medium, and is applied to the technical field of cloud computing and big data. The method comprises the steps that based on a counting minimum sketch CMS data structure, a first access frequency and a second access frequency corresponding to a target data object are obtained, the first access frequency is an estimated value of the access frequency of the target data object in a first time period, and the second access frequency is an estimated value of the access frequency of the target data object in a second time period; the second access frequency is an estimated value of the access frequency of the target data object in a second time period, the first time period and the second time period are directly linked in the time dimension, and the first time period is later than the second time period; determining an access change rate corresponding to the target data object according to the first access times and the second access times; and adjusting the number of copies of the target data object according to the access change rate. By adopting the method, the problems of high monitoring overhead and cache resource waste in a cache system optimization scheme in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of cloud computing and big data technology, and in particular to a method, apparatus, optimization device, program product and medium for optimizing a caching system. Background Technology

[0002] Distributed caching systems typically utilize compute node memory resources or cloud disks to cache data, but the cache capacity and number of data replicas need to be dynamically adjusted: too small a cache capacity can easily lead to a decrease in cache hit rate and cache jitter affecting service quality; too large a cache capacity will waste memory resources; too few data replicas can easily cause I / O (input / output) bottlenecks, while too many will cause resource waste.

[0003] However, existing caching system optimization solutions suffer from problems such as high monitoring overhead, wasted caching resources, and difficulty in balancing service quality and resource utilization. Summary of the Invention

[0004] The purpose of this application is to provide a caching system optimization method, apparatus, optimization device, program product and medium to solve the problems of high monitoring overhead and wasted cache resources in existing caching system optimization schemes.

[0005] One embodiment of this application provides a caching system optimization method, the method comprising: Based on the Count-Min Sketch (CMS) data structure, the first access count and the second access count corresponding to the target data object are obtained. The first access count is the estimated number of times the target data object is accessed in the first time period, and the second access count is the estimated number of times the target data object is accessed in the second time period. The first time period and the second time period are directly connected in the time dimension, and the first time period is later than the second time period. Based on the first number of visits and the second number of visits, determine the access change rate corresponding to the target data object; The number of copies of the target data object is adjusted based on the access change rate.

[0006] Optionally, the method of obtaining the first access count and the second access count corresponding to the target data object based on the minimum count sketch CMS data structure includes: The target access count corresponding to the target data object is obtained from the CMS data structure, wherein the CMS data structure includes a first CMS data structure and a second CMS data structure, the time window length of the first CMS data structure is twice the time window length of the second CMS data structure, and the target access count includes: a first target access count obtained from the first CMS data structure, and a second target access count obtained from the second CMS data structure; The first target number of visits is determined as the first number of visits, and the difference between the first target number of visits and the second target number of visits is determined as the second number of visits.

[0007] Optionally, the CMS data structure is a two-dimensional array with k rows and m columns, where each row corresponds to a hash function, and each array element includes a field for the first access count of the current time window and a field for the second access count of the previous time window, where k and m are both positive integers; The step of obtaining the target access count corresponding to the target data object from the CMS data structure includes: The target data object is hashed using k hash functions to obtain k hash values; The k hash values ​​are each modulo m to obtain the k target array elements corresponding to the target data object; Obtain the target value corresponding to each of the target array elements, wherein the target value is equal to the sum of the values ​​of the first access count field and the second access count field in the target array element; From the target values ​​corresponding to the k target array elements, select the smallest value as the target access count corresponding to the target data object.

[0008] Optionally, adjusting the number of replicas of the target data object based on the access change rate includes at least one of the following: If the access change rate is greater than the expansion threshold, increase the number of replicas of the target data object; If the access change rate is less than the shrinkage threshold, reduce the number of copies of the target data object.

[0009] Optionally, increasing the number of replicas of the target data object includes: The upper bound of the number of replicas of the target data object is determined based on the available bandwidth of each cache node in the cache cluster. Based on the upper bound and the preset step size, determine the number of new copies n required for the target data object, where n is a positive integer; Based on the resource information corresponding to each cache node, a score value corresponding to each cache node is determined. The resource information includes at least one of available computing resources, available memory resources, and available bandwidth resources. Based on the number of newly added replicas and the score value, n target cache nodes are determined; A copy of the target data object is added to each of the n target cache nodes.

[0010] Optionally, determining the upper bound of the number of replicas of the target data object based on the available bandwidth of each cache node in the cache cluster includes: Obtain the total available bandwidth of the cache cluster and the number of workload nodes concurrently accessing the target data object; Based on the total available bandwidth and the number of nodes, calculate the average bandwidth allocation for each workload node; The total number of workload nodes that meet the target condition is determined as the upper bound of the number of replicas of the target data object, wherein the target condition is that the available bandwidth of the workload node is greater than or equal to the average bandwidth allocation.

[0011] Optionally, the method further includes: Based on business metrics and resource metrics, a state space and reward function are defined. The business metrics reflect the service quality of the upper-layer application load, and the resource metrics reflect the state and resource utilization of the cache cluster. Based on the Deep Q-Network (DQN) model, the scaling factor of the cache capacity of the cache cluster is determined according to the state space and reward function; The number of worker processes in the cache cluster is adjusted according to the scaling rate.

[0012] One embodiment of this application also provides a cache system optimization apparatus, the apparatus comprising: The information acquisition module is used to acquire the first access count and the second access count of the target data object based on the count minimum sketch CMS data structure. The first access count is the estimated number of times the target data object is accessed in a first time period, and the second access count is the estimated number of times the target data object is accessed in a second time period. The first time period and the second time period are directly connected in the time dimension, and the first time period is later than the second time period. The first processing module is used to determine the access change rate corresponding to the target data object based on the first access count and the second access count; The replica adjustment module is used to adjust the number of replicas of the target data object according to the access change rate.

[0013] One embodiment of this application also provides an optimization device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the cache system optimization method as described in any of the preceding claims.

[0014] One embodiment of this application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the cache system optimization method as described in any of the preceding claims.

[0015] One embodiment of this application also provides a readable storage medium, wherein a program is stored on the readable storage medium, and when the program is executed by a processor, it implements the steps in the cache system optimization method as described in any of the preceding claims.

[0016] At least one of the above-mentioned technical solutions of this application has the following beneficial effects: In the caching system optimization method of this application embodiment, a lightweight CMS data structure is adopted, which saves a lot of memory space and reduces monitoring overhead while ensuring the accuracy of frequency statistics as much as possible; by calculating the access change rate of the target data object, the number of data object replicas is accurately and dynamically adjusted, thereby improving resource utilization efficiency. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a caching system optimization method according to one embodiment of this application; Figure 2 This is a schematic diagram of the Count-Min Sketch structure of one embodiment of this application; Figure 3 This is a schematic diagram of a data object replication factor adjustment algorithm according to one embodiment of this application; Figure 4 This is a schematic diagram illustrating a model of multiple workloads concurrently reading data objects from a cache node, according to one embodiment of this application. Figure 5 This is an overall flowchart of a caching system optimization method according to one embodiment of this application; Figure 6 This is a schematic diagram of the structure of a cache system optimization device according to one embodiment of this application. Detailed Implementation

[0018] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, and the number of objects is not limited; for example, the first object can be one or more.

[0019] In various embodiments of the present invention, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0020] In the embodiments of this application, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0021] It should be understood that "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0022] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0023] In addition, the terms "system" and "network" are often used interchangeably in this article.

[0024] Related technical introduction: Cloud-native technology is a technical system for building, deploying, and maintaining applications in a cloud environment, offering advantages such as convenient deployment, efficient operation and maintenance, and cost-effectiveness. Common technologies include containerization, container orchestration, and service mesh. Containerization, represented by Docker, provides a lightweight virtualization technology that generates images of applications, configuration dependencies, etc., and runs them as containers on different platforms, thus achieving program portability. Container orchestration technology can manage and coordinate multiple containers. Kubernetes, for example, provides automated deployment, automatic fault recovery, and automatic scaling for different resource objects.

[0025] Storage-compute separation architecture is a common design pattern in cloud-native scenarios, where application computing and data storage are performed by separate storage and compute clusters. The advantage of this architecture is that storage and compute resources can be scaled independently, solving the problem of resource binding and scaling when physical resources are insufficient. This not only saves on usage costs but also improves the flexibility of system expansion. However, in a storage-compute separation architecture, the compute clusters and storage services may be located in different network environments, and data is often stored in remote storage systems. Cross-network data transmission may not meet the needs of latency-sensitive services.

[0026] To alleviate the high latency issue of data reads in compute node memory resources or cloud disks, data is typically cached. For example, distributed caching systems like Alluxio cache data in blocks, with each data block cached using multiple replicas. This system provides interfaces to configure the number of replicas of all files in a file or directory, as well as the cache capacity of each node.

[0027] Changing workloads place different demands on the configuration of distributed caching systems. Here, we mainly introduce two key configurations: the number of data replicas and the cache capacity.

[0028] First, the number of data object replicas affects the aggregate bandwidth provided by the distributed cache. Generally, the number of replicas is set by system default or statically by the user. If too few replicas are set for hot data, it can easily cause a bottleneck in data read access on the node where the data resides. Especially under high data access concurrency, a single replica setting can lead to I / O bottlenecks on a single node, thus affecting the execution performance of upper-layer jobs. If too many replicas are set for hot data, it will result in improper resource allocation and waste of resources.

[0029] Secondly, the cache capacity of the distributed cache determines the cache hit rate of the upper-layer workload accessing the data. If the cache capacity is set too small, it will not only lead to a decrease in the cache hit rate, but also may cause cache thrashing in high-traffic scenarios, affecting the service quality of the upper-layer workload; if the cache capacity is set too large, it will also consume too much server memory resources, resulting in resource waste.

[0030] Therefore, in scenarios involving changes in data access and sudden changes in traffic, it is necessary to adjust the number of cached data replicas and cache capacity in a timely manner as needed. This ensures that the maximum aggregate bandwidth is provided with the least amount of storage resources, thereby guaranteeing the read speed of upper-layer application loads. It also allows for precise adjustment of cache capacity to ensure a high cache hit rate, ultimately achieving the goal of improving resource utilization while enhancing the service quality of upper-layer workloads.

[0031] However, existing caching system optimization schemes still have the following problems: (1) Threshold-based response adjustment methods usually require an additional monitoring system to record and update the indicators in real time. Especially in the case of large amounts of data, the memory overhead of the monitoring system is very high, making it difficult to achieve a balance between statistical accuracy and space efficiency.

[0032] (2) Existing replica count adjustment techniques built on distributed caches are basically implemented through the elastic scaling capabilities of Kubernetes, and the setting of metrics, thresholds, and adjustment steps heavily relies on expert experience. While overly conservative scaling strategies can provide higher aggregate bandwidth and shorten read latency for upper-layer data-intensive application loads, they may lead to a waste of distributed cache resources.

[0033] (3) It is difficult to balance the relationship between storage resource utilization and service quality. For example, the reactive cache adjustment method based on preset thresholds is heuristic and has a certain degree of randomness; the prediction method based on machine learning usually predicts the future cache read rate and cache write rate, and then guides the reactive cache adjustment method, focusing only on service quality; the existing reinforcement learning-based methods also ignore the consideration of cache resource utilization.

[0034] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0035] This application addresses the problems of high monitoring overhead and wasted cache resources in existing cache system optimization schemes by providing a cache system optimization method, apparatus, optimization equipment, program product, and medium.

[0036] like Figure 1 As shown, one embodiment of this application provides a caching system optimization method, the method comprising: Step 101: Based on the minimum count sketch CMS data structure, obtain the first access count and the second access count corresponding to the target data object. The first access count is the estimated number of times the target data object is accessed in the first time period, and the second access count is the estimated number of times the target data object is accessed in the second time period. The first time period and the second time period are directly connected in the time dimension, and the first time period is later than the second time period.

[0037] It should be noted that, in order to solve the problem of high memory overhead caused by monitoring systems in scenarios with large amounts of data, this embodiment of the invention uses the Count-Min Sketch data structure (also known as the CMS data structure or the Count-Min summary data structure), a lightweight probabilistic data structure, to record and count the access frequency (i.e., the number of times) of a large number of data objects. While ensuring the accuracy of frequency statistics, it can also save a lot of memory space, and the memory overhead it introduces is basically negligible.

[0038] Step 102: Determine the access change rate corresponding to the target data object based on the first access count and the second access count.

[0039] In some optional examples, the rate of change of visits is the ratio of the first number of visits to the second number of visits.

[0040] Step 103: Adjust the number of replicas of the target data object according to the access change rate.

[0041] In this embodiment, the lightweight data structure CMS is used to count the access frequency of a large number of data objects. While ensuring the accuracy of the frequency count as much as possible, a large amount of memory space is saved, and the introduced memory overhead is negligible, thus achieving space efficiency in access count statistics. By calculating the access change rate of the target data object, the number of data object replicas is accurately and dynamically adjusted, effectively improving the utilization efficiency of cache resources.

[0042] Here, we will further explain the CMS data structure mentioned in step 101 above: Count-Min Sketch (CMS) is a probabilistic data structure used to estimate the frequency (i.e., the number of times it is accessed, not the general term "frequency"; please refer to this explanation for other instances of "frequency" mentioned in the text, which will not be repeated here) of data items (data objects) in a data stream. It is mainly used to solve the frequency query problem in large-scale data streams. The core idea of ​​Count-Min Sketch is to use randomization and approximation to reduce storage space while providing an approximate value for overestimating the frequency. Therefore, it only needs to maintain a small array to count and record the frequency of a large number of data objects, and the time complexity of update and query operations is O(1).

[0043] like Figure 2 As shown, the Count-Min Sketch in this embodiment of the invention is designed as a two-dimensional array, and the number of rows in this two-dimensional array is... , indicating the number of hash functions used (one hash function per row); the number of columns in this two-dimensional array is This indicates the number of buckets corresponding to each hash function, that is, the number of buckets corresponding to each hash function. Each bucket. Here, a bucket can also be understood as a data element of this two-dimensional array. OK The two-dimensional array of columns has a total of × Each data element, that is × A bucket.

[0044] In the Count-Min Sketch, each bucket contains two elements (i.e., each data element of the two-dimensional array contains two fields), namely... (i.e., the field showing the first access count in the current time window) and (The second access count field of the previous time window). Here, The value represents the frequency value counted in the current time window. The value represents the frequency value of the statistics in the previous time window.

[0045] It should be noted that, and The specific value can be determined by the range of counting error. and confidence level ( )Sure( The failure probability or uncertainty parameter (usually 0 < δ < 1), i.e., the number of rows. , number of columns , It is a natural constant.

[0046] Hypothetical element (that is, data objects) The actual frequency of ) is The estimated frequencies calculated using Count-Min Sketch are: The total number of data objects is By setting the number of rows and columns in the sketch as described above, you can ensure that: That is, frequency estimates The probability is not lower than the confidence level ( ).

[0047] In this embodiment of the invention, the time window is... The maintenance of the Count-min Sketch mainly includes the following three operations: (1) Scanning: This operation completes the elimination and update of frequencies within the buckets in the Count-min Sketch, thereby shifting the time window. Specifically, the Count-min Sketch can be periodically and continuously scanned, traversing each bucket in the Count-min Sketch, ensuring that the scanning cycle of the entire Count-min Sketch is exactly equal to the size of the time window. Each time a bucket is scanned, Assigning field values ​​to Fields, and The value is set to 0. In this way, the concept of a time window is introduced into Count-Min Sketch. By scanning Count-min Sketch, the frequency of Count-min Sketch statistics can be periodically eliminated and updated to ensure that the access frequency of data objects counted by Count-minSketch falls within the latest time window, and also to ensure that the analysis of data access frequency is always within the latest time window.

[0048] (2) Query: This operation allows you to query the frequency of access to a data object. Specifically, you can query the frequency of access to a data object through... After each hash function calculates its hash value, the hash values ​​are then used to... Perform a modulo operation to obtain the value corresponding to the data object. The location of the bucket, from this Taken from each bucket Each tuple can be represented as Then the frequency at which this data object is accessed is: In other words, regarding this The system uses buckets to calculate the frequency of data access for each bucket by adding the values ​​of two fields in that bucket. The minimum frequency is then selected as the frequency at which the data object is accessed.

[0049] (3) Update: This operation increments the frequency of data object access. Specifically, it is done through... After each hash function calculates a hash value for the data object, the hash value is then used to process the data. The row modulo operation yields the value corresponding to the data object. The position of each bucket, for each bucket The value increments by 1.

[0050] In some embodiments, step 101 above, namely obtaining the first access count and the second access count corresponding to the target data object based on the minimum count sketch CMS data structure, includes: Step 1011: Obtain the target access count corresponding to the target data object from the CMS data structure, wherein the CMS data structure includes a first CMS data structure (i.e., sketch1 ) and the second CMS data structure (i.e. sketch2 The time window length of the first CMS data structure is twice the time window length of the second CMS data structure, and the target access count includes: a first target access count obtained from the first CMS data structure, and a second target access count obtained from the second CMS data structure.

[0051] Here, two Count-Min Sketches (i.e.) are used. sketch1 and sketch2 Synchronously save the access frequency of data objects, when a data object When an access request arrives, the access frequency stored in the two Count-MinSketch instances can be queried. Among them, sketch1 and sketch2 The length of the time window can be set to different values, for example, The time window is set to , Time window set .

[0052] Step 1012: Determine the first target access count as the first access count, and determine the difference between the first target access count and the second target access count as the second access count.

[0053] Here, the first visit count ( That is, the data objects within the current time window. The access frequency can be expressed as: In other words, from The data is obtained through a query in the CMS, specifically by querying the first CMS data structure (i.e. sketch1 The number of visits to the second target obtained is used as .

[0054] Second visit count ( That is, the data objects within the previous time window. The access frequency can be expressed as: In other words, it is possible to obtain the data from the second CMS data structure (i.e. sketch2 The results of the query (i.e.) (that is, the number of visits to the second target) and The results found in the query (i.e.) That is (The difference is obtained by working with the difference.)

[0055] In some embodiments, the CMS data structure is a two-dimensional array of k rows and m columns, where each row corresponds to a hash function, and each array element includes a field for the first access count of the current time window and a field for the second access count of the previous time window, where k and m are both positive integers.

[0056] Here, the specific steps of step 1011 above will be further explained: In step 1011 above, obtaining the target access count corresponding to the target data object from the CMS data structure includes: The target data object is hashed using k hash functions to obtain k hash values; the k hash values ​​are modulo m to obtain k target array elements corresponding to the target data object; the target value corresponding to each target array element is obtained, and the target value is equal to the sum of the values ​​of the first access count field and the second access count field in the target array element; the smallest value among the target values ​​corresponding to the k target array elements is selected as the target access count corresponding to the target data object.

[0057] Specifically, for the target data object, through After calculating k hash values ​​using each hash function, then using the k hash values ​​to... Perform a modulo operation to obtain the value corresponding to the target data object. The position of each bucket (i.e., the target array element); then, from this... Taken from each bucket Each tuple can be represented as Then the frequency at which the target data object is accessed is: Here, the target value corresponding to the i-th element in the k-th target array is: In other words, regarding this The system uses buckets to sum the values ​​of two fields in a bucket (which is the target value) as the frequency of that bucket's statistics. Finally, it selects the minimum frequency (the minimum target value) as the frequency at which the target data object is accessed.

[0058] In the above embodiments, after using Count-Min Sketch to statistically analyze the access frequency of data objects, the number of replicas of data objects can be dynamically adjusted to adapt to changes in the access patterns of upper-layer workloads. Specifically, when the access frequency of upper-layer workloads increases and concurrency is high, a single-replica data object caching strategy can cause cache nodes to become I / O bottlenecks, leading to high response latency for upper-layer workloads. In this case, it is necessary to increase the number of data object replicas. Conversely, when the access frequency of upper-layer workloads decreases, the number of cached data object replicas needs to be reduced to conserve cache resources and improve resource utilization. Furthermore, during the adjustment of the number of replicas, it is necessary to determine the upper bound of the number of replicas and the replica placement strategy based on node resources.

[0059] like Figure 3 As shown in the example, the main process for adjusting the number of copies of a target data object based on the frequency counted by Count-Min Sketch includes: First, a lightweight Count-MinSketch data structure with a time window is used to record and statistically analyze the access frequency of each data object. Then, based on the access statistics from Count-MinSketch, the number of replicas of the data objects is adjusted. Specifically, it is determined whether the frequency change rate (i.e., the access change rate) of the target data object exceeds the expansion threshold. If the judgment result is yes, execute the process of increasing the number of data replicas (that is, increasing the number of replicas of the target data object). For example, determine the upper bound of the number of replicas and the scheduling strategy by analyzing the bandwidth bottleneck relationship between cache nodes and workload nodes (that is, determine the placement location of the new replicas, i.e., determine the target cache node). If the judgment result is no, it is necessary to further determine whether the frequency change rate is lower than the scaling-down threshold. This allows us to determine whether to reduce the number of data replicas.

[0060] In some embodiments, step 103 above, adjusting the number of replicas of the target data object based on the access change rate, includes at least one of the following: (1) If the access change rate is greater than the expansion threshold, increase the number of replicas of the target data object.

[0061] (2) If the access change rate is less than the shrinkage threshold, reduce the number of copies of the target data object.

[0062] Here, the rate of change of visits is equal to the number of first visits ( ) and the second number of visits ( Let's take the ratio of ) as an example to illustrate: Assume that the pre-set expansion threshold is The reduction threshold is Expansion / contraction step size is ,in, By comparison and The quantitative relationship (i.e., based on the rate of change in access) determines whether to expand or shrink the capacity: like (That is, the rate of change in visits is greater than) If ), then increase the number of replicas, that is The formula means: From and Take the smaller of the two as the number of replicas after expansion (that is, increase the number of replicas of the target data object to that number); if (That is, the rate of change in visits is less than) If the number of replicas is reduced, then the number of replicas is reduced. The formula means: From The larger of 3 and 4 is taken as the number of replicas after scaling down (that is, the number of replicas of the target data object is reduced to this number). replicaNum This represents the number of replicas of the current data object. The upper bound of the number of replicas can be determined by analyzing the bandwidth bottlenecks of cache nodes and workload nodes; 3 represents the lower bound of the number of replicas. Here, for fault tolerance, the lower bound of the number of replicas is set to 3. It is understood that 3 is only an optional example, and the lower bound of the number of replicas can be set to other values ​​according to the actual situation.

[0063] In some embodiments, increasing the number of replicas of the target data object includes: Step 1: Determine the upper bound of the number of replicas of the target data object based on the available bandwidth of each cache node in the cache cluster.

[0064] For example, the theoretical upper limit of the number of replicas It can be determined by the bandwidth relationship between cache nodes and workload nodes.

[0065] In some specific embodiments, step one may specifically include the following steps: (1) Obtain the total available bandwidth of the cache cluster and the number of workload nodes that concurrently access the target data object.

[0066] (2) Calculate the average bandwidth allocation for each workload node based on the total available bandwidth and the number of nodes.

[0067] like Figure 4As shown, multiple upper-layer workloads concurrently read data objects from cache nodes. Assuming the maximum aggregate bandwidth provided by the distributed cache cluster can be fully utilized by the workload nodes, then the average bandwidth allocated to each client of the upper-layer workload is... The following formula can be used to calculate: ;in, This represents the average bandwidth allocation. Indicates the location of the data replica. Available bandwidth of cache nodes This indicates the number of nodes that concurrently access the workload nodes at the upper layer.

[0068] (3) The total number of workload nodes that meet the target condition is determined as the upper bound of the number of replicas of the target data object, wherein the target condition is that the available bandwidth of the workload node is greater than or equal to the average bandwidth allocation.

[0069] Assuming the upper-layer workload is the first The available bandwidth of each workload node is Ideally, each workload node should fully utilize the aggregate bandwidth provided by the cache cluster to ensure that bandwidth resources are not wasted. The following conditions must be met: , equivalent to Therefore, we can start from the lower bound of the preset number of replicas (e.g., 3) and enumerate from small to large. The value is assigned in ascending order. Find the first one that does not meet the requirements. of value, That is, the upper bound of the number of replicas. .

[0070] Step 2: Based on the upper bound and the preset step size Determine the number of new copies n required for the target data object, where n is a positive integer.

[0071] It should be noted that this can be done according to the formula. Determine the number of replicas after expansion, that is, from and Take the smaller one as the number of replicas after expansion (that is, increase the number of replicas of the target data object to this number). Then, the difference between the number of replicas after expansion and the current number of replicas is the number of new replicas n required for the target data object. In This represents the current number of copies of the target data object.

[0072] It should be noted that after determining the number of new replicas n, the node to which the new data object replicas are allocated (i.e., the target cache node) can be determined based on the remaining amount and balanced distribution of the node's computing resources, memory resources, bandwidth resources.

[0073] Step 3: Determine the score value corresponding to each cache node based on the resource information corresponding to each cache node. The resource information includes at least one of available computing resources (CPU resources), available memory resources, and available bandwidth resources.

[0074] Specifically, considering the remaining amount of CPU, memory, and bandwidth resources, the first evaluation metric used to determine the score can be expressed as: ; in, This represents the total CPU capacity on the node. This indicates the CPU usage. This represents the total memory resource capacity on the node. This indicates the amount of memory resources used. This represents the total bandwidth capacity on the node. This indicates the amount of bandwidth resources already used.

[0075] Next, to avoid situations where one node allocates too much resource to one resource while allocating too little to others, we can calculate the variance of resource utilization in a single node. Therefore, the second evaluation metric used to determine the score can be expressed as: ; in, , , These represent CPU utilization, memory utilization, and bandwidth utilization in a single node, respectively. This represents the average resource utilization rate. .

[0076] Finally, based on the two evaluation metrics above, the overall score of the node is calculated (i.e., the score value corresponding to the cache node). ), can be represented as: ,in, and These represent the weight values ​​corresponding to the two evaluation indicators. .

[0077] Step 4: Determine n target cache nodes based on the number of newly added replicas and the score value.

[0078] Here, the n target cache nodes are the n cache nodes with the highest scores. We can sort the cache nodes in descending order of their scores and select the top n cache nodes as the target cache nodes.

[0079] Step 5: Add copies of the target data object to each of the n target cache nodes.

[0080] In other words, the new data copies that need to be added will be preferentially allocated to the target cache nodes with high scores (high rating values).

[0081] In this embodiment, in order to solve the problem of wasted cache resources in distributed caching, the upper bound of the number of data object replicas is determined by analyzing the bandwidth bottleneck relationship between cache nodes and workload nodes, which can avoid wasting distributed cache resources. In addition, based on the balance of computing, storage and resource allocation of nodes, data replicas are reasonably scheduled, and resource efficiency of cache data replica adjustment is achieved.

[0082] In the above embodiments, a lightweight Count-Min Sketch data structure with time windows is first used to record and statistically analyze the access frequency of each data object. The entire Count-Min Sketch is periodically and continuously scanned to eliminate frequencies recorded in past time windows, ensuring that the access frequency of each data object stored in the Count-Min Sketch falls within the latest time window. Next, the Count-Min Sketch is used to determine the access change rate of data objects over two consecutive time periods, thereby adaptively increasing or decreasing the number of data object replicas. Furthermore, by analyzing the bandwidth bottlenecks of cache nodes and workload nodes, an upper bound on the number of data object replicas is determined. Considering the remaining amount and balanced allocation of node computing resources, memory resources, and bandwidth resources, the cache nodes to which newly added data object replicas are allocated are determined, thus realizing a data object replica number optimization and placement strategy based on access frequency and bandwidth awareness.

[0083] Currently, with the rapid development of cloud computing, big data, and the Internet of Things, enterprises need to process and store massive amounts of data, and the demand for efficient data access is constantly increasing. Furthermore, end-users are continuously upgrading their experience standards for digital services, which places higher demands on key performance indicators such as system response speed and service stability.

[0084] To cope with diverse and dynamically changing application workloads, migrating services and data to the cloud has become a trend. Various cloud service providers are constantly optimizing their services. The compute-storage separation architecture of cloud computing poses challenges to the low-latency requirements of data-intensive applications (such as high-concurrency queries and deep learning job training). To address the high latency issues caused by cross-network data transmission, elastic caching has become an important component of cloud computing infrastructure.

[0085] However, current elastic caches on the market struggle to accurately detect changes in data access patterns of upper-layer applications. Their scaling strategies also rely heavily on expert experience, resulting in low query efficiency for upper-layer applications, low cache resource utilization, and the need to consume significant amounts of additional memory to record access patterns.

[0086] To address this issue, this invention uses a lightweight data structure, Count-Min Sketch, to record access patterns and further proposes an intelligent elastic scaling strategy. This provides a more flexible and efficient elastic caching service, meeting users' service quality requirements at a lower cost, improving the performance and resource utilization of upper-layer application loads, and helping intelligent elastic caching solutions to be more widely used in hybrid cloud and multi-cloud environments.

[0087] The cache capacity scaling mechanism provided in the embodiments of the present invention will be described in detail below.

[0088] First, it should be noted that in a distributed caching system, setting the cache capacity too small will reduce the cache hit rate, thereby increasing the corresponding latency of the workload; setting the cache capacity too large will lead to memory waste, thereby reducing resource utilization. Therefore, this embodiment of the invention also establishes a cache capacity scaling mechanism based on reinforcement learning to reasonably control the size of the cache capacity.

[0089] In some specific embodiments, the caching system optimization method further includes: (i) Define a state space and a reward function based on business metrics and resource metrics. The business metrics reflect the service quality of the upper-layer application load, and the resource metrics reflect the state and resource utilization of the cache cluster.

[0090] It should be noted that in reinforcement learning, the state space refers to the set of all possible states of the environment in which the agent is located. Scaling or resizing the cache capacity will change the state of the environment, thereby affecting the next decision-making process.

[0091] In this embodiment of the invention, business metrics and resource metrics are used to define the state. Business metrics reflect the service quality of the upper-layer application load, while resource metrics reflect the cluster state and resource utilization. In some specific examples, business metrics include: average response latency of the upper-layer application load. and the average hit rate of distributed cache Resource metrics include: number of cache worker pods. Total capacity of distributed cache Average memory utilization of cached Worker Pods Here, after normalization, the state of business and resource metrics can be represented as follows: .

[0092] It should also be noted that in reinforcement learning, the reward function represents the reward calculated based on business and resource metrics after the scaling action is performed in the current state, and the reward function reflects the optimization objective.

[0093] In an optional embodiment of the present invention, memory utilization can be used. Average hit rate of distributed cache Average response latency of upper-layer application load The reward function is defined by metrics such as metric quantification. That is, the reward function can be expressed as: ;in, All coefficients are in the interval [0,1].

[0094] (ii) Based on the deep Q-network model, determine the scaling factor of the cache capacity of the cache cluster according to the state space and reward function.

[0095] It should be noted that, in some optional embodiments of the present invention, the action is defined as the scaling factor of the cache size (i.e., cache capacity). It can accurately and concisely represent the scaling behavior of a cluster.

[0096] Assumption and These represent the cache size after scaling and the cache size before scaling, respectively. The relationship between the two can be expressed as: Among them, elongation. It should be limited to a certain range, such as .

[0097] (iii) Adjust the number of working processes in the cache cluster according to the scaling ratio.

[0098] It should be noted that after determining the scaling rate, the number of Worker Pods after scaling can be further determined based on the scaling rate and the cache capacity before scaling. Then, the number of Worker Pods to be added or removed can be calculated using the following formula: ; in, This indicates the number of Worker Pods (i.e., worker processes) that need to be added or removed. This indicates the size of the cache resources requested by each Worker Pod.

[0099] In specific implementation, it can be based on It relies on Kubernetes' scaling capabilities to adjust the number of Worker Pods, thereby achieving the effect of scaling the cache capacity.

[0100] Here, we will further explain the process of determining the elongation rate.

[0101] In this embodiment of the invention, a deep Q-network can be used to implement the training and decision-making process of reinforcement learning. The main idea is to use a deep neural network to fit a value function and utilize an empirical replay pool. Strategies to improve algorithm stability.

[0102] Specifically, at each decision-making time step, the current environmental state is... The input is fed into the evaluation network, the Q-value of each action is calculated, and the action with the highest Q-value is selected. As output; then, using Strategy, based on probability Randomly select an action, and with probability Choose the best action to evaluate the network output under the current state. After the action is executed, calculate the executed action. The rewards that followed And new status and the quadruple The network is then placed into the experience replay pool; next, a batch of samples is randomly sampled from the experience replay pool to train the evaluation network.

[0103] Here, using As a loss function, the parameters of the evaluation network are updated through the backpropagation algorithm.

[0104] in, For the reward function, It is the Q-value of the target network. As a discount factor, It is to evaluate the network based on its state. Select the action with the maximum Q value, i.e. .

[0105] In addition, the parameters of the evaluation network can be copied to the target network periodically to improve the stability of the algorithm.

[0106] In this embodiment, the state space and reward function are defined by combining the business metrics of data-intensive applications and the resource metrics of the cache cluster. Based on the deep Q-network model in reinforcement learning, the scaling rate of the cache capacity is decided. Then, relying on the scaling capabilities of the container orchestration engine (Kubernetes, K8s), the number of worker pods (WP) in the cache system is adjusted to reasonably control the size of the cache capacity.

[0107] like Figure 5 As shown in the above embodiments, the cache system optimization method is implemented from two aspects: the data object replica number tuning mechanism and the cache capacity scaling mechanism.

[0108] In order to solve the problem of wasted cache resources in distributed caching, this embodiment of the invention analyzes the bandwidth bottleneck relationship between cache nodes and workload nodes to determine the upper bound of the number of data object replicas, which can avoid the waste of distributed cache resources and make reasonable scheduling of data object replicas based on the balance of node computing, storage and resource allocation.

[0109] To address the challenge of balancing storage resource utilization and service quality in cache clusters, this invention proposes a reinforcement learning-based cache capacity adjustment method. Specifically, a state space and reward function are defined by combining data-intensive application business metrics and cache cluster resource metrics. A Deep Q-Network (DQN) model from reinforcement learning is used to fit the value function, determining the scaling rate of cache capacity and subsequently adjusting the number of Worker Pods (the smallest scheduling unit in Kubernetes) in the cache system. Each decision step comprehensively considers future value (storage resource utilization and service quality), allowing for better adaptation to varying load environments, strong adaptability, and independence from labeled data, focusing on long-term benefits during the decision-making process.

[0110] The caching system optimization method described in this application, on the one hand, uses a lightweight Count-Min Sketch data structure with a time window to record and statistically analyze the access frequency of each data object, and determines the access change rate accordingly. Based on this, the number of replicas of the data object is adaptively increased or decreased. Furthermore, by analyzing the bandwidth bottleneck relationship between cache nodes and workload nodes, an upper bound on the number of data object replicas is determined, and replica scheduling is performed based on the balanced allocation of node computing, storage, and resources, effectively avoiding cache resource waste. On the other hand, a reinforcement learning-based dynamic cache capacity adjustment method is introduced to achieve adaptive decision-making on cache capacity scaling, significantly improving the resource utilization efficiency and service quality of the cache cluster.

[0111] like Figure 6As shown, one embodiment of this application also provides a cache system optimization apparatus, the apparatus comprising: The information acquisition module 610 is used to acquire the first access count and the second access count corresponding to the target data object based on the count minimum sketch CMS data structure. The first access count is the estimated number of times the target data object is accessed in a first time period, and the second access count is the estimated number of times the target data object is accessed in a second time period. The first time period and the second time period are directly connected in the time dimension, and the first time period is later than the second time period. The first processing module 620 is used to determine the access change rate corresponding to the target data object based on the first access count and the second access count; The replica adjustment module 630 is used to adjust the number of replicas of the target data object according to the access change rate.

[0112] Optionally, the information acquisition module 610 includes: The first acquisition submodule is used to acquire the target access count corresponding to the target data object from the CMS data structure. The CMS data structure includes a first CMS data structure and a second CMS data structure. The time window length of the first CMS data structure is twice the time window length of the second CMS data structure. The target access count includes: a first target access count acquired from the first CMS data structure and a second target access count acquired from the second CMS data structure. The first processing submodule is used to determine the first target access count as the first access count, and to determine the difference between the first target access count and the second target access count as the second access count.

[0113] Optionally, the CMS data structure is a two-dimensional array with k rows and m columns, where each row corresponds to a hash function, and each array element includes a field for the first access count of the current time window and a field for the second access count of the previous time window, where k and m are both positive integers; The first acquisition submodule includes: A hash calculation unit is used to perform hash calculations on the target data object using k hash functions respectively to obtain k hash values; The modulo operation unit is used to perform modulo operations on m for each of the k hash values ​​to obtain the k target array elements corresponding to the target data object; The first acquisition unit is used to acquire the target value corresponding to each of the target array elements respectively, wherein the target value is equal to the sum of the values ​​of the first access count field and the second access count field in the target array element; The first processing unit is used to select the smallest value from the target values ​​corresponding to the k target array elements as the target access count corresponding to the target data object.

[0114] Optionally, the copy adjustment module 630 includes: The replica addition submodule is used to increase the number of replicas of the target data object when the access change rate is greater than the expansion threshold; The replica reduction submodule is used to reduce the number of replicas of the target data object when the access change rate is less than the shrinkage threshold.

[0115] Optionally, the copy addition submodule includes: The upper bound determination unit is used to determine the upper bound of the number of replicas of the target data object based on the available bandwidth of each cache node in the cache cluster. The second processing unit is used to determine the number of new copies n required for the target data object based on the upper bound and the preset step size, where n is a positive integer; A node scoring unit is used to determine the score value corresponding to each cache node based on the resource information corresponding to each cache node. The resource information includes at least one of available computing resources, available memory resources, and available bandwidth resources. The third processing unit is used to determine n target cache nodes based on the number of newly added replicas and the score value; A copy of the target data object is added to each of the n target cache nodes.

[0116] Optionally, the upper bound determination unit includes: The first acquisition subunit is used to acquire the total available bandwidth of the cache cluster and the number of workload nodes that concurrently access the target data object; The subunit is used to calculate the average bandwidth allocation for each workload node based on the total available bandwidth and the number of nodes; The first processing subunit is used to determine the total number of workload nodes that meet the target condition as the upper bound of the number of replicas of the target data object, wherein the target condition is that the available bandwidth of the workload node is greater than or equal to the average bandwidth allocation.

[0117] Optionally, the device further includes: The second processing module is used to define a state space and a reward function based on business metrics and resource metrics. The business metrics reflect the service quality of the upper-layer application load, and the resource metrics reflect the state and resource utilization of the cache cluster. The third processing module is used to determine the scaling factor of the cache capacity of the cache cluster based on the deep Q-network model, the state space, and the reward function. The fourth processing module is used to adjust the number of worker processes in the cache cluster according to the scaling rate.

[0118] The apparatus provided in this application embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.

[0119] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0120] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0121] One embodiment of this application also provides an optimization device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the cache system optimization method as described in any of the preceding claims.

[0122] The specific implementation of the cache system optimization method by the program running on the processor of the optimization device can be found in the detailed description of the cache system optimization method, and will not be repeated here.

[0123] In addition, specific embodiments of this application also provide a readable storage medium storing a program. When executed by a processor, this program implements the various processes of the above-described cache system optimization method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here. The readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.).

[0124] This application also provides a computer program product, including computer instructions. When executed by a processor, these computer instructions implement the various processes of the above-described cache system optimization method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0125] Optionally, embodiments of this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0126] The computer program product described in this application includes computer instructions that, when executed by a processor, implement the various processes of the method embodiments shown above and achieve the same technical effects. To avoid repetition, these will not be repeated here.

[0127] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0128] It should be noted that many of the functional components described in this specification are referred to as modules / submodules in order to more specifically emphasize the independence of their implementation.

[0129] In this application embodiment, the module / submodule can be implemented in software so that it can be executed by various types of processors. For example, an identified executable code module may include one or more physical or logical blocks of computer instructions, which may be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but may include different instructions stored in different bits, which, when logically combined, constitute the module and achieve the module's intended purpose.

[0130] In practice, an executable code module can be a single instruction or many instructions, and can even be distributed across multiple different code segments, different programs, and across multiple memory devices. Similarly, operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable data structure. This operational data can be collected as a single dataset or distributed across different locations (including different storage devices), and can exist, at least in part, solely as electronic signals within the system or network.

[0131] When a module can be implemented using software, considering the current level of hardware technology, modules that can be implemented in software can be implemented using hardware circuits by those skilled in the art to achieve the corresponding functions, without considering cost. These hardware circuits include conventional very-large-scale integrated circuits (VLSI) or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules can also be implemented using programmable hardware devices, such as field-programmable gate arrays, programmable array logic, and programmable logic devices.

[0132] The above describes the preferred embodiments of this application. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A cache system optimization method, characterized by, The method comprises: obtaining a first access frequency and a second access frequency corresponding to a target data object based on a counting minimal sketch (CMS) data structure, wherein the first access frequency is an estimated value of the number of times that the target data object is accessed within a first time period, the second access frequency is an estimated value of the number of times that the target data object is accessed within a second time period, the first time period directly connects with the second time period in the time dimension, and the first time period is later than the second time period; determining an access change rate corresponding to the target data object according to the first access frequency and the second access frequency; adjusting the number of copies of the target data object according to the access change rate.

2. The cache system optimization method of claim 1, wherein, The method for obtaining a first access frequency and a second access frequency corresponding to a target data object based on a counting minimal sketch (CMS) data structure comprises: obtaining a target access frequency corresponding to the target data object from the CMS data structure, wherein the CMS data structure comprises a first CMS data structure and a second CMS data structure, the time window length of the first CMS data structure is twice the time window length of the second CMS data structure, and the target access frequency comprises a first target access frequency obtained from the first CMS data structure and a second target access frequency obtained from the second CMS data structure; determining the first target access frequency as the first access frequency and determining the difference between the first target access frequency and the second target access frequency as the second access frequency.

3. The cache system optimization method of claim 2, wherein, The CMS data structure is a two-dimensional array of k rows and m columns, the rows are in one-to-one correspondence with hash functions, each array element comprises a first access frequency field of a current time window and a second access frequency field of a previous time window, and k and m are positive integers; The method for obtaining a target access frequency corresponding to a target data object from the CMS data structure comprises: performing hash calculation on the target data object through k hash functions respectively to obtain k hash values; performing modulo operation on the k hash values with m respectively to obtain k target array elements corresponding to the target data object; obtaining a target value corresponding to each target array element respectively, wherein the target value is equal to the sum of the values of the first access frequency field and the second access frequency field in the target array element; selecting a minimum value from the target values corresponding to the k target array elements as the target access frequency corresponding to the target data object.

4. The cache system optimization method of claim 1, wherein, The method for adjusting the number of copies of the target data object according to the access change rate comprises at least one of the following: in the case that the access change rate is greater than an expansion threshold, increasing the number of copies of the target data object; in the case that the access change rate is less than a contraction threshold, decreasing the number of copies of the target data object.

5. The cache system optimization method of claim 4, wherein, The method for increasing the number of copies of the target data object comprises: determining an upper bound of the number of copies of the target data object according to the available bandwidths of the cache nodes in a cache cluster. According to the upper bound and a preset step length, determine a number n of new copies required by the target data object, n being a positive integer; According to the resource information corresponding to each cache node, determine a score value corresponding to each cache node, the resource information including at least one of available computing resources, available memory resources, and available bandwidth resources; According to the number of new copies and the score value, determine n target cache nodes; Add new copies of the target data object on the n target cache nodes.

6. The cache system optimization method of claim 5, wherein, The method further comprises: Based on business indicators and resource indicators, define a state space and a reward function, the business indicators reflecting the service quality of an upper-layer application load, and the resource indicators reflecting the state and resource utilization rate of a cache cluster; Based on a deep Q network model, determine a scaling rate of the cache capacity of the cache cluster according to the state space and the reward function; According to the scaling rate, adjust the number of work processes of the cache cluster.

7. The cache system optimization method of claim 1, wherein, The apparatus comprises: An information acquisition module configured to acquire, based on a count-min sketch (CMS) data structure, a first access frequency and a second access frequency corresponding to a target data object, wherein the first access frequency is an estimated value of the number of times the target data object is accessed within a first time period, the second access frequency is an estimated value of the number of times the target data object is accessed within a second time period, the first time period directly succeeds the second time period in the time dimension, and the first time period is later than the second time period; A first processing module configured to determine, according to the first access frequency and the second access frequency, an access change rate corresponding to the target data object; A copy adjustment module configured to adjust the number of copies of the target data object according to the access change rate.

8. A cache system optimization apparatus, characterized by, A computer program product comprising a processor, a memory, and a program stored on the memory and executable on the processor, the program being executed by the processor to implement the cache system optimization method according to any one of claims 1 to 7. Computer instructions executable by a processor to implement the steps of the cache system optimization method according to any one of claims 1 to 7. A readable storage medium having a program stored thereon, the program being executable by a processor to implement the steps of the cache system optimization method according to any one of claims 1 to 7. ​ 9. An optimization device, characterized by ​ 10. A computer program product, characterised in that, ​ 11. A readable storage medium, characterized by, ​