CN116450606A - Parameter adjustment method and device, electronic equipment and storage medium - Google Patents

Parameter adjustment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116450606A
CN116450606A CN202310318789.4A CN202310318789A CN116450606A CN 116450606 A CN116450606 A CN 116450606A CN 202310318789 A CN202310318789 A CN 202310318789A CN 116450606 A CN116450606 A CN 116450606A
Authority
CN
China
Prior art keywords
parameter
target
database
operation data
similar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310318789.4A
Other languages
Chinese (zh)
Inventor
平彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202310318789.4A priority Critical patent/CN116450606A/en
Publication of CN116450606A publication Critical patent/CN116450606A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Feedback Control In General (AREA)

Abstract

The embodiment of the invention discloses a parameter adjustment method, a parameter adjustment device, electronic equipment and a storage medium. The method comprises the following steps: respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples; constructing a tree model based on at least one group of obtained target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model; and adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively. According to the technical scheme provided by the embodiment of the invention, the automatic adjustment of the parameters of the target database can be realized, so that the labor cost is reduced.

Description

Parameter adjustment method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a parameter adjusting method, a parameter adjusting device, electronic equipment and a storage medium.
Background
In the informatization and big data age of today, databases are used to store, organize and manage user and system data, and are computer system software indispensable to application systems.
It should be noted that the database has various parameters, and these parameters directly affect the operation performance of the database. At present, in order to ensure effective operation of a database, parameters are manually adjusted by technicians, which causes extremely high labor cost and is to be solved.
Disclosure of Invention
The embodiment of the invention provides a parameter adjustment method, a device, electronic equipment and a storage medium, which are used for realizing automatic adjustment of parameters of a target database, thereby reducing labor cost.
According to an aspect of the present invention, there is provided a parameter adjustment method, which may include:
respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples;
constructing a tree model based on the obtained at least one group of target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model;
And adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively.
According to another aspect of the present invention, there is provided a parameter adjustment apparatus, which may include:
the target construction sample is used as a module for respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples;
the parameter importance obtaining module is used for constructing a tree model based on the obtained at least one group of target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model;
and the target parameter value adjusting module is used for adjusting the target parameter value of the important parameter in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively.
According to another aspect of the present invention, there is provided an electronic device, which may include:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to implement the parameter adjustment method provided by any embodiment of the present invention when executed.
According to another aspect of the present invention, there is provided a computer readable storage medium having stored thereon computer instructions for causing a processor to execute the parameter adjustment method provided by any embodiment of the present invention.
According to the technical scheme, the target parameter value of at least one parameter of the target database is obtained, target operation data of the target database operated under the target parameter value is obtained, and the target parameter value and the target operation data are used as a group of target construction samples; constructing a tree model based on the obtained at least one group of target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model; and adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively. According to the technical scheme provided by the embodiment of the invention, the target parameter value of the important parameter in at least one parameter is adjusted based on the parameter importance obtained by the constructed tree model, so that the automatic adjustment of the parameter of the target database can be realized, and the labor cost is reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention, nor is it intended to be used to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
FIG. 1 is a flow chart of a parameter adjustment method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for constructing a tree model provided in a first embodiment of the present invention;
FIG. 3 is a flowchart of a parameter adjustment method according to a second embodiment of the present invention;
FIG. 4 is a flowchart of a parameter adjustment method provided in a third embodiment of the present invention;
FIG. 5 is a flowchart of an alternative example of a parameter adjustment method provided in the third embodiment of the present invention;
FIG. 6 is a block diagram showing a parameter adjusting apparatus according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device implementing a parameter adjustment method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. The cases of "target", "original", etc. are similar and will not be described in detail herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a parameter adjustment method according to a first embodiment of the present invention. The embodiment is applicable to the case of parameter adjustment to a database. The method may be performed by a parameter adjustment device provided by an embodiment of the present invention, where the device may be implemented in software and/or hardware, and the device may be integrated on an electronic device, where the electronic device may be a variety of user terminals or servers.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
s110, respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples.
The target database may be understood as a database requiring parameter adjustment. Parameters are understood to be parameters in the target database, as well as parameters in the target database that can be adjusted, for example, system parameters in the database. The target parameter value may be understood as a parameter value corresponding to the parameter. The target operation data may be understood as data that is obtained by operating the target database under the target parameter value and can represent the stability or performance of the target database, and in practical applications, optionally, the dimension of the target operation data includes at least one of a system processing capability, throughput capability and delay (Latency), where the system processing capability may be, for example, a transaction processing number (Transactions Per Second, TPS) transmitted Per Second, and the throughput capability may be, for example, a Query Per Second (QPS), where the acquisition of the target operation data in different dimensions helps to guarantee the operation performance of the target database in multiple dimensions by combining with the following steps. The target build samples may be understood as samples for building the resulting tree model. A tree model may be understood as a model of a tree structure or a model comprising a tree structure model.
In the embodiment of the invention, the target parameter value of at least one parameter of the target database is collected in advance, and the target operation data of the target database operated under the target parameter value is stored; when in use, the target parameter value of at least one parameter of the target database can be directly and respectively obtained, the target operation data of the target database operated under the target parameter value can be obtained, and the target parameter value and the target operation data are used as a group of target construction samples.
S120, constructing a tree model based on the obtained at least one group of target construction samples, and obtaining the parameter importance corresponding to at least one parameter respectively according to the tree model.
It should be noted that, the tree model in the embodiment of the present invention is a tree model capable of determining the importance of parameters based on the tree model, for example, may be a random forest model or an XGB model, which is not specifically limited herein. The importance of a parameter can be understood as the importance score of the parameter in a target building sample for building the tree model, the parameter can be regarded as the feature for building the obtained tree model, and the importance of the parameter is the feature importance which can be obtained based on the tree model. In the embodiment of the present invention, the manner of obtaining the parameter importance corresponding to at least one parameter according to the tree model is not specifically limited, and optionally, any manner of calculating the feature importance of the tree model may be used to calculate the parameter importance.
Illustratively, the tree model may be constructed by:
the step of randomly selecting at least one set of target construction samples from the at least one set of target construction samples as a sample construction set by repeating the step of performing at least one sample retrieval;
based on the at least one sample construction set obtained as described above, for each sample construction set in the at least one sample construction set, referring to fig. 2, at least one parameter may be randomly and non-repeatedly selected as at least one root node parameter from among parameters included in the sample construction set, and a root node base index or a root node information entropy of each of the at least one root node parameter, which may be understood as a base index of the root node parameter, which may be understood as an information entropy of the root node parameter, may be determined based on the sample construction set;
taking a root node parameter with the minimum root node base index or root node information entropy as a root node of a decision tree corresponding to the sample construction set, and updating the root node as a current node;
determining a current node base index of the current node based on the sample construction set, wherein the current node base index can be understood as the base index corresponding to the current node;
Judging whether the current node can split or whether the corresponding child node is not split yet based on the current node base index and a preset threshold, wherein the preset threshold can be understood as a preset base index threshold for judging whether the current node is split or not, and the preset threshold can be determined according to pruning requirements of a decision tree corresponding to a sample construction set;
randomly and non-repeatedly selecting at least one parameter from parameters included in a sample construction set as at least one current node parameter under the condition that the current node can be split or the corresponding child node is not split, and determining a current node base index or a current node information entropy of each current node parameter in the at least one current node parameter based on the sample construction set, wherein the current node base index can be understood as the base index of the current node parameter, and the current node information entropy can be understood as the information entropy of the current node parameter;
splitting the current node according to the current node base index or the current node parameter with the minimum current node information entropy, updating at least one child node obtained after splitting to the current node, and updating a decision tree corresponding to the sample construction set based on a splitting result;
Judging whether the current nodes cannot be split, updating the current nodes which can be split or the corresponding sub-nodes of which are not split into the current nodes under the condition that the current nodes exist in the current nodes and the current nodes which can be split or the corresponding sub-nodes of which are not split are updated into the current nodes, and returning to the step of determining the current node base index of the current nodes based on the sample construction set;
under the condition that the current nodes cannot be split, a decision tree corresponding to the sample construction set is obtained;
obtaining a tree model according to at least one decision tree;
and if the current node is not splittable and the corresponding child nodes are split, executing the step of judging whether the current node cannot be split.
It should be noted that, the tree model constructed by the embodiment of the present invention may also be used for predicting the stability or performance of the target database or similar databases of the same type or similar type as the target database, for example, the parameter values of the parameters of the target database may be input into the tree model, and the prediction result of the target database related to the stability or performance of the target database may be determined according to the output result of the tree model; for example, the parameter values of the parameters of the similar database can be input into the tree model, and the prediction results of the similar database, which are related to the stability or performance of the similar database, can be determined according to the output results of the tree model.
And S130, adjusting target parameter values of important parameters in at least one parameter based on the parameter importance corresponding to the at least one parameter.
The important parameter is understood to be a parameter of the at least one parameter, which is required to be adjusted.
In the embodiment of the invention, the importance degree of the parameter can be represented by considering the importance degree of the parameter, so that the parameter important parameter for adjusting the important requirement in the parameter can be determined based on the importance degree of the parameter corresponding to at least one parameter respectively, and the target parameter value of the important parameter can be adjusted.
In the embodiment of the invention, all parameters in at least one parameter are taken as important parameters based on the parameter importance corresponding to the at least one parameter respectively, and the important parameters are sequentially adjusted according to the target parameter values of the parameter importance corresponding to the at least one parameter respectively; the method may further include adjusting a target parameter value of the important parameter by taking a preset number or a preset number proportion of parameters in the at least one parameter as important parameters based on the parameter importance corresponding to the at least one parameter, for example, adjusting a target parameter value of the important parameter by taking a parameter of 5 before ranking the parameter importance as important parameter in the at least one parameter, and further for example, adjusting a target parameter value of the important parameter by taking a parameter of 5 before ranking the parameter importance as important parameter in the at least one parameter; etc.
According to the technical scheme, the target parameter value of at least one parameter of the target database is obtained, target operation data of the target database operated under the target parameter value is obtained, and the target parameter value and the target operation data are used as a group of target construction samples; constructing a tree model based on the obtained at least one group of target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model; and adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively. According to the technical scheme provided by the embodiment of the invention, the target parameter value of the important parameter in at least one parameter is adjusted based on the parameter importance obtained by the constructed tree model, so that the automatic adjustment of the parameter of the target database can be realized, and the labor cost is reduced.
An optional technical scheme, according to a tree model, obtains parameter importance corresponding to at least one parameter respectively, including: determining a base index of each tree node in the tree model according to target parameter values of at least one parameter in at least one group of target construction samples; determining, for each of the at least one parameter, a target tree node from the tree nodes that splits according to the parameter; determining the change quantity of the base index of the target tree node based on the base index of each tree node; the parameter importance of the parameter is determined based on the change in the base index.
Where a tree node is understood to be a node in a tree model, in particular a node on a decision tree in a tree model. The target tree node may be understood as a tree node that splits according to parameters. The change amount of the base index can represent the importance degree of the parameters to the target tree node.
Illustratively, the determining the base index of each tree node in the tree model based on the target parameter values of the at least one parameter in the at least one set of target build samples, respectively, may be:
wherein,,is the base index of tree node q in the mth decision tree. C is the number of categories in at least one set of target build samples. />The proportion of category c in tree node q in the mth decision tree. />Is the proportion of category d in tree node q in the mth decision tree.
Determining, for each of the at least one parameter, a target tree node from the tree nodes that splits according to the parameter; based on the base index of each tree node, determining the base index variation of the target tree node, wherein the formula for determining the base index variation can be as follows:
Wherein,,dividing the change quantity of the base index before and after branching for the target tree node q according to the parameter i, and GINI q It can be understood that the base index, GINI, of the target tree node q o And GINI p Respectively representing the base index of at least two tree nodes after branching.
According to the change amount of the base-Ni index of the target tree node, the importance of the parameter in each decision tree in the tree model can be determined, and the formula for determining the importance of the parameter in each decision tree can be as follows:
wherein VR is in The importance of parameter i in the nth decision tree can be understood. M is a set of target tree nodes.
According to the importance of the parameters in each decision tree in the tree model, determining the importance of the parameters in the tree model, and the formula for determining the importance of the parameters in the tree model can be as follows:
wherein VR is i For the importance of parameter i in tree model, VR ij The importance of the parameter i in the j-th decision tree is given, and k is the number of decision trees in the tree model.
Normalizing the importance of the parameters in the tree model to obtain the parameter importance of the parameters, wherein the calculation formula of the parameter importance of the parameters is as follows:
wherein, VIM i Is the parameter importance of parameter i. a is the number of at least one parameter. VR (virtual reality) j Is the importance of parameter j in the tree model.
In the embodiment of the invention, the base index of each tree node in the tree model is respectively determined according to the target parameter value of at least one parameter in at least one group of target construction samples; determining, for each of the at least one parameter, a target tree node from the tree nodes that splits according to the parameter; determining the change quantity of the base index of the target tree node based on the base index of each tree node; the parameter importance of the parameter is determined based on the change in the base index. According to the scheme, the parameter importance of the parameter can be accurately determined.
Example two
Fig. 3 is a flowchart of another parameter adjustment method according to the second embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, adjusting the target parameter value of the important parameter in the at least one parameter based on the parameter importance corresponding to the at least one parameter, includes: sequencing at least one parameter based on the importance of the parameter corresponding to the at least one parameter, and determining the important parameter in the at least one parameter based on the sequencing result; the target parameter values of the important parameters are adjusted. Wherein, the explanation of the same or corresponding terms as the above embodiments is not repeated herein.
Referring to fig. 3, the method of this embodiment may specifically include the following steps:
s210, respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples.
S220, constructing a tree model based on the obtained at least one group of target construction samples, and obtaining the parameter importance corresponding to at least one parameter respectively according to the tree model.
S230, sorting the at least one parameter based on the importance of the parameter corresponding to the at least one parameter, and determining the important parameter in the at least one parameter based on the sorting result.
In the embodiment of the invention, at least one parameter can be ranked based on the parameter importance corresponding to the at least one parameter, for example, the at least one parameter can be ranked according to the order of the parameter importance from high to low, and based on the obtained ranking result, the important parameter in the at least one parameter is determined, for example, the parameter ranked in the preset number in the at least one parameter or the parameter in the number of the preset number proportion in the at least one parameter can be determined as the important parameter according to the ranking result; for example, the first ranked parameter of the at least one parameter can be determined as an important parameter according to the ranking result, so that the performance and stability of the target database can be improved only by adjusting a part of important parameters.
S240, adjusting the target parameter value of the important parameter.
According to the technical scheme, at least one parameter is sequenced based on the importance of the parameter corresponding to the at least one parameter, and important parameters in the at least one parameter are determined based on the sequencing result; the target parameter values of the important parameters are adjusted. In the embodiment of the invention, the important parameters can be determined by sequencing at least one parameter, and the target parameter values of the important parameters can be adjusted, so that the automatic adjustment of the parameters of the target database can be further realized, and the labor cost is reduced.
An optional technical solution, the number of the at least one parameter is at least two, and determining an important parameter in the at least one parameter based on the obtained sorting result includes: determining at least two important parameters of the at least two parameters based on the obtained sequencing result; the parameter adjustment method further comprises the following steps: obtaining an adjustment order of each of the at least two important parameters; adjusting the target parameter value of the important parameter, including: the target parameter values of at least two important parameters are sequentially adjusted based on the adjustment order.
In the embodiment of the present invention, in the case that the number of the at least one parameter is at least two, at least two important parameters of the at least two parameters may be determined based on the obtained sorting result; obtaining an adjustment order for each of the at least two important parameters, the adjustment order being indicative of an order in which the important parameters were adjusted in sequence; the target parameter values of at least two important parameters are sequentially adjusted based on the adjustment order, for example, the important parameters with higher adjustment order may be sequentially and preferentially adjusted. According to the scheme, under the condition that a plurality of parameters needing to be adjusted exist, more important parameters can be adjusted preferentially, so that the performance and stability of the target database can be improved as soon as possible.
Example III
Fig. 4 is a flowchart of another parameter adjustment method provided in the third embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the parameter adjustment method further includes: determining a similar database which is the same as or similar to the type of the target database, wherein at least one parameter of the similar database is the same as at least one parameter of the target database; respectively obtaining the same-class parameter value of at least one parameter of the same-class database, obtaining the same-class operation data of the same-class database operated under the same-class parameter value, and taking the same-class parameter value and the same-class operation data as a group of same-class construction samples; building a tree model based on the obtained at least one set of target building samples, comprising: and constructing a tree model based on the obtained at least one group of target construction samples and at least one group of similar construction samples. Wherein, the explanation of the same or corresponding terms as the above embodiments is not repeated herein.
Referring to fig. 4, the method of this embodiment may specifically include the following steps:
s310, respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples.
S320, determining the same kind of databases which are the same as or similar to the kind of the target database, wherein at least one parameter of the same kind of databases is the same as at least one parameter of the target database.
The similar database is understood to be a database which is the same as or similar to the type of the target database, and parameters, attributes, performances and the like of the similar database are less different from those of the target database, and at least one parameter of the similar database is the same as at least one parameter of the target database.
S330, obtaining the same-class parameter value of at least one parameter of the same-class database, obtaining the same-class operation data of the same-class database operated under the same-class parameter value, and taking the same-class parameter value and the same-class operation data as a group of same-class construction samples.
The homogeneous parameter value is understood to be a parameter value corresponding to a parameter of the homogeneous database. The same-class operation data may be understood as data which is obtained by operating the same-class database under the same-class parameter value and can represent the stability or performance of the same-class database, and in general, the dimension of the same-class operation data is the same as the dimension of the target operation data. The congeneric construction samples are understood to be samples obtained based on the congeneric parameter values and the congeneric operation data for constructing the resulting tree model. A tree model may be understood as a model of a tree structure or a model comprising a tree structure model.
In the embodiment of the invention, the same class parameter value of at least one parameter of the same class database is collected in advance, the same class operation data of the same class database operated under the same class parameter value is obtained, the data are stored, the same class parameter value of at least one parameter of the same class database can be directly and respectively obtained when the data are required to be used, the same class operation data of the same class database operated under the same class parameter value are obtained, and the same class parameter value and the same class operation data are used as a group of same class construction samples.
In the embodiment of the invention, before the similar parameter value and the similar operation data are used as a group of similar construction samples, and/or the target parameter value and the target operation data are used as a group of target construction samples, the similar parameter value and/or the target parameter value, and/or the similar operation data and/or the target operation data can be preprocessed, specifically, the similar parameter value and/or the target parameter value can be subjected to valued processing, the similar operation data and/or the target operation data can be subjected to standardized processing, and the similar parameter value and/or the target parameter value, and/or the similar operation data and/or the target operation data can be updated according to the processing result after preprocessing.
S340, constructing a tree model based on the obtained at least one group of target construction samples and at least one group of similar construction samples.
In the embodiment of the invention, at least one group of obtained target construction samples and at least one group of similar construction samples can be used as the samples for constructing the obtained tree model, and the tree model is constructed based on the at least one group of obtained target construction samples and the at least one group of similar construction samples.
S350, according to the tree model, obtaining the parameter importance corresponding to at least one parameter respectively.
S360, adjusting target parameter values of important parameters in at least one parameter based on the parameter importance corresponding to the at least one parameter.
According to the technical scheme, the similar databases with the same or similar types as the target database are determined, wherein at least one parameter of the similar databases is the same as at least one parameter of the target database; respectively obtaining the same-class parameter value of at least one parameter of the same-class database, obtaining the same-class operation data of the same-class database operated under the same-class parameter value, and taking the same-class parameter value and the same-class operation data as a group of same-class construction samples; and constructing a tree model based on the obtained at least one group of target construction samples and at least one group of similar construction samples. In the embodiment of the invention, the tree model is constructed based on at least one group of obtained target construction samples and at least one group of similar construction samples, so that the precision of the constructed tree model is higher, and correspondingly, the accuracy of the importance of the parameters corresponding to at least one parameter is higher.
An optional technical solution, obtaining target operation data of the target database operating under the target parameter value, includes: acquiring target operation data of a target database operated under a target parameter value and a target environment; obtaining the same-class operation data of the same-class database operated under the same-class parameter value comprises the following steps: and obtaining similar operation data of the similar database operated under the similar parameter values and similar environments, wherein the similar environments are the same as or similar to the target environment.
The target environment may be understood as an environment in which the target database operates, and the target environment may include a hardware environment and/or a workload environment, and in the embodiment of the present invention, the environment types included in the target environment are not specifically limited. A homogeneous environment may be understood as an environment in which a homogeneous database operates.
It can be understood that the difference of the database operating environments also affects the operation result of the database, so in the embodiment of the invention, the target operating data of the target database operating under the target parameter value and the target environment can be obtained; the method comprises the steps of obtaining similar operation data of a similar database operated under similar parameter values and similar environments which are the same as or similar to a target environment, so as to further improve the accuracy of the constructed tree model, and correspondingly, further improve the accuracy of the importance of the parameters corresponding to at least one parameter respectively.
On the basis of any of the above technical solutions, optionally, the tree model includes a random forest model, and/or the dimension of the target operation data includes at least one of a system processing capability, a throughput capability, and a delay.
In the embodiment of the present invention, the tree model may include a random forest model, and/or the dimension of the target operation data and/or the similar operation data includes at least one of a system processing capability, throughput capability and delay (Latency), where the system processing capability may be, for example, a transaction processing number (Transactions Per Second, TPS) transmitted Per Second, and the throughput capability may be, for example, a Query Per Second (QPS), so as to further make accuracy of obtaining importance of parameters corresponding to at least one parameter respectively higher.
For better understanding of the technical solution of the embodiment of the present invention described above, an alternative example is provided herein. For example, referring to fig. 5, the technical solution of the embodiment of the present invention may include three steps of data acquisition, data processing, and parameter ordering. Specifically, the sample acquisition may include acquiring a homogeneous parameter value of at least one parameter of a homogeneous database, and acquiring homogeneous operation data of the homogeneous database operating under a homogeneous parameter value and a homogeneous environment, respectively; and respectively acquiring the target parameter value of at least one parameter of the target database, and acquiring target operation data of the target database operated under the target parameter value and the target environment. The data processing may include preprocessing each of the obtained data, and obtaining at least one set of target building samples and at least one set of similar building samples according to the preprocessing result. The parameter sequencing can comprise constructing at least one group of obtained target construction samples and at least one group of similar construction samples to obtain a tree model, and obtaining the parameter importance corresponding to at least one parameter respectively according to the tree model; and adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively.
Example IV
Fig. 6 is a block diagram of a parameter adjustment apparatus according to a fourth embodiment of the present invention, which is configured to perform the parameter adjustment method according to any of the foregoing embodiments. The device and the parameter adjusting method of each embodiment belong to the same invention conception, and the details of the embodiment of the parameter adjusting device, which are not described in detail, can be referred to the embodiment of the parameter adjusting method. Referring to fig. 6, the apparatus may specifically include: the target build samples are used as a module 410, a parameter importance deriving module 420 and a target parameter value adjusting module 430.
The target construction samples are taken as a module 410, and are used for respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples;
the parameter importance obtaining module 420 is configured to construct a tree model based on the obtained at least one set of target construction samples, and obtain parameter importance corresponding to at least one parameter according to the tree model;
the target parameter value adjustment module 430 is configured to adjust a target parameter value of an important parameter in the at least one parameter based on the parameter importance corresponding to the at least one parameter.
Optionally, the target parameter value adjustment module 430 may include:
an important parameter determining unit, configured to sort at least one parameter based on the parameter importance corresponding to the at least one parameter, and determine an important parameter in the at least one parameter based on the obtained sorting result;
and the target parameter value adjusting unit is used for adjusting the target parameter value of the important parameter.
On the basis of the above-mentioned scheme, optionally, the number of the at least one parameter is at least two, and the important parameter determining unit may include:
an important parameter determining subunit, configured to determine at least two important parameters from the at least two parameters based on the obtained sorting result;
the parameter adjusting device may further include:
an adjustment order obtaining module for obtaining an adjustment order of each of the at least two important parameters;
the target parameter value adjustment unit may include:
and the target parameter value adjusting unit subunit is used for sequentially adjusting target parameter values of at least two important parameters based on the adjusting sequence.
Optionally, the parameter adjusting device may further include:
the homogeneous database determining module is used for determining homogeneous databases which are the same as or similar to the types of the target databases, wherein at least one parameter of the homogeneous databases is the same as at least one parameter of the target databases;
The same kind of construction sample is used as a module for respectively acquiring the same kind of parameter value of at least one parameter of the same kind of database, acquiring the same kind of operation data of the same kind of database operated under the same kind of parameter value, and taking the same kind of parameter value and the same kind of operation data as a group of same kind of construction samples;
the parameter importance obtaining module 420 may include:
the tree model building unit is used for building the tree model based on the obtained at least one group of target building samples and at least one group of similar building samples.
Based on the above scheme, optionally, the target building sample as the module 410 may include:
the target operation data acquisition unit is used for acquiring target operation data of the target database operated under the target parameter value and the target environment;
the same kind of construction sample is taken as a module, and can comprise:
the similar operation data acquisition unit is used for acquiring similar operation data of the similar database operating under the similar parameter values and similar environments, wherein the similar environments are the same as or similar to the target environment.
Optionally, the parameter importance obtaining module 420 may include:
the base index determining unit is used for determining the base index of each tree node in the tree model according to the target parameter value of at least one parameter in at least one group of target construction samples;
A target tree node determining unit configured to determine, for each of the at least one parameter, a target tree node that splits according to the parameter from among the tree nodes;
a base index change amount determining unit for determining the base index change amount of the target tree node based on the base index of each tree node;
and a parameter importance determining unit for determining the parameter importance of the parameter based on the change amount of the base index.
On the basis of the above scheme, optionally, the tree model includes a random forest model, and/or the dimension of the target operation data includes at least one of system processing capacity, throughput capacity, and delay.
According to the parameter adjusting device provided by the fourth embodiment of the invention, the target parameter value of at least one parameter of the target database is respectively obtained by taking the target construction sample as a module, the target operation data of the target database operated under the target parameter value is obtained, and the target parameter value and the target operation data are taken as a group of target construction samples; constructing a tree model based on the obtained at least one group of target construction samples by a parameter importance obtaining module, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model; and adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively through the target parameter value adjusting module. According to the device, the target parameter value of the important parameter in at least one parameter is adjusted based on the parameter importance obtained by the constructed tree model, so that the automatic adjustment of the parameter of the target database can be realized, and the labor cost is reduced.
The parameter adjusting device provided by the embodiment of the invention can execute the parameter adjusting method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
It should be noted that, in the above embodiment of the parameter adjustment device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Example five
Fig. 7 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively coupled to the at least one processor 11, wherein the memory stores computer programs executable by the at least one processor, and the processor 11 may perform various suitable actions and processes in accordance with the computer programs stored in the Read Only Memory (ROM) 12 or the computer programs loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the parameter adjustment method.
In some embodiments, the parameter adjustment method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the parameter adjustment method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the parameter adjustment method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Of communication networks examples include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of parameter adjustment, comprising:
respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples;
constructing a tree model based on at least one group of obtained target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model;
And adjusting the target parameter values of the important parameters in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively.
2. The method according to claim 1, wherein adjusting the target parameter value of the important parameter of the at least one parameter based on the parameter importance corresponding to the at least one parameter, respectively, comprises:
sorting the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively, and determining important parameters in the at least one parameter based on the sorting result;
and adjusting the target parameter value of the important parameter.
3. The method of claim 2, wherein the number of the at least one parameter is at least two, and wherein the determining an important parameter of the at least one parameter based on the resulting ranking result comprises:
determining at least two important parameters of the at least two parameters based on the obtained sequencing result;
the method further comprises the steps of:
obtaining an adjustment order for each of the at least two important parameters;
the adjusting the target parameter value of the important parameter includes:
And sequentially adjusting target parameter values of the at least two important parameters based on the adjustment order.
4. The method as recited in claim 1, further comprising:
determining a similar database which is the same as or similar to the type of the target database, wherein at least one parameter of the similar database is the same as at least one parameter of the target database;
respectively obtaining a homogeneous parameter value of at least one parameter of the homogeneous database, obtaining homogeneous operation data of the homogeneous database operated under the homogeneous parameter value, and taking the homogeneous parameter value and the homogeneous operation data as a group of homogeneous construction samples;
the constructing a tree model based on the obtained at least one group of target construction samples comprises the following steps:
and constructing a tree model based on the obtained at least one group of target construction samples and at least one group of similar construction samples.
5. The method of claim 4, wherein the obtaining target operational data for the target database to operate at the target parameter value comprises:
acquiring target operation data of the target database operated under the target parameter value and the target environment;
The obtaining the same-class operation data of the same-class database operating under the same-class parameter value comprises the following steps:
and obtaining similar operation data of the similar database operated under the similar parameter values and similar environments, wherein the similar environments are the same as or similar to the target environment.
6. The method according to claim 1, wherein obtaining the parameter importance corresponding to the at least one parameter according to the tree model includes:
determining a base index of each tree node in the tree model according to target parameter values of the at least one parameter in the at least one set of target construction samples;
determining, for each of the at least one parameter, a target tree node from the tree nodes that splits according to the parameter;
determining the change amount of the base index of the target tree node based on the base index of each tree node;
and determining the parameter importance of the parameter based on the change amount of the base index.
7. The method of any of claims 1-6, wherein the tree model comprises a random forest model and/or the dimension of the target operational data comprises at least one of system processing power, throughput power, and latency.
8. A parameter adjustment device, comprising:
the target construction sample is used as a module for respectively acquiring target parameter values of at least one parameter of a target database, acquiring target operation data of the target database operated under the target parameter values, and taking the target parameter values and the target operation data as a group of target construction samples;
the parameter importance obtaining module is used for constructing a tree model based on at least one group of obtained target construction samples, and obtaining parameter importance corresponding to at least one parameter respectively according to the tree model;
and the target parameter value adjusting module is used for adjusting the target parameter value of the important parameter in the at least one parameter based on the parameter importance corresponding to the at least one parameter respectively.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to cause the at least one processor to perform the parameter adjustment method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the parameter adjustment method according to any one of claims 1-7.
CN202310318789.4A 2023-03-29 2023-03-29 Parameter adjustment method and device, electronic equipment and storage medium Pending CN116450606A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310318789.4A CN116450606A (en) 2023-03-29 2023-03-29 Parameter adjustment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310318789.4A CN116450606A (en) 2023-03-29 2023-03-29 Parameter adjustment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116450606A true CN116450606A (en) 2023-07-18

Family

ID=87119452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310318789.4A Pending CN116450606A (en) 2023-03-29 2023-03-29 Parameter adjustment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116450606A (en)

Similar Documents

Publication Publication Date Title
CN114444619B (en) Sample generation method, training method, data processing method and electronic device
CN112434188A (en) Data integration method and device for heterogeneous database and storage medium
CN117762950B (en) Log data analysis processing method, device and medium based on tree structure
CN117555897A (en) Data query method, device, equipment and storage medium based on large model
CN114722048B (en) Data processing method and device, electronic equipment and storage medium
CN115564329A (en) Typical capacity scene determining method, device, equipment and storage medium
CN116450606A (en) Parameter adjustment method and device, electronic equipment and storage medium
CN113239054B (en) Information generation method and related device
CN115665783A (en) Abnormal index tracing method and device, electronic equipment and storage medium
CN115329748A (en) Log analysis method, device, equipment and storage medium
CN112887426B (en) Information stream pushing method and device, electronic equipment and storage medium
CN114896418A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN113722593A (en) Event data processing method and device, electronic equipment and medium
CN115511014B (en) Information matching method, device, equipment and storage medium
CN117131197B (en) Method, device, equipment and storage medium for processing demand category of bidding document
CN115858325B (en) Project log adjusting method, device, equipment and storage medium
CN112861034B (en) Method, device, equipment and storage medium for detecting information
CN114898060A (en) Method, apparatus, device, medium and product for processing data
CN118363940A (en) Database space optimization method and device, electronic equipment and storage medium
CN118312630A (en) Information processing method, information processing device, electronic equipment and storage medium
CN117633194A (en) Large model prompt data processing method and device, electronic equipment and storage medium
CN118467346A (en) Application risk assessment method and device, electronic equipment and storage medium
CN117009857A (en) Data screening method, device, equipment, storage medium and product
CN114942996A (en) Triple construction method and device of vertical industry data, electronic equipment and medium
CN115510140A (en) Data extraction method, device, equipment and storage medium

Legal Events

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