CN114816955A - Database performance prediction method and device - Google Patents

Database performance prediction method and device Download PDF

Info

Publication number
CN114816955A
CN114816955A CN202210430062.0A CN202210430062A CN114816955A CN 114816955 A CN114816955 A CN 114816955A CN 202210430062 A CN202210430062 A CN 202210430062A CN 114816955 A CN114816955 A CN 114816955A
Authority
CN
China
Prior art keywords
performance
database
distribution function
performance index
prediction
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
CN202210430062.0A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210430062.0A priority Critical patent/CN114816955A/en
Publication of CN114816955A publication Critical patent/CN114816955A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3447Performance evaluation by modeling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Abstract

The disclosure provides a database performance prediction method, which can be applied to the technical field of financial science and technology. The database performance prediction method comprises the following steps: collecting historical data of a plurality of performance indexes of a database; calculating a marginal distribution function of each performance index and a joint distribution function among the performance indexes based on historical data of each performance index; performing multiple predictions based on the marginal distribution function of each performance index and the joint distribution function among the performance indexes, wherein each prediction obtains a predicted value of the overall performance index of the database; and judging whether the database fails according to the plurality of predicted values of the overall performance indexes of the plurality of databases, and sending out failure early warning when the database fails. The present disclosure also provides a database performance prediction apparatus, a device, a storage medium, and a program product.

Description

Database performance prediction method and device
Technical Field
The present disclosure relates to the field of financial technology, and more particularly to the field of database technology, and more particularly to a method, apparatus, device, medium, and program product for database performance prediction.
Background
With the expansion of the financial science and technology industry and the internet in each business field, a database is used as a core system, and because of the close correlation with business logic, the database generally relates to a plurality of links and layers such as a system layer, development, application and the like, and has a pain point of difficult operation and maintenance management.
The existing database management operation and maintenance mode mainly comprises the steps that database operation and maintenance personnel carry out real-time monitoring and regular health check on a database system. Although some third-party tools or database management platforms exist currently, only an alarm can be given when a database failure occurs or the performance of the database reaches a bottleneck, and prediction cannot be made. And because the database system relates to a plurality of layers and ranges, when the database fault is found or the performance of the database reaches the bottleneck, developers and application support personnel need to coordinate and communicate in multiple ways, and the problem can be further processed after the problem is determined, so that the emergency processing speed of the database is greatly slowed down.
Therefore, how to predict the performance trend in advance, and to make preventive treatment measures in a targeted manner, so as to further improve the high availability of the database is a problem to be solved and optimized, and is also a key and target for realizing intelligent operation and maintenance.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a database performance prediction method, apparatus, device, medium, and program product.
According to a first aspect of the present disclosure, there is provided a database performance prediction method, including: collecting historical data of a plurality of performance indexes of a database; calculating a marginal distribution function of each performance index and a joint distribution function among the performance indexes based on historical data of each performance index; performing multiple predictions based on the marginal distribution function of each performance index and the joint distribution function among the performance indexes, wherein each prediction obtains a predicted value of the overall performance index of the database; and judging whether the database fails according to the plurality of predicted values, and sending out a failure early warning when the database fails.
Optionally, the calculating a marginal distribution function of each performance index and a joint distribution function between each performance index based on historical data of each performance index includes: respectively constructing marginal distribution functions of the performance indexes based on a POT model based on historical data of the performance indexes; and constructing a joint distribution function based on a Copula model among the performance indexes based on the marginal distribution function of each performance index.
Optionally, performing multiple predictions based on the marginal distribution function of each performance index and the joint distribution function between the performance indexes, where each prediction obtains a predicted value of the overall performance index of the database, and the method includes: generating a random number sequence obeying the joint distribution function, wherein the number of the random numbers in the random number sequence is the same as the number of the performance indicators; obtaining each performance index predicted value according to each random number in the random number sequence and the corresponding marginal distribution function of the performance index; setting the weight of each performance index, wherein the sum of the weights of the performance indexes is 1; accumulating the products of each performance index predicted value and the corresponding weight to obtain the predicted value of the overall performance index; and repeating the steps for multiple times to obtain a plurality of predicted values of the overall performance indexes.
Optionally, judging whether the database fails according to the plurality of predicted values, and when the database fails, sending a failure early warning, including: setting a confidence level; calculating a fault value at the confidence level based on predicted values of a plurality of the overall performance indicators; and when the fault value exceeds a preset threshold value, sending out a fault early warning.
Optionally, the method further comprises: and predicting the operation trend of the overall performance index based on the predicted values of the overall performance indexes.
Optionally, collecting historical data of a plurality of performance indicators of the database comprises: determining a plurality of said performance indicators that affect the overall performance of said database; and sampling the historical data of each performance index at intervals of preset time.
A second aspect of the present disclosure provides a database performance prediction apparatus, including: an apparatus for database performance prediction, comprising: the data collection module is used for collecting historical data of a plurality of performance indexes of the database; the distribution function calculation module is used for calculating the marginal distribution function of each performance index and the joint distribution function among the performance indexes based on the historical data of each performance index; the overall performance prediction module is used for predicting for multiple times based on the marginal distribution function of each performance index and the joint distribution function among the performance indexes, and a predicted value of the overall performance index of the database is obtained through each prediction; and the fault early warning module is used for judging whether the database has a fault according to the plurality of predicted values and sending out fault early warning when the database has the fault.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the database performance prediction method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described database performance prediction method.
The fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described database performance prediction method.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a database performance prediction method, apparatus, device, medium and program product according to an embodiment of the disclosure;
FIG. 2 schematically illustrates a flow diagram of a database performance prediction method according to an embodiment of the present disclosure;
fig. 3 schematically shows a flow chart of a POT model building method according to an embodiment of the present disclosure;
FIG. 4 schematically shows a flowchart of a Copula model building method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of a method of multiple predictor computation of overall performance indicators for a database according to an embodiment of the present disclosure;
FIG. 6 is a block diagram schematically illustrating a structure of a database performance prediction apparatus according to an embodiment of the present disclosure; and
FIG. 7 schematically illustrates a block diagram of an electronic device suitable for implementing a database performance prediction method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a database performance prediction method, which collects historical data of a plurality of performance indexes of a database; calculating a marginal distribution function of each performance index and a joint distribution function among the performance indexes based on historical data of each performance index; performing multiple predictions based on the marginal distribution function of each performance index and the joint distribution function among the performance indexes, wherein each prediction obtains a predicted value of the overall performance index of the database; and judging whether the database fails according to the plurality of predicted values, and sending out failure early warning when the database fails.
Fig. 1 schematically shows an application scenario of a database performance prediction apparatus according to an embodiment of the present disclosure.
As shown in fig. 1, network 104 is the medium used to provide communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as database applications like MySQL, may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for database applications browsed by users using the terminal devices 101, 102, 103. The background management server can analyze and process the received data such as the user request and feed back the processing result to the terminal equipment.
It should be noted that the database performance prediction method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the database performance prediction apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The database performance prediction method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the database performance prediction apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the method and apparatus for database performance prediction of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field.
The database performance prediction method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 5 based on the scenario described in fig. 1.
FIG. 2 schematically shows a flow diagram of a database performance prediction method according to an embodiment of the disclosure.
As shown in fig. 2, the database performance prediction method of this embodiment includes operations S210 to S250.
In operation S210, historical data of a plurality of performance indicators of a database is collected.
In operation S220, a marginal distribution function of each performance index and a joint distribution function between each performance index are calculated based on historical data of each performance index.
In operation S230, multiple predictions are performed based on the marginal distribution function of each performance index and the joint distribution function between the performance indexes, and each prediction obtains a predicted value of the overall performance index of the database.
In operation S240, whether the database is failed is determined according to the plurality of predicted values, and when the database fails, a failure warning is issued.
According to an embodiment of the present disclosure, operation S210 includes: determining a plurality of performance indicators that affect the overall performance of the database; and sampling historical data of each performance index at intervals of preset time. The multiple performance indexes affecting the overall performance of the database may be common performance indexes of the database, such as CPU utilization, memory utilization, database connection number, and network IO.
According to the embodiment of the present disclosure, in operation S210, the method further includes: and analyzing all collected performance indexes in real time, and sending alarm information when certain performance index data is abnormal.
According to an embodiment of the present disclosure, operation S220 includes: respectively training a POT model of each performance index based on historical data of each performance index, and taking the well-trained POT model as a marginal distribution function; and training Copula models among the performance indexes based on the marginal distribution function of each performance index, and taking the trained Copula models as a joint distribution function.
According to the embodiment of the disclosure, the database operation is greatly influenced and lost due to the occurrence of extreme events. So to avoid such situations, a generalized pareto distribution model in extremum theory is used to model the extreme cases that exist. For low-frequency and high-loss events, a POT model in an extreme value theory is generally selected to be used for describing the low-frequency and high-loss events.
According to the embodiment of the disclosure, a specific process of establishing the POT model corresponding to the individual performance index is shown in fig. 3. The POT model establishing method of the embodiment of the disclosure includes operation S310 to operation S330.
In operation S310, a POT model of individual performance indicators is constructed.
According to an embodiment of the present disclosure, assume that the individual performance index is X i Then the historical data of the performance index is represented as X i =(x 1 ,x 2 ,x 3 ,…x n ) Wherein X is i To obey the independently distributed random variable sequences of the distribution function f (x), i is any positive integer. From (x) 1 ,x 2 ,x 3 ,…x n ) A sufficiently large random variable is selected as the threshold value μ. Let Y i =X i μ, then Y i Extreme statistics for exceeding a threshold, i.e. excess, due toThis definition F u (y) is the conditional distribution function of the excess:
F u (y)=P(X-u≤y∣X>u),y≥0; (1)
according to the conditional probability formula, can obtain
Figure BDA0003609834900000071
The distribution function f (x) is thus obtained as:
F(x)=F u (y)(1-F(u))+F(u); (3)
when μ is sufficiently large, F u (y) can be approximated by a generalized pareto distribution, i.e.:
Figure BDA0003609834900000072
where ξ is the shape parameter and σ is the scale parameter. When xi is more than or equal to 0, the generalized pareto distribution presents a thick tail characteristic; when ξ is <0, the generalized pareto distribution exhibits a short tail feature.
As can be seen from equation (4), when the random variable sequence X is known i In the case of (2), F is to be calculated u (y), threshold μ, shape parameter ξ and scale parameter σ need to be determined.
In operation S320, a threshold value of the POT model is determined.
According to the disclosed embodiment, selecting the threshold μ is a crucial step, because if the threshold μ is selected too large, it will cause an excess amount Y i Too little data volume of (c); conversely, if the threshold μ is chosen too small, F cannot be guaranteed u (y) convergence. The estimation method of the estimation threshold μmay be a Hill map method and an average excess map method.
In operation S330, shape parameters and scale parameters of the POT model are determined.
According to the embodiment of the present disclosure, in the case where the threshold μ is determined, there are various ways that the shape parameter ξ and the scale parameter σ in the POT function may be estimated, such as a maximum likelihood estimation method, a moment estimation method, a probability weight estimation method, and the like. The maximum likelihood estimation method will be described as an example.
The above equation (4) is derived to obtain a probability density function as:
Figure BDA0003609834900000081
then its corresponding log-likelihood function is:
Figure BDA0003609834900000082
the maximum value is calculated for the likelihood function, and then the estimated values of the shape parameter xi and the scale parameter sigma can be obtained.
And (5) bringing the threshold, the shape parameter and the scale parameter obtained by solving back to the POT model. The performance index X obtained by taking the obtained threshold value mu, the shape parameter xi and the scale parameter sigma into formula (4) i F of u And (y), obtaining the marginal distribution function.
Because there is a correlation between the various performance indicators of the database, which is not simply an aggregate. Therefore, in order to describe the relationship of the performance indexes which are mutually related, the Copula model can be used for well revealing the relationship.
According to the embodiment of the present disclosure, a specific process of establishing a Copula model among the performance indexes is shown in fig. 4. The method for establishing the Copula model in the embodiment of the disclosure includes operation S410 to operation S420.
In operation S410, a Copula model between the respective performance indexes is constructed.
The Copula model is constructed based on the Sklar theorem to construct a joint distribution function, and the related theorem and formula content are described as follows:
the basic idea of the Copula model is to combine the variable X 1 ,X 2 ,…X m Of (2) a joint distribution function F (X) 1 ,X 2 ,…X m ) Using their edge distribution function F 1 (X 1 ),F 2 (X 2 ),…F m (X m ) To express, namely:
F(X 1 ,X 2 ,…X m )=C[F 1 (X 1 ),F 2 (X 2 ),…F m (X m )]; (7)
the function C is referred to herein as the marginal distribution function F 1 (X 1 ),F 2 (X 2 ),…F m (X m ) Copula model of (1).
In operation S420, parameters of the Copula model are determined.
According to the embodiment of the disclosure, after the Copula model is constructed, parameters of the Copula model need to be estimated. There are various ways to estimate parameters in Copula model, such as one-step maximum likelihood estimation, pseudo maximum likelihood estimation, two-step maximum likelihood estimation, non-parametric estimation, etc., where the two-step maximum likelihood estimation is taken as an example.
The two-order maximum likelihood segment estimation method is to be the unknown parameter theta of each edge distribution function i And unknown parameter θ of the Copula's model c Two steps of estimation are divided, namely:
the first step is as follows:
Figure BDA0003609834900000091
Figure BDA0003609834900000092
Figure BDA0003609834900000093
the second step is that:
Figure BDA0003609834900000094
according to the embodiment of the disclosure, the constructed Copula model can be verified based on a K-S inspection method and a Q-Q graph method. And when the verification result is good, taking the constructed Copula model as a joint distribution function among all the performance indexes of the method.
According to the embodiment of the present disclosure, as shown in fig. 5, operation S230 includes operations S231 to S235.
Operation S231 generates a random number sequence obeying the joint distribution function, wherein the number of random numbers in the random number sequence is the same as the number of performance indicators. For example, each performance index is X 1 ,X 2 ,X 3 ,…X m Then generate a pseudo-random number sequence of a 1 ,a 2 ,…,a m Wherein the pseudo-random number sequence a 1 ,a 2 ,…,a m Obey not only the joint distribution function established by the present disclosure, but also obey (0, 1) uniform distribution.
Operation S232, obtaining predicted values of the performance indexes according to the marginal distribution function of each random number and the corresponding performance index in the random number sequence. Assuming that the marginal distribution function of each index is F 1 (X 1 ),F 2 (X 2 ),…F m (X m ) Let a 1 =F 1 (X 1 ),a 2 =F 2 (X 2 ),…a m =F m (X m ) To solve the predicted value of each performance index
Figure BDA0003609834900000101
i is an integer of 1 to m.
In operation S233, weights of the respective performance indexes are set, where the sum of the weights of the respective performance indexes is 1. Assume that each performance indicator is weighted by w i And is and
Figure BDA0003609834900000102
operation S234 accumulates the product of each performance index prediction value and the corresponding weight to obtain a prediction value of the overall performance index. The overall performance index prediction value is expressed by the formula
Figure BDA0003609834900000103
Figure BDA0003609834900000104
Operation S235 is performed to repeat the above steps for multiple times to obtain predicted values of multiple overall performance indicators. Operations S231 through S234 are repeated a plurality of times, and the value of the random number sequence is changed every time it is repeated, thereby obtaining a plurality of possibilities of predicted values. The number of repetitions may be 1000 or more.
According to an embodiment of the present disclosure, operation S240 includes: setting a confidence level; calculating a fault value under a confidence level according to the predicted values of the plurality of overall performance indexes; and when the fault value exceeds a preset threshold value, sending out a fault early warning. The confidence level refers to the probability that all predicted values fall within a certain zone. Assuming a confidence level of 95%, the overall indicator fault value VAR is obtained using the formula P (z < VAR) ═ 5%.
The method for predicting the performance of the database further comprises the following steps: and predicting the operation trend curve of the overall performance index based on the predicted values of the overall performance indexes.
According to the embodiment of the disclosure, the change trend of the overall performance of the database is predicted according to the following Prophet time series model, and the functional formula of the trend curve is as follows:
y(t)=g(t)+f(t)+h(t)+ε t ; (12)
wherein t is time, g (t) represents a trend function capable of simulating aperiodic variation of a time series, f (t) represents periodic variation (such as daily, weekly), h (t) represents aperiodic influence, epsilon t The last term is only an error term. By fitting these three terms, they are finally added up to get the trend of the overall performance operation of the database.
According to the method, the relevant relation among all the performance indexes is obtained through the copula function by the POT model for obtaining the edge distribution function of all the commonly used performance indexes of the database, finally, the overall performance of the database can be predicted, the trend change of a period of time in the future, such as three days or one week in the future, can be predicted, operation and maintenance personnel can be helped to deal and deploy as early as possible, resource allocation is adjusted, the operation and maintenance cost is effectively saved, and the emergency time is shortened.
Based on the database performance prediction method, the disclosure also provides a database performance prediction device. The apparatus will be described in detail below with reference to fig. 6.
As shown in fig. 6, the database performance prediction apparatus 600 of this embodiment includes a data collection module 610, a distribution function calculation module 620, an overall performance prediction module 630, and a failure early warning module 640.
The data collection module 610 is configured to collect historical data of a plurality of performance indicators of the database. In an embodiment, the data collection module 610 may be configured to perform the operation S210 described above, which is not described herein again.
The distribution function calculating module 620 is configured to calculate a marginal distribution function of each of the performance indicators and a joint distribution function between the performance indicators based on historical data of each of the performance indicators. In an embodiment, the distribution function calculating module 620 may be configured to perform the operation S220 described above, which is not described herein again.
The overall performance prediction module 630 is configured to obtain predicted values of a plurality of overall performance indicators of the database based on the marginal distribution function of each performance indicator and the joint distribution function between the performance indicators. In an embodiment, the overall performance prediction module 630 may be configured to perform the operation S230 described above, which is not described herein again.
And the fault early warning module 640 is used for sending out fault early warning when the predicted value meets a preset condition. In an embodiment, the fault pre-warning module 640 may be configured to perform the operation S240 described above, which is not described herein again.
According to the embodiment of the present disclosure, any plurality of the data collection module 610, the distribution function calculation module 620, the overall performance prediction module 630, and the fault pre-warning module 640 may be combined into one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the data collection module 610, the distribution function calculation module 620, the overall performance prediction module 630, and the failure early warning module 640 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or implemented by a suitable combination of any of them. Alternatively, at least one of the data collection module 610, the distribution function calculation module 620, the overall performance prediction module 630, and the failure warning module 640 may be implemented at least in part as a computer program module that, when executed, may perform a corresponding function.
FIG. 7 schematically illustrates a block diagram of an electronic device suitable for implementing a database performance prediction method according to an embodiment of the present disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. Note that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 700 may also include input/output (I/O) interface 705, which input/output (I/O) interface 705 is also connected to bus 704, according to an embodiment of the present disclosure. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement a method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the item recommendation method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 701. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments of the present disclosure and/or the claims may be made without departing from the spirit and teachings of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method for database performance prediction, comprising:
collecting historical data of a plurality of performance indexes of a database;
calculating a marginal distribution function of each performance index and a joint distribution function among the performance indexes based on historical data of each performance index;
performing multiple predictions based on the marginal distribution function of each performance index and the joint distribution function among the performance indexes, wherein each prediction obtains a predicted value of the overall performance index of the database;
and judging whether the database fails according to the plurality of predicted values, and sending out a failure early warning when the database fails.
2. The method of database performance prediction according to claim 1, wherein the calculating the marginal distribution function of each performance index and the joint distribution function between each performance index based on the historical data of each performance index comprises:
respectively training a POT model of each performance index based on historical data of each performance index, and taking the well-trained POT model as a marginal distribution function;
and training Copula models among the performance indexes based on the marginal distribution function of each performance index, and taking the trained Copula models as a joint distribution function.
3. The method according to claim 1, wherein the performing multiple predictions based on the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator, each prediction obtaining a predicted value of the overall performance indicator of the database, comprises:
generating a random number sequence obeying the joint distribution function, wherein the number of the random numbers in the random number sequence is the same as the number of the performance indicators;
obtaining each performance index predicted value according to each random number in the random number sequence and the corresponding marginal distribution function of the performance index;
setting the weight of each performance index, wherein the sum of the weights of the performance indexes is 1;
accumulating the products of each performance index predicted value and the corresponding weight to obtain the predicted value of the overall performance index;
and repeating the steps for multiple times to obtain multiple predicted values of the overall performance index.
4. The method for predicting the performance of the database according to claim 1, wherein the step of judging whether the database fails according to the plurality of predicted values and issuing a failure warning when the database fails comprises the steps of:
setting a confidence level;
calculating a fault value at the confidence level based on a plurality of predicted values of the overall performance indicator;
and when the fault value exceeds a preset threshold value, sending out a fault early warning.
5. The method of database performance prediction according to claim 1, further comprising:
and predicting the operation trend curve of the overall performance index based on the predicted values of the overall performance indexes.
6. The method of database performance prediction according to claim 1, wherein the collecting historical data of a plurality of performance indicators of the database comprises:
determining a plurality of said performance indicators that affect the overall performance of said database;
and sampling the historical data of each performance index at intervals of preset time.
7. An apparatus for database performance prediction, comprising:
the data collection module is used for collecting historical data of a plurality of performance indexes of the database;
the distribution function calculation module is used for calculating the marginal distribution function of each performance index and the joint distribution function among the performance indexes based on the historical data of each performance index;
the overall performance prediction module is used for predicting for multiple times based on the marginal distribution function of each performance index and the joint distribution function among the performance indexes, and a predicted value of the overall performance index of the database is obtained through each prediction;
and the fault early warning module is used for judging whether the database has a fault according to the plurality of predicted values and sending out fault early warning when the database has the fault.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 6.
CN202210430062.0A 2022-04-22 2022-04-22 Database performance prediction method and device Pending CN114816955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210430062.0A CN114816955A (en) 2022-04-22 2022-04-22 Database performance prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210430062.0A CN114816955A (en) 2022-04-22 2022-04-22 Database performance prediction method and device

Publications (1)

Publication Number Publication Date
CN114816955A true CN114816955A (en) 2022-07-29

Family

ID=82505080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210430062.0A Pending CN114816955A (en) 2022-04-22 2022-04-22 Database performance prediction method and device

Country Status (1)

Country Link
CN (1) CN114816955A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251351A (en) * 2023-11-10 2023-12-19 支付宝(杭州)信息技术有限公司 Database performance prediction method and related equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251351A (en) * 2023-11-10 2023-12-19 支付宝(杭州)信息技术有限公司 Database performance prediction method and related equipment
CN117251351B (en) * 2023-11-10 2024-04-05 支付宝(杭州)信息技术有限公司 Database performance prediction method and related equipment

Similar Documents

Publication Publication Date Title
CN113037877B (en) Optimization method for time-space data and resource scheduling under cloud edge architecture
CN104516784A (en) Method and system for forecasting task resource waiting time
CN110766185A (en) User quantity determination method and system, and computer system
CN110766184A (en) Order quantity prediction method and device
CN115174353B (en) Fault root cause determining method, device, equipment and medium
CN114461434A (en) Fault root cause analysis method, device, electronic equipment and medium
CN114816955A (en) Database performance prediction method and device
CN113378498B (en) Task allocation method and device
US20090217282A1 (en) Predicting cpu availability for short to medium time frames on time shared systems
CN113076224A (en) Data backup method, data backup system, electronic device and readable storage medium
CN112230663A (en) Vehicle positioning data monitoring method and device
CN111881469A (en) Data processing method and device
US11651271B1 (en) Artificial intelligence system incorporating automatic model updates based on change point detection using likelihood ratios
CN115983759A (en) Method and device for predicting demand quantity of goods, electronic equipment and storage medium
US11636377B1 (en) Artificial intelligence system incorporating automatic model updates based on change point detection using time series decomposing and clustering
WO2022218068A1 (en) Material delivery method and apparatus, and device and medium
CN115220131A (en) Meteorological data quality inspection method and system
CN110782063B (en) Regional congestion degree prediction method and device
CN113052509A (en) Model evaluation method, model evaluation apparatus, electronic device, and storage medium
CN112131468A (en) Data processing method and device in recommendation system
CN114710397B (en) Service link fault root cause positioning method and device, electronic equipment and medium
CN113691311B (en) Fault positioning method of optical network, electronic equipment and computer readable storage medium
CN111796995B (en) Integrated learning-based cyclic serial number usage early warning method and system
CN117130873B (en) Task monitoring method and device
CN111709787B (en) Method, device, electronic equipment and medium for generating user retention time

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