Data processing method and device
Through the parameter tuning method based on genetic algorithm, the initial data evaluation score is used to select seed data and preset variables are introduced to limit variation, which solves the problem of low efficiency of high-dimensional parameter tuning and achieves more efficient parameter optimization.
Patent Information
- Application Number
- CN202111592262.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-12-23
AI Technical Summary
Parameter tuning for high-dimensional parameters is inefficient and ineffective, and manual tuning methods are difficult to solve effectively.
A parameter tuning method based on genetic algorithm is adopted. The initial seed data is selected by the initial data evaluation score, preset variables are introduced to limit the number of mutations, and the target seed data is selected according to the preset processing strategy to avoid false optimization and improve the tuning efficiency and effect.
The efficiency and effect of parameter tuning are improved, ensuring that the genetic algorithm can effectively iterate and optimize in high-dimensional parameter space, avoiding the influence of local optimization and outliers.
Smart Images

Figure CN114444692B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a data processing method. Background Art
[0002] Parameter tuning is required in scenarios such as operating system kernels, compilers, and databases. Effective parameter settings can optimize service performance and improve overall service quality. However, these areas involve a large number of parameters, potentially reaching hundreds or even thousands of dimensions.
[0003] Currently, both traditional parameter tuning methods often rely on experienced engineers to perform manual tuning based on domain knowledge; however, high-dimensional parameters pose a greater challenge to manual tuning, which may not only lead to low parameter tuning efficiency but also affect the parameter tuning effect. Summary of the Invention
[0004] In view of this, the present specification provides a data processing method. One or more embodiments of the present specification also relate to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.
[0005] According to a first aspect of an embodiment of this specification, there is provided a data processing method, including:
[0006] Determining an evaluation score of initial data in an initial data set, wherein the initial data includes parameters;
[0007] determining initial seed data from the initial data according to the evaluation score;
[0008] Mutating the parameter values of the parameters in the initial seed data according to the preset variables to obtain updated data after the mutation;
[0009] Determining a preset processing strategy based on the update data and the initial seed data, and determining target seed data and a target variable based on the preset processing strategy;
[0010] Target data is determined according to the target seed data and the target variable.
[0011] According to a second aspect of the embodiments of this specification, there is provided a data processing device, including:
[0012] a score evaluation module configured to determine an evaluation score of initial data in the initial data set, wherein the initial data includes parameters;
[0013] an initial seed determination module, configured to determine initial seed data from the initial data according to the evaluation score;
[0014] a parameter mutation module configured to mutate the parameter values of the parameters in the initial seed data according to preset variables to obtain updated data after mutation;
[0015] a target seed determination module, configured to determine a preset processing strategy based on the update data and the initial seed data, and determine target seed data and a target variable based on the preset processing strategy;
[0016] The parameter tuning module is configured to determine target data according to the target seed data and the target variable.
[0017] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0018] memory and processor;
[0019] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned data processing method are implemented.
[0020] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the above-mentioned data processing method are implemented.
[0021] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned data processing method.
[0022] One embodiment of the present specification implements a data processing method and device, wherein the data processing method includes determining an evaluation score of initial data in an initial data set, wherein the initial data includes parameters; determining initial seed data from the initial data based on the evaluation score; mutating parameter values of the parameters in the initial seed data based on preset variables to obtain mutated updated data; determining a preset processing strategy based on the updated data and the initial seed data, and determining target seed data and target variables based on the preset processing strategy; and determining target data based on the target seed data and the target variables.
[0023] Specifically, the data processing method iteratively tunes the parameters through a genetic algorithm, introduces preset variables to limit the number of times a seed participates in mutation, and avoids "false optimal" seeds blocking the algorithm operation; and continuously selects the preferred target seed data as the initial seed data for the next iteration according to the preset processing strategy for parameter tuning, so as to improve the parameter tuning efficiency and parameter tuning effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flow chart of a parameter tuning algorithm designed based on the genetic algorithm concept provided by one embodiment of this specification;
[0025] Figure 2 is a flow chart of a data processing method provided by one embodiment of this specification;
[0026] Figure 3 This is a specific processing flow chart of a data processing method applied to an operating system kernel parameter tuning scenario provided by an embodiment of this specification;
[0027] Figure 4 This is an example diagram of an operation of a data processing method for parameter tuning provided in one embodiment of this specification;
[0028] Figure 5 This is a schematic diagram of the structure of a data processing device provided by one embodiment of this specification;
[0029] Figure 6 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0030] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0031] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0032] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0033] First, the terms involved in one or more embodiments of this specification are explained.
[0034] Parameter tuning: The process of continuously improving the system's score on a benchmark program by adjusting system parameters.
[0035] System parameters: These are configuration items in the operating system that can be dynamically set and affect application performance, such as kernel configuration parameters and application configuration parameters.
[0036] Benchmark: Also known as a benchmark, it is an evaluation program that estimates the performance of a tuned application and provides a performance score.
[0037] Parameter tuning algorithm: A program that implements an algorithmic strategy and continuously gives system parameter combinations to find parameter configurations that improve application performance.
[0038] Proxy model: A mathematical model that constructs a mapping between system parameter combinations and benchmark program scores, and uses this to guide the operation of the parameter tuning algorithm.
[0039] Genetic algorithm: An optimization algorithm that selects known good parameter combinations, adds random mutations to them, and continuously finds better parameter combinations through multiple iterations.
[0040] Seed: The parameter combination selected in the genetic algorithm as the starting point for mutation.
[0041] Randomized algorithm: An algorithm that uses probability and statistics to make random choices about the next computational step during its execution.
[0042] Latin Hypercube Sampling Algorithm: A method for approximating random sampling from a multivariate parametric distribution.
[0043] In this specification, a data processing method is provided. This specification also relates to a data processing apparatus, a computing device, a computer-readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.
[0044] In practical applications, in order to solve the technical problems of low tuning efficiency and poor tuning effects caused by manual parameter tuning, we can rely on machine learning methods and promote the development of parameter tuning algorithms and tools in scenarios such as operating system kernels, compilers, and databases based on a large amount of tuning data records.
[0045] For example, a Bayesian-based tuning algorithm dynamically searches within a preset parameter space based on real-time feedback on tuning results. This algorithm can be used not only for parameter tuning in computer systems but also for hyperparameter tuning in deep learning models. However, when there are many parameters and the parameter space is high-dimensional, the Bayesian algorithm often requires a longer search cycle.
[0046] To improve the overall tuning efficiency, parameter tuning algorithms designed based on genetic algorithms can be used. These algorithms screen parameter configurations with known high performance, mutate them, and find better parameter configurations through iteration.
[0047] See also Figure 1 , Figure 1 A flow chart of a parameter tuning algorithm designed based on a genetic algorithm concept provided according to one embodiment of this specification is shown.
[0048] Step 102: Data collection.
[0049] Specifically, before the parameter tuning algorithm is run, a certain round of data collection will be performed as initial data, generally using a random algorithm or a Latin hypercube sampling algorithm.
[0050] Taking the tuning of the operating system kernel parameters as an example, before the parameter tuning algorithm is run, a certain number of iterations are performed on the operating system kernel parameters, such as 10 or 100 rounds of iterations, and then the iterated operating system kernel parameters are used as initial data.
[0051] Step 104: Mutation.
[0052] Specifically, based on the initial data, the parameter configuration with the smallest benchmark score (assuming that a reduction in this performance indicator represents a performance improvement, such as latency) is selected as the seed for mutation. The mutation method can be understood as random mutation, that is, one or several parameters in the seed are randomly changed to another value. Generally, the seed is mutated multiple times to expand the sample size. In practical applications, the mutation method is not limited to random mutation, and there can be many other mutation methods, such as mutation through random perturbation, gradient descent, similarity screening, benchmark score prediction, etc. For ease of understanding, this specification only uses random mutation as an example to introduce the embodiment, but does not limit the scheme of mutating the seed by other mutation methods.
[0053] Continuing with the above example, let's assume that the operating system kernel parameters include: parameter 1, parameter 2, parameter 3; and the initial data is data a, data b, and data c.
[0054] Data a, data b, and data c all include parameter 1, parameter 2, and parameter 3, but the parameter values of parameter 1, parameter 2, and parameter 3 in data a, data b, and data c are different.
[0055] In practical applications, the scores of data a, data b, and data c are obtained according to the benchmark, and the data a with the smallest score is selected as the seed, and the seed is mutated; that is, the parameter values of parameter 1, parameter 2, and / or parameter 3 in data a are randomly changed to another value.
[0056] For example, after mutating data a in this way, mutated data a1, data a2 and data a3 are obtained, wherein data a1, data a2 and data a3 all include parameter 1, parameter 2 and parameter 3, but the parameter values of parameter 1, parameter 2 and parameter 3 in data a1, data a2 and data a3 are not exactly the same.
[0057] Step 106: Update the seed.
[0058] Specifically, the mutated parameter configurations are benchmarked sequentially. If a better parameter configuration than the current seed is found (i.e., the benchmark score is smaller), this parameter configuration is used as the new seed, otherwise the original seed is retained.
[0059] Continuing with the above example, the benchmark is executed on the mutated data a1, data a2, and data a3 in sequence to obtain the scores of data a1, data a2, and data a3 respectively. If any of the scores of data a1, data a2, and data a3 is smaller than the score of data a, then this data is used as a new seed. If no data among the scores of data a1, data a2, and data a3 is smaller than the score of data a, then data a is continued to be used as the seed for the next round of iteration.
[0060] Repeat steps 104 and 106 until the algorithm termination condition is reached, and the variation amplitude is continuously reduced during iteration to narrow the search range. The algorithm termination condition can be understood as the number of iteration rounds being greater than a preset round threshold, such as 200 rounds or 300 rounds; or the new seed score exceeding the preset score threshold. For example, taking latency as an example, the preset score threshold is 10ms, and the new seed score is 8ms, that is, the observation value (latency) of the new seed of 8ms is less than the preset score threshold of 10ms. In this case, it can be determined that when the new seed is used for actual data processing, the latency is small and the performance is better. At this time, the iteration can be terminated.
[0061] In actual applications, due to the two reasons that there are random fluctuations in the benchmark tools and tuning environment, and there may be local optimal points in the optimization problem, the parameter tuning algorithm designed based on the genetic algorithm concept will stagnate and be unable to continue optimizing. Specifically, these two reasons may lead to the selection of a seed that seems to have a very small benchmark score, but this seed is not the optimal parameter configuration from a global perspective, or it only obtains a small benchmark score due to random fluctuations. As the amplitude of the variation decays, mutation based on this seed will make it impossible for the algorithm to find a better parameter configuration combination. In order to solve this technical problem, the embodiment of this specification provides a data processing method, which introduces preset variables and performs parameter tuning in combination with preset processing strategies to ensure the iterative convergence of the genetic seed while avoiding the influence of individual outliers and local optimal values as much as possible. For details, see Figure 2 .
[0062] See also Figure 2 , Figure 2 A flow chart of a data processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0063] Step 202: Determine an evaluation score of initial data in an initial data set, wherein the initial data includes parameters.
[0064] Specifically, the data processing method provided in the embodiments of this specification can be applied to parameter tuning scenarios such as operating system kernels, compilers, and database services.
[0065] In actual applications, the specific application scenarios of the data processing methods provided in the embodiments of this specification are different, the initial data in the initial data set are different, and the parameters in the initial data are also different.
[0066] In specific implementation, the initial data set includes multiple initial data, and each initial data includes multiple parameters with different parameter values; that is, the parameters in all the initial data in the initial data set are the same, but the parameter value of the parameter in each initial data is different from the parameter value of the parameters in other initial data.
[0067] Continuing with the above example, the initial data in the initial data set includes: data a, data b, and data c. The parameters included in the initial data can be understood as: parameters to be tuned in data a, data b, and data c: parameter 1, parameter 2, and parameter 3. However, the parameter values of the parameters to be tuned in data a: parameter 1, parameter 2, and parameter 3; the parameters to be tuned in data b: parameter 1, parameter 2, and parameter 3; and the parameters to be tuned in data c: parameter 1, parameter 2, and parameter 3 are not exactly the same.
[0068] To determine the evaluation score of the initial data in the initial data set, it is necessary to first obtain the initial data set, then obtain the evaluation score of each initial data in the initial data set according to the evaluation module, and then reasonably determine the initial seed data based on the evaluation score. The specific implementation method is as follows:
[0069] Determining the evaluation score of the initial data in the initial data set includes:
[0070] Acquire an initial data set according to a preset sampling algorithm, wherein the initial data set includes at least two initial data;
[0071] An evaluation score of the at least two initial data is determined according to an evaluation module.
[0072] The preset sampling algorithm includes but is not limited to a random algorithm or a Latin hypercube sampling algorithm; the evaluation module includes but is not limited to a benchmark program.
[0073] Specifically, similar to the parameter tuning algorithm designed based on the genetic algorithm concept in the above embodiment, before the algorithm runs, a certain round of data collection is performed as initial data, and an initial data set is formed based on the initial data, generally using a random algorithm or a Latin hypercube sampling algorithm.
[0074] After obtaining the initial data set, each initial data in the initial data set is evaluated according to the evaluation module. After obtaining its evaluation score, the initial seed data for the first iteration can be selected based on the evaluation score of each initial data to ensure the correct operation of the parameter tuning iterative algorithm.
[0075] Step 204: Determine initial seed data from the initial data according to the evaluation score.
[0076] Specifically, after obtaining the evaluation score of each initial data according to the evaluation module, the initial seed data can be reasonably selected from the initial data according to the evaluation score. The specific implementation method is as follows:
[0077] Determining initial seed data from the initial data according to the evaluation score includes:
[0078] placing the initial data into a seed stack according to the evaluation score;
[0079] The initial data at the top of the seed stack is determined as the initial seed data.
[0080] In practical applications, after obtaining the evaluation score of each initial data in the initial data set, each initial data is placed in a seed stack according to the evaluation score, and then the initial data at the top of the seed stack is used as the initial seed data.
[0081] In specific implementation, the initial seed data is generally expressed as initial data that makes a certain performance better. For example, when tuning the latency of an operating system, it can be determined that the smaller the latency, the better the performance. That is, if the benchmark score of the parameter that can affect the latency included in the initial data is smaller, the initial data is better. Then, when the initial data is pushed into the stack according to the benchmark score, the initial data can be pushed into the seed stack in a descending manner according to the benchmark score, so that the initial data at the top of the seed stack is used as the initial seed with the best performance for subsequent optimal parameter iteration. The specific implementation method is as follows:
[0082] The step of placing the initial data into a seed stack according to the evaluation score comprises:
[0083] The initial data is placed into the seed stack in a descending order according to the evaluation score.
[0084] In practical applications, after the evaluation score is determined, it must undergo data conversion and finally be expressed as a loss value, which is then pushed onto the stack based on the converted loss value. That is, the evaluation score is generally decreasing. Even if it is increasing, it will be converted into a decreasing dimension in specific applications.
[0085] Specifically, after determining the evaluation score of each initial data according to the benchmark, all data in all initial data sets are pushed into the stack in a descending manner according to their benchmark scores, so that when subsequent parameter iteration is performed, the initial data at the top of the stack can be selected as the preferred initial seed data as the starting point of iteration for parameter iteration.
[0086] Step 206: mutate the parameter values of the parameters in the initial seed data according to the preset variables to obtain mutated updated data.
[0087] Specifically, after determining the initial seed data, the parameter values of the parameters in the initial seed data are mutated according to the preset variables to obtain the mutated offspring. Subsequently, a reasonable preset processing strategy can be determined based on the benchmark score of the initial seed data and the benchmark score of the offspring.
[0088] In practical applications, the data processing method provided in the embodiments of this specification can effectively limit the amplitude of parameter variation during parameter tuning iterations by introducing preset variables. Different preset variables have different ways of varying the parameter values of the parameters in the initial seed data according to the preset variables. The details are as follows:
[0089] Taking the preset variable as the parameter quantity control variable as an example, the specific implementation method of mutating the parameter values of the parameters in the initial seed data is as follows:
[0090] The preset variables are parameter quantity control variables;
[0091] Accordingly, mutating the parameter values of the parameters in the initial seed data according to the preset variables to obtain the mutated updated data includes:
[0092] determining the number of parameters to be mutated in the initial seed data according to the parameter quantity control variable;
[0093] Determining the parameters to be mutated in the initial seed data according to the quantity;
[0094] The parameter value of the parameter to be mutated is mutated to obtain updated data after the mutation.
[0095] If the preset variable is a parameter quantity control variable, the preset variable can determine the number of parameters to be mutated in the initial seed data.
[0096] For example, if the parameter quantity control variable is 0.8 and the number of parameters in the initial seed data is 100, then the number of parameters to be mutated in the initial seed data is determined according to the parameter quantity control variable. It can be understood that 80 parameters to be mutated are selected from the initial seed data according to the parameter quantity control variable.
[0097] Then, 80 parameters are randomly selected from the initial seed data as parameters to be mutated, and then the parameter value of each of the 80 parameters to be mutated is mutated to obtain the updated data after mutation.
[0098] Taking the example of a preset variable as a parameter variable with a step length, the specific implementation method of mutating the parameter value of the parameter in the initial seed data is as follows:
[0099] The preset variable is a parameter variable step length variable;
[0100] Accordingly, mutating the parameter values of the parameters in the initial seed data according to the preset variables to obtain the mutated updated data includes:
[0101] Determining current parameter values of parameters in the initial seed data;
[0102] The current parameter value of the parameter in the initial seed data is mutated according to the parameter variation step length variable to obtain updated data after the mutation.
[0103] Among them, if the preset variable is a parameter variation step length variable, the preset variable can determine the variation range of the parameter to be mutated in the initial seed data.
[0104] For example, when the parameter mutation step length variable is 8 and the parameter value of the parameter in the initial seed data is 100, without guidance on the mutation direction, the parameter value of the parameter in the initial seed data may mutate to 92 or 108, etc.; and when the parameter mutation step length variable is 16, the parameter value of the parameter in the initial seed data may mutate to 84 or 116, etc.
[0105] Step 208: Determine a preset processing strategy based on the updated data and the initial seed data, and determine target seed data and target variables based on the preset processing strategy.
[0106] Specifically, after obtaining the updated data, the offspring of the initial seed data mutation, through the above method, a preset processing strategy is determined based on the updated data and the initial seed data, and the target seed data and target variable for the next round of iteration are accurately selected based on the preset processing strategy. The specific implementation method is as follows:
[0107] The determining of a preset processing strategy according to the update data and the initial seed data includes:
[0108] Obtaining an evaluation score for the updated data according to the evaluation module;
[0109] A preset processing strategy is determined according to the evaluation score of the updated data and the evaluation score of the initial seed data.
[0110] Specifically, first, an evaluation score of the updated data is obtained according to the evaluation module, and then the evaluation score of the updated data is compared with the evaluation score of the initial seed data, and a preset processing strategy is determined based on the comparison result.
[0111] In actual applications, different preset processing strategies will result in different target seed data and target variables selected for the next round of iteration. Taking the preset processing strategy as the first processing strategy as an example, the reasonable selection of target seed data and target variables is explained in detail. The specific implementation method is as follows:
[0112] The determining of a preset processing strategy according to the evaluation score of the updated data and the evaluation score of the initial seed data includes:
[0113] determining a first processing strategy when the evaluation score of the updated data is greater than the evaluation score of the initial seed data;
[0114] Accordingly, determining the target seed data and the target variable according to the preset processing strategy includes:
[0115] saving the initial seed data and the preset variables to the seed stack according to the first processing strategy, and
[0116] The updated data is used as target seed data, and the preset variable is used as the target variable.
[0117] In actual applications, the determination condition of the first processing strategy is: the benchmark score of the offspring (ie, updated data) exceeds that of the current seed (ie, initial seed data).
[0118] The first processing strategy can be understood as follows: when the benchmark score of the mutated offspring exceeds that of the current seed, this offspring is used as the new seed, the current seed and the corresponding variable φ (i.e., the preset variable) value are saved in the stack s, and then the mutated offspring is used as the new seed, while the existing φ value remains unchanged.
[0119] Continuing with the above example, let's take the initial seed data as data a and the value of variable φ as the parameter variable step length 8 that controls the mutation. After the parameter in data a is mutated, the offspring data a1 is obtained; the benchmark score of the offspring data a1 is obtained through benchmark. If the benchmark score of the offspring data a1 is greater than the current seed: data a, the offspring data a1 is used as the new seed, and the existing value of φ 8 remains unchanged; and the data a and the corresponding value of φ 8 are saved in stack s.
[0120] In the next iteration, the offspring data a1 is used as the target seed data, and the value of φ 8 is used as the target variable. The parameter values of the parameters in the target seed data are mutated according to the target variable to obtain the updated data after the mutation. The preset processing strategy is determined based on the updated data and the target seed data, and the target seed data and target variable are determined again according to the preset processing strategy. This cycle is repeated until the iteration ends.
[0121] Taking the second processing strategy as an example, the reasonable selection of target seed data and target variables is described in detail. The specific implementation method is as follows:
[0122] The determining of a preset processing strategy according to the evaluation score of the updated data and the evaluation score of the initial seed data includes:
[0123] determining a second processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is greater than a preset threshold;
[0124] Accordingly, determining the target seed data and the target variable according to the preset processing strategy includes:
[0125] According to the second processing strategy, the initial seed is used as the target seed data, and the preset variable is decremented according to the preset submission algorithm to determine the target variable.
[0126] In practical applications, the conditions for determining the second processing strategy are: the benchmark score of the offspring (ie, updated data) does not exceed the current seed (ie, initial seed data), and the value of φ (ie, the preset variable) does not decrease to the minimum value.
[0127] The second processing strategy can be understood as follows: when the benchmark score of the offspring generated after the mutation does not exceed the benchmark score of the current seed, and the value of φ has not decreased to the minimum value, the current seed is still used as the seed for the next iteration, and the value of φ is reduced according to the preset decreasing method.
[0128] Among them, the minimum value can be set according to actual needs, for example, set to 1 or 2, etc.; and the attenuation strategy of the value of φ (preset decreasing method) can also be different according to the implementation of different mutation algorithms. For example, the attenuation strategy can halve the value of φ or reduce it by a certain value. The embodiments of this specification do not impose any restrictions on this.
[0129] Continuing with the above example, let's take the initial seed data as data a and the value of variable φ as the parameter variable step length 8 that controls the mutation. If the parameters in data a are mutated, offspring data a1 is obtained; the benchmark score of offspring data a1 is obtained through benchmark. If the benchmark score of offspring data a1 is less than or equal to the current seed: data a, and the value of φ is greater than the preset minimum value, then data a is still used as the seed for the next round of iteration, and the value of φ is decremented according to the preset φ value decrement strategy.
[0130] In the next iteration, data a is still used as the target seed data, and the value of φ after decrement is used as the target variable. The parameter values of the parameters in the target seed data are continued to be mutated according to the target variable to obtain the updated data after mutation; then the preset processing strategy is determined based on the updated data and the target seed data, and the target seed data and target variable are determined again according to the preset processing strategy; this cycle is repeated until the iteration ends.
[0131] Taking the third processing strategy as an example, the reasonable selection of target seed data and target variables is described in detail. The specific implementation method is as follows:
[0132] The determining of a preset processing strategy according to the evaluation score of the updated data and the evaluation score of the initial seed data includes:
[0133] determining a third processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is equal to a preset threshold;
[0134] Accordingly, determining the target seed data and the target variable according to the preset processing strategy includes:
[0135] selecting target seed data from the seed stack according to the third processing strategy, and using the preset variable as the target variable;
[0136] The target seed data is different from the initial seed data.
[0137] In actual applications, the conditions for determining the third processing strategy are: the benchmark score of the offspring (ie, updated data) does not exceed that of the current seed (ie, initial seed data), and the value of φ decreases to the minimum value.
[0138] The third processing strategy can be understood as follows: when the benchmark score of the offspring generated by the mutation does not exceed the benchmark score of the current seed, and the value of φ has decreased to the minimum value, the seed needs to be replaced. For example, a data different from the current seed: data a is popped from the stack s as the seed for the next round of iteration (that is, the most recently pushed seed in the seed stack, that is, backtracking to the most recently pushed seed), and a φ value is initially assigned as the starting point for the next round of mutation.
[0139] Continuing with the above example, let's take the initial seed as data a and the value of variable φ as the parameter variable step length 8 that controls the mutation. If the parameters in data a are mutated, the offspring data a1 is obtained; the benchmark score of the offspring data a1 is obtained through benchmark. If the benchmark score of the offspring data a1 is less than or equal to the current seed: data a, and the value of φ has decreased to the minimum value, then seed replacement is required, such as selecting the most recently pushed seed from the above stack (i.e., the seed at the top of the stack) as the seed for the next round of iteration, and using its corresponding φ value as φ as the starting point for the next round of mutation.
[0140] That is, in the next iteration, the most recently pushed seed in the seed stack is traced back as the target seed data, and the value of φ corresponding to the time when the seed is pushed is used as the target variable. The parameter values of the parameters in the target seed data are continuously mutated according to the target variable to obtain the updated data after mutation. Then, the preset processing strategy is determined according to the updated data and the target seed data, and the target seed data and target variable are determined again according to the preset processing strategy. This cycle is repeated until the end of the iteration.
[0141] Step 210: Determine target data according to the target seed data and the target variable.
[0142] Specifically, determining the target data according to the target seed data and the target variable includes:
[0143] Determine whether the target seed data meets the preset end condition,
[0144] If yes, then the target seed data is used as the target data.
[0145] If not, the parameter value of the parameter in the target seed data is mutated according to the target variable to obtain updated data after the mutation.
[0146] Among them, the preset end conditions include but are not limited to the number of iteration rounds being greater than a preset round threshold, such as 200 rounds or 300 rounds, etc.; or the score of the target seed data exceeds a preset score threshold, for example, the preset score threshold is 10ms, and the score of the target seed data is 8ms.
[0147] In specific implementation, after obtaining each target seed data, it is determined whether the target seed data meets the preset end condition. If so, the target seed data is used as the preferred target data after tuning; if not, the parameter values of the parameters in the target seed data are mutated according to the target variable to obtain the mutated updated data; then the preset processing strategy is determined based on the updated data and the target seed data, and the target seed data and target variable are determined again according to the preset processing strategy; this cycle is repeated until a target seed data meets the preset end condition, and the iteration ends.
[0148] Among them, the specific implementation method of mutating the parameter values of the parameters in the target seed data according to the target variable to obtain the mutated updated data can be referred to the specific implementation method of mutating the parameter values of the parameters in the initial seed data according to the preset variables to obtain the mutated updated data in the above embodiment, which will not be repeated here.
[0149] In the embodiments of this specification, the data processing method iteratively tunes the parameters through a genetic algorithm, introduces preset variables to limit the number of times a seed participates in the mutation, and avoids "false optimal" seeds blocking the algorithm operation; and continuously selects the preferred target seed data as the initial seed data for the next iteration according to the preset processing strategy for parameter tuning, so as to improve the parameter tuning efficiency and parameter tuning effect.
[0150] See also Figure 3 , Figure 3 A specific processing flow chart of a data processing method applied to an operating system kernel parameter tuning scenario provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0151] The data processing method can be understood as another parameter tuning algorithm designed based on the concept of genetic algorithm.
[0152] Step 302: Data collection.
[0153] Specifically, similar to the parameter tuning algorithm designed based on the genetic algorithm concept in the above embodiment, before the algorithm runs, a certain round of data collection is performed from the historical iterations of the operating system kernel parameters as initial data, generally using a random algorithm or a Latin hypercube sampling algorithm.
[0154] The initial data is pushed into s in descending order of benchmark values (assuming that a smaller benchmark score represents better performance), and the parameter configuration at the top of the stack is taken as the initial seed.
[0155] Continuing with the above example, the initial data still includes data a, data b, and data c, and data a, data b, and data c all include parameters to be tuned with different parameter values: parameter 1, parameter 2, and parameter 3.
[0156] According to the benchmark, the benchmark values of data a, data b, and data c are obtained respectively, and data a, data b, and data c are pushed into the following stack s in descending order according to the benchmark values:
[0157] Stacks
[0158] Data a Data b Data c
[0159] Based on stack s, the parameter configuration of data a at the top of stack is used as the initial seed. In practical applications, lower benchmark scores for initial data indicate better performance. Therefore, pushing data a, b, and c onto stack s in descending order ensures that the parameter configuration of the initial data at the top of stack s is a high-performance parameter configuration.
[0160] Step 304: Seed mutation.
[0161] Specifically, a new variable, φ, is introduced during the mutation phase. Each seed is initially assigned a φ value when it mutates. This φ value determines the magnitude of the seed's mutation. For example, in random mutation, the φ value can be used to control the number of parameters mutated or the duration of the parameter mutation. In practice, the φ value can be implemented differently for different mutations and is not specified here.
[0162] Continuing with the above example, still taking data a as the initial seed, if data a includes 100 parameters to be tuned, at this time, the new variable φ is used to control the number of parameters to be mutated, and the value of φ is 0.8, then it can be determined that 80% of the parameters in data a will be mutated this time, that is, 80 parameters in data a will be mutated; if the new variable φ is used to control the parameter variation step length, and the value of φ is 5, if the parameter value of the parameter in data a is 10, then it can be determined that the parameter value of the parameter in data a will be mutated to 5 or 15, etc.
[0163] Specifically, after using the value of the variable φ to mutate the seed and generate offspring, there are three different iterative processing methods depending on different situations:
[0164] Step 3042: Iterative processing when the benchmark score of the offspring exceeds that of the current seed.
[0165] Specifically, when the benchmark score of the mutated offspring exceeds that of the current seed, the offspring is used as the new seed, and the current seed and the corresponding variable φ value are saved in the stack s (i.e., pushed to the top of the stack). Then, the mutated offspring is used as the new seed, and the existing φ value is kept unchanged, and the above step 304 is continued.
[0166] Continuing with the above example, let's take the initial seed as data a and the value of variable φ as the parameter variable step length 8 that controls the mutation. If the parameter in data a is mutated, the offspring data a1 is obtained; the benchmark score of the offspring data a1 is obtained through benchmark. If the benchmark score of the offspring data a1 is greater than the current seed: data a, the offspring data a1 is used as the new seed, and the existing value of φ 8 remains unchanged; and the data a and the corresponding value of φ 8 are saved in stack s.
[0167] Step 3044: Iterative processing mode in which the benchmark score of the offspring does not exceed that of the current seed and the value of φ does not decrease to the minimum value.
[0168] Specifically, when the benchmark score of the offspring generated after the mutation does not exceed the benchmark score of the current seed and the value of φ has not decreased to the minimum value, the current seed is still used as the seed for the next iteration, and the value of φ is reduced according to the preset decreasing method, and the above step 304 is continued.
[0169] Among them, the minimum value can be set according to actual needs, for example, set to 1 or 2, etc.; and the attenuation strategy of the value of φ (preset decreasing method) can also be different according to the implementation of different mutation algorithms. For example, the attenuation strategy can halve the value of φ or reduce it by a certain value. The embodiments of this specification do not impose any restrictions on this.
[0170] Continuing with the above example, taking the initial seed as data a and the value of variable φ as the parameter variable step length 8 for controlling the mutation as an example, if the parameters in the data a are mutated, the offspring data a1 is obtained; the benchmark score of the offspring data a1 is obtained through benchmark. If the benchmark score of the offspring data a1 is less than or equal to the current seed: data a, and the value of φ is greater than the preset minimum value, then data a is still used as the seed for the next round of iteration, and the value of φ is decremented according to the preset φ value decrement strategy, and step 304 is subsequently executed based on the data a and the decremented value of φ.
[0171] Step 3046: Iterative processing mode in which the benchmark score of the offspring does not exceed that of the current seed and the value of φ is already the minimum.
[0172] Specifically, when the benchmark score of the offspring generated by the mutation does not exceed the benchmark score of the current seed and the value of φ has decreased to the minimum value, the seed needs to be replaced. For example, the most recently pushed seed in the stack s is selected as the seed for the next round of iteration, and the φ value corresponding to the seed when it was pushed is used as the starting point for the next round of mutation.
[0173] The detailed explanation of the minimum value and attenuation strategy can be found in the above content and will not be repeated here.
[0174] Continuing with the above example, let's take the initial seed as data a and the value of variable φ as the parameter variable step length 8 that controls the mutation. If the parameters in data a are mutated, offspring data a1 is obtained; the benchmark score of offspring data a1 is obtained through benchmark. If the benchmark score of offspring data a1 is less than or equal to the current seed: data a, and the value of φ has decreased to the minimum value, then seed replacement is required. For example, the most recently pushed seed is selected from the above stack s as the seed for the next round of iteration, and the φ value corresponding to the time when the seed is pushed is used as the starting point for the next round of mutation.
[0175] Iterate in the above manner until the iteration end condition is met, such as the preset iteration rounds are met, or the benchmark score of the current seed meets the preset score threshold, and then the parameters in the current seed are used as the preferred parameter configuration to complete the entire parameter tuning process.
[0176] The data processing method provided in the embodiments of this specification integrates the basic ideas of classic algorithms such as genetic algorithms and simulated annealing algorithms, and uses a deep optimization search method to ensure the iterative convergence of genetic seeds while avoiding the influence of individual outliers and local optimal values as much as possible. The introduction of the φ value determines the scale of parameter variation and also plays the role of energy in the simulated annealing algorithm.
[0177] In addition, the data processing method provided in the embodiments of this specification is not limited to the mutation strategy introduced above, and can be used as a framework of a genetic-based optimization algorithm in combination with various forms of mutation strategies.
[0178] The following combined Figure 4 , Figure 4 An example diagram of the operation of a data processing method for parameter tuning provided by an embodiment of this specification is shown.
[0179] Figure 4 , which shows the data processing method provided by the embodiment of this specification, and an operating example in which the value of φ is initialized to 16, the minimum value allowed is 1, and the decay is halved each time.
[0180] Figure 4 In the figure, 20, 22, and 25 represent initial data, and φ=16 or 8 represents the value of the preset variable φ.
[0181] Taking 20 as the initial seed data as an example, 23 and 14 connected to 20 can be understood as, when φ=16, the mutated offspring is: 23.
[0182] Then, if the benchmark score of offspring 23 exceeds the current seed and φ has not decreased to the minimum value, offspring 23 will be discarded, and 20 will continue to be used as the current seed. φ will decrease to 8, and the mutated offspring will be: 14.
[0183] At this time, if the benchmark score of offspring 14 exceeds the current seed, offspring 14 will be used as the current seed, φ will be kept at 8, and the mutated offspring will be 13. If the benchmark score of offspring 14 does not exceed the current seed and φ has not decreased to the minimum value, offspring 13 will be discarded, and offspring 14 will continue to be used as the current seed, φ will be decreased to 4, and the mutated offspring will be 12. This process will continue until the score of the mutated offspring exceeds the preset score threshold or the number of iterations meets the preset iteration threshold. The iteration ends and the last mutated offspring is used as the optimal parameter.
[0184] Specifically, the line labeled 1 in the figure represents the order of seed selection, the line labeled 2 represents the order in which the algorithm gives parameter configuration and evaluates it, and the line labeled 3 represents the mutation process.
[0185] Combined with the above introduction to the data processing method provided in the embodiment of this specification, this method actually implements a depth-first multi-branch search tree. The initial value, minimum value and decay strategy of the φ value determine the width of the multi-branch search tree, and the effectiveness of the specific mutation algorithm used determines the depth of the multi-branch search tree.
[0186] The algorithm limits the number of times a seed can participate in mutation by decaying its φ value: if a seed continuously finds better points, its corresponding φ value will not decay. Conversely, if no better points are found, as its φ value decays to a minimum, the seed is abandoned and no longer participates in mutation. This strategy prevents "falsely optimal" seeds caused by random fluctuations or local optimization from being continuously blocked, preventing them from blocking the algorithm.
[0187] The depth-first search strategy prioritizes seeds with a high probability of yielding optimal results, accelerating convergence. Existing seeds are pushed onto the stack rather than discarded, allowing them to participate in mutation again through backtracking after their child nodes have completed their search. The φ value also determines the mutation strategy's range, ensuring that each seed undergoes various mutation attempts throughout its lifecycle.
[0188] Corresponding to the above method embodiment, this specification also provides a data processing device embodiment, Figure 5 FIG1 shows a schematic diagram of the structure of a data processing device provided by an embodiment of this specification. Figure 5 As shown, the device includes:
[0189] a score evaluation module 502 configured to determine an evaluation score of initial data in an initial data set, wherein the initial data includes parameters;
[0190] an initial seed determination module 504, configured to determine initial seed data from the initial data according to the evaluation score;
[0191] The parameter mutation module 506 is configured to mutate the parameter values of the parameters in the initial seed data according to the preset variables to obtain the mutated updated data;
[0192] a target seed determination module 508 configured to determine a preset processing strategy based on the update data and the initial seed data, and to determine target seed data and target variables based on the preset processing strategy;
[0193] The parameter tuning module 510 is configured to determine target data according to the target seed data and the target variable.
[0194] Optionally, the score evaluation module 502 is further configured to:
[0195] Acquire an initial data set according to a preset sampling algorithm, wherein the initial data set includes at least two initial data;
[0196] An evaluation score of the at least two initial data is determined according to an evaluation module.
[0197] Optionally, the initial seed determination module 504 is further configured to:
[0198] placing the initial data into a seed stack according to the evaluation score;
[0199] The initial data at the top of the seed stack is determined as the initial seed data.
[0200] Optionally, the initial seed determination module 504 is further configured to:
[0201] The initial data is placed into the seed stack in a descending order according to the evaluation score.
[0202] Optionally, the preset variable is a parameter quantity control variable;
[0203] Accordingly, the parameter variation module 506 is further configured to:
[0204] determining the number of parameters to be mutated in the initial seed data according to the parameter quantity control variable;
[0205] Determining the parameters to be mutated in the initial seed data according to the quantity;
[0206] The parameter value of the parameter to be mutated is mutated to obtain updated data after the mutation.
[0207] Optionally, the preset variable is a parameter variable step length variable;
[0208] Accordingly, the parameter variation module 506 is further configured to:
[0209] Determining current parameter values of parameters in the initial seed data;
[0210] The current parameter value of the parameter in the initial seed data is mutated according to the parameter variation step length variable to obtain updated data after the mutation.
[0211] Optionally, the target seed determination module 508 is further configured to:
[0212] Obtaining an evaluation score for the updated data according to the evaluation module;
[0213] A preset processing strategy is determined according to the evaluation score of the updated data and the evaluation score of the initial seed data.
[0214] Optionally, the target seed determination module 508 is further configured to:
[0215] determining a first processing strategy when the evaluation score of the updated data is greater than the evaluation score of the initial seed data;
[0216] saving the initial seed data and the preset variables to the seed stack according to the first processing strategy, and
[0217] The updated data is used as target seed data, and the preset variable is used as the target variable.
[0218] Optionally, the target seed determination module 508 is further configured to:
[0219] determining a second processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is greater than a preset threshold;
[0220] According to the second processing strategy, the initial seed is used as the target seed data, and the preset variable is decremented according to the preset submission algorithm to determine the target variable.
[0221] Optionally, the target seed determination module 508 is further configured to:
[0222] determining a third processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is equal to a preset threshold;
[0223] selecting target seed data from the seed stack according to the third processing strategy, and using the preset variable as the target variable;
[0224] The target seed data is different from the initial seed data.
[0225] Optionally, the parameter tuning module 510 is further configured to:
[0226] Determine whether the target seed data meets the preset end condition,
[0227] If yes, then the target seed data is used as the target data.
[0228] If not, the parameter value of the parameter in the target seed data is mutated according to the target variable to obtain updated data after the mutation.
[0229] In the embodiments of this specification, the data processing device iteratively tunes the parameters through a genetic algorithm, introduces preset variables to limit the number of times a seed participates in mutation, and avoids "false optimal" seeds blocking the algorithm operation; and continuously selects the preferred target seed data as the initial seed data for the next iteration according to the preset processing strategy for parameter tuning, so as to improve the parameter tuning efficiency and parameter tuning effect.
[0230] The above is a schematic diagram of a data processing device according to this embodiment. It should be noted that the technical solution of the data processing device and the technical solution of the above-mentioned data processing method are based on the same concept. For details not described in detail in the technical solution of the data processing device, please refer to the description of the technical solution of the above-mentioned data processing method.
[0231] See also Figure 6 , Figure 6 6 shows a block diagram of a computing device 600 according to one embodiment of the present disclosure. Components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.
[0232] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0233] In one embodiment of the present specification, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 6 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0234] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 600 may also be a mobile or stationary server.
[0235] The processor 620 is configured to execute the following computer-executable instructions, which implement the steps of the above-mentioned data processing method when executed by the processor.
[0236] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned data processing method are of the same concept. For details not described in detail in the technical scheme of the computing device, please refer to the description of the technical scheme of the above-mentioned data processing method.
[0237] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which implement the steps of the above-mentioned data processing method when executed by a processor.
[0238] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned data processing method are based on the same concept. For details not described in detail in the technical scheme of the storage medium, please refer to the description of the technical scheme of the above-mentioned data processing method.
[0239] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned data processing method.
[0240] The above is an illustrative solution of a computer program of this embodiment. It should be noted that the technical solution of the computer program and the technical solution of the above-mentioned data processing method are of the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the above-mentioned data processing method.
[0241] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0242] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0243] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0244] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0245] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A data processing method, applied to an operating system kernel, comprising: Determining an evaluation score of initial data in the initial data set, wherein the initial data includes operating system kernel parameters; determining initial seed data from the initial data according to the evaluation score; mutating parameter values of operating system kernel parameters in the initial seed data according to preset variables to obtain mutated update data, wherein the preset variables include a parameter quantity control variable, and the parameter quantity control variable is used to determine the number of operating system kernel parameters to be mutated in the initial seed data; Determining a preset processing strategy based on the update data and the initial seed data, and determining target seed data and a target variable based on the preset processing strategy; The determining of a preset processing strategy based on the updated data and the initial seed data, and determining target seed data and a target variable based on the preset processing strategy, includes: determining a second processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is greater than a preset threshold, wherein the evaluation score is determined by an evaluation module; using the initial seed as the target seed data according to the second processing strategy, and determining the target variable by decrementing the preset variable; Target data is determined according to the target seed data and the target variable.
2. The data processing method according to claim 1, wherein determining the evaluation score of the initial data in the initial data set comprises: Acquire an initial data set according to a preset sampling algorithm, wherein the initial data set includes at least two initial data; An evaluation score of the at least two initial data is determined according to an evaluation module.
3. The data processing method according to claim 1 , wherein determining initial seed data from the initial data according to the evaluation score comprises: placing the initial data into a seed stack according to the evaluation score; The initial data at the top of the seed stack is determined as the initial seed data.
4. The data processing method according to claim 3, wherein placing the initial data into a seed stack according to the evaluation score comprises: The initial data is placed into the seed stack in a descending order according to the evaluation score.
5. The data processing method according to claim 1, wherein mutating the parameter values of the operating system kernel parameters in the initial seed data according to the preset variables to obtain the mutated updated data comprises: Determining the number of operating system kernel parameters to be mutated in the initial seed data according to the parameter quantity control variable; Determining operating system kernel parameters to be mutated in the initial seed data according to the quantity; The parameter value of the operating system kernel parameter to be mutated is mutated to obtain updated data after the mutation.
6. The data processing method according to claim 1, wherein the preset variable is a parameter-variable step length variable; Accordingly, mutating the parameter values of the operating system kernel parameters in the initial seed data according to the preset variables to obtain the mutated update data includes: Determining current parameter values of operating system kernel parameters in the initial seed data; The current parameter value of the operating system kernel parameter in the initial seed data is mutated according to the operating system kernel parameter mutating step length variable to obtain the mutated update data.
7. The data processing method according to claim 1, wherein determining a preset processing strategy based on the updated data and the initial seed data, and determining target seed data and target variables based on the preset processing strategy, comprises: determining a first processing strategy when the evaluation score of the updated data is greater than the evaluation score of the initial seed data; Saving the initial seed data and the preset variables to a seed stack according to the first processing strategy, and The updated data is used as target seed data, and the preset variable is used as the target variable.
8. The data processing method according to claim 1, wherein determining a preset processing strategy based on the updated data and the initial seed data, and determining target seed data and target variables based on the preset processing strategy, comprises: determining a third processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is equal to a preset threshold; selecting target seed data from the seed stack according to the third processing strategy, and using the preset variable as the target variable; The target seed data is different from the initial seed data.
9. The data processing method according to claim 1, wherein determining the target data according to the target seed data and the target variable comprises: Determine whether the target seed data meets the preset end condition, If yes, then the target seed data is used as the target data. If not, the parameter value of the operating system kernel parameter in the target seed data is mutated according to the target variable to obtain the mutated update data.
10. A data processing device, applied to an operating system kernel, comprising: a score evaluation module configured to determine an evaluation score of initial data in the initial data set, wherein the initial data includes operating system kernel parameters; an initial seed determination module, configured to determine initial seed data from the initial data according to the evaluation score; a parameter mutation module configured to mutate parameter values of operating system kernel parameters in the initial seed data according to preset variables to obtain mutated update data, wherein the preset variables include a parameter quantity control variable, and the parameter quantity control variable is used to determine the number of operating system kernel parameters to be mutated in the initial seed data; a target seed determination module, configured to determine a preset processing strategy based on the update data and the initial seed data, and determine target seed data and a target variable based on the preset processing strategy; The target seed determination module is further configured to determine a second processing strategy when the evaluation score of the updated data is less than or equal to the evaluation score of the initial seed data and the preset variable is greater than a preset threshold, wherein the evaluation score is determined by the evaluation module; according to the second processing strategy, the initial seed is used as the target seed data, and the preset variable is decremented to determine the target variable; The parameter tuning module is configured to determine target data according to the target seed data and the target variable.
11. A computing device comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and readable storage medium
CN110134215A