Database updating method and device and electronic equipment

By determining the performance to be optimized in the database and using the parameter optimization algorithm for iterative optimization, the problem of manual adjustment of database parameters is solved, and the database performance is maximized and optimization is achieved.

CN120011380APending Publication Date: 2025-05-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510420069.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In the prior art, the accuracy and efficiency of manually changing database parameters is low, especially when facing complex database environments, it is difficult to ensure that parameter adjustments reach the optimal state.

Method used

By determining the performance of the target database to be optimized and using the parameter optimization algorithm to iteratively optimize the associated database parameters, the updated parameters are obtained and replaced with the target database to improve database performance.

Benefits of technology

It improves the accuracy and efficiency of database parameter optimization, ensures that parameter adjustments reach the optimal state, and improves the overall performance of the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011380A_ABST
    Figure CN120011380A_ABST
Patent Text Reader

Abstract

The invention discloses a database updating method and device and electronic equipment. The method relates to the field of big data, and comprises the following steps: determining to-be-optimized performance of a target database, and determining database parameters associated with the to-be-optimized performance to obtain M database parameters; iterative optimization is conducted on the M database parameters through a parameter optimization algorithm, M updated parameters are obtained, and the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; and replacing the M database parameters in the target database with the M updated parameters to obtain an updated target database. Through the method and the device, the problem of low accuracy and efficiency of manual database parameter change in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, and more specifically, to a database updating method, device and electronic device. Background Art

[0002] In the existing large-scale information system management, as the requirements for the database continue to change, the database parameters also need to be adjusted accordingly. The adjustment of database parameters mainly relies on manual operation, which is not only inefficient, but also difficult to ensure that the parameter adjustment reaches the optimal state in the face of increasingly complex database environments. With the expansion of database scale and the diversification of business needs, the complexity of the mutual dependence and constraints between parameters makes it easy for manual adjustment to ignore the synergy between parameters, making it difficult to fully optimize database performance.

[0003] Currently, no effective solution has been proposed to address the problem of low accuracy and efficiency in manually changing database parameters in related technologies. Summary of the invention

[0004] The main purpose of the present application is to provide a database updating method, device and electronic device to solve the problem of low accuracy and efficiency of manually changing database parameters in the related art.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for updating a database is provided. The method comprises: determining the performance to be optimized of the target database, and determining the database parameters associated with the performance to be optimized, to obtain M database parameters, where M is a positive integer; iteratively optimizing the M database parameters through a parameter optimization algorithm, to obtain M updated parameters, where the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; and replacing the M database parameters in the target database with the M updated parameters, to obtain an updated target database.

[0006] Optionally, the M database parameters are iteratively optimized through a parameter optimization algorithm to obtain M updated parameters, including: randomly generating N database parameter sets, and configuring the N database parameter sets to a target database to obtain N test databases; determining the performance data of each test database in turn to obtain N performance scores, and selecting a target performance score with the highest performance score; optimizing the M database parameters according to the database parameter set corresponding to the target performance score to obtain M updated parameters.

[0007] Optionally, optimizing M database parameters according to a database parameter set corresponding to a target performance score to obtain M updated parameters includes: when the target performance score is greater than an initial performance score of a target database, determining whether the target performance score is less than a performance score threshold; when the target performance score is greater than or equal to the performance score threshold, determining the database parameter set corresponding to the target performance score as the M updated parameters; when the target performance score is less than the performance score threshold, determining a numerical change trend between the database parameter set corresponding to the target performance score and the M database parameters, and optimizing the M database parameters according to the numerical change trend to obtain M updated parameters; when the target performance score is less than or equal to the initial performance score of the target database, re-executing the operation of randomly generating N database parameter sets.

[0008] Optionally, using M updated parameters to replace M database parameters in the target database to obtain an updated target database includes: determining the importance of each database parameter to the operating state of the target database to obtain multiple importances; changing each database parameter in the target database in order from large to small importance to obtain an updated target database.

[0009] Optionally, each database parameter in the target database is changed in order from large to small in importance, and the updated target database is obtained, including: after changing any database parameter, detecting the operating status of the updated target database; when the operating status is normal, continuing to execute the operation of changing each database parameter in the target database; when the operating status is abnormal, rolling back the database parameters associated with the performance to be optimized in the updated target database to the initial parameters.

[0010] Optionally, determining database parameters associated with the performance to be optimized to obtain M database parameters includes: obtaining database parameters that affect the performance to be optimized to obtain multiple first parameters; obtaining second parameters associated with each first parameter to obtain multiple second parameters; and determining the multiple first parameters and the multiple second parameters as M database parameters.

[0011] Optionally, when M updated parameters are used to replace M database parameters in the target database to obtain an updated target database, the method also includes: when the target database receives a data access request, storing the data access request in a cache queue, and determining the number of data access requests in the cache queue; when the number is equal to a preset value, pausing the target database update operation, processing all data access requests in the cache queue, and continuing to execute the target database update operation.

[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a database updating device is provided. The device comprises: a determining unit, used to determine the performance to be optimized of the target database, and determine the database parameters associated with the performance to be optimized, to obtain M database parameters, where M is a positive integer; an optimizing unit, used to iteratively optimize the M database parameters through a parameter optimization algorithm, to obtain M updated parameters, where the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; and a replacing unit, used to replace the M database parameters in the target database with the M updated parameters, to obtain an updated target database.

[0013] Optionally, the optimization unit includes: a generation module, used to randomly generate N database parameter sets, and configure the N database parameter sets into a target database to obtain N test databases; a first determination module, used to determine the performance data of each test database in turn, obtain N performance scores, and select a target performance score with the highest performance score; an optimization module, used to optimize M database parameters according to the database parameter set corresponding to the target performance score, to obtain M updated parameters.

[0014] Optionally, the optimization module includes: a first determination submodule, used to determine whether the target performance score is less than a performance score threshold when the target performance score is greater than an initial performance score of the target database; a second determination submodule, used to determine the database parameter set corresponding to the target performance score as M updated parameters when the target performance score is greater than or equal to the performance score threshold; a third determination submodule, used to determine the numerical change trend between the database parameter set corresponding to the target performance score and the M database parameters when the target performance score is less than the performance score threshold, and optimize the M database parameters according to the numerical change trend to obtain M updated parameters; a first execution submodule, used to re-execute the operation of randomly generating N database parameter sets when the target performance score is less than or equal to the initial performance score of the target database.

[0015] Optionally, the replacement unit includes: a second determination module, used to determine the importance of each database parameter to the operating status of the target database, and obtain multiple importances; a change module, used to change each database parameter in the target database in order from large to small importance, and obtain an updated target database.

[0016] Optionally, the change module includes: a detection submodule, which is used to detect the operating status of the updated target database after changing any database parameter; a second execution submodule, which is used to continue to execute the operation of changing each database parameter in the target database when the operating status is normal; and a rollback submodule, which is used to roll back the database parameters associated with the performance to be optimized in the updated target database to the initial parameters when the operating status is abnormal.

[0017] Optionally, the determination unit includes: a first acquisition module, used to acquire database parameters that affect the performance to be optimized, and obtain multiple first parameters; a second acquisition module, used to acquire second parameters associated with each first parameter, and obtain multiple second parameters; and a third determination module, used to determine the multiple first parameters and the multiple second parameters as M database parameters.

[0018] Optionally, when M updated parameters are used to replace M database parameters in the target database to obtain an updated target database, the device also includes: a judgment unit, which is used to store the data access request in a cache queue when the target database receives a data access request, and to judge the number of data access requests in the cache queue; a processing unit, which is used to suspend the target database update operation when the number is equal to a preset value, and to process all data access requests in the cache queue, and continue to execute the target database update operation.

[0019] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided, the electronic device comprising a memory storing an executable program; and a processor for running the program, wherein the above-mentioned database updating method is executed when the program is running.

[0020] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is provided, comprising computer instructions, which implement the steps of the above-mentioned database updating method when executed by a processor.

[0021] In an embodiment of the present application, the performance to be optimized of a target database is determined, and database parameters associated with the performance to be optimized are determined to obtain M database parameters, where M is a positive integer; the M database parameters are iteratively optimized by a parameter optimization algorithm to obtain M updated parameters, where the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; the M database parameters in the target database are replaced with the M updated parameters to obtain an updated target database, and the database parameters are iteratively optimized by the parameter optimization algorithm, thereby achieving the purpose of improving the accuracy and efficiency of parameter optimization, thereby solving the technical problem of low accuracy and efficiency of manually changing database parameters in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0023] Figure 1 A hardware structure block diagram of a computer terminal for implementing a database updating method is shown;

[0024] Figure 2 is a flowchart of a database updating method provided in Example 1 of the present application;

[0025] Figure 3 is a schematic diagram of a database updating device provided according to Embodiment 2 of the present application;

[0026] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] It should be noted that the database update method, device and electronic device determined in the present disclosure can be used in the field of big data, and can also be used in any field except the field of big data. The application field of the database update method, device and electronic device determined in the present disclosure is not limited.

[0031] It should be noted that the collected information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation entrances are provided for users to choose to authorize use or refuse use. If the user chooses to refuse, the expert decision-making process is entered. For example, an interface is set between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.

[0032] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0033] Example 1

[0034] According to an embodiment of the present application, an embodiment of a method for updating a database is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a database update method. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0036] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the database update method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned database update method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0040] Under the above operating environment, this application provides Figure 2 The update method of the database shown. Figure 2 is a flowchart of a method for updating a database according to Example 1 of the present application, such as Figure 2 As shown, the method includes:

[0041] Step S201, determining the performance to be optimized of the target database, and determining database parameters associated with the performance to be optimized, to obtain M database parameters, where M is a positive integer.

[0042] It should be noted that the target database may be a database system that needs to be optimized, and may be any type of database, such as MySQL, Oracle, or NoSQL database. The performance to be optimized may be a performance indicator that needs to be improved according to current business needs and database operation status, such as query response time, data security, concurrent processing capability, etc. Database parameters may be configurable items in the database system that are used to control its operating characteristics, including query cache size, maximum concurrency, etc. The M database parameters may be the M parameters that need to be adjusted by analyzing a set of parameters that are closely related to the performance to be optimized. When the performance to be optimized needs to be optimized, the optimization operation may be performed by adjusting the M database parameters.

[0043] Specifically, when optimizing a database, you first need to determine the target database, that is, the database instance that needs to be optimized, and then determine the specific performance indicators that need to be optimized, such as query response time, concurrent processing capability, data security, etc. Subsequently, by analyzing the database configuration file and querying the database management system, you can identify M database parameters that are directly related to the selected performance indicators, and then adjust the M database parameters to make the database performance meet the requirements.

[0044] For example, the target database is MySQL, and the performance to be optimized is query response time. By analyzing the MySQL configuration file my.cnf and system logs, it can be determined that parameters such as query_cache_size (query cache size), innodb_buffer_pool_size (InnoDB buffer pool size), and innodb_log_file_size (InnoDB log file size) are closely related to query response time. At this time, the three parameters obtained are the database parameters that need to be adjusted in this step.

[0045] The purpose of this step is to focus on the optimization direction and avoid the waste of resources and inefficiency that may be caused by blindly adjusting all parameters. By accurately identifying the parameters that are most closely related to the performance to be optimized, subsequent optimization operations can be ensured to be more efficient and accurate, and the pertinence and effectiveness of adjustments can be improved.

[0046] Step S202, iteratively optimize the M database parameters through a parameter optimization algorithm to obtain M updated parameters, wherein the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized.

[0047] It should be noted that the parameter optimization algorithm can be an intelligent optimization algorithm such as a genetic algorithm or a particle swarm optimization algorithm, which is used to find the optimal configuration of the parameter set. Iterative optimization means that the algorithm gradually adjusts the parameter values ​​through multiple rounds of calculations to obtain the parameter combination with the best performance score. The performance score can be a scoring mechanism set according to the performance indicator to be optimized. For example, the shorter the query response time, the higher the score.

[0048] Specifically, after determining the M parameters that need to be adjusted, a genetic algorithm can be used for iterative optimization. The genetic algorithm simulates natural selection and inheritance processes to randomly mutate and crossover parameter values. After each round of iteration, the merits of each parameter combination are evaluated based on the performance score of the performance to be optimized (e.g., the shorter the response time, the higher the score). The algorithm will retain the parameter combinations with higher scores, eliminate the combinations with lower scores, and then perform the next round of mutation and crossover. Thus, through iterative optimization, the database parameters that can make the performance score of the performance to be optimized meet the preset requirements, that is, the M updated parameters, are selected.

[0049] For example, a genetic algorithm is used to optimize the query_cache_size, innodb_buffer_pool_size, and innodb_log_file_size parameters. The algorithm sets the parameter range, such as query_cache_size can range from 1MB to 512MB, innodb_buffer_pool_size ranges from 64MB to 4GB, etc., and then through multiple generations of evolution, gradually explores the combination of parameter values ​​that can significantly reduce the query response time.

[0050] This step can automatically explore the parameter space and find the optimal solution through the intelligent iteration of the parameter optimization algorithm, without the need for manual attempts one by one. This not only greatly improves the efficiency of parameter adjustment, but also through the global search capability of the algorithm, it can find parameter configurations that are more in line with the optimization goal, avoiding the limitations and errors that may be caused by manual adjustment.

[0051] Step S203: Use the M updated parameters to replace the M database parameters in the target database to obtain an updated target database.

[0052] Specifically, after completing the parameter optimization, the updated parameters can be applied to the target database. For example, the best parameter value combination query_cache_size = 128MB, innodb_buffer_pool_size = 2GB, innodb_log_file_size = 64MB obtained in the previous round of optimization is used to replace the old parameter values ​​of the target database one by one through an automated script or a special parameter update tool, thereby completing the database update operation and obtaining the updated target database.

[0053] It should be noted that the replacement process needs to ensure that the database can run stably and cannot affect the business that needs to run in the database. Therefore, the data replacement operation can be performed during non-peak hours, and the operating status of the database can be monitored in real time during the replacement process. Once an abnormality is found (such as a sudden drop in database performance), it will be rolled back to the state before the change to ensure the stable operation of the database.

[0054] Through this step, the database will run under optimized parameter settings, thereby achieving the technical effects of improving database performance, improving user experience, and increasing business efficiency.

[0055] The database updating method provided in the embodiment of the present application determines the performance to be optimized of the target database and determines the database parameters associated with the performance to be optimized to obtain M database parameters, wherein M is a positive integer; iteratively optimizes the M database parameters through a parameter optimization algorithm to obtain M updated parameters, wherein the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; replaces the M database parameters in the target database with the M updated parameters to obtain an updated target database, and iteratively optimizes the database parameters through the parameter optimization algorithm, thereby achieving the purpose of improving the accuracy and efficiency of parameter optimization, thereby solving the technical problem of low accuracy and efficiency of manually changing database parameters in the related art.

[0056] Optionally, in the database updating method provided in the embodiment of the present application, M database parameters are iteratively optimized through a parameter optimization algorithm to obtain M updated parameters, including: randomly generating N database parameter sets, and configuring the N database parameter sets to a target database to obtain N test databases; determining the performance data of each test database in turn to obtain N performance scores, and selecting a target performance score with the highest performance score; optimizing the M database parameters according to the database parameter set corresponding to the target performance score to obtain M updated parameters.

[0057] It should be noted that the N database parameter sets are parameter groups generated by randomization, and each parameter set contains different values ​​of M database parameters. The test database is a copy of the target database configured with a specific parameter set, which is used to test the impact of parameters on performance in a safe environment.

[0058] When determining the updated parameters, we first need to use a random algorithm to generate N different sets of database parameters. For example, for the three parameters of query_cache_size, innodb_buffer_pool_size, and innodb_log_file_size, we generate N different sets of parameter value combinations by setting the parameter value range. Then, we configure each set of parameters to a copy of the target database, create N test databases, and each test database is configured with a set of parameter values ​​from the N parameter sets.

[0059] Optionally, after configuring N test databases, a performance test can be performed on each test database using a preset performance test program or tool to collect performance data related to the performance to be optimized, such as query response time, CPU utilization, disk I / O, etc. Based on the collected performance data, a performance score of each test database is calculated using a preset scoring algorithm to obtain N performance scores. Then, the highest score is selected from the N performance scores as the target performance score, that is, the optimal performance.

[0060] Optionally, after determining the optimal parameter set corresponding to the target performance score, the M database parameter values ​​in the parameter set can be determined as updated parameters. For example, if a certain set of configurations in the N parameter sets is found in the performance test to make the query response time of the target database the shortest, then this set of parameter values ​​will become the M updated parameters for the next step of parameter replacement.

[0061] This embodiment forms an intelligent and efficient database parameter optimization process by randomly generating parameter sets, scoring performance tests, and selecting optimal configurations. Compared with the traditional single parameter adjustment method, this method can more comprehensively explore the parameter space, and through quantitative comparison of performance data, intelligently determine the parameter configuration that can significantly improve the performance of the database to be optimized, which not only improves the efficiency of parameter optimization, but also avoids the subjectivity and errors of manual operations through automation and intelligent means, ensuring the accuracy and security of database parameter adjustment, thereby improving the operating performance and stability of the database.

[0062] Optionally, in the database updating method provided in the embodiment of the present application, M database parameters are optimized according to the database parameter set corresponding to the target performance score to obtain M updated parameters, including: when the target performance score is greater than the initial performance score of the target database, determining whether the target performance score is less than the performance score threshold; when the target performance score is greater than or equal to the performance score threshold, determining the database parameter set corresponding to the target performance score as the M updated parameters; when the target performance score is less than the performance score threshold, determining the numerical change trend between the database parameter set corresponding to the target performance score and the M database parameters, and optimizing the M database parameters according to the numerical change trend to obtain M updated parameters; when the target performance score is less than or equal to the initial performance score of the target database, re-executing the operation of randomly generating N database parameter sets.

[0063] It should be noted that the target performance score is the highest score obtained through performance testing, which represents the best performance. The initial performance score is the performance score of the target database before any parameter adjustment is made, reflecting the current basic performance level of the database. The performance score threshold is a preset performance score standard used to determine whether the initial performance has reached the ideal level. The numerical change trend is to determine the direction and magnitude of the parameter adjustment by comparing the parameter value corresponding to the target performance score with the initial parameter value, such as increasing the cache size, reducing the lock wait time, etc.

[0064] Specifically, when optimizing parameters, you first need to determine whether the performance score of the currently obtained database parameters is higher than the performance score of the database parameters currently used by the database, that is, you need to compare the target performance score with the initial performance score of the target database. If the target performance score is higher than the initial performance score, it means that the performance of the database has indeed been improved through parameter adjustment. Next, check whether the target performance score is less than the performance score threshold to determine whether the currently obtained target performance score meets the preset requirements. For example, if the performance score threshold is 90 points and the target performance score is 85 points, it means that the performance level of the adjusted database still does not meet the threshold requirements.

[0065] When the target performance score is greater than or equal to the preset performance score threshold, it means that the database parameter set corresponding to the target performance score can meet the performance requirements of the database. At this time, the database parameter set corresponding to the target performance score can be directly used as the M updated parameters, that is, the optimal parameter configuration, to complete the parameter update operation.

[0066] When the target performance score is less than the performance score threshold, it is necessary to analyze the numerical change trend between the parameter set corresponding to the target performance score and the M database parameters, and adjust the parameters according to the trend to obtain database parameters that meet the requirements. For example, if the query_cache_size (query cache size) parameter value corresponding to the target performance score is larger than the initial value, the algorithm will tend to continue to increase the query_cache_size in future iterations in the hope of obtaining a higher performance score. Based on this trend, the algorithm adjusts the M parameters and performs the next round of iterative optimization. Then, by analyzing the trend, the direction of parameter adjustment is intelligently guided, avoiding performance degradation or instability that may be caused by blind adjustment, and ensuring the scientific nature and effectiveness of the optimization strategy.

[0067] It should be noted that when the target performance score is less than or equal to the initial performance score of the target database, it means that after a round of parameter optimization, the target performance score has not been improved, or even lower than the initial performance score, which means that the current optimization direction or parameter selection is not appropriate. At this time, it is necessary to re-execute the steps of randomly generating N database parameter sets and start a new round of optimization attempts to obtain database parameters that meet the performance requirements.

[0068] This embodiment makes an intelligent decision on whether parameter adjustment is needed based on the comparison between the current performance score of the target database and the threshold, thereby avoiding unnecessary optimization of the database that has already reached the high performance requirements. By analyzing the numerical change trend between the parameter set corresponding to the target performance score and the initial parameters, the subsequent parameter optimization direction is guided, and the scientific nature and effect of the optimization strategy are improved. When the optimization effect is not good, the algorithm can automatically restart the exploration to avoid falling into the local optimal solution, thereby ensuring the continuity of the optimization process and the reliability of the final result.

[0069] In summary, this embodiment can make intelligent decisions based on the actual operating status of the database and dynamically adjust the optimization strategy, thereby improving database performance while ensuring the efficiency, accuracy and security of the optimization process.

[0070] Optionally, in the database updating method provided in the embodiment of the present application, M updated parameters are used to replace M database parameters in the target database, and the updated target database is obtained, including: determining the importance of each database parameter to the operating state of the target database, and obtaining multiple importances; and changing each database parameter in the target database in order from large to small importance, to obtain an updated target database.

[0071] It should be noted that the operating status can refer to the performance of the target database under a certain parameter configuration, including indicators such as response time, concurrent processing capability, and disk I / O. Importance can be an indicator for quantitatively evaluating the impact of each database parameter on the operating status, and is used to determine the priority of parameter changes.

[0072] Specifically, when updating database parameters, you first need to evaluate the importance of each parameter to the operating status of the target database. The importance can be determined through historical data analysis, simulation testing, or expert experience. For example, for query_cache_size (query cache size), innodb_buffer_pool_size (InnoDB buffer pool size), and innodb_log_file_size (InnoDB log file size), the system may find that the optimization of query_cache_size has the most significant improvement in response time, so it gives it a higher importance score; while the adjustment of innodb_log_file_size has a relatively small impact on performance improvement, and the importance score is lower, and then a numerical importance is assigned to each parameter, forming a set of multiple importances.

[0073] After obtaining multiple importances, the system changes the database parameters in the target database in descending order of importance. For example, if query_cache_size has the highest score, its value is adjusted first; then, innodb_buffer_pool_size and innodb_log_file_size are adjusted in order of importance. After each parameter is changed, the system monitors the operating status of the target database in real time to ensure that any adjustment will not cause performance degradation or other adverse effects.

[0074] In this embodiment, by changing parameters in order of importance, the system can prioritize the parameters that contribute most to performance improvement, thereby achieving the greatest performance improvement with minimal changes. In addition, the real-time monitoring mechanism can promptly detect and handle any potential problems, ensuring the safety of parameter changes and the stable operation of the database.

[0075] Optionally, in the database updating method provided in the embodiment of the present application, each database parameter in the target database is changed in order from large to small in importance, and the updated target database is obtained, including: after changing any database parameter, detecting the operating status of the updated target database; when the operating status is normal, continuing to execute the operation of changing each database parameter in the target database; when the operating status is abnormal, rolling back the database parameters associated with the performance to be optimized in the updated target database to the initial parameters.

[0076] Specifically, when changing parameters in order of importance, after each parameter change is completed, the system will immediately detect the operating status of the updated target database, thereby checking the database's real-time performance monitoring data, abnormal records in log files, system alarm information, etc., to ensure that the parameter change has not introduced any adverse effects. If there is no abnormality in the detected operating status after changing a parameter, that is, the performance and stability of the database meet the predetermined standards, the system will continue to change the remaining database parameters in order of importance, that is, the next high-importance parameter will be adjusted until all parameters are changed. Then, under the premise of ensuring that the change has no negative impact on the database, the parameter optimization is continuously carried out to continuously approach the optimal performance state, reflecting the continuity and systematic nature of the optimization process.

[0077] It should be noted that if after changing a certain parameter, it is detected that the updated target database is operating abnormally, such as a sudden increase in query response time, frequent system restarts, etc., the system will immediately trigger the rollback mechanism to restore the database parameters associated with the performance to be optimized to the initial values ​​before the change, so as to avoid the abnormal state from further affecting the system operation, and then take immediate action when the anomaly is detected to avoid the spread of potential risks and protect the database from the negative impact of improper parameter adjustment.

[0078] This embodiment ensures the stability and security of the database by real-time detection of the operating status and timely rollback of abnormal changes, avoiding system failures caused by improper parameter adjustment. At the same time, combined with the parameter importance ranking, it can prioritize the adjustment of parameters that have the greatest impact on performance while ensuring safety, accelerate the optimization process, and improve the operating efficiency of the database.

[0079] Optionally, in the database updating method provided in the embodiment of the present application, determining the database parameters associated with the performance to be optimized, and obtaining M database parameters includes: obtaining the database parameters that affect the performance to be optimized, and obtaining multiple first parameters; obtaining the second parameters associated with each first parameter, and obtaining multiple second parameters; and determining the multiple first parameters and the multiple second parameters as M database parameters.

[0080] Specifically, when determining the database parameters that need to be adjusted, it is first necessary to identify the performance indicators to be optimized, such as reducing the query response time. Then, by analyzing the database configuration documents, performance test reports, system logs, etc., the database parameters directly related to the query response time, such as query_cache_size (query cache size), innodb_buffer_pool_size (InnoDB buffer pool size), etc., are identified to obtain multiple first parameters.

[0081] After determining multiple first parameters, the correlation between these parameters and other database parameters can be further analyzed to identify second parameters that may indirectly affect performance optimization. For example, the adjustment of query_cache_size may require the cooperation of query_cache_min_res_unit (query cache minimum allocation unit) to ensure the efficiency of cache management; the change of innodb_buffer_pool_size may require the corresponding adjustment of innodb_buffer_pool_instances (InnoDB buffer pool instance number) to optimize the allocation of cache resources, thereby obtaining multiple second parameters by analyzing the correlation.

[0082] When the above-mentioned multiple first parameters and the second parameter corresponding to each parameter are obtained, the multiple first parameters can be combined with the second parameters to form a comprehensive parameter set, namely M database parameters, so that the M database parameters include all parameters that directly and indirectly affect the performance to be optimized, ensuring that the optimization operation covers all key points that may affect the performance, providing a basis for subsequent parameter adjustment and performance optimization, and ensuring the integrity and effectiveness of the optimization strategy.

[0083] This embodiment forms a comprehensive and accurate parameter identification process by identifying and integrating database parameters that are directly and indirectly related to the performance to be optimized. It not only focuses on the direct parameters that affect the performance, but also considers the interactions and correlations between parameters, avoiding blind spots in the parameter adjustment process, ensuring comprehensive coverage of the optimization strategy, and ensuring the accuracy of database optimization.

[0084] Optionally, in the database updating method provided in the embodiment of the present application, when M updated parameters are used to replace M database parameters in the target database to obtain an updated target database, the method also includes: when the target database receives a data access request, storing the data access request in a cache queue, and determining the number of data access requests in the cache queue; when the number is equal to a preset value, pausing the target database update operation, processing all data access requests in the cache queue, and continuing to execute the target database update operation.

[0085] It should be noted that the data access request may be a request for operations on the database such as reading, writing, and querying. The cache queue may be a queue for temporarily storing data access requests to ensure that ongoing database operations are not affected during parameter changes. The preset value may be a threshold value for the number of data access requests in the cache queue. When the threshold value is reached or exceeded, the system will suspend the parameter update operation and give priority to processing the data access request.

[0086] Specifically, when the target database is updating parameters, if data access requests are received at this time, the system will not process these requests immediately, but will temporarily store them in the cache queue. At the same time, the system will continue to monitor the number of data access requests in the cache queue to evaluate the real-time load pressure of the database. By caching data access requests, performance fluctuations or data inconsistency issues that may be caused by directly processing these requests during parameter updates can be avoided.

[0087] Optionally, when the number of data access requests in the cache queue reaches a preset value, the system will automatically suspend the ongoing target database parameter update operation and give priority to all data access requests stored in the cache queue. Once the request is processed, the system will resume the parameter update operation and continue to execute the unfinished parameter modification process, thereby ensuring that the database can continue to provide stable services even during the parameter update, and normal business processing will not be affected by the optimization operation. At the same time, by setting the preset value, the system can flexibly adjust the execution time of the parameter update according to the actual load situation, balancing the relationship between optimization and business processing.

[0088] This embodiment ensures that the parameter optimization process is efficient and does not affect normal business processing through cache queues and dynamic adjustment strategies, thereby improving the stability of the database and business continuity.

[0089] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0090] Example 2

[0091] The embodiment of the present application also provides a database update device. It should be noted that the database update device of the embodiment of the present application can be used to execute the database update method provided in the above embodiment. The following introduces the database update device provided in the embodiment of the present application.

[0092] According to an embodiment of the present application, a device for implementing the above database updating method is also provided. Figure 3 is a schematic diagram of a database updating device provided according to Example 2 of the present application, such as Figure 3 As shown, the device includes: a determination unit 31, an optimization unit 32, and a replacement unit 33.

[0093] The determination unit 31 is used to determine the performance to be optimized of the target database and determine the database parameters associated with the performance to be optimized to obtain M database parameters, where M is a positive integer.

[0094] The optimization unit 32 is used to iteratively optimize the M database parameters through a parameter optimization algorithm to obtain M updated parameters, wherein the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized.

[0095] The replacing unit 33 is used to replace the M database parameters in the target database with the M updated parameters to obtain an updated target database.

[0096] The database updating device provided in the embodiment of the present application determines the performance to be optimized of the target database through a determination unit 31, and determines the database parameters associated with the performance to be optimized, to obtain M database parameters, wherein M is a positive integer; the optimization unit 32 iteratively optimizes the M database parameters through a parameter optimization algorithm to obtain M updated parameters, wherein the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; the replacement unit 33 replaces the M database parameters in the target database with the M updated parameters to obtain an updated target database, and achieves the purpose of improving the accuracy and efficiency of parameter optimization by iteratively optimizing the database parameters through the parameter optimization algorithm, thereby solving the technical problem of low accuracy and efficiency of manually changing database parameters in the related art.

[0097] Optionally, in the database updating device provided in the embodiment of the present application, the optimization unit 32 includes: a generation module, used to randomly generate N database parameter sets, and configure the N database parameter sets into the target database to obtain N test databases; a first determination module, used to determine the performance data of each test database in turn, obtain N performance scores, and select the target performance score with the highest performance score; an optimization module, used to optimize M database parameters according to the database parameter set corresponding to the target performance score, to obtain M updated parameters.

[0098] Optionally, in the database updating device provided in the embodiment of the present application, the optimization module includes: a first determination submodule, used to determine whether the target performance score is less than a performance score threshold when the target performance score is greater than the initial performance score of the target database; a second determination submodule, used to determine the database parameter set corresponding to the target performance score as M updated parameters when the target performance score is greater than or equal to the performance score threshold; a third determination submodule, used to determine the numerical change trend between the database parameter set corresponding to the target performance score and the M database parameters when the target performance score is less than the performance score threshold, and optimize the M database parameters according to the numerical change trend to obtain M updated parameters; a first execution submodule, used to re-execute the operation of randomly generating N database parameter sets when the target performance score is less than or equal to the initial performance score of the target database.

[0099] Optionally, in the database updating device provided in the embodiment of the present application, the replacement unit 33 includes: a second determination module, used to determine the importance of each database parameter to the operating state of the target database, and obtain multiple importances; a change module, used to change each database parameter in the target database in order from large to small importance, and obtain an updated target database.

[0100] Optionally, in the database updating device provided in the embodiment of the present application, the change module includes: a detection submodule, which is used to detect the operating status of the updated target database after changing any database parameter; a second execution submodule, which is used to continue to execute the operation of changing each database parameter in the target database when the operating status is normal; and a rollback submodule, which is used to roll back the database parameters associated with the performance to be optimized in the updated target database to the initial parameters when the operating status is abnormal.

[0101] Optionally, in the database updating device provided in the embodiment of the present application, the determination unit 31 includes: a first acquisition module, used to acquire database parameters affecting the performance to be optimized, and obtain multiple first parameters; a second acquisition module, used to acquire second parameters associated with each first parameter, and obtain multiple second parameters; a third determination module, used to determine the multiple first parameters and the multiple second parameters as M database parameters.

[0102] Optionally, in the database updating device provided in the embodiment of the present application, when M database parameters in the target database are replaced with M updated parameters to obtain an updated target database, the device also includes: a judgment unit, which is used to store the data access request in a cache queue and judge the number of data access requests in the cache queue when the target database receives the data access request; a processing unit, which is used to suspend the target database update operation when the number is equal to a preset value, process all data access requests in the cache queue, and continue to execute the target database update operation.

[0103] It should be noted that the above-mentioned determination unit 31, optimization unit 32, and replacement unit 33 correspond to steps S201 to S203 in Example 1, and the two modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be run in the computer terminal 10 provided in Example 1 as part of the device.

[0104] Example 3

[0105] An embodiment of the present application may provide an electronic device, Figure 4 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4(only one is shown) processor 1002, memory 1004, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0106] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0107] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: randomly generate N database parameter sets, and configure the N database parameter sets into the target database to obtain N test databases; determine the performance data of each test database in turn to obtain N performance scores, and select the target performance score with the highest performance score; optimize the M database parameters according to the database parameter set corresponding to the target performance score to obtain M updated parameters.

[0108] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when the target performance score is greater than the initial performance score of the target database, determine whether the target performance score is less than the performance score threshold; when the target performance score is greater than or equal to the performance score threshold, determine the database parameter set corresponding to the target performance score as M updated parameters; when the target performance score is less than the performance score threshold, determine the numerical change trend between the database parameter set corresponding to the target performance score and the M database parameters, and optimize the M database parameters according to the numerical change trend to obtain M updated parameters; when the target performance score is less than or equal to the initial performance score of the target database, re-execute the operation of randomly generating N database parameter sets.

[0109] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the importance of each database parameter to the operating status of the target database and obtain multiple importances; change each database parameter in the target database in order from large to small importance to obtain an updated target database.

[0110] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: after changing any database parameter, detect the operating status of the updated target database; when the operating status is normal, continue to execute the operation of changing each database parameter in the target database; when the operating status is abnormal, roll back the database parameters associated with the performance to be optimized in the updated target database to the initial parameters.

[0111] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain database parameters that affect the performance to be optimized to obtain multiple first parameters; obtain second parameters associated with each first parameter to obtain multiple second parameters; determine the multiple first parameters and the multiple second parameters as M database parameters.

[0112] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: when the target database receives a data access request, the data access request is stored in a cache queue, and the number of data access requests in the cache queue is determined; when the number is equal to a preset value, the target database update operation is suspended, and all data access requests in the cache queue are processed, and the target database update operation is continued.

[0113] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 4 The structure of the electronic device is not limited. Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations shown.

[0114] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0115] Example 4

[0116] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the database update method provided in the first embodiment.

[0117] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0118] An embodiment of the present application also provides a computer program product, which is suitable for executing the steps of the method for updating a database when executed on a data processing device.

[0119] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned database updating method.

[0120] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0121] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0122] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0125] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0126] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for updating a database, characterized in that: include: Determine the performance to be optimized of the target database, and determine the database parameters associated with the performance to be optimized, to obtain M database parameters, where M is a positive integer; Iteratively optimizing the M database parameters through a parameter optimization algorithm to obtain M updated parameters, wherein the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; The M updated parameters are used to replace the M database parameters in the target database to obtain an updated target database.

2. The method according to claim 1, characterized in that The M database parameters are iteratively optimized by a parameter optimization algorithm to obtain M updated parameters including: Randomly generate N database parameter sets, and configure the N database parameter sets into the target database to obtain N test databases, where N is a positive integer; Determine the performance data of each test database in turn, obtain N performance scores, and select the target performance score with the highest performance score; The M database parameters are optimized according to the database parameter set corresponding to the target performance score to obtain the M updated parameters.

3. The method according to claim 2, characterized in that The M database parameters are optimized according to the database parameter set corresponding to the target performance score, and the M updated parameters obtained include: In a case where the target performance score is greater than the initial performance score of the target database, determining whether the target performance score is less than a performance score threshold; When the target performance score is greater than or equal to the performance score threshold, determining a database parameter set corresponding to the target performance score as the M updated parameters; When the target performance score is less than the performance score threshold, determining a numerical change trend between the database parameter set corresponding to the target performance score and the M database parameters, and optimizing the M database parameters according to the numerical change trend to obtain the M updated parameters; When the target performance score is less than or equal to the initial performance score of the target database, the operation of randomly generating N database parameter sets is re-executed.

4. The method according to claim 1, characterized in that: Using the M updated parameters to replace the M database parameters in the target database to obtain an updated target database includes: Determine the importance of each database parameter to the operating state of the target database to obtain a plurality of importances; Each database parameter in the target database is changed in order from large to small according to the importance, so as to obtain the updated target database.

5. The method according to claim 4, characterized in that Each database parameter in the target database is changed in descending order of importance, and the updated target database includes: After changing any one of the database parameters, detecting the running status of the updated target database; When the operating state is normal, continue to perform the operation of changing each database parameter in the target database; In the case where the operating state is abnormal, the database parameters associated with the performance to be optimized in the updated target database are rolled back to the initial parameters.

6. The method according to claim 1, characterized in that Determine the database parameters associated with the performance to be optimized, and obtain M database parameters including: Acquire database parameters that affect the performance to be optimized to obtain a plurality of first parameters; Obtaining a second parameter associated with each first parameter to obtain a plurality of second parameters; The plurality of first parameters and the plurality of second parameters are determined as the M database parameters.

7. The method according to claim 1, characterized in that In the case where the M updated parameters are used to replace the M database parameters in the target database to obtain an updated target database, the method further includes: When the target database receives a data access request, the target database stores the data access request in a cache queue and determines the number of data access requests in the cache queue; When the number is equal to the preset value, the target database update operation is suspended, all data access requests in the cache queue are processed, and the target database update operation is continued.

8. A database updating device, characterized in that: include: A determination unit, used to determine the performance to be optimized of the target database, and determine database parameters associated with the performance to be optimized, to obtain M database parameters, where M is a positive integer; an optimization unit, configured to iteratively optimize the M database parameters through a parameter optimization algorithm to obtain M updated parameters, wherein the parameter optimization algorithm updates the M database parameters according to the performance score of the performance to be optimized; A replacement unit is used to replace the M database parameters in the target database with the M updated parameters to obtain an updated target database.

9. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the database updating method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program executes the database updating method described in any one of claims 1 to 7 when running.