[go: up one dir, main page]

CN119415565A - Distributed cache parameter optimization method, device, computer equipment and storage medium - Google Patents

Distributed cache parameter optimization method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN119415565A
CN119415565A CN202411724377.1A CN202411724377A CN119415565A CN 119415565 A CN119415565 A CN 119415565A CN 202411724377 A CN202411724377 A CN 202411724377A CN 119415565 A CN119415565 A CN 119415565A
Authority
CN
China
Prior art keywords
cache
initial
cache performance
learners
population
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411724377.1A
Other languages
Chinese (zh)
Inventor
叶鹏
常江
冀曙光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Life Insurance Co ltd
Original Assignee
China Life Insurance Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Life Insurance Co ltd filed Critical China Life Insurance Co ltd
Priority to CN202411724377.1A priority Critical patent/CN119415565A/en
Publication of CN119415565A publication Critical patent/CN119415565A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a distributed cache parameter optimization method, a distributed cache parameter optimization device, computer equipment and a storage medium. The method comprises the steps of randomly generating a plurality of groups of distributed cache parameters to serve as initial groups, respectively inputting the initial groups into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial groups, determining the health value of the initial groups according to the cache performance of the initial groups, carrying out evolution processing on the initial groups according to the health value, mutation probability threshold and crossover probability threshold of the initial groups to generate new groups, updating the new groups into the initial groups, returning to the step of respectively inputting the initial groups into the plurality of learners of the cache performance prediction model, and carrying out iterative evolution processing to obtain a group of distributed cache parameters with optimal cache performance. By adopting the method, the efficiency and accuracy of distributed cache parameter tuning can be improved.

Description

Distributed cache parameter optimization method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for optimizing distributed cache parameters, a computer device, and a storage medium.
Background
In order to improve service operation efficiency, internet enterprises and large-scale data centers widely use distributed caches to improve system performance and effectively relieve database pressure. However, with the continuous expansion of data size, the continuous increase of user access, the diversification of business requirements and the promotion of technical development, enterprises have raised higher requirements on the data processing performance, the expandability and the high availability of the distributed cache. Distributed cache parameter optimization involves a number of aspects including selection and optimization of cache policies, data slicing and load balancing, performance monitoring and tuning, high availability and fault tolerance, and the like.
In the traditional technology, the distributed cache parameters are adjusted and optimized by manually continuously monitoring and then formulating and selecting a proper optimization strategy, however, the manual adjustment and optimization needs to take a lot of time to collect various data, the parameter adjustment and optimization efficiency is low, the manual adjustment and optimization depends on personal experience to a great extent, and the accuracy of the parameter adjustment and optimization is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a distributed cache parameter optimization method, apparatus, computer device, and storage medium that can improve the efficiency and accuracy of distributed cache parameter tuning.
In a first aspect, the present application provides a distributed cache parameter optimization method, including:
Randomly generating a plurality of groups of distributed cache parameters as an initial group;
respectively inputting the initial group into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
Carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
updating the new population into an initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.
In one embodiment, the initial population is input to a plurality of learners of a cache performance prediction model, respectively, and predicting the cache performance of the initial population includes:
Respectively inputting the initial population into a plurality of learners of a cache performance prediction model to obtain a cache performance prediction result of each learner, wherein the learners comprise but are not limited to a generation countermeasure network, an artificial neural network, a support vector machine and a regression tree;
and combining the cache performance prediction results of the learners through a combination layer of the cache performance prediction model to obtain the cache performance of the initial group.
In one embodiment, determining the health value of the initial population based on the cache performance of the initial population comprises:
and determining the health value of the initial population according to the cache performance of the initial population and a preset constraint condition.
In one embodiment, the combining the cache performance prediction results of the learners through the combining layer of the cache performance prediction model to obtain the cache performance of the initial group includes:
Voting treatment is carried out on the cache performance prediction results of a plurality of learners by adopting a voting strategy through a combination layer of the cache performance prediction model;
And determining the cache performance prediction result with the largest occurrence number as the cache performance of the initial group.
In one embodiment, the combining the cache performance prediction results of the learners through the combining layer of the cache performance prediction model to obtain the cache performance of the initial group includes:
And carrying out weighted average processing on the cache performance prediction results of the learners by adopting a weighted average strategy through a combination layer of the cache performance prediction model to obtain the cache performance of the initial group.
In one embodiment, performing an evolutionary process on the initial population according to the health value, the mutation probability threshold, and the crossover probability threshold of the initial population, generating a new population comprises:
Selecting a target group distributed cache parameter in the initial population according to the health value of the initial population;
And performing cross operation on the distributed cache parameters of the target group according to the cross probability threshold value, and performing mutation treatment on the initial group according to the mutation probability threshold value to obtain a new group.
In one embodiment, the method further comprises:
The method comprises the steps of inputting cache running environment configuration data, cache performance data and cache running configuration parameters of a distributed cache cluster into a plurality of learners of an initial model to obtain a learner prediction result of each learner;
combining learner prediction results of a plurality of learners through a combination layer of the initial model to obtain a target prediction result;
And training the initial model according to the target prediction result to obtain a cache performance prediction model.
In a second aspect, the present application further provides a distributed cache parameter optimization apparatus, including:
The group generation module is used for randomly generating a plurality of groups of distributed cache parameters to serve as an initial group;
The performance prediction module is used for respectively inputting the initial group into a plurality of learners of the cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
the genetic evolution module is used for carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
And the parameter optimization module is used for updating the new population into an initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Randomly generating a plurality of groups of distributed cache parameters as an initial group;
respectively inputting the initial group into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
Carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
updating the new population into an initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Randomly generating a plurality of groups of distributed cache parameters as an initial group;
respectively inputting the initial group into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
Carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
updating the new population into an initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
Randomly generating a plurality of groups of distributed cache parameters as an initial group;
respectively inputting the initial group into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
Carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
updating the new population into an initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.
According to the distributed cache parameter optimization method, the device, the computer equipment, the storage medium and the computer program product, the cache performance prediction model comprises a plurality of learners, the learners are combined into one strong learner through the integrated learning algorithm, and model training can be carried out by using less training data on the premise that model accuracy is not required to be sacrificed, so that the time spent on data acquisition is reduced, and the parameter optimization efficiency is improved. Based on a cache performance prediction model, an optimized genetic evolution method is used for obtaining a group of distributed cache parameters with optimal cache performance, and the optimized genetic evolution method has good randomness and is not easy to fall into local optimum, so that the obtained optimal parameters have universality. Meanwhile, the method adopts a full-automatic means, does not need manual operation and screening, can greatly improve the parameter optimization efficiency, shortens the optimization period, and has higher parameter optimization efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a distributed cache parameter optimization method in one embodiment;
FIG. 2 is a flow chart of predicting the cache performance of an initial population by respectively inputting the initial population to a plurality of learners of a cache performance prediction model according to one embodiment;
FIG. 3 is a block diagram of a distributed cache parameter optimization apparatus in one embodiment;
FIG. 4 is an internal block diagram of a computer device in one embodiment;
Fig. 5 is an internal structural view of a computer device in another embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Distributed cache parameter optimization involves several aspects including selection and optimization of cache policies, data slicing and load balancing, performance monitoring and tuning, high availability and fault tolerance, etc., and in reality it is very difficult for a user to select the best configuration parameters in such a complex parameter space, so that the user often accepts default configurations, but these configurations are inefficient and even lead to a risk of unavailability. Based on the situation, the performance, the expandability and the usability of the distributed cache can be improved by optimizing the distributed cache parameters, so that the requirements of modern Internet enterprises and large-scale data centers are better met.
In the traditional technology, enterprises continuously monitor by manpower according to the service characteristics and the requirements of the enterprises, and then proper optimization strategies are formulated and selected to adjust the distributed cache parameters.
However, the distributed cache parameter configuration has a certain space exploration complexity, firstly, the configuration of different basic environments and the complex interaction between the cache parameters, and secondly, the inter-coordination relationship of the different parameter configurations of the distributed cache, which results in the following defects of the manual optimization scheme in the traditional technology:
1. Because of the limitation of manual operation, the manual tuning has narrower coverage, the acquired data is limited, the combination of all basic environment scenes and parameters is difficult to cover, and the provided proposal has no universality.
2. Due to the complexity of the environment and the diversity of parameters, a great deal of time is needed for manually adjusting and collecting various data, the overall efficiency is low, and the adjusting and optimizing period is long.
3. Because the manual tuning is greatly dependent on personal experience, the method has higher subjectivity, is difficult to objectively reflect the effect of parameter tuning, and has lower accuracy.
In an exemplary embodiment, as shown in fig. 1, a distributed cache parameter optimization method is provided, where this embodiment is applied to a terminal to illustrate the method, it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
Step 102, randomly generating a plurality of candidate distributed cache parameters as an initial population.
Wherein, the multiple groups of distributed cache parameters refer to cache configuration parameters for parameter optimization.
Alternatively, since the number of distributed cache configurations is large and the parameter ranges vary with the underlying hardware environment, the distributed cache configurations corresponding to the application cannot be enumerated. Thus, a heuristic algorithm may be used to explore the optimal solution in the parameter space of the distributed cache configuration.
Illustratively, multiple sets of distributed caching parameters are randomly generated in a parameter space, and an initial population is composed according to the multiple sets of distributed caching parameters. The initial population may 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 a plurality of distributed cache configurations.
Step 104, respectively inputting the initial group into a plurality of learners of the cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group.
Optionally, invoking a pre-trained cache performance prediction model, wherein the cache performance prediction model comprises a base learning layer, the base learning layer comprises a plurality of learners, respectively inputting the initial group into the learners, and independently processing the initial group by each learner to finally obtain the cache performance of the initial group. 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 obtained through training of an integrated learning algorithm, a plurality of learners can be combined into a strong learner, and model construction can be carried out by using less training data on the premise of not sacrificing model accuracy.
After the cache performance of the initial group is obtained, the cache performance of the initial group is taken as the fitness, and the fitness of each distributed cache parameter is obtained. The fitness refers to an index of fitness or goodness of an individual to an objective function targeting optimal cache performance. And then determining the health value of the initial population according to the cache performance of the initial population. Health values are used to measure the ability of an individual to survive in a population or to perform comprehensively under a variety of conditions.
Alternatively, the cache performance of the initial population may be the execution time of the job, with shorter execution time and better cache performance.
And 106, carrying out evolution processing on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population.
Optionally, selecting, crossing and mutating the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to obtain a new population. The new population may be represented as P' = { conf1r, conf2r,.. confkr }, confkr representing individuals in the new population. The mutation probability threshold is used for judging whether mutation operation is carried out or not. The crossover probability threshold is used to determine whether to perform crossover operations.
Step 108, updating the new population into an initial population, and returning to the step of inputting the initial population, the mutation probability threshold value and the crossover probability threshold value of the initial population into a pre-trained cache performance prediction model to predict the cache performance of the initial population, and performing iterative evolutionary processing to obtain a set of distributed cache parameters with optimal cache performance.
Optionally, taking the new population as an initial population, returning to step 104, respectively inputting the initial population into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial population, determining the health value of the initial population according to the cache performance of the initial population, and cycling the iterative evolutionary processing process until the preset iterative times are reached, thereby obtaining a set of distributed cache parameters with optimal cache performance.
Alternatively, before the first evolution process is performed, the initial population may be input to a plurality of learners of the cache performance prediction model, respectively, to predict the cache performance of the initial population. And carrying out evolution treatment on the initial population according to the cache performance, the mutation probability threshold and the crossover probability threshold to generate a new population. And in the subsequent evolutionary processing process, performing evolutionary processing according to the health values of the groups until a group of distributed cache parameters with optimal cache performance is obtained.
In the distributed cache parameter optimization method, the cache performance prediction model comprises a plurality of learners, and the learners are combined into one strong learner through the integrated learning algorithm, so that model training can be performed by using less training data on the premise of not sacrificing model accuracy, the time spent on data acquisition is reduced, and the parameter optimization efficiency is improved. Based on a cache performance prediction model, an optimized genetic evolution method is used for obtaining a group of distributed cache parameters with optimal cache performance, and the optimized genetic evolution method has good randomness and is not easy to fall into local optimum, so that the obtained optimal parameters have universality. Meanwhile, the method adopts a full-automatic means, does not need manual operation and screening, can greatly improve the parameter optimization efficiency, shortens the optimization period, and has higher parameter optimization efficiency.
In an exemplary embodiment, as shown in fig. 2, the initial population is input to a plurality of learners of a cache performance prediction model, respectively, and predicting the cache performance of the initial population includes the following steps 202 to 204. Wherein:
Step 202, inputting the initial population to a plurality of learners of the cache performance prediction model to obtain a cache performance prediction result of each learner, wherein the learners include but are not limited to generating an countermeasure network, an artificial neural network, a support vector machine and a regression tree.
And 204, combining the cache performance prediction results of the learners through a combination layer of the cache performance prediction model to obtain the cache performance of the initial group.
Optionally, the cache performance prediction model includes a base learning layer, a combining layer, and an output layer, the base learning layer including a plurality of learners. The plurality of learners includes, but is not limited to, generating an countermeasure network, an artificial neural network, a support vector machine, and a regression tree. Each learner independently performs data processing.
And respectively inputting the initial group into a plurality of learners of the cache performance prediction model, and independently predicting the cache performance of the initial group by each learner to obtain a cache performance prediction result of each learner. And combining the cache performance prediction results of the learners through a combination layer of the cache performance prediction model to obtain the cache performance of the initial group. The cache performance of the initial population is output through the output layer.
In the embodiment, a plurality of learners are combined into one strong learner through the integrated learning algorithm, and model training can be performed by using less training data on the premise of not sacrificing model accuracy, so that the time spent on data acquisition is effectively reduced, and the parameter optimization efficiency is further improved.
In one exemplary embodiment, determining the health value of the initial population based on the cache performance of the initial population includes determining the health value of the initial population based on the cache performance of the initial population and a preset constraint.
Alternatively, the preset constraint may be a numerical range constraint of cache performance. If the individual cache performance violates the constraint, the health value may be reduced by adding a penalty term, i.e., health value = fitness value- λ x penalty term, where λ is the penalty factor, and the penalty term may be the degree to which the preset constraint is violated or other relevant factors.
Alternatively, if the range of fitness is large, it can be adjusted to a fixed range (e.g., 0 to 1) by normalization or normalization, which can make the health value more stableWherein, the method comprises the steps of,The degree of adaptation is indicated by the degree of adaptation,AndRepresenting minimum fitness and maximum fitness, respectively.
In an exemplary embodiment, the combination layer of the cache performance prediction model may use different combination strategies to combine the cache performance prediction results of the multiple learners. The different combining strategies may include voting strategies, weighted average strategies, and the like.
In one embodiment, the combining of the cache performance prediction results of the learners through the combining layer of the cache performance prediction model to obtain the cache performance of the initial group comprises the steps of voting the cache performance prediction results of the learners through the combining layer of the cache performance prediction model by adopting a voting strategy, and determining the cache performance prediction result with the largest occurrence number as the cache performance of the initial group.
The combination layer can adopt a voting strategy to determine the cache performance prediction result with the largest occurrence number as the cache performance of the initial group. The model prediction accuracy can be improved through an integrated learning algorithm under the condition that a plurality of learners have similar prediction capability.
In one embodiment, the combining the cache performance prediction results of the learners through the combining layer of the cache performance prediction model to obtain the cache performance of the initial group comprises the step of performing weighted average processing on the cache performance prediction results of the learners through the combining layer of the cache performance prediction model by adopting a weighted average strategy to obtain the cache performance of the initial group.
The combining layer may also adopt a weighted average policy to obtain the cache performance of the initial population. The weighted average strategy is different from the voting strategy, and takes the prediction capability or accuracy of different learners into consideration, so that each learner can be assigned different weights according to the prediction capability or accuracy of the learner. The higher the weight of the learner, the more influential it can predict the cache performance. And carrying out weighted average processing on the cache performance prediction results of the learners by adopting a weighted average strategy to obtain the cache performance of the initial group. The weighted average strategy can better utilize a model with a better prediction result when the difference of the cache performance prediction results of different learners is too large.
In an exemplary embodiment, performing evolutionary processing on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population, and generating a new population comprises selecting a target group distributed cache parameter in the initial population according to the health value of the initial population, performing crossover operation on the target group distributed cache parameter according to the crossover probability threshold, and performing mutation processing on the initial population according to the mutation probability threshold to obtain the new population.
Optionally, during the genetic evolution process, the initial population is selected, crossed and mutated according to the health value, mutation probability threshold and crossover probability threshold of the initial population. The selecting operation refers to selecting a target set of distributed cache parameters in the initial population according to the health value of the initial population. For example, a preset number of distributed cache parameter sets may be selected from the multiple groups of distributed cache parameters of the initial population according to the health value of the initial population, and the preset number of distributed cache parameter sets may be used as the target group distributed cache parameters. The target set of distributed cache parameters are used to participate in subsequent interleaving and mutation operations.
The crossover operation is used for simulating a gene recombination process of organisms and comprises the step of randomly selecting two groups of distributed cache parameters in a target group of distributed cache parameters. And generating a random number, if the random number is smaller than or equal to the crossover probability threshold value, executing crossover operation, otherwise, skipping crossover operation. Two new sets of distributed caching parameters are generated by a interleaving operation. The crossing pattern may include single point crossing, double point crossing, uniform crossing, etc.
The mutation operation refers to randomly changing part of the contents in individual genes, so that new genetic variation is introduced, and the diversity of the population is enhanced. The mutation operation may include randomly selecting a set of distributed caching parameters among the target set of distributed caching parameters. By generating a random number, if the random number is less than or equal to the mutation probability threshold, then performing mutation operation, and randomly selecting a certain gene bit and changing the gene bit according to the coding mode (for example, binary coding), thus obtaining a new distributed cache parameter set. If the random number is greater than the mutation probability threshold, then the mutation operation is skipped.
And obtaining a new group according to the target group distributed cache parameters, the two new distributed cache parameter groups generated by the cross operation and the new distributed cache parameter group generated by the mutation operation.
In this embodiment, by performing genetic evolution processing on the initial population, an adaptive survival mechanism in the process of simulating biological evolution is realized, and a distributed cache parameter with optimal cache performance can be obtained. The genetic evolution mode can also calculate and compare individuals in the population at the same time, and the potential parallelism enables the algorithm to be converged rapidly, so that the parameter optimization efficiency is improved.
In an exemplary embodiment, the method further comprises a training step of the cache performance prediction model, wherein the training step comprises the steps of inputting cache running environment configuration data, cache performance data and cache running configuration parameters of the distributed cache clusters into a plurality of learners of the initial model to obtain a learner prediction result of each learner, combining the learner prediction results of the learners through a combination layer of the initial model to obtain a target prediction result, and training the initial model according to the target prediction result to obtain the cache performance prediction model.
Optionally, in the model training process, the cache running environment configuration data, the cache performance data and the cache running configuration parameters of the distributed cache cluster are collected through an automation script. The cache running environment configuration data refers to different configuration items of environment configuration, and may include a machine type (container/virtual machine/physical machine), a CPU (Central Processing Unit ) configuration, a memory configuration, a network card size, a storage size, and the like. The cache performance data may include CPU utilization, memory utilization, IO (Input/Output) throughput, real-time OPS (Operations Per Second, operands per second), response time duration, AOF (application Only File) size, output buffer maximum queue, memory fragmentation rate, master-slave node offset, etc. The operation configuration parameters of the cache may include maximum memory, elimination policy, maximum connection number, buffer size, persistence switch, connection hold switch, timeout period, etc.
And inputting the cache running environment configuration data, the cache performance data and the cache running configuration parameters of the distributed cache cluster into a plurality of learners of the initial model to obtain a learner prediction result of each learner. The learner predicted result refers to a predicted result of the cache performance.
Combining learner prediction results of a plurality of learners by adopting a combination strategy through a combination layer of the initial model to obtain a target prediction result. The target prediction result refers to the final predicted cache performance. Training the initial model according to the target prediction result until the iteration times are reached or the target preset result is not changed, and obtaining the cache performance prediction model.
Alternatively, the cache performance is mainly expressed by the execution time of one job:
t=f(e,d,w,conf);
wherein t represents execution time of the job, e represents cache running environment configuration data, d represents size of a data set, including cache running environment configuration data, cache performance data and cache running configuration parameters, w represents cache performance data, and conf represents cache running configuration parameters.
In this embodiment, the cache performance prediction model is trained according to the cache running environment configuration data, the cache performance data and the data of multiple dimensions of the cache running configuration parameters of the distributed cache cluster, so that the comprehensiveness of the training data can be improved, and the accuracy and the universality of the cache performance prediction model can be improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a distributed cache parameter optimization device for realizing the above related distributed cache parameter optimization method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the one or more distributed cache parameter optimization apparatuses provided below may be referred to the limitation of the distributed cache parameter optimization method hereinabove, and will not be repeated herein.
In one exemplary embodiment, as shown in FIG. 3, a distributed cache parameter optimization apparatus is provided, comprising a population generation module 302, a performance prediction module 304, a genetic evolution module 306, and a parameter optimization module 308, wherein:
the population generation module 302 is configured to randomly generate a plurality of groups of distributed cache parameters as an initial population.
The performance prediction module 304 is configured to input the initial population to a plurality of learners of the cache performance prediction model, predict the cache performance of the initial population, and determine a health value of the initial population according to the cache performance of the initial population.
The genetic evolution module 306 is configured to perform evolutionary processing on the initial population according to the health value, the mutation probability threshold value, and the crossover probability threshold value of the initial population, and generate a new population.
The parameter optimization module 308 is configured to update the new population to an initial population, return to a step of inputting the initial population to a plurality of learners of the cache performance prediction model respectively, and iterate the evolution processing to obtain a set of distributed cache parameters with optimal cache performance.
In an exemplary embodiment, the performance prediction module 304 is further configured to input the initial group to a plurality of learners of the cache performance prediction model, to obtain a cache performance prediction result of each learner, where the plurality of learners include, but are not limited to, generating an countermeasure network, an artificial neural network, a support vector machine, and a regression tree, and perform a combination process on the cache performance prediction results of the plurality of learners through a combination layer of the cache performance prediction model, to obtain the cache performance of the initial group.
In an exemplary embodiment, the performance prediction module 304 is further configured to determine a health value of the initial population according to the cache performance of the initial population and a preset constraint.
In an exemplary embodiment, the performance prediction module 304 is further configured to vote on the cache performance prediction results of the plurality of learners by adopting a voting policy through a combination layer of the cache performance prediction model, and determine the cache performance prediction result with the largest occurrence number as the cache performance of the initial group.
In an exemplary embodiment, the performance prediction module 304 is further configured to perform weighted average processing on the cache performance prediction results of the plurality of learners by adopting a weighted average policy through a combination layer of the cache performance prediction model, so as to obtain the cache performance of the initial population.
In an exemplary embodiment, the genetic evolution module 306 is further configured to select a target group distributed cache parameter in the initial population according to the health value of the initial population, perform a crossover operation on the target group distributed cache parameter according to a crossover probability threshold, and perform mutation processing on the initial population according to a mutation probability threshold to obtain a new population.
In an exemplary embodiment, the above apparatus further includes:
The model training module is used for inputting the cache running environment configuration data, the cache performance data and the cache running configuration parameters of the distributed cache cluster into a plurality of learners of the initial model to obtain a learner prediction result of each learner, combining the learner prediction results of the learners through a combination layer of the initial model to obtain a target prediction result, and training the initial model according to the target prediction result to obtain the cache performance prediction model.
The modules in the distributed cache parameter optimization device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as cache performance prediction models. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a distributed cache parameter optimization method.
In one exemplary embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 5. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program when executed by a processor implements a distributed cache parameter optimization method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for optimizing distributed cache parameters, the method comprising:
Randomly generating a plurality of groups of distributed cache parameters as an initial group;
respectively inputting the initial group into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
Carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
and updating the new population into the initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a group of distributed cache parameters with optimal cache performance.
2. The method of claim 1, wherein the inputting the initial population into a plurality of learners of a cache performance prediction model, respectively, predicts the cache performance of the initial population comprising:
The initial group is respectively input into a plurality of learners of a cache performance prediction model to obtain a cache performance prediction result of each learner, wherein the learners comprise but are not limited to a generation countermeasure network, an artificial neural network, a support vector machine and a regression tree;
and combining the cache performance prediction results of the learners through a combination layer of the cache performance prediction model to obtain the cache performance of the initial group.
3. The method of claim 1, wherein the determining the health value of the initial population based on the cache performance of the initial population comprises:
and determining the health value of the initial population according to the cache performance of the initial population and a preset constraint condition.
4. The method of claim 2, wherein the combining, by the combining layer of the cache performance prediction model, the cache performance prediction results of the plurality of learners to obtain the cache performance of the initial population includes:
voting treatment is carried out on cache performance prediction results of a plurality of learners by adopting a voting strategy through a combination layer of the cache performance prediction model;
and determining the cache performance prediction result with the largest occurrence number as the cache performance of the initial group.
5. The method of claim 2, wherein the combining, by the combining layer of the cache performance prediction model, the cache performance prediction results of the plurality of learners to obtain the cache performance of the initial population includes:
And carrying out weighted average processing on the cache performance prediction results of a plurality of learners by adopting a weighted average strategy through a combination layer of the cache performance prediction model to obtain the cache performance of the initial group.
6. The method of claim 1, wherein the performing the evolutionary process on the initial population according to the health value, mutation probability threshold, and crossover probability threshold of the initial population, generating a new population comprises:
selecting a target group distributed cache parameter in the initial population according to the health value of the initial population;
and performing cross operation on the distributed cache parameters of the target group according to a cross probability threshold value, and performing mutation processing on the initial population according to a mutation probability threshold value to obtain a new population.
7. The method according to claim 1, wherein the method further comprises:
The method comprises the steps of inputting cache running environment configuration data, cache performance data and cache running configuration parameters of a distributed cache cluster into a plurality of learners of an initial model to obtain a learner prediction result of each learner;
combining learner prediction results of a plurality of learners through a combination layer of the initial model to obtain a target prediction result;
And training the initial model according to the target prediction result to obtain a cache performance prediction model.
8. A distributed cache parameter optimization apparatus, the apparatus comprising:
The group generation module is used for randomly generating a plurality of groups of distributed cache parameters to serve as an initial group;
the performance prediction module is used for respectively inputting the initial group into a plurality of learners of a cache performance prediction model, predicting the cache performance of the initial group, and determining the health value of the initial group according to the cache performance of the initial group;
The genetic evolution module is used for carrying out evolution treatment on the initial population according to the health value, the mutation probability threshold and the crossover probability threshold of the initial population to generate a new population;
and the parameter optimization module is used for updating the new population into the initial population, returning to the step of respectively inputting the initial population into a plurality of learners of the cache performance prediction model, and carrying out iterative evolutionary processing to obtain a group of distributed cache parameters with optimal cache performance.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202411724377.1A 2024-11-28 2024-11-28 Distributed cache parameter optimization method, device, computer equipment and storage medium Pending CN119415565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411724377.1A CN119415565A (en) 2024-11-28 2024-11-28 Distributed cache parameter optimization method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411724377.1A CN119415565A (en) 2024-11-28 2024-11-28 Distributed cache parameter optimization method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN119415565A true CN119415565A (en) 2025-02-11

Family

ID=94463748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411724377.1A Pending CN119415565A (en) 2024-11-28 2024-11-28 Distributed cache parameter optimization method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN119415565A (en)

Similar Documents

Publication Publication Date Title
Pappa et al. Attribute selection with a multi-objective genetic algorithm
Huynh et al. A multifactorial optimization paradigm for linkage tree genetic algorithm
US20220121999A1 (en) Federated ensemble learning from decentralized data with incremental and decremental updates
CN116541165A (en) Real-time system task scheduling method, device, computer equipment and storage medium
CN115185804A (en) Server performance prediction method, system, terminal and storage medium
US20210406692A1 (en) Partial-activation of neural network based on heat-map of neural network activity
Drahosova et al. Adaptive fitness predictors in coevolutionary Cartesian genetic programming
CN119415565A (en) Distributed cache parameter optimization method, device, computer equipment and storage medium
CN117376410A (en) Service pushing method, device, computer equipment and storage medium
CN108256694A (en) Based on Fuzzy time sequence forecasting system, the method and device for repeating genetic algorithm
CN116777345A (en) Stock quantity prediction method, system, device and storage medium
Dahi et al. A takeover time-driven adaptive evolutionary algorithm for mobile user tracking in pre-5G cellular networks
CN116312741A (en) Medium formulation optimization method, device, computer equipment and storage medium
Xie et al. Learning fair representations for recommendation via information bottleneck principle
KR20230123864A (en) Method for semiconductor design based on artifitial intelligence
JP7207128B2 (en) Forecasting Systems, Forecasting Methods, and Forecasting Programs
Pan et al. Multi-Objective Design Optimization for Image Classification Using Elastic Neural Networks
CN118364261A (en) Object evaluation method, device, computer equipment and storage medium
CN117372148A (en) Method, apparatus, device, medium and program product for determining credit risk level
CN116862673A (en) Processing result prediction method, device, computer equipment and storage medium
KR20240142818A (en) Method for forecasting Solar Major Flare using Deep Learning Reinforcement Learning and Apparatus thereof
CN119204329A (en) Distributed renewable energy output prediction method and device based on sequence decomposition
CN117407153A (en) Interface access control method, device, computer equipment, storage medium and product
CN119597479A (en) Resource scheduling method, apparatus, computer device, readable storage medium, and program product
CN118313625A (en) Financial service resource allocation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination