Database operation and maintenance safety quantitative analysis method and device, equipment and medium

By building a benchmark testing environment in the database for parallel analysis, and combining rule-based and intelligent analysis, optimization suggestion reports are generated. This solves the problem of database performance analysis that relies on experience in existing technologies, achieves quantitative evaluation and clarifies the direction of optimization, and improves database performance and resource utilization.

CN122045168APending Publication Date: 2026-05-15BEIJING YOUTEJIE INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING YOUTEJIE INFORMATION TECH
Filing Date
2026-01-29
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies rely on the experience of operations and maintenance personnel for database performance analysis, lacking quantitative evaluation, which makes it difficult to separate and evaluate the effects of optimization measures and to clarify the core optimization direction.

Method used

By constructing a benchmark testing environment and employing parallel analysis methods of rule analysis and intelligent analysis, combined with a large AI model, an optimization suggestion report is generated, providing quantitative optimization suggestions.

Benefits of technology

It enables quantitative evaluation of database performance optimization, clarifies optimization directions, improves analysis efficiency and the pertinence of optimization measures, and rapidly improves response speed and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045168A_ABST
    Figure CN122045168A_ABST
Patent Text Reader

Abstract

The invention discloses a database operation and maintenance safety quantitative analysis method and device, equipment and a medium. Comprising the following steps: when a target database has a performance problem, collecting performance related data of the target database; building a benchmark test environment of the target database, and executing parallel analysis on the performance related data based on the benchmark test environment to obtain an initial analysis result; and generating an optimization suggestion report according to the initial analysis result, and performing performance optimization on the target database based on the optimization suggestion report. By establishing a benchmark test environment and executing parallel analysis, test standards are unified to eliminate result deviation caused by environmental differences, different optimization effects are comparable, and meanwhile, the experience advantage of rule analysis and the innovation ability of intelligent analysis are combined, so that the analysis efficiency is improved, and the limitation of single analysis is avoided. The optimization suggestion report is generated, the optimization priority and the implementation direction are defined, measure chaos is avoided, the performance root cause is solved in a targeted mode, and the database response speed and the resource utilization rate are rapidly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of databases, and in particular to a method, apparatus, equipment, and medium for quantitative analysis of database operation and maintenance security. Background Technology

[0002] In the digital age, databases have become the core support for business systems in fields such as finance, e-commerce, and government, and their performance directly determines business response speed and user experience. With the explosive growth of data volume and the increase in business complexity, databases often face performance problems such as query latency, concurrency bottlenecks, and excessive resource consumption, which can lead to business interruptions in severe cases.

[0003] Existing technologies primarily rely on manual analysis methods based on the experience of operations and maintenance personnel. This involves examining performance-related data and combining it with past operational experience to determine optimization directions. The analysis process is highly dependent on the experience of operations and maintenance personnel, often relying on empirical guesswork and lacking unified quantitative evaluation criteria, making it impossible to accurately determine the actual value of optimization measures. When multiple optimization measures are applied simultaneously, their effects overlap, making it difficult to separate the independent impact of individual measures and identify the core optimization direction. Summary of the Invention

[0004] This invention provides a method, device, equipment, and medium for quantitative analysis of database operation and maintenance security. By constructing a unified benchmark testing environment and a dual-engine parallel analysis architecture, it solves the technical problems of traditional database performance analysis relying on experience and guesswork, the inability to quantify and compare optimization effects, and the difficulty in integrating different analysis results.

[0005] According to one aspect of the present invention, a method for quantitative analysis of database operation and maintenance security is provided, the method comprising: When the target database experiences performance issues, collect performance-related data from the target database, including slow query logs, execution plans, and host monitoring data. A benchmark testing environment for the target database is set up. Based on the benchmark testing environment, parallel analysis is performed on performance-related data to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis. An optimization suggestion report is generated based on the initial analysis results, and the performance of the target database is optimized based on the optimization suggestion report.

[0006] Optionally, parallel analysis is performed on performance-related data based on a benchmark testing environment to obtain initial analysis results, including: loading a predefined rule base, testing performance-related data in the benchmark testing environment according to the rule base to form rule analysis results; acquiring an AI large model, testing performance-related data in the benchmark testing environment according to the AI ​​large model to form intelligent analysis results; and integrating the rule analysis results and intelligent analysis results to form initial analysis results.

[0007] Optionally, based on the rule base, performance-related data is tested in a benchmark testing environment to generate rule analysis results, including: sequentially selecting rules from the rule base as target rules; based on the target rules, testing performance-related data in a benchmark testing environment to determine the first optimization time; obtaining the benchmark time corresponding to the benchmark testing environment, calculating the difference between the benchmark time and the first optimization time, and using the ratio of the difference to the benchmark time as the first influence factor; determining the first confidence interval based on the first influence factor; and storing the target rule, the first influence factor, and the first confidence interval in association to generate rule analysis results.

[0008] Optionally, the AI ​​big model is tested on performance-related data in a benchmark environment to generate intelligent analysis results, including: constructing big model prompts; inputting the big model prompts and performance-related data into the AI ​​big model to obtain suggested rules output by the AI ​​big model; testing performance-related data in a benchmark environment based on the suggested rules to determine the second optimization time; obtaining the benchmark time corresponding to the benchmark environment; calculating the difference between the benchmark time and the second optimization time; and using the ratio of the difference to the benchmark time as the second influencing factor; determining the second confidence interval based on the second influencing factor; and storing the suggested rules, the second influencing factor, and the second confidence interval in a correlated manner to generate intelligent analysis results.

[0009] Optionally, an optimization suggestion report is generated based on the initial analysis results, including: merging and deduplicating the initial analysis results to obtain deduplicated initial analysis results; comprehensively evaluating each deduplicated initial analysis result based on the impact factor and confidence interval to obtain a comprehensive score; sorting each deduplicated initial analysis result according to the comprehensive score from high to low to obtain sorted initial analysis results; and generating an optimization suggestion report based on the sorted initial analysis results.

[0010] Optionally, a comprehensive evaluation is performed on each deduplicated initial analysis result based on the impact factor and confidence interval to obtain a comprehensive score, including: determining the implementation difficulty index corresponding to each deduplicated initial analysis result; taking each deduplicated initial analysis result as the target analysis result, and weighting and integrating the impact factor, confidence interval, and implementation difficulty coefficient of each target analysis result to obtain a comprehensive score.

[0011] Optionally, after optimizing the target database based on the optimization suggestion report, the method further includes: obtaining the target query statement; executing the target query statement a specified number of times in the optimized target database and calculating the optimized actual average execution time; calculating the actual improvement rate based on the actual average execution time and the baseline time, and obtaining the expected improvement rate; when the deviation between the actual improvement rate and the expected improvement rate is less than a preset threshold, it is determined that the target database optimization has met the target.

[0012] According to another aspect of the present invention, a database operation and maintenance security quantitative analysis device is provided, the device comprising: The performance-related data collection module is used to collect performance-related data of the target database when performance problems occur. The performance-related data includes slow query logs, execution plans, and host monitoring data. The parallel analysis module is used to build a benchmark testing environment and perform parallel analysis on performance-related data based on the testing environment to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis. The optimization suggestion report generation module is used to generate an optimization suggestion report based on the initial analysis results, and to perform performance optimization on the target database based on the optimization suggestion report.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute a database operation and maintenance security quantitative analysis method according to any embodiment of the present invention.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement a database operation and maintenance security quantitative analysis method as described in any embodiment of the present invention.

[0015] The technical solution of this invention establishes a benchmark testing environment and executes parallel analysis, unifying testing standards to eliminate result biases caused by environmental differences, making different optimization effects comparable. Simultaneously, it combines the experience advantages of rule analysis with the innovative capabilities of intelligent analysis to improve analysis efficiency and avoid the limitations of single analysis. By generating optimization suggestion reports, it clarifies optimization priorities and implementation directions, avoids chaotic measures, and specifically addresses root causes of performance issues, rapidly improving database response speed and resource utilization.

[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a database operation and maintenance security quantitative analysis method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of another database operation and maintenance security quantitative analysis method provided in Embodiment 1 of the present invention; Figure 3 This is a flowchart of another database operation and maintenance security quantitative analysis method provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of a database operation and maintenance security quantitative analysis device provided in Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements a database operation and maintenance security quantitative analysis method according to an embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] Example 1 Figure 1This is a flowchart illustrating a database operation and maintenance security quantitative analysis method according to Embodiment 1 of the present invention. This embodiment is applicable to database performance optimization scenarios. The method can be executed by a database operation and maintenance security quantitative analysis device, which can be implemented in hardware and / or software and can be configured in a computer controller. Figure 1 As shown, the method includes: S110. When the target database experiences performance issues, collect performance-related data from the target database, including slow query logs, execution plans, and host monitoring data.

[0022] The target database refers to the specific database experiencing performance issues and requiring performance diagnosis and optimization, such as the order system database. Performance-related data refers to the key data set used to pinpoint the root cause of database performance problems, including slow query logs, execution plans, and host monitoring data. Slow query logs record Structured Query Language (SQL) queries in the database that take longer than a preset threshold to execute. Execution plans are the execution schemes generated by the database optimizer for SQL queries, including information such as the query access path, index usage, and table join methods, used to analyze the technical reasons for low query efficiency. Host monitoring data refers to the resource usage data of the server hosting the target database, used to investigate the impact of hardware resource bottlenecks on database performance.

[0023] S120. Build a benchmark testing environment for the target database. Perform parallel analysis on performance-related data based on the benchmark testing environment to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis.

[0024] The benchmark testing environment refers to a standardized, isolated testing environment built to quantitatively evaluate the optimization effect. Its data volume, table structure, and hardware configuration are consistent with the target database, providing a unified performance comparison benchmark and ensuring the comparability of the effects of different optimization measures. Parallel analysis refers to simultaneously launching two independent analysis engines to synchronously analyze performance-related data, avoiding the efficiency loss of serial analysis. Both engines share the same benchmark testing environment, ensuring comparable results. This includes rule analysis and intelligent analysis. Rule analysis refers to executing tests according to the rules based on a predefined performance optimization rule base, calculating the performance impact factor corresponding to each rule, which is an experience-driven analysis method. Intelligent analysis refers to a model-based analysis method that uses constructed AI prompts, inputting database query information, table structure, data volume, and other contextual information to obtain AI-generated innovative optimization suggestions. The benchmark testing environment is then used to verify the effectiveness of the suggestions and quantify the impact factors, which is an innovation-driven analysis method. Initial analysis results refer to the raw optimization data set generated during parallel analysis, including the baseline execution time, post-optimization execution time, impact factor, confidence interval, and other indicators for each optimization measure.

[0025] Figure 2 This invention provides a flowchart of a database operation and maintenance security quantitative analysis method according to Embodiment 1. Step S120 mainly includes the following steps S121 to S124: S121. Set up a benchmark testing environment for the target database.

[0026] Specifically, the benchmark testing environment must meet the requirements of being completely consistent with the target database in terms of data volume, table structure, and hardware configuration. Typically, an independent test database is used in conjunction with Docker containers to achieve environment isolation. At the same time, copy-on-write technology is used to create data snapshots so as to quickly restore the data state.

[0027] S122. Load the predefined rule base, and test the performance-related data in the benchmark test environment according to the rule base to form the rule analysis results.

[0028] Optionally, based on the rule base, performance-related data is tested in a benchmark testing environment to generate rule analysis results, including: sequentially selecting rules from the rule base as target rules; based on the target rules, testing performance-related data in a benchmark testing environment to determine the first optimization time; obtaining the benchmark time corresponding to the benchmark testing environment, calculating the difference between the benchmark time and the first optimization time, and using the ratio of the difference to the benchmark time as the first influence factor; determining the first confidence interval based on the first influence factor; and storing the target rule, the first influence factor, and the first confidence interval in association to generate rule analysis results.

[0029] The rule base contains multiple preset database performance optimization rules. Each rule specifies the name of the optimization measure, the corresponding optimization SQL statement, and the cleanup SQL statement after testing. The rules in the rule base are built based on common experience and mature solutions for database performance optimization, covering common optimization directions such as index optimization, statistical information updates, and table structure adjustments.

[0030] Specifically, when conducting rule analysis testing, the principles of the benchmark testing environment must be strictly followed: change only one variable at a time, average the results from multiple tests, and restore the original state after testing to ensure the accuracy and comparability of the test results. First, select each rule in the rule base as the target rule. Execute the corresponding slow query from the performance-related data 100 times in the benchmark testing environment, record the execution time for each run, and calculate the average value; this average value is the benchmark time. Then, perform optimization operations based on the target rule in the benchmark testing environment, that is, execute the optimization SQL defined in the rule. After optimization, execute the same slow query 100 times again, recording the execution time for each run and calculating the average value; this is the first optimization time. After the test, a cleanup SQL statement needs to be executed to restore the benchmark testing environment to its original state to avoid interference from the testing of this rule with subsequent rule tests. Then, the system calculates the first impact factor, which reflects the effectiveness of the rule by quantifying the degree of improvement in query performance brought about by the optimization measures. Finally, the system calculates the first confidence interval to ensure the statistical reliability of the first impact factor, typically using a 95% confidence interval as the standard. During the calculation, the standard deviation of the execution time after 100 optimizations is first obtained, and then the standard error is calculated using the standard error. Based on the standard error and the statistics corresponding to the confidence levels, the confidence interval for the first optimization time can be deduced, and then converted into the confidence interval for the first influencing factor.

[0031] Furthermore, the system will associate and store the relevant information of the target rule, including rule ID, rule name, optimization SQL, cleanup SQL, calculated first influence factor, and first confidence interval, to form a complete rule analysis result. For each rule in the rule base, the above testing, calculation, and storage process is repeated to finally form a set of rule analysis results containing the first influence factor and first confidence interval for all rules. For example, rule R001 has a baseline time of 8.2 seconds, a first optimization time of 7.9 seconds, a first influence factor of 3.66%, and a confidence interval of [3.61%, 3.71%], while rule R002 has a baseline time of 8.2 seconds, a first optimization time of 6.5 seconds, a first influence factor of 20.73%, and a confidence interval of [20.68%, 20.78%].

[0032] S123. Obtain the large AI model, and test the performance-related data in the benchmark testing environment based on the large AI model to generate intelligent analysis results.

[0033] Optionally, the AI ​​big model is tested on performance-related data in a benchmark environment to generate intelligent analysis results, including: constructing big model prompts; inputting the big model prompts and performance-related data into the AI ​​big model to obtain suggested rules output by the AI ​​big model; testing performance-related data in a benchmark environment based on the suggested rules to determine the second optimization time; obtaining the benchmark time corresponding to the benchmark environment; calculating the difference between the benchmark time and the second optimization time; and using the ratio of the difference to the benchmark time as the second influencing factor; determining the second confidence interval based on the second influencing factor; and storing the suggested rules, the second influencing factor, and the second confidence interval in a correlated manner to generate intelligent analysis results.

[0034] It is understood that constructing prompts for large-scale AI models is fundamental to intelligent analysis. These prompts provide complete and accurate contextual information to the AI ​​model, ensuring it can generate targeted database optimization suggestions. Prompts must include key performance-related data, such as the specific slow query statement, its actual execution time, the corresponding table structure, existing indexes, and the data volume. Furthermore, prompts must explicitly require the AI ​​model's output suggestions to include three core components: a description of the optimization measures, the specific SQL statement, and the expected effect and underlying principles. This ensures the feasibility of subsequent testing and implementation, avoiding vague or ambiguous suggestions.

[0035] Specifically, the system can input pre-built large model prompts and performance-related data into the AI ​​large model. Based on its trained database optimization knowledge and logical reasoning capabilities, the large model will output targeted suggested rules. For example, for slow queries in an order system, the AI ​​large model might output two suggested rules: creating a covering index and rewriting the query using a window function. The specific SQL for creating a covering index is: `CREATE INDEX idx_covering ON orders (user_id, status) INCLUDE (id, amount, create_time)`, with the expected effect of avoiding table lookups and directly retrieving all data through the index. The specific SQL for rewriting the query using a window function is: `SELECT * FROM (SELECT *,ROW_NUMBER () OVER (PARTITION BY user_id ORDER BY create_time DESC) as rnFROM orders WHERE status = 'pending') t WHERE user_id = 123 AND rn = 1`, with the expected effect of reducing duplicate scans. These suggested rules may cover similar directions in the existing rule base or propose innovative optimization ideas to supplement the limitations of rule analysis. Then, the system will conduct tests in the benchmark environment based on the suggested rules. The testing process must follow the core principles consistent with the rule analysis: test only one suggested rule at a time, average the execution time after multiple runs, and restore the environment to its original state after the test to ensure that the test results are comparable to the rule analysis results. Taking the creation of a covering index rule as an example, the first step is to execute the corresponding slow query 100 times in the benchmark environment, record the execution time of each run, and calculate the average value. This average value is the baseline time, which is 8.2 seconds in the example. The second step is to apply the suggested rule and execute the corresponding SQL statement. The third step is to execute the same slow query 100 times again, record the execution time of each run, and calculate the average value. This average value is the second optimization time, which is 0.1 seconds in the example. The fourth step is to perform a cleanup operation, deleting the created index by cleaning up the SQL, restoring the benchmark environment to its original state, and avoiding interference with subsequent tests of other suggested rules.

[0036] Furthermore, the system calculates the second impact factor, a process consistent with the first impact factor calculation. Both methods quantify the performance improvement of optimization measures to reflect the effectiveness of the recommended rule. The formula is: Second Impact Factor = (Baseline Time - Second Optimization Time) / Baseline Time × 100%. Using the example data above, with a baseline time of 8.2 seconds and a second optimization time of 0.1 seconds, substituting these values ​​into the formula yields (8.2 - 0.1) / 8.2 × 100% = 98.78%. Similarly, the system calculates the second confidence interval to ensure the statistical reliability of the second impact factor. Finally, the relevant information for each recommended rule, the calculated second impact factor, and the second confidence interval are linked and stored to form the intelligent analysis result. For example, the intelligent analysis result corresponding to the rule for creating a covering index is: Recommended rule: Create covering index; Second impact factor: 98.78%; Second confidence interval: [98.75%, 98.81%].

[0037] S124. Integrate the results of rule analysis and intelligent analysis to form the initial analysis results.

[0038] S130. Generate an optimization suggestion report based on the initial analysis results, and optimize the performance of the target database based on the optimization suggestion report.

[0039] The optimization suggestion report is the final guidance document generated based on the initial analysis results, after deduplication, merging, and comprehensive scoring and sorting. It includes the priority of optimization measures, specific implementation SQL, expected results, implementation window, rollback plan, etc., and serves as the direct operational basis for database performance optimization. Performance optimization refers to the process of executing corresponding optimization operations on the target database according to the optimization suggestion report, verifying the optimization effect through monitoring, and ultimately resolving database performance issues.

[0040] The technical solution of this invention establishes a benchmark testing environment and executes parallel analysis, unifying testing standards to eliminate result biases caused by environmental differences, making different optimization effects comparable. Simultaneously, it combines the experience advantages of rule analysis with the innovative capabilities of intelligent analysis to improve analysis efficiency and avoid the limitations of single analysis. By generating optimization suggestion reports, it clarifies optimization priorities and implementation directions, avoids chaotic measures, and specifically addresses root causes of performance issues, rapidly improving database response speed and resource utilization.

[0041] Example 2 Figure 3 This is a flowchart of a database operation and maintenance security quantitative analysis method provided in Embodiment 2 of the present invention. This embodiment adds a specific process for generating an optimization suggestion report based on the initial analysis results, building upon Embodiment 1. The specific content of steps S210-S220 is largely the same as steps S110-S120 in Embodiment 1, and therefore will not be repeated in this embodiment. Figure 3 As shown, the method includes: S210. When the target database experiences performance issues, collect performance-related data of the target database, including slow query logs, execution plans, and host monitoring data.

[0042] S220. Build a benchmark testing environment for the target database. Perform parallel analysis on performance-related data based on the benchmark testing environment to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis.

[0043] Optionally, parallel analysis is performed on performance-related data based on a benchmark testing environment to obtain initial analysis results, including: loading a predefined rule base, testing performance-related data in the benchmark testing environment according to the rule base to form rule analysis results; acquiring an AI large model, testing performance-related data in the benchmark testing environment according to the AI ​​large model to form intelligent analysis results; and integrating the rule analysis results and intelligent analysis results to form initial analysis results.

[0044] Optionally, based on the rule base, performance-related data is tested in a benchmark testing environment to generate rule analysis results, including: sequentially selecting rules from the rule base as target rules; based on the target rules, testing performance-related data in a benchmark testing environment to determine the first optimization time; obtaining the benchmark time corresponding to the benchmark testing environment, calculating the difference between the benchmark time and the first optimization time, and using the ratio of the difference to the benchmark time as the first influence factor; determining the first confidence interval based on the first influence factor; and storing the target rule, the first influence factor, and the first confidence interval in association to generate rule analysis results.

[0045] Optionally, the AI ​​big model is tested on performance-related data in a benchmark environment to generate intelligent analysis results, including: constructing big model prompts; inputting the big model prompts and performance-related data into the AI ​​big model to obtain suggested rules output by the AI ​​big model; testing performance-related data in a benchmark environment based on the suggested rules to determine the second optimization time; obtaining the benchmark time corresponding to the benchmark environment; calculating the difference between the benchmark time and the second optimization time; and using the ratio of the difference to the benchmark time as the second influencing factor; determining the second confidence interval based on the second influencing factor; and storing the suggested rules, the second influencing factor, and the second confidence interval in a correlated manner to generate intelligent analysis results.

[0046] S230. Merge and deduplicate the initial analysis results to obtain the deduplicated initial analysis results.

[0047] Deduplication refers to determining whether different optimization measures are essentially the same. This is done by comprehensively considering multi-dimensional similarity, including the semantic similarity of the text describing the optimization measures, the similarity of the corresponding operational logic structure, and the similarity of the performance impact trend. A reasonable similarity threshold is set, and if the comprehensive similarity of two optimization measures exceeds the threshold, they are considered essentially the same. For optimization measures that are essentially the same, the one with the higher impact factor is retained, thereby eliminating duplicate content and avoiding redundant information in subsequent evaluations, ultimately yielding the initial analysis results after deduplication.

[0048] S240. Based on the impact factor and confidence interval, the initial analysis results after deduplication are comprehensively evaluated to obtain a comprehensive score.

[0049] Optionally, a comprehensive evaluation is performed on each deduplicated initial analysis result based on the impact factor and confidence interval to obtain a comprehensive score, including: determining the implementation difficulty index corresponding to each deduplicated initial analysis result; taking each deduplicated initial analysis result as the target analysis result, and weighting and integrating the impact factor, confidence interval, and implementation difficulty coefficient of each target analysis result to obtain a comprehensive score.

[0050] Specifically, before conducting a comprehensive evaluation, it is necessary to first determine the implementation difficulty index corresponding to each initial analysis result after deduplication. The quantification of the implementation difficulty index is based on the actual implementation scenario of the optimization measures, considering multiple dimensions: including the technical complexity of the optimization operation itself, such as the difference in difficulty between simple index creation and complex table structure reconstruction; the hardware resources and software environment support required during implementation, whether business downtime or avoiding peak business periods is necessary, i.e., the degree of impact on existing business; the complexity of rollback after the operation, and potential risks, etc. Finally, the implementation difficulty is quantified into a value between 0 and 1, where the closer the value is to 0, the lower the implementation difficulty and the easier it is to implement; the closer the value is to 1, the higher the implementation difficulty, and the greater the implementation cost and risk. For example, the implementation difficulty index of routine index optimization operations is relatively low, while the implementation difficulty index of large-scale table partition adjustments or architecture transformation operations is relatively high. The comprehensive score needs to fully reflect the performance improvement value, reliability of results and feasibility of implementation of optimization measures. Therefore, the impact factor, confidence interval width and implementation difficulty index are selected as evaluation dimensions, and scientific and reasonable weights are assigned to each dimension. The weights can be flexibly configured according to business needs and database operation and maintenance scenarios. For example, the impact factor weight is 0.6, the confidence interval correlation weight is 0.2 and the implementation difficulty index weight is 0.2.

[0051] In the specific calculation, the system normalizes the data for each dimension to ensure the comparability of values ​​across different dimensions. It converts the impact factor into a normalized value within the 0-1 range, directly reflecting the performance improvement of the optimization measures. For the confidence interval, its width is calculated (the difference between the upper and lower limits of the confidence interval) and normalized. The score for this item is 1 minus the normalized confidence interval width. The narrower the confidence interval width, the higher the statistical reliability of the impact factor, and the closer the score is to 1. The implementation difficulty index itself is a value within the 0-1 range; the score for this item is (1 minus the implementation difficulty index). The lower the implementation difficulty, the higher the score. Then, a weighted sum is calculated according to preset weights. The formula is: Comprehensive Score = (Normalized Impact Factor × Impact Factor Weight) + (1 - Normalized Confidence Interval Width) × Confidence Interval Weight + (1 - Implementation Difficulty Index) × Implementation Difficulty Weight. This formula organically integrates the evaluation results from the three dimensions, ultimately yielding a comprehensive score for each target analysis result. This score not only highlights the core value of performance improvement but also takes into account the statistical reliability and feasibility of the results, providing a scientific basis for ranking subsequent optimization measures.

[0052] S250. Sort the initial analysis results after deduplication according to the comprehensive score from high to low to obtain the sorted initial analysis results.

[0053] Specifically, the sorting process arranges the initial analysis results after deduplication in descending order of comprehensive score. A higher comprehensive score indicates a more significant performance improvement, higher reliability, and lower implementation difficulty for the optimization measure, thus placing it in a higher priority. This sorting process clarifies the implementation priority of different optimization measures, providing a clear logical order for generating subsequent optimization suggestion reports and facilitating operations personnel in developing implementation plans based on priority.

[0054] S260. Generate an optimization suggestion report based on the initial analysis results after sorting.

[0055] Specifically, the optimization recommendation report can include an execution summary section that briefly describes the database performance issues, core findings, and the overall priority of optimization recommendations; detailed optimization plans are divided into levels according to their priority, with each level clearly defining the corresponding optimization measures, core principles, expected performance improvements, implementation requirements, and potential risks; the implementation plan section clearly defines the timeline, division of responsibilities, specific operational steps, and rollback plan for each optimization measure to ensure the implementation process is controllable; and the monitoring and verification plan clearly defines the key monitoring indicators, acceptance criteria, and monitoring frequency after optimization to verify whether the optimization effect has achieved the expected results, providing complete operational guidance and closed-loop verification basis for database performance optimization.

[0056] S270. Optimize the performance of the target database based on the optimization suggestion report.

[0057] Optionally, after optimizing the target database based on the optimization suggestion report, the method further includes: obtaining the target query statement; executing the target query statement a specified number of times in the optimized target database and calculating the optimized actual average execution time; calculating the actual improvement rate based on the actual average execution time and the baseline time, and obtaining the expected improvement rate; when the deviation between the actual improvement rate and the expected improvement rate is less than a preset threshold, it is determined that the target database optimization has met the target.

[0058] The technical solution of this invention, by merging and deduplicating the initial analysis results, can eliminate duplicate and conflicting optimization information, avoid redundant suggestions interfering with decision-making, and ensure the accuracy of subsequent evaluations. Through comprehensive evaluation based on impact factors and confidence intervals, the improvement in optimization effect and statistical reliability can be fully considered, resulting in a scientific comprehensive score. Sorting according to the comprehensive score clarifies the priority of optimization measures, facilitating the rapid identification of core optimization directions. By generating an optimization suggestion report, a clear and focused practical guideline can be integrated, directly providing a clear basis for database performance optimization and improving the pertinence and efficiency of optimization implementation.

[0059] Example 3 Figure 4 This is a schematic diagram of a database operation and maintenance security quantitative analysis device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a performance-related data acquisition module 310, used to collect performance-related data of the target database when a performance problem occurs in the target database, wherein the performance-related data includes slow query logs, execution plans and host monitoring data; The parallel analysis module 320 is used to build a benchmark testing environment and perform parallel analysis on performance-related data based on the testing environment to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis. The optimization suggestion report generation module 330 is used to generate an optimization suggestion report based on the initial analysis results, and to perform performance optimization on the target database based on the optimization suggestion report.

[0060] Optionally, the parallel analysis module 320 specifically includes: a rule analysis unit, used to: load a predefined rule base, test performance-related data in a benchmark environment based on the rule base, and form rule analysis results; an intelligent analysis unit, used to: acquire a large AI model, test performance-related data in a benchmark environment based on the large AI model, and form intelligent analysis results; and an analysis result integration unit, used to: integrate rule analysis results and intelligent analysis results to form initial analysis results.

[0061] Optionally, a rule analysis unit is used to: sequentially select rules from the rule base as target rules; test performance-related data in a benchmark testing environment based on the target rules to determine the first optimization time; obtain the benchmark time corresponding to the benchmark testing environment, calculate the difference between the benchmark time and the first optimization time, and use the ratio of the difference to the benchmark time as the first influence factor; determine the first confidence interval based on the first influence factor; and associate and store the target rules, the first influence factor, and the first confidence interval to form the rule analysis result.

[0062] Optionally, an intelligent analysis unit is used for: constructing large model suggestion words; inputting the large model suggestion words and performance-related data into the AI ​​large model to obtain the suggested rules output by the AI ​​large model; based on the suggested rules, testing the performance-related data in a benchmark testing environment to determine the second optimization time; obtaining the benchmark time corresponding to the benchmark testing environment; calculating the difference between the benchmark time and the second optimization time; and using the ratio of the difference to the benchmark time as the second influencing factor; determining the second confidence interval based on the second influencing factor; and storing the suggested rules, the second influencing factor, and the second confidence interval in a correlated manner to form an intelligent analysis result.

[0063] Optionally, the optimization suggestion report generation module 330 specifically includes: a result deduplication unit, used to merge and deduplicate the initial analysis results to obtain deduplicated initial analysis results; a comprehensive scoring unit, used to comprehensively evaluate each deduplicated initial analysis result based on the impact factor and confidence interval to obtain a comprehensive score; a result sorting unit, used to sort each deduplicated initial analysis result in descending order of comprehensive score to obtain sorted initial analysis results; and a suggestion report generation unit, used to generate an optimization suggestion report based on the sorted initial analysis results.

[0064] Optionally, a comprehensive scoring unit is used to: determine the implementation difficulty index corresponding to each deduplicated initial analysis result; take each deduplicated initial analysis result as the target analysis result, and weight and fuse the influence factors, confidence intervals and implementation difficulty coefficients of each target analysis result to obtain a comprehensive score.

[0065] Optionally, the device further includes: an optimization verification module, used to obtain the target query statement after performance optimization of the target database based on the optimization suggestion report, execute the target query statement a specified number of times in the optimized target database, and calculate the optimized actual average execution time; calculate the actual improvement rate based on the actual average execution time and the baseline time, and obtain the expected improvement rate; when the deviation between the actual improvement rate and the expected improvement rate is less than a preset threshold, it is determined that the target database optimization has met the standard.

[0066] The technical solution of this invention establishes a benchmark testing environment and executes parallel analysis, unifying testing standards to eliminate result biases caused by environmental differences, making different optimization effects comparable. Simultaneously, it combines the experience advantages of rule analysis with the innovative capabilities of intelligent analysis to improve analysis efficiency and avoid the limitations of single analysis. By generating optimization suggestion reports, it clarifies optimization priorities and implementation directions, avoids chaotic measures, and specifically addresses root causes of performance issues, rapidly improving database response speed and resource utilization.

[0067] The database operation and maintenance security quantitative analysis device provided in this embodiment of the invention can execute the database operation and maintenance security quantitative analysis method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0068] Example 4 Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0069] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0070] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0071] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a database operation and maintenance security quantitative analysis method.

[0072] In some embodiments, a database operation and maintenance security quantitative analysis method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the database operation and maintenance security quantitative analysis method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform a database operation and maintenance security quantitative analysis method by any other suitable means (e.g., by means of firmware).

[0073] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0074] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0075] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0076] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0077] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0078] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0079] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0080] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A quantitative analysis method for database operation and maintenance security, characterized in that, include: When the target database experiences performance issues, collect performance-related data from the target database, including slow query logs, execution plans, and host monitoring data. A benchmark testing environment for the target database is set up, and parallel analysis is performed on the performance-related data based on the benchmark testing environment to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis. An optimization suggestion report is generated based on the initial analysis results, and the target database is then optimized based on the optimization suggestion report.

2. The method according to claim 1, characterized in that, The parallel analysis of the performance-related data based on the benchmark testing environment yields initial analysis results, including: Load a predefined rule base, and test the performance-related data in the benchmark test environment according to the rule base to generate rule analysis results; Obtain a large AI model, and test the performance-related data in the benchmark testing environment based on the large AI model to generate intelligent analysis results; The results of the rule analysis and the results of the intelligent analysis are integrated to form the initial analysis results.

3. The method according to claim 2, characterized in that, The step of testing the performance-related data in the benchmark testing environment according to the rule base to generate rule analysis results includes: Select rules from the rule base one by one as target rules; Based on the target rules, the performance-related data are tested in the benchmark testing environment to determine the first optimization time; Obtain the benchmark time corresponding to the benchmark test environment, calculate the difference between the benchmark time and the first optimization time, and use the ratio of the difference to the benchmark time as the first influencing factor; Determine the first confidence interval based on the first impact factor; The target rule, the first influencing factor, and the first confidence interval are associated and stored to form the rule analysis result.

4. The method according to claim 2, characterized in that, The process of testing the performance-related data in the benchmark testing environment based on the AI ​​big model to generate intelligent analysis results includes: Construct large model suggestion words, and input the large model suggestion words and the performance-related data into the AI ​​large model to obtain the suggested rules output by the AI ​​large model; Based on the recommended rules, the performance-related data are tested in the benchmark environment to determine the second optimization time; Obtain the benchmark time corresponding to the benchmark test environment, calculate the difference between the benchmark time and the second optimization time, and use the ratio of the difference to the benchmark time as the second influencing factor; Determine the second confidence interval based on the second impact factor; The suggested rules, the second influencing factor, and the second confidence interval are associated and stored to form intelligent analysis results.

5. The method according to claim 1, characterized in that, The step of generating an optimization suggestion report based on the initial analysis results includes: The initial analysis results are merged and deduplicated to obtain the deduplicated initial analysis results; A comprehensive score is obtained by comprehensively evaluating the initial analysis results after deduplication based on the impact factor and confidence interval. The initial analysis results after deduplication are sorted according to the comprehensive score from high to low to obtain the sorted initial analysis results. An optimization suggestion report is generated based on the initial analysis results after sorting.

6. The method according to claim 5, characterized in that, The initial analysis results after deduplication are comprehensively evaluated based on the impact factor and confidence interval to obtain a comprehensive score, including: Determine the implementation difficulty index corresponding to each deduplication initial analysis result; Each initial analysis result after deduplication is used as the target analysis result. The influence factors, confidence intervals, and implementation difficulty coefficients of each target analysis result are weighted and integrated to obtain a comprehensive score.

7. The method according to claim 4, characterized in that, After performing performance optimization on the target database based on the optimization suggestion report, the method further includes: Obtain the target query statement, execute the query statement a specified number of times in the optimized target database, and calculate the optimized actual average execution time; The actual improvement rate is calculated based on the actual average execution time and the baseline time, and the expected improvement rate is obtained. When the deviation between the actual improvement rate and the expected improvement rate is less than a preset threshold, the target database optimization is determined to have met the standard.

8. A database operation and maintenance security quantitative analysis device, characterized in that, include: The performance-related data acquisition module is used to collect performance-related data of the target database when performance problems occur. The performance-related data includes slow query logs, execution plans, and host monitoring data. The parallel analysis module is used to build a benchmark testing environment and perform parallel analysis on the performance-related data based on the testing environment to obtain initial analysis results. The parallel analysis includes rule analysis and intelligent analysis. An optimization suggestion report generation module is used to generate an optimization suggestion report based on the initial analysis results, and to perform performance optimization on the target database based on the optimization suggestion report.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions that are used to cause a processor to execute the method of any one of claims 1-7.