Distributed cache parameter optimization method and device, computer device and storage medium

By combining a cache performance prediction model with a genetic evolutionary approach that utilizes multiple learners, distributed cache parameters are automatically optimized, solving the problem of low efficiency in traditional manual tuning and achieving more efficient and accurate parameter optimization.

CN119415565BActive Publication Date: 2026-03-24CHINA LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional manual tuning methods are inefficient in optimizing distributed cache parameters, rely on personal experience, are difficult to cover all environmental scenarios, and have low accuracy.

Method used

A cache performance prediction model is adopted, which combines multiple learners. An initial population is generated through an ensemble learning algorithm, and the distributed cache parameters are iteratively optimized using a genetic evolution method, thus automating parameter tuning.

Benefits of technology

It improves the efficiency of parameter optimization, shortens the tuning cycle, obtains more universally applicable optimal parameters, and reduces manual intervention and data collection time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415565B_ABST
    Figure CN119415565B_ABST
Patent Text Reader

Abstract

The application relates to a distributed cache parameter optimization method and device, computer equipment and a storage medium. The method comprises the following steps: randomly generating multiple groups of distributed cache parameters as an initial population; inputting the initial population into multiple learners of a cache performance prediction model respectively, predicting the cache performance of the initial population, and determining the health value of the initial population according to the cache performance of the initial population; performing evolution processing on the initial population according to the health value of the initial population, a mutation probability threshold and a crossover probability threshold to generate a new population; updating the new population as the initial population, returning to the step of inputting the initial population into the multiple learners of the cache performance prediction model respectively, and iteratively performing evolution processing to obtain a group of distributed cache parameters with optimal cache performance. The method can improve the efficiency and accuracy of distributed cache parameter optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for optimizing distributed cache parameters. Background Technology

[0002] To improve operational efficiency, internet companies and large data centers widely use distributed caching to enhance system performance and effectively reduce database pressure. However, with the continuous expansion of data scale, the increasing number of user visits, the diversification of business needs, and the driving force of technological development, enterprises are placing higher demands on the data processing performance, scalability, and high availability of distributed caching. Optimizing distributed caching parameters involves multiple aspects, including the selection and optimization of caching strategies, data sharding and load balancing, performance monitoring and tuning, and high availability and fault tolerance.

[0003] In traditional technologies, continuous manual monitoring is used to formulate and select appropriate optimization strategies to tune distributed cache parameters. However, manual tuning requires a lot of time to collect various types of data, resulting in low efficiency. Furthermore, manual tuning relies heavily on personal experience, leading to low accuracy. Summary of the Invention

[0004] Therefore, it is necessary to provide a distributed cache parameter optimization method, apparatus, computer equipment, and storage medium that can improve the efficiency and accuracy of distributed cache parameter tuning in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a method for optimizing distributed cache parameters, including:

[0006] Multiple sets of distributed cache parameters are randomly generated as the initial group;

[0007] The initial population is fed into multiple learners of the cache performance prediction model to predict the cache performance of the initial population, and the health value of the initial population is determined based on the cache performance of the initial population.

[0008] The initial population is subjected to evolutionary processing based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0009] The new population is updated to the initial population. The steps of inputting the initial population into multiple learners of the cache performance prediction model are returned. The process is iteratively evolved to obtain a set of distributed cache parameters with optimal cache performance.

[0010] In one embodiment, the initial population is input into multiple learners of the cache performance prediction model, and the prediction of the cache performance of the initial population includes:

[0011] The initial population is input into multiple learners of the cache performance prediction model to obtain the cache performance prediction results of each learner; the multiple learners include, but are not limited to, generative adversarial networks, artificial neural networks, support vector machines, and regression trees;

[0012] By combining the cache performance prediction results of multiple learners through the combination layer of the cache performance prediction model, the cache performance of the initial population is obtained.

[0013] In one embodiment, determining the health value of the initial population based on its cache performance includes:

[0014] The health value of the initial population is determined based on the cache performance of the initial population and preset constraints.

[0015] In one embodiment, the cache performance prediction results of multiple learners are combined through a combination layer of the cache performance prediction model to obtain the cache performance of the initial population, including:

[0016] By combining layers of the cache performance prediction model, a voting strategy is adopted to process the cache performance prediction results of multiple learners through voting.

[0017] The cache performance prediction that appears most frequently is determined as the cache performance of the initial group.

[0018] In one embodiment, the cache performance prediction results of multiple learners are combined through a combination layer of the cache performance prediction model to obtain the cache performance of the initial population, including:

[0019] By combining layers of the cache performance prediction model, a weighted averaging strategy is adopted to perform weighted averaging on the cache performance prediction results of multiple learners to obtain the cache performance of the initial group.

[0020] In one embodiment, the process of performing evolutionary processing on the initial population based on the initial population's health value, mutation probability threshold, and crossover probability threshold to generate a new population includes:

[0021] Select target group distributed cache parameters from the initial group based on the health values ​​of the initial group;

[0022] The target group's distributed cache parameters are cross-operated according to the cross-operation probability threshold, and the initial population is mutated according to the mutation probability threshold to obtain a new population.

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

[0024] The cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster are input into multiple learners of the initial model to obtain the learner prediction results of each learner.

[0025] The prediction results of multiple learners are combined by the combination layer of the initial model to obtain the target prediction result.

[0026] The initial model is trained based on the target prediction results to obtain the cache performance prediction model.

[0027] Secondly, this application also provides a distributed cache parameter optimization device, comprising:

[0028] The population generation module is used to randomly generate multiple sets of distributed cache parameters as the initial population.

[0029] The performance prediction module is used to input the initial population into multiple learners of the cache performance prediction model, predict the cache performance of the initial population, and determine the health value of the initial population based on the cache performance of the initial population.

[0030] The genetic evolution module is used to evolve the initial population based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0031] The parameter optimization module is used to update the new population to the initial population, and returns the steps of inputting the initial population into multiple learners of the cache performance prediction model, and iteratively evolves the process to obtain a set of distributed cache parameters with optimal cache performance.

[0032] 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:

[0033] Multiple sets of distributed cache parameters are randomly generated as the initial group;

[0034] The initial population is fed into multiple learners of the cache performance prediction model to predict the cache performance of the initial population, and the health value of the initial population is determined based on the cache performance of the initial population.

[0035] The initial population is subjected to evolutionary processing based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0036] The new population is updated to the initial population. The steps of inputting the initial population into multiple learners of the cache performance prediction model are returned. The process is iteratively evolved to obtain a set of distributed cache parameters with optimal cache performance.

[0037] 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:

[0038] Multiple sets of distributed cache parameters are randomly generated as the initial group;

[0039] The initial population is fed into multiple learners of the cache performance prediction model to predict the cache performance of the initial population, and the health value of the initial population is determined based on the cache performance of the initial population.

[0040] The initial population is subjected to evolutionary processing based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0041] The new population is updated to the initial population. The steps of inputting the initial population into multiple learners of the cache performance prediction model are returned. The process is iteratively evolved to obtain a set of distributed cache parameters with optimal cache performance.

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

[0043] Multiple sets of distributed cache parameters are randomly generated as the initial group;

[0044] The initial population is fed into multiple learners of the cache performance prediction model to predict the cache performance of the initial population, and the health value of the initial population is determined based on the cache performance of the initial population.

[0045] The initial population is subjected to evolutionary processing based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0046] The new population is updated to the initial population. The steps of inputting the initial population into multiple learners of the cache performance prediction model are returned. The process is iteratively evolved to obtain a set of distributed cache parameters with optimal cache performance.

[0047] The aforementioned distributed cache parameter optimization methods, apparatuses, computer devices, storage media, and computer program products, because the cache performance prediction model includes multiple learners, combine these learners into a strong learner through an ensemble learning algorithm. This allows for model training with less training data without sacrificing model accuracy, reducing data collection time and improving parameter optimization efficiency. Based on the cache performance prediction model, an optimized genetic evolution method is used to obtain the optimal set of distributed cache parameters for cache performance. Because the optimized genetic evolution method has good randomness and is less prone to getting trapped in local optima, the obtained optimal parameters are more universal. Furthermore, the above methods employ fully automated methods, eliminating the need for manual operation and selection, significantly improving parameter optimization efficiency, shortening the optimization cycle, and resulting in higher parameter optimization efficiency. Attached Figure Description

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

[0049] Figure 1 This is a flowchart illustrating a distributed cache parameter optimization method in one embodiment;

[0050] Figure 2 This is a schematic diagram of a process in one embodiment where an initial population is input into multiple learners of a cache performance prediction model to predict the cache performance of the initial population.

[0051] Figure 3 This is a structural block diagram of a distributed cache parameter optimization device in one embodiment;

[0052] Figure 4 This is an internal structural diagram of a computer device in one embodiment;

[0053] Figure 5 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation

[0054] 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.

[0055] Distributed cache parameter optimization involves multiple aspects, including caching strategy selection and optimization, data sharding and load balancing, performance monitoring and tuning, high availability and fault tolerance, etc. In reality, users often find it difficult to choose the optimal configuration parameters from such a complex parameter space. Therefore, users often accept the default configurations, but these configurations are inefficient and may even lead to unavailability risks. Based on this situation, optimizing distributed cache parameters can improve the performance, scalability, and availability of distributed caches, thereby better meeting the needs of modern internet enterprises and large data centers.

[0056] In traditional technologies, enterprises continuously monitor distributed cache parameters manually based on their own business characteristics and needs, and then formulate and select appropriate optimization strategies to fine-tune the parameters.

[0057] However, distributed cache parameter configuration has a certain degree of spatial complexity. Firstly, there are complex interactions between the configurations of different underlying environments and cache parameters. Secondly, there are interrelationships between different distributed cache parameter configurations. This leads to the following shortcomings in traditional manual tuning methods:

[0058] 1. Due to the limitations of manual operation, manual optimization has a narrow coverage and limited data collection, making it difficult to cover all basic environmental scenarios and parameter combinations, and the suggestions provided are not universally applicable.

[0059] 2. Due to the complexity of the environment and the diversity of parameters, manual optimization and data collection require a lot of time, resulting in low overall efficiency and a long optimization cycle.

[0060] 3. Since manual optimization largely depends on personal experience, it is highly subjective and difficult to objectively reflect the effect of parameter optimization, resulting in low accuracy.

[0061] In one exemplary embodiment, such as Figure 1 As shown, a distributed cache parameter optimization method is provided. This embodiment illustrates the method's application to a terminal, but it is understood that the method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0062] Step 102: Randomly generate multiple sets of candidate distributed cache parameters as the initial group.

[0063] Among them, multiple sets of distributed cache parameters refer to cache configuration parameters used for parameter optimization.

[0064] Alternatively, since the number of distributed cache configurations is large and the parameter range varies with the underlying hardware environment, it is impossible to enumerate the distributed cache configurations corresponding to the application. Therefore, heuristic algorithms can be used to explore the optimal solution in the parameter space of the distributed cache configurations.

[0065] For example, multiple sets of distributed cache parameters are randomly generated in the parameter space, and an initial population is formed based on these multiple sets of distributed cache parameters. The initial population can be represented as: P={conf1,conf2,...,confk}, where confk represents a set of distributed cache parameters. Each set of distributed cache parameters may include distributed cache parameters corresponding to multiple distributed cache configurations.

[0066] Step 104: Input the initial population into multiple learners of the cache performance prediction model to predict the cache performance of the initial population, and determine the health value of the initial population based on the cache performance of the initial population.

[0067] Optionally, a pre-trained cache performance prediction model is invoked. This model includes a base learning layer, which comprises multiple learners. The initial population is input into each learner, and each learner processes the initial population independently, ultimately yielding the cache performance of the initial population. The cache performance of the initial population may include the cache performance of each set of distributed cache parameters. The cache performance prediction model is trained using an ensemble learning algorithm, which combines multiple learners into a strong learner, allowing for model construction with less training data without sacrificing model accuracy.

[0068] After obtaining the cache performance of the initial group, this performance is used as the fitness, thus determining the fitness of each set of distributed cache parameters. Fitness refers to the degree to which an individual adapts to or excels in a target function aimed at optimizing cache performance. Then, the health value of the initial group is determined based on its cache performance. The health value measures an individual's survival ability within the group or its overall performance under various conditions.

[0069] Optionally, the caching performance of the initial group can be the job execution time; the shorter the execution time, the better the caching performance.

[0070] Step 106: Perform evolutionary processing on the initial population based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0071] Optionally, selection, crossover, and mutation operations are performed on the initial population based on its health value, mutation probability threshold, and crossover probability threshold to obtain a new population. The new population can be represented as: P'={conf1r, conf2r, ..., confkr}, where confkr represents an individual in the new population. The mutation probability threshold is used to determine whether to perform a mutation operation. The crossover probability threshold is used to determine whether to perform a crossover operation.

[0072] Step 108: Update the new population to the initial population, return the steps of inputting the initial population, the mutation probability threshold and crossover probability threshold of the initial population into the pre-trained cache performance prediction model, predict the cache performance of the initial population, iterate and evolve to obtain a set of distributed cache parameters with optimal cache performance.

[0073] Optionally, the new population is used as the initial population. The process returns to step 104, where the initial population is input into multiple learners of the cache performance prediction model to predict the cache performance of the initial population. The health value of the initial population is determined based on its cache performance. The process is iterated and evolved until a preset number of iterations is reached to obtain a set of distributed cache parameters with optimal cache performance.

[0074] Optionally, before the initial evolutionary process, the initial population can be input into multiple learners of the cache performance prediction model to predict its cache performance. The initial population is then subjected to evolutionary processing based on cache performance, mutation probability threshold, and crossover probability threshold to generate a new population. Subsequent evolutionary processes are performed based on the population's health value until a set of distributed cache parameters with optimal cache performance is obtained.

[0075] In the aforementioned distributed cache parameter optimization method, since the cache performance prediction model includes multiple learners, an ensemble learning algorithm combines these learners into a strong learner. This allows for model training with less training data without sacrificing model accuracy, reducing data collection time and improving parameter optimization efficiency. Based on the cache performance prediction model, an optimized genetic evolution method is used to obtain the optimal set of distributed cache parameters. Because the optimized genetic evolution method has good randomness and is less prone to getting trapped in local optima, the obtained optimal parameters are more universal. Furthermore, the above method employs fully automated methods, eliminating the need for manual operation and selection, significantly improving parameter optimization efficiency, shortening the optimization cycle, and resulting in higher parameter optimization efficiency.

[0076] In one exemplary embodiment, such as Figure 2 As shown, the initial population is input into multiple learners of the cache performance prediction model, and the prediction of the cache performance of the initial population includes the following steps 202 to 204. Wherein:

[0077] Step 202: Input the initial population into multiple learners of the cache performance prediction model to obtain the cache performance prediction results of each learner; the multiple learners include, but are not limited to, generative adversarial networks, artificial neural networks, support vector machines and regression trees.

[0078] Step 204: The cache performance prediction results of multiple learners are combined through the combination layer of the cache performance prediction model to obtain the cache performance of the initial population.

[0079] Optionally, the cache performance prediction model includes a base learning layer, a combination layer, and an output layer. The base learning layer comprises multiple learners. These learners include, but are not limited to, generative adversarial networks, artificial neural networks, support vector machines, and regression trees. Each learner processes data independently.

[0080] The initial population is fed into multiple learners of the cache performance prediction model. Each learner independently predicts the cache performance of the initial population, resulting in a cache performance prediction result for each learner. The cache performance prediction results from multiple learners are combined through a combination layer of the cache performance prediction model to obtain the cache performance of the initial population. The cache performance of the initial population is then output through an output layer.

[0081] In this embodiment, multiple learners are combined into a strong learner through an ensemble learning algorithm. This allows for model training with less training data without sacrificing model accuracy, effectively reducing the time spent on data collection and further improving parameter optimization efficiency.

[0082] In an exemplary embodiment, determining the health value of the initial population based on the caching performance of the initial population includes: determining the health value of the initial population based on the caching performance of the initial population and preset constraints.

[0083] Optionally, the preset constraints can be numerical range constraints on cache performance. If an individual's cache performance violates the constraints, its health value may be reduced by adding a penalty term: Health value = Fitness value − λ × Penalty term; where λ is the penalty coefficient, and the penalty term can be the degree of violation of the preset constraints or other relevant factors.

[0084] Alternatively, if the fitness range is large, it can be adjusted to a fixed range (e.g., 0 to 1) through normalization or standardization, which can make the health value more stable: Health value = ;in, Indicates fitness. and These represent minimum fitness and maximum fitness, respectively.

[0085] In one exemplary embodiment, the combination layer of the cache performance prediction model can employ different combination strategies to combine the cache performance prediction results of multiple learners. These different combination strategies may include voting strategies, weighted averaging strategies, etc.

[0086] In one embodiment, the cache performance prediction results of multiple learners are combined through the combination layer of the cache performance prediction model to obtain the cache performance of the initial group. This includes: using the combination layer of the cache performance prediction model, a voting strategy is adopted to vote on the cache performance prediction results of multiple learners; and the cache performance prediction result that appears most frequently is determined as the cache performance of the initial group.

[0087] The ensemble layer can employ a voting strategy to determine the most frequently occurring cache performance prediction as the initial group's cache performance. This ensemble learning algorithm can improve model prediction accuracy when multiple learners have similar predictive capabilities.

[0088] In one embodiment, the cache performance prediction results of multiple learners are combined and processed through the combination layer of the cache performance prediction model to obtain the cache performance of the initial group. This includes: using a weighted averaging strategy to perform weighted averaging on the cache performance prediction results of multiple learners through the combination layer of the cache performance prediction model to obtain the cache performance of the initial group.

[0089] The caching performance of the initial group can also be obtained by employing a weighted averaging strategy in the combination layer. Unlike voting strategies, the weighted averaging strategy considers the predictive ability or accuracy of different learners, assigning different weights to each learner based on their predictive ability or accuracy. The higher the weight of a learner, the more influential its caching performance prediction. By using a weighted averaging strategy to calculate the caching performance predictions of multiple learners, the caching performance of the initial group can be obtained. The weighted averaging strategy can better utilize the model with the better prediction results when the caching performance prediction results of different learners differ significantly.

[0090] In an exemplary embodiment, generating a new population by performing evolutionary processing on the initial population based on the initial population's health value, mutation probability threshold, and crossover probability threshold includes: selecting target group distributed cache parameters in the initial population based on the initial population's health value; performing a crossover operation on the target group distributed cache parameters based on the crossover probability threshold; and performing mutation processing on the initial population based on the mutation probability threshold to obtain a new population.

[0091] Optionally, during the genetic evolution process, selection, crossover, and mutation operations are performed on the initial population based on its health value, mutation probability threshold, and crossover probability threshold. The selection operation refers to choosing target group distributed cache parameters from the initial population based on its health value. For example, a preset number of distributed cache parameter sets can be selected from multiple sets of distributed cache parameters in the initial population based on its health value, serving as the target group distributed cache parameters. These target group distributed cache parameters are used to participate in subsequent crossover and mutation operations.

[0092] Crossover is used to simulate the genetic recombination process in organisms. It involves randomly selecting two sets of distributed cache parameters from the target set. A random number is generated; if this random number is less than or equal to a crossover probability threshold, the crossover operation is performed; otherwise, it is skipped. The crossover operation generates two new sets of distributed cache parameters. Crossover methods can include single-point crossover, two-point crossover, and uniform crossover.

[0093] Mutation refers to randomly altering a portion of an individual's genes to introduce new genetic variations and enhance population diversity. Mutation can involve randomly selecting a set of distributed cache parameters from a target group. By generating a random number, if the random number is less than or equal to a mutation probability threshold, the mutation operation is performed. Depending on the encoding method (e.g., binary encoding), a specific gene position can be randomly selected and modified to obtain a new set of distributed cache parameters. If the random number is greater than the mutation probability threshold, the mutation operation is skipped.

[0094] A new population is obtained based on the target group's distributed cache parameters, two new distributed cache parameter groups generated by the crossover operation, and a new distributed cache parameter group generated by the mutation operation.

[0095] In this embodiment, by performing genetic evolution on the initial population, the survival-of-the-fittest mechanism in biological evolution is simulated, resulting in distributed cache parameters with optimal cache performance. The genetic evolution approach also allows for simultaneous calculation and comparison of individuals within the population; this potential parallelism enables the algorithm to converge quickly, improving parameter optimization efficiency.

[0096] In an exemplary embodiment, the method further includes a training step for a cache performance prediction model, which includes: inputting cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster into multiple learners of the initial model to obtain the learner prediction result of each learner; combining the learner prediction results of multiple learners through a combination layer of the initial model to obtain a target prediction result; and training the initial model based on the target prediction result to obtain the cache performance prediction model.

[0097] Optionally, during model training, automated scripts can be used to collect cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster. Cache runtime environment configuration data refers to different configuration items of the environment, which may include machine type (container / virtual machine / physical machine), CPU (Central Processing Unit) configuration, memory configuration, network interface card size, storage size, etc. Cache performance data may include CPU utilization, memory utilization, IO (Input / Output) throughput, real-time OPS (Operations Per Second), response time, AOF (Append Only File) size, maximum output buffer queue size, memory fragmentation rate, master-slave node offset, etc. Cache runtime configuration parameters may include maximum memory, eviction policy, maximum number of connections, buffer size, persistence switch, connection persistence switch, timeout duration, etc.

[0098] The cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster are input into multiple learners of the initial model to obtain the learner prediction results for each learner. The learner prediction results refer to the predicted cache performance.

[0099] The initial model's combination layer employs a combination strategy to combine the predictions from multiple learners to obtain the target prediction result. The target prediction result refers to the final predicted cache performance. The initial model is then trained based on the target prediction result until a certain number of iterations is reached or the target preset result no longer changes, resulting in a cache performance prediction model.

[0100] Alternatively, caching performance can be primarily expressed through the execution time of a single job:

[0101] t=f(e,d,w,conf);

[0102] Where t represents the job execution time, e represents the cache runtime environment configuration data, d represents the size of the dataset, including cache runtime environment configuration data, cache performance data and cache runtime configuration parameters, w represents cache performance data, and conf represents cache runtime configuration parameters.

[0103] In this embodiment, the cache performance prediction model is trained based on multiple dimensions of data, including cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster. This improves the comprehensiveness of the training data and enhances the accuracy and versatility of the cache performance prediction model.

[0104] 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.

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

[0106] In one exemplary embodiment, such as Figure 3 As shown, a distributed cache parameter optimization device is provided, including: a population generation module 302, a performance prediction module 304, a genetic evolution module 306, and a parameter optimization module 308, wherein:

[0107] The population generation module 302 is used to randomly generate multiple sets of distributed cache parameters as the initial population.

[0108] The performance prediction module 304 is used to input the initial population into multiple learners of the cache performance prediction model, predict the cache performance of the initial population, and determine the health value of the initial population based on the cache performance of the initial population.

[0109] The genetic evolution module 306 is used to perform evolutionary processing on the initial population based on the initial population's health value, mutation probability threshold, and crossover probability threshold to generate a new population.

[0110] The parameter optimization module 308 is used to update the new population to the initial population, return the steps of inputting the initial population into multiple learners of the cache performance prediction model, iteratively evolve the process, and obtain a set of distributed cache parameters with optimal cache performance.

[0111] In an exemplary embodiment, the performance prediction module 304 is further configured to input the initial population into multiple learners of the cache performance prediction model to obtain the cache performance prediction result of each learner; the multiple learners include, but are not limited to, generative adversarial networks, artificial neural networks, support vector machines, and regression trees; and to combine the cache performance prediction results of the multiple learners through the combination layer of the cache performance prediction model to obtain the cache performance of the initial population.

[0112] In an exemplary embodiment, the performance prediction module 304 is further configured to determine the health value of the initial population based on the cache performance of the initial population and preset constraints.

[0113] In an exemplary embodiment, the performance prediction module 304 is further configured to use a voting strategy to process the cache performance prediction results of multiple learners through the combination layer of the cache performance prediction model; and determine the cache performance prediction result that appears most frequently as the cache performance of the initial group.

[0114] In an exemplary embodiment, the performance prediction module 304 is further configured to perform weighted averaging on the cache performance prediction results of multiple learners through a weighted averaging strategy using a combination layer of the cache performance prediction model, so as to obtain the cache performance of the initial group.

[0115] In an exemplary embodiment, the genetic evolution module 306 is further configured to select target group distributed cache parameters in the initial population based on the health value of the initial population; perform crossover operation on the target group distributed cache parameters based on the crossover probability threshold; and perform mutation processing on the initial population based on the mutation probability threshold to obtain a new population.

[0116] In one exemplary embodiment, the above-described apparatus further includes:

[0117] The model training module is used to input the cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster into multiple learners of the initial model to obtain the learner prediction results of each learner; the learner prediction results of multiple learners are combined through the combination layer of the initial model to obtain the target prediction result; the initial model is trained based on the target prediction result to obtain the cache performance prediction model.

[0118] Each module in the aforementioned distributed cache parameter optimization 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 call and execute the operations corresponding to each module.

[0119] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As 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 operating system and computer programs stored in the non-volatile storage media. The database stores data such as cache performance prediction models. 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 executed by the processor, the computer program implements a distributed cache parameter optimization method.

[0120] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a distributed cache parameter optimization method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0121] Those skilled in the art will understand that Figure 5The 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.

[0122] 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 implement the steps in the above-described method embodiments.

[0123] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0124] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

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

[0126] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile 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, etc., and are not limited to these.

[0127] 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 specification.

[0128] 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 method for optimizing distributed cache parameters, characterized in that, The method includes: Multiple sets of distributed cache parameters are randomly generated as the initial group; The initial population is fed into multiple learners of the cache performance prediction model to predict the cache performance of the initial population, and the health value of the initial population is determined based on the cache performance of the initial population. The initial population is subjected to evolutionary processing based on its health value, mutation probability threshold, and crossover probability threshold to generate a new population. The new population is updated to the initial population, and the process of inputting the initial population into multiple learners of the cache performance prediction model is returned. The process is iteratively evolved to obtain a set of distributed cache parameters with optimal cache performance.

2. The method according to claim 1, characterized in that, The step of inputting the initial population into multiple learners of the cache performance prediction model to predict the cache performance of the initial population includes: The initial population is input into multiple learners of the cache performance prediction model to obtain the cache performance prediction result of each learner; the multiple learners include, but are not limited to, generative adversarial networks, artificial neural networks, support vector machines, and regression trees; The cache performance prediction results of multiple learners are combined through the combination layer of the cache performance prediction model to obtain the cache performance of the initial group.

3. The method according to claim 1, characterized in that, Determining the health value of the initial population based on its cache performance includes: The health value of the initial group is determined based on the cache performance of the initial group and preset constraints.

4. The method according to claim 2, characterized in that, The step of combining the cache performance prediction results of multiple learners through the combination layer of the cache performance prediction model to obtain the cache performance of the initial group includes: Through the combination layer of the cache performance prediction model, a voting strategy is adopted to process the cache performance prediction results of multiple learners. The cache performance prediction result that appears most frequently is determined as the cache performance of the initial group.

5. The method according to claim 2, characterized in that, The step of combining the cache performance prediction results of multiple learners through the combination layer of the cache performance prediction model to obtain the cache performance of the initial group includes: By using the combined layer of the cache performance prediction model, a weighted averaging strategy is adopted to perform weighted averaging on the cache performance prediction results of multiple learners to obtain the cache performance of the initial group.

6. The method according to claim 1, characterized in that, The step of performing evolutionary processing on the initial population based on the health value, mutation probability threshold, and crossover probability threshold of the initial population to generate a new population includes: Based on the health values ​​of the initial group, the target group distributed cache parameters are selected from the initial group; The target group's distributed cache parameters are cross-operated according to the cross-operation probability threshold, and the initial population is mutated according to the mutation probability threshold to obtain a new population.

7. The method according to claim 1, characterized in that, The method further includes: The cache runtime environment configuration data, cache performance data, and cache runtime configuration parameters of the distributed cache cluster are input into multiple learners of the initial model to obtain the learner prediction results of each learner. The prediction results of multiple learners are combined through the combination layer of the initial model to obtain the target prediction result. The initial model is trained based on the target prediction results to obtain a cache performance prediction model.

8. A distributed cache parameter optimization device, characterized in that, The device includes: The population generation module is used to randomly generate multiple sets of distributed cache parameters as the initial population. The performance prediction module is used to input the initial population into multiple learners of the cache performance prediction model, predict the cache performance of the initial population, and determine the health value of the initial population based on the cache performance of the initial population. The genetic evolution module is used to perform evolutionary processing on the initial population based on the initial population's health value, mutation probability threshold, and crossover probability threshold to generate a new population; The parameter optimization module is used to update the new population to the initial population, return to the step of inputting the initial population into multiple learners of the cache performance prediction model, and perform iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.

9. 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 7.

10. 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 7.

Citation Information

Patent Citations

  • A parameter selection optimization method, system and equipment in random forest model training

    CN113591944A

  • Fuel cell performance degradation prediction method

    CN116306226A