A software database anomaly monitoring and handling method

Through the recursive segmented weighted regression model with real-time monitoring and dynamic adjustment, the false alarm and omission problem of database exception detection in the existing technology is solved, and efficient exception handling and system stability are achieved.

CN119718842BActive Publication Date: 2025-07-08STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510246081.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-08
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

The prior art cannot adaptively adjust the monitoring sensitivity according to the actual load conditions, resulting in frequent false alarms and missed alarms during high loads, and the inability to capture potential database exceptions in a timely and effective manner, increasing system instability and unreliability.

Method used

The recursive segmented weighted regression model is used to monitor multi-dimensional performance indicators in real time, dynamically adjust the weights through the error feedback mechanism, build an exception state matrix, initiate a dynamic response mechanism, differentiate the exception processing, and combine historical data optimization processing strategies.

Benefits of technology

It improves the accuracy and response speed of database abnormality detection, reduces the risk of abnormal spread, improves the reliability and adaptability of the system, and optimizes the exception handling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718842B_ABST
    Figure CN119718842B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electrical digital data processing, and in particular to a method for monitoring and processing software database anomalies, which includes the following steps: real-time monitoring of multi-dimensional performance indicators during database operation, using a model to predict the future database state, dynamically adjusting weights through an error feedback mechanism, capturing state changes of the database at different time periods; identifying anomalies based on the prediction results, constructing an anomaly state matrix, determining whether the database is in an abnormal state, and starting a dynamic response mechanism to execute differential processing for different anomalies, allocating resources through a dynamic response function, giving priority to handling serious anomalies, and optimizing future processing strategies by analyzing historical anomaly handling data. The present invention can adaptively adjust the sensitivity of monitoring, timely and effectively capture potential abnormal behaviors; through the dynamic response mechanism, intelligently allocate resources according to different types and severities of anomalies, increasing the stability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular, to a method for monitoring and processing software database anomalies. Background Art

[0002] In modern information-based society, as the infrastructure for core data storage and processing, databases are widely used in various software systems to support the daily operations of various industries. With the rapid growth of data volume and the complexity of business requirements, database systems not only bear the storage requirements of massive data but also need to support high-concurrency queries, transaction processing, and complex business logic operations. Therefore, the stability and efficient operation of databases are directly related to the reliability and performance of the entire system.

[0003] In recent years, although significant progress has been made in database technology, various potential risks and challenges still exist during the operation of database systems. With the increase in user access volume and the complexity of business scenarios, the load pressure on databases has risen sharply, and various anomalies (such as query latency, transaction deadlocks, resource contention, data corruption, connection interruptions, etc.) frequently occur. If these anomalies cannot be handled promptly and effectively, they will not only affect the system performance, resulting in a decline in user experience, but may also cause serious data loss or service interruption, thereby affecting the normal operation of the entire enterprise.

[0004] However, the prior art cannot adaptively adjust the monitoring sensitivity according to the actual load situation, resulting in frequent false alarms and missed alarms under high load, and unable to capture potential abnormal behaviors in a timely and effective manner. The prior art lacks a dynamic response mechanism and cannot intelligently allocate resources according to different types and severities of anomalies, easily leading to the premature handling of low-priority issues and the delay in handling high-priority issues, thus increasing the instability and unreliability of the system. Summary of the Invention

[0005] In order to solve the problem that the monitoring sensitivity cannot be adaptively adjusted according to the actual load situation, resulting in frequent false alarms and missed alarms under high load and unable to capture potential abnormal behaviors in a timely and effective manner, the present invention provides a method for monitoring and processing software database anomalies.

[0006] The present invention provides a method for monitoring and processing software database anomalies, adopting the following technical solutions:

[0007] A method for monitoring and processing software database anomalies includes the following steps:

[0008] Real-time monitor multi-dimensional performance metrics during the operation of the database, use a model to predict the future state of the database, and through an error feedback mechanism, dynamically adjust the weights to optimize the model and capture the state changes of the database at different time periods;

[0009] Identify anomalies based on prediction results, construct an anomaly status matrix, determine whether the database is in an abnormal state, and initiate a dynamic response mechanism to execute differential processing for different anomalies. Allocate resources through a dynamic response function, prioritize the handling of severe anomalies, and optimize future processing strategies by analyzing historical anomaly handling data.

[0010] In a specific implementable embodiment, the multi-dimensional performance metrics include query execution time, the number of database connections, CPU and memory resource occupancy rates, transaction processing time, and disk I / O performance.

[0011] In a specific implementable embodiment, when using a model to predict the future database state, a recursive piecewise weighted regression model is adopted, and the following steps are further included:

[0012] The metric values of the collected multi-dimensional performance metrics form an initial state matrix;

[0013] Divide the initial state matrix into several time periods, and represent the state information within each time period using a matrix as:

[0014]

[0015] where, represents the number of multi-dimensional performance metrics; represents the time;

[0016] Perform piecewise weighting on the multi-dimensional performance metrics of the database, capture complex time-varying trends, dynamically estimate the database state at the current time and future times, and recursively predict the state changes of the future database within each time period.

[0017] In a specific implementable embodiment, the recursive formula is:

[0018]

[0019] In the above formula, is the recursive estimation value of the th multi-dimensional performance metric at time ; is the weight for recursive estimation at time within the th time period; is a coefficient used to adjust the recursive growth rate, adjusting the influence of the current time on the th multi-dimensional performance metric; controls the time recursion speed.

[0020] In a specific feasible implementation, through an error feedback mechanism, the weights are dynamically adjusted to optimize the model, and the steps to capture the state changes of the database at different time periods are as follows:

[0021] After each recursive prediction value is calculated, it is compared with the actual observed value, and the prediction error between the two is calculated. When calculating the prediction error, a smoothing coefficient is introduced in combination with the magnitude of the relative change;

[0022] The calculation formula for the prediction error is:

[0023]

[0024] In the above formula, is the prediction error of the th multi-dimensional performance index in the th time period; is the number of time moments in the th time period; The set of time moments in the th time period; is the actual observed value of the th multi-dimensional performance index at time is the error smoothing parameter.

[0025] According to the prediction error of each time period, the weights of the recursive piecewise weighted regression model are dynamically adjusted. For the time period with a larger error, the corresponding weight will be reduced in subsequent calculations, while for the time period with a smaller error, the weight will be increased accordingly;

[0026] When adjusting the weights, a sine function adjustment factor is introduced to perform periodic adjustment of the weights in the time dimension. The adjustment formula is:

[0027]

[0028] Where, is the adjustment amplitude of the time period weight.

[0029] In a specific feasible implementation, based on the prediction results, anomalies are identified, an anomaly state matrix is constructed, and the steps to determine whether the database is in an abnormal state are as follows:

[0030] According to the recursive prediction results after weighted adjustment, the anomaly values are calculated to generate an anomaly state matrix. If there are anomaly values of multi-dimensional performance indicators that continuously exceed the threshold, it is considered that there are anomalies in the current multi-dimensional performance indicators;

[0031] The construction formula for the anomaly state matrix is:

[0032]

[0033] Among them, represents the outlier of the th multi-dimensional performance indicator at the

[0034] In a specific implementable embodiment, a dynamic response mechanism is started, and differential processing for different exceptions is performed. Resources are allocated through a dynamic response function, and serious exceptions are preferentially processed, including the following steps:

[0035] Execute different processing strategies according to different exception types and the severity of the exceptions;

[0036] The response function combines the deviation degree of each exception index with the dynamic weight adjustment strategy and allocates resources according to the severity of the exceptions;

[0037] The response function is as follows:

[0038]

[0039] Among them, is the total response value of the dynamic response mechanism to the exception at the the th response weight of the multi-dimensional performance indicator, used to measure the priority of each performance indicator in exception handling; represents the relationship between the exception deviation value and the normal value; is the response smoothing factor, controlling the smoothing degree of the response; is a logic function used to control the exception response speed; controls the exception response speed; is the response threshold of the

[0040] In a specific implementable embodiment, after the dynamic response mechanism is executed, the response weights in the subsequent recursive process are adjusted according to the response results, and the adjustment formula is:

[0041] .

[0042] In a specific implementable embodiment, by analyzing historical exception handling data, optimizing future processing strategies includes the following steps:

[0043] Obtain historical exception handling data from the database, and construct a historical data matrix with historical exception handling results and handling times:

[0044]

[0045] Among them, is the historical data matrix; represents the The processing effect of the secondary anomaly; is the total number of anomaly processes;

[0046] Analyze historical data through a recursive regression optimization model, predict possible future processing requirements, and generate optimized regression results:

[0047]

[0048] Among them, is the optimized regression result at time ; is the processing effect of the secondary anomaly; is the sensitivity parameter of the processing effect of the secondary anomaly; is the weight factor of historical data; is the expected recovery time.

[0049] In a specific implementable solution, according to the optimized regression result, the subsequent processing strategy and sensitivity parameter are dynamically adjusted through the following adaptive adjustment formula:

[0050]

[0051] Among them, is the considered time window.

[0052] To sum up, the present invention includes the following beneficial effects:

[0053] 1. By dividing time periods and weighting performance indicators, short-term fluctuations can be captured, and at the same time, the accuracy of long-term trend prediction is improved. By recursively calculating the future database state, the prediction ability of database anomaly detection is gradually optimized, so that abnormal behaviors can be better identified and analyzed, reducing potential risks caused by anomalies in the database.

[0054] 2. The error feedback mechanism enables the weights of recursive calculations to be adaptively adjusted during the prediction process. By continuously correcting the recursive prediction results, future predictions are ensured to be more accurate. This feedback mechanism combines absolute error and relative change amplitude, enabling the system to quickly respond to short-term abnormal fluctuations and maintain high accuracy in long-term predictions, further improving the reliability and adaptability of the system.

[0055] 3. After an anomaly is detected, according to different types of anomalies and anomaly severity levels, processing resources are automatically allocated and corresponding strategies are implemented. The response mechanism can perform differential processing according to the priorities of different anomalies, ensuring that high-priority anomalies are responded to and resolved faster, thereby improving the efficiency of anomaly processing and avoiding greater damage caused by the spread of anomalies.

[0056] 4. A recursive regression optimization model combined with historical processed data continuously optimizes future processing strategies by learning historical anomaly processing data. By recursively analyzing historical processed data, it can effectively predict future possible anomaly processing requirements, optimize anomaly processing strategies, and gradually improve processing efficiency. This adaptive optimization based on historical data improves the degree of intelligence, and can self-improve and optimize the processing process according to the continuously accumulated historical experience, thus enhancing the overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a flowchart of a software database anomaly monitoring and processing method. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0058] The following Figure 1 further describes the present invention in detail.

[0059] Referring to Figure 1 , the software database anomaly monitoring and processing method includes the following steps:

[0060] S1. Real-time monitor multi-dimensional performance metrics during the operation of the database, use a recursive piecewise weighted regression model to predict the future database state, and through an error feedback mechanism, dynamically adjust the weights to optimize the model and capture the state changes of the database at different time periods.

[0061] The multi-dimensional performance metrics include query execution time, number of database connections, CPU and memory resource occupancy rates, transaction processing time, disk I / O performance, etc. The collection of multi-dimensional performance metrics is achieved by directly reading the database system log, query execution plan, and system performance monitoring interface, etc. The collected metric values form an initial state matrix.

[0062] Under the recursive piecewise weighted regression model, the database state information for each time period is organized as a matrix, and the recursive calculation is based on the piecewise matrix. That is, the initial state matrix is divided into several time periods, and the state information within each time period is represented by the matrix as follows:

[0063]

[0064] where represents the number of multi-dimensional performance metrics. By performing piecewise weighting on the multi-dimensional performance metrics of the database, complex time-varying trends are captured, thereby dynamically estimating the database state at the current moment and future times. Through the piecewise recursive method, while capturing short-term fluctuations, the overall prediction accuracy is improved. The recursive formula is as follows:

[0065]

[0066] In the above formula, is the recursive estimated value of the n-th multi-dimensional performance index at time is the weight for recursive estimation within the n-th time period at time is a coefficient used to adjust the recursive growth rate, adjusting the influence of the current time on the n-th multi-dimensional performance index; controls the time recursive speed. By recursively predicting the state changes of the future database within each time period, it provides a basis for subsequent anomaly identification and processing.

[0067] An error feedback mechanism is introduced to correct the results of recursive prediction. After each recursive prediction value is calculated, it is compared with the actual observed value, and the prediction error between the two is calculated. The prediction error includes not only the direct absolute error but also combines the magnitude of relative change. A smoothing coefficient is introduced to prevent the error from being infinitely amplified due to short-term fluctuations. Based on the magnitude of the prediction error, the weights of the subsequent recursive piecewise weighted regression model are adaptively adjusted to correct the recursive calculation, timely adjust the recursive strategy, ensure that the prediction model can be gradually optimized, and thus gradually reduce the future prediction error.

[0068] Specifically, the calculation formula for the prediction error is specifically as follows:

[0069]

[0070] In the above formula, is the prediction error of the n-th multi-dimensional performance index within the m-th time period, representing the difference between the actual observed value and the recursive estimated value; is the number of time instances within the m-th time period; the set of time instances within the m-th time period; is the actual observed value of the n-th multi-dimensional performance index at time

[0071] Furthermore, the weights of the recursive piecewise weighted regression model are dynamically adjusted according to the prediction errors in each time period to capture the fluctuation characteristics of different time periods in future predictions. For time periods with larger errors, their corresponding weights will be reduced in subsequent calculations, while the weights of time periods with smaller errors will be increased accordingly, gradually enhancing the adaptive ability to the database state. At the same time, in order to avoid overly drastic weight adjustments, a sine function adjustment factor is introduced to periodically adjust the weights in the time dimension to capture the periodic changes in database performance in different time periods, thereby further improving the accuracy of predictions. The specific adjustment formula is as follows:

[0072]

[0073] where is the adjustment amplitude of the time period weight, which controls the size of the weighted update, and uses the sine function to periodically adjust the weights to capture the fluctuation characteristics of database performance in different time periods. By dynamically adjusting the weight of the time period at the next moment, the adaptability of the recursive piecewise weighted model is improved. After weighted recursive adjustment, the state changes in different stages of the database are captured and dynamically corrected according to the actual errors.

[0074] S2. After identifying anomalies based on the recursive prediction results, construct an anomaly status matrix, determine whether the database is in an abnormal state, and activate the dynamic response mechanism to perform differential processing for different anomalies. Allocate resources through the dynamic response function, prioritize the handling of serious anomalies, analyze the historical anomaly handling data through the recursive regression optimization model, optimize the future handling strategies, and gradually improve the efficiency and response speed of anomaly handling.

[0075] Specifically, calculate the anomaly values based on the recursive prediction results after weighted adjustment to generate an anomaly status matrix, and determine whether the current database is in an abnormal state according to the data in the anomaly status matrix: If there are anomaly values of multi-dimensional performance indicators that continuously exceed the set threshold, it is considered that there are anomalies in the current multi-dimensional performance indicators. The anomaly value is the difference between the recursive prediction result after weighted adjustment and the actual observed value.

[0076] The construction formula of the anomaly status matrix is as follows:

[0077]

[0078] where represents the anomaly value of the th multi-dimensional performance indicator at the moment. Once the anomaly values of one or more multi-dimensional performance indicators exceed the set threshold, the dynamic response mechanism will be automatically triggered.

[0079] In the dynamic response mechanism, different processing strategies are executed according to different exception types and the severity of exceptions; the response function combines the deviation degrees of various exception metrics with the dynamic weight adjustment strategy, and allocates resources according to the severity of exceptions. The response function of the dynamic response mechanism is as follows:

[0080]

[0081] Among them, is the total response value of the dynamic response mechanism to exceptions at time is the response weight of the th multi-dimensional performance metric, which is used to measure the priority of each performance metric in exception handling; represents the relationship between the exception deviation value and the normal value; is the response smoothing factor, which controls the smoothness of the response; is the logic function used to control the exception response speed; controls the exception response speed; is the response threshold of the

[0082] th multi-dimensional performance metric. Through the response function, different types of exceptions are differentially processed to ensure that exceptions with higher priorities are quickly responded to.

[0083]

[0084] Adjusting the response weights of each metric according to the severity of exceptions can allocate more resources and processing capabilities to high-risk metrics of exceptions in future recursive processes, thereby enhancing the exception handling effect.

[0085] After the dynamic response mechanism is executed, the response weights in subsequent recursive processes are adjusted according to the response results to ensure that the response strategy can be optimized when dealing with similar exceptions. The adjustment formula is:

[0086]

[0087] Among them, is the historical data matrix; represents the processing effect of the th exception, including data such as response time and recovery time; is the total number of exception processing times. Through the recursive regression optimization model, the historical data is analyzed to predict the possible future processing requirements and generate the optimized regression result:

[0088]

[0089] Among them, is the optimized regression result at a certain moment, which is an evaluation of the historical anomaly handling effect; is the handling effect of the is the sensitivity parameter of the handling effect of the is the weight factor of historical data, which controls the influence weight of historical processed data on the current optimized result; is the expected recovery time, representing the processing time under ideal conditions. Through the recursive analysis of historical processed data, the anomaly handling strategy is gradually optimized to improve the efficiency and response speed of future processing.

[0090] According to the optimized regression result, through the following adaptive adjustment formula, the subsequent processing strategy and sensitivity parameter are dynamically adjusted to ensure the gradual improvement of the anomaly handling efficiency:

[0091]

[0092] Among them, is the considered time window, which represents the cumulative value of all historical optimized results during this period. Based on long-term historical data, more robust decision-making adjustments are made. The handling sensitivity is adjusted through the optimized regression result to ensure that future processing strategies can be adaptively optimized according to historical processing experience.

[0093] The above are all preferred embodiments of the present invention. The protection scope of the present invention is not limited thereto. Therefore, all equivalent changes made according to the structure, shape, and principle of the present invention shall be covered within the protection scope of the present invention.

Claims

1. A method for monitoring and handling software database anomalies, characterized in that: It includes the following steps: Monitor multi-dimensional performance metrics during the operation of the database in real time, use a model to predict the future state of the database, and through an error feedback mechanism, dynamically adjust the weights to optimize the model and capture the state changes of the database at different time periods; Identify anomalies based on the prediction results, construct an anomaly state matrix, determine whether the database is in an abnormal state, and start a dynamic response mechanism to perform differential processing for different anomalies, allocate resources through a dynamic response function, give priority to handling serious anomalies, and optimize future processing strategies by analyzing historical anomaly processing data; When using a model to predict the future state of the database, a recursive piecewise weighted regression model is used, and it also includes the following steps: The indicator values of the multi-dimensional performance metrics collected form an initial state matrix; Divide the initial state matrix into several time periods, and the state information within each time period is represented by the matrix as follows: Among them, represents the number of multi-dimensional performance indicators; represents the moment; Perform piecewise weighting on the multi-dimensional performance metrics of the database, capture complex time-changing trends, dynamically estimate the current and future states of the database, and recursively predict the state changes of the future database in each time period.

2. The software database anomaly monitoring and processing method according to claim 1, characterized in that: The multi-dimensional performance metrics include query execution time, number of database connections, CPU and memory resource occupancy rates, transaction processing time, and disk I / O performance.

3. The software database anomaly monitoring and processing method according to claim 1, wherein: The recursive formula is: In the above formula, is the recursive estimated value of the n-th multi-dimensional performance index at time ; is the weight of the recursive estimation at time within the n-th time period; is a coefficient used to adjust the recursive growth rate, adjusting the influence of the current time on the n-th multi-dimensional performance index; controls the time recursion speed.

4. The software database anomaly monitoring and processing method according to claim 3, wherein: Through the error feedback mechanism, dynamically adjusting the weights to optimize the model and capturing the state changes of the database at different time periods includes the following steps: After each recursive prediction value is calculated, compare it with the actual observed value, calculate the prediction error between the two, and when calculating the prediction error, combine the magnitude of the relative change and introduce a smoothing coefficient; The calculation formula for the prediction error is: In the above formula, is the prediction error of the -th multi-dimensional performance index in the -th time period; is the number of moments in the -th time period; The set of moments in the -th time period; is the actual observed value of the -th multi-dimensional performance index at the moment ; is the error smoothing parameter; Dynamically adjust the weights of the recursive piecewise weighted regression model according to the prediction error of each time period. For the time period with a larger error, the corresponding weight will be reduced in subsequent calculations, and for the time period with a smaller error, the weight will be increased accordingly; When adjusting the weights, introduce a sine function adjustment factor to perform periodic adjustment of the weights in the time dimension. The adjustment formula is: Among them, is the adjustment amplitude of the time period weight.

5. The software database anomaly monitoring and processing method according to claim 1, characterized in that: Identifying anomalies based on the prediction results, constructing an anomaly state matrix, and determining whether the database is in an abnormal state includes the following steps: Calculate the anomaly value according to the recursively predicted results after weighted adjustment, generate an anomaly state matrix. If there are anomaly values of multi-dimensional performance metrics that continuously exceed the threshold, it is considered that there are anomalies in the current multi-dimensional performance metrics; The construction formula for the anomaly state matrix is: Among them, represents the th outlier of the multi-dimensional performance index at moment.

6. The software database anomaly monitoring and processing method according to claim 5, wherein: Start the dynamic response mechanism, perform differential processing for different anomalies, and allocate resources through a dynamic response function, giving priority to handling serious anomalies includes the following steps: Execute different processing strategies according to different anomaly types and the severity of the anomalies; The response function combines the deviation degrees of each anomaly indicator and the dynamic weight adjustment strategy, and allocates resources according to the severity of the anomalies; The response function is as follows: Among them, is the total response value of the moment dynamic response mechanism to the anomaly; the response weight of the nth multi-dimensional performance indicator, which is used to measure the priority of each performance indicator in anomaly handling; represents the relationship between the anomaly deviation value and the normal value; is the response smoothing factor, which controls the smoothness of the response; is a logical function used to control the anomaly response speed; controls the anomaly response speed; is the response threshold of the nth multi-dimensional performance indicator.

7. The software database anomaly monitoring and processing method according to claim 6, wherein: After executing the dynamic response mechanism, adjust the response weights in the subsequent recursive process according to the response results. The adjustment formula is: 。 8. The software database anomaly monitoring and processing method according to claim 1, wherein: Optimizing future processing strategies by analyzing historical anomaly processing data includes the following steps: Obtain historical anomaly processing data from the database, and construct a historical data matrix with historical anomaly processing results and processing times: Among them, is the historical data matrix; represents the processing effect of the th anomaly; is the total number of anomaly processing times; Optimize the model through recursive regression, analyze historical data, predict possible future processing requirements, and generate optimized regression results: Among them, is the optimized regression result at the moment; is the processing effect of the is sensitivity parameter of the processing effect of the is the weight factor of historical data; is the expected recovery time.

9. The software database anomaly monitoring and processing method according to claim 8, characterized in that: Based on the optimized regression results, dynamically adjust subsequent processing strategies and sensitivity parameters through the following adaptive adjustment formula: Among them, is the considered time window.

Citation Information

Patent Citations

  • Integrated method for intelligent operation and maintenance of large database

    CN115688016A