Database SQL performance adaptive threshold alarm methods, media and products

By constructing a dynamic performance baseline and an adaptive threshold generation mechanism, and combining operational feedback to optimize SQL performance alerts, the problems of poor adaptability and false alarms/missed alarms in existing technologies have been solved, achieving high-precision database monitoring.

CN123115183APending Publication Date: 2026-11-17CETC JINCANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611256769.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing SQL performance threshold alarm technology has poor adaptability, is prone to false alarms and missed alarms, and cannot be optimized independently, making it difficult to meet the needs of high-precision monitoring.

Method used

By collecting multi-dimensional time-series metrics from database SQL statements, a dynamic performance baseline that integrates time-series prediction and error statistics is constructed, an adaptive alarm threshold range is generated, and iterative optimization is performed in conjunction with operation and maintenance feedback information to form a closed-loop adaptive mechanism.

Benefits of technology

It effectively improves the accuracy of SQL performance anomaly identification, reduces false alarms and missed alarms, reduces the configuration and identification burden of operation and maintenance personnel, and achieves high-precision database monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115183A_ABST
    Figure CN123115183A_ABST
Patent Text Reader

Abstract

This invention provides a database SQL performance adaptive threshold alarm method, medium, and product. The database SQL performance adaptive threshold alarm method includes: collecting historical multi-dimensional time-series execution metrics of each SQL statement in the database, and obtaining a standardized time-series dataset after cleaning and preprocessing; constructing a dynamic performance baseline based on the time-series dataset, integrating time-series prediction and error statistics; generating an alarm threshold range that changes in real-time with business load by combining the dynamic performance baseline and an adaptive adjustment coefficient; comparing the real-time execution metrics with the alarm threshold range, identifying different types of performance deviations, and outputting tiered alarms. This invention's solution, by combining the business characteristics of SQL itself with business load fluctuations to generate dynamic alarm thresholds, effectively reduces false alarms and missed alarms, and improves the accuracy of SQL performance anomaly identification; based on operation and maintenance feedback, it enables autonomous iterative optimization of the threshold strategy, reducing manual configuration costs and alleviating the alarm processing burden of database operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database technology, and in particular to a database SQL performance adaptive threshold alarm method, medium, and product. Background Technology

[0002] In database operations and maintenance scenarios, the statistics of structured query languages ​​(SQL) that rank highest in resource consumption include execution time, CPU consumption, I / O wait times, and execution frequency. These are core indicators for assessing the health of a database system. Currently, two methods are commonly used to monitor and alert on SQL performance: The first method is fixed threshold alarms, where operations and maintenance personnel pre-set static thresholds, such as setting a fixed rule to "trigger an alarm if the execution time exceeds 1000ms". However, different SQL statements are affected by their own business characteristics, and the normal execution time can be distributed in the range of milliseconds to seconds. Fixed thresholds are difficult to adapt to diverse business scenarios. At the same time, the performance of the same SQL statement varies significantly at different business load periods, such as peak business hours and off-peak business hours. Using static thresholds can easily lead to a large number of false alarms or missed alarms.

[0003] The second type is a simple dynamic threshold alarm method, where some existing solutions calculate the dynamic threshold using sliding window or moving average algorithms. This type of solution has a simplistic threshold generation mechanism, making it unable to effectively distinguish between periodic fluctuations in time-series data and actual performance anomalies; furthermore, it lacks feedback learning capabilities and cannot iteratively optimize the threshold strategy based on the confirmation or rejection actions of operations and maintenance personnel regarding alarm results.

[0004] In summary, existing SQL performance threshold alarm technologies generally suffer from poor adaptability, low anomaly identification accuracy, and lack of autonomous optimization capabilities. Overall, the alarm accuracy is insufficient, making it difficult to meet the high-precision monitoring needs of actual database operation and maintenance. Summary of the Invention

[0005] One objective of this invention is to provide a database SQL performance adaptive threshold alarm method that can solve any of the above-mentioned problems.

[0006] A further objective of this invention is to address the problems of poor adaptability, susceptibility to false alarms and missed alarms, and insufficient alarm recognition accuracy in existing SQL performance threshold alarm technologies.

[0007] Another further objective of this invention is to address the problem that traditional dynamic thresholds cannot achieve autonomous iterative optimization based on alarm feedback, making it difficult to adapt to different business load scenarios in databases.

[0008] Specifically, this invention provides a database SQL performance adaptive threshold alarm method, comprising: collecting historical multi-dimensional time-series execution metrics of each SQL statement in the database, and obtaining a standardized time-series dataset after cleaning and preprocessing; constructing a dynamic performance baseline based on the time-series dataset that integrates time-series prediction and error statistics; generating an alarm threshold range that changes in real time with business load by combining the dynamic performance baseline and an adaptive adjustment coefficient; and comparing the real-time execution metrics with the alarm threshold range to identify different types of performance deviations and output graded alarms.

[0009] Optionally, after identifying different types of performance deviations and outputting graded alarms, the method further includes: obtaining feedback information corresponding to the graded alarms, iteratively updating the adaptive adjustment coefficient based on the feedback information, continuously optimizing the alarm threshold range, and forming a closed-loop self-optimization mechanism.

[0010] Optionally, the step of iteratively updating the adaptive adjustment coefficient based on the feedback information includes: constructing a feedback scoring function; when the output value of the feedback scoring function exceeds a preset threshold, expanding or shrinking the alarm threshold range by a fixed step size, and persistently storing the updated adaptive adjustment coefficient.

[0011] Optionally, the cleaning preprocessing includes removing outliers from the execution metrics of the historical multi-dimensional time series and binding a statistical timestamp to each execution metric to generate the time-series aligned standardized time series dataset.

[0012] Optionally, the step of constructing the dynamic performance baseline that integrates time series prediction and error statistics includes: decomposing the standardized time series dataset into trend components, periodic components, and residual components; and calculating the confidence error boundary based on the theoretical values ​​of the prediction indicators of each component after decomposition, combined with historical prediction errors, to generate the dynamic performance baseline.

[0013] Optionally, the different types of performance deviations include positive performance degradation deviation and negative performance abnormal deviation; when the real-time execution metric exceeds the upper boundary of the alarm threshold interval, it is determined to be the positive performance degradation deviation, and when the real-time execution metric is lower than the lower boundary of the alarm threshold interval, it is determined to be the negative performance abnormal deviation.

[0014] Optionally, based on the deviation of the real-time execution indicator from the alarm threshold range, the alarms are classified into Level 1 alert alarms, Level 2 warning alarms, and Level 3 critical alarms.

[0015] Optionally, the feedback information includes at least alarm validity confirmation information, alarm false alarm ignoring information, and alarm level adjustment information.

[0016] According to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of any of the above-described database SQL performance adaptive threshold alarm methods.

[0017] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of any of the above-described database SQL performance adaptive threshold alarm methods.

[0018] The database SQL performance adaptive threshold alarm method of the present invention constructs a dynamic performance baseline by integrating time series prediction and error statistics, and generates an alarm threshold range that adapts to changes in business load by combining adaptive adjustment coefficients. It can adaptively adjust the threshold according to the business characteristics of different SQL statements and the load fluctuations during peak and off-peak periods, avoiding false alarms and missed alarms caused by individual differences in SQL and changes in business load under the fixed threshold mode, effectively improving the accuracy of SQL performance anomaly identification and reducing alarm interference in the database operation and maintenance process.

[0019] Furthermore, the database SQL performance adaptive threshold alarm method of the present invention introduces operation and maintenance feedback information to iteratively update the adaptive adjustment coefficient, and completes the self-optimization of the threshold range by relying on the feedback scoring function. It eliminates the need for operation and maintenance personnel to repeatedly manually configure threshold parameters, and realizes the autonomous learning and evolution of the alarm model. In the long-term operation, it can continuously converge alarm deviation, further reduce the proportion of invalid alarms, reduce the burden of manual configuration and identification for operation and maintenance personnel, and better meet the actual use needs of high-precision monitoring of database operation and maintenance.

[0020] The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description

[0021] The following sections will describe some specific embodiments of the invention in detail by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings: Figure 1 This is a schematic flowchart of a database SQL performance adaptive threshold alarm method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a computer program product according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention; and Figure 4This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0022] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.

[0023] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0024] This embodiment provides a database SQL performance adaptive threshold alarm method, which can generate dynamic alarm thresholds by combining the business characteristics of SQL itself with business load fluctuations, effectively reducing false alarms and false negatives, and improving the accuracy of SQL performance anomaly identification; it can also achieve autonomous iterative optimization of threshold strategy based on operation and maintenance feedback, reduce manual configuration costs, and alleviate the alarm handling burden of database operation and maintenance. Figure 1 This is a schematic flowchart of a database SQL performance adaptive threshold alarm method according to an embodiment of the present invention, as follows: Figure 1 As shown, the database SQL performance adaptive threshold alarm method generally includes the following steps: Step S102: Collect the execution metrics of historical multi-dimensional time series of each SQL statement in the database, and obtain a standardized time series dataset after cleaning and preprocessing.

[0025] Step S104: Construct a dynamic performance baseline that integrates time series prediction and error statistics based on the time series dataset.

[0026] Step S106: Combine the dynamic performance baseline and the adaptive adjustment coefficient to generate an alarm threshold range that changes in real time with the service load.

[0027] Step S108: Compare the real-time execution metrics with the alarm threshold range, identify different types of performance deviations, and output graded alarms.

[0028] Specifically, the cleaning and preprocessing in step S102 may include removing outliers from the execution metrics of the historical multi-dimensional time series, and binding a statistical timestamp to each execution metric to generate the time-series aligned standardized time series dataset.

[0029] Specifically, the step of constructing the dynamic performance baseline that integrates time series prediction and error statistics in step S104 may include: decomposing the standardized time series dataset into trend components, periodic components and residual components; and calculating the confidence error boundary based on the theoretical values ​​of the prediction indicators of each component after decomposition, combined with historical prediction errors, to generate the dynamic performance baseline.

[0030] Specifically, in step S108, different types of performance deviations can include positive performance degradation deviations and negative performance anomaly deviations. Furthermore, when the real-time execution metric exceeds the upper boundary of the alarm threshold range, it is determined to be a positive performance degradation deviation; when the real-time execution metric is below the lower boundary of the alarm threshold range, it is determined to be a negative performance anomaly deviation.

[0031] Specifically, in step S108, based on the deviation of the real-time execution indicator from the alarm threshold range, a level 1 alert alarm, a level 2 warning alarm, and a level 3 critical alarm can be classified.

[0032] Specifically, after step S108, which identifies different types of performance deviations and outputs graded alarms, the method may further include: obtaining feedback information corresponding to the graded alarms, iteratively updating the adaptive adjustment coefficient based on the feedback information, continuously optimizing the alarm threshold range, and forming a closed-loop self-optimization mechanism.

[0033] Preferably, the feedback information includes at least alarm validity confirmation information, alarm false alarm ignoring information, and alarm level adjustment information. Furthermore, the step of iteratively updating the adaptive adjustment coefficient based on the feedback information may include: constructing a feedback scoring function; when the output value of the feedback scoring function exceeds a preset threshold, expanding or shrinking the alarm threshold range by a fixed step size, and persistently storing the updated adaptive adjustment coefficient.

[0034] It should be noted that the database SQL performance adaptive threshold alarm method in this embodiment achieves the following by constructing a dynamic baseline model of SQL performance indicators, an adaptive threshold generation mechanism that integrates multi-dimensional features, and a feedback-based closed-loop optimization architecture: no need to manually set a fixed threshold, the threshold is dynamically determined entirely by the distribution of historical data; the threshold is adaptively adjusted according to the data distribution, which can capture periodic patterns and suppress random noise interference; and based on continuous optimization, the threshold model is driven to iteratively update by the confirmation or rejection signals of the alarm results by the operation and maintenance personnel.

[0035] Specifically, the database SQL performance adaptive threshold alarm method of this embodiment can include the following as a whole: Regarding the collection and preprocessing of SQL performance metrics data, historical execution statistics of SQL statements in the database instance are collected. These historical execution statistics include, but are not limited to: average execution time, CPU consumption time, IO wait time, number of executions, number of returned rows, and number of scanned rows. The collected raw data is cleaned to remove obvious outliers caused by system anomalies, manual intervention, etc. (such as negative execution times or extremely high values ​​exceeding a set threshold). Simultaneously, the statistical timestamps of the top-ranking resource-consuming SQL statements are recorded (recording the initial start time of the current SQL statistics collection), forming a time-series metric dataset.

[0036] Regarding the construction of dynamic baseline models based on historical data, time-series indicator data are organized into historical sequences according to the time dimension. A multi-level decomposition and prediction method is used to construct the dynamic baseline model, specifically including: The time-series decomposition sub-step uses a deep learning-based method to decompose the historical indicator sequence into three components: trend component: reflecting the long-term trend of SQL execution performance (such as the increase in execution time due to the growth of data volume); periodic component: reflecting the periodic pattern of business load (such as daily / weekly business peak periods); and residual component: reflecting random fluctuations that cannot be explained by trends and periods.

[0037] Prediction sub-step: Based on the trend component, periodic component and residual component obtained by decomposition, the Long Short-Term Memory (LSTM) network and Seasonal Autoregressive Integrated Moving Average (SARIMA) algorithms are used to predict each component, so as to obtain the predicted value P(t) of the indicator within the future time window and the prediction confidence interval.

[0038] Error modeling sub-step: For the historical prediction error sequence (the difference between actual and predicted values), Statistical analysis was performed to establish an error distribution model and calculate the upper bound U_err and lower bound L_err of the error at a set confidence level (95%).

[0039] Regarding the real-time generation of adaptive thresholds, the currently collected real-time SQL indicator value V(t) is compared with the predicted value P(t) output by the dynamic baseline model, and the alarm threshold range is dynamically generated based on the error boundary. The calculation formula is: , where k_adj is the adaptive adjustment coefficient, with an initial value of 1.0.

[0040] Dynamic adjustment refers to the real-time change of the threshold range corresponding to each time point t with the predicted value P(t) and the error boundary, which can reflect the performance baseline differences at different times (e.g., the threshold is automatically widened during peak business periods and automatically tightened during off-peak periods). Feedback-based learning refers to the dynamic adjustment of k_adj based on historical alarm feedback signals.

[0041] Regarding abnormal deviation detection and tiered alarms, the SQL real-time metric value V(t) is compared with the aforementioned adaptive threshold range: If If it is determined to be a positive performance degradation deviation (performance degradation), an alarm of the corresponding level will be triggered; if If the reverse performance is deemed to deviate abnormally (an abnormal increase in performance, which may indicate invalid statistics or changes in the execution plan), a warning alert will be triggered; if This is determined to be a normal state. Among them, This represents the upper boundary of the alarm threshold range. This represents the lower boundary of the alarm threshold range.

[0042] Preferably, a tiered alarm mechanism is set up based on the deviation of the real-time execution metric from the alarm threshold range: A level 1 alert is triggered at this time; A level 2 warning alarm is triggered at this time; A level 3 critical alarm was triggered.

[0043] Regarding feedback-based closed-loop optimization, feedback signals from operations and maintenance personnel are introduced. These signals include: valid alarm confirmation information, false alarm ignoring information, and alarm level adjustment information. Valid alarm confirmation information indicates a valid anomaly, false alarm ignoring information indicates a false alarm, and alarm level adjustment information indicates a correction of the alarm level.

[0044] The adaptive adjustment coefficient k_adj is dynamically updated based on the feedback signal: when the feedback signal is a valid alarm confirmation and subsequent verification confirms a performance problem, k_adj is maintained or appropriately reduced to improve sensitivity; when the feedback signal is a false alarm and is ignored, k_adj is adjusted according to a set step size (e.g., ...). Increase k_adj to expand the threshold range and reduce the false alarm rate; when the feedback signal is alarm level adjustment information, record the mapping relationship between the adjusted level and the actual indicator value to optimize the grading threshold boundary.

[0045] Preferably, the step of dynamically optimizing the threshold generation parameters based on historical alarm feedback signals may specifically include: constructing a feedback scoring function. Where C_confirm is the number of confirmations, w1 is the incentive weight; C_false is the number of false alarms, w2 is the penalty weight; C_adjust is the number of level adjustments, w3 is the adjustment weight; when the F result exceeds the preset threshold (F_target), the threshold adjustment is automatically triggered to set the step size to expand / shrink the threshold interval width; the adjusted threshold parameters are persistently stored as the initial parameters for the next time window, realizing the self-evolution of the threshold model.

[0046] Update the adaptive adjustment coefficient k_adj. The updated k_adj is persisted and stored for subsequent threshold calculations within time windows, forming a closed-loop adaptive mechanism of "monitoring-alarming-feedback-system adjustment-optimization".

[0047] It is important to emphasize that the database SQL performance adaptive threshold alarm method in this embodiment has the following essential key technical points: No manual intervention required: The upper and lower bounds of the threshold are determined entirely by the distribution of historical data and the statistics of prediction errors, without the need for maintenance personnel to preset any fixed values; Dynamic adjustment: The threshold range corresponding to each time point t changes in real time with the predicted value P(t) and the error boundary, which can reflect the performance baseline differences at different times (such as automatically widening the threshold during peak business periods and automatically tightening it during off-peak periods). Based on feedback learning: k_adj is dynamically adjusted according to historical alarm feedback signals.

[0048] Furthermore, the database SQL performance adaptive threshold alarm method of this embodiment can bring the following significant technical effects: Zero manual configuration and low deployment cost: No operation and maintenance personnel are required to preset any threshold values. It can run automatically simply by accessing the storage location of historical SQL statistics, which greatly reduces the configuration threshold and maintenance costs. Highly adaptable and accurate: The dynamic baseline model can capture the periodic patterns of SQL performance (such as business peaks and troughs), automatically tighten or loosen the threshold range, and avoid a large number of false alarms during business peaks when the threshold is fixed. Closed-loop optimization, becoming more accurate with use: By introducing feedback signals from operations and maintenance personnel, the threshold model can continuously learn and improve itself. After long-term operation, the alarm accuracy rate is significantly improved, solving the pain point of traditional threshold solutions that "become rigid after initial configuration". Tiered alarms facilitate maintenance: An adaptive tiered mechanism based on the degree of deviation enables maintenance personnel to handle alarms according to priority, improving fault response efficiency.

[0049] In summary, the database SQL performance adaptive threshold alarm method of this embodiment constructs a dynamic performance baseline by integrating time-series prediction and error statistics, and generates an alarm threshold range that adapts to changes in business load by combining adaptive adjustment coefficients. It can adaptively adjust the threshold for different SQL statements' business characteristics and load fluctuations during peak and off-peak periods, avoiding false alarms and missed alarms caused by individual SQL differences and changes in business load under the fixed threshold mode. This effectively improves the accuracy of SQL performance anomaly identification and reduces alarm interference during database operation and maintenance.

[0050] Furthermore, the database SQL performance adaptive threshold alarm method in this embodiment introduces operation and maintenance feedback information to iteratively update the adaptive adjustment coefficient. It relies on the feedback scoring function to complete the self-optimization of the threshold range, eliminating the need for operation and maintenance personnel to repeatedly manually configure threshold parameters and realizing the autonomous learning and evolution of the alarm model. During long-term operation, it can continuously converge alarm deviation, further reduce the proportion of invalid alarms, reduce the burden of manual configuration and identification for operation and maintenance personnel, and better meet the actual needs of high-precision monitoring of database operation and maintenance.

[0051] The flowcharts provided in the above embodiments are not intended to indicate that the operations of the method will be performed in any particular order, or that all operations of the method are included in all every case. Furthermore, the method may include additional operations. Within the scope of the technical concept provided by the methods in the above embodiments, additional variations can be made to the above methods.

[0052] This embodiment also provides a computer program product, a computer-readable storage medium, and a computer device. Figure 2 This is a schematic diagram of a computer program product 500 according to an embodiment of the present invention. Figure 3 This is a schematic diagram of a computer-readable storage medium 300 according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a computer device 400 according to an embodiment of the present invention.

[0053] Computer program product 500 includes computer program 310, which, when executed by processor 410, implements the steps of any of the above-described database SQL performance adaptive threshold alarm methods. Computer-readable storage medium 300 stores the above-described computer program 310, which, when executed by processor 410, implements the steps of any of the above-described database SQL performance adaptive threshold alarm methods. Computer device 400 may include memory 420, processor 410, and computer program 310 stored in memory 420 and running on processor 410.

[0054] The computer program 310 used to perform the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages ​​and procedural programming languages.

[0055] Computer program 310 may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0056] In some embodiments, in order to perform aspects of the present invention, electronic circuits including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs) or programmable logic arrays (PLAs) can execute computer-readable program instructions to personalize the electronic circuits by utilizing state information of computer-readable program instructions.

[0057] For the purposes of this embodiment, computer program product 500 is a related product containing computer program 310. For the purposes of this embodiment, computer-readable storage medium 300 is a tangible device capable of holding and storing computer program 310, and can be any device capable of containing, storing, communicating, propagating or transmitting computer program 310 for use by or in conjunction with an instruction execution system, apparatus or device.

[0058] More specific examples (a non-exhaustive list) of computer-readable storage media 300 include the following: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, and any suitable combination of the foregoing.

[0059] Computer device 400 may include memory 420, processor 410 and computer program 310 stored on memory 420 and running on processor 410, and processor 410 executes computer program 310 to implement the steps of the database SQL performance adaptive threshold alarm method of any of the above embodiments.

[0060] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any machine-readable storage medium for use by, or in conjunction with, instruction execution systems, apparatuses or devices (such as computer-based systems, processor-based systems or other systems that can fetch and execute instructions from, or instruction execution systems, apparatuses or devices).

[0061] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system.

[0062] Computer device 400 can be, for example, a server, desktop computer, laptop computer, tablet computer, or smartphone. In some examples, computer device 400 can be a cloud computing node. Computer device 400 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer device 400 can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can reside on local or remote computing system storage media, including storage devices.

[0063] Computer device 400 may include a processor 410 adapted to execute stored instructions and a memory 420 that provides temporary storage space for the operation of instructions during operation. The processor 410 may be a single-core processor, a multi-core processor, a computing cluster, or any other configuration. The memory 420 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.

[0064] The processor 410 can be connected via a system interconnect (e.g., PCI, PCI-Express, etc.) to an I / O interface (input / output interface) suitable for connecting the computer device 400 to one or more I / O devices (input / output devices). I / O devices may include, for example, a keyboard and indicating devices, where indicating devices may include a touchpad or touchscreen, etc. I / O devices may be built into the computer device 400 or may be external devices connected to the computing device.

[0065] The processor 410 may also be linked via a system interconnect to a display interface suitable for connecting the computer device 400 to a display device. The display device may include a display screen as a built-in component of the computer device 400. The display device may also include an external computer monitor, television, or projector connected to the computer device 400. Furthermore, a network interface controller (NIC) may be adapted to connect the computer device 400 to a network via a system interconnect. In some embodiments, the NIC may use any suitable interface or protocol (such as an Internet Minicomputer System Interface) to transmit data. The network may be a cellular network, a radio network, a wide area network (WAN), a local area network (LAN), or the Internet, etc. Remote devices may connect to the computing device via the network.

[0066] Therefore, those skilled in the art should recognize that although numerous exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications conforming to the principles of the present invention can be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Thus, the scope of the present invention should be understood and construed as covering all such other variations or modifications.

Claims

1. A database SQL performance adaptive threshold alarm method, comprising: The execution metrics of each SQL statement in the database are collected in a multi-dimensional time series and then cleaned and preprocessed to obtain a standardized time series dataset. A dynamic performance baseline that integrates time series prediction and error statistics is constructed based on the aforementioned time series dataset; By combining the dynamic performance baseline and the adaptive adjustment coefficient, an alarm threshold range that changes in real time with the business load is generated; as well as By comparing the real-time performance metrics with the alarm threshold range, different types of performance deviations are identified and graded alarms are output.

2. The method according to claim 1, further comprising, after the step of identifying different types of performance deviations and outputting graded alarms: The system obtains feedback information corresponding to the graded alarms, iteratively updates the adaptive adjustment coefficient based on the feedback information, and continuously optimizes the alarm threshold range to form a closed-loop self-optimization mechanism.

3. The method according to claim 2, wherein the step of iteratively updating the adaptive adjustment coefficient based on the feedback information includes: Construct a feedback scoring function. When the output value of the feedback scoring function exceeds a preset threshold, expand or shrink the alarm threshold range by a fixed step size, and persistently store the updated adaptive adjustment coefficient.

4. The method according to claim 1, wherein, The cleaning and preprocessing includes removing outliers from the historical multi-dimensional time series execution metrics and binding a statistical timestamp to each execution metric to generate the time-series aligned standardized time series dataset.

5. The method according to claim 1, wherein the step of constructing the dynamic performance baseline that integrates temporal prediction and error statistics comprises: The standardized time series dataset is decomposed into trend components, periodic components, and residual components; as well as Based on the theoretical values ​​of the prediction indices of each component after decomposition, and combined with historical prediction errors, the confidence error boundary is calculated to generate the dynamic performance baseline.

6. The method according to claim 1, wherein, The different types of performance deviations include positive performance degradation deviation and negative performance anomaly deviation; When the real-time execution metric exceeds the upper boundary of the alarm threshold range, it is determined as a positive performance degradation deviation; when the real-time execution metric is below the lower boundary of the alarm threshold range, it is determined as a negative performance abnormal deviation.

7. The method according to claim 1, wherein, Based on the deviation of the real-time execution indicators from the alarm threshold range, alarms are classified into three levels: Level 1 alert alarm, Level 2 warning alarm, and Level 3 critical alarm.

8. The method according to claim 2, wherein, The feedback information includes at least alarm validity confirmation information, alarm false alarm ignoring information, and alarm level adjustment information.

9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the database SQL performance adaptive threshold alarm method according to any one of claims 1 to 8.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the database SQL performance adaptive threshold alarm method as described in any one of claims 1 to 8.