WO2019223443A1 - 数据库配置参数处理方法、装置、计算机设备和存储介质 - Google Patents

数据库配置参数处理方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2019223443A1
WO2019223443A1 PCT/CN2019/082226 CN2019082226W WO2019223443A1 WO 2019223443 A1 WO2019223443 A1 WO 2019223443A1 CN 2019082226 W CN2019082226 W CN 2019082226W WO 2019223443 A1 WO2019223443 A1 WO 2019223443A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
parameter
current
performance
parameter adjustment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/082226
Other languages
English (en)
French (fr)
Inventor
邢家树
张
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to EP19807040.1A priority Critical patent/EP3742673A4/en
Publication of WO2019223443A1 publication Critical patent/WO2019223443A1/zh
Priority to US17/004,321 priority patent/US11507626B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/092Reinforcement learning

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method, a device, a computer device, and a storage medium for processing database configuration parameters.
  • the traditional technique is to sample the configuration parameters and test the configuration parameters obtained from the sampling to obtain the optimal configuration parameters.
  • the accuracy of sampling to obtain the optimal configuration parameters is low.
  • a database configuration parameter processing method executed by a computer device includes:
  • the new configuration parameter is used as the current configuration parameter, and the determination of the current database state indicator value corresponding to the current configuration parameter is continued until the recommended configuration parameter is obtained when the adjustment termination condition is met.
  • a database parameter configuration method executed by a terminal includes:
  • the parameter adjustment instruction is used to instruct the server to obtain a current configuration parameter of a database corresponding to the user account, determine a current database state indicator value corresponding to the current configuration parameter, and pass the parameter Adjust the model and generate parameter adjustment data according to the current database state indicator value, adjust the current configuration parameters according to the parameter adjustment data, obtain new configuration parameters, use the new configuration parameters as the current configuration parameters, and return the determination and
  • the current database status index value corresponding to the current configuration parameters continues to be executed until the recommended configuration parameters are obtained when the adjustment termination conditions are met.
  • a database configuration parameter processing device includes:
  • the current parameter acquisition module is used to acquire the current configuration parameters
  • a status indicator determining module configured to determine a current database status indicator value corresponding to a current configuration parameter
  • An adjustment data generating module configured to adjust a model through parameters and generate parameter adjustment data according to the current database state indicator value
  • a current parameter adjustment module configured to adjust the current configuration parameter according to the parameter adjustment data to obtain a new configuration parameter
  • the recommended parameter obtaining module is configured to use the new configuration parameter as the current configuration parameter, and return to the determination of the current database state indicator value corresponding to the current configuration parameter, and continue to perform until the adjustment configuration termination condition is met to obtain the recommended configuration parameter.
  • a database parameter configuration device includes:
  • the configuration page entry module is used to enter the database parameter configuration page through the current user account
  • An adjustment instruction obtaining module configured to obtain a parameter adjustment instruction triggered in the database parameter configuration page
  • An adjustment instruction sending module is configured to send the parameter adjustment instruction to a server; the parameter adjustment instruction is used to instruct the server to obtain a current configuration parameter of a database corresponding to the user account, and determine a current corresponding to the current configuration parameter.
  • Database status indicator value, parameter adjustment model is generated according to the current database status indicator value through parameter adjustment model, the current configuration parameter is adjusted according to the parameter adjustment data, new configuration parameter is obtained, and new configuration parameter is taken as current configuration Parameters, returning the determination of the current database state index value corresponding to the current configuration parameters, and continuing to execute until the recommended configuration parameters are obtained when the adjustment termination conditions are met.
  • a computer device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor causes the processor to perform the following steps:
  • the new configuration parameter is used as the current configuration parameter, and the determination of the current database state indicator value corresponding to the current configuration parameter is continued until the recommended configuration parameter is obtained when the adjustment termination condition is met.
  • a storage medium storing a computer program.
  • the processor causes the processor to perform the following steps:
  • the new configuration parameter is used as the current configuration parameter, and the determination of the current database state indicator value corresponding to the current configuration parameter is continued until the recommended configuration parameter is obtained when the adjustment termination condition is met.
  • FIG. 1 is an application scenario diagram of a database configuration parameter processing method in an embodiment
  • FIG. 2 is an application scenario diagram of a database configuration parameter processing method in another embodiment
  • FIG. 3 is a schematic flowchart of a database configuration parameter processing method according to an embodiment
  • FIG. 4 is a schematic flowchart of a step of obtaining an index value in an embodiment
  • FIG. 5 is a schematic flowchart of a step of generating parameter adjustment data in an embodiment
  • FIG. 6 is a schematic diagram of iteratively adjusting configuration parameters in an embodiment
  • FIG. 7 is a schematic flowchart of steps for performing an iteration according to a database status index value in an embodiment
  • FIG. 8 is a schematic flowchart of a step of detecting parameter adjustment data in an embodiment
  • FIG. 9 is a schematic diagram of a deployment environment of a database configuration parameter processing method in an embodiment
  • FIG. 10 is a schematic flowchart of a database configuration parameter processing method according to an embodiment
  • FIG. 11 is a schematic flowchart of a database parameter configuration method according to an embodiment
  • FIG. 12 is a block diagram of a database configuration parameter processing apparatus according to an embodiment
  • FIG. 13 is a block diagram of a database configuration parameter processing apparatus in another embodiment
  • FIG. 14 is a block diagram of a database parameter configuration device in an embodiment
  • FIG. 15 is a schematic diagram of an internal structure of a computer device in an embodiment.
  • FIG. 1 is an application scenario diagram of a database configuration parameter processing method according to an embodiment.
  • this application scenario includes a user terminal 110 and a server 120, and the user terminal 110 performs data interaction with the server 120 through a network connection.
  • the user terminal 110 may specifically be a desktop user terminal or a mobile user terminal, and the mobile user terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like.
  • the server 120 may specifically be a single server or a server cluster.
  • FIG. 2 is an application scenario diagram of a database configuration parameter processing method in another embodiment.
  • the application scenario includes a server cluster 220, a cloud platform 230 based on the server cluster 220, and a user terminal 210.
  • the server cluster 220 includes a master server 222.
  • the main control server 222 controls the cloud platform 230 and other servers in the server cluster through a network connection.
  • the user terminal 210 obtains a database service provided by the cloud platform 230 through a network connection, and accesses a database in the cloud platform 230 through a network connection.
  • a database configuration parameter processing method is provided.
  • the database configuration parameter processing method may be applied to the server 120 in FIG. 1 or the master server 222 in the server cluster 220 in FIG. 2 described above, or may be applied to the user terminal 110 in FIG. 1 or the user terminal in FIG. 2 210.
  • the server 120, the main control server 222, the user terminal 110, and the user terminal 210 are collectively referred to as a computer device, as shown in FIG.
  • This embodiment is mainly described by using the method applied to the server 120 in FIG. 1 described above.
  • the database configuration parameter processing method specifically includes the following steps:
  • the configuration parameter refers to a configuration parameter corresponding to a database.
  • the current configuration parameters refer to the configuration parameters of the database currently in use.
  • the configuration parameters may specifically include database management parameters, database parameters, and environment variable parameters.
  • the server obtains a database identifier, and sends a configuration parameter acquisition request to a database corresponding to the database identifier.
  • the server obtains the configuration parameters returned by the database according to the configuration parameter acquisition request, and uses the obtained configuration parameters as the current configuration parameters.
  • the database identification may be sent by the user terminal.
  • the configuration parameters of multiple databases are stored in the server, and the configuration parameters of multiple databases are stored in correspondence with the database identifier.
  • the server obtains the database identifier, queries the configuration parameters corresponding to the obtained database identifier among the stored configuration parameters, and uses the queried configuration parameters as the current configuration parameters.
  • the database status indicator value is data used to indicate the status of the database when it is running.
  • the current database status indicator value is the data monitored when the database is configured according to the current configuration parameters.
  • the server obtains the current configuration parameters, configures the database according to the acquired current configuration parameters, monitors the database configured according to the current configuration parameters, and obtains the current database status indicator value through monitoring.
  • the server configures the database according to the current configuration parameters.
  • the server invokes a database access simulation program to simulate and generate database access data, and accesses the database configured with the current configuration parameters according to the simulated database access data. By monitoring the database, the current database status indicator value is obtained.
  • the database access model program can generate various database access requests according to preset database access characteristics.
  • the server invokes the database access model program to simulate and generate a large number of data query requests, data insertion requests, or data modification requests.
  • the server performs a database query configured with the current configuration parameters based on the simulated data query requests, data insertion requests, or data modification requests. access.
  • Parameter adjustment model is generated through parameter adjustment model and parameter adjustment data is generated according to the current database state index value.
  • the parameter adjustment model is a data model that generates parameter adjustment data according to the current database state index value.
  • the parameter adjustment model may be a deep reinforcement learning (Deep Reinforcement Learning) model.
  • the parameter adjustment data is the data on which the current configuration parameters of the database are adjusted.
  • the parameter adjustment data includes an adjustment direction for each configuration parameter, and the adjustment direction may be any of an increase, a change, and a decrease.
  • the server takes the current database state index value as an input, inputs it to the parameter adjustment model, and obtains parameter adjustment data output by the parameter adjustment model according to the current database state index value.
  • the current database state index value is input into the neural network model of the parameter adjustment model, and parameter adjustment data generated by the neural network model through iterative adjustment is obtained.
  • the neural network model is a data model that obtains parameter adjustment data by training according to the current database state index values.
  • the server traverses each configuration parameter in the current configuration parameter, queries the parameter adjustment data corresponding to the traversed configuration parameter in the parameter adjustment data, and adjusts the traversed configuration parameter according to the queried parameter adjustment data to adjust
  • the subsequent configuration parameters serve as the new configuration parameters.
  • the server performs statistics on the parameter adjustment data, obtains the adjustment direction and adjustment times of each configuration parameter, and adjusts the corresponding current configuration parameters according to the calculated adjustment direction and adjustment times of each configuration parameter. Get new configuration parameters corresponding to the current configuration parameters.
  • the server statistics the parameter adjustment data. After the statistics, the adjustment direction of the configuration parameter A in the current configuration parameters is increased, and the number of adjustments is 3. According to the adjustment direction and the number of times, the configuration parameter A is increased 3 times to obtain the configuration. New configuration parameter Anew corresponding to parameter A.
  • the adjustment termination condition is a condition that needs to be met to terminate the loop adjustment.
  • the adjustment termination condition may be a preset termination target of the configuration parameters obtained after adjustment, or a preset termination number of cyclic adjustments.
  • the preset termination target may be a preset condition satisfied by the configuration parameters.
  • the recommended configuration parameters are those required by the database when the database performance is optimal.
  • the database status index value is the index data used to indicate the database operation status. Database status indicators include the number of requests and the amount of data.
  • the server uses the new configuration parameters as the current configuration parameters, and continues to determine the current database status index value corresponding to the current configuration parameters, adjusts the model through the parameters, and generates parameters based on the current database status index values. Adjust the data, adjust the current configuration parameters according to the parameter adjustment data, and obtain new configuration parameters. Until the adjustment termination conditions are met, obtain the current configuration parameters as the recommended configuration parameters.
  • the current database state index value corresponding to the current configuration parameter is determined, and the parameter adjustment model is used to generate parameter adjustment data according to the current database state index value, thereby improving the accuracy of the generated parameter adjustment data.
  • Adjust the current configuration parameters according to the generated parameter adjustment data to obtain new configuration parameters.
  • Get recommended configuration parameters By using the parameter adjustment data generated by the parameter adjustment model, the current configuration parameters are continuously and automatically adjusted to finally obtain the recommended configuration parameters when the adjustment termination conditions are met, thereby improving the accuracy of the recommended configuration parameters.
  • the database configuration parameter processing method executed by the terminal specifically includes the following: receiving a parameter adjustment instruction triggered by a user account; and determining an adjustment termination condition according to the parameter adjustment instruction.
  • the user account is a unique identifier used by the user to log in to the server, and the user may specifically be a natural person and an enterprise.
  • the parameter adjustment instruction is an instruction for instructing the server to obtain the recommended configuration parameters of the database.
  • a user enters a user account on a login page of a user terminal, logs in to a database parameter configuration page, and enters a preset performance index value in the database parameter configuration page.
  • the user terminal detects that the tuning button on the data parameter configuration page is clicked, it obtains the preset performance indicator value entered in the database parameter configuration page, generates a parameter adjustment instruction based on the obtained preset performance indicator value, and sends the parameter adjustment instruction To the server.
  • the server receives the parameter adjustment instruction sent by the user terminal, parses the parameter adjustment instruction, extracts a preset performance index value in the adjustment instruction through analysis, and uses the preset performance index value as an adjustment termination condition.
  • the performance index value is the index data used to represent the database data processing performance. Performance indicators include throughput, latency, and memory usage.
  • a parameter adjustment instruction triggered by a user account is received, an adjustment termination condition is determined according to the parameter adjustment instruction, and a recommended configuration parameter that meets the adjustment termination condition is obtained, thereby improving the accuracy of obtaining the recommended configuration parameter.
  • S302 specifically includes the following: obtaining the current configuration parameters corresponding to the database corresponding to the user account.
  • the parameter adjustment instruction includes a user account.
  • the server extracts the user account from the parameter adjustment instruction, queries the database identifier corresponding to the user account, and sends a parameter acquisition request to the database corresponding to the database identifier.
  • the database After receiving the parameter acquisition request, the database sends the current configuration parameters to the server.
  • the server receives the current configuration parameters sent by the database, and uses the obtained current configuration parameters as the current configuration parameters corresponding to the database corresponding to the user account.
  • the parameter adjustment instruction includes a database identifier.
  • the server extracts the database identifier from the parameter adjustment finger, and sends a parameter acquisition request to the database corresponding to the database identifier.
  • the database After receiving the parameter acquisition request, the database sends the current configuration parameters to the server.
  • the server receives the current configuration parameters sent by the database, and uses the obtained current configuration parameters as the current configuration parameters corresponding to the database corresponding to the database identifier.
  • the parameter adjustment instruction includes a user account or a database identifier.
  • the configuration parameters are stored in the server, and the configuration parameters in the server are stored corresponding to the user account or database ID.
  • the server queries the stored configuration parameters for the configuration parameters corresponding to the user account or database identifier, and uses the queried configuration parameters as the current configuration parameters corresponding to the database corresponding to the user account.
  • the adjustment termination conditions are determined according to the parameter adjustment instruction, and the current configuration parameters corresponding to the database corresponding to the user account are obtained to ensure that the accurate current configuration parameters are obtained.
  • S302 specifically includes a step of obtaining an index value, and this step specifically includes the following content:
  • the database access history is recorded historical access data of the database.
  • the database access history specifically includes at least one of an access time to the database, an access request type, and an access user.
  • the server stores database access history records of multiple databases.
  • the server can query the corresponding database access history in the database access history according to the user account or database ID.
  • the server After acquiring the database access history, the server generates a database access request according to the database access history and accesses the database according to the database access request.
  • the server traverses each record in the database access history, generates a database access request corresponding to each record according to each record traversed, obtains a database access stream according to the database access request, and performs a database access flow on the database according to the database access flow. For access.
  • the database status indicator value is used to represent the data of the database running status.
  • the server when the server accesses the database according to the database access history, the server monitors the database according to the database state index, obtains the database state index value through monitoring, and uses the obtained database state index value as the current database state index value.
  • the recorded database access history is used to access the database configured by the current configuration parameters, to obtain the current database status indicator value determined by accessing the database, and to ensure that the current database status indicator value corresponding to the current configuration parameter is obtained.
  • Determine the accuracy of the current database status index value and further adjust the model through parameters and generate parameter adjustment data based on the current database status index value, which improves the accuracy of the parameter adjustment data.
  • S306 further includes a step of generating parameter adjustment data, and this step specifically includes the following content:
  • the performance change is the data indicating that new configuration parameters are obtained after adjustment of the configuration parameters, and the database running with the new configuration parameters. Compared with the previously adjusted database, the larger the performance change, the greater the performance change. The greater the improvement in data processing performance, the smaller the amount of performance change, indicating the smaller the data processing performance of the database.
  • the server inputs the current database status indicator value and the current configuration parameters into the parameter adjustment model.
  • the parameter adjustment model adjusts the current configuration parameters to obtain the adjusted configuration parameters, and records the parameter adjustment data to determine the database corresponding to the adjusted configuration parameters.
  • the state index value and the performance change amount are determined, and the determined database state index value and the recorded adjustment data are input into the parameter adjustment model again to iterate, and the performance change amount corresponding to each adjustment is obtained.
  • FIG. 6 is a schematic diagram of iteratively adjusting configuration parameters in one embodiment.
  • the server adjusts the database configuration parameters according to the parameter adjustment data a t , and obtains the performance change amount t t of the database after the configuration parameters are adjusted and the database state index value s t + 1 at time t + 1 , and changes the database state index value s t + 1 and the performance variation r t are fed back to the parameter adjustment model to perform an iterative loop until the iteration stop condition is satisfied.
  • the cumulative value of performance change represents the total amount of database processing performance changes after iterative adjustments.
  • the performance change cumulative value function is a function for calculating the performance change cumulative value from the performance change.
  • the server After the server obtains the performance change corresponding to each adjustment, it accumulates or weights the sum based on the performance change after the current adjustment, and calculates the cumulative value of the performance change corresponding to the current adjustment, thereby constructing the cumulative value of the performance change. function.
  • the server adds weights to each performance change, so that the constructed function is the following function:
  • s t indicates the database status index value at time t
  • a t indicates parameter adjustment data at time t
  • r t + 1 indicates the performance change amount at time t + 1 after adjusting the configuration parameters at time t according to a t
  • s t + 1 indicates that after adjusting the configuration parameters at time t according to a t , the database state index value at time t + 1, where w is a parameter in the parameter adjustment model, ⁇ is a discount coefficient, and ⁇ ⁇ 1.
  • S506. Determine the maximum cumulative value of the performance change amount according to the generated cumulative value of the function value change function.
  • the server obtains a cumulative value of the performance change amount corresponding to each adjustment, compares the obtained cumulative value of the value of the cumulative amount of performance change, and selects the largest cumulative value of the cumulative amount of performance change from the cumulative value of the performance change according to the comparison result.
  • the server determines the largest cumulative value of the performance change corresponding to the cumulative value of the performance change function according to the cumulative value of the performance change function.
  • the server stores a cumulative value of the performance change amount and parameter adjustment data corresponding to each adjustment, and a cumulative value of the performance change amount of the same adjustment is stored in correspondence with the parameter adjustment data. After determining the maximum cumulative value of the performance change, the server extracts parameter adjustment data corresponding to the largest cumulative value of the performance change from the stored parameter adjustment data.
  • the server inputs the maximum cumulative value of the performance change into the parameter adjustment model, and the parameter adjustment model outputs the corresponding parameter adjustment data according to the cumulative value of the performance change.
  • the parameter adjustment model according to the current database state index value and the current configuration parameters, iterative adjustment of the current configuration parameters is used to determine the corresponding performance change amount for each adjustment, and each performance change amount is used to determine the corresponding performance change Accumulated value, select the parameter adjustment data corresponding to the largest accumulated value of performance change, to ensure that after adjusting the current configuration parameters according to the selected parameter adjustment data, the performance of the database changes the most, which improves the accuracy of parameter adjustment.
  • S502 specifically includes a step of iterating according to a database state index value, and the step specifically includes the following content:
  • the predicted parameter adjustment data are the parameter adjustment data generated during the iteration of the parameter adjustment model and the parameter adjustment data generated during the parameter adjustment model training process.
  • the server inputs the current database state index value into the parameter adjustment model, and the parameter adjustment model randomly generates prediction parameter adjustment data.
  • the server randomly generates an adjustment parameter for each indicator value in the current database state indicator value, and generates initial prediction parameter adjustment data according to the adjustment parameter of each indicator value.
  • the adjustment parameters of each index value include a vector with a dimension of 3, and the 3 dimensions represent increase, invariance, and decrease, respectively.
  • S704 Adjust the current configuration parameters according to the predicted parameter adjustment data to obtain the predicted configuration parameters.
  • the predicted configuration parameter is a configuration parameter generated by adjusting the current configuration parameter according to the predicted parameter adjustment data.
  • the server traverses each parameter in the current configuration parameters, queries the adjustment parameters corresponding to the traversed configuration parameters in the prediction parameter adjustment data, and traverses the traversed configuration according to the query adjustment parameters.
  • the parameters are adjusted to obtain the adjusted configuration parameters, and the configuration parameters are predicted according to the adjusted configuration parameters.
  • the server queries the adjustment parameter corresponding to the traversed configuration parameter in the prediction parameter adjustment data, obtains the end value corresponding to the traversed configuration parameter according to the adjustment parameter, and traverses to The configuration parameters are adjusted. For each adjustment of the configuration parameter, the maximum or minimum value of the configuration parameter after the last adjustment is used as the corresponding end value of the current adjustment.
  • the server obtains the end value corresponding to the traversed configuration parameter according to the adjustment parameter, and the current configuration parameter value is 2, and the end value includes 2 and x (x > 2); if the adjustment parameter corresponding to the traversed configuration parameter is reduced, the server obtains the end value corresponding to the traversed configuration parameter according to the adjustment parameter, and the current configuration parameter value is 2, the end value includes x (x ⁇ 2) and 2; if the adjustment parameter corresponding to the traversed configuration parameter is unchanged, and the current configuration parameter value is 2, both end values are 2.
  • S706 Determine a prediction database state index value and a prediction performance index value corresponding to the prediction configuration parameters.
  • the predicted database state index value and predicted performance index value are database state index values and performance index values obtained by monitoring a database configured with predicted configuration parameters.
  • the server configures the database according to the predicted configuration parameters, obtains the database access history, and accesses the database configured with the predicted configuration parameters according to the database access history.
  • the server monitors the database state index and performance index of the database during the access process, and uses the monitored database state index and performance index as the predicted database state index value and predicted performance index value corresponding to the predicted configuration parameters, respectively.
  • S708 Determine a corresponding performance change amount of the configuration parameter after the adjustment according to the predicted performance index value.
  • the server stores a correspondence between a performance index value and a performance change amount. After obtaining the predicted performance index value, the server determines the performance change amount corresponding to the predicted performance index value according to the corresponding relationship between the performance index value and the performance change amount, and the determined performance change amount is used as the performance change corresponding to the currently adjusted configuration parameter. the amount.
  • S710 Iterate the predicted database state index value as the current database state index value until the iteration stop condition is satisfied.
  • the iterative stop condition is a condition that needs to be satisfied when the iterative process stops.
  • the iteration stop condition may specifically be the number of iterations.
  • the server uses the predicted database state index value as the current database state index value, and continues to execute the parameter adjustment model and determines the predicted parameter adjustment data according to the current database state index value, and adjusts according to the predicted parameter.
  • the server records the number of iterations in the parameter adjustment model. If the number of iterations recorded is equal to the number of iteration stops in the iteration stop condition, the iteration is stopped.
  • the parameter adjustment model is used to iterate according to the current database state index value. Iteration can improve the accuracy of the parameter adjustment data generated by the parameter adjustment model, and adjust the configuration parameters according to the more accurate parameter adjustment data. This improves the efficiency of obtaining recommended configuration parameters.
  • S708 further includes: obtaining the current number of adjustments to the configuration parameters during the iteration; determining the corresponding performance change amount of the current adjustment of the configuration parameters according to the predicted performance index value and the number of times; the performance change amount is negatively related to the number of times Is positively correlated with the predicted performance index value.
  • the server constructs a performance change calculation formula with a negative correlation between the performance change and the number of times and a positive correlation with the predicted performance index value, and stores the calculated calculation formula for the performance change.
  • the server obtains the number of current configuration parameters and the predicted performance index value during the iteration process, and enters the number of times and the predicted performance index value into the calculation formula of the performance change to calculate the performance change.
  • the performance variation can be calculated according to the following calculation formula:
  • p is a preset index value
  • q is a number of times the configuration parameter is adjusted
  • r is a performance change amount
  • is a coefficient corresponding to each preset index
  • b is a constant.
  • p 1 , p 2 ,..., P n respectively represent n preset index values
  • ⁇ 1 , ⁇ 2 ,..., ⁇ n respectively represent n coefficients corresponding to corresponding preset index values.
  • r is negatively correlated with the number of times q
  • the performance change r is positively correlated with the predicted performance index value p.
  • S310 specifically includes: obtaining a database performance index value corresponding to the new configuration parameter; when the obtained database performance index value does not match the preset performance index value in the adjustment termination condition, or when the number of cycles is less than For a preset number of times, the new configuration parameter is used as the current configuration parameter, and the current database status indicator value corresponding to the current configuration parameter is determined to continue execution until the database performance indicator value corresponding to the new configuration parameter matches the preset performance indicator value. Or the number of cycles reaches a preset number.
  • the server configures the database with the new configuration parameters, and accesses the database configured with the new configuration parameters according to the database access history.
  • the server monitors the database performance index value corresponding to the database configured with the new configuration parameters during the access process.
  • the server extracts and adjusts the preset performance index values in the termination conditions, and detects whether the obtained database performance index values match the extracted preset performance index values. If they match, the adjustment is terminated; if they do not match, the new configuration parameters are changed.
  • As the current configuration parameter return to determine the current database state indicator value corresponding to the current configuration parameter and continue to execute cyclically.
  • the server records the number of cycles, compares the recorded number of cycles with a preset number of times in the adjustment termination condition, and if the recorded number of cycles is less than the preset number, then uses the new configuration parameter as the current configuration parameter and returns Determine that the current database status indicator value corresponding to the current configuration parameter continues to execute cyclically; if the number of recorded cycles equals a preset number, the adjustment is terminated.
  • S506 specifically includes: obtaining model parameters of the first neural network model in the parameter adjustment model; injecting the obtained model parameters into the second neural network model; and determining the generated performance change amount through the second neural network model. The cumulative value of the largest performance change corresponding to the cumulative value function.
  • the parameter adjustment model includes a first neural network model and a second neural network model.
  • the first neural network model is used to determine matching parameter adjustment data according to the cumulative value of the performance change amount; the second neural network model is used to determine the maximum cumulative value of the performance change amount.
  • the server inputs the current database state index value into the first neural network model for iteration, and obtains a stable first neural network model after a preset number of iterations.
  • the server obtains the model parameters in the first neural network model, and injects the obtained model parameters into the second neural network model.
  • the server obtains the database state index value and the performance change amount generated during the first neural network iteration process, and inputs the obtained database state index value and performance change amount into the second neural network model, and the second neural network model obtains the database state index according to the input. Value and the amount of performance change to determine the maximum cumulative value of the performance change corresponding to the generated cumulative value of the function of the function change.
  • the server inputs the current database state index value into the first neural network model.
  • the first neural network model randomly generates parameter adjustment data, and uses the randomly generated parameter adjustment data as initial parameter adjustment data to perform iterative training until it is stable.
  • First neural network model uses the randomly generated parameter adjustment data as initial parameter adjustment data to perform iterative training until it is stable.
  • S508 specifically includes: performing gradient descent processing on the largest cumulative amount of performance change to obtain a largest cumulative estimated value that matches the largest cumulative amount of performance change; and determining and maximizing the cumulative value through the first neural network model. Parameter adjustment data corresponding to the estimates.
  • the server uses the parameter adjustment model to perform gradient descent processing on the maximum cumulative value of the cumulative change in performance, so that the maximum cumulative estimated value infinitely approximates the largest performance change.
  • the cumulative value of the quantity and use the obtained maximum cumulative estimated value as the maximum cumulative estimated value that matches the largest cumulative amount of performance change.
  • the server inputs the maximum cumulative estimation value into the first neural network model, obtains parameter adjustment data output by the first neural network model according to the maximum cumulative estimation value, and uses the obtained parameter adjustment data as parameter adjustment data corresponding to the maximum cumulative estimation value.
  • the model parameters of the first neural network model in the parameter adjustment model are injected into the second neural network model, which ensures the consistency between the first neural network model and the second neural network model, and improves the accuracy of data processing. Sex.
  • the second neural network model is used to determine the maximum cumulative value of the performance change.
  • the maximum cumulative estimated value obtained by performing gradient descent processing on the maximum cumulative value of the performance change ensures the performance corresponding to the parameter adjustment data returned by the first neural network model.
  • the cumulative change value is the largest, which improves the efficiency of generating parameter adjustment data.
  • the method further includes a step of detecting parameter adjustment data, and the step specifically includes the following content:
  • the server adjusts the current configuration parameters of the database according to the parameter adjustment data, configures the database with the adjusted configuration parameters, and accesses the database configured with the adjusted configuration parameters according to the database access history.
  • the server monitors the database during the access process, obtains the database performance index value through monitoring, and calculates the database performance improvement value according to the database performance index value.
  • the server after obtaining the database performance index value, performs weighting and calculation to obtain the database performance improvement value according to the weight value corresponding to each database performance index value and the corresponding database performance index value.
  • the adjustment data random generation program is a program for generating parameter adjustment data according to the characteristics of the parameter adjustment data.
  • the server when the server obtains the parameter adjustment data returned by the parameter adjustment model, the server triggers a program call instruction, and uses the adjustment data to randomly generate a program to generate random parameter adjustment data according to the program call instruction.
  • the server adjusts the current configuration parameters of the database according to the random parameter adjustment data, configures the database with the adjusted configuration parameters, and accesses the database configured with the adjusted configuration parameters according to the database access history.
  • the server monitors the database during the access process, obtains the database performance index value through monitoring, calculates the database performance improvement value according to the database performance index value, and obtains the database performance improvement value corresponding to the random parameter adjustment data.
  • the server compares the obtained database performance improvement value with the determined database performance improvement value, and determines whether the obtained database performance improvement value is less than the determined database performance improvement value through comparison.
  • the parameter adjustment data is updated according to the random parameter adjustment data.
  • the server when the obtained database performance improvement value is less than the determined database performance improvement value, the server replaces the parameter adjustment data with random parameter adjustment data; when the obtained database performance improvement value is greater than or equal to the determined database performance improvement value, the server No need to update parameter adjustment data.
  • the database performance improvement value corresponding to the parameter adjustment data generated by the parameter adjustment model is compared with the database performance improvement value corresponding to the random parameter adjustment data. If the obtained database performance improvement value is less than the determined database performance improvement value Value, the configuration is adjusted according to the random parameter adjustment data, and the database performance is improved.
  • the parameter adjustment data is updated according to the random parameter adjustment data, which improves the database performance improvement after adjusting the configuration parameters according to the parameter adjustment data.
  • FIG. 9 is a schematic diagram of a deployment environment of a database configuration parameter processing method according to an embodiment.
  • the deployment environment includes an access data generator, a database, and a parameter adjustment model.
  • the access data generator user generates database access data for accessing the database.
  • the server obtains the current configuration parameters of the database, calls the access data generator to generate database access data, and accesses the database according to the database access data.
  • the server obtains the current database state indicator value corresponding to the current configuration parameter, drives the parameter adjustment model, and generates parameter adjustment data according to the current database state indicator value.
  • the server adjusts the current configuration parameters according to the parameter adjustment data to obtain new configuration parameters, configures the new configuration parameters as the current configuration parameters of the database, and the server obtains the current database status indicator value corresponding to the current configuration parameters again until the adjustment termination condition is met, Get recommended configuration parameters.
  • FIG. 10 is a schematic flowchart of a database configuration parameter processing method according to an embodiment.
  • FIG. 10 includes a database, a first neural network model, a second neural network model, a gradient descent network model, and a model data repository. Among them, the first neural network model, the second neural network model, and the control component parameter adjustment data.
  • FIG. 10 includes a database, a first neural network model, a second neural network model, a gradient descent network model, and a model data repository. Among them, the first neural network model, the second neural network model, and the control component parameter adjustment data.
  • s t indicates the database status index value at time t
  • a t indicates parameter adjustment data at time t
  • r t indicates the performance change amount after adjusting the configuration parameters at time t according to a t
  • s t + 1 indicates The database state index value at time t + 1 after adjusting the configuration parameters at time t according to a t
  • w is a parameter in the parameter adjustment model
  • is a discount coefficient
  • the database sends the database state index value s t at time t to the first neural network model.
  • the first neural network model is iteratively trained according to st , and iterative N times to obtain a stable first neural network model.
  • the parameter w in the first neural network model is sent to the second neural network model, so that the second neural network model and The first neural network model remains consistent.
  • the database stores the model data corresponding to each parameter adjustment in the model data repository.
  • the model data includes the database state index value s t at time t , the parameter adjustment data a t at time t , and the configuration parameters adjusted at time t. performance change amount r t time t + 1 and the state of the database index value s t + 1.
  • the second neural network model determines the largest cumulative amount of performance change based on the model data
  • the first neural network model calculates the maximum cumulative estimate based on the model data
  • the gradient descent network model adjusts the Q estimate through gradient descent according to the model data and the Q reality , so that the difference between the Q estimate and the Q reality is the smallest, and the largest
  • the first neural network model obtains parameter adjustment data based on maxQ estimation
  • the parameter adjustment data a t is sent to the database to adjust the parameters of the database.
  • a database parameter configuration method is provided, and the method includes the following content:
  • the user enters a user account on a login page of the user terminal.
  • the user terminal obtains the user account entered in the login page, generates a login request according to the obtained user account, and the user terminal sends the login request to the server.
  • the server authenticates the user account in the login request. If the authentication is performed, the database parameter configuration page data is returned to the user terminal.
  • the user terminal displays the database parameter configuration page according to the received database parameter configuration page data.
  • a parameter adjustment button for triggering a parameter adjustment instruction is set in the database parameter configuration page.
  • the user terminal detects that the parameter adjustment button in the database parameter configuration page is clicked, the user terminal triggers a parameter adjustment instruction.
  • S1106 Send a parameter adjustment instruction to the server; the parameter adjustment instruction is used to instruct the server to obtain the current configuration parameters of the database corresponding to the user account, determine the current database status index value corresponding to the current configuration parameters, adjust the model through the parameters, and according to the current database
  • the status indicator value generates parameter adjustment data, adjusts the current configuration parameters according to the parameter adjustment data to obtain new configuration parameters, uses the new configuration parameter as the current configuration parameter, and returns to determine the current database status indicator value corresponding to the current configuration parameter and continues to execute until Get the recommended configuration parameters when the adjustment termination conditions are met.
  • the server receives a parameter adjustment instruction sent by the user terminal.
  • the server obtains the current configuration parameters of the database corresponding to the user account in the parameter adjustment instruction according to the parameter adjustment instruction.
  • the server obtains the current configuration parameters, configures the database according to the acquired current configuration parameters, monitors the database configured according to the current configuration parameters, and obtains the current database status indicator value through monitoring.
  • the server configures the database according to the current configuration parameters.
  • the server invokes a database access simulation program to simulate and generate database access data, and accesses the database configured with the current configuration parameters according to the simulated database access data. By monitoring the database, the current database status indicator value is obtained.
  • the database access model program can generate various database access requests according to preset database access characteristics.
  • the server invokes the database access model program to simulate and generate a large number of data query requests, data insertion requests, or data modification requests.
  • the server performs a database query configured with the current configuration parameters based on the simulated data query requests, data insertion requests, or data modification requests. access.
  • the parameter adjustment model is used to generate parameter adjustment data according to the current database status indicator value.
  • the parameter adjustment model is a data model that generates parameter adjustment data according to the current database state index value.
  • the parameter adjustment model may be a model that performs deep reinforcement learning (Deep Reinforcement Learning).
  • the parameter adjustment data is the data on which the current configuration parameters of the database are adjusted.
  • the parameter adjustment data includes an adjustment direction for each configuration parameter, and the adjustment direction may be any of an increase, a change, and a decrease.
  • the server takes the current database state index value as an input and inputs it to the parameter adjustment model to obtain parameter adjustment data that the parameter adjustment model outputs according to the current database state index value.
  • the current database state index value is input into the neural network model of the parameter adjustment model, and parameter adjustment data generated by the neural network model through iterative adjustment is obtained.
  • the neural network model is a data model that obtains parameter adjustment data by training according to the current database state index values.
  • the server traverses each configuration parameter in the current configuration parameter, queries the parameter adjustment data corresponding to the traversed configuration parameter in the parameter adjustment data, and adjusts the traversed configuration parameter according to the queried parameter adjustment data to adjust
  • the subsequent configuration parameters serve as the new configuration parameters.
  • obtaining the parameter adjustment instruction triggered in the database parameter configuration page includes: obtaining a preset performance indicator value specified in the database parameter configuration page; generating a parameter adjustment instruction carrying the preset performance indicator value; the parameter adjustment instruction , Used to instruct the server to determine the adjustment termination condition according to a preset performance index value.
  • a user enters a user account on a login page of a user terminal, logs in to a database parameter configuration page, and enters a preset performance index value in the database parameter configuration page.
  • the user terminal detects that the tuning button on the data parameter configuration page is clicked, it obtains the preset performance indicator value entered in the database parameter configuration page, generates a parameter adjustment instruction based on the obtained preset performance indicator value, and sends the parameter adjustment instruction To the server.
  • the server receives the parameter adjustment instruction sent by the user terminal, parses the parameter adjustment instruction, and parses and extracts a preset performance index value in the parameter adjustment instruction, and uses the preset performance index value as an adjustment termination condition.
  • the performance index value is the index data used to represent the database data processing performance. Performance indicators include throughput, latency, and memory usage.
  • the new configuration parameter is used as the current configuration parameter, and the determination of the current database state index value corresponding to the current configuration parameter is continued until the recommended configuration parameter is obtained when the adjustment termination condition is met, including: obtaining and the new configuration parameter The corresponding database performance index value; when the obtained database performance index value does not match the preset performance index value in the adjustment termination condition, or when the number of cycles is less than the preset number, the new configuration parameter is used as the current configuration parameter, Return to determine the current database status indicator value corresponding to the current configuration parameter and continue to execute until the database performance indicator value corresponding to the new configuration parameter matches the preset performance indicator value or the number of cycles reaches the preset number of times.
  • the server configures the database with the new configuration parameters, and accesses the database configured with the new configuration parameters according to the database access history.
  • the server monitors the database performance index value corresponding to the database configured with the new configuration parameters during the access process.
  • the server extracts and adjusts the preset performance index values in the termination conditions, and detects whether the obtained database performance index values match the extracted preset performance index values. If they match, the adjustment is terminated; if they do not match, the new configuration parameters are changed.
  • As the current configuration parameter return to determine the current database state indicator value corresponding to the current configuration parameter and continue to execute cyclically.
  • the server records the number of cycles, compares the recorded number of cycles with a preset number of times in the adjustment termination condition, and if the recorded number of cycles is less than the preset number, then uses the new configuration parameter as the current configuration parameter and returns Determine that the current database status indicator value corresponding to the current configuration parameter continues to execute cyclically; if the number of recorded cycles equals a preset number, the adjustment is terminated.
  • the server determines the current database status index value corresponding to the current configuration parameter according to the received parameter adjustment instruction, and through the parameter adjustment model, generates parameter adjustment data based on the current database status index value, which improves the generated parameter adjustment data.
  • Accuracy Adjust the current configuration parameters according to the generated parameter adjustment data to obtain new configuration parameters. Use the new configuration parameters as the current configuration parameters, and continue to determine the current database status index value corresponding to the current configuration parameters until the adjustment termination conditions are met. Get recommended configuration parameters.
  • the current configuration parameters are continuously and automatically adjusted to finally obtain the recommended configuration parameters when the adjustment termination conditions are met, thereby improving the accuracy of the recommended configuration parameters.
  • a database configuration parameter processing device 1200 is provided.
  • the device specifically includes the following: a current parameter acquisition module 1202, a status indicator determination module 1204, an adjustment data generation module 1206, and a current parameter adjustment. Module 1208 and recommended parameter acquisition module 1210.
  • the current parameter obtaining module 1202 is configured to obtain a current configuration parameter.
  • the status indicator determining module 1204 is configured to determine a current database status indicator value corresponding to the current configuration parameter.
  • the adjustment data generating module 1206 is configured to adjust the model through parameters and generate parameter adjustment data according to the current database state indicator value.
  • the current parameter adjustment module 1208 is configured to adjust the current configuration parameters according to the parameter adjustment data to obtain new configuration parameters.
  • the recommended parameter obtaining module 1210 is configured to use the new configuration parameter as the current configuration parameter, and return to determine the current database status index value corresponding to the current configuration parameter, and continue to execute until the adjustment configuration termination condition is met to obtain the recommended configuration parameter.
  • the database configuration parameter processing device 1200 further includes a termination condition determination module 1212 and an adjustment data detection module 1214.
  • the termination condition determination module 1212 is configured to receive a parameter adjustment instruction triggered by the user account; and determine the adjustment termination condition according to the parameter adjustment instruction.
  • the current parameter acquisition module 1202 is further configured to acquire current configuration parameters corresponding to a database corresponding to the user account.
  • An adjustment data detection module 1214 is configured to obtain a database performance improvement value corresponding to the parameter adjustment data; generate random parameter adjustment data; determine a database performance improvement value corresponding to the random parameter adjustment data; and detect whether the acquired database performance improvement value is less than a certain value Database performance improvement value; when the obtained database performance improvement value is less than the determined database performance improvement value, the parameter adjustment data is updated according to the random parameter adjustment data.
  • the database performance improvement value corresponding to the parameter adjustment data generated by the parameter adjustment model is compared with the database performance improvement value corresponding to the random parameter adjustment data. If the obtained database performance improvement value is less than the determined database performance improvement value Value, the configuration is adjusted according to the random parameter adjustment data, and the database performance is improved.
  • the parameter adjustment data is updated according to the random parameter adjustment data, which improves the database performance improvement after adjusting the configuration parameters according to the parameter adjustment data.
  • the status indicator determining module 1204 is further configured to obtain a database access history record; access a database configured with the current configuration parameters according to the database access history record; and obtain a current database status indicator value determined by accessing the database.
  • the recorded database access history is used to access the database configured by the current configuration parameters, to obtain the current database status indicator value determined by accessing the database, and to ensure that the current database status indicator value corresponding to the current configuration parameter is obtained.
  • Determine the accuracy of the current database status index value and further adjust the model through parameters and generate parameter adjustment data based on the current database status index value, which improves the accuracy of the parameter adjustment data.
  • the adjustment data generation module 1206 is further configured to iteratively adjust the current configuration parameters and determine corresponding performance changes based on the current database state index values and current configuration parameters through parameter adjustment models; and build performance based on each performance change. Cumulative change value function; determining the largest cumulative value of the cumulative change in performance based on the cumulative cumulative value of the function; obtain parameter adjustment data corresponding to the largest cumulative value of the cumulative change in performance.
  • the parameter adjustment model according to the current database state index value and the current configuration parameters, iterative adjustment of the current configuration parameters is used to determine the corresponding performance change amount for each adjustment, and each performance change amount is used to determine the corresponding performance change Accumulated value, select the parameter adjustment data corresponding to the largest accumulated value of performance change, to ensure that after adjusting the current configuration parameters according to the selected parameter adjustment data, the performance of the database changes the most, which improves the accuracy of parameter adjustment.
  • the adjustment data generating module 1206 is further configured to determine the prediction parameter adjustment data according to the parameter adjustment model and the current database state indicator value; adjust the current configuration parameter according to the prediction parameter adjustment data to obtain the prediction configuration parameter; determine the prediction configuration parameter Corresponding predictive database status index values and predictive performance index values; determine the corresponding performance change of the current configuration parameters according to the predictive performance index values; iterate the predictive database state index values as the current database state index values until the iteration is satisfied Stop condition.
  • the parameter adjustment model is used to iterate according to the current database state index value. Iteration can improve the accuracy of the parameter adjustment data generated by the parameter adjustment model, and adjust the configuration parameters according to the more accurate parameter adjustment data. This improves the efficiency of obtaining recommended configuration parameters.
  • the adjustment data generation module 1206 is further configured to obtain model parameters of the first neural network model in the parameter adjustment model; inject the obtained model parameters into the second neural network model in the parameter adjustment model; The network model determines the maximum accumulated cumulative value of the performance change function corresponding to the generated cumulative value change function.
  • the adjustment data generation module 1206 is further configured to perform gradient descent processing on the largest cumulative value of the cumulative change in performance to obtain a largest cumulative estimate that matches the largest cumulative value of the cumulative change in performance; determine and match the largest cumulative estimate through the first neural network model Corresponding parameter adjustment data.
  • the model parameters of the first neural network model in the parameter adjustment model are injected into the second neural network model, which ensures the consistency between the first neural network model and the second neural network model, and improves the accuracy of data processing.
  • Sex. Use the second neural network model to determine the largest cumulative value of the performance change.
  • the maximum cumulative estimated value obtained by gradient descent of the largest cumulative value of the performance change ensures the performance change corresponding to the parameter adjustment data returned by the first neural network model.
  • the accumulated value is the largest, which improves the generation efficiency of parameter adjustment data.
  • the adjustment data generating module 1206 is further configured to obtain the current number of adjustments to the configuration parameters during the iteration; determine the corresponding performance change of the current adjustment of the configuration parameters according to the predicted performance index value and the number of times; the performance change and the The frequency is negatively correlated with the predicted performance index value.
  • the recommended parameter obtaining module 1210 is further configured to obtain a database performance index value corresponding to the new configuration parameter; when the obtained database performance index value does not match a preset performance index value in the adjustment termination condition, or, When the number of cycles is less than the preset number, the new configuration parameter is used as the current configuration parameter, and the current database status indicator value corresponding to the current configuration parameter is determined to continue execution until the database performance indicator value corresponding to the new configuration parameter and the preset value The performance index value matches or the number of cycles reaches a preset number of times.
  • a database parameter configuration device 1400 is provided.
  • the device 1400 specifically includes the following modules: a configuration page entry module 1402, an adjustment instruction acquisition module 1404, and an adjustment instruction sending module 1406.
  • the configuration page entry module 1402 is used to enter the database parameter configuration page through the current user account.
  • An adjustment instruction obtaining module 1404 is configured to obtain a parameter adjustment instruction triggered in a database parameter configuration page.
  • the adjustment instruction sending module 1406 sends a parameter adjustment instruction to the server; the parameter adjustment instruction is used to instruct the server to obtain the current configuration parameters of the database corresponding to the user account, determine the current database status index value corresponding to the current configuration parameters, and adjust the model through the parameters And generate parameter adjustment data according to the current database state indicator value, adjust the current configuration parameter according to the parameter adjustment data, obtain new configuration parameters, use the new configuration parameter as the current configuration parameter, and return to determine the current database state indicator value corresponding to the current configuration parameter Continue until you get the recommended configuration parameters when the adjustment termination conditions are met.
  • the adjustment instruction obtaining module 1404 is further configured to obtain a preset performance indicator value specified in a database parameter configuration page; generate a parameter adjustment instruction carrying the preset performance indicator value; and a parameter adjustment instruction, which is used to instruct the server to The preset performance index value determines the adjustment termination condition.
  • the adjustment instruction sending module 1406 is further configured to obtain the database performance index value corresponding to the new configuration parameter; when the obtained database performance index value does not match the preset performance index value in the adjustment termination condition, or when the number of cycles is less than the preset When the number of times, the new configuration parameter is used as the current configuration parameter, and the current database status indicator value corresponding to the current configuration parameter is determined to continue to be executed until the database performance indicator value corresponding to the new configuration parameter matches the preset performance indicator value or loop The number of times reaches a preset number.
  • FIG. 15 is a schematic diagram of an internal structure of a computer device in an embodiment.
  • the computer device may be the server 120 shown in FIG. 1, or the user terminal 110 shown in FIG. 1, or the main control server 222 in the server cluster 220 in FIG. 2 described above, or User terminal 210 in 2.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus.
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium of the computer device can store an operating system and a computer program. When the computer program is executed, it can cause the processor to execute a database configuration parameter processing method.
  • the processor of the computer equipment is used to provide computing and control capabilities to support the operation of the entire computer equipment.
  • a computer program may be stored in the internal memory, and when the computer program is executed by the processor, the processor may execute a database configuration parameter processing method.
  • the network interface of the computer device is used for network communication.
  • FIG. 15 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment or robot to which the solution of the present application is applied.
  • the specific computer The device may include more or fewer components than shown in the figure, or some components may be combined, or have different component arrangements.
  • the database configuration parameter processing apparatus 1200 provided in the present application may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in FIG. 15.
  • the computer device or the robot's memory may store various program modules constituting the database configuration parameter processing device, for example, the current parameter acquisition module 1202 shown in FIG. 12, the status indicator determination module 1204, the adjustment data generation module 1206, and the current parameter adjustment module. 1208 and recommended parameter acquisition module 1210.
  • the computer program constituted by each program module causes the processor to execute the steps in the database configuration parameter processing method of each embodiment of the application described in this specification.
  • the computer device shown in FIG. 15 may obtain the current configuration parameters through the current parameter acquisition module 1202 in the database configuration parameter processing apparatus 1200 shown in FIG. 12.
  • the status indicator determination module 1204 determines a current database status indicator value corresponding to the current configuration parameter.
  • the adjustment data generation module 1206 generates a parameter adjustment data by using a parameter adjustment model and according to a current database state indicator value.
  • the current parameter adjustment module 1208 adjusts the current configuration parameters according to the parameter adjustment data to obtain new configuration parameters.
  • the recommended parameter obtaining module 1210 uses the new configuration parameter as the current configuration parameter, and returns to determine the current database state indicator value corresponding to the current configuration parameter, and continues to execute until the recommended configuration parameter is obtained when the adjustment termination condition is met.
  • a computer device includes a memory and a processor.
  • a computer program is stored in the memory.
  • the processor causes the processor to perform the following steps: obtaining the current configuration parameters; and determining a current database state indicator value corresponding to the current configuration parameters. ;
  • the current database status indicator value continues to be executed until the recommended configuration parameters are obtained when the adjustment termination conditions are met.
  • the processor when the computer program is executed by the processor, the processor is caused to perform the following steps: receiving a parameter adjustment instruction triggered by a user account; and determining an adjustment termination condition according to the parameter adjustment instruction.
  • acquiring the current configuration parameters includes: acquiring the current configuration parameters corresponding to a database corresponding to the user account.
  • determining the current database status index value corresponding to the current configuration parameters includes: obtaining a database access history record; accessing a database configured with the current configuration parameters according to the database access history record; and obtaining the data determined by accessing the database.
  • the current database status indicator value includes: obtaining a database access history record; accessing a database configured with the current configuration parameters according to the database access history record; and obtaining the data determined by accessing the database. The current database status indicator value.
  • adjusting the model by parameters and generating parameter adjustment data according to the current database status indicator values include: iteratively adjusting current configuration parameters and determining corresponding performance changes based on the current database status indicator values and current configuration parameters through parameter adjustment models. Constructing a cumulative value function of the performance change amount based on each performance change amount; determining a maximum cumulative value of the performance change amount according to the generated cumulative value change function; and obtaining parameter adjustment data corresponding to the maximum cumulative value of the performance change amount.
  • the parameter adjustment model is used to iteratively adjust the current configuration parameter and determine the corresponding performance change based on the current database state indicator value and the current configuration parameter.
  • the parameter adjustment model is used to determine the prediction parameter according to the current database state indicator value. Adjust the data; adjust the current configuration parameters according to the predicted parameter adjustment data to obtain the predicted configuration parameters; determine the predicted database state index values and predicted performance index values corresponding to the predicted configuration parameters; determine the corresponding adjusted configuration parameters for the current adjustment based on the predicted performance index values The amount of performance change; iterate the predicted database state index value as the current database state index value until the iteration stop condition is met.
  • determining the maximum cumulative value of the cumulative performance change function based on the cumulative cumulative value change function includes: obtaining model parameters of the first neural network model in the parameter adjustment model; and injecting the obtained model parameters into the parameter adjustment model.
  • the second neural network model in the method through the second neural network model, determine the maximum cumulative value of the cumulative performance change function corresponding to the cumulative value of the cumulative performance change function.
  • obtaining the parameter adjustment data corresponding to the largest cumulative amount of performance change includes: performing gradient descent processing on the largest cumulative amount of performance change to obtain a largest cumulative estimated value that matches the largest cumulative amount of performance change ; Determine the parameter adjustment data corresponding to the maximum cumulative estimated value through the first neural network model.
  • determining the corresponding performance change amount of the configuration parameter after the current adjustment according to the predicted performance index value includes: obtaining the number of times the configuration parameter is currently adjusted during the iteration process; and determining the current adjusted The corresponding performance change of the configuration parameters; the performance change is negatively related to the number of times and positively related to the predicted performance index value.
  • the processor when the computer program is executed by the processor, the processor is caused to perform the following steps: obtaining a database performance improvement value corresponding to the parameter adjustment data; Generate random parameter adjustment data; determine the database performance improvement value corresponding to the random parameter adjustment data; detect whether the obtained database performance improvement value is less than the determined database performance improvement value; when the obtained database performance improvement value is less than the determined database performance improvement value Value, the parameter adjustment data is updated according to the random parameter adjustment data.
  • a storage medium storing a computer program.
  • the processor causes the processor to perform the following steps: obtaining the current configuration parameters; determining the current database state index value corresponding to the current configuration parameters; adjusting the model through the parameters, and Generate parameter adjustment data according to the current database status indicator value; adjust the current configuration parameters according to the parameter adjustment data to obtain new configuration parameters; use the new configuration parameter as the current configuration parameter and return to determine the current database status indicator value corresponding to the current configuration parameter to continue Execute until the recommended configuration parameters are obtained when the adjustment termination conditions are met.
  • the processor When the computer program stored in the storage medium is executed by the processor, the processor is caused to execute the foregoing database configuration parameter processing method, and details are not described herein again.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种数据库配置参数处理方法、装置、计算机设备和存储介质,该方法包括:获取当前配置参数(S302);确定与当前配置参数对应的当前数据库状态指标值(S304);通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据(S306);按照所述参数调整数据调整所述当前配置参数,得到新的配置参数(S308);将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数(S310)。

Description

数据库配置参数处理方法、装置、计算机设备和存储介质
本申请要求于2018年5月22日提交中国专利局、申请号为201810494412.3、发明名称为“数据库配置参数处理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种数据库配置参数处理方法、装置、计算机设备和存储介质。
发明背景
随着计算机技术的飞速发展,使得计算机的数据处理能力也得到极大的提升,数据库处理的数据量也越来越大。因此,对数据库的性能也有了新的要求,以最优的配置参数对数据库进行配置,才能保证数据库的性能最优化。
然而,在数据库的最优配置参数的确定过程中,传统的技术是通过对配置参数进行采样,对采样得到的配置参数进行测试,得到最优的配置参数。但是,采样得到最优配置参数的准确率较低。
发明内容
基于此,有必要针对传统方法通常会造成生成获取最优配置参数的准确率较低的问题,提供一种数据库配置参数处理方法、装置、计算机设备和存储介质。
一种数据库配置参数处理方法,由计算机设备执行,所述方法包括:
获取当前配置参数;
确定与当前配置参数对应的当前数据库状态指标值;
通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
一种数据库参数配置方法,由终端执行,所述方法包括:
通过当前的用户账号进入数据库参数配置页面;
获取在所述数据库参数配置页面中触发的参数调整指令;
向服务器发送所述参数调整指令;所述参数调整指令,用于指示所述服务器获取与所述用户账号对应的数据库的当前配置参数,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据,按照所述参数调整数据调整所述当前配置参数,得到新的配置参数,将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
一种数据库配置参数处理装置,所述装置包括:
当前参数获取模块,用于获取当前配置参数;
状态指标确定模块,用于确定与当前配置参数对应的当前数据库状态指标值;
调整数据生成模块,用于通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
当前参数调整模块,用于按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
推荐参数获得模块,用于将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
一种数据库参数配置装置,所述装置包括:
配置页面进入模块,用于通过当前的用户账号进入数据库参数配置页面;
调整指令获取模块,用于获取在所述数据库参数配置页面中触发的参数调整指令;
调整指令发送模块,用于向服务器发送所述参数调整指令;所述参数调整指令,用于指示所述服务器获取与所述用户账号对应的数据库的当前配置参数,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据,按照所述参数调整数据调整所述当前配置参数,得到新的配置参数,将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如下步骤:
获取当前配置参数;
确定与当前配置参数对应的当前数据库状态指标值;
通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
一种存储有计算机程序的存储介质,所述计算机程序被处理器执行时,使得处理器执行如下步骤:
获取当前配置参数;
确定与当前配置参数对应的当前数据库状态指标值;
通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
附图简要说明
图1为一个实施例中数据库配置参数处理方法的应用场景图;
图2为另一个实施例中数据库配置参数处理方法的应用场景图;
图3为一个实施例中数据库配置参数处理方法的流程示意图;
图4为一个实施例中获取指标值的步骤的流程示意图;
图5为一个实施例中生成参数调整数据的步骤的流程示意图;
图6为一个实施例中迭代调整配置参数的示意图;
图7为一个实施例中根据数据库状态指标值进行迭代的步骤的流程示意图;
图8为一个实施例中检测参数调整数据的步骤的流程示意图;
图9为一个实施例中数据库配置参数处理方法的部署环境示意图;
图10为一实施例中数据库配置参数处理方法的流程示意图;
图11为一个实施例中数据库参数配置方法的流程示意图;
图12为一个实施例中数据库配置参数处理装置的框图;
图13为另一个实施例中数据库配置参数处理装置的框图;
图14为一个实施例中数据库参数配置装置的框图;
图15为一个实施例中计算机设备的内部结构示意图。
实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中数据库配置参数处理方法的应用场景图。参照图1,该应用场景中包括用户终端110和服务器120,用户终端110通过网络连接与服务器120进行数据交互。用户终端110具体可以是台式用户终端或移动用户终端,移动用户终端具体可以是手机、平板电脑、笔记本电脑等中的至少一种。服务器120具体可以是单个服务器或服务器集群。
图2为另一个实施例中数据库配置参数处理方法的应用场景图。参照图2,该应用场景中包括服务器集群220、基于服务器集群220构建的云平台230和用户终端210,服务器集群220中有主控服务器222。主控服务器222通过网络连接对云平台230和服务器集群中的其他服务器进行控制。用户终端210通过网络连接获取云平台230提供的数据库服务,通过网络连接访问云平台230中的数据库。
如图3所示,在一个实施例中,提供一种数据库配置参数处理方法。数据库配置参数处理方法可以应用于上述图1中的服务器120上或上述图2中服务器集群220中的主控服务器222上,也可以应用于上述图1中用户终端110或图2中的用户终端210。本申请中,将服务器120,主控服务器222,用户终端110和用户终端210统称为计算机设备,如图15所示。本实施例主要以该方法应用于上述图1中的服务器120来举例说明。参照图3,该数据库配置参数处理方法,具体包括以下步骤:
S302,获取当前配置参数。
其中,配置参数指数据库对应的配置参数。当前配置参数是指当前使用的数据库的配置参数。配置参数具体可以包括数据库管理参数、数据库参数和环境变量参数。
具体地,服务器获取数据库标识,对数据库标识对应的数据库发送配置参数获取请求。服务器获取数据库根据配置参数获取请求返回的配置参数,以获取到的配置参数作为当前配置参数。数据库标识可以是由用户终端发送的。
在一个实施例中,服务器中存储着多个数据库的配置参数,将多个数据库的配置参数与数据库标识对应存储。服务器获取到数据库标识,在存储的配置参数中查询与获取到的数据库标识对应的配置参数,以查询到的配置参数作为当前配置参数。
S304,确定与当前配置参数对应的当前数据库状态指标值。
其中,数据库状态指标值为用于表示数据库运行时状态的数据。当前数据库状态指标值,为根据当前配置参数配置的数据库运行时,监测到的数据。
具体地,服务器在获取到当前配置参数,根据获取到的当前配置参数对数据库进行配置,对根据当前配置参数配置好的数据库进行监测,通过监测获取当前数据库状态指标值。
在一个实施例中,服务器在获取到当前配置参数后,根据当前配置参数对数据库进行配置。服务器调用数据库访问模拟程序模拟生成数据库访问数据,根据模拟生成的数据库访问数据对以当前配置参数配置的数据库进行访问,通过对数据库进行监测,得到当前数据库状态指标值。数据库访问模型程序可以根据预设的数据库访问特征,生成各种数据库访问请求。
举例说明,服务器调用数据库访问模型程序模拟生成大量的数据查询请求、数据插入请求或数据修改请求,服务器根据模拟生成的数据查询请求、数据插入请求或数据修改请求对以当前配置参数配置的数据库进行访问。
S306,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据。
其中,参数调整模型是一个根据当前数据库状态指标值,生成参数调整数据的数据模型。参数调整模型可以是进行深度强化学习(Deep Reinforcement Learning)模型。参数调整数据为对数据库的当前配置参数进行调整所依据的数据,参数调整数据中包括针对每个配置参数的调整方向,调整方向可以是增加、不变和减少中的任何一种。
具体地,服务器以当前数据库状态指标值作为输入,输入到参数调整模型,获取参数调整模型根据当前数据库状态指标值输出的参数调整数据。
在一个实施例中,将当前数据库状态指标值输入到参数调整模型的神经网络模型中,获取神经网络模型通过迭代调整生成的参数调整数据。其中,神经网络模型是通过根据当前数据库状态指标值进行训练,得到参数调整数据的数据模型。
S308,按照参数调整数据调整当前配置参数,得到新的配置参数。
具体地,服务器遍历当前配置参数中的每个配置参数,在参数调整数据中查询遍历到的配置参数对应的参数调整数据,根据查询到的参数调整数据对遍历到的配置参数进行调整,以调整后的配置参数作为新的配置参数。
在一个实施例中,服务器对参数调整数据进行统计,统计得到每个配置参数的调整方向和调整次数,根据统计到的每个配置参数的调整方向和调整次数对相应的当前配置参数进行调整,得到与当前配置参数对应的新的配置参数。
举例说明,服务器对参数调整数据进行统计,经过统计得到当前配置参数中的配置参数A的调整方向为增加,调整次数为3次,按照调整方向和和次数对配置参数A增加3次,得到配置参数A对应的新的配置参数Anew。
S310,将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
其中,调整终止条件为终止循环调整需要满足的条件。调整终止条件可以为调整后得到的配置参数的预设终止目标,或者循环调整的预设终止次数。预设终止目标可以是配置参数满足的预设条件。推荐配置参数为使得数据库性能最优时数据库所需的配置参数。数据库状态指标值为用于表示数据库运行状态的指标数据。数据库状态指标包括请求个数、数据量等。
具体地,服务器在获得新的配置参数后,以新的配置参数作为当前配置参数, 继续执行确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,按照参数调整数据调整当前配置参数,得到新的配置参数的步骤,直至满足调整终止条件时,获取当前配置参数作为推荐配置参数。
本实施例中,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,提高了生成的参数调整数据的准确性。根据生成的参数调整数据对当前配置参数进行调整,得到新的配置参数,将新的配置参数作为当前配置参数,继续执行确定与当前配置参数对应的当前数据库状态指标值,直至满足调整终止条件时获得推荐配置参数。通过利用参数调整模型生成的参数调整数据,对当前配置参数不断的自动调整,以最终得到满足调整终止条件时的推荐配置参数,从而提高了推荐配置参数的准确性。
在一个实施例中,由终端执行的数据库配置参数处理方法具体还包括以下内容:接收通过用户账号触发的参数调整指令;根据参数调整指令确定调整终止条件。
其中,用户账号为用户登录服务器所用的唯一标识,用户具体可以是自然人和企业。参数调整指令用于指示服务器获取数据库的推荐配置参数的指令。
具体地,用户在用户终端的登录页面输入用户账号,登录至数据库参数配置页面,在数据库参数配置页面中录入预设性能指标值。用户终端检测到数据参数配置页面中的调参按钮被点击时,获取数据库参数配置页面中录入的预设性能指标值,根据获取到的预设性能指标值生成参数调整指令,将参数调整指令发送至服务器。服务器接收用户终端发送的参数调整指令,对参数调整指令进行解析,通过解析提取调整指令中的预设性能指标值,以预设性能指标值作为调整终止条件。性能指标值为用于表示数据库数据处理性能的指标数据。性能指标包括吞吐量、延时、内存占用率等。
本实施例中,接收通过用户账号触发的参数调整指令,根据参数调整指令确定调整终止条件,获取满足调整终止条件的推荐配置参数,提高了推荐配置参数的获取准确性。
在一个实施例中,S302具体包括以下内容:获取与用户账号对应的数据库所对应的当前配置参数。
具体地,参数调整指令中包括用户账号。服务器从参数调整指令中提取用户账号,查询与用户账号对应的数据库标识,向数据库标识对应的数据库发送参数获取请求。数据库接收到参数获取请求后,将当前配置参数发送至服务器。服务器接收数据库发送的当前配置参数,以获取到的当前配置参数作为与用户账号对应的数据库所对应的当前配置参数。
在一个实施例中,参数调整指令中包括数据库标识。服务器从参数调整指中提取数据库标识,向数据库标识对应的数据库发送参数获取请求。数据库接收到参数获取请求后,将当前配置参数发送至服务器。服务器接收数据库发送的当前配置参数,以获取到的当前配置参数作为与数据库标识对应的数据库所对应的当前配置参数。
在一个实施例中,参数调整指令中包括用户账号或数据库标识。服务器中存储着配置参数,服务器中的配置参数与用户账号或数据库标识对应存储。服务器在存储的配置参数中查询与用户账号或数据库标识对应的配置参数,以查询到的配置参数作为与用户账号对应的数据库所对应的当前配置参数。
本实施例中,在接收到通过用户账号发出的参数调整指令后,根据参数调整指 令确定调整终止条件,获取与用户账号对应的数据库所对应的当前配置参数,保证获取到准确的当前配置参数。
如图4所示,在一个实施例中,S302具体包括获取指标值的步骤,该步骤具体包括以下内容:
S402,获取数据库访问历史记录。
其中,数据库访问历史记录是记录的数据库的历史访问数据。数据库访问历史记录具体包括对数据库的访问时间、访问请求类型和访问用户中的至少一种。
具体地,服务器中存储着多个数据库的数据库访问历史记录。服务器可以根据用户账号或数据库标识在数据库访问历史记录中查询相应的数据库访问历史记录。
S404,根据数据库访问历史记录,对以当前配置参数配置的数据库进行访问。
具体地,服务器在获取数据库访问历史记录后,根据数据库访问历史记录生成数据库访问请求,根据数据库访问请求对数据库进行访问。
在一个实施例中,服务器遍历数据库访问历史记录中的每条记录,根据遍历到的每条记录生成每条记录对应的数据库访问请求,根据数据库访问请求得到数据库访问流,根据数据库访问流对数据库进行访问。
S406,获取通过访问数据库所确定的当前数据库状态指标值。
其中,数据库状态指标值用于表示数据库运行状态的数据。
具体地,服务器在根据数据库访问历史记录对数据库访问时,根据数据库状态指标对数据库进行监测,通过监测获取数据库状态指标值,以获取到的数据库状态指标值作为当前数据库状态指标值。
本实施例中,利用记录的数据库访问历史记录,对当前配置参数配置的数据库进行访问,获取通过访问数据库所确定的当前数据库状态指标值,保证获取到当前配置参数对应的当前数据库状态指标值,确定当前数据库状态指标值的准确性,进一步通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,提高了参数调整数据的准确性。
如图5所示,在一个实施例中,S306具体还包括生成参数调整数据的步骤,该步骤具体包括以下内容:
S502,通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当前配置参数并确定相应的性能变化量。
其中,性能变化量为表示在对配置参数调整后得到新的配置参数,以新的配置参数运行的数据库,相对于前一次调整的数据库的性能变化的数据,性能变化量越大,表示数据库的数据处理性能提升越大,性能变化量越小,表示数据库的数据处理性能越小。
具体地,服务器将当前数据库状态指标值和当前配置参数输入参数调整模型,参数调整模型对当前配置参数进行调整得到调整后的配置参数,并记录参数调整数据,确定调整后的配置参数对应的数据库状态指标值和性能变化量,以确定的数据库状态指标值和记录的调整数据再次输入参数调整模型进行迭代,得到每次调整对应的性能变化量。
举例说明,请参照图6。图6为一个实施例中迭代调整配置参数的示意图。服务器获取数据库的t时刻的数据库状态指标值s t,将数据库状态指标值s t输入参数调整模型,参数调整模型输出当前t时刻的参数调整数据a t。服务器根据参数调整数据a t对数据库的配置参数进行调整,获取配置参数被调整后的数据库对应的性能变 化量r t和t+1时刻的数据库状态指标值s t+ 1,将数据库状态指标值s t+ 1和性能变化量r t反馈给参数调整模型,以进行迭代循环直至满足迭代停止条件。
S504,基于各性能变化量构建变化量累积值函数。
其中,性能变化量累积值表示经过迭代调整后,数据库处理性能变化总量。性能变化量累积值函数为用于根据性能变化量计算性能变化量累积值的函数。
具体地,服务器得到每次调整对应的性能变化量后,基于当次调整之后的性能变化量进行累加或加权和,计算得到当次调整对应的性能变化量累积值,从而构建性能变化量累积值函数。
在一个实施例中,服务器对为每个性能变化量添加权值,从而构建得到的函数为如下函数:
Q(s t,a t;w)=r t+1+γQ(s t+1,a t+1;w)
其中,s t表示t时刻的数据库状态指标值,a t表示t时刻的参数调整数据,r t+1表示根据a t对t时刻的配置参数进行调整后,t+1时刻的性能变化量,s t+1表示根据a t对t时刻的配置参数进行调整后,t+1时刻的数据库状态指标值,其中w表示参数调整模型中的参数,γ表示折扣系数,且γ<1。
S506,根据生成的性能变化量累积值函数确定最大的性能变化量累积值。
具体地,服务器在获取每次调整对应的性能变化量累积值,将获取到的性能变化量累积值进行两两比较,根据比较结果从性能变化量累积值中选取最大的性能变化量累积值。
在一个实施例中,服务器根据性能变化量累积值函数,确定性能变化量累积值函数对应的最大的性能变化量累积值。
S508,获得与最大的性能变化量累积值对应的参数调整数据。
具体地,服务器中存储着每次调整对应的性能变化量累积值和参数调整数据,同次调整的性能变化量累积值与参数调整数据对应存储。服务器在确定最大的性能变化量累积值后,从存储的参数调整数据中提取与最大的性能变化量累积值对应的参数调整数据。
在一个实施例中,服务器将最大的性能变化量累积值输入参数调整模型,参数调整模型根据性能变化量累积值输出相应的参数调整数据。
本实施例中,通过参数调整模型,根据当前数据库状态指标值和当前配置参数,利用迭代调整当前配置参数确定每次调整对应的性能变化量,根据各性能变化量确定每次调整对应的性能变化量累积值,选取最大的性能变化量累积值对应的参数调整数据,保证了根据选取的参数调整数据对当前配置参数调整后,数据库的性能变化最大,提高了参数调整的准确性。
如图7所示,在一个实施例中,S502具体包括根据数据库状态指标值进行迭代的步骤,该步骤具体包括以下内容:
S702,通过参数调整模型并根据当前数据库状态指标值确定预测参数调整数据。
其中,预测参数调整数据为在参数调整模型迭代过程中为生成参数调整数据,在参数调整模型训练过程所生成的参数调整数据。
具体地,服务器在将当前数据库状态指标值输入参数调整模型中,参数调整模型随机生成预测参数调整数据。
在一个实施例中,服务器针对当前数据库状态指标值中的每个指标值,随机生成一个调整参数,根据每个指标值的调整参数生成初始预测参数调整数据。每个指 标值的调整参数为包括一个维度为3的向量,3个维度分别表示增加、不变和减少。
S704,根据预测参数调整数据调整当前配置参数,得到预测配置参数。
其中,预测配置参数为根据预测参数调整数据对当前配置参数进行调整,生成的配置参数。
具体地,服务器在得到预测参数调整数据后,遍历当前配置参数中的每个参数,在预测参数调整数据中查询遍历到的配置参数对应的调整参数,根据查询到的调整参数对遍历到的配置参数进行调整,得到调整后的配置参数,根据调整后的配置参数预测配置参数。
在一个实施例中,服务器在预测参数调整数据中查询到与遍历到的配置参数对应的调整参数,根据调整参数获取与遍历到的配置参数对应的端值,根据端值和调整参数对遍历到的配置参数进行调整。对于每次配置参数的调整,以上次调整后的配置参数中的最大值或最小值作为当次调整对应的端值。
举例说明,若遍历到的配置参数对应的调整参数为增加,则服务器根据调整参数获取与遍历到的配置参数对应的端值,且当前配置参数值为2,则端值包括2和x(x>2);若遍历到的配置参数对应的调整参数为减少,则服务器根据调整参数获取与遍历到的配置参数对应的端值,且当前配置参数值为2,则端值包括x(x<2)和2;若遍历到的配置参数对应的调整参数为不变,且当前配置参数值为2,则两个端值均为2。
S706,确定预测配置参数对应的预测数据库状态指标值和预测性能指标值。
其中,预测数据库状态指标值和预测性能指标值为,对以预测配置参数配置的数据库进行监测得到的数据库状态指标值和性能指标值。
具体地,服务器根据预测配置参数对数据库进行配置,获取数据库访问历史记录,根据数据库访问历史记录对以预测配置参数配置的数据库进行访问。服务器监测访问过程中数据库的数据库状态指标和性能指标,以监测到的数据库状态指标和性能指标分别作为与预测配置参数对应的预测数据库状态指标值和预测性能指标值。
S708,根据预测性能指标值确定当次调整后的配置参数相应的性能变化量。
具体地,服务器中存储着性能指标值与性能变化量的对应关系。服务器在获取预测性能指标值后,根据性能指标值与性能变化量的对应关系,确定与预测性能指标值对应的性能变化量,以确定的性能变化量作为当前调整后的配置参数对应的性能变化量。
S710,将预测数据库状态指标值作为当前数据库状态指标值进行迭代,直到满足迭代停止条件。
其中,迭代停止条件为迭代过程停止时需要满足的条件。迭代停止条件具体可以是迭代次数。
具体地,服务器在获取到预测数据库状态指标值后,以预测数据库状态指标值作为当前数据库状态指标值,继续执行通过参数调整模型并根据当前数据库状态指标值确定预测参数调整数据,根据预测参数调整数据调整当前配置参数,得到预测配置参数,确定预测配置参数对应的预测数据库状态指标值和预测性能指标值,根据预测性能指标值确定当次调整后的配置参数相应的性能变化量的步骤,直至满足迭代停止条件。
在一个实施例中,服务器在记录参数调整模型中的迭代次数,若记录的迭代次数与迭代停止条件中的迭代停止次数相等,则停止迭代。
本实施例中,通过参数调整模型并根据当前数据库状态指标值进行迭代,通过迭代可以提高参数调整模型所生成参数调整数据的准确性,根据准确性较高的参数调整数据对配置参数进行调整,从而提高了获取推荐配置参数的效率。
在一个实施例中,S708具体还包括:获取迭代过程中当前调整配置参数的次数;根据预测性能指标值和次数确定当次调整后的配置参数相应的性能变化量;性能变化量与次数负相关,与预测性能指标值正相关。
具体地,服务器以性能变化量与次数负相关,且与预测性能指标值正相关构建性能变化量计算公式,将构建的性能变化量计算公式存储。服务器获取迭代过程中的当前配置参数的次数和预测性能指标值,将次数和预测性能指标值输入性能变化量计算公式计算得到性能变化量。
在一个实施例中,可以按照以下计算公式计算性能变化量:
Figure PCTCN2019082226-appb-000001
上述计算公式中以p表示预设指标值,以q表示调整配置参数的次数,r表示性能变化量,α为每个预设指标对应的系数,b为常数。其中,p 1、p 2、…、p n分别表示n个预设指标值,α 1、α 2、…、α n分别表示相应的预设指标值对应的n个系数,则其中性能变化量r与次数q负相关,且性能变化量r与预测性能指标值p正相关。
在一个实施例中,S310具体包括:获取与新的配置参数对应的数据库性能指标值;当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与预设性能指标值匹配或者循环次数达到预设次数。
具体地,服务器以新的配置参数配置数据库,根据数据库访问历史记录对以新的配置参数配置的数据库进行访问。服务器监测访问过程中,以新的配置参数配置的数据库所对应的数据库性能指标值。服务器提取调整终止条件中的预设性能指标值,检测获取到的数据库性能指标值与提取到的预设性能指标值是否匹配,若匹配,则终止调整;若不匹配,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续循环执行。
在一个实施例中,服务器记录循环次数,将记录的循环次数与调整终止条件中的预设次数进行比较,若记录的循环次数小于预设次数,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续循环执行;若记录的循环次数等于预设次数,则终止调整。
在一个实施例中,S506具体包括:获取参数调整模型中第一神经网络模型的模型参数;将获取到的模型参数注入第二神经网络模型;通过第二神经网络模型,确定生成的性能变化量累积值函数对应的最大的性能变化量累积值。
其中,参数调整模型中包括第一神经网络模型和第二神经网络模型。第一神经网络模型用于根据性能变化量累积值确定匹配的参数调整数据;第二神经网络模型用于确定最大的性能变化量累积值。
具体地,服务器将当前数据库状态指标值输入第一神经网络模型进行迭代,在迭代预设次数后,得到稳定的第一神经网络模型。服务器获取第一神经网络模型中模型参数,将获取到的模型参数注入第二神经网络模型。服务器获取第一神经网络 迭代过程中产生的数据库状态指标值和性能变化量,将获取到的数据库状态指标值和性能变化量输入第二神经网络模型,第二神经网络模型根据输入得数据库状态指标值和性能变化量,确定生成的性能变化量累积值函数对应的最大的性能变化量累积值。
在一个实施例中,服务器将当前数据库状态指标值输入第一神经网络模型,第一神经网络模型随机生成参数调整数据,以随机生成的参数调整数据作为初始参数调整数据进行迭代训练,直至得到稳定的第一神经网络模型。
在一个实施例中,S508具体包括:对最大的性能变化量累积值进行梯度下降处理,得到与最大的性能变化量累积值匹配的最大累积估计值;通过第一神经网络模型,确定与最大累积估计值对应的参数调整数据。
具体地,服务器通过第二神经网络模型确定最大的性能变化量累积值后,利用参数调整模型对最大的性能变化量累积值进行梯度下降处理,使得得到的最大累积估计值无限逼近最大的性能变化量累积值,以得到的最大累积估计值作为与最大的性能变化量累积值匹配的最大累积估计值。服务器将最大累积估计值输入第一神经网络模型,获取第一神经网络模型根据最大累积估计值输出的参数调整数据,以获取到的参数调整数据作为与最大累积估计值对应的参数调整数据。
本实施例中,将参数调整模型中第一神经网络模型的模型参数,注入第二神经网络模型,保证了第一神经网络模型与第二神经网络模型的一致性,且提高了数据处理的准确性。利用第二神经网络模型确定最大的性能变化量累积值,通过对最大的性能变化量累积值进行梯度下降处理得到的最大累积估计值,保证了第一神经网络模型返回的参数调整数据对应的性能变化累积值最大,提高了参数调整数据的生成效率。
如图8所示,在一个实施例中,S306之后具体还包括检测参数调整数据的步骤,该步骤具体还包括以下内容:
S802,获取与参数调整数据对应的数据库性能提升值。
具体地,服务器根据参数调整数据调整数据库的当前配置参数,以调整后的配置参数对数据库进行配置,根据数据库访问历史记录,对以调整后的配置参数配置的数据库进行访问。服务器对访问过程中的数据库进行监测,通过监测获取数据库性能指标值,根据数据库性能指标值计算数据库性能提升值。
在一个实施例中,服务器在获取到数据库性能指标值后,根据各数据库性能指标值对应的权重值和相应的数据库性能指标值,进行加权和计算得到数据库性能提升值。
S804,生成随机参数调整数据。
其中,调整数据随机生成程序,为根据参数调整数据的特征生成参数调整数据的程序。
具体地,服务器在获取到参数调整模型返回的参数调整数据时,触发程序调用指令,根据程序调用指令利用调整数据随机生成程序生成随机参数调整数据。
S806,确定与随机参数调整数据对应的数据库性能提升值。
具体地,服务器根据随机参数调整数据调整数据库的当前配置参数,以调整后的配置参数对数据库进行配置,根据数据库访问历史记录,对以调整后的配置参数配置的数据库进行访问。服务器对访问过程中的数据库进行监测,通过监测获取数据库性能指标值,根据数据库性能指标值计算数据库性能提升值,得到与随机参数调整数据对应的数据库性能提升值。
S808,检测获取到的数据库性能提升值是否小于确定的数据库性能提升值。
具体地,服务器将获取到的数据库性能提升值与确定的数据库性能提升值进行比较,通过比较,确定获取到的数据库性能提升值是否小于确定的数据库性能提升值。
S810,当获取到的数据库性能提升值小于确定的数据库性能提升值,则根据随机参数调整数据更新参数调整数据。
具体地,当获取到的数据库性能提升值小于确定的数据库性能提升值,服务器将参数调整数据替换为随机参数调整数据;当获取到的数据库性能提升值大于等于确定的数据库性能提升值时,服务器无需对参数调整数据进行更新。
本实施例中,通过对参数调整模型生成的参数调整数据对应的数据库性能提升值,与随机参数调整数据对应的数据库性能提升值进行比较,若获取到的数据库性能提升值小于确定的数据库性能提升值,则根据随机参数调整数据对配置进行调整,则数据库性能提升更好,根据随机参数调整数据更新参数调整数据,提高了根据参数调整数据对配置参数调整后的数据库性能提升程度。
图9为一个实施例中数据库配置参数处理方法的部署环境示意图。请参照图9,部署环境包括访问数据生成器、数据库和参数调整模型。访问数据生成器用户生成用于访问数据库的数据库访问数据。服务器获取数据库的当前配置参数,调用访问数据生成器生成数据库访问数据,根据数据库访问数据对数据库进行访问。服务器获取与当前配置参数对应的当前数据库状态指标值,驱动参数调整模型,根据当前数据库状态指标值生成参数调整数据。服务器按照参数调整数据调整当前配置参数,得到新的配置参数,将新的配置参数配置为数据库的当前配置参数,服务器再次获取当前配置参数对应的当前数据库状态指标值,直至满足调整终止条件时,获得推荐配置参数。
图10为一个实施例中数据库配置参数处理方法的流程示意图。图10中包括数据库、第一神经网络模型、第二神经网络模型、梯度下降网络模型和模型数据存储库。其中,第一神经网络模型、第二神经网络模型和控制构成参数调整数据。图10中,s t表示t时刻的数据库状态指标值,a t表示t时刻的参数调整数据,r t表示根据a t对t时刻的配置参数进行调整后的性能变化量;s t+1表示根据a t对t时刻的配置参数进行调整后t+1时刻的数据库状态指标值;其中w表示参数调整模型中的参数,γ表示折扣系数,且γ<1。
数据库向第一神经网络模型发送t时刻的数据库状态指标值s t。第一神经网络模型根据s t进行迭代训练,迭代N次后得到稳定的第一神经网络模型,将第一神经网络模型中的参数w发送至第二神经网络模型,使得第二神经网络模型与第一神经网络模型保持一致。数据库将每次参数调整对应的模型数据存储在模型数据存储库,模型数据都包括t时刻的数据库状态指标值s t、t时刻的参数调整数据a t、对t时刻的配置参数进行调整后的性能变化量r t和t+1时刻的数据库状态指标值s t+1。第二神经网络模型根据模型数据确定最大的性能变化量累积值
Figure PCTCN2019082226-appb-000002
第一神经网络模型根据模型数据计算最大累积估计值
Figure PCTCN2019082226-appb-000003
梯度下降网络模型根据模型数据和Q 现实通过梯度下 降对Q 估计进行调整,使得Q 估计和Q 现实之间的差值最小,得到最大的
Figure PCTCN2019082226-appb-000004
第一神经网络模型根据maxQ 估计得到参数调整数据
Figure PCTCN2019082226-appb-000005
将参数调整数据a t发送至数据库,以对数据库的参数进行调整。
如图11所示,在一个实施例中,提供一种数据库参数配置方法,该方法包括以下内容:
S1102,通过当前的用户账号进入数据库参数配置页面。
具体地,用户在用户终端的登录页面输入用户账号。用户终端获取登录页面中输入的用户账号,根据获取的用户账号生成登录请求,用户终端将登录请求发送至服务器。服务器对登录请求中用户账号进行验证,若验证通过向用户终端返回数据库参数配置页面数据。用户终端根据接收到的数据库参数配置页面数据展示数据库参数配置页面。
S1104,获取在数据库参数配置页面中触发的参数调整指令。
具体地,数据库参数配置页面中设置有用于触发参数调整指令的参数调整按钮。用户终端在检测到数据库参数配置页面中的参数调整按钮被点击时,触发参数调整指令。
S1106,向服务器发送参数调整指令;参数调整指令,用于指示服务器获取与用户账号对应的数据库的当前配置参数,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,按照参数调整数据调整当前配置参数,得到新的配置参数,将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
具体地,服务器接收到用户终端发送的参数调整指令。服务器根据参数调整指令获取与参数调整指令中用户账号对应的数据库的当前配置参数。
具体地,服务器在获取到当前配置参数,根据获取到的当前配置参数对数据库进行配置,对根据当前配置参数配置好的数据库进行监测,通过监测获取当前数据库状态指标值。
在一个实施例中,服务器在获取到当前配置参数后,根据当前配置参数对数据库进行配置。服务器调用数据库访问模拟程序模拟生成数据库访问数据,根据模拟生成的数据库访问数据对以当前配置参数配置的数据库进行访问,通过对数据库进行监测,得到当前数据库状态指标值。数据库访问模型程序可以根据预设的数据库访问特征,生成各种数据库访问请求。
举例说明,服务器调用数据库访问模型程序模拟生成大量的数据查询请求、数据插入请求或数据修改请求,服务器根据模拟生成的数据查询请求、数据插入请求或数据修改请求对以当前配置参数配置的数据库进行访问。
通过参数调整模型并根据当前数据库状态指标值生成参数调整数据。
其中,参数调整模型是一个根据当前数据库状态指标值,生成参数调整数据的数据模型。参数调整模型可以是进行深度强化学习(Deep Reinforcement Learning)的模型。参数调整数据为对数据库的当前配置参数进行调整所依据的数据,参数调整数据中包括针对每个配置参数的调整方向,调整方向可以是增加、不变和减少中的任何一种。
具体地,服务器以当前数据库状态指标值作为输入,输入到参数调整模型,获 取参数调整模型根据当前数据库状态指标值输出的参数调整数据。
在一个实施例中,将当前数据库状态指标值输入到参数调整模型的神经网络模型中,获取神经网络模型通过迭代调整生成的参数调整数据。其中,神经网络模型是通过根据当前数据库状态指标值进行训练,得到参数调整数据的数据模型。
按照参数调整数据调整当前配置参数,得到新的配置参数。
具体地,服务器遍历当前配置参数中的每个配置参数,在参数调整数据中查询遍历到的配置参数对应的参数调整数据,根据查询到的参数调整数据对遍历到的配置参数进行调整,以调整后的配置参数作为新的配置参数。
在一个实施例中,获取在数据库参数配置页面中触发的参数调整指令包括:获取在数据库参数配置页面中指定的预设性能指标值;生成携带预设性能指标值的参数调整指令;参数调整指令,用于指示服务器根据预设性能指标值确定调整终止条件。
具体地,用户在用户终端的登录页面输入用户账号,登录至数据库参数配置页面,在数据库参数配置页面中录入预设性能指标值。用户终端检测到数据参数配置页面中的调参按钮被点击时,获取数据库参数配置页面中录入的预设性能指标值,根据获取到的预设性能指标值生成参数调整指令,将参数调整指令发送至服务器。服务器接收用户终端发送的参数调整指令,对参数调整指令进行解析,通过解析提取参数调整指令中的预设性能指标值,以预设性能指标值作为调整终止条件。性能指标值为用于表示数据库数据处理性能的指标数据。性能指标包括吞吐量、延时、内存占用率等。
在一个实施例中,将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数包括:获取与新的配置参数对应的数据库性能指标值;当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与预设性能指标值匹配或者循环次数达到预设次数。
具体地,服务器以新的配置参数配置数据库,根据数据库访问历史记录对以新的配置参数配置的数据库进行访问。服务器监测访问过程中,以新的配置参数配置的数据库所对应的数据库性能指标值。服务器提取调整终止条件中的预设性能指标值,检测获取到的数据库性能指标值与提取到的预设性能指标值是否匹配,若匹配,则终止调整;若不匹配,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续循环执行。
在一个实施例中,服务器记录循环次数,将记录的循环次数与调整终止条件中的预设次数进行比较,若记录的循环次数小于预设次数,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续循环执行;若记录的循环次数等于预设次数,则终止调整。
本实施例中,服务器根据接收到的参数调整指令,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,提高了生成的参数调整数据的准确性。根据生成的参数调整数据对当前配置参数进行调整,得到新的配置参数,将新的配置参数作为当前配置参数,继续执行确定与当前配置参数对应的当前数据库状态指标值,直至满足调整终止条件时获得推荐配置参数。通过利用参数调整模型生成的参数调整数据,对当前配置参数 不断的自动调整,以最终得到满足调整终止条件时的推荐配置参数,从而提高了推荐配置参数的准确性。
如图12所示,在一个实施例中,提供一种数据库配置参数处理装置1200,该装置具体包括以下内容:当前参数获取模块1202、状态指标确定模块1204、调整数据生成模块1206、当前参数调整模块1208和推荐参数获得模块1210。
当前参数获取模块1202,用于获取当前配置参数。
状态指标确定模块1204,用于确定与当前配置参数对应的当前数据库状态指标值。
调整数据生成模块1206,用于通过参数调整模型并根据当前数据库状态指标值生成参数调整数据。
当前参数调整模块1208,用于按照参数调整数据调整当前配置参数,得到新的配置参数。
推荐参数获得模块1210,用于将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
如图13所示,在一个实施例中,数据库配置参数处理装置1200具体还包括:终止条件确定模块1212和调整数据检测模块1214。
终止条件确定模块1212,用于接收通过用户账号触发的参数调整指令;根据参数调整指令确定调整终止条件。
当前参数获取模块1202还用于获取与用户账号对应的数据库所对应的当前配置参数。
调整数据检测模块1214,用于获取与参数调整数据对应的数据库性能提升值;生成随机参数调整数据;确定与随机参数调整数据对应的数据库性能提升值;检测获取到的数据库性能提升值是否小于确定的数据库性能提升值;当获取到的数据库性能提升值小于确定的数据库性能提升值,则根据随机参数调整数据更新参数调整数据。
本实施例中,通过对参数调整模型生成的参数调整数据对应的数据库性能提升值,与随机参数调整数据对应的数据库性能提升值进行比较,若获取到的数据库性能提升值小于确定的数据库性能提升值,则根据随机参数调整数据对配置进行调整,则数据库性能提升更好,根据随机参数调整数据更新参数调整数据,提高了根据参数调整数据对配置参数调整后的数据库性能提升程度。
在一个实施例中,状态指标确定模块1204还用于获取数据库访问历史记录;根据数据库访问历史记录,对以当前配置参数配置的数据库进行访问;获取通过访问数据库所确定的当前数据库状态指标值。
本实施例中,利用记录的数据库访问历史记录,对当前配置参数配置的数据库进行访问,获取通过访问数据库所确定的当前数据库状态指标值,保证获取到当前配置参数对应的当前数据库状态指标值,确定当前数据库状态指标值的准确性,进一步通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,提高了参数调整数据的准确性。
在一个实施例中,调整数据生成模块1206还用于通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当前配置参数并确定相应的性能变化量;基于各性能变化量构建性能变化量累积值函数;根据生成的性能变化量累积值 函数确定最大的性能变化量累积值;获得与最大的性能变化量累积值对应的参数调整数据。
本实施例中,通过参数调整模型,根据当前数据库状态指标值和当前配置参数,利用迭代调整当前配置参数确定每次调整对应的性能变化量,根据各性能变化量确定每次调整对应的性能变化量累积值,选取最大的性能变化量累积值对应的参数调整数据,保证了根据选取的参数调整数据对当前配置参数调整后,数据库的性能变化最大,提高了参数调整的准确性。
在一个实施例中,调整数据生成模块1206还用于通过参数调整模型并根据当前数据库状态指标值确定预测参数调整数据;根据预测参数调整数据调整当前配置参数,得到预测配置参数;确定预测配置参数对应的预测数据库状态指标值和预测性能指标值;根据预测性能指标值确定当次调整后的配置参数相应的性能变化量;将预测数据库状态指标值作为当前数据库状态指标值进行迭代,直到满足迭代停止条件。
本实施例中,通过参数调整模型并根据当前数据库状态指标值进行迭代,通过迭代可以提高参数调整模型所生成参数调整数据的准确性,根据准确性较高的参数调整数据对配置参数进行调整,从而提高了获取推荐配置参数的效率。
在一个实施例中,调整数据生成模块1206还用于获取参数调整模型中第一神经网络模型的模型参数;将获取到的模型参数注入参数调整模型中的第二神经网络模型;通过第二神经网络模型,确定生成的性能变化量累积值函数对应的最大的性能变化量累积值。
调整数据生成模块1206还用于对最大的性能变化量累积值进行梯度下降处理,得到与最大的性能变化量累积值匹配的最大累积估计值;通过第一神经网络模型,确定与最大累积估计值对应的参数调整数据。
本实施例中,将参数调整模型中第一神经网络模型的模型参数,注入第二神经网络模型,保证了第一神经网络模型与第二神经网络模型的一致性,且提高了数据处理的准确性。利用第二神经网络模型确定最大的性能变化量累积值,通过对最大的性能变化量累积值进行梯度下降得到的最大累积估计值,保证了第一神经网络模型返回的参数调整数据对应的性能变化累积值最大,提高了参数调整数据的生成效率。
在一个实施例中,调整数据生成模块1206还用于获取迭代过程中当前调整配置参数的次数;根据预测性能指标值和次数确定当次调整后的配置参数相应的性能变化量;性能变化量与次数负相关,与预测性能指标值正相关。
在一个实施例中,推荐参数获得模块1210还用于获取与新的配置参数对应的数据库性能指标值;当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与预设性能指标值匹配或者循环次数达到预设次数。
如图14,在一个实施例中,提供一种数据库参数配置装置1400,该装置1400具体包括以下模块:配置页面进入模块1402、调整指令获取模块1404和调整指令发送模块1406。
配置页面进入模块1402,用于通过当前的用户账号进入数据库参数配置页面。
调整指令获取模块1404,用于获取在数据库参数配置页面中触发的参数调整指令。
调整指令发送模块1406,向服务器发送参数调整指令;参数调整指令,用于指示服务器获取与用户账号对应的数据库的当前配置参数,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据,按照参数调整数据调整当前配置参数,得到新的配置参数,将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
在一个实施例中,调整指令获取模块1404还用于获取在数据库参数配置页面中指定的预设性能指标值;生成携带预设性能指标值的参数调整指令;参数调整指令,用于指示服务器根据预设性能指标值确定调整终止条件。
调整指令发送模块1406还用于获取与新的配置参数对应的数据库性能指标值;当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与预设性能指标值匹配或者循环次数达到预设次数。
图15为一个实施例中计算机设备的内部结构示意图。参照图15,该计算机设备可以是图1中所示的服务器120,也可以是图1中所示的用户终端110,可以是上述图2中服务器集群220中的主控服务器222,也可以图2中的用户终端210。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质可存储操作系统和计算机程序。该计算机程序被执行时,可使得处理器执行一种数据库配置参数处理方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该内存储器中可储存有计算机程序,该计算机程序被处理器执行时,可使得处理器执行一种数据库配置参数处理方法。计算机设备的网络接口用于进行网络通信。
本领域技术人员可以理解,图15中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备或机器人的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,本申请提供的数据库配置参数处理装置1200可以实现为一种计算机程序的形式,计算机程序可在如图15所示的计算机设备上运行。计算机设备或机器人的存储器中可存储组成该数据库配置参数处理装置的各个程序模块,比如,图12所示的当前参数获取模块1202、状态指标确定模块1204、调整数据生成模块1206、当前参数调整模块1208和推荐参数获得模块1210。各个程序模块构成的计算机程序使得处理器执行本说明书中描述的本申请各个实施例的数据库配置参数处理方法中的步骤。
例如,图15所示的计算机设备可以通过如图12所示的数据库配置参数处理装置1200中的当前参数获取模块1202获取当前配置参数。状态指标确定模块1204确定与当前配置参数对应的当前数据库状态指标值。调整数据生成模块1206通过参数调整模型并根据当前数据库状态指标值生成参数调整数据。当前参数调整模块1208按照参数调整数据调整当前配置参数,得到新的配置参数。推荐参数获得模块1210将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,计算机 程序被处理器执行时,使得处理器执行如下步骤:获取当前配置参数;确定与当前配置参数对应的当前数据库状态指标值;通过参数调整模型并根据当前数据库状态指标值生成参数调整数据;按照参数调整数据调整当前配置参数,得到新的配置参数;将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
在一个实施例中,计算机程序被处理器执行时,使得处理器执行如下步骤:接收通过用户账号触发的参数调整指令;根据参数调整指令确定调整终止条件。
在一个实施例中,获取当前配置参数包括:获取与用户账号对应的数据库所对应的当前配置参数。
在一个实施例中,确定与当前配置参数对应的当前数据库状态指标值包括:获取数据库访问历史记录;根据数据库访问历史记录,对以当前配置参数配置的数据库进行访问;获取通过访问数据库所确定的当前数据库状态指标值。
在一个实施例中,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据包括:通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当前配置参数并确定相应的性能变化量;基于各性能变化量构建性能变化量累积值函数;根据生成的性能变化量累积值函数确定最大的性能变化量累积值;获得与最大的性能变化量累积值对应的参数调整数据。
在一个实施例中,通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当前配置参数并确定相应的性能变化量包括:通过参数调整模型并根据当前数据库状态指标值确定预测参数调整数据;根据预测参数调整数据调整当前配置参数,得到预测配置参数;确定预测配置参数对应的预测数据库状态指标值和预测性能指标值;根据预测性能指标值确定当次调整后的配置参数相应的性能变化量;将预测数据库状态指标值作为当前数据库状态指标值进行迭代,直到满足迭代停止条件。
在一个实施例中,根据生成的性能变化量累积值函数确定最大的性能变化量累积值,包括:获取参数调整模型中第一神经网络模型的模型参数;将获取到的模型参数注入参数调整模型中的第二神经网络模型;通过第二神经网络模型,确定生成的性能变化量累积值函数对应的最大的性能变化量累积值。
在一个实施例中,获得与最大的性能变化量累积值对应的参数调整数据包括:对最大的性能变化量累积值进行梯度下降处理,得到与最大的性能变化量累积值匹配的最大累积估计值;通过第一神经网络模型,确定与最大累积估计值对应的参数调整数据。
在一个实施例中,根据预测性能指标值确定当次调整后的配置参数相应的性能变化量包括:获取迭代过程中当前调整配置参数的次数;根据预测性能指标值和次数确定当次调整后的配置参数相应的性能变化量;性能变化量与次数负相关,与预测性能指标值正相关。
在一个实施例中,通过参数调整模型并根据当前数据库状态指标值生成参数调整数据之后,计算机程序被处理器执行时,使得处理器执行如下步骤:获取与参数调整数据对应的数据库性能提升值;生成随机参数调整数据;确定与随机参数调整数据对应的数据库性能提升值;检测获取到的数据库性能提升值是否小于确定的数据库性能提升值;当获取到的数据库性能提升值小于确定的数据库性能提升值,则根据随机参数调整数据更新参数调整数据。
一种存储有计算机程序的存储介质,所述计算机程序被处理器执行时,使得处 理器执行如下步骤:获取当前配置参数;确定与当前配置参数对应的当前数据库状态指标值;通过参数调整模型并根据当前数据库状态指标值生成参数调整数据;按照参数调整数据调整当前配置参数,得到新的配置参数;将新的配置参数作为当前配置参数,返回确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
当该存储介质中存储的计算机程序被处理器执行时,使得处理器执行上述数据库配置参数处理方法,具体细节这里不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (23)

  1. 一种数据库配置参数处理方法,由计算机设备执行,所述方法包括:
    获取当前配置参数;
    确定与当前配置参数对应的当前数据库状态指标值;
    通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
    按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
    将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
  2. 根据权利要求1所述的方法,所述方法还包括:
    接收通过用户账号触发的参数调整指令;
    根据所述参数调整指令确定调整终止条件;
    所述获取当前配置参数包括:
    获取与所述用户账号对应的数据库所对应的当前配置参数。
  3. 根据权利要求1所述的方法,所述确定与当前配置参数对应的当前数据库状态指标值包括:
    获取数据库访问历史记录;
    根据所述数据库访问历史记录,对以当前配置参数配置的数据库进行访问;
    获取通过访问所述数据库所确定的当前数据库状态指标值。
  4. 根据权利要求1所述的方法,所述通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据包括:
    通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当前配置参数并确定相应的性能变化量;
    基于各性能变化量构建性能变化量累积值函数;
    根据生成的性能变化量累积值函数确定最大的性能变化量累积值;
    获得与所述最大的性能变化量累积值对应的参数调整数据。
  5. 根据权利要求4所述的方法,所述通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当前配置参数并确定相应的性能变化量包括:
    通过参数调整模型并根据当前数据库状态指标值确定预测参数调整数据;
    根据所述预测参数调整数据调整所述当前配置参数,得到预测配置参数;
    确定所述预测配置参数对应的预测数据库状态指标值和预测性能指标值;
    根据所述预测性能指标值确定当次调整后的配置参数相应的性能变化量;
    将所述预测数据库状态指标值作为当前数据库状态指标值进行迭代,直到满足迭代停止条件。
  6. 根据权利要求5中所述的方法,所述根据生成的性能变化量累积值函数确定最大的性能变化量累积值,包括:
    获取参数调整模型中第一神经网络模型的模型参数;
    将获取到的模型参数注入所述参数调整模型中的第二神经网络模型;
    通过第二神经网络模型,确定生成的性能变化量累积值函数对应的最大的性能变化量累积值;
    所述获得与所述最大的性能变化量累积值对应的参数调整数据包括:
    对所述最大的性能变化量累积值进行梯度下降处理,得到与所述最大的性能变 化量累积值匹配的最大累积估计值;
    通过所述第一神经网络模型,确定与所述最大累积估计值对应的参数调整数据。
  7. 根据权利要求5所述的方法,所述根据所述预测性能指标值确定当次调整后的配置参数相应的性能变化量包括:
    获取迭代过程中当前调整配置参数的次数;
    根据所述预测性能指标值和所述次数确定当次调整后的配置参数相应的性能变化量;所述性能变化量与所述次数负相关,与所述预测性能指标值正相关。
  8. 根据权利要求1所述的方法,所述通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据之后,还包括:
    获取与所述参数调整数据对应的数据库性能提升值;
    生成随机参数调整数据;
    确定与所述随机参数调整数据对应的数据库性能提升值;
    检测获取到的数据库性能提升值是否小于确定的数据库性能提升值;
    当获取到的数据库性能提升值小于确定的数据库性能提升值,则根据所述随机参数调整数据更新所述参数调整数据。
  9. 根据权利要求1至8任一项所述的方法,所述将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数包括:
    获取与所述新的配置参数对应的数据库性能指标值;
    当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则
    将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与所述预设性能指标值匹配或者循环次数达到预设次数。
  10. 一种数据库参数配置方法,由终端执行,所述方法包括:
    通过当前的用户账号进入数据库参数配置页面;
    获取在所述数据库参数配置页面中触发的参数调整指令;
    向服务器发送所述参数调整指令;所述参数调整指令,用于指示所述服务器获取与所述用户账号对应的数据库的当前配置参数,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据,按照所述参数调整数据调整所述当前配置参数,得到新的配置参数,将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
  11. 根据权利要求10所述的方法,所述获取在所述数据库参数配置页面中触发的参数调整指令包括:
    获取在所述数据库参数配置页面中指定的预设性能指标值;
    生成携带所述预设性能指标值的参数调整指令;所述参数调整指令,用于指示所述服务器根据所述预设性能指标值确定调整终止条件;
    所述将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数包括:
    获取与所述新的配置参数对应的数据库性能指标值;
    当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则
    将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与所述预设性能指标值匹配或者循环次数达到预设次数。
  12. 一种数据库配置参数处理装置,所述装置包括:
    当前参数获取模块,用于获取当前配置参数;
    状态指标确定模块,用于确定与当前配置参数对应的当前数据库状态指标值;
    调整数据生成模块,用于通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
    当前参数调整模块,用于按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
    推荐参数获得模块,用于将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
  13. 一种数据库参数配置装置,所述装置包括:
    配置页面进入模块,用于通过当前的用户账号进入数据库参数配置页面;
    调整指令获取模块,用于获取在所述数据库参数配置页面中触发的参数调整指令;
    调整指令发送模块,用于向服务器发送所述参数调整指令;所述参数调整指令,用于指示所述服务器获取与所述用户账号对应的数据库的当前配置参数,确定与当前配置参数对应的当前数据库状态指标值,通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据,按照所述参数调整数据调整所述当前配置参数,得到新的配置参数,将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
  14. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如下步骤:
    获取当前配置参数;
    确定与当前配置参数对应的当前数据库状态指标值;
    通过参数调整模型并根据所述当前数据库状态指标值生成参数调整数据;
    按照所述参数调整数据调整所述当前配置参数,得到新的配置参数;
    将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至满足调整终止条件时获得推荐配置参数。
  15. 根据权利要求14所述的计算机设备,所述处理器进一步用于:
    接收通过用户账号触发的参数调整指令;
    根据所述参数调整指令确定调整终止条件;
    所述获取当前配置参数包括:
    获取与所述用户账号对应的数据库所对应的当前配置参数。
  16. 根据权利要求14所述的计算机设备,所述处理器进一步用于:
    获取数据库访问历史记录;
    根据所述数据库访问历史记录,对以当前配置参数配置的数据库进行访问;
    获取通过访问所述数据库所确定的当前数据库状态指标值。
  17. 根据权利要求14所述的计算机设备,所述处理器进一步用于:
    通过参数调整模型,基于当前数据库状态指标值和当前配置参数,迭代调整当 前配置参数并确定相应的性能变化量;
    基于各性能变化量构建性能变化量累积值函数;
    根据生成的性能变化量累积值函数确定最大的性能变化量累积值;
    获得与所述最大的性能变化量累积值对应的参数调整数据。
  18. 根据权利要求17所述的计算机设备,所述处理器进一步用于:
    通过参数调整模型并根据当前数据库状态指标值确定预测参数调整数据;
    根据所述预测参数调整数据调整所述当前配置参数,得到预测配置参数;
    确定所述预测配置参数对应的预测数据库状态指标值和预测性能指标值;
    根据所述预测性能指标值确定当次调整后的配置参数相应的性能变化量;
    将所述预测数据库状态指标值作为当前数据库状态指标值进行迭代,直到满足迭代停止条件。
  19. 根据权利要求18中所述的计算机设备,所述处理器进一步用于:
    获取参数调整模型中第一神经网络模型的模型参数;
    将获取到的模型参数注入所述参数调整模型中的第二神经网络模型;
    通过第二神经网络模型,确定生成的性能变化量累积值函数对应的最大的性能变化量累积值;
    所述获得与所述最大的性能变化量累积值对应的参数调整数据包括:
    对所述最大的性能变化量累积值进行梯度下降处理,得到与所述最大的性能变化量累积值匹配的最大累积估计值;
    通过所述第一神经网络模型,确定与所述最大累积估计值对应的参数调整数据。
  20. 根据权利要求18所述的计算机设备,所述处理器进一步用于:
    获取迭代过程中当前调整配置参数的次数;
    根据所述预测性能指标值和所述次数确定当次调整后的配置参数相应的性能变化量;所述性能变化量与所述次数负相关,与所述预测性能指标值正相关。
  21. 根据权利要求14所述的计算机设备,所述处理器进一步用于:
    获取与所述参数调整数据对应的数据库性能提升值;
    生成随机参数调整数据;
    确定与所述随机参数调整数据对应的数据库性能提升值;
    检测获取到的数据库性能提升值是否小于确定的数据库性能提升值;
    当获取到的数据库性能提升值小于确定的数据库性能提升值,则根据所述随机参数调整数据更新所述参数调整数据。
  22. 根据权利要求14所述的计算机设备,所述处理器进一步用于:
    获取与所述新的配置参数对应的数据库性能指标值;
    当获取的数据库性能指标值与调整终止条件中的预设性能指标值不匹配,或者,当循环次数小于预设次数时,则
    将新的配置参数作为当前配置参数,返回所述确定与当前配置参数对应的当前数据库状态指标值继续执行,直至新的配置参数对应的数据库性能指标值与所述预设性能指标值匹配或者循环次数达到预设次数。
  23. 一种存储有计算机程序的存储介质,所述计算机程序被处理器执行时,使得处理器执行如权利要求1至11中任一项所述方法的步骤。
PCT/CN2019/082226 2018-05-22 2019-04-11 数据库配置参数处理方法、装置、计算机设备和存储介质 Ceased WO2019223443A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19807040.1A EP3742673A4 (en) 2018-05-22 2019-04-11 DATABASE CONFIGURATION PARAMETER PROCESSING PROCESS AND APPARATUS, COMPUTER DEVICE AND INFORMATION MEDIA
US17/004,321 US11507626B2 (en) 2018-05-22 2020-08-27 Method and apparatus for processing database configuration parameter, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810494412.3 2018-05-22
CN201810494412.3A CN108763398B (zh) 2018-05-22 2018-05-22 数据库配置参数处理方法、装置、计算机设备和存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/004,321 Continuation US11507626B2 (en) 2018-05-22 2020-08-27 Method and apparatus for processing database configuration parameter, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2019223443A1 true WO2019223443A1 (zh) 2019-11-28

Family

ID=64008444

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082226 Ceased WO2019223443A1 (zh) 2018-05-22 2019-04-11 数据库配置参数处理方法、装置、计算机设备和存储介质

Country Status (4)

Country Link
US (1) US11507626B2 (zh)
EP (1) EP3742673A4 (zh)
CN (1) CN108763398B (zh)
WO (1) WO2019223443A1 (zh)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763398B (zh) 2018-05-22 2021-08-17 腾讯科技(深圳)有限公司 数据库配置参数处理方法、装置、计算机设备和存储介质
CN109784721B (zh) * 2019-01-15 2021-01-26 广东度才子集团有限公司 一种就业数据分析与数据挖掘分析的平台系统
CN110019151B (zh) * 2019-04-11 2024-03-15 深圳市腾讯计算机系统有限公司 数据库性能调整方法、装置、设备、系统及存储介质
CN111949631B (zh) * 2019-05-14 2024-06-25 华为技术有限公司 一种确定数据库的配置参数的方法及装置
US11533115B2 (en) * 2019-05-15 2022-12-20 Huawei Technologies Co., Ltd. Systems and methods for wireless signal configuration by a neural network
WO2021016932A1 (zh) * 2019-07-31 2021-02-04 深圳市大疆创新科技有限公司 数据处理方法、装置及计算机可读存储介质
CN111045925A (zh) * 2019-11-04 2020-04-21 深圳传音控股股份有限公司 应用程序性能参数优化方法、装置及计算机可读存储介质
CN112783854A (zh) * 2019-11-04 2021-05-11 华为技术有限公司 数据库的配置参数的获取方法和装置
CN113032033B (zh) * 2019-12-05 2024-05-17 中国科学院深圳先进技术研究院 一种大数据处理平台配置的自动优化方法
CN111339066B (zh) * 2020-05-20 2020-09-04 腾讯科技(深圳)有限公司 数据库优化方法、装置、电子设备及计算机可读存储介质
CN114118433B (zh) * 2020-08-26 2025-01-14 华为技术有限公司 一种设备的配置参数的推荐方法及装置
CN112231236A (zh) * 2020-12-14 2021-01-15 广东睿江云计算股份有限公司 一种数据库性能的测试方法
CN113127446B (zh) * 2021-04-01 2023-04-07 山东英信计算机技术有限公司 一种基于Ottertune服务的集群调优方法及装置
CN113515504B (zh) * 2021-07-29 2024-01-09 北京百度网讯科技有限公司 数据管理方法、装置、电子设备以及存储介质
CN115865679A (zh) 2021-09-22 2023-03-28 中兴通讯股份有限公司 网络管控方法及其系统、存储介质
US11765604B2 (en) 2021-12-16 2023-09-19 T-Mobile Usa, Inc. Providing configuration updates to wireless telecommunication networks
CN114546990B (zh) * 2022-02-18 2025-04-08 北京奥星贝斯科技有限公司 数据库参数调整方法以及装置
CN114840403B (zh) * 2022-04-29 2025-11-14 阿里巴巴(中国)有限公司 系统参数调优的方法、装置及电子设备
CN115145897A (zh) * 2022-07-11 2022-10-04 阿里巴巴(中国)有限公司 数据处理方法、装置、设备和存储介质
CN116244274A (zh) * 2023-02-24 2023-06-09 武汉达梦数据技术有限公司 一种数据库参数的推荐方法、装置、设备及存储介质
CN116628064A (zh) * 2023-05-29 2023-08-22 上海黄豆网络科技有限公司 数据库访问方法、系统以及装置
CN117112535A (zh) * 2023-08-11 2023-11-24 济南浪潮数据技术有限公司 一种内存配置优化方法、装置、设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841423A (zh) * 2009-03-19 2010-09-22 大唐移动通信设备有限公司 网管系统历史性能数据查询方法、装置及网管系统
CN105354658A (zh) * 2015-10-12 2016-02-24 国网北京市电力公司 数据处理方法和装置
US20170156018A1 (en) * 2015-11-30 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method And Electronic Device For Online Tuning Application
CN107026747A (zh) * 2016-02-01 2017-08-08 中兴通讯股份有限公司 网管性能数据的统计汇总方法及装置
CN107908532A (zh) * 2017-05-05 2018-04-13 平安科技(深圳)有限公司 一种数据库性能诊断方法、装置以及设备
CN108763398A (zh) * 2018-05-22 2018-11-06 腾讯科技(深圳)有限公司 数据库配置参数处理方法、装置、计算机设备和存储介质

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852818A (en) * 1996-12-23 1998-12-22 Oracle Corporation Non-recursive method for parameter evaluation within an information management system
US7134008B2 (en) * 2003-09-04 2006-11-07 Sun Microsystems, Inc. Utility for configuring and verifying data sources
US20060136358A1 (en) * 2004-12-21 2006-06-22 Microsoft Corporation Database tuning advisor graphical tool
WO2008067676A1 (en) * 2006-12-08 2008-06-12 Medhat Moussa Architecture, system and method for artificial neural network implementation
CN101072048B (zh) * 2007-06-13 2013-12-04 华为技术有限公司 信息参数的调整方法及装置
CN103853786B (zh) * 2012-12-06 2017-07-07 中国电信股份有限公司 数据库参数的优化方法与系统
US9390383B2 (en) * 2013-01-28 2016-07-12 Georges Harik Method for an optimizing predictive model using gradient descent and conjugate residuals
US20150170053A1 (en) * 2013-12-13 2015-06-18 Microsoft Corporation Personalized machine learning models
US20150310044A1 (en) * 2014-02-03 2015-10-29 Codefutures Corporation Database device and processing of data in a database
US20160210323A1 (en) * 2015-01-16 2016-07-21 International Business Machines Corporation Temporal auditing
US9836467B1 (en) * 2016-10-31 2017-12-05 International Business Machines Company Altering in-flight streamed data from a relational database
WO2018222203A1 (en) * 2017-06-02 2018-12-06 Google Llc Systems and methods for black-box optimization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841423A (zh) * 2009-03-19 2010-09-22 大唐移动通信设备有限公司 网管系统历史性能数据查询方法、装置及网管系统
CN105354658A (zh) * 2015-10-12 2016-02-24 国网北京市电力公司 数据处理方法和装置
US20170156018A1 (en) * 2015-11-30 2017-06-01 Le Holdings (Beijing) Co., Ltd. Method And Electronic Device For Online Tuning Application
CN107026747A (zh) * 2016-02-01 2017-08-08 中兴通讯股份有限公司 网管性能数据的统计汇总方法及装置
CN107908532A (zh) * 2017-05-05 2018-04-13 平安科技(深圳)有限公司 一种数据库性能诊断方法、装置以及设备
CN108763398A (zh) * 2018-05-22 2018-11-06 腾讯科技(深圳)有限公司 数据库配置参数处理方法、装置、计算机设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3742673A4 *

Also Published As

Publication number Publication date
CN108763398A (zh) 2018-11-06
US11507626B2 (en) 2022-11-22
EP3742673A1 (en) 2020-11-25
CN108763398B (zh) 2021-08-17
US20200394226A1 (en) 2020-12-17
EP3742673A4 (en) 2021-03-10

Similar Documents

Publication Publication Date Title
WO2019223443A1 (zh) 数据库配置参数处理方法、装置、计算机设备和存储介质
US12541713B2 (en) Method, apparatus, and computer device and storage medium for distributed training of machine learning model
US12314856B2 (en) Population based training of neural networks
US11687832B1 (en) Training a model using parameter server shards
US12008445B2 (en) Black-box optimization using neural networks
US12333433B2 (en) Training neural networks using priority queues
KR102532658B1 (ko) 신경 아키텍처 검색
CN110287332B (zh) 云环境下仿真模型选择方法与装置
CN112579194B (zh) 基于时延和事务吞吐量的区块链共识任务卸载方法及装置
CN111406267A (zh) 使用性能预测神经网络的神经架构搜索
CN106022505A (zh) 一种预测用户离网的方法及装置
CN108734264A (zh) 深度神经网络模型压缩方法及装置、存储介质、终端
CN112801301A (zh) 异步计算方法、装置、设备、存储介质及程序产品
CN104021226B (zh) 预取规则的更新方法及装置
CN114912022A (zh) 预测模型训练方法、系统、计算机设备及存储介质
US20240338593A1 (en) Machine learning model optimization
CN110874635A (zh) 一种深度神经网络模型压缩方法及装置
KR20240141403A (ko) 초거대 언어 모델 기반 서비스 제공 방법, 장치, 시스템 및 컴퓨터 프로그램
CN119066095B (zh) 一种云际分布式缓存数据库自适应调优方法及系统
CN114637809A (zh) 同步延迟时间动态配置方法、装置、电子设备及介质
CN114491342A (zh) 个性化模型的训练方法、信息显示方法及设备
US11645043B2 (en) Method and system for calculating minwise hash signatures from weighted sets
CN110096311B (zh) 流式计算中聚合时间的评估方法、装置、设备及存储介质
CN107622003B (zh) 一种性能优化结果预测方法及装置
CN109840790B (zh) 用户流失的预测方法、装置及计算机设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19807040

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019807040

Country of ref document: EP

Effective date: 20200817

NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Ref document number: 2019807040

Country of ref document: EP