Database performance prediction method and device
By calculating the distribution function of database performance indicators, multiple predictions are made, and whether the database will fail and issue early warnings are issued, solving the problem of difficulty in predicting database performance trends in the existing technology, and improving the high availability and operation and maintenance efficiency of the database.
Patent Information
- Application Number
- CN202210430062.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The existing database management operation and maintenance model is difficult to predict performance trends in advance, resulting in slow database failure processing speed and inability to implement targeted prevention and treatment measures, affecting the high availability of databases.
By collecting historical data of multiple performance indicators of the database, calculating the marginal distribution function and the joint distribution function, making multiple predictions to determine whether the database will fail, and issuing a fault warning.
It realizes prediction of database performance, discovers potential faults in advance, and issues warnings in a timely manner, improving the high availability and operation and maintenance efficiency of the database.
Smart Images

Figure CN114816955B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of financial technology, specifically to the field of database technology, and more specifically to a method, device, equipment, medium and program product for predicting database performance. Background Art
[0002] With the Internet expansion of the financial technology industry and various business fields, the database, as a core system, is closely related to the business logic. It usually involves multiple links and levels such as system layer, development, application, etc., and has the pain point of difficult operation and maintenance management.
[0003] The existing database management and operation mode mainly relies on database operation and maintenance personnel to monitor the database system in real time and conduct regular health checks. Although there are some third-party tools or database management platforms, they can only issue alarms when database failures occur or database performance reaches a bottleneck, and cannot make predictions. In addition, since the database system involves multiple levels and scopes, when a database failure is found or database performance reaches a bottleneck, developers and application support personnel need to coordinate and communicate with each other to identify the problem before further processing, which greatly slows down the speed of emergency handling of the database.
[0004] Therefore, how to predict performance trends in advance, arrange preventive measures in a targeted manner, and further improve the high availability of the database is an issue that needs to be solved and optimized, and is also the key and goal to achieving intelligent operation and maintenance. Summary of the invention
[0005] In view of the above problems, the present disclosure provides a database performance prediction method, apparatus, device, medium and program product.
[0006] According to a first aspect of the present disclosure, a method for predicting database performance is provided, comprising: collecting historical data of multiple performance indicators of a database; calculating the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator based on the historical data of each performance indicator; performing multiple predictions based on the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator, and obtaining a predicted value of the overall performance indicator of the database for each prediction; judging whether the database fails based on the multiple predicted values, and issuing a fault warning when the database fails.
[0007] Optionally, the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator are calculated based on the historical data of each performance indicator, including: constructing the marginal distribution function of each performance indicator based on the POT model based on the historical data of each performance indicator; constructing the joint distribution function between each performance indicator based on the Copula model based on the marginal distribution function of each performance indicator.
[0008] Optionally, multiple predictions are performed based on the marginal distribution function of each of the performance indicators and the joint distribution function between each of the performance indicators, and each prediction obtains a predicted value of the overall performance indicator of the database, including: generating a random number sequence that obeys 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 the predicted value of each performance indicator according to the marginal distribution function of each of the random numbers in the random number sequence and the corresponding performance indicator; setting the weight of each performance indicator, wherein the sum of the weights of each performance indicator is 1; accumulating the product of each performance indicator predicted value and the corresponding weight to obtain the predicted value of the overall performance indicator; repeating the above steps multiple times to obtain multiple predicted values of the overall performance indicators.
[0009] Optionally, judging whether the database fails based on the multiple predicted values, and issuing a fault warning when the database fails, includes: setting a confidence level; calculating the fault value at the confidence level based on the predicted values of the multiple overall performance indicators; and issuing a fault warning when the fault value exceeds a predetermined threshold.
[0010] Optionally, the method further includes: predicting the operating trend of the overall performance indicator based on the predicted values of the plurality of overall performance indicators.
[0011] Optionally, collecting historical data of multiple performance indicators of the database includes: determining multiple performance indicators that affect the overall performance of the database; and sampling the historical data of each performance indicator at predetermined time intervals.
[0012] The second aspect of the present disclosure provides a database performance prediction device, including: a database performance prediction device, including: a data collection module, used to collect historical data of multiple performance indicators of the database; a distribution function calculation module, used to calculate the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator based on the historical data of each performance indicator; an overall performance prediction module, used to perform 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; a fault warning module, used to determine whether the database fails based on the multiple predicted values, and issue a fault warning when the database fails.
[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned database performance prediction method.
[0014] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned database performance prediction method.
[0015] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned database performance prediction method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 A diagram schematically illustrates an application scenario of a database performance prediction method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0018] Figure 2 A flowchart of a database performance prediction method according to an embodiment of the present disclosure is schematically shown;
[0019] Figure 3 A flowchart of a POT model establishment method according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 4 A flowchart of a Copula model establishment method according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 5A flowchart schematically shows a method for calculating multiple predicted values of overall performance indicators of a database according to an embodiment of the present disclosure;
[0022] Figure 6 A schematic diagram showing a structure of a database performance prediction device according to an embodiment of the present disclosure; and
[0023] Figure 7 A block diagram of an electronic device suitable for implementing a database performance prediction method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0028] The embodiments of the present disclosure provide a database performance prediction method, which collects historical data of multiple performance indicators of a database; based on the historical data of each performance indicator, calculates the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator; based on the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator, performs multiple predictions, and obtains a predicted value of the overall performance indicator of the database each time; determines whether a database fault occurs based on multiple predicted values, and issues a fault warning when the database fails.
[0029] Figure 1 The application scenario diagram of the database performance prediction device according to the embodiment of the present disclosure is schematically shown.
[0030] like Figure 1 As shown, the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0031] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications, such as database applications such as MySQL, can be installed on terminal devices 101, 102, 103.
[0032] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0033] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for database applications browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received user request data, and feed back the processing results to the terminal device.
[0034] It should be noted that the database performance prediction method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the database performance prediction device provided in the embodiment of the present disclosure can generally be set in the server 105. The database performance prediction method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the database performance prediction device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0035] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0036] It should be noted that the method and device for predicting database performance disclosed in the present invention can be used in the financial field, and can also be used in any field other than the financial field. The present invention does not limit the application field of the method and device for predicting database performance.
[0037] The following will be based on Figure 1 The scene described by Figure 2 to Figure 5 The database performance prediction method of the disclosed embodiment is described in detail.
[0038] Figure 2 The flowchart of the database performance prediction method according to the embodiment of the present disclosure is schematically shown.
[0039] like Figure 2 As shown, the database performance prediction method of this embodiment includes operations S210 to S250.
[0040] In operation S210, historical data of a plurality of performance indicators of a database is collected.
[0041] In operation S220 , based on the historical data of each performance indicator, a marginal distribution function of each performance indicator and a joint distribution function between each performance indicator are calculated.
[0042] In operation S230, multiple predictions are performed based on the marginal distribution functions of the various performance indicators and the joint distribution functions between the various performance indicators, and each prediction obtains a predicted value of the overall performance indicator of the database.
[0043] In operation S240, it is determined whether a database failure occurs according to the plurality of prediction values, and when the database fails, a failure warning is issued.
[0044] According to an embodiment of the present disclosure, operation S210 includes: determining multiple performance indicators that affect the overall performance of the database; sampling historical data of each performance indicator at predetermined time intervals. The multiple performance indicators that affect the overall performance of the database may be commonly used performance indicators of the database, such as CPU usage, memory usage, number of database connections, network IO, etc.
[0045] According to an embodiment of the present disclosure, operation S210 also includes: performing real-time analysis on each performance indicator that has been collected, and issuing an alarm message when data of one of the performance indicators is abnormal.
[0046] According to an embodiment of the present disclosure, operation S220 includes: training a POT model for each of the performance indicators based on the historical data of each of the performance indicators, and using the trained POT model as a marginal distribution function; training a Copula model between each of the performance indicators based on the marginal distribution function of each of the performance indicators, and using the trained Copula model as a joint distribution function.
[0047] According to the embodiment of the present disclosure, the occurrence of extreme events has a huge impact and loss on the operation of the database. Therefore, in order to avoid such situations, the generalized Pareto distribution model in extreme value theory is used to model the existing extreme situations. For low-frequency and high-loss events, the POT model in extreme value theory is generally used to characterize them.
[0048] According to the embodiment of the present disclosure, the specific establishment process of the POT model corresponding to the individual performance indicators is as follows: Figure 3 The method for establishing a POT model according to the embodiment of the present disclosure includes operations S310 to S330.
[0049] In operation S310, a POT model of a separate performance indicator is constructed.
[0050] According to the embodiment of the present disclosure, assuming that the individual performance index is X i , then the historical data of the performance indicator is expressed as X i =(x1,x2,x3,…x n ), where X i is a sequence of independently distributed random variables that obey the distribution function F(x), i is an arbitrary positive integer. n ) is selected as the threshold μ. Let Y i =X i -μ, then Y i is the extreme statistic that exceeds the threshold, that is, the excess, so define F u (y) is the conditional distribution function of the excess:
[0051] F u (y)=P(Xu≤y∣X>u),y≥0; (1)
[0052] According to the conditional probability formula, we can get
[0053]
[0054] So the distribution function F(x) is:
[0055] F(x)=F u (y)(1-F(u))+F(u); (3)
[0056] When μ is large enough, F u (y) can be approximated by the generalized Pareto distribution, that is:
[0057]
[0058] Where ξ is the shape parameter and σ is the scale parameter. When ξ≥0, the generalized Pareto distribution exhibits a thick-tailed characteristic; when ξ<0, the generalized Pareto distribution exhibits a short-tailed characteristic.
[0059] According to formula (4), we can know that when the random variable sequence X is known i In the case of u (y), it is necessary to determine the threshold μ, shape parameter ξ and scale parameter σ.
[0060] In operation S320, a threshold value of the POT model is determined.
[0061] According to the embodiment of the present disclosure, selecting the threshold μ is a crucial step, because if the threshold μ is selected too large, it will cause the excess amount Y i On the contrary, if the threshold μ is too small, it is impossible to ensure that F u The estimation method of the estimated threshold μ can be the Hill graph method and the average excess graph method.
[0062] In operation S330, shape parameters and scale parameters of the POT model are determined.
[0063] According to the embodiment of the present disclosure, when the threshold μ is determined, there are multiple ways to estimate the shape parameter ξ and the scale parameter σ in the POT function, such as maximum likelihood estimation, moment estimation, probability weight estimation, etc. The maximum likelihood estimation method is now used as an example for explanation.
[0064] By taking the derivative of the above formula (4), we get the probability density function:
[0065]
[0066] The corresponding log-likelihood function is:
[0067]
[0068] By maximizing the likelihood function, we can obtain the estimated values of the shape parameter ξ and the scale parameter σ.
[0069] The threshold, shape parameter and scale parameter obtained are brought back to the POT model. The threshold μ, shape parameter ξ and scale parameter σ obtained are brought into formula (4), and the performance index X can be obtained. i Fu (y), we can get the marginal distribution function.
[0070] Because there is a correlation between the various performance indicators of the database, and this correlation is not a simple sum, in order to describe the relationship between the various performance indicators, the Copula model can well reveal this relationship.
[0071] According to the embodiment of the present disclosure, the specific establishment process of the Copula model between various performance indicators is as follows: Figure 4 The method for establishing a Copula model in the embodiment of the present disclosure includes operations S410 to S420.
[0072] In operation S410, a Copula model between various performance indicators is constructed.
[0073] This disclosure constructs a Copula model based on Sklar theorem to construct a joint distribution function. The related theorems and formulas involved are described as follows:
[0074] The basic idea of the Copula model is to transform the variables X1, X2, …X m The joint distribution function F(X1,X2,…X m ) using their marginal distribution functions F1(X1), F2(X2), …F m (X m ) means:
[0075] F(X1,X2,…X m )=C[F1(X1),F2(X2),…F m (X m )]; (7)
[0076] The function C here is called the marginal distribution function F1(X1), F2(X2), ... F m (X m )’s Copula model.
[0077] In operation S420, parameters of the Copula model are determined.
[0078] According to the embodiment of the present disclosure, after the Copula model is constructed, the parameters of the Copula model need to be estimated. There are many ways to estimate the parameters in the Copula model, such as one-step maximum likelihood estimation, pseudo maximum likelihood estimation, two-order maximum likelihood segment estimation, non-parametric estimation, etc., among which the two-order maximum likelihood segment estimation is used as an example.
[0079] The two-order maximum likelihood segment estimation method is to take the unknown parameters θ of each marginal distribution function as iand the unknown parameters θ of the Copula model c The estimation is divided into two steps, namely:
[0080] first step:
[0081]
[0082]
[0083]
[0084] Step 2:
[0085]
[0086] According to the embodiment of the present disclosure, the constructed Copula model can be verified based on the KS test method and the QQ graph method. When the verification result is good, the constructed Copula model is used as the joint distribution function between the various performance indicators of the present disclosure.
[0087] According to the embodiment of the present disclosure, Figure 5 As shown, operation S230 includes operations S231 to S235.
[0088] Operation S231, generating a random number sequence that obeys a 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 indicator is X1, X2, X3, ... X m , then the pseudo-random number sequence generated is a1, a2, …, a m , where the pseudo-random number sequence a1, a2, …, a m The relationship not only obeys the joint distribution function established in the present disclosure, but also obeys the (0, 1) uniform distribution.
[0089] Operation S232: Obtain the predicted value of each performance indicator according to the marginal distribution function of each random number in the random number sequence and the corresponding performance indicator. Assume that the marginal distribution function of each indicator is F1(X1), F2(X2), ... F m (X m ), let a1=F1(X1), a2=F2(X2),…a m =F m (X m ), solve the predicted value of each performance index i is an integer from 1 to m.
[0090] Operation S233: setting the weight of each performance indicator, wherein the sum of the weights of each performance indicator is 1. Assume that the weight of each performance indicator is w i ,and
[0091] Operation S234: Accumulate the product of each predicted performance indicator value and its corresponding weight to obtain the predicted value of the overall performance indicator. The formula for the predicted value of the overall performance indicator is
[0092] Operation S235: Repeat the above steps multiple times to obtain multiple predicted values of the overall performance indicator. Repeat Operations S231 to S234 multiple times. Each time, change the value of the random number sequence to obtain multiple possibilities of the predicted value. The number of repetitions can be more than 1000 times.
[0093] According to an embodiment of the present disclosure, Operation S240 includes: setting a confidence level; calculating a failure value at the confidence level based on the predicted values of multiple overall performance indicators; and issuing a failure warning when the failure value exceeds a predetermined threshold. The confidence level refers to the probability that all predicted values fall within a certain range. Assuming a confidence level of 95%, the failure value VAR of the overall indicator is obtained using the formula P(z < VAR) = 5%.
[0094] The method for predicting database performance of the present disclosure further includes: predicting the operation trend curve of the overall performance indicator based on the predicted values of multiple overall performance indicators.
[0095] According to an embodiment of the present disclosure, the change trend of the overall database performance is predicted according to the following Prophet time series model, and the functional formula of the trend curve is:
[0096] y(t) = g(t) + f(t) + h(t) + ε t ; (12)
[0097] where t is time, g(t) represents the trend function, which can simulate the non-periodic change of the time series, f(t) represents the periodic change (such as daily, weekly), h(t) represents the irregular influence, and ε t The last term is only an error term. By fitting these three terms and finally adding them up, the trend of the overall database performance operation can be obtained.
[0098] The present disclosure uses the POT model to obtain the marginal distribution function of each common performance indicator of the database, and uses the copula function to obtain the correlation relationship between each performance indicator. Finally, the overall performance of the database can be predicted, and the trend change in the future for a period of time such as three days or the next week can be predicted, helping the operation and maintenance personnel to respond and deploy early, adjust resource allocation, and effectively save operation and maintenance costs and shorten the emergency response time.
[0099] Based on the above database performance prediction method, the present disclosure also provides a database performance prediction device. The following will be combined with Figure 6 Describe this device in detail.
[0100] like Figure 6 As shown, the database performance prediction device 600 of this embodiment includes a data collection module 610 , a distribution function calculation module 620 , an overall performance prediction module 630 , and a fault warning module 640 .
[0101] The data collection module 610 is used to collect historical data of multiple performance indicators of the database. In one embodiment, the data collection module 610 can be used to perform the operation S210 described above, which will not be described in detail here.
[0102] The distribution function calculation module 620 is used to calculate the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator based on the historical data of each performance indicator. In one embodiment, the distribution function calculation module 620 can be used to perform the operation S220 described above, which will not be repeated here.
[0103] The overall performance prediction module 630 is used to obtain the predicted values of the multiple overall performance indicators of the database based on the marginal distribution function of each performance indicator and the joint distribution function between each performance indicator. In one embodiment, the overall performance prediction module 630 can be used to perform the operation S230 described above, which will not be repeated here.
[0104] The fault warning module 640 is used to issue a fault warning when the predicted value meets a preset condition. In one embodiment, the fault warning module 640 can be used to perform the operation S240 described above, which will not be described in detail here.
[0105] According to an embodiment of the present disclosure, any multiple modules of the data collection module 610, the distribution function calculation module 620, the overall performance prediction module 630, and the fault warning module 640 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of 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 fault warning module 640 can be at least partially implemented 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in 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 fault warning module 640 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be executed.
[0106] Figure 7 A block diagram of an electronic device suitable for implementing a database performance prediction method according to an embodiment of the present disclosure is schematically shown.
[0107] like Figure 7 As shown, the 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 part 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 a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0108] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0109] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 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, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0110] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0111] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0112] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.
[0113] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0114] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0115] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0116] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0117] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0119] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for predicting database performance, characterized in that: include: Collect historical data of multiple performance indicators of the database; Based on the historical data of each of the performance indicators, calculate the marginal distribution function of each of the performance indicators and the joint distribution function between each of the performance indicators; Based on the marginal distribution function of each of the performance indicators and the joint distribution function between the performance indicators, multiple predictions are performed, and each prediction obtains a predicted value of the overall performance indicator of the database; Determining whether the database fails according to the plurality of prediction values, and issuing a failure warning when the database fails; The calculating of the marginal distribution function of each of the performance indicators and the joint distribution function between each of the performance indicators based on the historical data of each of the performance indicators comprises: Based on the historical data of each performance indicator, a POT model of each performance indicator is trained, and the trained POT model is used as a marginal distribution function; Based on the marginal distribution functions of the performance indicators, a Copula model between the performance indicators is trained, and the trained Copula model is used as a joint distribution function; The method of performing multiple predictions based on the marginal distribution functions of the performance indicators and the joint distribution functions between the performance indicators, and obtaining a predicted value of the overall performance indicator of the database each time, includes: Generate a random number sequence that obeys 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 predicted values of each performance indicator according to the marginal distribution function of each random number in the random number sequence and the corresponding performance indicator; Set the weight of each performance indicator, where the sum of the weights of each performance indicator is 1; Accumulating the product of each performance indicator prediction value and the corresponding weight to obtain the prediction value of the overall performance indicator; The above steps are repeated multiple times to obtain multiple predicted values of the overall performance index.
2. The method for predicting database performance according to claim 1, characterized in that: The step of judging whether the database fails according to the plurality of prediction values and issuing a failure warning when the database fails comprises: Set a confidence level; Calculating a fault value at the confidence level according to the predicted values of the plurality of overall performance indicators; When the fault value exceeds a predetermined threshold, a fault warning is issued.
3. The method for predicting database performance according to claim 1, characterized in that: Also includes: Based on the predicted values of the plurality of overall performance indicators, an operating trend curve of the overall performance indicator is predicted.
4. The method for predicting database performance according to claim 1, characterized in that: The historical data of multiple performance indicators of the database are collected, including: Determining a plurality of the performance indicators that affect the overall performance of the database; At predetermined time intervals, data sampling is performed on the historical data of each of the performance indicators.
5. A device for predicting database performance, characterized in that: include: Data collection module, used to collect historical data of multiple performance indicators of the database; A distribution function calculation module, used to calculate the marginal distribution function of each of the performance indicators and the joint distribution function between each of the performance indicators based on the historical data of each of the performance indicators; An overall performance prediction module, used to perform multiple predictions based on the marginal distribution functions of the various performance indicators and the joint distribution functions between the various performance indicators, and each prediction obtains a predicted value of the overall performance indicator of the database; A fault warning module, used for judging whether the database fails according to the plurality of prediction values, and issuing a fault warning when the database fails; The calculating of the marginal distribution function of each of the performance indicators and the joint distribution function between each of the performance indicators based on the historical data of each of the performance indicators comprises: Based on the historical data of each performance indicator, a POT model of each performance indicator is trained, and the trained POT model is used as a marginal distribution function; Based on the marginal distribution functions of the performance indicators, a Copula model between the performance indicators is trained, and the trained Copula model is used as a joint distribution function; The method of performing multiple predictions based on the marginal distribution functions of the performance indicators and the joint distribution functions between the performance indicators, and obtaining a predicted value of the overall performance indicator of the database each time, includes: Generate a random number sequence that obeys 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 predicted values of each performance indicator according to the marginal distribution function of each random number in the random number sequence and the corresponding performance indicator; Set the weight of each performance indicator, where the sum of the weights of each performance indicator is 1; Accumulating the product of each performance indicator prediction value and the corresponding weight to obtain the prediction value of the overall performance indicator; The above steps are repeated multiple times to obtain multiple predicted values of the overall performance index.
6. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
A method for evaluating that dependency of a plurality of performance parameters of an ammunition component
CN109522519A
Database early warning method and device, computing equipment and medium
CN111949502A