Database optimization method and device, electronic equipment, storage medium and computer program product

By constructing a probabilistic model and optimization algorithm to optimize database parameters, the problem of difficulty in determining the globally optimal configuration parameters in existing technologies is solved, and the database achieves the best performance and automated tuning in complex business scenarios.

CN122019503APending Publication Date: 2026-05-12CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2026-01-27
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

When the business scenarios corresponding to the database are complex, existing technologies struggle to determine the globally optimal configuration parameters, resulting in poor database performance.

Method used

By collecting multiple configuration and performance data of the database, a probabilistic model is constructed to determine the conditional probability relationship of the parameter set, and an optimization algorithm is used to optimize the parameter values. Finally, the database is configured based on the optimization results.

Benefits of technology

It improves database performance, enabling it to achieve optimal performance in complex business scenarios, reduces reliance on human experience, and increases the automation of tuning and the efficiency of database operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019503A_ABST
    Figure CN122019503A_ABST
Patent Text Reader

Abstract

The invention provides a database optimization method and device, electronic equipment, a storage medium and a computer program product. The method comprises the following steps: collecting a plurality of first configurations corresponding to a first database and first performance data corresponding to the plurality of first configurations; constructing a first probability model based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, and determining one or more first parameter values corresponding to the first parameter set based on the first probability model; the one or more first parameter values are used for maximizing the first conditional probability; taking the one or more first parameter values as an initial solution of a first optimization problem, and solving the first optimization problem based on a set optimization algorithm to obtain one or more second parameter values; the first database is configured based on the one or more second parameter values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a database optimization method, apparatus, electronic device, storage medium, and computer program product. Background Technology

[0002] In related technologies, optimizing database configuration parameters based on manual adjustment or preset fixed strategies can lead to poor database performance when the business scenarios corresponding to the database are complex. Summary of the Invention

[0003] To address the related technical problems, embodiments of this application provide a database optimization method, apparatus, electronic device, storage medium, and computer program product.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a database optimization method, the method comprising: Collect multiple first configurations corresponding to a first database and first performance data corresponding to the multiple first configurations; the first configuration is used to indicate one or more database parameters; the first performance data is used to describe the performance of the first database when using the corresponding first configuration. Based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, a first probability model is constructed, and based on the first probability model, one or more first parameter values ​​corresponding to a first parameter set are determined; the first probability model is used to describe the conditional probability relationship between the first parameter set and the set target performance index; the first parameter set is constructed based on one or more database parameters indicated by the plurality of first configurations; each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize a first conditional probability; the first conditional probability represents: the probability that each database parameter in the first parameter set takes the corresponding parameter value under the condition that the performance of the first database has reached the target performance index; Using the one or more first parameter values ​​as the initial solution to the first optimization problem, the first optimization problem is solved based on a set optimization algorithm to obtain one or more second parameter values; the first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set. The first database is configured based on one or more of the second parameter values.

[0005] In the above scheme, the first objective function corresponding to the first optimization problem is constructed based on one or more performance index functions; each of the one or more performance index functions is used to measure the impact of the parameter value corresponding to the first parameter set on a performance index.

[0006] In the above scheme, the first objective function is represented as a weighted sum of one or more performance index functions, and the weights of the performance index functions in the first objective function are determined based on sensitivity analysis.

[0007] In the above scheme, the optimization objective corresponding to the first optimization problem is represented as minimizing the function value corresponding to the first objective function; and, The function value corresponding to the first objective function is negatively correlated with the first performance corresponding to the performance index function; the first performance characterizes the performance characterized by the function value corresponding to the performance index function.

[0008] In the above scheme, the first objective function is constructed based on a first performance metric function and a second performance metric function; the first performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the throughput of the first database, and the second performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the query latency of the first database.

[0009] In the above scheme, solving the first optimization problem based on the set optimization algorithm includes: Based on the optimization algorithm, the parameter values ​​corresponding to the first parameter set are iterated multiple times until the set convergence condition is reached. Wherein, the first acceptance probability corresponding to the set optimization algorithm is negatively correlated with the first ratio; the first acceptance probability represents the probability of accepting the first algorithm solution in the first iteration when the first algorithm solution in the first iteration is inferior to the second algorithm solution in the second iteration; the first iteration represents the last iteration of the second iteration; the first ratio represents the ratio of the first difference to the first factor; the first difference is used to compare the superiority of the first algorithm solution and the second algorithm solution, and the first factor decreases with the increase of the number of iterations.

[0010] In the above scheme, after configuring the first database based on the one or more second parameter values, the method further includes: Obtain the second performance data from the first database; The first probability model is updated based on the second performance data.

[0011] This application also provides a database optimization apparatus, including: The acquisition unit is used to acquire multiple first configurations corresponding to the first database and first performance data corresponding to the multiple first configurations; the first configuration is used to indicate one or more database parameters; the first performance data is used to describe the performance of the first database when using the corresponding first configuration. A determining unit is configured to construct a first probability model based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, and to determine one or more first parameter values ​​corresponding to a first parameter set based on the first probability model; the first probability model is used to describe the conditional probability relationship between the first parameter set and a set target performance indicator; the first parameter set is constructed based on one or more database parameters indicated by the plurality of first configurations; each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize a first conditional probability; the first conditional probability represents the probability that each database parameter in the first parameter set takes the corresponding parameter value under the condition that the performance of the first database has reached the target performance indicator; The solving unit is used to solve the first optimization problem based on a set optimization algorithm, using the one or more first parameter values ​​as the initial solution of the first optimization problem, to obtain one or more second parameter values; the first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set. A configuration unit is used to configure the first database based on one or more of the second parameter values.

[0012] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor; wherein, when the processor runs the computer program, it performs the steps of any of the methods described above.

[0013] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.

[0014] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0015] In this embodiment, multiple first configurations corresponding to a first database and first performance data corresponding to the multiple first configurations are collected. The first configuration indicates one or more database parameters, and the first performance data describes the performance of the first database under the corresponding first configuration. Then, based on the multiple first configurations and the first performance data corresponding to the multiple first configurations, a first probability model is constructed. Based on the first probability model, one or more first parameter values ​​corresponding to a first parameter set are determined. The first probability model describes the conditional probability relationship between the first parameter set and a set target performance index. The first parameter set is constructed based on one or more database parameters indicated by the multiple first configurations. Each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize a first conditional probability. Here, the first conditional probability represents the probability that each database parameter in the first parameter set takes the corresponding parameter value, given that the performance of the first database has reached the target performance index. Then, using one or more first parameter values ​​as the initial solution to a first optimization problem, the first optimization problem is solved based on a set optimization algorithm to obtain one or more second parameter values. The first optimization problem is used to determine the optimal parameter value corresponding to the first parameter set. Finally, the first database is configured based on one or more second parameter values. In the above scheme, the first parameter value that maximizes the first conditional probability is determined based on the constructed first probability model. This is equivalent to inferring a relatively optimal parameter value that can meet the target performance index for the database parameters through the first probability model. On this basis, the above scheme uses the first parameter value as the initial solution of the first optimization problem. This is equivalent to using the determined relatively optimal parameter value as the initial solution of the first optimization problem. Compared with related technologies, the quality of the initial solution is improved, so that the final solution of the first optimization problem can converge to the global optimum. That is, one or more second parameter values ​​are globally optimal. In this way, the configuration of the first database can ensure that the database achieves the best performance. Compared with related technologies, the performance of the database is improved. Attached Figure Description

[0016] Figure 1 A schematic diagram illustrating the implementation process of a database optimization method provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of a database optimization device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] In a cloud computing environment, the database, as the core management system, undertakes critical tasks such as storing metadata and status information of cloud components. In practical applications, database performance directly affects the overall performance of the cloud platform, impacting factors such as response speed, service availability, and system throughput. By optimizing database configuration parameters, the database can be adapted to different business scenarios.

[0018] In related technologies, database configuration parameters are tuned based on manual adjustments or preset fixed strategies. For example, database administrators (DBAs) manually adjust database parameters in configuration files based on their management experience and business needs; or, initial configuration parameters are configured according to recommendations in official database documentation, with minor manual adjustments made based on observations of database performance; or, fixed monitoring thresholds and processing rules are pre-set based on DBA management experience, and database configuration parameters are adjusted according to these rules when the monitoring thresholds are met. However, these tuning methods all rely on the individual experience of DBAs, and the experience levels of different individuals vary significantly, making it difficult to guarantee optimal database performance after tuning. Furthermore, configuration parameters often have complex dependencies, and tuning based on individual experience is prone to getting stuck in local optima and is difficult to respond to underlying state changes in the corresponding business environment, such as data or load.

[0019] In related technologies, heuristic algorithms are used to handle optimization problems, reducing reliance on human experience by automatically searching multidimensional parameter spaces. However, heuristic algorithms are essentially still local searches; although they introduce a degree of randomness, they are susceptible to getting trapped in local optima. Furthermore, the convergence speed and performance of the final solution are significantly affected by the initial solution; due to the randomness of the initial solution, the performance of the final searched solution is relatively unstable. Therefore, even when using heuristic algorithms to fine-tune database configuration parameters, it is still difficult to obtain globally optimal configuration parameters.

[0020] Therefore, it is evident that in related technologies, when the business scenarios corresponding to the database are relatively complex, it is difficult to determine the globally optimal configuration parameters, resulting in poor database performance.

[0021] Based on this, in this embodiment of the application, multiple first configurations corresponding to the first database and first performance data corresponding to the multiple first configurations are collected. The first configuration is used to indicate one or more database parameters, and the first performance data is used to describe the performance of the first database under the corresponding first configuration. Then, based on the multiple first configurations and the first performance data corresponding to the multiple first configurations, a first probability model is constructed, and based on the first probability model, one or more first parameter values ​​corresponding to the first parameter set are determined. The first probability model is used to describe the conditional probability relationship between the first parameter set and the set target performance index. The first parameter set is constructed based on one or more database parameters indicated by the multiple first configurations. Each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize the first conditional probability. Here, the first conditional probability represents the probability that each database parameter in the first parameter set takes the corresponding parameter value, given that the performance of the first database has reached the target performance index. Then, using one or more first parameter values ​​as the initial solution to the first optimization problem, the first optimization problem is solved based on the set optimization algorithm to obtain one or more second parameter values. The first optimization problem is used to determine the optimal parameter value corresponding to the first parameter set. Finally, based on one or more second parameter values, the first database is configured. In the above scheme, the first parameter value that maximizes the first conditional probability is determined based on the constructed first probability model. This is equivalent to inferring a relatively optimal parameter value that can meet the target performance index for the database parameters through the first probability model. On this basis, the above scheme uses the first parameter value as the initial solution of the first optimization problem. This is equivalent to using the determined relatively optimal parameter value as the initial solution of the first optimization problem. Compared with related technologies, the quality of the initial solution is improved, so that the final solution of the first optimization problem can converge to the global optimum. That is, one or more second parameter values ​​are globally optimal. In this way, the configuration of the first database can ensure that the database achieves the best performance. Compared with related technologies, the performance of the database is improved.

[0022] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0023] This application provides a database optimization method, see [link to relevant documentation]. Figure 1 The method includes: Step 101: Collect multiple first configurations corresponding to the first database and the first performance data corresponding to the multiple first configurations.

[0024] The first configuration is used to indicate one or more database parameters; the first performance data is used to describe the performance of the first database when the corresponding first configuration is adopted.

[0025] In practical applications, the first database can include relational databases, such as MySQL or PostgreSQL, or non-relational databases, such as MongoDB.

[0026] The first database can be set up in a cloud platform environment and / or a virtualization environment, and can also be understood as a cloud platform database.

[0027] In practical applications, the first configuration can be used to configure the database's operating mode and / or data processing mode through database parameters. For example, the first configuration can be represented as a database configuration file.

[0028] The one or more database parameters in the first configuration instruction can be understood as a set of parameters used to configure the database; database parameters can also be described as database configuration parameters. Each database parameter in the first configuration instruction can be used to configure the database's operating mode and / or data processing mode in one aspect.

[0029] For example, database parameters may include: max_connections or innodb_buffer_pool_size, where max_connections can be used to configure the number of concurrent connections to the database, and innodb_buffer_pool_size can be used to configure the memory allocation space of the database.

[0030] In practical applications, the first performance data corresponding to the first configuration can be used to describe the performance of the first database when that first configuration is used; that is, it can be used to describe the performance of the first database when it has been configured based on the first configuration. Database performance can include read / write performance and operational efficiency, among other things.

[0031] The first performance data may include data from the first database regarding one or more performance metrics, and the first performance data may also be expressed as performance metric data.

[0032] For example, the first performance data may include data on one or more of the following performance metrics: throughput (TPS, Transactions Per Second), query latency, and central processing unit (CPU) utilization.

[0033] In practical applications, multiple first configurations corresponding to the first database and the first performance data corresponding to the multiple first configurations can be collected from the running logs of the first database in actual business scenarios and / or stress testing scenarios.

[0034] A real-world business scenario can be understood as a scenario where actual business processing is performed based on a primary database. In this scenario, the load on the primary database comes from real business data.

[0035] A load testing scenario can be understood as a scenario where, after simulating the load on a primary database, processing is performed on that primary database. In this scenario, the load on the primary database can come from simulated data, for example, it can be simulated using automated testing tools. By using simulated data from a load testing scenario, performance testing of the primary database under specific load conditions can be achieved, thereby improving testing efficiency and reducing interference with actual business scenarios.

[0036] After collecting multiple first configurations and corresponding first performance data, these collected configurations and data can be preprocessed. For example, invalid data cleaning or normalization can be performed. Then, the preprocessed configurations and data can be used for subsequent processing.

[0037] Step 102: Based on multiple first configurations and the first performance data corresponding to the multiple first configurations, construct a first probability model, and based on the first probability model, determine one or more first parameter values ​​corresponding to the first parameter set.

[0038] The first probability model describes the conditional probability relationship between the first parameter set and the set target performance index. The first parameter set is constructed based on one or more database parameters of multiple first configuration instructions. Each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize the first conditional probability. The first conditional probability represents the probability that each database parameter in the first parameter set takes the corresponding parameter value, given that the performance of the first database has reached the target performance index.

[0039] In practical applications, a first parameter set can be constructed based on multiple first configurations corresponding to the first database. The first parameter set may include one or more database parameters indicated by multiple first configurations.

[0040] For example, the first parameter set can be represented as: , in, It can characterize the first Database parameters.

[0041] In practical applications, a first set of performance indicators can be constructed based on the first performance data. The first set of performance indicators may include one or more performance indicators corresponding to the first performance data.

[0042] For each performance metric in the first set of performance metrics, a corresponding target condition can be set. If the first database meets the target condition, it can be considered that the first database has good performance in the performance corresponding to that metric. The target condition corresponding to the performance metric is also known as the target performance metric.

[0043] For example, the target performance metric may include one or more of the following: throughput greater than threshold 1, query latency less than threshold 2.

[0044] Here, the first probabilistic model describes the conditional probabilistic relationship between the first parameter set and the set target performance index. This first probabilistic model is constructed based on multiple first configurations and their corresponding first performance data. In practical applications, the first probabilistic model can be understood as a mathematical statistical model that learns the conditional probabilistic relationship between the parameter values ​​in the first parameter set and the first performance data through multiple first configurations and their corresponding first performance data. The multiple first configurations and their corresponding first performance data can be understood as known historical data; therefore, it can also be understood that the first probabilistic model learns the conditional probabilistic relationship between the parameter values ​​in the first parameter set and the first performance data based on known historical data.

[0045] In practical applications, the first probability model can be used to find the maximum value of the first conditional probability corresponding to the first parameter set, and it can also be used to determine the values ​​of each database parameter in the first parameter set when the first conditional probability is maximized. The values ​​of the database parameters determined by the first probability model are also the values ​​of the first parameters.

[0046] The first conditional probability can be understood as the posterior probability corresponding to the first parameter set, and the maximum value of the first conditional probability can be understood as the maximum posterior probability.

[0047] For example, the first conditional probability can be expressed as: , in, It can represent the first conditional probability. It can represent the first set of parameters and the corresponding events. The events corresponding to the first set of parameters are events where the database parameters in the first set of parameters have specific parameter values. It can characterize the target performance metric and the corresponding event. The event corresponding to the target performance metric is the event when the performance of the first database reaches the target performance metric. It can characterize the posterior probability corresponding to the target performance indicator, that is, the probability that the performance indicator of the first database will reach the target performance indicator, given that the parameter values ​​in the first parameter set are specific parameter values. It can also be expressed as the second conditional probability. It can characterize the probability that a database parameter in the first parameter set has a specific parameter value. It can characterize the probability that the performance indicators of the first database will reach the target performance indicators.

[0048] In practical applications, the database parameters in the first parameter set have different values; that is, the probability value of the first conditional probability corresponding to the first parameter set can be different for different combinations of parameter values. Using the first probability model, the parameter value combination that maximizes the first conditional probability among the different parameter value combinations corresponding to the first parameter set can be determined; that is, using the first probability model, one or more first parameter values ​​used to maximize the first conditional probability can be identified.

[0049] In practical applications, the first probability model can be solved using the conditional independence assumption. For example, the conditional independence assumption can be expressed as: , in, It can represent the second conditional probability. It can characterize the known database parameters Given specific parameter values, the probability that the performance of the first database will reach the set target performance index.

[0050] Based on multiple initial configurations and corresponding initial performance data, the first probabilistic model can calculate the probability of the impact of different values ​​of each database parameter in the first parameter set on performance. These impact probabilities can be understood as the conditional probability relationships learned by the first probabilistic model, or as the conditional independence assumption. The first probability model, through the assumption of conditional independence, decomposes the process of solving for the first parameter value into inference based on the influence probability, thereby determining the first parameter value.

[0051] For example, the first probability model can be characterized as an independent inference model based on Naive Bayes.

[0052] Step 103: Using one or more first parameter values ​​as the initial solution to the first optimization problem, solve the first optimization problem based on the set optimization algorithm to obtain one or more second parameter values.

[0053] The first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set.

[0054] In practical applications, the optimization algorithm can be based on an intelligent search mechanism to find the optimal solution to the first optimization problem in a multi-dimensional parameter space, that is, to determine the optimal combination of parameter values ​​among the candidate combinations of parameter values ​​corresponding to the first parameter set.

[0055] Each candidate parameter value combination corresponding to the first parameter set can be understood as a combination formed by a candidate parameter value of each database parameter in the first parameter set; the optimal parameter value combination corresponding to the first parameter set can be understood as the parameter value combination that enables the first database to achieve optimal performance; the parameter values ​​in the optimal parameter value combination can be understood as the optimal parameter values ​​corresponding to the database parameters in the first parameter set.

[0056] For example, the optimization algorithm may include: simulated annealing algorithm, particle swarm optimization algorithm or genetic algorithm, etc.

[0057] In practical applications, during the solution of the first optimization problem, the parameter values ​​corresponding to the first parameter set can be iterated multiple times based on a set optimization algorithm until a set convergence condition is reached. For example, the set convergence condition may include: the number of iterations reaching a set threshold.

[0058] The solution determined by the algorithm under the set convergence conditions can be understood as the final solution to the first optimization problem.

[0059] In each iteration, an algorithmic solution to the first optimization problem can be determined. This algorithmic solution can be characterized as one or more parameter values ​​corresponding to the first parameter set. This algorithmic solution can be updated based on the algorithmic solution in the previous iteration. The algorithmic solution in the previous iteration can be understood as the algorithmic solution that is relied upon in this iteration.

[0060] In practical applications, the initial solution to the first optimization problem can be understood as the algorithmic solution relied upon during the first iteration.

[0061] Here, based on the constructed first probability model, a first parameter value that maximizes the first conditional probability is determined. This is equivalent to inferring a better parameter value that can meet the target performance index for the database parameters through the first probability model. On this basis, the embodiment of this application uses the first parameter value as the initial solution of the first optimization problem. This is equivalent to using the determined better parameter value as the initial solution of the first optimization problem. Compared with related technologies, this improves the quality of the initial solution, so that the final solution of the first optimization problem can converge to the global optimum.

[0062] In practical applications, one or more second parameter values ​​can be regarded as the final solution to the first optimization problem, or as the global optimal solution to the first optimization problem.

[0063] Step 104: Configure the first database based on one or more second parameter values.

[0064] In practical applications, the first database can be configured with each database parameter in the first parameter set as one or more second parameter values.

[0065] In this embodiment, a first parameter value that maximizes the first conditional probability is determined based on the constructed first probability model. This is equivalent to inferring a better parameter value that can meet the target performance index for the database parameters through the first probability model. Based on this, this embodiment uses the first parameter value as the initial solution of the first optimization problem. This is equivalent to using the determined better parameter value as the initial solution of the first optimization problem. Compared with related technologies, it does not rely on human experience, thus improving the quality of the initial solution. This allows the final solution of the first optimization problem to converge to the global optimum, that is, to make one or more second parameter values ​​globally optimal. In this way, the configuration of the first database can ensure that the database achieves the best performance. Compared with related technologies, the performance of the database is improved, and it has strong adaptability to large-scale virtualization environments such as cloud platforms.

[0066] The solution method for the first optimization problem will be further explained below.

[0067] In one embodiment, the first objective function corresponding to the first optimization problem is constructed based on one or more performance index functions; each of the one or more performance index functions is used to measure the impact of the parameter values ​​corresponding to the first parameter set on a performance index.

[0068] In practical applications, the first optimization problem can be defined as: given an objective function, i.e., a first objective function, finding one or more parameter values ​​corresponding to a first set of parameters such that the function value corresponding to the first objective function is optimal. The function value corresponding to the first objective function can be expressed as the objective function value corresponding to the first optimization problem.

[0069] The first objective function can be used to measure the impact of the parameter values ​​corresponding to the first parameter set on the performance of the first database. When the function value corresponding to the first objective function reaches its optimum, the performance of the first database can be considered to have reached its optimum.

[0070] In practical applications, the optimization objective of the first optimization problem can be understood as optimizing the function value corresponding to the first objective function. For example, optimizing the function value corresponding to the first objective function can include: maximizing the function value corresponding to the first objective function, or minimizing the function value corresponding to the first objective function.

[0071] Here, the first objective function is constructed based on one or more performance index functions, each of which measures the impact of the parameter values ​​corresponding to the first parameter set on a performance index.

[0072] In practical applications, each performance metric function can be used to measure the impact of the parameter values ​​corresponding to the first parameter set on the performance of the first database in a certain aspect. The performance of the first database in a certain aspect can be understood as the performance of the first database with respect to a performance metric.

[0073] With different combinations of parameter values ​​for the first parameter set configured for the first database, the performance index function can correspond to different function values. During the solution process based on the set optimization algorithm, the function value corresponding to the performance index function can be determined based on performance data under stress testing conditions.

[0074] Here, by constructing a first objective function through one or more performance index functions, the first objective function can more comprehensively and accurately describe the impact of different parameter values ​​corresponding to the first parameter set on the performance of the first database. Based on this, the second parameter values ​​obtained from solving the first optimization problem can effectively improve the performance of the first database.

[0075] In one embodiment, the optimization objective corresponding to the first optimization problem is represented as minimizing the function value corresponding to the first objective function; and, The function value corresponding to the first objective function is negatively correlated with the first performance corresponding to the performance index function; the first performance characterizes the performance represented by the function value corresponding to the performance index function.

[0076] For example, the first optimization problem can be defined as: , in, The first objective function can be represented, and the optimization objective corresponding to the first optimization problem can be regarded as minimizing the function value corresponding to the first objective function.

[0077] Here, the function value corresponding to the first objective function is negatively correlated with the first performance index function. In practical applications, if the performance represented by the function value corresponding to the performance index function in the first objective function value is superior, the function value corresponding to the first objective function can be smaller; conversely, if the performance represented by the function value corresponding to the performance index function in the first objective function value is superior, the function value corresponding to the first objective function can be larger.

[0078] The function value corresponding to a performance metric function can be positively correlated with or negatively correlated with the performance it represents. For example, when the performance metric function describes the impact of parameter values ​​corresponding to the first parameter set on the throughput of the first database, and the function value represents the throughput of the first database, a larger function value corresponds to a larger throughput, meaning better database performance. Conversely, when the performance metric function describes the impact of parameter values ​​corresponding to the first parameter set on the query latency of the first database, and the function value represents the query latency of the first database, a larger function value corresponds to a larger query latency, meaning worse database performance.

[0079] In this embodiment, the function value corresponding to the first objective function is negatively correlated with the first performance corresponding to the performance index function. Thus, when the function value of the first objective function reaches its minimum value, the performance of the first database can reach its optimal state. This can guide the optimization algorithm to search in the direction of improving database performance, avoid getting trapped in local optima, and improve database performance.

[0080] In one embodiment, the first objective function is characterized as a weighted sum of one or more performance index functions, the weights of which are determined based on sensitivity analysis.

[0081] In practical applications, sensitivity analysis can be used to determine the degree of influence of the weights corresponding to each performance index function on the primary objective function. In other words, it can be used to determine the sensitivity of the function value of the primary objective function to the weights corresponding to each performance index function. The weights can also be expressed as weight values.

[0082] In determining the weights corresponding to the performance index functions based on sensitivity analysis, multiple weight value combinations can be preset. Each weight value in the weight value combination can represent the weight value corresponding to a performance index function, and each weight value combination can be understood as a set of candidate weight values. Then, for each weight value combination, database performance testing can be performed under fixed conditions, and the performance data of the first database under the first objective function corresponding to the weight value combination can be recorded. The fixed conditions can include, for example, the function design of a fixed performance index function. Afterward, based on the performance data corresponding to one or more weight value combinations, a weight value combination that can balance the distribution of the performance index functions in the first objective function can be determined, and the determined weight value combination can be used as the weight value corresponding to each performance index function in the first objective function.

[0083] In the process of determining the weight value combination that enables the performance index function to be balanced in the first objective function based on the performance data corresponding to multiple weight value combinations, for each weight value combination, the stable function value that the first objective function can reach in the optimization process can be determined based on the corresponding performance data. The stable function value can be the maximum function value. Then, based on the multiple stable function values ​​corresponding to multiple weight value combinations, the first weight value combination can be selected from the multiple weight value combinations, and the first weight value combination is determined as the weight value combination that enables the performance index function to be balanced in the first objective function. The first weight value combination can be the weight value combination corresponding to the maximum stable function value among the multiple stable function values ​​corresponding to multiple weight value combinations.

[0084] In practical applications, the weight of the performance index function in the first objective function can be determined based on the business scenario. In this way, the first objective function can flexibly adapt to the optimization needs under different business scenarios, thereby improving the performance of the first database under different business scenarios.

[0085] For example, in a background task computing scenario, improving the throughput of the database can improve the user experience of the corresponding service more than reducing query latency. In this case, the performance metric function corresponding to throughput can be assigned a higher weight in the first objective function. In a real-time transaction scenario, reducing query latency can improve the user experience of the corresponding service more than improving the throughput of the database. In this case, the performance metric function corresponding to query latency can be assigned a higher weight in the first objective function.

[0086] Here, the weights of the performance metric function in the first objective function are determined based on sensitivity analysis. In practical applications, the weights of the performance metric function in the first objective function can be determined based on sensitivity analysis performed in the corresponding business scenario.

[0087] In practical applications, a stress testing environment can be used to simulate the business scenarios corresponding to the first database. Then, based on the performance data under the simulated business scenarios, sensitivity analysis can be performed to determine the weight of the performance index function in the first objective function.

[0088] In this embodiment, a weighted sum function is used to construct the first objective function, and sensitivity analysis is combined to reasonably allocate the weights of each performance index function. In this way, the various performance indicators can be effectively balanced in the optimization process based on the first objective function, so that the overall database performance can reach the optimal level.

[0089] In one embodiment, the first objective function is constructed based on a first performance metric function and a second performance metric function; the first performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the throughput of the first database, and the second performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the query latency of the first database.

[0090] In practical applications, the function value corresponding to the first performance metric function can characterize the throughput of the first database, which can be represented as the number of transactions per second. The function value corresponding to the second performance metric function can characterize the query latency of the first database.

[0091] In practical applications, the first objective function can be represented as a weighted sum of the first performance index function and the second performance index function.

[0092] For example, the first objective function can be expressed as: , in, It can characterize the first objective function. It can characterize the first performance index function; It can characterize the second performance index function; This can represent the weighting coefficient, which can be understood as the weight corresponding to the performance index function. It can be used to balance throughput and query latency in optimization. In practical applications, weighting coefficients can be determined based on sensitivity analysis. .

[0093] For example, the weighting coefficients in the above example are determined based on sensitivity analysis. It can mainly include the following steps: Step 1: Preset multiple different The value was set, and database performance was tested on the first database under fixed conditions.

[0094] Step 2: Record each Throughput and query latency at these values.

[0095] Step 3: Through analysis, determine the factors that can balance the changes in throughput and query latency. value, and the The value is used for the first objective function in the subsequent optimization process.

[0096] In this embodiment, performance index functions are established for throughput and query latency, respectively, and then a first objective function is constructed. In this way, a trade-off between throughput and latency can be achieved through adjustable weight parameters, thereby enabling a comprehensive performance evaluation of the database. Based on this, through optimization related to the first objective function, the first database can meet the requirements of high concurrency processing and fast response, realizing adaptive global tuning of the first database under complex load conditions.

[0097] In one embodiment, solving the first optimization problem based on a set optimization algorithm includes: Based on the set optimization algorithm, the parameter values ​​corresponding to the first parameter set are iterated multiple times until the set convergence condition is reached. The first acceptance probability and the first ratio are negatively correlated with the optimization algorithm. The first acceptance probability represents the probability of accepting the first algorithm solution in the first iteration when the first algorithm solution in the first iteration is inferior to the second algorithm solution in the second iteration. The first iteration represents the next iteration of the second iteration. The first ratio represents the ratio of the first difference to the first factor. The first difference is used to compare the superiority of the first algorithm solution and the second algorithm solution. The first factor decreases as the number of iterations increases.

[0098] In practical applications, when performing one iteration of multiple iterations on the parameter values ​​corresponding to the first parameter set based on a set of optimization algorithms, an algorithmic solution can be determined in that iteration. This solution is then compared to the solution from the previous iteration; for example, the objective function value corresponding to this solution is compared to the objective function value corresponding to the solution from the previous iteration. If the solution is superior to the solution from the previous iteration, it is accepted; otherwise, it is accepted with a set acceptance probability. Here, the solution in this iteration can be equivalent to the first algorithmic solution in the first iteration, the solution in the previous iteration can be equivalent to the second algorithmic solution in the second iteration, and the set acceptance probability can be equivalent to the first acceptance probability.

[0099] In practical applications, in the first iteration, the solution from the first algorithm can be understood as the new solution, and the solution from the second algorithm can be understood as the current solution. If the solution from the first algorithm is inferior to the solution from the second algorithm, the solution from the first algorithm can be considered the inferior solution.

[0100] Here, the first acceptance probability is negatively correlated with the first ratio, which is represented by the ratio of the first difference to the first factor. The first difference is used to compare the merits of the first algorithm solution and the second algorithm solution, and the first factor decreases as the number of iterations increases.

[0101] In practical applications, the first difference can also be understood as the performance difference between the second algorithm solution and the first algorithm solution. For example, the first difference can be characterized as the difference between the objective function value corresponding to the second algorithm solution and the objective function value corresponding to the first algorithm solution.

[0102] The first factor can influence the probability of the optimization algorithm accepting a suboptimal solution. The first factor can also be described as an influencing factor or influencing parameter. With a fixed first difference, as the number of iterations increases, the first factor gradually decreases, the first ratio gradually increases, and correspondingly, the first acceptance probability gradually decreases.

[0103] For example, the first acceptance probability can be expressed as: , in, It can represent the first acceptance probability. This can represent the first difference. It can characterize the first factor.

[0104] In this embodiment, the first factor decreases with increasing iteration count. Thus, in the early stages of iteration, the optimization algorithm has a higher probability of accepting inferior solutions, enhancing its search capability and allowing it to escape local optima through accepted inferior solutions. As the iteration count increases, the probability of accepting inferior solutions gradually decreases, allowing the algorithm to focus more on better regions in the search space, guiding the solution towards the global optimum and ensuring stable improvement in global performance. Therefore, by dynamically adjusting the first acceptance probability, this embodiment can improve database performance while maintaining optimization efficiency.

[0105] In this embodiment, an optimization algorithm is used to find the optimal parameter values ​​corresponding to the database parameters in the first parameter set, resulting in one or more second parameter values. The first database is then configured based on these second parameter values. In practical applications, the first database can be configured based on one or more second parameter values ​​in actual business scenarios. Performance testing of the first database in these scenarios is then performed, and the database parameters are further optimized based on the obtained performance data. This optimization process is repeated during the operation of the first database, achieving closed-loop optimization. This is equivalent to real-time monitoring of the database during operation and parameter optimization based on the performance data from real-time monitoring. This reduces manual intervention, increases the automation of optimization, lowers database maintenance costs, and improves database operating efficiency.

[0106] During each database parameter tuning process, the relevant schemes in the embodiments of this application can be referred to to determine the initial solution of the first optimization problem and further solve the optimal solution of the first optimization problem, and then the first database can be configured based on the optimal solution.

[0107] In one embodiment, after configuring the first database based on one or more second parameter values, the database optimization method provided in this application further includes: Obtain the second performance data from the first database; The first probability model is updated based on the second performance data.

[0108] In practical applications, the second performance data can be understood as the performance data collected after configuring the first database based on one or more second parameter values ​​in a real business scenario. The second performance data can be used to reflect the performance of the first database when running based on the optimized database parameters.

[0109] In practical applications, the second performance data can be fed back into the first probability model to update the second conditional probability in the first probability model. This can improve the inference accuracy of the first probability model and dynamically adapt to the complex changes in the actual business scenario. It also improves the quality of the initial solution and its adaptability to the business during subsequent optimization. Based on this, the configuration of the first database can ensure that the database achieves optimal performance, thus improving the database performance compared to related technologies.

[0110] Based on the embodiments described above, this application also provides a database optimization device, see [link to relevant documentation]. Figure 2 The database optimization device includes: The acquisition unit 21 is used to acquire multiple first configurations corresponding to the first database and first performance data corresponding to the multiple first configurations; the first configuration is used to indicate one or more database parameters; the first performance data is used to describe the performance of the first database when using the corresponding first configuration; The determining unit 22 is configured to construct a first probability model based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, and to determine one or more first parameter values ​​corresponding to the first parameter set based on the first probability model; the first probability model is used to describe the conditional probability relationship between the first parameter set and the set target performance index; the first parameter set is constructed based on one or more database parameters indicated by the plurality of first configurations; each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize the first conditional probability; the first conditional probability represents the probability that each database parameter in the first parameter set takes the corresponding parameter value under the condition that the performance of the first database has reached the target performance index; The solving unit 23 is used to solve the first optimization problem based on a set optimization algorithm, using the one or more first parameter values ​​as the initial solution of the first optimization problem, to obtain one or more second parameter values; the first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set. Configuration unit 24 is configured to configure the first database based on one or more second parameter values.

[0111] In one embodiment, the first objective function corresponding to the first optimization problem is constructed based on one or more performance index functions; each of the one or more performance index functions is used to measure the impact of the parameter value corresponding to the first parameter set on a performance index.

[0112] In one embodiment, the first objective function is characterized as a weighted sum of one or more performance index functions, the weights of which are determined based on sensitivity analysis.

[0113] In one embodiment, the optimization objective corresponding to the first optimization problem is represented as minimizing the function value corresponding to the first objective function; and, The function value corresponding to the first objective function is negatively correlated with the first performance corresponding to the performance index function; the first performance characterizes the performance characterized by the function value corresponding to the performance index function.

[0114] In one embodiment, the first objective function is constructed based on a first performance metric function and a second performance metric function; the first performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the throughput of the first database, and the second performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the query latency of the first database.

[0115] In one embodiment, the solving unit 23 solves the first optimization problem based on a set optimization algorithm, including: Based on the optimization algorithm, the parameter values ​​corresponding to the first parameter set are iterated multiple times until the set convergence condition is reached. Wherein, the first acceptance probability corresponding to the set optimization algorithm is negatively correlated with the first ratio; the first acceptance probability represents the probability of accepting the first algorithm solution in the first iteration when the first algorithm solution in the first iteration is inferior to the second algorithm solution in the second iteration; the first iteration represents the last iteration of the second iteration; the first ratio represents the ratio of the first difference to the first factor; the first difference is used to compare the superiority of the first algorithm solution and the second algorithm solution, and the first factor decreases with the increase of the number of iterations.

[0116] In one embodiment, after configuring the first database based on the one or more second parameter values, the configuration unit 24 is further configured to: Obtain the second performance data from the first database; The first probability model is updated based on the second performance data.

[0117] In practical applications, the acquisition unit 21, determination unit 22, solution unit 23, and configuration unit 24 can be implemented by the processor in the database optimization device.

[0118] It should be noted that the database optimization device provided in the above embodiments is only illustrated by the division of the above program modules when performing database optimization. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the database optimization device and the database optimization method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0119] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, this application also provides an electronic device, referring to... Figure 3 The electronic device includes: Communication interface 1 enables information exchange with other devices; Processor 2 is connected to communication interface 1 to enable information interaction with other devices and, when running a computer program, executes the methods provided by one or more technical solutions in the above embodiments. The computer program is stored in memory 3.

[0120] Specifically, the processor 2 is used to collect multiple first configurations corresponding to the first database and first performance data corresponding to the multiple first configurations; the first configuration is used to indicate one or more database parameters; the first performance data is used to describe the performance of the first database when using the corresponding first configuration; Based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, a first probability model is constructed, and based on the first probability model, one or more first parameter values ​​corresponding to a first parameter set are determined; the first probability model is used to describe the conditional probability relationship between the first parameter set and the set target performance index; the first parameter set is constructed based on one or more database parameters indicated by the plurality of first configurations; each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize a first conditional probability; the first conditional probability represents: the probability that each database parameter in the first parameter set takes the corresponding parameter value under the condition that the performance of the first database has reached the target performance index; Using the one or more first parameter values ​​as the initial solution to the first optimization problem, the first optimization problem is solved based on a set optimization algorithm to obtain one or more second parameter values; the first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set; and, The first database is configured based on one or more of the second parameter values.

[0121] In one embodiment, the first objective function corresponding to the first optimization problem is constructed based on one or more performance index functions; each of the one or more performance index functions is used to measure the impact of the parameter value corresponding to the first parameter set on a performance index.

[0122] In one embodiment, the first objective function is characterized as a weighted sum of one or more performance index functions, the weights of which are determined based on sensitivity analysis.

[0123] In one embodiment, the optimization objective corresponding to the first optimization problem is represented as minimizing the function value corresponding to the first objective function; and, The function value corresponding to the first objective function is negatively correlated with the first performance corresponding to the performance index function; the first performance characterizes the performance characterized by the function value corresponding to the performance index function.

[0124] In one embodiment, the first objective function is constructed based on a first performance metric function and a second performance metric function; the first performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the throughput of the first database, and the second performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the query latency of the first database.

[0125] In one embodiment, the processor 2 solves the first optimization problem based on a set optimization algorithm, including: Based on the optimization algorithm, the parameter values ​​corresponding to the first parameter set are iterated multiple times until the set convergence condition is reached. Wherein, the first acceptance probability corresponding to the set optimization algorithm is negatively correlated with the first ratio; the first acceptance probability represents the probability of accepting the first algorithm solution in the first iteration when the first algorithm solution in the first iteration is inferior to the second algorithm solution in the second iteration; the first iteration represents the last iteration of the second iteration; the first ratio represents the ratio of the first difference to the first factor; the first difference is used to compare the superiority of the first algorithm solution and the second algorithm solution, and the first factor decreases with the increase of the number of iterations.

[0126] In one embodiment, after configuring the first database based on the one or more second parameter values, the processor 2 is further configured to: Obtain the second performance data from the first database; The first probability model is updated based on the second performance data.

[0127] It should be noted that the specific processing procedure of communication interface 1 can be understood by referring to the above method.

[0128] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 3 The general will label all buses as Bus System 4.

[0129] The memory 3 in this embodiment is used to store various types of data to support operation in the electronic device. Examples of such data include any computer program used to operate on the electronic device.

[0130] The methods disclosed in the embodiments of this application can be applied to the processor 2, or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 2 or by instructions in the form of software. The processor 2 mentioned above may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 3. The processor 2 reads the information in the memory 3 and combines its hardware to complete the steps of the aforementioned method.

[0131] In an exemplary embodiment, the electronic device may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.

[0132] It is understood that the memory 3 in the embodiments of this application can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.

[0133] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 that stores a computer program, which can be executed by the processor 2 of an electronic device to complete the steps described in the aforementioned database optimization method.

[0134] Computer-readable storage media can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM, etc.

[0135] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a processor 2 of an electronic device to perform the steps described in the aforementioned database optimization method.

[0136] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0137] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the term "one or more" in this document refers to any combination of at least two of any one or more elements from a set of A, B, and C. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set of A, B, and C. Additionally, the term "one or more" in this document is an exemplary expression and can be replaced with any possible expressions, such as one or more, at least one, or at least one of, etc.

[0138] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0139] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A database optimization method, characterized in that, The method includes: Collect multiple first configurations corresponding to a first database and first performance data corresponding to the multiple first configurations; the first configuration is used to indicate one or more database parameters; the first performance data is used to describe the performance of the first database when using the corresponding first configuration. Based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, a first probability model is constructed, and based on the first probability model, one or more first parameter values ​​corresponding to a first parameter set are determined; the first probability model is used to describe the conditional probability relationship between the first parameter set and the set target performance index; the first parameter set is constructed based on one or more database parameters indicated by the plurality of first configurations; each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize a first conditional probability; the first conditional probability represents: the probability that each database parameter in the first parameter set takes the corresponding parameter value under the condition that the performance of the first database has reached the target performance index; Using the one or more first parameter values ​​as the initial solution to the first optimization problem, the first optimization problem is solved based on a set optimization algorithm to obtain one or more second parameter values; the first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set. The first database is configured based on one or more of the second parameter values.

2. The method according to claim 1, characterized in that, The first objective function corresponding to the first optimization problem is constructed based on one or more performance index functions; each of the one or more performance index functions is used to measure the impact of the parameter value corresponding to the first parameter set on a performance index.

3. The method according to claim 2, characterized in that, The first objective function is characterized as a weighted sum of one or more performance index functions, the weights of which are determined based on sensitivity analysis.

4. The method according to claim 2, characterized in that, The optimization objective corresponding to the first optimization problem is represented as minimizing the function value corresponding to the first objective function; and... The function value corresponding to the first objective function is negatively correlated with the first performance corresponding to the performance index function; the first performance characterizes the performance characterized by the function value corresponding to the performance index function.

5. The method according to claim 2, characterized in that, The first objective function is constructed based on a first performance metric function and a second performance metric function; the first performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the throughput of the first database, and the second performance metric function is used to measure the impact of the parameter values ​​corresponding to the first parameter set on the query latency of the first database.

6. The method according to claim 1, characterized in that, The solution to the first optimization problem based on the set optimization algorithm includes: Based on the optimization algorithm, the parameter values ​​corresponding to the first parameter set are iterated multiple times until the set convergence condition is reached. Wherein, the first acceptance probability corresponding to the set optimization algorithm is negatively correlated with the first ratio; the first acceptance probability represents the probability of accepting the first algorithm solution in the first iteration when the first algorithm solution in the first iteration is inferior to the second algorithm solution in the second iteration; the first iteration represents the last iteration of the second iteration; the first ratio represents the ratio of the first difference to the first factor; the first difference is used to compare the superiority of the first algorithm solution and the second algorithm solution, and the first factor decreases with the increase of the number of iterations.

7. The method according to claim 1, characterized in that, After configuring the first database based on the one or more second parameter values, the method further includes: Obtain the second performance data from the first database; The first probability model is updated based on the second performance data.

8. A database optimization device, characterized in that, include: The acquisition unit is used to acquire multiple first configurations corresponding to the first database and first performance data corresponding to the multiple first configurations; The first configuration is used to indicate one or more database parameters; The first performance data is used to describe the performance of the first database under the corresponding first configuration; The determining unit is configured to construct a first probability model based on the plurality of first configurations and the first performance data corresponding to the plurality of first configurations, and determine one or more first parameter values ​​corresponding to the first parameter set based on the first probability model; The first probability model is used to describe the conditional probability relationship between the first set of parameters and the set target performance index; The first parameter set is constructed based on one or more database parameters of the plurality of first configuration indications; each of the one or more first parameter values ​​represents the value of a database parameter in the first parameter set, and the one or more first parameter values ​​are used to maximize a first conditional probability; the first conditional probability represents the probability that each database parameter in the first parameter set takes the corresponding parameter value under the condition that the performance of the first database has reached the target performance index; The solving unit is used to solve the first optimization problem based on a set optimization algorithm, using the one or more first parameter values ​​as the initial solution to the first optimization problem, to obtain one or more second parameter values; The first optimization problem is used to determine the optimal parameter values ​​corresponding to the first parameter set; A configuration unit is used to configure the first database based on one or more of the second parameter values.

9. An electronic device, characterized in that, include: A processor and a memory for storing a computer program capable of running on the processor; wherein, when the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 7.

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

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